Sysex Incremental Values possible

0
0

I’m trying to create a crude Volca FM (read : Yamaha DX) editor.

What I want to do is map the long complex sysex strings to cc numbers so I can then use Midi Controller > Bome Box > Volca to edit the parameters.

So for example :

Operator One ON = F0 43 00 00 01 1B 50 00 00 50 63 00 00 00 32 00 00 00 00 00 00 00 5C 00 01 00 00 50 00 00 50 63 00 00 00 32 00 00 00 00 00 00 00 5C 00 02 00 00 50 00 00 50 63 00 00 00 32 00 00 00 00 00 00 00 5C 00 01 00 00 50 00 00 4F 63 00 00 00 32 00 00 00 00 00 00 00 5C 00 02 00 00 50 00 00 50 63 00 00 00 32 00 00 00 00 00 00 00 5C 00 01 00 00 50 00 00 50 63 00 00 00 32 00 00 00 00 00 00 00 63 00 02 00 00 32 32 32 32 32 32 32 32 1F 00 00 00 00 00 00 00 00 00 18 73 79 6E 74 68 6D 61 74 61 20 7F 4C F7

 

Operator One OFF = F0 43 00 00 01 1B 50 00 00 50 63 00 00 00 32 00 00 00 00 00 00 00 5C 00 01 00 00 50 00 00 50 63 00 00 00 32 00 00 00 00 00 00 00 5C 00 02 00 00 50 00 00 50 63 00 00 00 32 00 00 00 00 00 00 00 5C 00 01 00 00 50 00 00 4F 63 00 00 00 32 00 00 00 00 00 00 00 5C 00 02 00 00 50 00 00 50 63 00 00 00 32 00 00 00 00 00 00 00 5C 00 01 00 00 50 00 00 50 63 00 00 00 32 00 00 00 00 00 00 00 14 00 02 00 00 32 32 32 32 32 32 32 32 1F 00 00 00 00 00 00 00 00 00 18 73 79 6E 74 68 6D 61 74 61 20 7E 1C F7

I would like to map to CC1

The problem I have is when trying to edit sliders (e.g. Operator One Output level)

Ideally I want to map the hex decimal values to the CC so that it creates these strings depending on input.

e.g. Operator One at 64 = F0 43 00 00 01 1B 50 00 00 50 63 00 00 00 32 00 00 00 00 00 00 00 5C 00 01 00 00 50 00 00 50 63 00 00 00 32 00 00 00 00 00 00 00 5C 00 02 00 00 50 00 00 50 63 00 00 00 32 00 00 00 00 00 00 00 5C 00 01 00 00 50 00 00 4F 63 00 00 00 32 00 00 00 00 00 00 00 5C 00 02 00 00 50 00 00 50 63 00 00 00 32 00 00 00 00 00 00 00 5C 00 01 00 00 50 00 00 50 63 00 00 00 32 00 00 00 00 00 00 00 40 00 02 00 00 32 32 32 32 32 32 32 32 1F 00 00 00 00 00 00 00 00 00 18 73 79 6E 74 68 6D 61 74 61 20 7F 6F F7

 

Operator One at 20 = F0 43 00 00 01 1B 50 00 00 50 63 00 00 00 32 00 00 00 00 00 00 00 5C 00 01 00 00 50 00 00 50 63 00 00 00 32 00 00 00 00 00 00 00 5C 00 02 00 00 50 00 00 50 63 00 00 00 32 00 00 00 00 00 00 00 5C 00 01 00 00 50 00 00 4F 63 00 00 00 32 00 00 00 00 00 00 00 5C 00 02 00 00 50 00 00 50 63 00 00 00 32 00 00 00 00 00 00 00 5C 00 01 00 00 50 00 00 50 63 00 00 00 32 00 00 00 00 00 00 00 14 00 02 00 00 32 32 32 32 32 32 32 32 1F 00 00 00 00 00 00 00 00 00 18 73 79 6E 74 68 6D 61 74 61 20 7F 1B F7

Am I being unrealistic ?

Thanks

 

Marked as spam
Posted by (Q&A Forum: 9, Answers: 28)
February 24, 2018 10:52 am
42 views
0
Private answer

I’ve worked out that Byte 128 denotes the value (i.e for volume 99 > 00)

You’re right 162 is a typo

163 must be some sort of checksum I think.. It changes every time..

From Yamaha Manual :

values I’m getting

Byte 128. Hex : 61 (97 decimal) > Byte 163. Hex 4e (78 decimal)

Byte 128. Hex : 5e (94 decimal) > Byte 163. Hex 51 (81 decimal)

Byte 128. Hex : 5c (92 decimal) > Byte 163.Hex 53 (83 decimal)

Byte 128. Hex : 5b (91 decimal) > Byte 163.Hex 54 (84 decimal)

Byte 128. Hex : 56 (86 decimal) > Byte 163.Hex 59 (89 decimal)

Byte 128. Hex : 51 (81 decimal) > Byte 163.Hex 5e (94 decimal)

From a Yamaha manual I found online : take the ***th byte and make the 2’s complement.

Anyone got any idea what ‘make the 2’s complement means’ ?

Marked as spam
Posted by (Q&A Forum: 9, Answers: 28)
February 24, 2018 7:54 pm

Yes, you invert every bit and then add one. This is a common term in binary math. In MIDI it merely means
that the values 0-64 are positive values 0-64 and the values 127-65 are the values -1 to -64.
This is the way binary negative numbers are generally represented. The highest order bit becomes the sign flag.

Steve

( at February 24, 2018 9:46 pm)

I have to admit to being in over my head now I think..
I have found online this statement :

“For the Checksum, i had no problem using the following algo:
with sum being the summing of all data bytes (including ‘LM’ header)
– chk = sum AND 127
– chk = 128 – chk
– chk = chk AND 127

or in short: chk = (byte)(( 128 – ( s & 127 ) ) & 127 );”

which to my naive eyes seems to be a summary of your statement.

which judging by this bomepost I should be able to implement as an equation :
https://www.bome.com/forums/viewtopic.php?t=11986

( at February 24, 2018 9:52 pm)
OK.. so to workaround the requirement for a formula to calculate a checksum, i’ll just assign two variables as you suggest Steve. I have incoming CC assigned to set value to variable “pp” Then I have created a rule : if pp>=64 then qq=61 if qq==61 then rr=0x4e Then in output I have : F0 43 00 00 01 1B 50 00 00 50 63 00 00 00 32 00 00 00 00 00 00 00 5C 00 01 00 00 50 00 00 50 63 00 00 00 32 00 00 00 00 00 00 00 5C 00 02 00 00 50 00 00 50 63 00 00 00 32 00 00 00 00 00 00 00 5C 00 01 00 00 50 00 00 4F 63 00 00 00 32 00 00 00 00 00 00 00 5C 00 02 00 00 50 00 00 50 63 00 00 00 32 00 00 00 00 00 00 00 5C 00 01 00 00 50 00 00 50 63 00 00 00 32 00 00 00 00 00 00 00 qq 00 02 00 00 32 32 32 32 32 32 32 32 1F 00 00 00 00 00 00 00 00 00 18 73 79 6E 74 68 6D 61 74 61 20 7F rr F7 Should work I hope If it does, my next approach will be to set up a series of about 20 crude ’steps’ (pairs of values) to allow editing. If I do so, does the rule read from top to bottom ? i.e. can I have if pp >= 99 then x if pp >= 89 then y if pp >= 79 then w if pp >= 69 then v etc ?
( at February 24, 2018 10:42 pm)
You can just assign the checksum byte to the value rr and never use it. That way your input will not care about that value and you won’t have to calculate it.
( at February 24, 2018 11:14 pm)
0
Private answer

That is a grade A, exceptionally helpful post Steve. Thanks for taking the time to type it out.I’ll let you know how I get on. I *think* I understand !!

Bill

Marked as spam
Posted by (Q&A Forum: 9, Answers: 28)
February 24, 2018 5:51 pm

My pleasure, Bill!

( at February 24, 2018 5:54 pm)
0
Private answer

Hi,

There are only 3 byte differences in this Sysex string

Byte 128, 162 and 163.

The key byte seems to be Byte 128.

You can change the value of incoming byte of 128 to pp and leave everything else the same.

Then create rule as follows

For On:

if pp!=99 then exit rules, skip outgoing action

Output :B0 01 127 – Assuming 127 is on

For off:

if pp!=20 then exit rules, skip outgoing action

Output: B0 01 0 – Assuming 0 is off

For 64:

if pp!=64 then exit rules, skip outgoing action

Output:

B0 01 40  (40 is hex for 64)

For 20

if pp!=20 then exit rules, skip outgoing action

Output

B0 01 14 (14 is hex for 20)

 

The other thing to keep in mind. If you are adding more, that Byte 128 needs to remain unique, otherwise you will need another test case for bytes 162 and 163 which are the other unique bytes in these messages.

In this case I would use pp for byte 128, qq for byte 162 and rr for byte 163

on – pp=ox63 qq=0x7f rr=ox4c

off – pp=0x14 qq=0x7e rr=0x1c

64 – pp =0x40 qq=0x7f rr=0x6f

20- pp = 0x14 qq=0x7f rr= 0x1b

I suspect byte 163 is simply a checksum.

The only difference in byte 162 was for off value and might have been a typo on your part.

 

Good luck,

Steve

bome@sniz.biz

Independent Bome Programming Specialist

Bome Q&A moderator

 

 

Marked as spam
Posted by (Q&A Forum: 29, Answers: 2081)
February 24, 2018 3:09 pm

Note, if byte 128 is the only byte that is unique in this string, you could set up rules and a single translator to handle this.

if pp==99 then tt=127
if pp==20 then tt=0
if pp==64 then tt=64
if pp==20 then tt=20
output B0 01 tt

( at February 24, 2018 3:36 pm)