1 of 34

Teletype & Generative 201

Teletype basics,

probabilistic rhythm &

random sequences

2 of 34

I really didn’t want a computer in my eurorack

3 of 34

Powerful but limited

(and I like that)

4 of 34

Teletype has a very limited language

You can only have a small number of scripts/functions, and each has to fit onto a single screen.

Because of this, the entire language is built around being concise - to the point of incomprehensibility.

Each script is 6 lines x 40 characters max and you only get 10 of them per scene.

5 of 34

It is also a very confusing language

You can’t choose your own variable names or functions, and everything has abbreviated names.

It also uses “prefix notation”. Instead of “1 + 2”, you write “+ 1 2”

It is not very readable, but it all works to keep things concise enough to fit on a line.

IF EQ 0 % + + J 0 K 4: TR.P 1

6 of 34

But let’s start simple

7 of 34

A quick tour

Scenes & scripts

Outputting trigger/gate pulses

Outputting CV & slewing

Using probability

Clock dividing

Delaying an action

Interactivity

8 of 34

X:XX A quick tour

X:XX Live patching our target

X:XX BPM detection

X:XX Clock dividing

X:XX Gate probability

X:XX Ramp generation

9 of 34

A quick tour

Param

1

3

5

7

In

2

4

6

8

TR1

TR2

TR3

TR4

CV1

CV2

CV3

CV4

8 Trigger Inputs

10 of 34

A quick tour

Param

1

3

5

7

In

2

4

6

8

TR1

TR2

TR3

TR4

CV1

CV2

CV3

CV4

Dial for manual input

CV Input

11 of 34

A quick tour

Param

1

3

5

7

In

2

4

6

8

TR1

TR2

TR3

TR4

CV1

CV2

CV3

CV4

4 Trigger/gate outputs

12 of 34

A quick tour

Param

1

3

5

7

In

2

4

6

8

TR1

TR2

TR3

TR4

CV1

CV2

CV3

CV4

4 CV outputs

13 of 34

SCENES & SCRIPTS

14 of 34

Scenes are ‘applications’ that are made up of scripts & patterns

15 of 34

Scripts are the basic unit of code

Each Scene has 8 general purpose scripts (named 1-8)

A scene has an Init script (I) that is executed when the scene is loaded

Also a metronome script (M) that responds to an internal clock tick you can turn on and off

Each only has 6 lines max of 40 characters max

16 of 34

3 ways to run a script

An trigger coming into one of the trigger inputs will run the script with the same number (trigger 1 will run script 1)

You can run it from the keyboard: hitting F1 will run script 1. F9 will run the metronome script, F10 will run the init script

You can call it from inside the code with the SCRIPT command

17 of 34

Editing a script

Pressing the Alt key while hitting one of the function keys will take you to the editor for that script.

Alt-F1 will edit script 1. Alt-F9 will edit the metronome. Alt-F10 will edit the init script.

18 of 34

LIVE PATCHING

OUR TARGET

19 of 34

Probabilistic rhythm

Clock

Clock Out

Clock

Divider

Probability Gates

Clock In

Clock In

50%

25%

/2

To Drums

/8

20 of 34

Random sequences

Synth voice

Clock

Audio Out

Clock Out

Noise source

Quantizer

Trigger in

CV out

Output

To Mixer

Atten.

Output

Input

CV in

Trigger out

Trigger in

Pitch CV in

Probability Gates

Clock In

66%

Modulation

Filter cutoff

CV out

21 of 34

AND NOW AGAIN, �WITH CODE

22 of 34

Tempo/BPM detection

Script 1:

X LAST $�

LAST $ is time since last clock in milliseconds

X is one the variables, you can watch it in the variables display of Live Mode

X LAST $ means “X = time since last clock”

Plug clock into Trigger input 1 to run Script 1

23 of 34

Set tempo of the metronome

Live Mode:

M 246�

M is the time between clocks of the metronome

The value is the # of milliseconds between clocks

246ms = about 244 bpm

(but really it’s 122 bpm if the clock is 1/8th notes)

Executed when you type it in

24 of 34

Sync metronome to external clock

Script 1:

M LAST $�

Instead of setting the value to X, looking it up, and

manually setting the metronome to that speed, we can just set the metronome right from the clock tick arriving on trigger input 1

Plug clock into Trigger input 1 to run Script 1

25 of 34

Teletype as a probability gate

Script M:

PROB 50: TR.P 2�PROB 33: TR.P 3�

The M script runs each tick of the internal metronome

50% of the time, trigger output 2

33% of the time, trigger output 3

26 of 34

Move code around to organize & make room

Script M:

EVERY 2: SCRIPT 1

�Script 1:

TR.P 1�EVERY 4: TR.P 4�

Send a pulse on Trigger output 1 (very 2 ticks)

Script M is called on every metronome tick

Send a pulse on Trigger output 4 (every 4 times this script is called = every 8 ticks)

Every 2 ticks, call script 1

Script 1 is every two 2 ticks, so…

27 of 34

Use a CV output to act as another trigger

Script M:

PROB 66: SCRIPT 2

�Script 2:

CV 1 V 6

�DEL 150: CV 1 0

V 6 means “6 volts”

CV 1 V 6 means “Set CV 1 to 6 volts”

Script M is called on every metronome tick

Wait 150ms, then set CV 1 to 0 volts

66% of the time, call script 2

Script 2 is called 66% of the time

28 of 34

Selecting a random note

Script 2:

CV 1 V 6�DEL 200: CV 1 0��CV 2 N RAND 19

Use CV 1 to send a 200ms gate @ 6 volts

Script 2 is called on ⅔ of metronome ticks

RAND 19 choses a random number from 0-19��N translates from Note # to v/oct voltage levels�

N RAND 19 means “a random note over 19 semitones” (an octave & a fifth)

29 of 34

Save a line with a semicolon

Script 2:

CV 1 V 6; CV 2 N RAND 19�DEL 200: CV 1 0�

Set the note and turn on the gate in one line

Script 2 is called on ⅔ of metronome ticks

Turn off the gate 200ms later

30 of 34

Use a CV out to generate a ramp

Script 3:

CV.SLEW 3 4000

CV 3 V 7

DEL 4000: CV.SLEW 3 0; CV 3 0�

Set the slew time on CV 3 to 4000ms = 4 seconds

Script 3 will be run every 32 metronome ticks

Set the (target) voltage on CV 3 to 7 volts

Wait 4000ms, set the slew time to 0, set voltage to 0

31 of 34

Get used to the semicolon

Script 3:

CV.SLEW 3 4000; CV 3 V 7�DEL 4000: CV.SLEW 3 0; CV 3 0�

Set the voltage and slew time in one line

If you want to do two things after a delay (or probability, or clock division), you either have to call another script, or fit it in on one line with a semicolon

32 of 34

Add some physical control

Script I:

PARAM.SCALE 0 100

�Script M:

PROB PARAM: TR.P 2�

Set the range of the Param knob as 0-100 (good for probability)

The Init script runs when the scene is loaded

The M script runs on every metronome tick

Read the Param knob and use it to set the probability of the drum playing

33 of 34

The whole thing

Script I (init):

PARAM.SCALE 0 100�M 246; M.ACT 1���Script M (metronome):

EVERY 2: SCRIPT 1�PROB PARAM: TR.P 2�PROB 33: TR.P 3�PROB 66: SCRIPT 2��

Script 1:

TR.P 1�EVERY 4: TR.P 4�EVERY 32: SCRIPT 3��Script 2:

CV 1 V 6; CV 2 N RAND 19 �DEL 200: CV 1 0��

Script 3:

CV.SLEW 3 4000; CV 3 V 7 �DEL 4000: CV.SLEW 3 0; CV 3 0

34 of 34

THANKS FOR WATCHING!

(maybe press the subscribe thingy?)