Adds a secondary Synth mode (toggled via collapsible left side panel) where the NISPS ML engine's 20 outputs control curated C15 synthesizer parameters (oscillator PM, shapers, filters, reverb, echo, flanger, output mixer) through a WASM AudioWorklet bridge. Includes a chord progression arpeggiator with controls for tempo (BPM), octave range, octave offset, and 4 selectable progressions. The C15 engine runs in an AudioWorklet with lock-free SharedArrayBuffer ring buffer communication. New files: c15/ (WASM assets), js/synth/ (bridge, arpeggiator, param map), serve-coop.py (COOP/COEP headers for SharedArrayBuffer support).
18 lines
672 B
Python
Executable file
18 lines
672 B
Python
Executable file
#!/usr/bin/env python3
|
|
"""HTTP server with COOP/COEP headers for SharedArrayBuffer support."""
|
|
import http.server
|
|
import sys
|
|
import os
|
|
|
|
PORT = int(sys.argv[1]) if len(sys.argv) > 1 else 8000
|
|
|
|
class COOPHandler(http.server.SimpleHTTPRequestHandler):
|
|
def end_headers(self):
|
|
self.send_header('Cross-Origin-Opener-Policy', 'same-origin')
|
|
self.send_header('Cross-Origin-Embedder-Policy', 'require-corp')
|
|
super().end_headers()
|
|
|
|
os.chdir(os.path.dirname(os.path.abspath(__file__)))
|
|
with http.server.HTTPServer(('', PORT), COOPHandler) as httpd:
|
|
print(f'Serving playground at http://localhost:{PORT} (COOP/COEP enabled)')
|
|
httpd.serve_forever()
|