Just for fun, I'm going to show you how to sequence program changes to a Korg Kaoss Pad KP3.
If you haven't already, you should read
Mapping rows to commands.
What we're going to do is map two sequencer rows to the
midimessage command. The
midimessage command is
built into Quotile and has the following syntax:
midimessage [sequencer] [message] [data1] [data2]
But before we do that, we need to set up our midi device on p6. Use the
devices command to get a list of your midi devices.
You should see something like this:
[0] "Layla24 MIDI" [Input]
[1] "USB Audio Device" [Input]
[2] "Microsoft MIDI Mapper" [Output]
[3] "Microsoft GS Wavetable SW Synth" [Output]
[4] "Layla24 MIDI" [Output]
[5] "USB Audio Device" [Output]
[6] "Real Time Sequencer" [Input/Output]
[7] "Java Sound Synthesizer" [Output]
I happen to have my Kaoss pad on device #5. But, before I enter the devices command, I'm going to clear out my command history.
> clearhistory
Now I set the midi device on p6:
> device p6 5 1
I'm going to instruct Quotile that events on row 8 of p6 should send a program change to the Kaoss Pad. Here's how that's done:
> rowcmd p6 8 midimessage|p6|192|5|0
192 is C1 in hexadecimal. C is the hex value for a program change and 1 is the channel number.
The fourth parameter to the midimessage command is the program change number. I chose 5 arbitrarily.
Any event on row 8 of p6 will now send a program change to my Korg Kaoss pad.
Row 8 is still labeled D (50). Let's change that:
> rowlabel p6 8 kaoss5
Now, we'll set up row 9 to send a different program change to the Kaoss Pad:
> rowcmd p6 9 midimessage|p6|192|10|0
And again, update the label for row 9:
> rowlabel p6 9 kaoss10
Finally, let's save the command history to a script so we don't have to type all this in every time:
> save kaoss_pad_config
That's it! Now, place notes on row 8 and 9 to switch between effects on the Kaoss Pad.
Extra credit:
You might be thinking, "Why don't we use a variable in our rowcmd definition so that we can sequence program change using note values?" Yes!
That's a good idea. It would look something like:
> rowcmd p6 8 midimessage|p6|192|$value|0
It may not be as accurate as the first technique, but it could be a lot easier to setup for more adventurous program change sequencing!