diff --git a/.github/workflows/osc-bridge.yml b/.github/workflows/osc-bridge.yml new file mode 100644 index 0000000..f22937f --- /dev/null +++ b/.github/workflows/osc-bridge.yml @@ -0,0 +1,66 @@ +name: Build OSC Bridge + +on: + push: + tags: ['osc-bridge-v*'] + workflow_dispatch: + +permissions: + contents: write + +jobs: + build: + strategy: + matrix: + include: + - os: ubuntu-latest + target: x86_64-unknown-linux-gnu + suffix: linux-x86_64 + - os: ubuntu-latest + target: aarch64-unknown-linux-gnu + suffix: linux-arm64 + - os: macos-latest + target: x86_64-apple-darwin + suffix: macos-x86_64 + - os: macos-latest + target: aarch64-apple-darwin + suffix: macos-arm64 + - os: windows-latest + target: x86_64-pc-windows-msvc + suffix: windows-x86_64 + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v4 + + - uses: denoland/setup-deno@v2 + with: + deno-version: v2.x + + - name: Compile + run: | + cd playground/osc-bridge + deno compile --allow-net --unstable-net --target ${{ matrix.target }} --output ../../dist/nisps-osc-bridge-${{ matrix.suffix }}${{ matrix.os == 'windows-latest' && '.exe' || '' }} bridge.ts + + - uses: actions/upload-artifact@v4 + with: + name: nisps-osc-bridge-${{ matrix.suffix }} + path: dist/nisps-osc-bridge-* + + release: + needs: build + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/') + + steps: + - uses: actions/download-artifact@v4 + with: + path: dist + merge-multiple: true + + - name: Create Release + uses: softprops/action-gh-release@v2 + with: + files: dist/* + generate_release_notes: true diff --git a/.gitignore b/.gitignore index 629b1e8..ce0f284 100644 --- a/.gitignore +++ b/.gitignore @@ -34,6 +34,10 @@ .ai build +# OSC bridge compiled binaries (built via compile.sh or CI) +playground/osc-bridge/dist/ +playground/osc-bridge/node_modules/ + # Dolt database files (added by bd init) .dolt/ *.db diff --git a/playground/a-immersive.html b/playground/a-immersive.html index ba70a7d..5f7056a 100644 --- a/playground/a-immersive.html +++ b/playground/a-immersive.html @@ -117,6 +117,7 @@ + @@ -189,6 +190,11 @@
+Send NISPS parameters to any OSC-capable software (SuperCollider, Max/MSP, Pure Data, TouchDesigner, Ableton, etc.) via a small bridge script that runs on your computer.
+ +1. Download the bridge
+Binary is standalone, no runtime needed. Source requires Deno or Node.js.
+ +2. Run
+./nisps-osc-bridge+ +
3. Connect
+In the synth panel below, click Connect next to "OSC Output". The status will show the target address once connected.
+Configuration
+| --osc-port 9000 | Target port (default: 57120 / SuperCollider) |
| --osc-host 192.168.1.5 | Target IP (default: 127.0.0.1) |
| --osc-prefix /my | Address prefix (default: /nisps) |
| --ws-port 8000 | WebSocket listen port (default: 8765) |
| --bundle | Send OSC bundles instead of individual messages |
OSC addresses
+Each parameter is sent as /nisps/<Param_Name> <float 0–1>. All 126 synth parameters are available. Values reflect your current preset, curves, and tame settings. Examples:
/nisps/Env_A_Att 0.35 +/nisps/SVF_Flt_Cut 0.72 +/nisps/Reverb_Mix 0.15+ +
// Listen for all NISPS params
+OSCdef(\nisps, { |msg, time|
+ msg.postln;
+}, '/nisps/*');
+
+// Map a specific param to a synth
+OSCdef(\cutoff, { |msg|
+ ~synth.set(\freq, msg[1].linexp(0, 1, 200, 8000));
+}, '/nisps/SVF_Flt_Cut');
+ [netreceive -u -b 57120] +| +[oscparse] +| +[route /nisps] +| +[route /Env_A_Att /SVF_Flt_Cut ...]+
[udpreceive 57120] +| +[OSC-route /nisps/Env_A_Att] +| +[scale 0. 1. 200. 8000.]+