Not sure if this is a request or just a question.
Let’s assume you have 2 patterns on track 1 in kria. Let’s assume you’re clocking that track with Teletype’s metronome script. Now let’s say you want to issue a Teletype command to switch patterns in kria, currently playing pattern 0.
will switch from pattern 0 to 1, but it will do it immediately, or possibly it is switching on the next tick of the internal clock - I can’t quite tell. You can evaluate the current pattern length and position to achieve a pattern switch at the end of the pattern.
Something like this, for example:
M KR.CLK 1 X KR.POS 1 1 Y - KR.L.LEN 1 1 1 IF EQ X Y: KR.PAT TOSS
will wait until the end of the current pattern, from the perspective of the trigger parameter’s length.
This is a lot of script lines though, and due to the length of the conditional line, takes a couple of variables. Is there any kind of function to cue the pattern to switch when the current pattern ends? Looking for something like a
Or is there a shorter way to write the code?