Page 1 of 1
Bidirectional Control for Midi Pads
Posted: 26 Sep 2015 14:47
by Scott_Vee
Hey, I am a bit of a newb when it comes to Lemur and a little bit more experienced in Max/MSP. I am working on a project for a step sequencer and would like to use the timing engine in Max 6 to control a set of pads. I am just now starting to explore bidirectional control. I have very little knowledge of OSC and so I am using midi for this project. I am using a 16x8 grid of pads to send midi notes 0-127 to Max. This part is working fine - I can see the notes in the Max window from the print object and control a keyslider object with them.
I am now trying to generate midi notes from the Keyslider object and send them back to the Lemur to light the pads. I have a print object connected to the output of a midiformat object and everything is working fine in the patch. I am then sending the output from the midiformat object to the midiout object. Midiout is connected to Lemur Daemon. Here is where I am running into the problem: the pads on the Lemur do not light up.
I am a bit stuck here. Is it possible to do what I am trying to do? Will Note on/off msgs work for this or must I use CC msgs? Do I need to use a script in Lemur so that the pads will light? Any help is appreciated.
Re: Bidirectional Control for Midi Pads
Posted: 01 Oct 2015 17:36
by ndivuyo
Hey,
Let me start by saying I use Max and lemur a lot and love using OSC cuz of the openness, makes things easier and more possibilities (its easy with the udp objects).
That being said, I know you did your project with MIDI so I'll focus on that. Are your pads sending note messages of control message to Max?
I actually never use midi with max, so just had to make a test patch to figure it out.
Ok so I got it to work. I assume you are sending "Note" MIDI messages with your pads. If so, to send notes back to the lemur and light up the pads, you connect a [midiout] object to your [midiformat] object. Then double click the [midiout] object and choose the right target (I assume a lemur daemon target?). Then just send the corresponding pitch and velocity to the first inlet of the [midiformat] object and they should go through and turn the notes on and off on the pad (say pitch "60" and velocity "127", and obviously a note off is a velocity of "0"). Let me know if you got that to work.
Also, as far I as could tell, there isnt any midi feedback with this method which is great!!! But if I am wrong and you find some, you may need to write a condition to prevent that
Hope this helped!
Re: Bidirectional Control for Midi Pads
Posted: 01 Oct 2015 19:49
by Scott_Vee
Ah, so it is possible. Thank you v much for taking the time to test that out for me. I'm not sure what I'm doing wrong then, but I am sure that it is something simple I can figure out. If I'm still stuck at the end of the weekend, I'll post the patch I'm using here and the template.
Thanks again!
Re: Bidirectional Control for Midi Pads
Posted: 01 Oct 2015 21:14
by Scott_Vee
So... I got it to work now... but I literally didn't change anything in the patch or template? I have a hunch that opening Max before Lemur might have been the problem. Seriously, I'm scratching my head here.
Re: Bidirectional Control for Midi Pads
Posted: 02 Oct 2015 19:38
by ndivuyo
Hm, did you already double click the midi out object and select the lemur daemon before? Maybe it connects automatically depending on opening sequence. Glad it worked!
Re: Bidirectional Control for Midi Pads
Posted: 04 Oct 2015 19:28
by Scott_Vee
Sorry, I don't think I explain myself very well in forums, or at least haven't been here. I've been building max patches for audio and midi hardware for a few years now, so I'd like to think I somewhat understand how they work, even though I'm always learning something new. Each time I configured midiout by double clicking and selecting lemur daemon - this won't happen automatically in my experience. What I meant is that I didn't edit the patch, didn't edit the template, set midiout to lemur daemon as I had before and the pads now light up where as before they would not light. I tested my hypothesis by opening Max first the pads still light, so that definitely wasn't the problem. Crossing my fingers it doesn't happen again so I don't have to find out what was wrong.