FL Studio and MIDI

Audio Plugin Hosts and other audio software applications discussion
Post Reply New Topic
RELATED
PRODUCTS

Post

Help!

I'm trying to use several FL Studio instances with MIDIYoke, and I lack of mathematic skills. I want to convert internal high-range values inside the first FL Studio instance to MSB and LSB to send it through MIDIYoke to another FL Studio instance, where MSB and LSB will be recombined to internal high-range values, feeding all the plug-ins with automation data.

HRV = High-Range Value (0-16383, MIDI)
MSB = Most Significant Byte (0-127, MIDI)
LSB = Least Significant Byte (0-127, MIDI)

I already know:
((MSB*128)+LSB) = HRV

But:
? = MSB
? = LSB

I need two formulas to convert HRV EXACTLY to MSB and LSB. I tried some formula versions, but they are far from working perfect. They still output little 'jumps' when working with values where LSB changes from 127 back to 0. Maybe it's a problem with FL Studio's internal 32-bit floating point calculation (I used 'round()' in my formulas, and this can produce very small numbers, I know).

Can someone help me?

-T-

Post

Well, usually you'd use bit logic, but...

MSB = HRV / 128
LSB = HRV - MSB

if you can't use MSB in your calculations for LSB, it'll be a bit harder, but try
LSB = HRV % 128 (where % means modulo)

Post Reply

Return to “Hosts & Applications (Sequencers, DAWs, Audio Editors, etc.)”