C++ port of the NINEIGHT web app "NINEIGHT" as VST3 / AU / Standalone (JUCE 8).
- Audio: native
ymfm::ym2608— the same emulator the web app compiles to WASM. Register packing, voice allocation, resampler and rhythm-ROM init are line-for-line ports of@opna/core, so the plugin sounds identical. - UI: the actual Phaser 3 web UI (PC-98 CRT aesthetic) embedded via JUCE 8
WebBrowserComponent, talking to the native engine over a JS↔C++ bridge (window.__JUCE__). - 52 host-automatable parameters (algorithm, feedback, LFO, gain, pan, poly, 4 ops × 11); state = APVTS XML.
cmake -B build -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=clang-12 -DCMAKE_CXX_COMPILER=clang++-12 # gcc 9 breaks on JUCE 8 harfbuzz
cmake --build build --parallelOutputs land in build/Nineight_artefacts/Release/{VST3,Standalone} and are copied to ~/.vst3.
Deps: libwebkit2gtk-4.0-dev + usual JUCE X11/ALSA packages.
Requires Xcode (or Command Line Tools) and CMake ≥ 3.22. The FORMATS line i
CMakeLists adds AU automatically on Darwin. The UI uses the system WKWebView —
no extra dependencies.
# clone with submodules (JUCE)
git clone --recurse-submodules <repo-url> && cd nin8
# universal binary (Apple Silicon + Intel)
cmake -B build -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
cmake --build build --parallelOutputs: build/Nineight_artefacts/Release/{VST3,AU,Standalone}; JUCE copies
them to ~/Library/Audio/Plug-Ins/VST3 and ~/Library/Audio/Plug-Ins/Components.
The AU only shows up in Logic/GarageBand after a plugin rescan; validate with:
auval -v aumu Opna Nin8Note: unsigned builds may need Gatekeeper quarantine removed on other machines
(xattr -dr com.apple.quarantine <plugin>), or proper codesign/notarization
for distribution.
Requires Visual Studio 2022 (Desktop C++ workload), CMake, and git (the
configure step applies the JUCE webview patch with git apply).
git clone --recurse-submodules <repo-url>
cd nin8
cmake -B build -G "Visual Studio 17 2022" -A x64
cmake --build build --config Release --parallelOutputs: build/Nineight_artefacts/Release/{VST3,Standalone}; the VST3 is
copied to %COMMONPROGRAMFILES%\VST3 (may need an elevated shell, or set
COPY_PLUGIN_AFTER_BUILD FALSE and copy manually).
The UI needs the WebView2 Evergreen Runtime — preinstalled on Windows 11 and most updated Windows 10 machines; otherwise install it from the WebView2 download page. Without it the editor comes up blank (audio still works).
Note: the Linux-only pieces (webview patch behavior, HostEnvSanitizer) are
no-ops on macOS/Windows; the same ui/webui.zip is embedded on all platforms.
clang++-12 -O2 -std=c++17 -I third_party/ymfm/src -o build/render_test \
tools/render_test.cpp third_party/ymfm/src/ymfm_{opn,adpcm,ssg}.cpp
build/render_test assets/ym2608_rhythm_rom.bin /tmp/c4.wav # renders piano C4, fails if silent| JS → C++ | Purpose |
|---|---|
synthReady() (native fn, round-trip) |
returns {sampleRate, nativeRate, patch} on UI boot |
uiEvent (one-way emitEvent) |
all hot-path traffic: {cmd: noteOn/noteOff/allNotesOff/setParam/setOpEnvelope/post, …} — no response roundtrip, so knob drags can't flood the message loop |
Events (C++ → JS, 30 Hz while editor visible): paramChanged, noteOn/noteOff
(host MIDI → key highlight), waveform (2048-byte AnalyserNode-format scope data).
- Native engine, MIDI, params, state, WebView UI (verified in Standalone on Linux)
- Add SSG scene / rhythm pads
- Export instruments presets from PC-98 games
- Scene adopts DAW-restored patch on editor open (currently boots with default preset)
- Mono-mode portamento glide for host MIDI
Licenses: ymfm BSD-3 (Aaron Giles), JUCE 8 (GPLv3/commercial), UI assets from the opna repo.
