Page 1 of 2

Transmitting MIDI IN Note Data to MIDI OUT (?)

Posted: 05 May 2012 01:31
by Puzzlegob
Hello,

This is my first post, and like most n00bs, I have an annoying question.

I want Lemur to take MIDI IN data from my X-Station controller keyboard (Note on, aftertouch, velocity ...) and transmit it out to my MKS-80 Synth Rack. I want Lemur to sit between the controller keyboard and the synth, to edit synth parameters.
I've tried simply assigning the iPad Midi (IN/Out) to lemur's MIDI 0: (In/Out), hoping that this would pass MIDI messages from the keyboard to the synth, but it doesn't seem to work. (Although the line6 MIDI interface lights up to indicate that it IS receiving MIDI messages)

I built a simple test interface, and I have had success in sending sysex messages from lemur to the MKS-80 (all of it's parameters are controlled by sysex rather than MIDI CCs) - But this MIDI problem mentioned above has me stumped. I've tried the search engine on the forum, and read the manual twice, but no luck.

Any help would be greatly appreciated!

Re: Transmitting MIDI IN Note Data to MIDI OUT (?)

Posted: 05 May 2012 06:12
by bxsj
Lemur does not pass MIDI data automatically from midi in to midi out. But you could try the following:
- Create a script triggered by an ON MIDI expression. Filter by MIDI message type (note, control change, etc.) and the midi port your keyboard is sending to.
- In the script the incoming midi data is received in the vector MIDI_ARGS (each array entry is one byte of the midi message).
- Manipulate, change or massage the midi message and send it out to port your MKS-80 is receiving midi data using the midiout(target,msg[]) command.
Hope that helps,
B.

Re: Transmitting MIDI IN Note Data to MIDI OUT (?)

Posted: 05 May 2012 06:25
by Puzzlegob
bxsj wrote:Lemur does not pass MIDI data automatically from midi in to midi out. But you could try the following:
- Create a script triggered by an ON MIDI expression. Filter by MIDI message type (note, control change, etc.) and the midi port your keyboard is sending to.
- In the script the incoming midi data is received in the vector MIDI_ARGS (each array entry is one byte of the midi message).
- Manipulate, change or massage the midi message and send it out to port your MKS-80 is receiving midi data using the midiout(target,msg[]) command.
Hope that helps,
B.
Thank for pointing me in the right direction! This will also be useful for my next goal - Getting Lemurs knobs/sliders to update to reflect their parameters when cycling through banks/patches on the MKS-80. It's going to be a huge undertaking, but IF I manage to do it, it'll be a beautiful thing!

Re: Transmitting MIDI IN Note Data to MIDI OUT (?)

Posted: 20 Jun 2012 16:07
by Z3B
I'd love to know if you get that working - It'd be fantastic to see some working examples of lemur templates that update to reflect the software it's connected to...

Re: Transmitting MIDI IN Note Data to MIDI OUT (?)

Posted: 20 Jun 2012 18:02
by Phil999
I would like to know how this MIDI_ARGS vector is defined. What is the sequence? Channel, type, value, or type, channel, value, or something else? How did those who know find it out? Trial and error? Or is there a documentation? I didn't find anything in the manual or at Jazzmutant sites or on the internet.

Re: Transmitting MIDI IN Note Data to MIDI OUT (?)

Posted: 20 Jun 2012 18:27
by lABl
quick way would be using a monitor and inside of Midi script type something like this:

Code: Select all

Monitor.value = MIDI_ARGS;
Hope that helps,
Cheers
AB

Re: Transmitting MIDI IN Note Data to MIDI OUT (?)

Posted: 20 Jun 2012 18:31
by Phil999
excellent idea! I should have known it, but ...

Thank you Antonio.

Re: Transmitting MIDI IN Note Data to MIDI OUT (?)

Posted: 20 Jun 2012 20:21
by Puzzlegob
Z3B wrote:I'd love to know if you get that working - It'd be fantastic to see some working examples of lemur templates that update to reflect the software it's connected to...
I did get it working *kinda* a few days ago. It works about 50% of the time :?

When you change patches on the MKS-80, (depending on a few factors) it sends one or more sysex strings containing all the parameter values. My script just assigns these values (from MIDI_ARGS) to variables, and uses setexpression() to update the faders. Sometimes only *some* of the faders get updated, because when setexpression() sets a fader, lemur sends a message to the MKS-80, which in turn sends a separate sysex message from the MKS-80's MIDI OUT (to lemur's MIDI IN) - interrupting the original, long sysex string...

I will try and re-write the script to collect all the relevant sysex bytes from MIDI_ARGS, and send them to another defined array attached to a separate script that updates the faders etc. That way I can be sure that the 'collecting sysex data' part of the script isn't interupted by 100+ individual fader adjustments and their associated sysex messages...

Re: Transmitting MIDI IN Note Data to MIDI OUT (?)

Posted: 21 Jun 2012 16:03
by Z3B
rippin' I hope you get that going...

I'm rocking ableton, with the Lemur as the main control (and other generic midi controllers,) and would like Kapture Pad to be on my iPhone; but without my Lemur interface updating to reflect when Kapture changes something, It's impractical.

I'm an accomplished multimedia artist, but I've always been a hack with code languages. I've got some of these scripting tutorial templates from the liine site - it feels like lights are coming on in me head ;)

These are my first steps to understanding scripting, so hook me up (please) if you know answers.

Re: Transmitting MIDI IN Note Data to MIDI OUT (?)

Posted: 21 Jun 2012 20:36
by Puzzlegob
Z3B wrote:rippin' I hope you get that going...

I'm rocking ableton, with the Lemur as the main control (and other generic midi controllers,) and would like Kapture Pad to be on my iPhone; but without my Lemur interface updating to reflect when Kapture changes something, It's impractical.

I'm an accomplished multimedia artist, but I've always been a hack with code languages. I've got some of these scripting tutorial templates from the liine site - it feels like lights are coming on in me head ;)

These are my first steps to understanding scripting, so hook me up (please) if you know answers.
I'm a hack coder too! This is my first lemur template, and there's been a lot of trial and error, revisiting the manual and analysing other people's projects to figure it all out!

I don't have any experience with Kapture, or writing Lemur templates that interact with Ableton, so I don't have any answers (sorry!)