Hi Guys,

Entering back into the Teletype world and quite a newbie that needs a refresher. Super newbie question.

I’m investigating patterns and want to make a simple rotation of that given pattern. The first note moves to the back and the second note becomes the first.

For example, the pattern can be 4 notes (0, 2, 5, 7) and I would like to make a separate script that when triggered will rotate the pattern as in 0 2 5 7 moves to 2 5 7 0 to 5 7 2 0 etc.

Let me know!

Hi Julien,

I’m away from the teletype but give this a shot.

if you put [0, 2, 5, 7] in your first pattern and its loop length is 4:

I:
A 0

1:
A % + A 1 P.L
L 0 3: PN 1 I P + I A

Every time you trigger the script it should increment your rotation index (A) and wrap it so it never exceeds your pattern length. It will then lookup the pattern with an offset index and put the results in the second pattern.

1 Like

Thanks for this!

Think this may be a little too advanced for me. Could you break this down a little more? I’m currently not getting anything here. I’ve set numbers in pattern 0, and with script 1 being triggered I see pattern 1 moving numbers until they clear to all zeros, including pattern 0. Either more info on this could be helpful for me to better understand or…I can give a little more detail of what I’m thinking here.

I want the loop to keep going indefinitely. So based on the the simple 0 2 5 7 pattern it would be 0 2 5 7 / 2 5 7 0 / 5 7 0 2 / 7 0 2 5 and keep looping. I could just manually type this in of course, but ideally I’ve find a way to rotate certain melodic lines is my idea.

Hope this clarifies and thanks again!

Actually my mistake! Move the modulo down into the loop on the second line:

I:
A 0

1:
A + A 1
L 0 3: PN 1 I P % + I A P.L

  • sets rotation offset to 0 (A = 0)
  • increments rotation offset by 1 (A = A + 1)
  • in a loop where I = 0 to 3 do the following:
    – add I and A (the rotation offset)
    – wrap the number back to 0 if I + A is equal to pattern 0 length (4)
    – find the value of this wrapped index in pattern 1 (A=5, I=0… A+I=5… wrap(A+I)=1 value=2 from [0, 2, 5, 7]
    – assign the value found from pattern 0 at wrapped index to pattern 1 at location index (I)

teletype indexing starts at 0 for working pattern index, pattern index.

2 Likes

Thanks! Almost there. I see pattern 1 rotating numbers now. With pattern zero still sitting with 0 2 5 7.

How do I get it to have CV 1 control the pitch here? Again, sorry, just starting out with patterns here.

Are you using pattern 1 for anything? if not, can you just use pattern 1 instead of pattern 0? One potential benefit is you can change these values programatically while pattern 1 continues to shift.

to assign CV 1 to control pitch try:

CV 1 N PN 1 0

where 0 is the index of the shifting pattern 1. I’m assuming 0, 2, 5, 7 are intervals? the N function should provide what you want.

Thanks for your patience with me! Not using pattern 1 for anything. Trying to nail down the concept before anything else here. And yeah - 0 2 5 7 are simply the intervals here.

I added CV 1 PN 1 0 to Script 1, which started controlling the pitch, but the pattern is simply 0 2 5 7 on repeat, without the rotation I’m trying to achieve.

To give the full picture I have:

Live mode: p.ins 0 - manually added the intervals 0 2 5 7 to pattern 0

then -

I:
A 0

1:
A + A 1
L 0 3: PN 1 I P % + I A P.L
CV 1 PN 1 0

1 Like

I would use script 2 to start iterating through pattern 1 at your sequence speed.

So take your CV 1 PN 1 0 and put that in script 2. then trigger script 2 when you want to advance the sequence. trigger script 1 when you want to rotate it.

2:
B % + B 1 P.L
CV 1 PN B

2 Likes

Hopefully not the wrong thread-

Trying to map a TXi knob to control an LFO rate out of a TXo.

-I can setup a an LFO on TXo.

-I can read in the knob value on TXi with TI.PARAM x,

-but how do I get that value over to TO.OSC.LFO.SET ?

In your Init script add this line, with [min] and [max] as the minimum and maximum frequencies you want for your LFO (in mHz in that case) :

TI.PRM.MAP 1 [min] [max]

For example :

TI.PRM.MAP 1 50 50000
-> from 20 seconds cycles to on cycle every 5 seconds.

You also need to set the max voltage amplitude for the LFO in the init script, for example :

TO.CV.SET 1 v 5
-> maximum 5V

Then in your metro script for example :

TO.OSC.LFO 1 TI.PRM 1

This will read the mapped value from the TXi’s first param and set the TXo’s first output to an LFO at that rate.

I’m not near my modular to check but that should work I think…

3 Likes

Just to add to this @Happyanimal1, the key point here is that Teletype can’t continuously update values for the LFO based off the Telexi knobs. You need to periodically sample the value of the knobs to set the LFO frequency (hence the usage of the metronome script above).

2 Likes

Thank you! Will try to re-try today or tomorrow. Really appreciate it!

That was it… works just as I had hoped. Thx.

1 Like

Thanks, it’s working!!

Hi there, I had a question regarding the teletype sequencer that I was hoping someone could answer for me:

When creating a sequence in teletype, how do I insert rests into a pattern?

A simple way to do that is to use negative values for rests: only send out a trigger if the pattern value is greater or equal to zero. This is pretty practical is you can flip the sign of a pattern value with a single keystroke, making it easy to mute and unmute steps. My Teletype syntax is a bit rusty, but you can look into the IF pre-operator and the GT comparator.

2 Likes

(figured the Teletype workflow thread makes a good home for this question)

2 Likes

Thanks! This helps a lot!!

1 Like

I’ve got another question: Say I have a list of values in a pattern… should p.rnd return a random value from that list every time it’s triggered? If not, how would I go about retrieving a random value from a list (or pattern in this instance) every time Teletype receives a trigger?

It should work that way, along with P.START and P.END to set your boundaries.

1 Like