> teletype : code exchange

llllllll

#363

this script work fine for 3 pattern reset, and the cool thing is you can choose from where it reset :

P.N 0
P.I 0
DEL 1 : P.N 1
DEL 1 : P.I 3
DEL 2 : P.N 2
DEL 2 : P.I 10


#364

hi there !
Here a script for a kind sh 101 notes sequencer, it works like that :

IN :
T 1 : Keyboard gate
T 2 : M out of Walk (there’s is two mode in the script : record mode and play mode, a trigger is need the change this mode, so you can use anything else to change it…)
T 3 : Clock or Triggers to change the step of the sequence
CV Input : to your CV out keybord (like Pressure Points)

OUT :
A : Envelope gate
CV 1 : 1v/o in of a VCO or something else :smile:

In play mode you can still use the keyboard to transpose the sequence.

THE SCRIPT :

M
M 1
X QT IN N 1
IF Y : CV 1 X
ELSE : CV 1 A

I
TR.TIME 1 30
CV.OFF 1 N 0
CV.SLEW 1 0

1
P.N 0
IF Y : SCRIPT 5
IF Y : TR.PULSE 1
IF Y : B 0
IELSE : SCRIPT 6

2
TR.TOG 2
Y TR 2
P.N 0
IF Y ; P.L 0

3
IF Y : TR 3
ELSE : Z P.NEXT
IF Y : TR 3
ELSE : TR.PULSE 1
A ADD Z B

4
P.N 0
IF Y : P.PUSH X

5
DEL 100 : SCRIPT 4

5
DEL 50 : B X


#365

The problem i had here was the script run more fast than the cv input is reading.
so it would be great to delay the all script by himself and add delay to “IF X” too…

and the second problem i had was i can use only one “ELSE” after a “IF”. that’s in script 3 there’s two times the line : IF Y : TR 3
so, maybe i don’t understand correctly something, but i would be cool to have this kind of possibility :

IF Y= 1 : TR 3
IF Y= 0 : Z P.NEXT
IF Y= 0 : TR.PULSE 1

and third thing, i finally use this to quantize my input : X QT IN N 1
But when i read X, i don’t have a 0-127 numbers, but 0-16384 numbers. it would be helpfull to have it !

:wink:


#366

Hey there!!
not sure if someone already posted something similar.
I was thinking about a ratcheting script as simple as possible in order to involve less resources as possible.
Following script detects current external BPM and produces triggers at out A 4 times faster

T TIME
TIME 0
X T
Y DIV X 4
M Y

M.
TR.PULSE A

maybe there’s a smarter way to do this?


#367

well, you can simply combine all of those lines:

1.
    M DIV TIME 4
    TIME 0
M.
    TR.PULSE 1

done.

you can also use RSH 2 instead of DIV 4 but it’s a negligible optimization in this case


#368

So to clarify: the tracker itself is monophonic, right? As in, I can’t have cv 1 outputting a value from pattern 1 while cv 2 simultaneously outputs a value from pattern two


#369

yes you can!

e.g.
CV 1 PN 0 X
CV 2 PN 1 Y
(X is playhead of pattern 1, Y of pattern 2)

it’s just that the very convenient P. commands (I, PUSH, NEXT etc.) are only available for one current working pattern. e.g. if you wanted multiple different sequences running at the same time, you would need to use very precious lines for changing the working pattern (with P) or to maintain own playheads (+variables for those).

(it seems direct equivalents of these command for each pattern are coming very soon though!)


#370

i haven’t made any progress on finding that earthsea solution, but i have started a new thing: use incoming ansible/cycles gates, generated by spinning arc encoders, to send out a random note:

RAINCHIMES
1:
TR 1 IN
CV 1 N RRAND 12 24
TR.PULSE A TR 1

the ultimate goal is to send out a random note from a preprogrammed scale of allowed notes. i’m trying to use each individual arc encoder and ansible output to be associated with a different scale, to allow for chord changes in a song. but since MI Rings only has one pitch input, every scale note, regardless of which incoming trig hits the corresponding TT input, needs to go out only through CV 1.

this is tricky! but i’ve at least got a basic prototype in just 3 lines, so hopefully soon i’ll have figured out how to get notes cascading like splashing raindrops, or twisting windchimes.

for all you folks experienced with TT scripting: any ideas on setting up scales and assigning them to different trig inputs?


#371

Maybe try to use the tracker to generat notes in the scale you want :wink:


#372

that was my next plan; put notes in the tracker and advance the playhead to a random point.


#373

use the tracker, yes. keep track of your own playheads using variables A, B, C, D instead of the helper functions. @sam is working on a per-track playhead helper system, but that’s still in the works.

on each trigger:

advance playhead, wrap if needed
read value at playhead, convert it to note, output to cv


#374

Most elegant way to count to a specific number and repeat?

For example, currently some combination of these two commands:

x add x 1
x wrap x 1 8

I know O is a counter, and perhaps simplifies this a little, but is there a one-line technique?


#375

Modular arithmetic is your friend. So using your example:

X ADD 1 MOD X 8


#376

Hey, I did this in two lines by now - thanks!

I have to accommodate myself better to teletype syntax. Shall be my goal for 2017…


#377

Or without MOD, to stay between, eg, 3 & 9

X WRAP ADD X 1 3 9


#378

Me too. I never used scientific calculators in school, knew about RPN but none of my coding experience up to now made use of it. It fun, in a twisted sort of way. :wink:


#379

Well, shiver me timbers, that’s a bloody elegant solution! Thanks @GoneCaving !!!


#380

Is anyone using TT to control Kria?
That was my plan. I just updated firmware and got started with what I thought was pretty basic stuff, alas…

A KR.PAT
B RRAND SUB A 1 ADD A 2
IF EQ A 15 : KR.PAT 0
ELSE : KR.PAT B

This script is crashing (freezing) TT and Kria/Grid
It runs, as expected, for a while. Maybe a few minutes. Then freezes. The idea is for it to run indefinitely…
Please, somebody, point out the logical mistake I’ve missed… I haven’t worked with TT for maybe 18 months or so, so I’m certainly rusty!
The project I’m working towards has a deadline and it’s really soon…


#381

This also just crashed/froze.
It ran for 4 or 5 minutes and then TT froze. Kria/Grid didn’t freeze.
Not sure if I should be posting here or in the 1.3 thread?

A KR.PAT
B RRAND SUB A 1 ADD A 2
KR.PAT WRAP B 0 15


#382

I am sorry to hear about your deadline, that’s tedious when something is not working.

Apart from the experience that the new firmware updates are not working flawless in general in this case A might geht over 15 with a RRAND step by 2 at 14 and the freeze could occur when it reaches a value Kria can not handle anymore.

I just learned using MOD as an elegant way to keep values in a working range (it’s a few posts above yours in this thread). You could try this and monitor A too from time to time with the other script to check if this was the issue so it can be fixed.