Grid ops / integration

I’m still hoping to see a clip from you running that 4Vox with the TXo’s.

if i understand correctly what you’re trying to do the easiest way is to use non latching buttons and G.LED to indicate the current position (although you could also do it with latching buttons, using the buttons themselves to display the current position).

let’s store the current position in pattern bank 0 (as we’ll probably want multiple playheads). so what we need is:

  • a script that advances the current position and displays it on the grid - let’s use script 1 for this
  • a script that gets triggered when a button is pressed and resets to that position, we’ll use script 2

first we need to create the buttons. add this to the I script and execute:

G.BTX 0 0 0 1 1 0 0 2 16 1

this creates a row of 16 momentary buttons which will trigger script 2 when pressed. script 1 then looks like this:

PN 0 0 % + 1 PN 0 0 16
G.LED PN 0 0 0 15

this clears the currently displayed LED, advances it, and displays the new position by setting the corresponding LED level to 15. this is where you would also want to update CV outputs accordingly (for MLR if i understand correctly you want something like CV 1 N PN 0 0 which will output 1V/oct CV determined by the current position).

now script 2 gets triggered whenever a button is pressed (or released since it’s a momentary button). this is where we set the position according to the button pressed, and you’re right, G.BTNI will be useful here (we use IF G.BTNV so it only resets on press, not release):

IF G.BTNV: PN 0 0 % + G.BTNI 15 16

adding 15 here has the same effect as subtracting 1, with proper wrapping - the reason we want to do this is that when script 1 advances to the next step you want it to be the step we selected.

that’s it! disclaimer, i’m not near teletype right now so can’t confirm, but i think this should work. i gotta run for now but will add how to make it multi row in a bit.

edit: fixed some typos
edit2: fixed more errors


keeping the momentum on grid integration for now but will do something for sure once it’s wrapped up!


expanding the MLR scene to 4 rows… we can re-use the above but need to make some modifications. first, we need 4 rows of buttons instead of 1. just change the last number in G.BTX from 1 to 4:

G.BTX 0 0 0 1 1 0 0 2 16 4

script 1 will now use a loop:

L 0 3: A I; SCRIPT 3

and the actual work to advance a step will happen in script 3:

G.REC 0 A 16 1 0 0
PN 0 A % + 1 PN 0 A 16
G.LED PN 0 A A 15

a couple of changes here - instead of clearing all LEDs with G.CLR we just clear the row A, and we replace P 0 0 with P 0 A so that we update the playhead that corresponds to A as we now have 4 of them.

script 2 also needs to be updated to:

Y / G.BTNI 16; X % G.BTNI 16
IF G.BTNV: PN 0 Y % + X 15 16

we determine the position of the last pressed button (X and Y) based on the button id - when you create a group of buttons they are arranged row by row (i’m planning to add dedicated ops to get position for specified button which will simplify this kind of thing). then we update the position for playhead Y to position previous to X.

now you should have 4 rows with individual position, all advancing by one step whenever trigger 1 is received. one thing we could add is have a clock divider per row. let’s store them in pattern bank 1, and use bank 2 for counters. add to I script:

L 0 3: PN 1 I 1

that sets the initial dividers to 1. change script 3 to:

PN 2 A + 1 PN 2 A
PN 2 A 0; G.REC 0 A 16 1 0 0
CV + 1 A N PN 9 A
PN 0 A % + 1 PN 0 A 16
G.LED PN 0 A A 15

this will increment the counter, and only advance once it reaches our divider value. could also use EVERY instead but then you’d have less control over reset.

and, of course, we might as well use the grid to control the dividers! and the 4 bottom rows are free… add to I:

G.FDX 0 0 4 16 1 0 0 4 1 4

and set script 4 to:

I % PN 2 G.FDRI + 1 G.FDRN

now the 4 bottom rows will have faders that will set the corresponding track divider to 1…16. finally, a reset would be handy. we could use trigger 8 for that:

L 0 3: PN 0 I 15

that’s it!

edit: fixed errors


I’ll study this tomorrow. But i’m speechless…you’re amazing. The grid studies are awesome.
The grid integration opens so many doors. i really intend to learn properly how to design my own interfaces and programs with it. (Calling @mDang as i know he’ll be interested in the topic and might have missed it.)


@chapelierfou there were several errors in the scripts above, i fixed them/edited the posts and confirmed the scene works properly with teletype. here is a copy to save you time on typing: mlr.txt (1.4 KB)

would love to see what you do with it and er-301! i haven’t spent much time with mine yet…

@dan_derks and here is the meadowphysics variation scene: rain.txt (1.4 KB)

i modified it a bit, when you press anywhere it creates a dot, and when a drop hits the dot it will “split” into 2. this can create some interesting patterns. if you want dots to simply trigger notes and reset drops just comment out this line in script 6: IF Z: SCRIPT 5.


Many thanks.
I am a bit embarrassed because i don’t get how to load scenes from a USB stick. Every time i plug a USB stick into TT, it writes the contents of TT into it.

Scenes that are saved from the TT will be stored as


on your flash drive. The numbers will be the scene number and note the “s”.
To load something from the flash drive you just need to rename the file, and leave off the “s”.

To load the mlr.txt file to scene number 10 you rename the file to


and place it on your flash drive.


Thanks ! (12345678910)

1 Like

Thank you :wink: i’m following this tread with great attention !

it seems to work perfectly.
There was a bug where there was an offset off 1 step in the generated CV, but it’s corrected here :

PN 2 A + 1 PN 2 A
PN 2 A 0; G.REC 0 A 16 1 0 0
PN 0 A % + 1 PN 0 A 16
CV + 1 A VV MUL 63 PN 0 A //Need to put this line here. MUL 63 scales it full range. (needs adjustment for the ER-301 inputs)
G.LED PN 0 A A 15

1 Like

i’ll try to add stop buttons.
Now the tricky part is how to make ‘inner loops’, where pressing a button while holding another one defines a loop…

yeah i wasn’t sure what range er-301 would expect, but can be easily adjusted to what makes sense. basically, PN 0 A is the current position between 0 and 15, and then you just scale it to whatever range you need.

stop buttons - i assume per track?
interesting feature with inner loops - does it need to loop only while the buttons are pressed? or does pressing 2 buttons simultaneously defines a loop that continues even when the buttons are released?

inner loops was indeed tricky to add but doable! mlr2.txt (1.8 KB)

there were several changes, i’ll do a more detailed write up later, here are the main changes:

  • pattern bank 3 is now used to store the starting and ending points for each 4 of the tracks
  • pattern bank values 8-11 store the position of the last pressed button or -1 when a button is released
  • when a button is pressed and there is a previously pressed button it will set the loop points based on those buttons
  • faders length reduced to 8 (you probably don’t need to divide by more than 7 anyway) and 4 buttons in the bottom 4 rows in the rightmost column are start/stop buttons (don’t forget to press them as they are stopped by default)
  • when advancing a track we just add the value of the corresponding start/stop button - if it’s pressed it’ll be 1 and 0 if not pressed which is exactly what we want
  • there is a change in how we set LEDs to show the inner loop when it’s defined
  • you were right, CV update was off by one! don’t forget to change the scaling in the script i posted.


Thank you again for this. This is tremendous.
And also a great lesson of TT coding ! i’m learning a lot from this code.

in action :


hi @scanner_darkly
with all this new implementation, do you think it could be possible to map WW and Kria (Ansible) monome layouts to a monome 256? that would be pretty awesome :wink:


via Teletype, it’s made possible.

1 Like

great to see it in action, thanks for posting it! i’m going to refactor the script, it’s getting confusing with how track variables map to pattern values, so instead i’ll change it so that each bank corresponds to a track. once that’s done i want to see if @mlogger request is possible and if there is room to add the ability to record.

do you mean using ww and ansible with grid 256? or something else? if the former, i posted a 256 version of white whale a while ago: White Whale mod for grid 256 [beta]. ansible would require a firmware change as well.

1 Like

i mean using ww on the upper 8 rows and Kria on the lower 8
but i’m konig to try this ww firmware right now :ok_hand:

1 Like

Sorry i didn’t understand you wanted to use them at the same time.