Bome Software

Midi Translator Manual: Rules

>Home
>Products
 >Restorator
 >ReNovator
 >Midi Translator
 >- Classic
 >- Pro
 >- Author
 >- Player
 >- Compare
 >Download
 >Purchase
 >Screenshots
 >Manual
 >Usage Examples
 >Presets
 >Forums
 >Mailing List
 >Testimonials
 >Mouse Keyboard
 >SendSX
 >CS1x-Edit
 >Delphi components
 >Tools
 >More products
>Forums
>Search
>About
>Contact me

Translators - Outgoing

Help Contents

Reference

Contents

Rules and Variables Overview
Rule Types
Variable Types
Using Rules and Variables


Rules and Variables Overview

Translators are comprised of three main sections: incoming actions, outgoing actions, and rules. This part of the documentation covers Rules, how to use and to be related to Variables, and what they can be used for.

Rules are basically simplified programming steps that take data from the incoming actions, or global variables, and can affect what happens with the translator's outgoing action. Rules use variables to pass data back and forth between the incoming action and the outgoing action of a translator.

Rules are normally processed from top to bottom: the rule on the first line is processed first, followed by the second and so on. Rules can also use Labels and Jumps to direct programming flow. Existing rules can be moved up and down in the rules box by first selecting the rule, then clicking the 'Up' or 'Down' buttons next to the Rules list.

Variables can either be defined in an incoming action, or through the Rules section of a translator. Incoming actions defined with a varible as part of the action will pass the variable on to the rules section to be processed and potentially used as a global variable or passed on to the outgoing action.

         rules section of a translator



[back to top]

Rule Types

There are seven types of rules in Bomes MIDI Translator. Three of these rules (Assignment, Expression and Conditional) deal directly with variables, changing their values and operating off of of conditionals determined by variable values. Two of the rules (Jump and Label) are used for directing the flow of the rules programming, allowing you to make 'Functions' for complex rule sets. The other two rules (Exit Rules and Execute, Exit Rules and Ignore) are especially useful for conditionals, only enabling the outgoing action when a specific condition is met.

These seven rules are described in detail below:

  • Assignment(example: pp = 20, ga = oo)
  • This rule type allows a straight assignment of a variable's value to a specific number or another variable's value. The variable you wish to assign is chosen on the left side of the equation from a drop-down box, while the source value or variable is selected or entered on the right side. Assignment rules are useful for assigning an input local variable to a global variable. They can also be used for assigning a specific value to an outgoing action depending on a conditional.

  • Expression (example: pp = 30 + qq, h0 = 128 / oo)
  • Expression rules use basic arithmetic (plus:+,minus:-,multiply:*,divide:/) or binary operators (AND:&,OR:|,XOR:^) to enter a value into a variable. A variable is selected from a drop-down box on the left side of the equation, while the two variables and/or numbers and operator are selected on the right side of the equation. Expression rules are usefule for doing basic operators on incoming values to, for example, increase them or decrease them parametrically.

  • Conditional (example: IF pp = 10 THEN ..., IF gc >= xx THEN ...)
  • Conditional rules allow you to specify that a rule will ONLY execute if certain conditions are met. Conditional rules are constructed as follows:

    IF (value/variable) (==/!=/>=/<=/>/<) (value/variable) THEN

    If the preceding conditional is true, then one of the following actions is performed:

    • Assignment
    • Expression
    • Jump
    • Skip Next Rule
    • Skip Next 2 Rules
    • Exit Rules, Execute Outgoing Action
    • Exit Rules, Skip Outgoing Action

    Conditional Rules Operator Table
    == EQUALS (true example: IF 10 = 10 THEN)
    != DOES NOT EQUAL (true example: IF 10 != 45 THEN)
    >= GREATER THAN OR EQUAL TO (true example: IF 86 >= 45 THEN)
    <= LESS THAN OR EQUAL TO (true example: IF 34 <= 34 THEN)
    > GREATER THAN (true example: IF 10 > 4 THEN)
    < LESS THAN (true example: IF 24 < 80 THEN)



  • Jump (GOTO ...)
  • Redirects the processing of the rules to a 'Label' point. A Label name may be typed in directly, or an existing label jump destination may be picked from the drop-down box.

  • Label (jump destination)
  • This is the destination point in the rules processing that you would like a jump point to redirect to. Labels are useful for defining functions in your rules sets.

  • Exit Rules and execute Outgoing Action
  • This is a direct action. Upon processing this rule, the Translator will immediately stop processing the rules and execute the Translator's Outgoing Action. These rules are commonly found coupled with Conditional rules and Labels to create complex processing statements.

  • Exit Rules and ignore Outgoing Action
  • Like the prior rule, this is a direct action. This rule will immediately stop processing the rules set, but will NOT execute the outgoing action. This is useful for making Translators that ONLY execute when certain conditions are met.


[back to top]

Variable Types

There are two main types of variables in Bomes MIDI Translator: Local variables and Global variables. Variables can be set either with incoming actions or with rules. Once set, a Local variable may be used for the duration of an active Translator, losing it's value once the Translator has finished processing. A Global variable, however, will retain it's value as long as Bomes MIDI Translator is running.

  • Local Variables
  • Local Variables are defined by character combinations in the following range: oo-xx (example: pp, ss, ww, etc...). Local variables retain their value as long as the Translator is processing. Local variables are normally the most commonly used variables, and are useful for holding temporary values. Local variables can be used in incoming actions to pass, for example, a continuous controller value to the Rules section of a Translator, where it can then be processed and resent to the outgoing action.
  • Global Variables
  • Global variables are defined by character combinations in the following ranges: ga-gz, g0-g9, ha-hz, h0-h9 (example: h4, gd, g0, hb). Global variables retain their value indefinately. Global variables are useful for passing information between translators. One common use of global variables is to create a 'Shift' button on your controller, which can then control which translators are processed depending on the state of the shift control. Another common use of global variables is to 'Hold' a controller's value while a timer is running, allowing you to re-send that value when the timer is done processing.


[back to top]

Using Rules and Variables

One of the most useful way to use Rules and Variables in your Translator settings is in the translation of a velocity or cc value to another value. Variables may utilized in the mapping of an incoming MIDI action in a translator by changing the last value to a variable setting instead of a static value. Variables may be used in both incoming and outgoing translator actions, allowing values input into translators to be processed, and then sent on to the outgoing MIDI port while retaining full routing flexibility.



Sample Incoming MIDI Actions
  • BF 29 oo
  • This Incoming MIDI event will activate our translator on ANY value of the control BF 29 (MIDI Channel 16, Control 41), and then pass the velocity or continous control value on to the rules section of the translator for processing.
  • BF xx oo
  • This Incoming MIDI event will activate the associated translator on ANY activity on MIDI channel 16, for ANY controller. Rules like this are useful for effecting a whole controller range on a MIDI channel, such as changing the velocity of a whole keyboard layout.
Sample Outgoing MIDI Actions
  • ga 29 xx
  • This Outgoing MIDI event will output the 'xx' value (most of the time, this will be a value calculated in the translator's rules section) on the 41 controller on MIDI channel 'ga'. In this example, the 'ga' variable can be predetermined by another translator, or tied to another MIDI control processed by Bomes MIDI Translator. For example, the 'ga' variable can be set by a knob on your MIDI controller, giving you the capability to select which MIDI channel the translator is actually transmitting to in real-time.

[back to top]



Translators - Outgoing

Help Contents

Reference
 
(c) 1997-2008 by Bome Software
Last modified on February 8th 2008