Teletype questions : triggering scripts, accessing time, delays


I have a few questions about the Teletype module. I’ve read the documentation but I might have missed some things, sorry in advance if that’s the case.

  • Is there a way to trigger a specific script from another script ? I did not see that in the doc. Even though I can imagine potential recursion issues (which could be solved relatively easily), this would be a very useful thing to make more complex/useful patches…

  • Are there only 8 scripts available for a scene (i.e. the ones linked to the trigger inputs) ?

  • Can the DEL delay command/modifier be used for more than just one command line ? Being able to delay the execution of a whole script for example would be very useful for time-based composition.

  • Is it possible to access the current time from the Teletype (maybe as two variables as all vars are signed ints : seconds since startup and current milliseconds for example) ? It might be even better to have a timing variable that would be automatically incremented and that can be reset…

Here’s an example of what I would like to do with something like Teletype : record a sequence of values from the CV input (recording scripts triggered from inputs), also record the time at which each value was entered, and then manipulate this data (both the entered values and their timing)…

Is this kind of things possible with Teletype ?

no. you can use a patch cable, which of course uses up your TR outs.

i’ll consider adding internal script triggering via command, but the recursion issue is more of a design challenge-- sure, infinite loops are preventable, but what happens when you try to do an infinite loop? just issue a warning and do nothing? maybe that’s the trick.

yes. and M for metro and I for init. plus you can live code.

yes, DEL only goes for one line. like #1 you could DEL a TR.PULSE to an input for a whole script.

it’s in there. use:


to read the timer in ms. you can reset the clock:


at any point.

yes, quite easily. i’ll likely work something like this into the tutorials. stay tuned.

Cool, thanks for the answers.

About potential recursion issues : you could detect infinite recursions or simply define (or let the user define) a maximum level of allowed recursion/calls of other scripts from an initial script (0 meaning no recursion).

And I missed the TIME command, my bad. As it’s an unsigned int and wraps every 32 seconds it might still be good to have a variable with the seconds since last timer reset and another with the current milliseconds to be able to nicely handle more complex things involving timing…

Anyway, looks like what’s needed to do what I was thinking about is already there, even though some additional features/improvements would make it even easier. That’s good news :smile: .

that is a great idea!

i see now what you’re saying about actually wanting recursion-- particularly if a script was called conditionally. it introduces an interesting level of complexity. i’ll think about this in the next rev.