{"id":3076,"date":"2026-09-28T00:10:34","date_gmt":"2026-09-27T15:10:34","guid":{"rendered":"https:\/\/machiaworx.net\/?p=3076"},"modified":"2026-09-28T05:38:19","modified_gmt":"2026-09-27T20:38:19","slug":"2026%e5%b9%b4%e6%99%82%e7%82%b9%e3%81%ae4kintro%e3%81%ae%e4%bd%9c%e3%82%8a%e6%96%b9%e3%81%ae%e4%b8%80%e4%be%8b%e3%80%82","status":"publish","type":"post","link":"https:\/\/machiaworx.net\/?p=3076","title":{"rendered":"2026\u5e74\u6642\u70b9\u306e4kintro\u306e\u4f5c\u308a\u65b9\u306e\u4e00\u4f8b\u3002"},"content":{"rendered":"<p>\u4eca\u65e5AkibaExecutableParty\u884c\u3063\u3066\u304d\u3066\u3001Sointu\u3059\u3052\u3048\u306a\u3063\u3066\u306a\u3063\u305f\u306e\u3082\u3042\u308a\u3001<br \/>\n\u73fe\u72b6\u3067\u4f5c\u308b\u3053\u3068\u306b\u306a\u308b4kb intro\u306e\u958b\u767a\u624b\u9806\u3092\u601d\u3044\u3064\u3044\u3066\u4f5c\u3063\u3066\u307f\u305f\u3002<\/p>\n<p>\u3067\u304d\u308b\u3060\u3051\u30b3\u30f3\u30d1\u30a4\u30eb\u5468\u308a\u3092\u660e\u78ba\u306b\u3057\u3066\u304a\u304f\u306e\u304c\u76ee\u7684\u3002<\/p>\n<h3>\u76ee\u7684<\/h3>\n<p>\u6e96\u5099\u304c\u7c21\u5358\u306a\u30c7\u30e2\u306e\u4f5c\u308a\u65b9\u3092\u78ba\u8a8d\u3059\u308b\u3002<br \/>\n\u8272\u3005\u304a\u8a66\u3057\u3067\u304d\u308b\u74b0\u5883\u304c\u5fc5\u8981\u3002\u304b\u3064\u7c21\u5358\u306a\u5358\u4f4d\u3067\u751f\u6210\u3057\u3066\u3044\u304d\u3001\u81ea\u52d5\u5316\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u3002<\/p>\n<p>IDE\u4f9d\u5b58\u3067\u4f5c\u308b\u5834\u5408\u3001\u30b3\u30f3\u30d1\u30a4\u30e9\u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u5c71\u306e\u3088\u3046\u306b\u4ed8\u304f\u305f\u3081\u3069\u308c\u304c\u5fc5\u8981\u304b\u304c\u5206\u304b\u308a\u3065\u3089\u304f\u306a\u308b\u3002\u6700\u8fd1\u3060\u3068\u6700\u9069\u5316\u3084\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30c1\u30a7\u30c3\u30af\u7528\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3082\u591a\u304f\u306a\u3063\u3066\u304d\u3066\u304a\u308a\u3001\u6c17\u8efd\u306b\u30b3\u30f3\u30d1\u30a4\u30eb\u304c\u3067\u304d\u306a\u3044\u305f\u3081\u3001\u305d\u3046\u3044\u3046\u306e\u3092\u306a\u304f\u3057\u305f\u5358\u7d14\u30b3\u30f3\u30d1\u30a4\u30eb\u304c\u53ef\u80fd\u306a\u74b0\u5883\u3092\u7528\u610f\u3057\u3066\u304a\u304f\u3002<\/p>\n<h3>\u97f3\u697d<\/h3>\n<p>Sointu\u3092\u4f7f\u3046\u3002<br \/>\n<a href=\"https:\/\/github.com\/vsariola\/sointu\">vsariola\/sointu: Fork of 4klang that can target 386, amd64 and WebAssembly. Tools run on Windows, Mac &amp; Linux<\/a><\/p>\n<p>\u3053\u308c\u3067\u30bd\u30f3\u30b0\u3092\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3068\u3057\u3066\u5410\u304d\u51fa\u3059\u3002<br \/>\n\u540d\u524d.asm\u3001\u540d\u524d.h\u3001\u540d\u524d.inc\u304c\u51fa\u529b\u3055\u308c\u3066\u3044\u305f\u3089\u6210\u529f\u3002<\/p>\n<p>\u30d8\u30c3\u30c0\u306e\u30c7\u30a3\u30ec\u30af\u30c6\u30a3\u30d6\u306f32bit\u74b0\u5883\u306e\u8a18\u8ff0\u3092\u524d\u63d0\u3068\u3057\u3066\u3044\u308b\u306e\u3067\u3001\u57fa\u672c\u7684\u306b\u306f32bit\u74b0\u5883\u3067\u30b3\u30f3\u30d1\u30a4\u30eb\u3059\u308b\u306e\u304c\u60f3\u5b9a\u306e\u6a21\u69d8\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">sointu-compile -arch 386 -os windows song.yml<\/pre>\n<h3>\u30a6\u30a3\u30f3\u30c9\u30a6\u5468\u308a<\/h3>\n<p>\u9069\u5f53\u306b\u66f8\u304f\u3002<br \/>\n\u4eca\u56de\u306e\u30b3\u30fc\u30c9\u306f\u3001\u7d42\u4e86\u3057\u3066\u3082\u30d7\u30ed\u30bb\u30b9\u81ea\u4f53\u306f\u6b7b\u306a\u306a\u3044\u3088\u3046\u3067\u3001\u30bf\u30b9\u30af\u30de\u30cd\u30fc\u30b8\u30e3\u304b\u3089\u7d42\u4e86\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u672c\u6765\u3060\u3068\u3053\u3046\u3044\u3046\u306e\u4f5c\u3063\u3061\u3083\u3042\u304b\u3093\u3051\u3069\u3001\u30c6\u30b9\u30c8\u306a\u306e\u3067\u3054\u52d8\u5f01\u3092\u3002<\/p>\n<p>\u3061\u306a\u307f\u306bstdcall\u306b\u3057\u3066\u3044\u308b\u7406\u7531\u306f\u3001Sointu\u306e\u751f\u6210\u3055\u308c\u305f\u30d8\u30c3\u30c0\u90e8\u5206\u306b\u300c__stdcall\u300d\u3068\u66f8\u3044\u3066\u3042\u308b\u305f\u3081\u3002<br \/>\n\u3064\u307e\u308aSointu\u306b\u5408\u308f\u305b\u3066\u74b0\u5883\u8abf\u6574\u3057\u305f\u3068\u3082\u3044\u3048\u308b\u3002<\/p>\n<p>main.c<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#include &lt;windows.h&gt;\r\n#include &lt;mmsystem.h&gt;\r\n#include &lt;mmreg.h&gt;\r\n\r\n#ifdef __cplusplus\r\nextern \"C\" {\r\n#endif\r\n    \/\/ Sointu\u304c1\u56de\u3067\u5168\u697d\u66f2\u3092\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3059\u308b\u95a2\u6570\r\n    void __stdcall su_render_song(void* buffer);\r\n#ifdef __cplusplus\r\n}\r\n#endif\r\n\r\n#define SAMPLE_RATE 44100\r\n#define CHANNELS 2\r\n\r\n\/\/ \ud83c\udfb5 \u697d\u66f2\u306e\u9577\u3055\u306b\u5fdc\u3058\u3066\u3053\u3053\u3092\u8a2d\u5b9a\uff08\u4f8b: 44100Hz * 2ch * 180\u79d2 \u2252 15,876,000\uff09\r\n#define SU_LENGTH_IN_SAMPLES (SAMPLE_RATE * CHANNELS * 180)\r\n\r\n\/\/ \u5de8\u5927\u306a\u30d0\u30c3\u30d5\u30a1\u3067\u3059\u304c\u3001\u30b0\u30ed\u30fc\u30d0\u30eb\u5909\u6570\uff08BSS\u9818\u57df\uff09\u306b\u7f6e\u304f\u3053\u3068\u3067exe\u30b5\u30a4\u30ba\u306f\u80a5\u5927\u5316\u3057\u307e\u305b\u3093\r\nfloat audio_buffer[SU_LENGTH_IN_SAMPLES];\r\n\r\nHWAVEOUT hWaveOut;\r\nWAVEHDR waveHdr;\r\n\r\nLRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) {\r\n    if (msg == WM_DESTROY) { ExitProcess(0); }\r\n    return DefWindowProc(hwnd, msg, wp, lp);\r\n}\r\n\r\nvoid __cdecl EntryPoint() {\r\n    \/\/ 1. \u5148\u306bSointu\u3067\u300c\u697d\u66f2\u5168\u4f53\u306e\u6ce2\u5f62\u300d\u3092\u3059\u3079\u3066\u8a08\u7b97\u3059\u308b\r\n    su_render_song(audio_buffer);\r\n\r\n    \/\/ 2. \u30a6\u30a3\u30f3\u30c9\u30a6\u751f\u6210\r\n    HWND hwnd = CreateWindowA(\"edit\", \"Sointu Demo\", WS_POPUP | WS_VISIBLE, \r\n                              0, 0, 640, 480, NULL, NULL, NULL, NULL);\r\n    HDC hdc = GetDC(hwnd);\r\n\r\n    \/\/ 3. \u30aa\u30fc\u30c7\u30a3\u30aa\u30c7\u30d0\u30a4\u30b9\u306e\u521d\u671f\u5316\r\n    WAVEFORMATEX wfx = {\r\n        .wFormatTag = WAVE_FORMAT_IEEE_FLOAT,\r\n        .nChannels = CHANNELS,\r\n        .nSamplesPerSec = SAMPLE_RATE,\r\n        .wBitsPerSample = 32,\r\n        .nBlockAlign = (CHANNELS * 32) \/ 8,\r\n        .nAvgBytesPerSec = SAMPLE_RATE * ((CHANNELS * 32) \/ 8),\r\n        .cbSize = 0\r\n    };\r\n\r\n    waveOutOpen(&amp;hWaveOut, WAVE_MAPPER, &amp;wfx, 0, 0, CALLBACK_NULL);\r\n\r\n    waveHdr.lpData = (LPSTR)audio_buffer;\r\n    waveHdr.dwBufferLength = sizeof(audio_buffer);\r\n    waveHdr.dwFlags = 0;\r\n    \r\n    waveOutPrepareHeader(hWaveOut, &amp;waveHdr, sizeof(WAVEHDR));\r\n    waveOutWrite(hWaveOut, &amp;waveHdr, sizeof(WAVEHDR)); \/\/ \u3053\u308c\u3067\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u3067\u6700\u5f8c\u307e\u3067\u81ea\u52d5\u518d\u751f\u3055\u308c\u307e\u3059\r\n\r\n    \/\/ 5. \u30b0\u30e9\u30d5\u30a3\u30c3\u30af\uff06\u30e1\u30a4\u30f3\u30eb\u30fc\u30d7\r\n    int frame = 0;\r\n    while (1) {\r\n        MSG msg;\r\n        if (PeekMessage(&amp;msg, NULL, 0, 0, PM_REMOVE)) {\r\n            DispatchMessage(&amp;msg);\r\n        }\r\n\r\n        HBRUSH brush = CreateSolidBrush(RGB((frame) % 255, 50, 100));\r\n        RECT rect = {0, 0, 640, 480};\r\n        FillRect(hdc, &amp;rect, brush);\r\n        DeleteObject(brush);\r\n\r\n        frame++;\r\n        Sleep(16); \/\/ \u7d0460fps\r\n    }\r\n}\r\n<\/pre>\n<h3>\u30b3\u30f3\u30d1\u30a4\u30eb\u30fb\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30b3\u30fc\u30c9\u751f\u6210<\/h3>\n<p>\u307e\u305a\u30bd\u30f3\u30b0\u304b\u3089\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30b3\u30fc\u30c9\u3092\u751f\u6210\u3059\u308b\u3002<br \/>\n\u30c4\u30fc\u30eb\u306fNASM\u3092\u4f7f\u3046\u300232bit\u74b0\u5883\u3092\u60f3\u5b9a\u3057\u3066\u30b3\u30de\u30f3\u30c9\u3092\u5165\u529b\u3057\u3066\u304a\u304f\u3002<\/p>\n<p>64bit\u74b0\u5883\u306f\u30d8\u30c3\u30c0\u306b\u3082\u66f8\u3044\u3066\u306a\u3044\u306e\u3067\u3001\u57fa\u672c\u7684\u306b\u8003\u3048\u306a\u3044\u3002<br \/>\n\u5fc5\u8981\u304c\u3042\u308c\u3070\u81ea\u5206\u3067\u8ffd\u52a0\u3057\u3066<\/p>\n<p><a href=\"https:\/\/github.com\/netwide-assembler\/nasm\">netwide-assembler\/nasm: A cross-platform x86 assembler with an Intel-like syntax<\/a><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">nasm -f win32 song.asm -o song.obj<\/pre>\n<p>\u6b21\u306bmain.c\u306e\u30b3\u30f3\u30d1\u30a4\u30eb\u3092\u884c\u3046\u3002\u3053\u308c\u306fVisualStudio\u306e\u30b3\u30f3\u30d1\u30a4\u30e9\u3092\u4f7f\u3046\u3002<br \/>\nVisualStudio\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u3042\u3068\u3067\u3001\u30d5\u30a9\u30eb\u30c0\u7b49\u3092\u8aad\u307f\u8fbc\u3093\u3060\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u7d4c\u7531\u3067\u884c\u3046\u306e\u304c\u7c21\u5358\u3002<br \/>\n\u4eca\u56de\u306f32bit\u74b0\u5883\u3001x86 NativeTools Command Prompt\u3068\u3044\u3046\u65b9\u3092\u5229\u7528\u3057\u305f\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">cl.exe \/c \/O1 \/GS- main.c \/Fomain.obj<\/pre>\n<p>\u6700\u5f8c\u306bCrinkler\u3067\u30ea\u30f3\u30af\u3059\u308b\u3002<br \/>\nCrinkler\u308232bit\/64bit\u304c\u5b58\u5728\u3059\u308b\u306e\u3067\u78ba\u8a8d\u3057\u3066\u304a\u304f\u3053\u3068\u3002<br \/>\n\uff08\u30ea\u30ea\u30fc\u30b9\u306b\u306f\u3069\u3063\u3061\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3082\u5c01\u5165\u3055\u308c\u3066\u308b\uff09<\/p>\n<p><a href=\"https:\/\/github.com\/runestubbe\/Crinkler\/\">runestubbe\/Crinkler: Crinkler is an executable file compressor (or rather, a compressing linker) for compressing small 32-bit Windows demoscene executables. As of 2026, it is the most widely used tool for compressing 1k\/4k\/8k intros.<\/a><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">crinkler.exe \/ENTRY:EntryPoint \/SUBSYSTEM:WINDOWS main.obj winmm.lib user32.lib gdi32.lib kernel32.lib \/OUT:demo.exe<\/pre>\n<p>\u3053\u308c\u30674kb\u306e\u5b9f\u884c\u30d5\u30a1\u30a4\u30eb\u304c\u51fa\u529b\u3067\u304d\u308b\u3002<br \/>\n\u3061\u306a\u307f\u306b\u97f3\u697d\u3044\u308c\u308b\u30681.6kb\u3060\u3063\u305f\u3002\u97f3\u697d\u5165\u308c\u306a\u3044\u3068600byte\u3092\u5207\u308b\u3002<\/p>\n<p>\u81ea\u5206\u304c4kb intro\u4f5c\u3063\u305f\u9803\u3068\u6bd4\u3079\u3066\u3001\u3060\u3044\u3076\u3068\u3093\u3067\u3082\u306a\u3044\u4e8b\u306b\u306a\u3063\u3066\u308b\u3002<\/p>\n<p>\u3046\u307e\u304f\u52d5\u304b\u306a\u3044\u3068\u304d\u306f\u3001Sointu\u5074\u306e\u30a2\u30bb\u30f3\u30d6\u30ea\u30b3\u30fc\u30c9\u3001\u306a\u3044\u3057\u306fmain\u95a2\u6570\u3092\u4fee\u6b63\u3059\u308b\u3053\u3068\u306b\u306a\u308b\u306e\u3067\u6ce8\u610f\u306d\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4eca\u65e5AkibaExecutableParty\u884c\u3063\u3066\u304d\u3066\u3001Sointu\u3059\u3052\u3048\u306a\u3063\u3066\u306a\u3063\u305f\u306e\u3082\u3042\u308a\u3001 \u73fe\u72b6\u3067\u4f5c\u308b\u3053\u3068\u306b\u306a\u308b4kb intro\u306e\u958b\u767a\u624b\u9806\u3092\u601d\u3044\u3064\u3044\u3066\u4f5c\u3063\u3066\u307f\u305f\u3002 \u3067\u304d\u308b\u3060\u3051\u30b3\u30f3\u30d1\u30a4\u30eb\u5468\u308a\u3092\u660e\u78ba\u306b\u3057\u3066\u304a\u304f\u306e\u304c\u76ee\u7684&hellip; <span class=\"clear\"><\/span><a href=\"https:\/\/machiaworx.net\/?p=3076\" class=\"more-link read-more\" rel=\"bookmark\"><span class=\"screen-reader-text\">2026\u5e74\u6642\u70b9\u306e4kintro\u306e\u4f5c\u308a\u65b9\u306e\u4e00\u4f8b\u3002<\/span><i class=\"fa fa-arrow-right\"><\/i> \u306e\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19,4],"tags":[],"class_list":["post-3076","post","type-post","status-publish","format-standard","hentry","category-demoscene","category-pgm"],"_links":{"self":[{"href":"https:\/\/machiaworx.net\/index.php?rest_route=\/wp\/v2\/posts\/3076","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/machiaworx.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/machiaworx.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/machiaworx.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/machiaworx.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3076"}],"version-history":[{"count":12,"href":"https:\/\/machiaworx.net\/index.php?rest_route=\/wp\/v2\/posts\/3076\/revisions"}],"predecessor-version":[{"id":3088,"href":"https:\/\/machiaworx.net\/index.php?rest_route=\/wp\/v2\/posts\/3076\/revisions\/3088"}],"wp:attachment":[{"href":"https:\/\/machiaworx.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3076"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/machiaworx.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3076"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/machiaworx.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3076"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}