Sustain Help Needed

Jimmy54o's icon

Evening all,

I'm a first time poster in the forums and a first time user of MAX.

Cutting to the chase, I need to select which notes the sustain affects. I've got the 'notein', 'noteout' sussed and currently have the sustain toggling through the spacebar. I was thinking it'd have to be an 'if then' statement, but I can't seem to wrap my head around it.

Any advise, or a point in the right direction would be gratefully appreciated.

P.S. I'm new to this, so go easy on me : )

Floating Point's icon

maybe use a gate to route your incoming note-off messages according to whether the space bar is being held down or not. the pitches that have a velocity zero could be grouped [zl group], and when the spacebar up is detected these pitches are iterated out [iter] to a [noteout] with a velocity zero argument; also look at borax-- there might be an neater way to do it using that

Floating Point's icon
Max Patch
Copy patch and select New From Clipboard in Max.

OK I think borax and gate is the way to go-- I haven't tried this out but it should work. Will give you a start anyway.

Jimmy54o's icon

Thank you very much Terry. I'll get working on it.

Regards.