connecting adsr to a wave generator

Guy's icon

Hi guys,

I've created a fairly simple wave generator; I have four different waveforms running into a selector~ object, controlled by a tab. I want to connect an adsr~ object so that when the waveform is activated it isn't just a constant, infinite cycle, but a burst of controllable length. The problem is that I cannot figure out where or how to connect the adsr~ to the patch. I couldn't find any tutorials that help me with this issue either. Any suggestions?

Thanks in advance

Max Patch
Copy patch and select New From Clipboard in Max.

Nicolas d'Alessandro's icon

Hi!

The adsr~ object does not apply the ADSR envelope on the incoming signal on its own, it generates an ADSR-looking signal that you need to use as envelope on the signal you want (in this case, the result of your selector + cascade). So you actually need to audio-multiply that signal by the output of the adsr~ object and then use 1/0 message onto the adsr~ object to trigger the ADS/R phases respectively.