cmake -B build && cmake --build build
./build/poly-sampler-webview
#
source /path/to/emsdk/emsdk_env.sh
# Build WASM
emcmake cmake -B build/wasm
cmake --build build/wasm
# Create distribution
cmake --build build/wasm --target dist
# Serve
python3 scripts/serve.py
polyphonicSampler/
├── src/ # C++ source code
│ ├── PolySampler.cpp/h
│ ├── App.h
│ ├── main_webview.cpp
│ └── emscripten_bindings.cpp
│
├── ui/ # UI source (shared by native & WASM)
│ ├── index.html
│ ├── main.js
│ ├── poly-sampler-processor.js
│ └── free-queue.js
│
├── scripts/
│ └── serve.py # Dev server for dist/
│
├── build/ # Native build artifacts (gitignored)
│ └── poly-sampler-webview
│
├── build/wasm/ # WASM build artifacts (gitignored)
│ └── poly-sampler.wasmmodule.js
└── dist/ # WASM distribution (gitignored)
├── index.html # Copied from ui/
├── main.js
├── poly-sampler-processor.js
├── free-queue.js
└── poly-sampler.wasmmodule.js # Built WASM