cc to note creating zones?

soapdodger

2007-11-04 10:21:35

Firstly thanks for writing this app, its just what I need for my controllers.

I'm building a gesture controller using one of Ladyada's midisense boards.

I've used MT to convert incoming cc's to note ons. I've used a variable to vary the note according to the cc value.

What I'm trying to program using the rules is a way of say having cc 0 - 30 output one note and 31-60 another.

Is it also possible to have MT set up so that it will not output a note until the note value has changed? so if it receives a value of 0-30 it will output a note but not output a note again until the value is in another zone or has returned 127 beforehand.

I intend to use a proximty sensor to generate the cc. I want the controller to trigger a note when the beam is broken, the value of the note would correspond to the distance

I've used this to try and create the zones :

if ga <30 goto 10
label "10"
if ga >60 exit rules skip outgoing
if ga <60 exit rules execute outgoing

Something is wrong here, I havent done anything like this since the 80s!

florian

2007-11-07 11:27:25

Hi Soapdodger,

in some regards, this is indeed the 80s :) I may add, though, a tad more comfortable...

Anyway, yes, I think your task can easily be done with MT Pro.

Because it seemed fun, I created a complete set. It does this:
- turning in the range 0-30 will start note 0x40 (decimal 64)
- if a different note than 0x40 is playing, it is turned off first
- if another controller message in this range comes in, it is ignored

The same goes for ranges 31...60 (play note 0x41), etc.
Value 127 (controller max) will turn off whatever note is playing.

In the following translator preset, I use ga as global variable to remember which note is currently playing.
The first rule set is commented (with Labels). The following rule sets are not commented anymore.

Code: Select all

Translator 1: range 0..30: play note 0x40
Options: stop=false
Incoming: MIDI B0 4A pp 
Rules: 
  if pp>30 then exit rules, skip Outgoing Action
  qq=64
  Label "Don't retrigger note if already playing"
  if ga==qq then exit rules, skip Outgoing Action
  Label "Remember the note to turn off"
  tt=ga
  Label "New note to turn on as global variable"
  ga=qq
Outgoing: MIDI 90 tt 00 90 ga 7F 

Translator 2: range 31..60: play note 0x41
Options: stop=false
Incoming: MIDI B0 4A pp 
Rules: 
  if pp<31 then exit rules, skip Outgoing Action
  if pp>60 then exit rules, skip Outgoing Action
  qq=65
  if ga==qq then exit rules, skip Outgoing Action
  tt=ga
  ga=qq
Outgoing: MIDI 90 tt 00 90 ga 7F 

Translator 3: range 61..90: play note 0x42
Options: stop=false
Incoming: MIDI B0 4A pp 
Rules: 
  if pp<61 then exit rules, skip Outgoing Action
  if pp>90 then exit rules, skip Outgoing Action
  qq=66
  if ga==qq then exit rules, skip Outgoing Action
  tt=ga
  ga=qq
Outgoing: MIDI 90 tt 00 90 ga 7F 

Translator 4: range 91..126: play note 0x43
Options: stop=false
Incoming: MIDI B0 4A pp 
Rules: 
  if pp<91 then exit rules, skip Outgoing Action
  if pp>126 then exit rules, skip Outgoing Action
  qq=67
  if ga==qq then exit rules, skip Outgoing Action
  tt=ga
  ga=qq
Outgoing: MIDI 90 tt 00 90 ga 7F 

Translator 5: Value 127: stop the current note
Options: stop=false
Incoming: MIDI B0 4A pp 
Rules: 
  if pp!=127 then exit rules, skip Outgoing Action
  tt=ga
  ga=0
Outgoing: MIDI 90 tt 00 
In detail:
pp is initialized in the Incoming Trigger with the value of controller 0x4A (replace with your controller). The first rule(s) test for the range of the controller. If it's outside the range, this Translator Entry is ignored (and the next Translator Entry in the preset will be inspected).
If the range is OK, a variable qq is set to the note that should be played.
If qq equals ga, it means that this note is already playing, so we exit this Translator Entry.
Otherwise it means that currently a different note ga is playing and we need to turn it off. We set the variable tt to the currently playing note. Then we set ga to the new note, so that the next time a controller message comes in, we know which note is currently playing.
Finally, the Outgoing Action is executed: first "90 tt 00" which means to turn off note tt (which is the old value of ga, i.e. the currently sounding note), followed by "90 ga 7F", i.e. turn on the new note with full velocity.

It's important to uncheck "stop processing" for all Translator Entries, because you want all Translator Entries to be processed, even though they have the same Incoming Action.

As you see, the Translator Entries are almost identical, except for the first rules. And it would be possible to put all that into one Translator Entry with a long list of rules. But the above should be "easier" to understand, for a start.

Regards,
Florian

Kimotei

2008-03-31 21:08:37

Hello Florian!

Im thinking about purchasing MT pro, though need to figure out if I can do this on my midi keyboard:

range C-2 to B-1 output only C-2
range F#0 to B1 output only C1
range F#2 to B3 output only C3
range F#4 to B5 output only C5
range F#6 to B7 output only C7


The purpose for this is to make splits for Ableton Live.
On my midi keyboard I can have layers of midi channels, but they all output to the same tuning. On midi CH 1 I want this above configutarion. On midi CH 2 I just want to output normal notes. CH1 will select a spesific vst in ableton. CH 2 will trigger midi sequences (clips) in Live.
So id like to do almost what Soapdodger wants! I need these notes to output only once, and not change a thing until one of the others are triggered! This way youll get splits of synths on your keyboard, but more importantly all the pots on the midi keyboard will change to the synth you are playing.


Best,
Kim

florian

2008-03-31 22:51:16

Hi Kimotei,

I think Joe fully answered this in the other thread, right?

Regards,
Florian

Kimotei

2008-03-31 23:15:58

florian wrote:Hi Kimotei,

I think Joe fully answered this in the other thread, right?

Regards,
Florian
Probably! Ill dive into the demo right away, and try it out! ;-)

PS. will I be able to save my presets? If I decide to purcase it, could be nice to keep the work!

Kimotei

2008-04-01 00:03:18

seems like it yes..