Global Variable Question

0
0

If a project file is loaded into a Bomebox, will the Bomebox retain a global variable if the power is always on?

Will it retain it if the power is shut off?

 

Marked as spam
Posted by (Q&A Forum: 7, Answers: 35)
January 9, 2019 9:57 pm
15 views
0
Private answer

Hi Steve,
Great information, as usual.

Is there a way to seed the global variables when the project opens but have it only run one time?

Let me see, you want it seed the variables on first time open but not if you later reopen the project again? Not without a little creativity. You might be able to do it on a Mac with AppleScript external program separate program the sets a global variable or an external program that sends MIDI data to set the global variable on first time open. The external program would need to have a method to determine if the project has been opened before and send different value depending on whether it has or not.  So in a nutshell, no not natively.

 

 

 

Another question: Is it possible to make a translation that runs when two buttons are run at the same time?

By this I assume simultaneous push of two different buttons. Yes, you would use two global variables, one for each translator,  and then have rules within each to validate that both variables are in the “button push” state, and if not, you would ignore outgoing action. The attached demonstrates this.  I use raw MIDI to reduce number of translators.

The first determines if it is a note on or note off message Note 0 on MIDI CH1. If it is, and the value is >0 then it sets global variable ga to 1.  It also looks for global variable gb (for the other button) and if not pressed, exits without executing the output note.

The second does the same but sets gb instead and looks if ga is pressed.  

Each translator outputs the same thing but only if both ga and gb > 0. Then the last of the two buttons pushed and held executes that translator outgoing action.

If you don’t like the rules involved in Raw MIDI, you could instead set this up with 4 translators (2 note on messages that set variables ga and gb and 2 note off messages the clear ga and gb). The translators for note-on would need to test for the global variables state and then execute.

 

Steve Caldwell
Bome Q and A Moderator and
Independent Bome Consultant/Specialist
bome@sniz.biz

Thanks
Steve

Marked as spam
Posted by (Q&A Forum: 35, Answers: 2542)
January 10, 2019 12:52 am
0
Private answer

Hi Steve,

Global variables will be retained as long as the project is running and the power is on.

If you restart the project, they go back to 0.

If you power off, then project is restarted when powered on and again they go back to 0.

If global variables need to be other than 0, I usually set them at project open under the rules of a translator I call “Init Global Variables” with no outgoing action. This will put the project in a known state.

Steve Caldwell
Bome Q and A Moderator and
Independent Bome Consultant/Specialist
bome@sniz.biz

Marked as spam
Posted by (Q&A Forum: 35, Answers: 2542)
January 9, 2019 10:47 pm

Hi Steve,
Great information, as usual.

Is there a way to seed the global variables when the project opens but have it only run one time?

Another question: Is it possible to make a translation that runs when two buttons are run at the same time?

Thanks
Steve

( at January 10, 2019 12:15 am)