Hi, let me see if I can tackle your questions.
1 – About input and output, what’s the best practice? Should I set them in the Project Default tab and then check Project Default Ports in every Preset where I don’t need to change them?
SJC> I generally set any ports that I will be using at the project level. That way they will not open or close themselves as presets are enable and disabled during the project. The exception would be that you WANT to enable and disable ports (allowing other applications to use them. On Windows, only one application can own a MIDI port at a time.
Where I should create aliases, at the Project or Preset level?
SJC> Alias are always defined at the project level, no matter where you create them.
And also, what could go wrong when switching OFF an existing alias and ON another one, when both aliases are pointing to the same port? I would expect that not causing anything, but instead in the Log Window I read [port closed] at the end of every Outgoing message. Seems strange. Note that I have all Translators working with Project/Preset Default Ports checked. I was just trying to tidy up the project and remove inconsistencies cause my head is already overloaded when working in Bome :_)
SJC> If you open 2 aliases that are pointing to the same physical port and you send to both aliases, you will get duplicate messages sent to the same physical port.
Also if you have 2 input aliases tied to the same physical port and the you get something twice, you will see duplicate incoming message.
I generally manage ports at the preset level to reduce having to change 100s or 1000s of translators. I seldom use translator level inputs and outputs for the same reason.
2 – Do the order of Presets matter? Meaning are they processed in order? And what about Translators order?
Which leads me to..
SJC> Yes they go from top to bottom, from first preset then through translators under that, then next preset. This is described at some detail in the documentation (F1)
The exception is translators that use incoming timers which are processed based on the time you set.
3 – Where should I create global variables? Does it matter at all where?
SJC> I usually put them under a Preset at the top that I call "Init". On project open, I call a one shot timer also called "Init". Then I create translators with incoming trigger of timer "init". Each translator does a different action. I usually have one called "Initialize Global Variables". I document and initialize all project global variables there in alphabetical order. If I need a new global variable. I look there and document and create the next unused one.
And also, I have 5 main midi channels that are used throughout my controller. I thought: it could be better to define them as global variables in case I want to switch all translators from one to another (channel). Is it stupid?
SJC> No, I often assign global variables as channels. That way if things change, I can change just a few global variables and maybe no translators.
And another silly doubt that I have is: when I use a global variable to assign a certain number to a local variable in Incoming and then that local variable is changed value in Outgoing, does my global var change value too? (I think not, but I’m not sure).
SJC> I usually copy global variables into local variables within a translator at the beginning and then put them back if changed at the end. You need to be careful not to have different translators changing the same global variable (especially when using timers in which things can happen asynchronously).
With that said, there are only 10 local variables oo-yy, so sometimes I have to just use the globals within the translator.
The other value of copying globals into locals in a translator is that you can make translators more generic with locals and just change a few lines at the top and bottom of the rules for the differences.
Steve Caldwell
Bome Q and A Moderator and
Independent Bome Consultant/Specialist
bome@sniz.biz