Just starting out, a question about best practice/variables

Autogen

2009-08-19 02:13:26

Hi,

Just got MT the other day after hearing nothing but good things about it (plus Darren's excellent APC hack kind of tempted me to get it sooner rather than later).

I've started trying to mod the APC 40 to create a 32 step sequencer (well hopefully the number of steps will be adjustable in the future, but for now 32 will do). I have worked out the MIDI Note #s I need to trigger the pad lights, in order to have a visual metronome for the sequence (these are being driven by a MIDI loop within Live routed via MT back to the APC). Now I'm trying to set it up so when a pad is pressed this pad will stay illuminated until the pad is pressed again regardless of the MIDI note's being received.

I was thinking that variables might help with this, but this is literally my first day playing around with this and I'm not quite sure how to implement this functionality efficiently.

Could I set up a translator that listens for Note #s within a defined range, and once detected change their velocity to a specific value? (necessary as the APC interprets different velocity values as an instruction to illuminate different LEDs).

Also, I'm having trouble working out how I can go about making these pads act as toggles, in the sense that to achieve the visual metronome effect various MIDI notes are being passed from Live to the APC in a sequence of 16th notes which flash 32 pads green in succession. This means that when I press pad 1 it will toggle the LED on in the colour I define by the velocity (red), but when the sequence comes back around to that pad the LED flashes green again and is turned off as it passes. I thought that I might be able to create some sort of very short loop to continuously trigger the red LED when the pad is active, but then realised it might be more efficient to isolate the active pad from the sequence being input as the visual metronome instead... but then this leaves me with the problem that (ideally) I would like the active pad to flash back to the green metronome colour if the metronome passes this pad while it is active, before returning to red until the pad is deactivated by pushing it again. Are any of these approaches possible? I presume they all are, but any tips to get me pointed in the right direction are greatly appreciated.

Sorry for the rather longwinded post, but being new to MT, I'm finding it hard to be as concise as I would like.

joesapo

2009-08-25 22:25:08

Autogen wrote: Could I set up a translator that listens for Note #s within a defined range, and once detected change their velocity to a specific value? (necessary as the APC interprets different velocity values as an instruction to illuminate different LEDs
Exactly right. You would need to have a translator that not only has a variable specified for input velocity, but also a variable for the input *note* value.

Example;

Code: Select all

Translator 1: New Translator
Options: stop=false
Incoming: MIDI 90 oo pp 
Rules: 
  if ga==0 then exit rules, execute Outgoing Action
  if oo==30 then pp=127
Outgoing: MIDI 90 oo pp 
The translator above is listening for any and all 'Note On' messages on MIDI channel #1 (represented by the '90') regardless of their velocity range (which we have entered as the variable 'pp'). By entered the variable 'oo' as the input value in the note section of the MIDI message we have effectively told the translator that it will fire off any time any note is played on channel 1.

In the outgoing action section we're more or less retransmitting whatever the input values were. Without any rules in this translator, this would basically function as a MIDI thru connection, but only for note on events played on channel #1.

We *are* going to need some rules, thought...

Firstly, we're going to have the translator check for the variable 'ga' to see if it's a zero or not, and exit without doing anything if it is. Including this rule is a great way to 'shut off' a translator or set of translators. You can set up a shift button on your APC, or a keyboard button press, etc to alter the value of the global variable 'ga' and give yourself a way to turn the note illumination back off.

Next, you'll simply have to add a separate rule for each note that you're listening for, along with the LED state message you intend for it to receive.

Hope this helps!

joe