Forums > MaxMSP

Bang when sustain pedal released?

March 25, 2012 | 8:56 am

I’ve got a patch that uses the space bar to control it’s state and I’m trying to hook up a midi sustain pedal to replicate this.

For the spacebar I’m using key and keyup to detect when the spacebar is pressed and released.

For the sustain pedal I’m using ctlin 64 to capture it and control a toggle, however I can’t detect when the sustain pedal is released.

Is there a way of detecting this? Similar to noteoff I suppose but for a controller.


March 25, 2012 | 9:36 am

doesn’t your pedal send different values when pressed and released ?


March 25, 2012 | 9:46 am

Ah yes – it sends 0 or 127 depending on whether it’s pressed or released.

Captured that with a [select 0 127] and it works perfectly now.

Thanks!


March 25, 2012 | 12:47 pm

FWIW depending on the speed of the cc stream, [select] may ‘miss’ the occasional 0 or 127 (rather, the 0 or 127 might not show up). For me [> 0] –> [togedge] has always proved more reliable.

Brendan


Viewing 4 posts - 1 through 4 (of 4 total)