Teletype: measuring gate length


#1

following up on this question posed by @Geremy

seeking the most efficient way to record external gate length to patterns in teletype.

@xeric suggested mult’ing a gate and inverting, which led me to this script:

M:
IF STATE 1 : TR 1 1
ELSE : TR 1 0
IF STATE 1 : TR 2 0
ELSE : TR 2 1

2:
TIME 0
TIME.ACT 1

3:
TIME.ACT 0
P.PUSH TIME

  • patch gate to script input one
  • self patch TR 1 to input 2
  • self patch TR 2 to input 3

use the init script or live entry to turn on metro & set it to 10ms. you’ll also need to set up which pattern you’re using and if you want it to loop.

eats up 3 script inputs, two TR outputs & metro - but it works!

if anyone can improve on this i’d love to expand my understanding :slight_smile:


Telex: Teletype expanders
#2

Nice. I’m kinda partial to not having the M script run all the time though, so I like:

I: 
M.ACT 0    
M 25

1:
M.ACT 1
TIME 0

M: 
IF EZ STATE 1 : P.PUSH TIME ; M.ACT 0

I haven’t tested this yet but it only requires 1 script input and M script doesn’t run continuously.


#3

Well one easy win is to use SCRIPT 2 and SCRIPT 3 instead of self-patching.

Actually what about:

M:
IF STATE 1 : TIME 0
ELSE : TIME.ACT 0 
IF STATE 1 : TIME.ACT 1
ELSE : P.PUSH TIME

I’m away from my Teletype, so I’m not positive if that third line fits in the character limit.


#4

I think that pushes onto the pattern for every tick while the gate is low.


#5

Oops, you’re totally right. I’ll have to look at this at my Teletype later


#6

For the TXi - I’m working on a firmware revision that adds in some “analysis functions” - this makes sense to add to the list. Let me see what I can do.

Please don’t let this stop figuring out how to do it with the TT itself. :slight_smile:


#7

yeah that’s why i’m using inverted trigger outputs to ping scripts 2 & 3. then you only get TIME resets and pattern writes on event changes, rather then every tick metro reads a state.


#8

amazing! i look forward to hearing more about this!


#9

seems like it could be useful to have input trigger execution be configurable-- right now it’s always on the rising edge. there’s no reason each input could be different-- ie falling edge, or both edges.

we could make this a feature request if we can collectively figure out a reasonable UI and command set


Teletype workflow, basics, and questions
#10

this would be quite useful!

i assume this would be a config command that sets an input trigger to execute on rise/fall or both. something like:

EXE 1 RISE
EXE 1 FALL
EXE 1 BOTH

it would be even more useful to be able to flag lines in a script with a rise/fall/both conditional. besides the efficiency of being able to measure a gate length from within one script, you’d also benefit from the visual cue of the trigger input’s behavior. if there’s no flag the line respects the trigger input’s default behavior.


#11

Ok so my code didn’t work because the line in the M script was too long. A bit of troubleshooting help maybe? Current code:

I:
M.ACT 0
M 25
L 0 1 : PN.WRAP I 1 ; PN.I I 0

M: 
P.N 1
S.CLR
S: M.ACT 0
S: P.PUSH TIME
IF EZ STATE 7: S.ALL

7:
TIME 0
M.ACT 1
P.N 0
P.PUSH IN

So Gate is in Input 7 and CV is on IN. Pattern 0 stores the CV and Pattern 1 stores gate length. It worked kind of during editing but now nothing is happening…


#12

I figured out that initializing the length instead of the index causes the above to work. So change:

L 0 1: PN.WRAP I 1; PN.I I 0;

To just;

L 0 1: PN.L I 0

As wrap doesn’t work for pattern length anyway.


#13

Hi, Sorry to dredge up this old thread, I was searching the forum on Teletype Gate vs Trig functionality.

the analysis functions for TXi seem really interesting.