midi – sustain one note as long as a value is true/a bang is incoming

Jun 13, 2012 at 9:52pm

midi – sustain one note as long as a value is true/a bang is incoming

I need to continuously outlet a single midi note based on a scaled number input (0-127). When the input changes, I need to

-stop the previous note
-play the new note

Furthermore, if a separate value goes low (stops banging/becomes zero) I need to stop the current note without playing another one.

Many thanks in advance

#46614
Jun 14, 2012 at 12:32am

maybe mostly there?

– Pasted Max Patch, click to expand. –
#167669
Jun 14, 2012 at 12:53am

Thanks, I am studying this

However

Is there not such a thing as sustain in midi?

#167670
Jun 14, 2012 at 9:25am

Sustain stops previous notes only if the same note is repeated.

But [poly 1 1] seems well suited, ie. max 1 voice with voice stealing.

– Pasted Max Patch, click to expand. –
#167671
Jun 14, 2012 at 1:11pm

Here is the poly version with stop function integrated.

– Pasted Max Patch, click to expand. –
#167672
Jun 14, 2012 at 3:54pm

there is sustain … when the programmer builds one!

what you basically want is

noteonevent
[t l noteoffevent]

where you normally would do

noteonevent, noteoffevent

depending on the device

noteonevent
[t l allnotesoff]

will be enough – it saves you from having the noteoffevent as a dynamic list.

-110

#167673
Jun 16, 2012 at 6:42pm

Thanks for all your help guys, but this problem is semi/imaginary. I was simply confused by the nature of the ms gm synth, which is a sampleplayer rather than an actual synth. A minmoog vst works as specified. That said, broc’s solutions are perfect.

Thanks again

joe

#167674

You must be logged in to reply to this topic.