super cool! i was thinking control over the attack release envelope would be p neat too at some point (maybe even being able to send it midi info?)
Viewing post in Concord 🍇 Web Synth comments
Yeah, ADSR I absolutely want to implement, but it’s a bit tricky with how Web Audio is structured. If you were operating in a controlled environment, you could place ADSR automations on a parameter timeline and call it a day. But we have to consider that someone can change an envelope parameter mid-play, and this should affect the shape in realtime.
One approach is sampling the current value on change and plotting out new timeline events based on the new values. (You can erase all pending ones!)
Another approach is going full custom DSP mode and creating an envelope generator that tracks its own values and generates an offset to use as a “CV”. Probably the saner approach in the long-term, but requires more up-front research.
As for MIDI support, also planned. The only reason it hasn’t been more of a priority is because that’s a Blink-exclusive (Chrome, Edge, Opera, etc.) feature, and a lot of folks from the jam probably don’t have MIDI equipment. That said, jam’s over, I want to implement MIDI now. Maybe even set up an Electron (ugh) build so it can be run standalone.