MIDI noteofffs


    Jun 18 2012 | 9:24 pm
    Hi all!
    I'm using this system to play notes on a virtual instrument.
    I found it useful because this way I'm sure to avoid broken notes, especially when playing very fast.
    The problem, as you may see is: how do I sent noteoffs to the correct gate?
    Thanks for any tip!
    [attachment=196951,4058]

    • Jun 19 2012 | 12:18 am
      Depends on what you want to do---only one note at a time for each MIDI output? You have to store the previous pitch and do the noteoff before the next noteon. Or you can use [poly] which has some nice noteon/noteoff tracking features, and its voice number can control the [gate], or can be used to assign a MIDI channel number directly.
    • Jun 19 2012 | 2:45 am
      you simply need 2 of those patches in parallel, one for note on and one for note off.
    • Jun 19 2012 | 12:31 pm
      thanks everyone, I found seajames solution nr.1 very efficient, considering I have to set MIDI after [gate] ... yet poly is something very interesting i never used, but i heard it is very CPU efficient, capable of using multicores...
      thanks, again!
    • Jun 19 2012 | 3:01 pm
      Thanks!
      But a slight correction: [poly~] uses multiple cores, not [poly] --- the naming of these two objects is definitely a source of confusion :)
      [poly] is very lightweight CPU-wise by comparison. Maybe it should be called [midipoly] or [notepoly] instead, that's more descriptive of what it's typically used for.
      Now, if you were generating your own synthesized sounds or triggering samples with the MIDI information, you could make great use of a [poly~] abstraction, and create very complex sounds (with effects etc.) for a number of voices at once...in that case, [poly~] would give you the multicore performance boost. But because you're using a virtual instrument, you don't need to create the actual sounds in Max, you're just dealing with the MIDI part.
    • Jun 20 2012 | 12:12 am
      one more thing...
      as I play around with it I'm wondering if there is a "softer" way ;-)
      I explain...
      The above patch whenever receives a new midi message offs the previous one and play the new one.
      This is good in order to have note offs, but it can produce some unwanted effect, as follow:
      the note let's say "80" just played with a velocity of "100". And in my melody it was supposed to last let's say "4000" msecs. If I have a new note is coming in the same place that previous one will be offed (so stopping abruptly) but that off was not necessary, because the incoming note was not a 80, but a 84. So the two of them, in my ideal patch, would live together in harmony, but after "4000" msec 80 would stop. And 84 live its life as it's supposed to live.