You are here

Midi controlled shortcuts using PC commands


my keyboard can act as a Midi controller and then there are ten Buttons which sent program changes and 5 encoding knobs. Any button can be configured with PC=1-128, MSB=1-128 or OFF, LSB=1-128 or OFF.

Now I would like to configure some qtractor shortcuts, especially transport play and stop.

1st try:

Setting MSB and LSB to "OFF", qtractor detects a program change, value corresponds to my configured PC:

12:16:42.354 MIDI CTL: Pgm Change, Channel 1, Param 0, Value 9
12:16:43.871 MIDI CTL: Pgm Change, Channel 1, Param 0, Value 8
12:16:47.115 MIDI CTL: Pgm Change, Channel 1, Param 0, Value 7

Qtractor detects "Pgm Change" for learning but where is value to configure?
Param can be configured in shortcut learning mode, but it is always 0.

2nd try:

Setting MSB/LSB to a number, qtractor detects a controller/bank select (coarse) in shortcut learning mode. The message window shows:
12:19:49.804 MIDI CTL: Controller, Channel 1, Param 0, Value 121
12:19:53.035 MIDI CTL: Controller, Channel 1, Param 0, Value 44

The dialog does not allow to set the value, param is always 0. Assigning an encoding knob to the play-head (start/pause) works, but I would like to use the PC buttons.

Is this possible, which configuration should work?


rncbc's picture

Well, MIDI Pgm Change (PC) messages aren't the most suitable to do the thing you're after, just because most often they send a fixed value which is the program number to change to, no surprise there.

However I believe that, no matter what value is the PC event then it should work as most shortcut commands are recognized as one-shot triggers which are in turn keen to momentary foot-pedal controllers. But again, this is only valid on this last v0.8.6.

On the other hand, the MSB and LSB configuration parameters you have on the controller configuration are no other than MIDI CC#0 (MSB) and CC#32 (LSB) which in fact are "Bank Select" messages--that's all old MIDI parlance for switch banks, programs, patches if you like, so that a complete command to switch a given preset, patch or whatever (to a target synth instrument, for instance)would be about sending 2 MIDI CC messages (MSB, LSB) and then the final PC for the program number (within the selected bank).

I know this is way out of topic, but that again, it's plain old MIDI standard roaring it's face from the late 80's :)


thanks for the explanation, I just don't get how the qtractor shortcut menu works.

Selecting the type "Pgm Change" allows to select a parameter, but all (my) program changes send the same parameter and different (configurable) values. MSB/LSB can be turned of in my case, but how is the shortcut type "Pgm Change" in qtractors supposed to work?


rncbc's picture

how is the shortcut type "Pgm Change" in qtractors supposed to work?
do all "your" PC events send the same parameter value? really? that's of course wrong and not quite usable...

please try to configure each button to send its own and distinct parameter value and without any bank_select MSB/LSB;
then on Help > Shortcuts... down under the MIDI Controller column click on the desired menu command you wish to trigger; then set for "Pgm Change" and the corresponding parameter value (program number) to that of one of the buttons or knobs; you can also try to press the button and see whether that makes iit automagically into the fields (that's kindathe so called

  • MIDI learn feature of it:)); I guess you know all that by now.
    you can also try to configure those buttons to send a particular MIDI CC ("Controller") instead and then probably much easier to catch with than plain "Pgm Change"'s (PC).

    please try and live to tell the story :).


  • I was curious how my other hardware generates PC commands and how qtractor detects them. Switching to my workstation showed the same behavior: parameter is always zero, while value changes according to my configured program change. Then I grabbed my midi foot controller with the same results. But both of them send MSB/LSB also. So I am a little lost here, is there any software you can recommend that generates PC commands?


    rncbc's picture

    is there any software you can recommend that generates PC commands?

    let's stop for a while and think about it: MIDI PC (Program change) are NOT desirable here in the first place; MIDI bank_select(MSB+LSB)+PC are regarded as special commands to switch real instrument patches; the whole command is comprised by 3 (three) MIDI messages, two MIDI CC (#0 for MSB, #32 for LSB) and another for PC# whatever; being this a special composite sequence, it is NOT advisable to use it to custom assign as menu shortcuts or even as track and plugin parameter for automation.

    please: make those knobs or buttons or switches to either NOT send none of MIDI CC#0/32 (MSB/LSB) and just the PC# only (ie. no bank selection) or else, make then send a single and genuine MIDI Controller event, other than CC#0 and CC#32 that is; you can have it send any CC# 7bit (but not 0 nor 32), and/or the extremely exquisite RPN, NRPN 14bit hi-res compositions:))... i believe i've made this kind suggestion before, but one never knows how or whether its being understood :)

    it all boils down to this, perhaps in the end of (your) day: MIDI PC# are not suitable to work as a MIDI controller message onto some qtractor subject target; please use a single MIDI CC# whenever and if you can.


    Hi Rui,

    as i said, MSB/LSB can be turned of using my keyboard and I tried.

    Just for completeness, I sent several PC commands using the software "midisnoop" without any MSB/LSB commands:
    C0 01
    C0 05
    C0 0F

    Qtractor messages
    10:47:31.721 MIDI CTL: Pgm Change, Channel 1, Param 0, Value 1
    10:49:59.604 MIDI CTL: Pgm Change, Channel 1, Param 0, Value 5
    10:51:02.064 MIDI CTL: Pgm Change, Channel 1, Param 0, Value 15

    "Value" can not be configured in the midi shortcut learn menu.
    I agree, PC commands should not be used for shortcuts. I am looking for another solution now.

    Thanks for your support, really appreciate it


    rncbc's picture

    Wholly crap!

    I apologize for being such a stupid stubborn :) I now reckon that there was a dang old bug in the MIDI "Pgm Change" event representation. And you were in deed were slapping it on my face over all this time:

    The payload of a MIDI PC event--that is, the program number--was being internally delivered as the event "value" and not as the event "param(eter)" as it would certainly mattered to get it to work as a MIDI Controller shortcut; this has been hopefully fixed in git head master branch today (qtractor >=

    Please check it out, if you will test && tell.

    Thanks again for your patience and persistence.

    Hi Rui,

    I compiled qtractor-ae53a596a2cab8f462c9721dc6b514619aed4a1b with --enable-debug
    The PC command shortcut learning now works very well sending commands with "midisnoop" or my keyboard, yay! :-)

    Right now my playhead reacts to pressing PC 1 and 2.

    One short question: shortcuts e.g. for the record button or metronome can be learned, but do not trigger the action when pressed while transport play, stop, panic work flawlessly. The debug log shows sometimes the triggered function, sometimes not. Should every function work using midi commands or are there limitations?

    Thanks so much for your work and looking into my qtractor problems


    rncbc's picture

    shortcuts e.g. for the record button or metronome can be learned, but do not trigger the action when pressed

    Well, although PC messages may now work the former recommendation still applies: PC are still not suitable for shortcuts, more importantly for toggling (on/off) subjects (eg. Transport/Record, Metronome, etc.): as of the last change, the encoded value is always 0 (zero) and for toggling you need at least to swing the value from 0 to 127 to trigger it--always having zero value may only trigger in odd alternate occurrences if any at all.

    Again, thanks for your testing and return to tell your story ;)


    ps. have you noticed that all common Transport actions (Play, Stop, Record, Rewind, FFwd, etc.) are hard-wired to MMC commands? so you won't need to make any custom shortcuts for them; if your MIDI controller surface has any configuration preset that maps as MMC commands then try it and just plug-and-play :)

    I checked both keyboard's manuals for MMC with no luck. But I am quite happy with a few knobs, encoders and pre-qtractor 0.8.7 :)

    Thanks again


    Add new comment