Simple MIDI data processor

Petar Klanac's icon

Hi,

I would like to control pitchbends and CCs with a simple processor and using a second keyboard.

Pitchbend example :
input : C3 "note on" message on channel 2
output : pitchbend value -100 on channel 1

CC example :
input : C3 "note on" message on channel 2
output : CC#25 value 100 on channel 1

In order to achieve nonlinear correspondence, the processor would be configured with a table :
note on - channel - CC or pitchbend - value - channel
C3 - 2 - CC#25 - 100 - 1
D3 - 2 - CC#01 - 127 - 1
E3 - 2 - CC#25 - 75 - 1
F3 - 2 - pitchbend - minus 100 - 1
etc.

The text input form could be :
60,2,25,100,1
62,2,1,127,1
64,2,25,75,1
65,2,pb,-100,1

Is this possible with Max for Live ?

Thanks,

Petar

Roman Thilenius's icon


you can build it around coll or table, but you could also use a bunch of list messages or even calculate the changes arithmetically.

for example note on is: if velocity != 0

Source Audio's icon

Live might give you problem if you want to
output to different midi channels from same device.
but otherwise it should work.
Only ... that kind of input like
60,2,25,100,1

I don't see it really.
You only need to define input to output.
As Roman mentioned coll object.
index is input, data output.
60, 176 25 100;

176 25 100 = raw midi message for CC#25 value 100 on midi channel 1.
using raw midi messages is more flexible.
you use 224 nn nn for pbend on midi channel 1
-------
that is if note input midi channel is same.

Petar Klanac's icon

Thank you Roman and Source Audio.

I don't have access to Max building tools (I work with Live 11 Intro).

Is there a simple Max for live stand-alone plug-in that could do this kind of processing ?

Roman Thilenius's icon


note to controller conversion probably exists somewhere, but not like you want it to work (note on to val100), more like velocity to CC mapping.

why dont you download the max demo version?

Petar Klanac's icon

> why dont you download the max demo version?
If I download the demo, will I be able to make a patch and export it as a standalone midi plug-in to use in Live ?

Roman Thilenius's icon


save and export works for 14 days, everything else forever.

Petar Klanac's icon

I've managed to convert a "note on" C3 (ignoring "note off") to CC#25 value 70.
Is it possible to execute this patch in Live 11 Intro ?

Petar Klanac's icon

> save and export works for 14 days, everything else forever.
Thank you Roman.
I've found the "Export Max for Live Device…" command in the File menu but it is grayed out.
Any hint on why it's not available in the demo version ?

Source Audio's icon

It is a very simple thing to build this kind of conversion,
But complications start if you need to store many of such
conversion parameters and make them flexible.
In short, if you post a list with definite conversions you need,
one could build a m4l device for you within few minutes, no problem.
Otherwise, you would need to build something that can create
and store conversion lists.
If you need only 10 or so it could even be
numbers for notes, menu for destination, and value, something like this:

As only notes are expected at input, I would replace midiin with notein and stripnote.
Output using either 176 nn nn (CC), or 224 nn nn (PB)

At the end it could look like this

You add as many modules as needed.
Numbers, menues should be set to be stored and automated
so Live can store them into project.
Live objects also have initial value, so you can set a default conversion set
using that values.
--------
Anyway, if you build something using Max and want to
compile it into m4l device, but Live version you use does not allow you to do so,
just post the patch here, someone with full Live version can do that for you.
Any other questions about live versions - intro, demo, full ???
whatever I have no idea, I am not Live user.

Roman Thilenius's icon


if you install max, it runs as "free runtime", you have to enable the demo period yourself. (so you can wait with it until you have something to export. ;) )

Petar Klanac's icon

Many thanks Source Audio and Roman ! This is very helpful.

I enabled the demo period, made a new project with my patch and exported it with the "Export Max for Live Device…" command.

But when I tried to import it into a Live (11 intro) session, I got the message "This device is not available in this version of Live". So I checked which one I should have and it's exclusively available with the largest one (11 studio). That is a 500 euros upgrade !

I Think I'm stuck....

Petar Klanac's icon

(Source Audio, could you please send me the Max file for the patch you have made above ?)

Source Audio's icon

sure, I can also send you whatever you feel would fit better to what you want.
I mean something premade, without all the menus etc, just let me know.
Then... you can use max as standalone app together with Live,
if you are on MacOS without any restrictions, on windows one would have to
use some virtual midi router.
The idea is to use such patches as you need in max, receive keyboard input there,
and send converted midi to Live.
All no problem.
here is the patch

Max Patch
Copy patch and select New From Clipboard in Max.

Is made using max 6.
If that would need to become max4live device, one should
check numbers and menus to enable parameter mode etc.
Just write if you need further help.

Source Audio's icon

P.S. I find it really a shit that that Live versions, intro, trial, standard, half, full this and that,
limit usage of own made max4live devices.
can you upload one of this "BUILT IN" m4l devices from the intro version.
I want to see what makes them "accepted"

Petar Klanac's icon

Oh I see. I could use an Inter Application Chanel to communicate between Live and Max.
Many thanks for the code Source Audio !
That's a very good starting point. I'll try to work it out. If something goes wrong, I'll post it here.

Petar Klanac's icon

> can you upload one of this "BUILT IN" m4l devices from the intro version.
Impossible in Intro nor Standard. There ar no devices available. Max for Live is absent from the plug-ins and midi effects browser. In Studio version, you would click on "Max for Live" in the browser to access all m4l devices.

Petar Klanac's icon

*(its called the Suite version, not Studio)

Source Audio's icon

I would rather use something else as daw than that cripled live version.

here is another patch using coll,
I would prefer that over all that menu-number objects.
You can even write mappings using text edit and read them into coll.
just keep formatting correct.

Max Patch
Copy patch and select New From Clipboard in Max.


index comma data semicolon, example:

48, 176 25 100;

this line would output cc 25 value 100 on midi channel 1
when note number 48 gets received

Petar Klanac's icon

I'll have to study this one a little bit since it's more complex than the previous one.
I have tested it by recording from max to live with an interapplication bus channel. It works. Live recorded all CC values and pitchbends.
Thank you Source Audio !

Source Audio's icon

you are welcome.
I find this coll version much simpler.
You can remove midi monitor part, I just inserted it there for testing.
It is all very simple, you write your lines, close the edit window,
write the file and it works.
only thing you need to learn is to work a bit with coll,
and have raw midi messages correct.

Petar Klanac's icon

Perfect !