I have created a channel by channel translator and wish to (whilst the translator is running) create a "for next loop?) to infinitely blink one of the buttons on and off until the translator changed.
The [TRACK SELECTION] button resides at 0x33 so:
<CHANNEL No / 90 … 97> 33 xx reads the button press (on APC40), and
<CHANNEL No / 90 … 97> 33 7F (to APC40) will illuminate it
<CHANNEL No / 90 … 97> 33 00 (to APC40) to switch off.
Is it possible to set this blinking into a single translator?
Hi,
Here is an example.
The Init preset handles normal housekeeping including initializing global variables and the APC40 MKII to mode 2.
The Working preset handles clearing old LED’s and starting the blink timer.
The LED Feedback preset has the Blink Channel Timer
Global variables used
ga=which channel to blink
gb = blink toggle state (0 or 1)
gc = time in milliseconds to blink the target LED.
When the incoming message of 9x 33 7f comes in the value of ga is set to the current MIDI channel x. The LED’s are all cleared and the blink timer starts.
The always repeating blink timer toggles the state of gb and sets the note message to the currently active outgoing MIDI channel ga.
I’m taking another look at the above code, and would like to have an alternative version where it blinks two colours utilising two global variables holding their respective colours AND a four colour blink as well.
It is a case of staggering up to 4 timers within one translator or is it going to work best with 4 translators handling each colour variable with a staggered timer?
Hi, the example I posted is just for the channel buttons that only have 2 colors. You can set up a single timer to blink multiple color if you would like. Just set a value to 0-3 and then rules like this
ga=ga+1
if ga==4 then ga=0
// color 1
if ga==0 then pp=12
// color 2
if ga==1 then pp=24
// color 3
if ga==2 then pp =65
// color 4
if ga==3 then pp= 127
// rr is the note number you want to blink
// assuming you are onl the main grid of an APC40 MKII
Outgoing: 90 rr pp
Steve Caldwell
Bome Customer Care
Also available for paid consulting services: bome@sniz.biz