Can’t seem to get the USB export to work, tried 2 different flash drives. Might have a go at debugging it at some point. You can see all the scripts used in the first 20 seconds of the video, I can try and explain them in detail if needed.


The “Turing Machine” implements an old but not usual algorithm based on a binary shift register, similar versions exist in the Noisering and the Buchla SoU, there is a good write up in it’s documentation.

Basically take a sequence of binary digits, rotate them on each clock pulse, and sometimes flip a bit. Convert the binary to decimal and output it as a voltage, the Turing Machine and it’s ilk do this in the analogue domain, they have their roots in analogue computing (as does all of our modular stuff…). It’s not that unrelated to the Orca algorithm.

E.g.

T = 0       : 00000001 = 1
T = 1       : 00000010 = 2
T = 2       : 00000100 = 4
T = 3 + flip: 00001001 = 9

You usually have non-deterministic control over whether the bit flips, so in effect you get an 8 step (for 8 bits) repeating sequence with a probability of the sequence evolving, if you keep the probability low then you end up with a slowly evolving sequence, it end ups being very musically, especially given the simplicity of the algorithm.

You can just about express the whole algorithm in a single Teletype script, first the setup:

P.N 0
P.START 0
P.L 8
L 0 7 : P I TOSS

i.e. set the pattern 0, to a length of 8, with randomised 0s and 1s.

Now for the script:

P.N 0
PROB 5 : P.PUSH EZ P.POP
P.INS 0 P.POP
X 0
L 0 4 : X ADD X LSH P I I
CV 1 N X

Use the same trigger for the script to trigger your envelope.

Breaking it down:

  • P.N 0
    make sure we’re on pattern 0
  • PROB 5 : P.PUSH EZ P.POP
    with a small probability, flip the last bit. A probability of 0 doesn’t flip any bits, but non-intuitively a probability of 100 doesn’t lead to a random sequence, instead, because we are flipping bits, it doubles the length of the sequence. A probability of 50 results in a random sequence.
  • P.INS 0 P.POP
    rotate the bits (you can see this happening in the video on the tracker screen)
  • X 0
    L 0 4 : X ADD X LSH P I I
    this is the ‘cool’ bit, it’s a binary to decimal converter. In this case we’re only using the first 5 bits (= values between 0 and 31)
  • CV 1 N X
    Output a note. Alternatively you can use the X value as an index into a scale, which is what I do in the video.
  • View the tracker screen to see the bits rotate, hit the spacebar to manually flip the bit under the cursor.

The great thing about the Teletype is that it lets you easily fiddle with the algorithm, maybe you want to generate a second sequence related to the first somehow (maybe L 4 0 : X ADD X LSH P I I…?). Lots of possibilities.

13 Likes

Cant wait to try this thanks a million… I always wanted to try the turing machine i had no idea i could get my teletype to be one! Awesome module!

1 Like

So the reference scale you have on pattern 4. Does that only need to up to 31? Or am i mis-understanding. Also what you using script 7 for in the video if you dont mind my asking?

1 Like

That’s right, there are 32 entries in pattern 4 (i.e. 0 to 31), it’s a 6 note scale (heptatonic?) that I just typed in, you can see the first 6 notes and deduce the rest.

In reverse order…

Script 8, rotates, does the binary to decimal conversion and then looks up the note in pattern 4.

Script 7, reads the param knob to use as a probability and based on that flips a bit. I had to split these into 2 scripts as I couldn’t quickly think of a way to fit the param knob reading into script 8. Also it lets you experiment with using a different clock to flip bits.

Script 6, is a second turing machine, but it doesn’t flip bits ever, instead…

Script 5, copys the bits from the first turing machine to the second one.

Script I randomises the bits at startup (or when you press WIN+I)

Rows 5-8 on Meadowphysics correspond to inputs 5-8 on the Teletype, when row 4 triggers it alternates row 6 between 4 steps and 8 steps (via the ‘poles’ rule).

I had the patch running most of the weekend, it’s a lot of fun tweaking things every now and again (well… it is for me!) The synthesis is pretty basic, but it helps you to hear what the algorithm is doing.

I’ll try and have another go and getting the USB export to work. I’ll see if I can get a USB stick formatted on a Windows computer rather than OSX El Capitan.

1 Like

Thanks very much for the detailed explanation.

However, I do not understand this part:[quote=“sam, post:225, topic:839”]
X 0
L 0 4 : X ADD X LSH P I I
[/quote]
When I try reading it from right to left it says to me "set the value of the working pattern at index I to the value of I, with I being the loop counter. Doesn’t this effectively replace (i.e. destroy) the existing values at the indizes 0 to 4? Please, would you be so kind and help me understand?

2 Likes

[quote=“wolfgangschaltung, post:229, topic:839”]When I try reading it from right to left it says to me "set the value of the working pattern at index I to the value of I, with I being the loop counter. Doesn’t this effectively replace (i.e. destroy) the existing values at the indizes 0 to 4? Please, would you be so kind and help me understand?
[/quote]
I can see how you’d think that. I got a bit confused too.

The trick to understanding it is, P has 2 versions, the get (P a) and the set (P a b), afaik, the set version is used when P is the first thing on a line (after any pre statements). Is that right @tehn? (If you’re running v1 there is a bug that stops this working.)

If I add some brackets hopefully it will make more sense.

X ADD X LSH P I I
becomes:
X (ADD X (LSH (P I) I))

In order of operation (and using $ as the value of the previous operation):

  • P I - get the value at I
  • LSH $ I - shift the bits of $ to the left I times
  • ADD X $ - add $ and X together
  • X $ - save $ to X.

Does that help?

2 Likes

Yep, thanks much – I dimly remember that I fell into this “trap” one time before…I need to learn how not to forget!

1 Like

Compact flashcard and USB reader to the rescue!

tt09s.txt (1.0 KB)

4 Likes

This is great Sam having loads of fun with it. Is there way to use the PARAM to lock in the sequence of notes when turned?

If you’re using the script I uploaded, the PARAM knob should lock the sequence when in the fully CW or CCW position. Alternatively don’t trigger script 7. Does that help?

Ah right ok I thought for some reason turning the PARAM pot randomised the bits. Going to have another mess about with it tonight, thanks again having so much fun learning this module

How can i add a delay in a PROB PRE, without having to trigger another script ?
Typing this is not allowed :
PROB 10 : DEL 50 : TR.PULSE A

As,far as i know you can use only one PRe per line of code…

Change request :

TR.PULSE 0 (or less) should result in no trigger.
Currently it triggers pulse A. It would be nice, so you could Mute triggers out by sending TR.PULSE 0.

Example : mute a script that triggers out of A with looking at the state of script 8 :

TR.PULSE STATE 8

1 Like

isn’t mute/unmute exactly what you need?

MUTE/UNMUTE are for scripts. And TR.PULSE 0/1/2/3/4 would be much more flexible for dynamic changes. Generating drum patterns would be much more easier in some contexts.

right sorry! quite new to tt myself…

Wouldn’t you run into potential problems with the length of the muting period vs the length of the trigger/gate with this idea? Maybe if the muting worked like toggle it could work… but then it would mute everything until the next toggle…

I don’t get it. TR.PULSE 0 —> nothing happens, that would be all. i don’t see any problem.

A is simply a variable, default set to 0. What’s you’re proposing doesn’t make sense (to me).