does this one work?
yup! thanks so much to u both (:
If I understand correctly I want to divide the time between some number of clock pulses by 3 and fire triggers. On the excellent Teletype Talk video series, the gentleman uses a DEL.R 4 or somesuch (ratchet, 4 repeats) I think to produce a 16th note hi-hat roll. Ok, I think I can work that out.
But what if you want a triplet to only be “available” if the current step in a set of 16 triggers corresponds to a safely musical division. For example, given 1e&a 2e&a 3e&a 4e&a:
A 16th note triplet is available to be triggered on 1.&. 2.&. 3.&. 4.&.
An 8th note triplet is available to be triggered on 1… 2… 3… 4…
A quarter note triplet is available to be triggered on 1… …. 3… ….
For now I’ll exclude broken triplets (e.g. a triplet that contains a tie or rest on one or two of the triggers in the triplet. (Too complicated.) I’ll also exclude triplets that would “wrap” any of the divisions shown above. (For example a 1/4 note triplet that starts on any pulse either than the 1 or the 3.)
If you imagine a trap hi-hat line as script 1 and then another script that increases the probability that script 1 plays a 1/16th note triplet once it reaches the next 1/4 note or “& of” a 1/4 note…
You want to know if a given beat is an even divisor of another number. The arithmetic operator for that is “modulo”
The following tracks the current beat number in a variable
X, counting 0 to 15, then rolling back to 0 for the next measure. It assumes you’re tracking the “level” as you put it (16ths, 8ths, quarters) in variable
Y encoded as 1, 2, or 3 (lower numbers means faster). It then sets variable
1 if it’s “safe” to start a triplet on, or
0 if “unsafe”. You can then use
IF Z: or similar as you’d like
# we add 1 to X, then use modulo # to wrap it back to 0 every 16 X % + 1 X 16 # we use LSH to get 2^Y # then use modulo to check # if X is a multiple of that number # by checking if the # modulo result equals zero Z EZ % X LSH 1 Y
Related: anyone know why there’s no
POW operator? Am I missing it somewhere? I’d expect e.g.
POW 3 4 to return 81
You could store all four gate sequences in one lane of pattern using bitwise ops. To toggle one,
BTOG <current value from pattern> <1-4 representing which trig to fire> and save that result back to the pattern. I’m high does this make sense send tweet
EDIT it didn’t make sense cause it was wrong, I fixed it
check out this thread: Github Basics
i thought we also had a thread that talked about how to contribute to teletype codebase but can’t find it now.
development threads are better for that (where an op was introduced), and some features have dedicated threads but we usually try to link them to the main development thread. we don’t have a development thread for post 4.0 features yet, i should probably start one.
Hand to god I in fact accidentally stumbled across this in the top post of a thread most recently posted to in 2019 and thought I should share it here:
Wording Change Proposals
This stuff relates to reorganizing content/wording. These proposals are more opinionated on my part, so I’d like to get some feedback before making these changes.
- Consider renaming “Advanced” section to something like “Tips and Tricks” or “Best Practices for writing Teletype Scripts”
Is it maybe a great idea to transform this chunk of the manual into a user-driven cookbook of awesome stuff? And if so can we call it
Project: ADVANCE WARS?
I do this all the time; drive the teletype from a clock in input 1. I maintain a counter in T (increment after each clock, reset after haven’t received a clock for a while), drive $9 (M script). I send the clock from Hermod, along with a note of 0V or half steps above into IN to change pattern on TT according to which pattern is playing on the Hermod. Here’s what script typically looks like:
J / IN 130
IF != J P.N: P.N J; T -1
IF > LAST 250: 10
ELSE: M LAST 9
All my teletype code, along with links to a performance of the track and patch notes are on GitHub: http://teletype.a773.dk
i’m trying to decide if Teletype might be a module that would work for me and I’m playing around with the VCV version. I did a couple of Teletype studies, but I’m generally pretty slow with programming.
I have a question, maybe someone can help me out:
I assume declaring variables is not done in the in the scene, but in the Metro and Init scene, right?
In the teletype studies – one study declares the variables in the metro scene and the other study is doing the same thing in the init scene. Is there a difference, where to declare them?
someone else can definitely chime in if I’m off base, but I’d say that in teletype, variables aren’t really declared so much as assigned. each script always has access to the same variables, and you can assign them wherever in your script makes the most sense.
As @alanza pointed out – no need to declare variables. You can set (store values) and get (read values) variables in any of the 10 available scripts (#1 - #8, #M, #I).
There a few options available:
A, B, C, D, X, Y, Z, T
Local (per script) variables:
J, K, I (might be overwritten if script is called via L)
Additional 16 global variables from the live mode dashboard:
PRT 1, PRT 2, …, PRT 16
EDIT: To complement the list above, there are a few more special variables that can be "hacked" into global variables:
R: Can be used as global variable by setting Min/Max to same value.
O: Can be read and set (via “O x”) like a global variable, but auto-increments after each read. Set Min/Max to same value or “O.INC” to zero.
DRUNK: Set Min/Max to same value to use as global variable.
FLIP: Another global variable, but it can only be 0 or 1, and it flips after each read.
What @alanza said, but also that variables can have values assigned to them anywhere - in the Init script, in the Metro script, or in any of the other eight scripts.
Where you assign a value to a variable is dependant, really, on why you’re assigning it, or how you intend to use it.
The Init script is run once when the scene is loaded, and so this is a good place to assign an initial or starting value to a variable.
The Metro script is - kind of - like a clock tick, and is run repeatedly (or not at all if the metro is turned off ), and assigning a value to a variable here will result in that value being re-assigned and overwriting any existing value again and again and again. I’m not sure that there’d ever be a reason to assign a value to a variable in the Metro script, unless you wanted it to be quickly reset by every tick of the “clock”.
Also worth knowing is that some variables - A B C D T X Y Z - are global variables; their current value is recognised by, and can be referred to, by any script that’s running.
J & K are local variables; their value is only recognised by the script where that value is assigned. I is also local and is more dynamic - its value will change if it’s used in a loop in a script.
This video is a good primer – as are all of the rest of the videos in the series.
I’m having some trouble understanding Just Type synth behavior I’m getting. I’m triggering random JF channels through 1 to 6 and I would like the sounds to be with slow attack and slow release, so that they would come in and out and sometimes ring together. I have assigned some chord tones for these voices to play in tracker mode. I’ve set the Intone setting to 12:00 to get long attack and long decay. When I set the Time knob to little faster than 9 o´clock the note rings for a few seconds. But when I change Time knob to little bit slower, like 8:30, the note just keeps ringing forever. There is nothing in between. Could this be a i2c issue of notes getting stuck or am I just missing something?
Just tested here on my setup and I have the exact same behaviour.
I see the same behavior, too. I brought it up in the Just Friends thread a few weeks ago, but no one has volunteered an explanation.
You can be pretty confident that this is a firmware issue, not something wrong with your device.
(Sorry for the non-specific link there. I can’t figure out how to refer to a post from another thread using a phone browser.)
Ok, thanks for testing and confirming the same behavior! Good to know it’s probably a firmware issue. Hopefully it can be fixed some day. It would be really useful to have those longer envelope times and the whole range of the Time knob.
Has anyone asked @Galapagoose?
Have a question about the DEL op functionality and if anyone else has observed this. When executing a line that includes a DEL does teletype compile/interpret the line as literals (substituting any variables for their current value) or does it just add the commands to the delay queue?
For example, what I’ve seen:
DEL 5000: A
Returns a 1
DEL 5000: A
Returns a 2.
So if you have a variable used in the POST of a delay OP, and the variable’s value changes during the delay period, when the delay period is complete the POST is run with the current value of the variable and not with the value at the time of execution.
Any insight would be appreciated!
You already have found the correct answer!