> teletype : code exchange

yes with some sort of random / probability thrown in - when i saw the video i instantly thought Teletype triggered by Meadowphysics to an er301. I think the gate lengths have a rhythmic element, they are just not totally random, theres some magic code there.

You could set the gate lengths based on multiplying/dividing the clock speed in milliseconds…

yes, thats a good idea. Thinking in modular world, i think this maybe could be done with a uLFO or any lfo / oscillator with cv control of pulse wave modulation of a square wave. Add a negative offset and hit it with a trigger whilst CV’ing the PWM at the same time

1 Like

you can also do it with Maths https://www.muffwiggler.com/forum/viewtopic.php?t=71382&sid=97c606a30e511af04f39486cf7e69ff5

So, given the current firmware, and telex abilities, what is the most elegant and efficient/accurate way of setting ratcheting output based on incoming cocked triggers?

As in: I feed one of the inputs a clock, and I have TT produce script controllable ratchet/clock variations?

What are your best, tried and reliable approaches to that?

the scene discussed here is my best attempt so far. its not great because it eats up several scripts and variables. somewhere in a thread here recently, someone mentioned that there is a ratcheting op planned for a future firmware. I hope it comes along sooner than later because a simple syntax for ratchets would be incredibly useful.

Right: I made some pitches for that long time ago, but wanted to check in again since there was a lot of development happening, and I was not sure if I missed some progress on this front. Especially thinking of all the work done by @scanner_darkly and @sliderule!

I’m working on a scene where pattern 0 is populated by random values selected from either pattern 1, 2, or 3. (Just now it’s mainly an exercise - I’ll let you know how musically useful it is once I get it to work. :slight_smile: )

First I tried stepping through patterns 1,2,3 using the O variable to specify the pattern, and that worked. Then I thought that it might be an idea to use the parameter knob to choose the pattern.

The best way I can find to do this (and bear with me because four hours ago, I didn’t know what bit-shifting was) is this:


This works, providing a value for Y that can then be used here:

L 0 7: PN 0 I PN Y RAND 16

the issue I have with this, though, is that possible values of Y, are 1,2,3 or 4. 4 is not a valid option, though, and so is (presumably?) simply ignored. This seems kind of clumsy. Is there a better way around this?

you could use scale to get the Param value.

Y SCALE 0 16383 0 4 PRM

The above would scale the param knob to values 0-3 and store it in Y.

1 Like

SCALE is perfick! :slight_smile:

1 Like

Hello Dears,
I’m experimenting driving Kria with Teletype. Actually I’m on Ansible 1.5.0 and Teletype 2.0. There’s a way to sync Kria pattern? I’m setting

M 960 (which is 60*16)

KR.RES 0 0

But the reset occurs at random steps in Kria pattern. Any idea can I do this?

I don’t think that is possible, but just wanted to check:

Can one copy/cut/paste more than one line of code at the same time?

LIke shift-select 2 or 3 lines, copy and paste them in a different script?

20 characters of not yet. :slight_smile:



It seems like it would be a great workflow addition.
I find myself often wishing for that.

(Similarly, being able to comment out more than one line at the same time).

I’m new to Teletype, working through the studies, and have been trying to write clocked melodic patterns with rests. I guess the closest thing would be an SH-101 style sequencer (but all values entered via teletype keyboard into the tracker). In the pattern editor/tracker, I create the melody with 0 as the root note and -1 as the rest, since negative values don’t work for note assignments (I think?) This is what I came up with, starting with the default 4Track scene as a starting point. I’ve added comments here for readability, perhaps somebody will find this useful.

(triggered by input 1)

P.N 0  // set the pattern to the first one in the tracker
A P.NEXT  // advance, get the next value in the pattern, assign to variable A
IF GTE A 0: CV 1 N A   // If that value is greater than or equal to 0, set CV 1
IF GTE A 0: TR.PULSE 1  // If that value is greater than or equal to 0, pulse corresponding trigger

You can then adapt it for input 2/pattern 2

P.N 1
IF GTE A 0: CV 2 N A

Experienced Teletype users, let me know if I’m doing this backwards or weirdly. :rofl: With the remaining lines, I’m thinking of adding some IF conditions to slew depending on the note.


Hi, just gettng started with programmin the teletype and have a question.

I was able to use the W (while) command to a loop as follows:

X 2000
W GT X 0 : SC.CV 1 X; X - X 5

is there any way to do a while loop that spans miltiple lines? Or made a line have more characters than fit on the screen?

I want to do something like this (doesnt work as line is too long)

X 2000
W GT X 0 : SC.CV 1 RRAND 1 16000; X - X 5


Loops can’t span multiple lines, but you can call another script from within the loop, so you can do something like:

X 2000
W GT X 0: $ 2

SC.CV 1 RRAND 1 16000
X - X 5

That worked perfectly, thanks x2mirko
(So essential script 2 is acting like a block or a gosub if it were basic :slight_smile: )

This plays the subroutine extremely quickly (CV is basically noise), so I wanted to add a slight delay in script 2

I tried to make the following change:

X 20
W GT X 0: $ 2

DEL 10 : SC.CV 1 RRAND 1 16000
X - X 1

Which I expected to play for approx 200ms, as I thought this would loop script 2, 20 times and script 2 would run for about 10ms due to the DEL 10.
But it only seems to execute script 2 once when I put the DEL command in…
Any idea why? It appears the DEL prevents it returning to the calling script.

There’s no “sleep” command. DEL only delays the execution of the following statement, but executes the rest of the script - so it will queue up SC.CV1 RRAND 1 16000 to be executed 10 ms later, but keep running through the loop very fast. You are right that if you add delay, there seems to be only one change. I’m not sure how exactly the delay-system works if you queue up a whole lot of commands really fast. But in any case, this will not work as you expected.

I don’t know if there’s any clever way around this. I think there isn’t.

It might be a better approach to figure out a way to create a burst of triggers and use that to trigger the teletype script that sets a random value. For example, if you want to do it synced to a clock, but only for a certain time after a trigger came in, you could patch the clock to trigger input 1 and then do:

IF X : SC.CV 1 VV RAND 1000

X 1
DEL 2000: X 0

That way, for 2 seconds after receiving a trigger on trigger input 2, you send out random values on each clock pulse incoming at trigger input 1. You could also use M as the clock source instead of relying on an external clock.

1 Like

Great, yes, looking at the problem a different way can often be the best solution!
(I am trying to get my head around the programming model of the teletype)
Thanks for the feedback