sarguzeen
2018-11-24 09:09:42
Hi.
I'm absolutely new in Bome Translator. Have a little experience with SysEx and no programming skills at all. Whatever, I'm trying to create controller from NI Maschine for E-MU P2k (Command Station in my case) arpeggiator.
By P2k sysex manual, for controlling, let say pitch on step 1, first i have to choose that step. Means, for encoder on Maschine i have to create 2 functions:
1) ARP_PATTERN_STEP_SELECT
F0 18 0F 01 55 01 02 02 06 00 00 F7
(step N#1)
Execute it only once, and jump to function
2)ARP_STEP_KEY_OFFSET
F0 18 0F 01 55 01 02 10 06 pp qq F7.
It's probably simple task for experienced Bomers, but i stack in two problems:
1) how to create from one variable in CC value TWO variables in SysEx?
2) wich rule i have to create for "choose step number" only once?
Thanks for any help and ideas.
Steve-Bome Forum Moderator
2018-11-24 15:40:13
Hi,
Not knowing the details of either the E-MU, I can provide some guidance but it may not be exactly what you need.
If you need only to send the first Sysex Once (per Bome session), I would recommend you use incoming action as “Project Opened” and send it then.
With that said, what I usually do for my project is hav a “Project Opened” action that sets a timer “Init”. Then I create a number of translators that look for timer “Init” each doing whatever they need to do at project start (like setting global variables, sending initialization sequences etc”. I usually also create an incoming action with a keystroke and output action of timer “Init” so that I can hit that key at any point to get my project back to a known state.
Once you send the Init Sysex, then you can use a translator to look at the CC number to translate to Sysex for your other required output.
Say you want to monitor CC 25 on MIDI CH 1 and capture its controller number and value into pp and qq and pass those values onto a Sysex String
Incoming: CC on MIDI CH 1 CC 25 set to pp Any value set value to qq
Outgoing: Raw MIDI F0 18 0F 01 55 01 02 10 06 pp qq F7
Now if you want both messages going out each time you turn the knob, you would create two translators with the same incoming message each with a different outgoing message.
Typically for Sysex, you need to include some type of delay before sending another one so I would recommend you set a delay of 20ms in the second translator.
Good luck!
Steve Caldwell
Bome Q and A Moderator and
Independent Bome Consultant/Specialist
bome@sniz.biz
sarguzeen
2018-11-24 17:38:00
Hi Steve.
Thanx for quick respond.
I found on forum this:
https://www.bomeloft.com/support/kb/translate-midi-cc-sysex-containing-ls-ms-nibbles#answer-6239
In E_MU:
- Parameter Value Edit:
- EXAMPLE:> {F0h, 18h, 0Fh, dd, 55h, 01h, 02h, <xx, xx, yy, yy>, F7h}
F0h = sysex message
18h = EMU ID
0Fh = Proteus ID
dd = Device ID
55h = Special Editor designator byte
01h = Command::Parameter Value Edit
02h = Byte count(number of Byte pairs)
{xx, xx} = Parameter ID (LSB first)
{yy, yy} = Parameter Data
F7h = EOX
- ARP_STEP_KEY_OFFSET
- id = 784 (10h,06h) min = -52; max = +48
-49 = tie
-50 = rest
-51 = skip
-52 = end
- By having that:
- //Incoming CC 14 any value set to “oo”
- ss=oo-64
pp=ss%48
qq=ss/48
- With that rules i have incoming CC converted to step value:
- CC value from 0 to 63 – Step value +48
- CC value from 64 and up goes smootly, as it have to be.
- Really have no ideas, how to be with LSB…
Steve-Bome Forum Moderator
2018-11-24 18:11:44
comment
For LSB, there are two possible approaches.
1 – Leave it 0
2 – Set to the same value as the MSB
Both should work but the second might give you a bit more accuracy and would cover both the highest value 7F7F and the lowest value 0000 of the 14 bit range.
sarguzeen
2018-11-24 18:25:58
comment
In the case (LSB) pp=0
Step value have only two positions: “0” or “+48”
In the case “pp=ss/48” result is the same…
It just does’nt go below “0”
Steve-Bome Forum Moderator
2018-11-24 18:49:50
comment
There are no negative values in MIDI unless the receiving equipment interprets the high order bit as a sign indicator. In this case, I’m not sure what the receiving equipment expects for -52 or any other negative number for that matter.
Steve-Bome Forum Moderator
2018-11-24 18:54:34
comment
sarguzeen
2018-11-24 19:00:30
comment
ss=oo-64 for compenate that “negative” value.
Manual – SysEx manual for E-MU, You mean?
sarguzeen
2018-11-24 19:02:50
Page 6 – Parameter Edit/Request Commands
Page 51 – Arpeggiator Pattern Edit Parameters
Attachments:
Steve-Bome Forum Moderator
2018-11-24 19:08:04
comment
Yes SysEx Manual
So if the value is -1 then it would be 63 for -2 it would be 62? For +1 it would be 66 and for +2 it would be 66?
Once I determine how the synth interprets 7 bit and 14 bit values, I could figure it out.
Also the parameter are LSB MSB so would need to see that too?
sarguzeen
2018-11-24 19:34:38
That i have from remote editor, when i tweak step pitch, per step:
1: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 51 7F F7
2: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 52 7F F7
3: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 53 7F F7
4: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 54 7F F7
5: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 55 7F F7
6: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 56 7F F7
7: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 57 7F F7
8: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 58 7F F7
9: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 59 7F F7
10: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 5A 7F F7
11: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 5B 7F F7
12: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 5C 7F F7
13: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 5D 7F F7
14: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 5E 7F F7
15: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 5F 7F F7
16: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 60 7F F7
17: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 61 7F F7
18: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 62 7F F7
19: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 63 7F F7
20: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 64 7F F7
21: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 65 7F F7
22: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 66 7F F7
23: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 67 7F F7
24: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 68 7F F7
25: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 69 7F F7
26: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 6A 7F F7
27: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 6B 7F F7
28: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 6C 7F F7
29: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 6D 7F F7
30: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 6E 7F F7
31: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 6F 7F F7
32: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 70 7F F7
33: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 71 7F F7
34: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 72 7F F7
35: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 73 7F F7
36: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 74 7F F7
37: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 75 7F F7
38: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 76 7F F7
39: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 77 7F F7
40: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 78 7F F7
41: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 79 7F F7
42: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 7A 7F F7
43: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 7B 7F F7
44: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 7C 7F F7
45: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 7D 7F F7
46: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 7E 7F F7
47: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 7F 7F F7
48: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 00 00 F7
49: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 01 00 F7
50: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 02 00 F7
51: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 03 00 F7
52: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 04 00 F7
53: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 05 00 F7
54: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 06 00 F7
55: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 07 00 F7
56: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 08 00 F7
57: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 09 00 F7
58: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 0A 00 F7
59: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 0B 00 F7
60: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 0C 00 F7
61: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 0D 00 F7
62: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 0E 00 F7
63: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 0F 00 F7
64: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 10 00 F7
65: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 11 00 F7
66: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 12 00 F7
67: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 13 00 F7
68: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 14 00 F7
69: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 15 00 F7
70: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 16 00 F7
71: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 17 00 F7
72: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 18 00 F7
73: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 19 00 F7
74: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 1A 00 F7
75: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 1B 00 F7
76: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 1C 00 F7
77: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 1D 00 F7
78: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 1E 00 F7
79: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 1F 00 F7
80: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 20 00 F7
81: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 21 00 F7
82: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 22 00 F7
83: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 23 00 F7
84: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 24 00 F7
85: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 25 00 F7
86: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 26 00 F7
87: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 27 00 F7
88: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 28 00 F7
89: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 29 00 F7
90: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 2A 00 F7
91: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 2B 00 F7
92: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 2C 00 F7
93: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 2D 00 F7
94: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 2E 00 F7
95: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 2F 00 F7
96: MIDI IN [Bome MIDI Translator Virtual In]: F0 18 0F 01 55 01 02 10 06 30 00 F7
Attachments:
Steve-Bome Forum Moderator
2018-11-24 20:22:55
Looking at the manual, this would be my best guess. But to me it is a bit confusing.
First I convert per your statement of qq=qq-64
Then I think we need to scale it from 0-127 to 0-100
Then we need to put the high bit in MSB.
Then strip the high bit and put it into LSB.
Let me know if this works.
Attachments:
sarguzeen
2018-11-24 20:23:31
comment
Looks like (from attached text file) it some way upside down…
MSB have only two values – CC from 1 to 64 = MSB 127
CC from 65 to 127 = MSB 0…
LSB goes – CC from 1 to 64 = LSB 81 to 127
CC from 65 to 127 = LSB 0 to 80…
How to make it in the rules???
Steve-Bome Forum Moderator
2018-11-24 20:32:21
comment
Just looked at your output. My file is wrong, I will have to look more carefully to determine how negative values are interpreted and get back to you later.
sarguzeen
2018-11-24 22:15:33
Yes!!!
I did it.
Rules:
- yy=qq-64
ss=yy+127
tt=yy%64
if qq<=64 then pp=127
if qq>=65 then pp=0
if qq<=64 then rr=ss
if qq>=65 then rr=tt
Output:
- f0 18 0f 7f 55 01 02 10 06 rr pp F7
It works, but it’s only beginning…
I really wold like to reduce midi traffic twice by executing “Step Select” only once per translation.
Steve-Bome Forum Moderator
2018-11-24 23:15:53
comment
Good job, I’m still struggling with how they are internally calculating negative numbers.
Be careful with what you have though yy is actually a global variable. Anything starting g-n and y-z even though it is double y of same character.
Only letters starting with o-x are local.
Also if the output values range is -52 to +48 then that is 101 output range (0-100) from a 128 input range 0-127. So you might want to apply some scaling.
If you want to reduce MIDI traffic, you can have the knob turn launch a timer that only fires the output after a given delay.
Steve-Bome Forum Moderator
2018-11-25 00:56:12
I think this is what you will want given a certain input CC with qq value of 0-127
// Scale it yp 0-100
qq=qq*101
qq=qq/127
// At this point it will be 0-100 on output
// We want to convert from -52 to + 48
// Offset
// Default MSB
tt=0
// Offset
rr=qq-52
// Set MSB
if rr<0 then tt=127
// Strip bit 7 on LSB
rr=rr&127
Output:f0 18 0f 7f 55 01 02 10 06 rr tt F7
I used 7f for device ID but if it is 01 you can use this. The above is default for all attached devices that recognize that Sysex.
Steve-Bome Forum Moderator
2018-11-25 15:00:37
comment
Yeah, your log file steered me in the right direction. They have a very odd way of representing negative values in Sysex. Anything negative has MSB 7F in the LSB.
I would have thought they would either only use the high bit of the MSB or the low bit but not all bits.
Glad to have been of help!
Steve Caldwell
Bome Q and A Moderator and
Independent Bome Consultant/Specialist
bome@sniz.biz
Steve-Bome Forum Moderator
2018-11-26 16:03:50
comment
If this is working, could you please mark it as resolved?