Correct midi on expression from menu

Discuss Lemur and share techniques.
Macciza
Regular
Posts: 1315
Joined: 07 Dec 2011 04:57
Location: Sydney, Australia.

Re: Correct midi on expression from menu

Post by Macciza »

Hi
There is a bit of info to be gleaned from the User Guide and the Appendix MIDI section that I added in the last update.
Basically they mirror the standard MIDI message format so checking any MIDI standards document should help as well . . .

Yes that 144,60,127 is a Note On message on Channel 1, note 60, velocity 127 -
If you look at the MIDI mapping panel, or OnMIDI scripting you see a '90' before NoteOn, B0 before Control Change these are the Hex values - 0x90 ==144 meaning NoteOn Channel1 - 0x91 (145) would be Midi Channel 2 etc . . .up to 0x9F for ch 16.

Thought something was a bit odd there -re the 144,60,127 - whilst that is the way a MIDI message gets done at low level and as a MIDI message for midiout() the OnMIDI function actually packages it a bit more human readable . .
so executing OnMIDI -NoteOn 0-127(notes) 1-16(Midi channel) and receiving a note on 60, velocity 127, channel 1 will return {60,127,0} being Note,Velocity, Channel(0-15) - at machine level its 0-15 but for human consumption it is usually 1-16 . . .

So re the Open a Container maybe pick a low Note number to use then a script execute OnMIDI NoteOn, over a limited note range, as many notes as things you want controlled and then go from there with the scripting if(MIDI_ARGS[0]==24) show(Container,1) etc
It really comes down to representations of essentially the same data - you get the hang of it all through a bit of research and experience - mind you I was hacking MIDI way back in the day on Yamaha FB01, and in the late 80's it was an awful lot harder . . .

Hope that makes some sense, and doesn't confuse too much . . . .
MM
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]
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

Re: Correct midi on expression from menu

Post by Softcore »

Yup I understand perfectly...its just that Im not very familiar with converting hexademical values to decimal values so I find it easier to just observe and use the decimal ones. (just to adress to one of your other replies on a similar topic ;) )

In any case, I believe the "monitor" method I described above will always return the data array in the desired form (representation) and with the correct order of data inside the array thats why I didnt trouble explaining it further.... ;)
whatisvalis
Regular
Posts: 153
Joined: 31 Dec 2011 17:12

Re: Correct midi on expression from menu

Post by whatisvalis »

This is really useful information, I've been meaning to set-up a way to listen to incoming messages. Thanks
Macciza
Regular
Posts: 1315
Joined: 07 Dec 2011 04:57
Location: Sydney, Australia.

Re: Correct midi on expression from menu

Post by Macciza »

Hey whatis

Also see here http://liine.net/forum/viewtopic.php?f=34&t=2981

Cheers
MM
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