I am very pleased with how versatile the Bome MIDI Translator is 🙂
I’m doing my first preset with conditionals. My question is how to label a subroutine?
I have a conditional that if met calls for a Jump (goto) to a subroutine called “or1.” I’m used to programing in basic where I would have a line “or1,” and all the programming steps after, with a return or a Jump at the end.
Is it the same in Bome MIDI Translator? Do you have a specific label or just name the first step “or1?” Should every translation be named “or1?”
If you could post a short example with a subroutine it would be greatly appreciated.
Marked as spam
I’m not exactly clear. It looks, to me, that the “routine” is part of rules. I want to call a “routine” as part of my translations.
Do I just put in a translation called Label “routine?” Or just “routine.” followed by my translations for that conditional? I have a translation; “if l1==2 then goto “or2.” I put in a translation called “or2return” Jump back to. Can this be done like this?…
Marked as spam
Hi, Each translator has it’s own rules and label. They are not shared between translators.
If you are thinking of something like a “subroutine” that any translator can call and are shared, then this is not implemented in Bome MIDI translator.
Any communications between translators needs to be done by means of global variables. For instance, you can set a global variable in one translator and then trigger a timer with rules to manipulate the variables (kind of like a function call). When the rules complete in the timer, you could then trigger another event to indicate that the timer function has completed. The final event triggered could then look at the global variable results. It is a bit clunky to do things this way so perhaps if you can give me an idea on what you are doing, I can recommend a more efficient way.
Having globally available function calls has been requested in the past so a future release might having something like this.
Hi Steve – I’m not always clear on the names used in BMT.
I have a single preset with all the translations on the same page. What I need to do is branch of from a translation on a conditional to co to a series of translations then return to the original translation.
Below is part of the translation copied from the preset”
[x] Translator 1.26: Orville1 if2
[x] Translator 1.27: Orville1 if3
[x] Translator 1.28: Orville1 if5
[x] Translator 1.29: o2return
[x] Translator 1.30: Orville1 set
Could you give me an idea on what the routines 8k1, 8k2 and or2 would actually do be for returning to o2return? I assume when youa re done you always want to set i1 back to value of 4. I further assume 1.30 would always execute.
More than likely you will want to have a single rule to trigger a timer and then have the timer perform the necessary actions based on the value of i1.
Like minds, I was just reading the 0ms timer sections in the manual.
My issue is that I need to do the conditional translations before I do the main translation:
Its complicated but I am switching MIDI ID#s. The Eventides, in order for the MIDI and Serial ports to both operate they both have to be ID# 1. So, what I am doing is finding the last of the 4 units to be changed to ID# 1 and changing it to its real ID# e.g. 4, then and only then I change the new selected unit e.g. ID# to to ID#1.
Would it work if I send a conditional to a 0ms timer below the conditional and at the end of the conditional I create a return timer to get the pointer? back to just below the conditional?…
I should ask: Can a raw system exclusive MIDI message be sent from “Rules?”
Yes, you have a single input that should handle all of the conditionals in rules within one translator and the output to a timer that can do the clean up work when you are done and then send the desired output message if desired.
Great! I don’t follow how to do it e.g. how do I send a raw MIDI message “F0 1C 70 01 01 0F 0F 0F 07 0F 0F 0F 0F F7” from rules?
If that can be done there would there still be a need for a 0ms timer?…s
Hi, rules are rules, output is output.
Or … Can timers be used to “goto” and “return” from a “subroutine?”
No, goto is only within the given translator.
Could you provide a generic flow of what you are trying to accomplish? I assume you want different output depending on the value of i1. In that case you can do something like this.
I think I got it to work but I have to do the full programing in order to test. It’s a lot of translations, 3x9x4, whew!
What seems to be working is to put the first set of translations as conditionals (if l1==x then …) for each of the 9 steps (translations) for each condition of “l1.”
Thankfully I can cut and paste between Project Files. I set up a project file to build and test each module, but I won’t know if it is working until I run it on the whole system.
Thanks for the help…s
Steve – is there a limit as to the size of a project file?…s
I don’t think so. I’ve never found a limit. Maybe based by the amount of memory on the platform it is running on.
How big of a project can the BomeBox take?…
16 MB I think is the max. I don’t think I’ve every seen a project even to 1MB.
Hi, and thanks for the good words.
These are not really subroutines per-se. When you jump to a label after done, execution will not return to the caller so if you want it to return you have to jump back to the original spot.
Here is an example
//… do some stuff
label “return 1”
//.. do more stuff
//… do other stuff
// do routine
if ga== 1 then goto “return1”
if ga==2 then goto “return2”
// default would be to continue flow after routine.
Marked as spam
Please log in to post a topic
(this is your bome account, not the old forum account):.