Interactive visual music: an animated voyage
through variations on the hopalong fractal.
Real-time controls:
Parameters of the hopalong fractal.
Mapping of fractal points to musical notes.
Neo-Riemannian transformations of notes to generate harmonic progessions.
Parameters of Csound instruments/effects.
The exact same code runs in NW.js with csound.node, in browsers with WebAssembly, on Android with CsoundOboe.
Best Coding Practices
Use only essential features of the Csound API (listed above).
Use csound_loader.js to safely load Csound on all platforms.
Code for running and stopping Csound should be in async functions or expressions
so that async/await constructs can serialize Csound API calls:
Best Coding Practices
Use sr = 48000, ksmps = 128, nchnls = 2, nchnls_i = 1 on all platforms.
On Linux, use ALSA -odac:plughw, this will also work (be ignored, rather) for WebAssembly and Android.
Do not call other methods of the Csound object until Csound.Start() has been called.
Keep your Csound orchestra code in your HTML file as a TextArea or string literal.
Use current JavaScript idioms: import, let, class, etc.
As with any other code, keep it simple, make it clear, use standard libraries:
jquery.js, three.js,
dat.gui.js.
Best Coding Practices
Simplify your life: Use exactly the same name for
the HTML input id, the Csound channel name, and
the name of a global variable in Csound to hold the value
of a slider, e.g. "gk_Reverb_feedback".