14Bit MIDI

Discuss Lemur and share techniques.
vanceg
Newbie
Posts: 24
Joined: 11 Dec 2011 03:36

14Bit MIDI

Post by vanceg »

Has anyone worked out a good way to send 14bit MIDI messages from Lemur? I'd really like to be sending and receiving 14bit CC messages (of course, these are a combination of two standard MIDI CC messages...) from Lemur's faders.

Some folks will surely say "use OSC". yes. This is ideal - but there are some devices which do not accept OSC or require a great deal of setup to utilize OSC, but which accept 14bit MIDI quite nicely. Ableton Live is one great example.
Macciza
Regular
Posts: 1315
Joined: 07 Dec 2011 04:57
Location: Sydney, Australia.

Re: 14Bit MIDI

Post by Macciza »

Hi Vanceg
I'm guessing your the VG Vanceg, otherwise it's just weird . . .

Anyway here is a basic script which I think should work as a 14bit controller sending on cc's 3 & 35 - not tested properly yet but looking with MIDIMon it seems right . . .

Chuck a Fader on,set value = x*16383 for feedback and add this script to it . . .

// 14bit CC script - MM

decl target=0; // MIDI Target
decl cc1 = 3, cc2 =cc1+32; // MSB - LSB
decl val1, val2; // Vars
decl chan = 1; // MIDI Chan

val1= floor(16383*Fader.x/128);
val2=16383*Fader.x-128*floor(16383*Fader.x/128);

ctlout(target,cc1,val1,chan);
ctlout(target,cc2,val2,chan);

Hope it works, it should at least be close to correct, I hope . . .

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]
mbncp
Regular
Posts: 87
Joined: 08 Dec 2011 07:25

Re: 14Bit MIDI

Post by mbncp »

For val2 you can also use the modulo operator.

val2 = floor((16383*Fader.x) % 128);
vanceg
Newbie
Posts: 24
Joined: 11 Dec 2011 03:36

Re: 14Bit MIDI

Post by vanceg »

Thank you for this script. I will try it out, for sure!
vanceg
Newbie
Posts: 24
Joined: 11 Dec 2011 03:36

Re: 14Bit MIDI

Post by vanceg »

Macciza wrote:Hi Vanceg
I'm guessing your the VG Vanceg, otherwise it's just weird . . .
MM
Yes, Indeed I am the same person who uses and posts frequently on the VG series product forums.
Macciza
Regular
Posts: 1315
Joined: 07 Dec 2011 04:57
Location: Sydney, Australia.

Re: 14Bit MIDI

Post by Macciza »

Hi
Thanks, the modulo certainly makes it read/explain better - maths is not my strong point . . .

Vanceg, thought so, I'm on the VG Forum too - will probably do some VG specific stuff at some point . .
Did the scripting help achieve what you are after?

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]
vanceg
Newbie
Posts: 24
Joined: 11 Dec 2011 03:36

Re: 14Bit MIDI

Post by vanceg »

I just started to try to test it. I haven't gotten it to work yet - but I suspect this is due to my very limited understanding of scripting in Lemur. I'm not able to get the script, as it is written, to function at all in Lemur. Depending on how I edit it, I end up with all undefined variables, or I end up with none of the script being accepted by the Script window (all red text). I'm sure it's something I'm doing wrong....
cliffman
Newbie
Posts: 11
Joined: 09 Dec 2011 22:34

Re: 14Bit MIDI

Post by cliffman »

Here's another example, a little shorter, cc 9 and 41:

decl scx;
decl scmsb,sclsb;
scx = x * 16384;
sclsb = floor(scx % 128);
scmsb = floor((scx - sclsb)/128);

ctlout(0,9,scmsb,1);
ctlout(0,41,sclsb,1);
vanceg
Newbie
Posts: 24
Joined: 11 Dec 2011 03:36

Re: 14Bit MIDI

Post by vanceg »

Thanks to all.
I was able to make the script that Cliffman sent work.

I still haven't been able to figure out getting feedback BACK and making that show up properly in Lemur (the MIDI seems to be being fed out from Live...but I haven't gotten to to be received correctly in Lemur. working on that.
mbncp
Regular
Posts: 87
Joined: 08 Dec 2011 07:25

Re: 14Bit MIDI

Post by mbncp »

On the iPad if you make a slider/fader the full size of the 'smaller' side it's already difficult to set that slider on a given value using 7 bit resolution (0-127) using a 'standard' finger.

So if you really need and want to use 14 bits you will have to, either use 2 controls per function, or make some trick to switch between lo and hi resolution editing on a single control.
Post Reply