triggering an envelope from another audio object

mattkuebrich

Active member
I’ve got a Teensy Audio Library question. I often find that I want to trigger an envelope using the output of another audio object (a square wave oscillator, for example), rather than using noteOn() in my sketch. What would be the best way to go about this?

I’ve tried using peak / rms to read the output of the square wave and then calling noteOn() that way, but wondering if there’s a better way. Thanks!
 
I don't know of a better way but I'm no expert. You could write a new envelope object based on the old one that takes an additional trigger input, which probably wouldn't be too hard, but the audio code can be pretty confusing.
 
Thanks for the reply! I’ve actually been busy doing just that.

I think I have it working pretty well. I’ll post the code when I’ve tested it a bit more in case anyone else is interested.
 
Back
Top