signal to gate or envelope

    Oct 25 2013 | 8:36 pm
    I have had a nosey around the forum and also through the Max examples, trying to find some pointers on envelope following. If there's one lurking in the Max folder and I missed it - sorry!
    I recall PM answering a similar or related topic here, but cannot find it either, despite searching, so again, apologies for not finding a pre-existent solution, as I know this type of question has appeared numerous times before.
    I am trying to generate a simple attack-sustain-release envelope from signal input, that is, a monophonic guitar line, such that I can impose a variable envelope on each new note. You may have seen this on the MFOS youtube channel. I've had a stab at it myself, based on the Max simple-compressor example and it's almost working, but it occasionally misses the onset of new notes very close to the end of a previous one; perhaps you can have a look and suggest a better way:

    • Oct 26 2013 | 9:40 am
      I found an envelope follower abstraction lurking in the m4l-patches folder; it seems to centre on the use of [slide~]. I'll see if I can get this working better than my attempt. Next stage in my "digital subcommander" is a frequency-divider, for a big fat sub-octave and some RM/FM and LFOs.
    • Oct 26 2013 | 9:43 am
      Wow! Had a poke around the wiki too:
      "does exactly what it says on the tin"
    • Oct 26 2013 | 10:29 pm
      I like this one:
      Average~ 100 rms
      Slide~ 80-200 2000-4000
      With gain, conversion to db as needed.
      Works great on percussive attacks.
    • Oct 26 2013 | 11:07 pm
      Peter, thank you. I did fall foul of the difference in behaviours between [avg~] and [average~]. But [slide~] is pretty much the solution to this question. The [omx.peaklim~] advanced help tab is also invaluable. Tinkering with the slide values is where the craft lies!
      (if there is any further interest, I'm cooking up a funky recreation of Ray Wilson's MFOS subcommander in Max . . . )
    • Oct 27 2013 | 3:54 pm
      Totally, and please consider contributing it to BEAP! There's a style guide in the misc > Development folder.
      BTW, regarding slide: the ms values are not how long it takes you to get there! (even though that's what the documentation says)
      Slide~ is a really efficient object, but the timing is a little trickier. It approaches the value in an asymptotic fashion. Chamberlin published a rule of thumb for it several decades ago; it's more practical in envelopes where you have a target, but it's basically: overshoot by 5% (not advisable here), and divide your time value by 3. (it gets something like 61% of the way to the destination in a given time interval)
      (You can see this in my AnalogKick device)
    • Oct 28 2013 | 4:16 pm
      So, I spent an afternoon or two applying new objects, skills etc and have a pre-alpha to share; it's a short demo of a Max patch for envelope following, auto-filtering and pitch shifting, in the style of the MFOS subcommander guitar synth. I'm placing it here because it's not a strictly share-ready or project page viable system yet.
      add a VCA-like module;
      fix sub/super octave settings;
      add a live audio input module.
      Feel free to share, like, twoot or whatever it is you kids do on the interweb these days.
      >n00b_meister; re-inventing wheels whenever unnecessary<
    • Nov 03 2013 | 12:08 am
      if anyone wishes to see/hear stage 2 of this little project, I have added 2 further modules: a "freeze frame" section and a "drawbar" section. These allow the user to capture and freeze live input, and to blend in 8ves, 4ths and 5ths from the original source; in conjunction with the existing auto-wah and re-pitch modules, one can generate quite rich or dense textures from monophonic input. There are no show-stopping algorithms here, this has merely been a weekend project. And my GUI design is a yawn-fest :( Any tips?
      I don't want to clog up the forum with video again, so you can find it on youtube under "mfos homage" or "brendan mccloskey" if curious.