this is a thread to share and discuss scripts and scenes for teletype grid integration. as this thread grows hopefully very long i will maintain this index page to make finding specific things easier. and remember, you can use a lot of grid scenes without a grid!
This a fantastic. One general note about the Github repo – I’d love to see work in progress posted there, as well as “finished” scenes. It’s easy to update scripts, and we can even have people improving and tweaking each other’s work. Totally happy to see “unfinished” stuff in there, just indicate what state it’s in as part of the readme. (I’m going to cross-post this to the other TT code thread as well)
I think it needs a lot of improvement ! I am quite weak at coding…
I was posting here to discuss how to improve it.
One of the main question is : how to input cell values ?
What i had in mind :
toggle a ‘page’ with a button that would display the same 4x4 grid, with led intensity relative to the pattern value
then hold a button and turn the PARAM knob while holding.
yeah i think something very rené-esque could be done with grid where you would have 4x4 square of buttons on the left which would display the current value and allow you to change values by holding a button and turning the knob as you suggest, and on the right you’d have a 4x4 square displaying the current turtle position and pressing here would move the turtle to that position.
set up buttons, one group will be on the left side - these are to set values (done by script 1), the other group is on the right - this is to jump the turtle to a position (done by script 2). also define the fence and the script for the turtle.
#1
IF EZ G.BTNV: BREAK
X % G.BTNI 4; Y / G.BTNI 4
I SCALE 0 V 10 0 15 PARAM
PN X Y I
G.REC * X 2 * Y 2 2 2 I I
this will set the corresponding pattern value when a button in the left group is pressed. the knob value will be scaled to 0…16. we then draw a rectangle with the brightness set to the new value.
#2
@X % G.BTNI 4; @Y / G.BTNI 4
SCRIPT 3
this will set the turtle coordinates if a button in the right group is pressed, and it will display the current position by calling:
#3
G.REC 8 0 8 8 0 0
G.REC * 2 @X * 2 @Y 2 2 1 15
this script will draw a rectangle corresponding to the current turtle position. this will also get called when the turtle itself moves to a different cell. this is where you probably want to output a trigger and update a CV.
this will also need a script to display the current values initially and to move the turtle (or set it up to move by itself).
New idea/starting point for a 16 step sequencer. It’s just me studying, maybe you guys feel more like i’m polluting the thread ?
Clock is script 5
Row 1 displays value
Row 2 sets value of the step above: press and move PARAM.
16STP
#1
IF EZ G.BTNV: BREAK
X - G.BTNI 64
I SCALE 0 V 10 0 127 PRM
IF GT G.BTNI 64:
P X I; G.BTN.L X / P X 8
#2
#3
#4
#5
G.REC 0 1 16 1 0 0
Y ADD Y 1; Y WRAP Y 0 15
G.LED Y 1 15
P.L 16; P.I Y; CV 1 N P.HERE
TR.P 1
1:
Y - 7 / G.BTNI 15 //Creates a variable ‘Y’ which defines the row number - 0 at bottom, 7 at top.
CV 1 N + * Y 5 % G.BTNI 15 // This calculates the position on the x axis using MOD (%). It also creates an offset of 5 semitones for each row by multiplying the row number by 5. These 2 values are then added together to give the note.
TR 1 G.BTNV //Gate output
I’ve left the first column blank to add more features. Portamento should be easy, magic shapes less so!
@scanner_darkly this is so awesome, thank you for all the work you’ve put in. It’s amazing how much you can do with this with so few lines of code!
yeah not sure where that S came from! i edited the post.
I SCALE 0 V 10 0 15 PARAM
this line takes the knob value, scales it down to 0…15 and saves it to I. the actual range might be 0…14 (or even 1…14) until @sliderule adds the calibration ops, so if this is what you get just change the line to I SCALE 0 V 10 0 16 PARAM
i often use this to set Metro rate with the knob: M! SCALE 0 V 10 500 20 PRM
I’d noticed this as well. Buttons trigger their respective script on both button down and up. I can think of some cases where this could be very useful but normally it’s a little annoying. I suspect @scanner_darkly had good reason for designing it like this?
Edit:
One way around this is to use this PRE in Script 1:
IF NZ G.BTNV:
That way it will only activate the script on the press down, when the buttons value is 1
Then ( in a different situation ), you could have alternative actions for button release using IF EZ G.BTNV. That’s actually pretty cool when you think about it! I take back my “it’s a little annoying” comment
I’ve got a coding question : how would you create 16 “radio groups” from left to right ? I feel like a need a loop within a loop but cannot get it work.
my guess was :
I:
L 0 15 : SCRIPT 8
8:
A MUL I 8
G.BTX A I 0 1 1 1 7 1 1 8
but it doesn’t work.
EDIT, found the answer in some code of the grid studies :
I:
L 0 15 : Y I; SCRIPT 8
8:
A MUL Y 8
G.BTX A Y 0 1 1 1 7 1 1 8
So the question is : Why can’t i just use I directly ?
So here is a version of Daemon to work with Just Type:
Step sequencer triggering 5 different notes from a chord.
Chords are stored in patterns, you can change these. The lowest row plays the root note one octave lower.
Chords can be switched using the lower buttons
There is a start stop button and script speed is taken from the Param knob
EDIT Now with added forward/reverse and chord editor mode - I’ve updated the code below
It is pretty much an extension of @scanner_darkly 's trigger sequencer study.
Next I’d like to try and add a grid based chord editor!