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.
doesn’t your pedal send different values when pressed and released ?
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.
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.
Log in to reply
C74 IN YOUR INBOX
C74 RSS Feed | © Copyright Cycling '74 | Terms & Conditions
Let us tell you about notable Max projects, obscure facts, and creative media artists of all kinds.