MIDI Multichannel in AUDIO Effect

mlostekk's icon

hello there,

i am trying to replace all my python control surface scipts with max. (because python timers are not accurate enough)

now the question, i am trying to setup my F1 interface. i have following needs to that max patch:

- it should be able to receive midi on one channel from the F1 device
- it should be able to send midi 3 channels to the F1 (because of HSV color settings)
- it should be able to send midi on the same channel it is receiving

how can i do this? do i have to use it with a simple control surface? or in a midi track? but there i have the problem, that i can receive midi (when midi is set to IN or AUTO with REC button on) or i can send midi (if its AUTO or OFF.

is it possible to receive midi (on one channel) AND send midi (on multiple channels) and if yes, how?

thx in advance

(this is the device i am trying to implement in max4live)
http://www.youtube.com/watch?v=-jywWlDTmf0

mlostekk's icon

and one question i forgot:

is it possible to send and receive midi on an audio track? i would prefer to implement all device in one, and put it on the master channel, and not to implement a lot of devices on multiple midi channels. and is it possible to get the midi in and out (in a live patch) like set in the options->midi setup in max

broc's icon

Quote from the docs:

"MIDI input arrives from Live and MIDI output is sent to Live."

sysex's icon

If I recall correctly you can receive midi by turning the midi track to 'In' or to 'auto' with 'rec' anabled. You can grab the midi from the track by f.i. using another midi track that is configured to receive midi from the first one. I think more problematic is that Live internally just knows channel 1 and if you want to send midi to an external device you have to select the channel so a part of the status is ignored and overidden. I think best approach is to take your python script modify your controls according to your m4l implementation and access the controls through the Live-API with M4L. BTW why not staying in python? Your stepseq looks great in the vid and python has lots of advantages - it would drive my crazy to write JS for Api access in one single file.. . What timing problems do you have with Python?

mlostekk's icon

okay, i read the limitations already :/

and is there no way of getting rid of it with a live control surface written in python?! is it possible to communicate with the device on multiple channels?

my problem in python is, that the timer callbacks are not accurate enough. so if i have a step sequencer running in 1/32th mode on a bpm of 120 then some steps are skipped sometimes. i just get a callback each 100ms minimum. thats too much.

sysex's icon

Isn't PY and M4L API access both on low priority thread?
I haven't tried to write a step sequencer but I always wanted to take the time to read how Hanz Petrov implemented his APC step sequencer in http://remotescripts.blogspot.de/p/apc-64-40.html - but I'm sure you know his sources?

As I understand you can use the python API together with the _Framework classes in order to configure the controllers which are later on accessable through M4L's Live API. In _Framework a control is more less defined like:

transport = TransportComponent()
transport.set_play_button(ButtonElement(True, 0, 5, 60))

'play' is triggered by a momentary, note on, on channel 6, with key 60

this just a snippet but in context of remote scripts you can send/receive on all channels. You can name the ButtonElement and find it in the M4L under controlsurfaces (correct me if I'm wrong / sorry can't tell you how to exactly browse there as I don't use M4L). So if I need to use M4L and would still want to send midi without restrictions I'd configure as many controllers as possible with python via _Framework classes and work with them in M4L. Don't you have already a remote script running? It would be interesting to read your PY's so far

mlostekk's icon

hey, okay, i will check the how to work in m4l with control surfaces. i also guess its possible, maybe i should investigate the launchpad step sequencer a little bit further, i guess they are doing something like that.

if you are interested in my python scripts, you can find them here

you find also a lot of other stuff here, i started collecting some resources, but its out of date, because i dont have internet anymore at my studio, i will try to pick the new stuff up and upload it from work within the next days, but meanwhile feel free to checkout.

i also plan to do some howtos and install guides, but did not have the time. i hope i will have some spare time to do this within the next weeks.