Page 1 of 2

14Bit MIDI

Posted: 11 Dec 2011 03:39
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.

Re: 14Bit MIDI

Posted: 11 Dec 2011 05:55
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

Re: 14Bit MIDI

Posted: 11 Dec 2011 11:33
by mbncp
For val2 you can also use the modulo operator.

val2 = floor((16383*Fader.x) % 128);

Re: 14Bit MIDI

Posted: 11 Dec 2011 22:44
by vanceg
Thank you for this script. I will try it out, for sure!

Re: 14Bit MIDI

Posted: 11 Dec 2011 23:37
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.

Re: 14Bit MIDI

Posted: 12 Dec 2011 01:41
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

Re: 14Bit MIDI

Posted: 12 Dec 2011 02:49
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....

Re: 14Bit MIDI

Posted: 12 Dec 2011 04:54
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);

Re: 14Bit MIDI

Posted: 12 Dec 2011 07:15
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.

Re: 14Bit MIDI

Posted: 12 Dec 2011 08:59
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.