Sending PRG CHG Message as one 14 bit word !!!!

Anything about MUSIC but doesn't fit into the forums above.
Post Reply New Topic
RELATED
PRODUCTS

Post

well this question is mainly to do with patchscripts ..i work on cubase and never work without a patchscript for my hardware devices.. in the past i have made patchscripts myself for hardware that dont have pre made scripts in cubase...

Now whenever i make the scripts i give bank select message as 2 separate messages namely MSB and LSB... but most pre made scripts, those bundled with cubase have bank select messages as one 14 bit number...

i undersstand that since bank sel message is a cc mess, in every byte( MSB and LSB ) only the last seven digits determine value..

but how is it that one calculates the resulting 14 bit number, i mean what is the formula... besides i am looking at finding out the value in decimal form...
:shock:

Post

Since the high bit will be zero anyway, you can just do (MSB * 128) + LSB.

Steve

Post

okay say my MSB is 0 and LSB is 32 ( decimal )... what will be the decimanl value of my 14 bit word.... i have noticed figures going upto 16000 or something in the pre made patchscripts... is there any set formula...

Post

(0 * 128) + 32 = 32.
(125 * 128) + 0 = 16000.

Post

woops dude.... i did'nt get that :shock:

Post

wait a minute. i think i got u now steve. u are saying that to find the 14 bit value we have to multiply the MSB by 128 and then add the LSB...

So another example . IF MSB is 32 and LSB is 10, then the 14 bit value is 32*128 + 10 = 4106.

Am I right there.

Well dude if i can take this a step further, is there anyway to find the MSB and LSB from a given 14 bit value
:D

Post

Yes, you got it.

The opposite is trickier. To get the MSB divide the 14 bit number number by 128 and throw away the remainder/fraction. That is if it is 259, MSB is 2 (not 2.023..). To get LSB, probably the least confusing is to multiply the MSB you got by 128 and subtract from the 14 bit number. That is 128 times 2 is 256. Subtracted from 259 is 3. MSB = 2, LSB = 3.

Steve

Post

Awesome.... :hail: Thanks a ton Dude!!!!

Post Reply

Return to “Everything Else (Music related)”