Script Execution: ON MIDI question

Discuss Lemur and share techniques.
Post Reply
oldgearguy
Regular
Posts: 315
Joined: 02 Nov 2013 11:19

Script Execution: ON MIDI question

Post by oldgearguy »

I've been blindly using the ON MIDI F0 - System Exclusive for a while and it works fine. However, I have a couple questions --

What are the 0 to 0 1 to 1 fields used for?

How can I have a user-selectable MIDI Target? In scripts using midiout() I can have the target be a variable, but I can't see an obvious way to do that for ON MIDI input scripts.

thanks
Macciza
Regular
Posts: 1315
Joined: 07 Dec 2011 04:57
Location: Sydney, Australia.

Re: Script Execution: ON MIDI question

Post by Macciza »

Hi
Normally they would be second value and channel number but these are irrelevant to sysex.
I would guess it is simply legacy from original codebase that they haven't overhauled yet

I think I have raised this issue with the debs at some point due to some minor bugs
You should be able to use the parent/child system and get people to set that
There may be a bug there but I think it is getting sorted so instead . . .
2 Options
Use a master script to decode all sysex and call scripts and get user to set its target or
Use several master scripts to decode sysex on each target and call same scripts

The first way is easiest - master script/user sets value in editor
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
oldgearguy
Regular
Posts: 315
Joined: 02 Nov 2013 11:19

Re: Script Execution: ON MIDI question

Post by oldgearguy »

OK, thanks. I was thinking it might be a generic set of parameters, but I was hoping it might be a range of MIDI targets to listen on too... :D

As far as the user setting the MIDI Target, -- yes that is an option. However, I already have a configuration menu that lets the user set other things and I initially had MIDI Target there as well, but then I realized it would affect outgoing only.

Having a user open the editor to change the target seems kind of awkward considering they probably are just users and not interested in editing/creating templates. However, if that's the answer, then that's the answer. I do like your suggestion of multiple MIDI listeners on all targets that funnel the data to a single collector script. I may pursue that to see how that works. I could also use the user settings from my Configuration menu to simply return from the other listeners if their number is not selected, which would minimize falsely processing data coming in on other ports.

thanks for the response and suggestions.
Macciza
Regular
Posts: 1315
Joined: 07 Dec 2011 04:57
Location: Sydney, Australia.

Re: Script Execution: ON MIDI question

Post by Macciza »

Matching on narrowest possible criteria i.e. Manufacturer/Model first few bytes for each port would not be too expensive . .
And only the script matching the port would run which would then parse the message out and call specific functions
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
Post Reply