metastatik
2008-02-27 17:15:14
So I’ve built a couple step sequencers with MT Author and they work great. The one I’m working on right now is a 16 step modulation sequencer. Each step sends out the same CC just with different values and I can adjust these values with an encoder.
I have MT receiving MIDI clock from Live like so…
Here’s an example of the first 2 steps…
The gu and gv variables are set by pads on my controller. Basically used as on/off switch for each step.
This all works well, but I’d like to have the option of smoothing the transition between each step. So instead of jumping from the ge value to the gf value, it fades between the two.
I can sort of do this, but it’s dependent upon the difference in value between 2 steps. Here’s an example of the 2 sub-steps between Step 1 and 2. The hz variable is used to turn smoothing on or off.
The problem there is that if the difference between ge and gf is less than 5, the pp/5 calculation will result in 0. This isn’t a major deal, but the sequencer can run at 4 speeds; 1/4, 1/8, 1/16 and 1/32. At 1/16th notes, there are 6 clicks per step (5 clicks in between in step). At ¼ notes, there are 24 clicks per step (23 between each step). So for ¼ notes, I’d be using pp/23, which won’t work if the difference between ge and gf is less than 23. More often than not, the difference between 2 steps will be much less than 23.
Any ideas on how I could handle this differently? Thanks in advance for any insight.
I have MT receiving MIDI clock from Live like so…
Code: Select all
Translator 3: Timing1/16th(GA)
Options: stop=false
Incoming: MIDI f8
Rules:
ga=1+ga
if ga>96 then ga=1
Outgoing: (none)
Code: Select all
Translator 1: Step1
Options: stop=false
Incoming: MIDI f8
Rules:
if ga!=1 then exit rules, skip Outgoing Action
if gu<1 then exit rules, skip Outgoing Action
Outgoing: MIDI b0 37 ge
Translator 4: Step2
Options: stop=false
Incoming: MIDI f8
Rules:
if ga!=7 then exit rules, skip Outgoing Action
if gv<1 then exit rules, skip Outgoing Action
Outgoing: MIDI b0 37 gf
This all works well, but I’d like to have the option of smoothing the transition between each step. So instead of jumping from the ge value to the gf value, it fades between the two.
I can sort of do this, but it’s dependent upon the difference in value between 2 steps. Here’s an example of the 2 sub-steps between Step 1 and 2. The hz variable is used to turn smoothing on or off.
Code: Select all
Translator 2: Step1a
Options: stop=false
Incoming: MIDI f8
Rules:
if hz<1 then exit rules, skip Outgoing Action
if ga!=2 then exit rules, skip Outgoing Action
if gu<1 then exit rules, skip Outgoing Action
if ge>gf then pp=ge-gf
if ge>gf then qq=pp/5
if ge>gf then hc=ge-qq
if ge<gf then pp=gf-ge
if ge<gf then qq=pp/5
if ge<gf then hc=ge+qq
Outgoing: MIDI b0 37 hc
Translator 3: Step1b
Options: stop=false
Incoming: MIDI f8
Rules:
if hz<1 then exit rules, skip Outgoing Action
if ga<3 then exit rules, skip Outgoing Action
if ga>6 then exit rules, skip Outgoing Action
if gu<1 then exit rules, skip Outgoing Action
if ge>gf then pp=ge-gf
if ge>gf then qq=pp/5
if ge>gf then hc=hc-qq
if ge<gf then pp=gf-ge
if ge<gf then qq=pp/5
if ge<gf then hc=hc+qq
Outgoing: MIDI b0 37 hc
Any ideas on how I could handle this differently? Thanks in advance for any insight.