Using non-MIDI buttons/sliders on a MIDI keyboard?

Mar 17, 2012 at 10:17am

Using non-MIDI buttons/sliders on a MIDI keyboard?

So I have a M-Audio prokeys88sx (basically a semi weighted 88key USB keyboard with 8 built in sounds).

I’m using it as my main controller for max/vst stuff. I’ve mapped the mod wheel to stuff I want, but I’d really like to map the volume slider and the ‘instrument select’ buttons too, to have those work like what they say on the tin. Controlling volume and changing instruments/presets.

I tried using midiin/midiparse and am getting no information (from anything, including the modwheel and keyboard).

Is there a way to get this kind of data into max? (I suppose it comes down to wether or not the keyboard ‘broadcasts’ that data at all, but I can’t seem to figure out how to get the raw stuff into Max).

Mar 17, 2012 at 10:47am

you forgot something.
its in the midiin help file :)
then you can check if those sliders even give midi signal out, because if they don’t (and because they’re probably used for the synthesizer/sampler part of the controller, i really doubt it) you can’t do anything about it.
I suspect the volume slider is a hardware fader, but I might be wrong. Try it.

Oh, aside from doing it like this, you can also double-click the midi in object and choose a controller :D

– Pasted Max Patch, click to expand. –
Mar 17, 2012 at 12:53pm

Yeah I tried that but I guess it’s that the midi device select, and midiin output are not in the same place at the same time (that would be handy for the help file).

I’ll give that a spin.

Mar 17, 2012 at 5:12pm

I just said that so cause i didn’t mean to take credit for it, but actually… this is directly from the help file :P

– Pasted Max Patch, click to expand. –

Mind you, I’m not trying to be a prick, I’m just trying to direct you where to look when you come across a problem to get it solved faster. Unsolved problems tend to slow down the whole programming process

Mar 17, 2012 at 5:19pm

Right, I saw that, but I swear I got no output from that when I tested it. I sat down and opened up each of the relevant help files and got no output at all (including from regular keyboard stuff) from the raw (non-notein type) stuff.

I probably missed something somewhere.

Mar 19, 2012 at 1:02pm

Ok, finally tested it and everything on the front sends MIDI messages, including the volume slider.

There is a catch though, the volume slider isn’t sending a standard MIDI message. As is midiparse doesn’t output anything, however if I print directly from midiin I get numbers.

It appears to be formatted in an 8 character string : “240 127 127 4 1 64 64 247″

Both ’64′s in that string above are the value of the volume fader.

I’m trying to extract this in a sensible way since midiparse won’t do it. I tried using ‘zl group 8′ but other MIDI messages break that as they all don’t appear to be 8 numbers long.

The only thing I can think of is stringing together a bunch of route messages, but that seems clunky:

– Pasted Max Patch, click to expand. –
Mar 19, 2012 at 1:49pm

I’d imagine its a 14bit value. at least it sounds like msb/lsb thing. How do the number change? One faster other slower?

Mar 19, 2012 at 2:08pm

It’s the standard sysex message for ‘master volume’ and can be read with [sysexin].

Mar 19, 2012 at 2:10pm

It’s a sysex message (Universale Real Time), you could decode it like this:

– Pasted Max Patch, click to expand. –
Mar 19, 2012 at 4:47pm

Simple enough!

Mar 19, 2012 at 6:43pm

Whoops, sorry for wrong information. Makes sense, every day something new. Gotta dig into sysex :P

Mar 19, 2012 at 7:51pm

I don’t know if this will be helpful or not, but a while back I created a huge SysEx editor in Max for the Yamaha XS8 workstation.

Unless you have an XS8, the actual editor won’t be directly of use, but if you dig around inside the patchers (there are many!) you’ll find all kinds of sysex related goings on in there. Feel free to dissect it and see if you find any inspiration in there.

It can be downloaded from – The actual download link is in the top post on the page, where I declared it a GPL open source project.

I spent a *lot* of time working on the GUI side of things too. You might find something of use there also :-)


Some screenshots:


You must be logged in to reply to this topic.