MIDI Program Change to select presets: numbering quirk?

5 posts / 0 new
Last post
Cork City Gamelan
Cork City Gamelan's picture
Joined: July 27, 2012

Good day to eveybody!

I am an almost new AM user, and entirely new to the forum. To introduce nyself briefly: My name is Günther, originally from Germany, I now llive and work in Ireland. I curate the Cork City Gamelam project (http://www.corkcitygamelan.ie). I use AudioMulch together with Max/MSP to develop a custom player for my project.

I only just started learning MAX, but I am almost certain that my Max patch is sending program changes 2 to 9 in  order to select presets 1 to 8. I actually had to make it so to make it work correctly, after originally sending 1 to 8, going by the documentation (which specifies program changes 1 to 20 to select the presets).

I don't consider this a problem at all, but I'd like to know: is it just something I haven't learned yet about MAX  and AM and MIDI, or is it actually true: Does the AM presets selector count from 2 to 21? I would not have been surprised (and was almost prepared for it) to find that I might have to send 0 to 7.



Goratrix's picture
Joined: July 26, 2010

There is a parameter called Offset in the Preset Number parameter's Mapping tab, could it be that you have it set to some weird value? See this section of the help file, the last paragraph:


Ross B.
Ross B.'s picture
Joined: April 11, 2009

Short answer: AM2.2 calls the first program change "1" as per the MIDI spec. Some software may call the first program change "0", which is the value sent along the wire for the first program change.

The thing to keep in mind is that there are two ways to number program changes: starting from zero and starting from one. You need to understand what "1" actually means in each application. The binary values sent along the wire are numbered starting from zero. But the MIDI spec says to call the first program/preset "1".

I don't know about max/msp but it's quite possible that it sends 0 as the first program number (that's the binary value that is sent, but not the screen name mandated by the MIDI spec).

By default in AudioMulch 2.2 follows the MIDI spec usage: the preset listed on the screen as "1" is the *first* preset (some software might call this "0"). This is the behavior you get with "offset" set to zero on the MIDI mapping tab.

However prior to AudioMulch 2.2, "preset 1" corresponded to the *second* program change. You can stil get that behavior by setting offset to -1 in AM2.2. Old patches will load into AM2.2 with offset set to -1 to give the old behavior -- in this case you have to manualy change offset to get the new behavior.


Cork City Gamelan
Cork City Gamelan's picture
Joined: July 27, 2012

I was baffled for a moment, couldn't find the "offset" field... see, I am running the previous version (with offset fixed as is) until the next incremental update, hoping it will let me use my audio interface for input only without having to use the aggregate device... which has no output volume control on my screen...

but anyway: I had already offset my Max patch, and when I am ready for the update, I can quickly re-adjust it.




admin's picture
Joined: July 8, 2011

Please post new issues to new topics. But in brief: there are no plans to provide a method for running separate, independently clocked audio devices for input and output (unless they are linked by wordclock). There will be no incremental update for this. Using an Apple Aggregate device is the recommended method for using separate/independent audio hardware for input and output.