Signal driven envelopes

    MaxMSP

    vojko v's icon
    vojko v's icon
    vojko v
    Sep 22 2021 | 8:42 am
    What do you use as a signal driven envelope? By envelope I mean custom-drawn envelopes, not logarithmic curves and such. I can think of only these 3 solutions and they are not perfect:
    1. Drawing an envelope in a waveform~ and sending it to a buffer~ then driving that buffer's lookup~ with a phasor~. This combination seems clumsy to draw 2. techno~ object seems CPU heavy 3. zigzag~ does not accept curved data Is there maybe a way to translate data from the function object to a peek~ or poke~?

    • vojko v's icon
      vojko v's icon
      vojko v
      Sep 22 2021 | 11:17 am
      found it:
      Max Patcher
      In Max, select New From Clipboard.
      Show Text
      Share
    • Roman Thilenius's icon
      Roman Thilenius's icon
      Roman Thilenius
      Sep 22 2021 | 12:16 pm
      yup, you can not avoid some form of edge~ -> phase accumulator when you want to trigger something from signal. then of course playing a control signal from a buffer is a pretty static thing, and modulating the amplitude(s) while it runs becomes impossible. the only alternative to the use of buffers would be to use a whole bunch of math objects to split the phases into sections, then apply math functions to them. i´ve written a complete ADSHR that way, where you can modulate all 5 time/value pairs in realtime and reset or restart the envelope including its attack time from where it is at... it is not much fun and a real CPU hog.
      a compromise between worlds could be to write linear and exponential curves into different buffers and read from them with different speeds, amplitudes and directions when needed. the time value pairs could be cached at data rate before.
    • vojko v's icon
      vojko v's icon
      vojko v
      Sep 22 2021 | 8:11 pm
      i'm pretty satisfied with the "static" reading of envelopes from buffers for now, but that idea with prepared envelopes is interesting.