Function libpd_rs::send::send_control_change
source · [−]Expand description
Sends a MIDI control change message to ctlin objects in pd.
Channel is zero-indexed, controller is 0-127 and value is 0-127.
Channels encode MIDI ports via: libpd_channel = pd_channel + 16 * pd_port
Example
use libpd_rs::send::{send_control_change};
libpd_rs::init();
// Handle the error if the receiver object is not found
send_control_change(0, 0, 64).unwrap_or_else(|err| {
dbg!("{err}");
});
// or don't care..
let _ = send_control_change(0, 0, 64);Errors
A list of errors that can occur:
