> teletype : code exchange

llllllll
#21

Awesome! Something to work with…

1 Like

#22

Also, for your perusal, here is a teletype “recall sheet”.
the ultimate scene backup.
solid state memory.

TT_scene_RECALL_sheet.pdf (800.4 KB)

p.

7 Likes

#23

i have a few questions. (i don’t want to make a lot of new topics, so, sorry if this is not the appropriate place)

  • what’s the routine to have a script executed by the metro ?
  • are we restricted to a single metro ?
  • what is the I page for ?
  • how to invert a range for the PARAM ?
  • how to add the IN voltage to CV 1 ?
  • how many users of teletype around ?

Many thanks,

louis

0 Likes

#24

answers to the first three questions:

– yes: single Metro
– Metro executes the script that you put in the M screen
– I screen is for setting I-nitializing values, and anything else you want to execute as you load your scene. You can also execute that manually, by pressing the CTRL+I keys

0 Likes

#25

“Metro executes the script that you put in the M screen”

Ok this makes sense. It’s basically a 9th script, then. But if i want to trigger scripts 1-8 at the M rate, is there any other way rather than TR.PULSE A and hard-wire output A to trigger input 1 ?

0 Likes

#26

that’s a lot of scripts to execute all at once at a fixed rate-- likely might overload the system, but could try it.

there is no inter-script triggering. so yes, you’d need to hardwire something.

0 Likes

#27

ok ! i thought i might have overlooked something. No way to feed a variable X in the M script with 0 or 1 and put an IF X = 1 THEN in another script ?

0 Likes

#28

You can invert the PARAM range by subtracting it from the maximum:

SUB 4096 PARAM

Which you could assign to a parameter by a preceding X etc, or just throw that in your script.

///

To add a voltage to CV 1, you can either do this explicitly:

CV 1 ADD IN CV 1

or you could add it to your existing CV output line:

CV 1 ADD IN <your existing output calculation>

or you can use the CV.OFF command to deal with them totally separately, by adding this to the end of your output script:

CV.OFF 1 IN

2 Likes

#29

Ha ! Thanks, i am not used to code, and i was stuck with
ADD IN CV 1

we never use brackets, do we ?

0 Likes

#30

no brackets or parens in this simple TT language.

if you want to create readability, you can use variables.

ie.

X CV 1
Y ADD IN X

X gets assigned CV 1 then Y gets assigned IN and X added together.

1 Like

#31

here’s something i cannot figure out due to my lack of coding experience :
i want to have x equals 1 or 2 or 3 or 4, depending on in which quarter the Param knob is. i know how to split in halves but more, i’m stuck.
any help would be cool.

0 Likes

#32

a good way subdividing the PARAM input is to use RSH (right shift) which divides by multiples of two. ie

X RSH PARAM 10

will divide PARAM by the 10th power of 2 (1024). try changing the 10 to get different subdivisions.

also-- dividing will get you 0,1,2,3. so you’ll need to add 1 if you want 1-4. you can do this in one line, or split it up.

X ADD 1 RSH PARAM 10
4 Likes

#33

Amazing, i was wondering what RSH/LSH were for !

0 Likes

#34

Another issue i have :
i am dividing and multiplying an incoming clock. Clock goes to input 2 and the script is :

Z TIME
TIME 0

When changing the speed of the clock i have teletype freezing very often for a few seconds. Maybe there is a better way to do this ?
Also, i noticed that the time values seem to be rounded to factors of 10, is that right ?

0 Likes

#35

what do you mean by freezing? how fast is the incoming clock?

at the moment, yes, time is rounded to 10ms. i may consider increasing granularity in a future update.

0 Likes

#36

By freezing i mean missing a lot of pulses, silence for a few seconds. Starts to be buggy with an incoming clock as a 1/8th note at 140 bpm.
Here’s the scene : triggers the sequencer, takes the incoming sequence input, let it unchanged with param in first half, doubles tempo and add an octave when parameter is in second half :
Sequencer output to IN / A to sequence trigger and self patch to trigger input 1 / Clock to input 2.

M :
TR.PULSE A
M X

I :
X 200
M.ACT 1

1 :
IF GT PARAM 8000 : X DIV Z 2
ELSE : X Z
IF GT PARAM 8000 : Y N 12
ELSE : Y 0
CV 1 ADD IN Y

2 :
Z TIME
TIME 0

1 Like

#37

Actually it seems to be related to fast clocks rather than changing clock.

0 Likes

#38

At a guess I’d say Teletype isn’t ‘freezing’ but rather is missing events for some reason. I don’t think it’s a computation overflow thing (nothing here is overly processor intensive). A few things to try:

  • Set a specific TR.TIME of ~15ms: TR.TIME A 15 in the Init script (so you have reliable pulse width)
  • Try moving the M X line into script 1. Perhaps there’s an issue where Metro doesn’t like being set internally.

You could do this second idea by simply moving the M X line after the first IF/ELSE or just remove the X variable altogether:

1 :
IF GT PARAM 8000 : M DIV Z 2
ELSE : M Z
etc.

Perhaps there’s something strange going on with the timing of the self-patching? I think the below script will get you the same result with the IF/ELSE statements or the self patch. I haven’t tested this though, so be prepared for some bugs. Maybe it will help someone see how the same results can be achieved in many different ways…

M :
TR.PULSE A

I :
M 200
M.ACT 1
TR.TIME A 15

2 :
Z RSH PARAM 13 // turns param knob into 0/1
M MUL TIME ADD Z 1 // set delay time to last interval multiplied by 1/2 depending on z
TIME 0 // resets timer count
CV 1 ADD IN MUL Z V 1 // output the CV input plus 0 or 1 volt depending on z

1 Like

#39

That’s brilliant. Many thanks. That’s so fun to learn this thing. I’ll try this tomorrow.

0 Likes

#40

Hi!
I think I might spending a lot of time in this topic. I just received mine and am still getting my head around it. I have a couple of queries that I hope someone might shed some light on?

Looping scripts
Is there any way to get a script to repeat or loop sections with out being triggered? Or do u need to use Metro script? The loop command will only work on a single line for x iterations - but if you wanted to change a cv signal, delay by 20 ms then send a trigger to TR 1, multiple times in a row then you can’t.

Value display in live mode
I’ve tried to have useful things like the current metro time or param value displayed in the live window but the value only seems to update upon switching to live mode rather than upon triggering of script?

Scene selection jumping around
When I hit esc and use [ ] to navigate saved scenes it sometime jumps upwards randomly and repetitively making it hard to select a scene - I’ve tried unplugging the keyboard to see if this is the fault but makes no difference - is this just me?

I have made a little patch that programs an A152 with random voltages:

To make this work I’m using the metro at fast rate (10ms) with a IF prefix generated by either input one or two. So basically the Tele will spit out random voltages and gates until told not to with a gate input from the last stage of the A152.

Code is:

I
CV.SLEW 1 0 (incidentally I noticed that the cv.slew setting seemed to follow me from another scene so seems best to set all these values in I script just in case)
TR.TIME 7

M:
m 10
IF y : CV 1 RAND 16000
IF Y : TR.PULSE 1

1
X O
Y WRAP X 0 1

2
X O
Y WRAP X 0 1

Patching is:
TT gate input 1 from trigger button or end of envelope cycle
TT gate input 2 from A152 dig out 8 (tells TT that all S+H have been given a value)
TT gate out 1 to A152 clock in
TT CV out 1 to A152 common track and hold input

pretty simple but needed to start somewhere!

2 Likes