Page 1 of 2

MIDI Learn

Posted: 17 Mar 2015 22:36
by Mr_X
I'm planning on building a design with Lemur that uses a lot of Sysex. It seems like Lemur doesn't have a MIDI learn function natively, so is there a script or any workaround to allow me to have Lemur "learn" the sysex strings? I would like to have my design learn the sysex and then edit them to add the value variable (x) as needed.

Re: MIDI Learn

Posted: 18 Mar 2015 18:29
by Traxus
Not from my understanding.

Your midi listen scripts have to be supplied with hard, non dynamic values for channel and note/cc value (ie, they cannot be variables, I would love if they could).

There might be a snowballs chance in hell that you could run a giant catch all midi listen script (channels 1-16, CC 0-127... channels 1-16, notes 0-127)... and then store these inputs in an array of arrays (yo dawg...) that keep track of their target object/function, whether or not they have been mapped etc... However, this would have to be some highly iterative logic and would likley introduce a ton of latency as Lemur would have to sort out where the midi input was mapped to prior to actually sending/receiving the midi signal.

My thoughts, this would be awesome if it worked but probably too resource heavy thus not worth the time in development.

Re: MIDI Learn

Posted: 19 Mar 2015 00:25
by Mr_X
Thank you for your reply.

Only interested in Sysex at this point, not notes or cc stuff. MidiDesigner can learn any MIDI message, it's a shame Lemur has fallen behind.
I'm really surprised nobody else is asking for this functionality.

Re: MIDI Learn

Posted: 19 Mar 2015 04:17
by Traxus
ah sorry I mis read your OP... sounded like you wanted a dynamically re mappable template?
Mr_X wrote:MidiDesigner can learn any MIDI message, it's a shame Lemur has fallen behind.
There is a ton of room to improve, but there is no way it has fallen behind. Despite it's short comings as a language, I'll still take Lemurs scripting capabilities all day long.

Re: MIDI Learn

Posted: 20 Mar 2015 01:55
by Macciza
MIDI learn of CCs and notes is easily achievable, I posted an example ages ago ...
MIDIAARGS learn of Sysex does not really make sense though...
Sysex message is different outgoing compared to incoming, can cover numerous parameters etc
Why are you particularly wanting to use sysex? And how where you thinking of doing it? What device?

Re: MIDI Learn

Posted: 20 Mar 2015 17:58
by Traxus
Macciza wrote:MIDI learn of CCs and notes is easily achievable, I posted an example ages ago ...
off topic, but where? did you run a catch all midi listen script or some other magic?

Re: MIDI Learn

Posted: 20 Mar 2015 21:22
by Phil999
in a script executed on MIDI input you can already filter the incoming MIDI message. You surely know this already. Then you can receive (and save) incoming MIDI data with MIDI_ARGS.

MIDI_ARGS[0] is CC number or note number.
MIDI_ARGS[1] is CC value or note velocity.
MIDI_ARGS[2] is MIDI channel.

Re: MIDI Learn

Posted: 20 Mar 2015 23:48
by Mr_X
Thank you for your reply.
Macciza wrote:MIDIAARGS learn of Sysex does not really make sense though...
Sysex message is different outgoing compared to incoming, can cover numerous parameters etc
Why are you particularly wanting to use sysex? And how where you thinking of doing it? What device?
The sysex messages I'm planning to work with are for the Yamaha digital mixing consoles. Every parameter on their mixing consoles sends out a specific sysex message, and if that same message is sent to the console, it will change that parameter.
There is a fixed structure to their sysex messages.

In a perfect world, I would be able to press a button below a fader or control on the Lemur design, the design would "listen" for the incoming sysex message, and when received, it would store it as the message for that fader or control. Then, when the control is moved, the same sysex message would be sent back, with the fader/control value inserted at a specific spot in the sysex message.

I have done years of this sort of MIDI programming with PCs in the .NET language but am interested in building a design using the iPad, but have no programming experience on iOS.
Before Lemur, I was trying MIDIDesigner, which has a learn function (when editing a design only) which worked fine, but there are limitations to how it handles sysex messages and the way some controls operate. I was hoping that with Lemur I would have more control, but now I'm not sure what I want to do will even be possible.

Re: MIDI Learn

Posted: 21 Mar 2015 02:16
by Macciza
Traxus - LeLearn https://forum.liine.net/viewtopic.php?f ... arn#p16331

MrX - Ok, so Realtime Sysex, thats a bit different . . .
From memory you could also set Yamaha mixers to send CCs for controls, might be easier . . .
Without researching too much if the sighs stuff is standard then very little data is changing between various controls, so a script could be used to do most of the work but you would have to set appropriate data for all your objects by hand . . .
Might have a bit of a look and see what might be possible for 'learning' . . .

Re: MIDI Learn

Posted: 21 Mar 2015 02:51
by Mr_X
Macciza wrote:Traxus - LeLearn https://forum.liine.net/viewtopic.php?f ... arn#p16331

MrX - Ok, so Realtime Sysex, thats a bit different . . .
From memory you could also set Yamaha mixers to send CCs for controls, might be easier . . .
Without researching too much if the sighs stuff is standard then very little data is changing between various controls, so a script could be used to do most of the work but you would have to set appropriate data for all your objects by hand . . .
Might have a bit of a look and see what might be possible for 'learning' . . .
Cc isn't suitable in this case, I could go into the explanation if you're interested, but suffice to say that sysex is what I'll be using however I end up solving this.

It would be very much appreciated if you are able to point me towards any sample code or tutorials that would help me figure out how to do what I'm trying to do.