Add Translator by Script?

Hello Bome Forum !

I have to add a huge amount of Translators. I just want to change scores. For Example C1 → D1 with velocity Variable.

Is it possible to do this with a script or in cmd or in a textfile or something like this ?

Thanks a lot !

He, yes of course. I do this all the time. The below is an example of a script.
I use raw MIDI so that I only need 1 translator that handles both note-on and note off messages.

Here is the entire set of rules:

// Check for note on/off messages only
if rr!=0x80 then exit rules, skip outgoing action

// If we arrive here it it is a note message.
// Now we modify the note number
// Lets just add 12 (1 octave)
// Make sure it never goes over max MIDI note of 127
if pp>127 then pp=127

I added a MIDI thru path to handle any messages that are not controlled by the translator.

And her is the project file:
Note-Manipulate-2021-09-10.bmtp (1.2 KB)

If you want to do more complex stuff by specific not number you would do something like this

// manipulate by note number
if pp==1 then tt=5
if pp==2 then tt=12
// note move it back to pp for output

Steve Caldwell
Bome Customer Care

Also available for paid consulting services:

Hey Mr. Caldwell !

I had do do it a little bit different…otherwise it would pass the whole chain…

But it works great with Sibelius and with some Python Stuff I translated all Scores super fast !

if pp==0 then p2=pp+9
if pp==0 then Goto “Ende”
if pp==2 then p2=pp+9
if pp==2 then Goto “Ende”
if pp==4 then p2=pp+8
if pp==4 then Goto “Ende”

Label “Ende”

Indeed this should be a bit more efficient, however I would use a local variable instead of a global one so you don’t have name collision if later you want to use p2

if pp==0 then rr=pp+9
if pp==0 then Goto “Ende”

There are 10 local variables:

oo,pp,qq,rr,ss,tt,uu,vv, ww and xx

Local variables can be used in different translators and will not affect the value of the other translators as long as they have differing incoming triggers.

Local variables are never set to anything unless you set them (either in the incoming trigger or rules).

Steve Caldwell
Bome Customer Care

Also available for paid consulting services:

Thanks ! Good to know !