[chuck-users] sending midi program change

Kassen signal.automatique at gmail.com
Thu Jan 4 19:36:03 EST 2007

Hi list,

Contrary to what I thought ChucK's midi out can be used to send messages of
lengths other then 3 bytes.
MidiOut mout;
MidiMsg msg;

//refers to a program change on the first channel
//add to it for following channels
192 => msg.data1;
//refers to the program to be loaded
4 => msg.data2;


This should load the 5th program of the current bank on channel 1. "
msg.data3" can be left blank or set to 0. Strictly speaking it could
probably be loads of things because program change only has a single status
byte but I imagine there would be issues if it would be set to -say- 144 so
let's not push our luck.

This was previously unclear to me and the documentation doesn't cover it so
it might be usefull to others as well. Loading programs manually isn't the
most expressive of musical gestures, after all...

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20070105/00a2ab60/attachment.htm 

More information about the chuck-users mailing list