> teletype: grid # code exchange

I’ve tried this technique with SCENE to extend scripts, but I’m not sure to understand how to implement it, it has to be called manually, is that correct ? If I call a SCENE from another one, it won’t execute the INIT script of this second SCENE ? Is it possible to provide an example of how to use this technique please ?

yeah, it doesn’t execute init when you use SCENE:

but i think there are several ways to work around that (disclaimer: i haven’t tried any of this, just brainstorming). let’s say scene 1 is your main scene and scene 2 is the grid controls setup.

the easiest solution is to manually execute the init script. so in scene 1 init you do whatever you need to setup in your main scene and then the last line does SCENE 2. at this point it loads scene 2, you press F10 (or use grid control to execute init if you have grid already connected), it does what it needs to do and then as the last step executes SCENE 1.

a variation of the above that could make it easier: in scene 2 you create an extra button somewhere that executes the init script, and in the init just before it switches back to scene 1 you hide the button so it’s not in the way. this way you don’t have to switch to grid control mode.

another option: do initialization in metro script in scene 2. so, scene 1 loads, the init script switches to scene 2, at the next metro execution it will create all the grid controls and switch to scene 1. in this case you have to make sure you don’t put SCENE 2 in your scene 1 metro, otherwise it’ll create an endless loop!

2 Likes

Thanks for your reply and this detailed explanation. I will try one of these solutions.

YEAH (+ 16 characters)

Just wondered whether there could be an option on this - either at firmware load or specialised word?

yeah, perhaps a separate op which could be marked as “experimental” similarly to M!. this thread is a better place for discussion: Teletype 3.+ feature requests and discussion do you want to post there?

trying to crowdsource this issue i’m having…

I’m new to TT and grid ops (and coding!) and with grid ops studies under my belt (yet still referencing), i wanted to check out the non-jf fugetta scene by @ghost. his script descriptions made it especially appealing as a beginner. I’m having an issue though and maybe someone has tried this out there.

i copied the scene a few times and had the same issue every time: no cv outs. are there lines i need to add to define cv values or variables? additionally, the 3 bottom right buttons (vertically) are wigging out a little, for lack of a better term, and the entire scene glitches out my grid to some extent. Is this because I’m running TT 3.0? would that have something to do with it?

any and all advice is greatly appreciated.

do you get triggers output but not CV? from what i can tell you shouldn’t have to do anything to enable CV.

no, running tt 3.0 shouldn’t cause anything like this. could you describe what you’re seeing a bit more? i’ll try to test the scene sometime next week as well.

Here’s what’s happening, apologies for the lack of quality in the clip. I’m getting trigger outs as you can see and hear, but no cv. The bottom right 3 buttons are flashing very fast (maybe related to the speed defined by the param knob, though I’m not quite sure). Those buttons are not toggled on. Strange.

thanks for the video! i’ll test the scene and report back (won’t be able to get to it until next week though)

just a quick look for now: i think you’re meant to initialize your own scale in pattern values 9-15 (pattern bank 0). this is likely why you’re not seeing CV change. enter some values there (they are in semitones).

flickering is likely caused by reinitializing some grid controls which shouldn’t be necessary but hard to tell from a quick glance, i’ll need to parse the scene.

Is there a way to display a fine meter type visualization kind of like a read-only fader at fine levels? I could use fader with type 4, but the inc/dec buttons obscure the lowest and highest leds.

Thanks, @scanner_darkly! I’ll give it a shot when I get home. @ghost, do you remember if this is something you did?

right now there is nothing like that, but you could replicate that with G.REC and G.LED. something like this (value we want to display is in variable A):

G.REC 0 Y / A 16 1 15 15
G.LED / A 16 Y % A 16

this is a horizontal version and it will use row Y - replace with whatever row you want. the max value you can display this way is 255, so you might need to scale A first too to bring it into the 0…255 range.

1 Like

Yes you do need to also copy the pattern information as well as the scripts. P0 9-15 relate to scale notes as @scanner_darkly points out.

Fingers crossed that works! Sorry I’m not much more help. Out of the loop with Teletype right now…

2 Likes

Ahhhh!!!

It’s alive! It’s alive!

How foolish I was. Many many thanks. (bottom 3 are still blinking like in the video though, but i don’ think there is any effect on usage)

1 Like

I’ve been thinking about scripting a version of John Conway’s Game of Life, after seeing @mloggers recent Instagram post where he uses an implementation on Norns to great, melodic effect.

As I am a few hours away from being able to sit at the TT, I thought it might be productive to post here and see if anyone can suggest an approach.

My first thought was to store the current and next state of the Grid’s 128 cells in the 4 available patterns (using 2 patterns per state), but the BIT op would be more efficient. (eg 8 cells could be stored in one pattern entry in binary and read off using BIT?)

Then I wondered if it was possible to use Pages (Groups?) and check the state of a cell in a group other than the active group - to avoid having to store the cell states anywhere else. I’m not very familiar with Pages.

Obviously a dedicated Op would be the fastest, least script-heavy solution - and maybe the TT devs have thoughts on this.

It would probably be more useful if the ruleset could be set as part of the Op. Or is this too niche? I think @mlogger has shown that it could be put to very musical use!

Edit: Just to add that, Game of Life Cellular Automata can’t be achieved with CHAOS.ALG 3.

3 Likes

yeah, i was thinking that the easiest approach would be to use grid buttons to represent cells. and since there are 256 buttons in total this gives us 2 pages (on grid 128), one for current and one for next generation.

so it would be something like this: define 2 pages of 128 buttons each. on each step calculate the next state and then switch pages. i think this should be totally doable, i might take a dig at it.

but yeah a dedicated op makes sense, and my plan was to allow specifying different rules - there is a lot of fun to be had experimenting with rules, especially if you put them under CV control or change them some other way. here is an example of it from the implementation i did for nw2s::b module:

6 Likes

Heres the official video for Zellen - there are quite a few play options (up/down,random,drunken walk, manual, semi manual, automatic play) and different modes, like born, reborn and ghost features, in the parameters menu. It’s very melodic because there big selection of quantized scales

6 Likes

Ah yes I forget there are actually 256 buttons.

The only thing I’m not sure about is handling the corners and edges (I’m presuming we want the filed to wrap). There will need to be a different set of conditionals for each page won’t there? As button 0 (top left) and button 128 (“top left” of 2nd page) are actually not in the same location. Or am I over-thinking it?

It looks like Zellen doesn’t wrap. Thinking about it, it might make more sense given there are only 8 cells vertically.

1 Like

cool, will check it out! i wouldn’t want to copy it (at least not without asking a permission first), and i think it’s good to have many different versions. and, of course, with both teletype and norns it’s super easy to try variations and different ideas.

i was able to implement game of life scene using 3 scripts / 15 lines. here is a quick demo:

here i’m simply mapping the number of live cells to various parameters, including pitch which uses a scale with 8 notes. i’ll think of some more interesting ways to interpret it musically. will post it soon, want to add a couple of things first.

@rikrak i’m using wrapping here which i think makes it more interesting but it’s easy to make it not wrap too.

2 Likes