Hi everyone, I hope this is the right Topic to explain that.
Well, I’m starting to understand the underlying logic, but yet I feel a bit uncomfortable on optimizing the scripts.
So, I’m here to you, to ask for a help on a Preset I’m working on, so that I can sink into the language of the beloved tt.
(Sorry if I will copy the preset by hand, but I need to practice… and sorry for my bad English too)
M:
T LAST 1 // takes into account the duration between the last triggers received by script 1 (external clock) and associates it to the variable T
M * T 2 // used to halve the tempo
EVERY RRAND 8 32: $ 2 // execute the script 2 in a random way
I:
L 1 4: TR.TIME I 1 // set the trigger outputs to 1 ms
L 2 3: PN.L I 64 // set the length of patterns 2 and 3 to 64 step
P.N 3 // set 3 as working pattern
L 0 63: P I 0 // set all the values of the working pattern 3 to 0
P.N 2 // set 2 as new working pattern
L 0 63: P I 0 // set all the values of the working pattern 2 to 0
So, every time I hit Fn10 I call a “full reset” of the patterns 3 and 4, that are used as trigger recorders
1: // executed via external clock (16th)
TR.P 1; J RRAND 0 6; $ 4; $ 3 // pulse out on trigger 1; set the J var; execute scripts 3 and 4
PROB 20: TR.TOG 1 // I don’t know if this is the correct way, but I’m trying to randomly toggle the value of the trigger output 1, anyway it’s working the right way listening to it
PROB 33: K 12
PROB 33: K 7
PROB 33: K 0 // I imagine, I know, this last three can be enclosed is a single line, but how?
CV 1 N.S K 1 J // generate CVs picked up from a natural minor scale but with random changes on root note and degrees
This is mainly used to quasi-randomly play a Plaits
2: // executed randomly by script M
J RRAND 4 32; K RRAND 8 15 // set the J and K vars
DEL.X J K: TR.P 1 // output random repetition of triggers on trigger output 1, kind of random ratcheting
3: // executed by script 1 (external clock, 16th)
P.N 2; T 1 // set 2 as working pattern; I forgot why I wrote T 1, wtf… :D
P.NEXT // go ahead on steps
IF EQ P.HERE 1: TR.P 3 // pulse on trigger 3 when the value of the step of the working pattern is 1, used to trigger an envelope generator
4: // executed by script 1 (external clock, 16th), everything as above, but on pattern 3 and trigger 4
P.N 3; T 1
P.NEXT
IF EQ P.HERE 1: TR.P 4
7: // executed on manual external trigger, write 1s on the pattern 2 and produce a pulse on trigger output 3
PN.HERE 2 1
TR.P 3
8 // same as above, but on pattern 3 and trigger output 4
PN.HERE 3 1
TR.P 4
This last two scripts are used as a triggers recorder for pattern 2 and 3
That’s all. Any idea on how optimizing this preset?
Thank you so much!