Well, not really, I think.
When i hold the button down, it should check the PRM value once, then wait for a significant change in the value, and keep the last value when leave the button up.
Well, not really, I think.
yes, you save the current param value when a button is pressed in a variable, and then when the button is released you compare and update if different.
the obvious issue with this approach is you will only get the new value when the button is released. if you want to monitor the value while the button is pressed you’ll have to do that in a metro script. there is no way in teletype to continuously monitor
IN value and trigger some action when it changes - you would need to constantly poll/compare in metro script.
Clarifying question: The docs for
K all say something like this:
each script gets its own
Jvariable, so if you call
a script from another script you can still use and modify
Jwithout affecting the calling script.
This means that if I do something like
J 0; SCRIPT 1, script 1’s
J will be set to
0 as it runs, but if I alter it inside Script 1, the calling script won’t see any change, right?
no think of them as variables with scope specific to each script. in that example the
J value of the calling script will be set to
0, and the
J value of script 1 will be unaffected.
however, you are correct that if you modify the value of
J in script 1, then
J will still retain a value of
0 in the calling script.
K add 20 additional variables, two per script(including
INIT scripts). maybe an easier way to think of them is like so:
J-METRO, K-METRO //only accessible in the METRO script J-INIT, K-INIT //only accessible in the INIT script J1, K1 //only accessible in script 1 J2, K2 //only accessible in script 2 ... J8, K8 //only accessible in script 8
ahhhh, so only
I functions like how I describe. Thanks for the clarification!
yes I think one of the ideas behind the ops was that you could for example call a script using a loop like so.
L 0 4: SCRIPT 2
then in script 2 store the
I value into
K, thus allowing you to use another loop.
J I L 0 4: X ADD X J
So, I’ve got this running, but there is a problem :
If I move the PRM knob when not holding the grid button, the PRM is grabbed and Z is updated. I don’t want that. I want it to update only if I move the PRM knob after having pressed the grid button.
The reason is that the button(s) will have an action when I simply press them (like a “live mode”) and another action when i hold them (“edit value mode”).
STORE PRM WHEN HOLD
#1 M.ACT G.BTN.V 1 // toggles metro with the button X + 7 G.BTN.V 1 // X is 7 when the button is released, 8 when pressed #2 #3 #4 #5 #6 #7 Z PRM // updates Z #8 Y ABS - Z PRM IF GT Y 1000: TR.P 3; Z PRM // detects a knob move IF GT Y 1000: X 7 // switches to script 7 to write values #M $ X // triggers either script 7 or script 8 #I G.BTN 1 0 0 1 1 0 7 1 // the button P.N 0; Z PRM M 200
I managed to make it work. I needed an extra variable.
STORE PRM WHEN HOLD #1 M.ACT G.BTN.V 1 A PRM X + 7 G.BTN.V 1 #2 #3 #4 #5 #6 #7 A PRM IF G.BTN.V 1: Z A #8 Y ABS - A PRM IF GT Y 1000: TR.P 3; A PRM IF GT Y 1000: X 7 #M $ X #I G.BTN 1 0 0 1 1 0 7 1 P.N 0; A PRM M 200
if i correctly understand what you’re trying to do i think you could simplify the script:
#1 A PRM M.ACT G.BTNV #M IF < ABS - A PRM 1000: BREAK A PRM; TR.P 3 Z A #I G.BTN 1 0 0 1 1 0 7 1 M 200; M.ACT 0
I’m interested in whether it’s possible to alter the CA rules dynamically, either based on a trigger or using the param knob. But can’t think of a way to change the Init script etc. Is there a way to do this?
Derks CA Recipe
Y SCALE 0 255 0 13 X
CV 1 N PN 0 Y
IF BGET Y _: TR.P 1 # fill the blank with any number 1-8
IF BGET Y _: TR.P 2 # fill the blank with another number, 1-8
Z SCALE 0 16383 0 2 PARAM # performative gesture
CV.OFF 1 V Z # jumps octaves on demand
putting something like
CHAOS.R RAND 255 into a script will change the rule randomly upon triggering.
depending, you might get better results by putting
CHAOS instead of
CHAOS.R: effectively changing the initial value, rather than the rule.
(running off to try this, thank you!!)
This is much less accurate. Z gets wrong velues. Try for instance to set it to 0. not sure why, though.
ah i see the difference. in my version once
PARAM changes by more than 1000 it will update
Z. it will not update it again until it changes by more than 1000 again.
in your version once
PARAM value is changed by more than 1000 it will continue updating
PARAM on each metro. so yeah, for this you’d need to use an extra variable (or do what you did with storing a script number in a variable - that’s a cool trick!).
A recent favorite post which I’ve already quoted on another forum and have as my current desktop wallpaper:
I love that Teletype can do so many different things, but usually when I use it, it’s acting as a clock source and simple trigger sequencer. Sometimes the patch grows and it also throws out some modulation signals or additional synchronized triggers or maybe CV sequences, but it usually starts from that basic beginning.
yes! i love that thank you for that reminder, always good to remember that!
PS i’m dekemcculo on the other forum who asked about tromsø – u always come thru for me starthief, next time maybe I should just PM you <3
I almost exclusively use my TT for “simple” stuff. I think why I like it so much is I can have it do a couple of simple things or even change the simple thing it can do.
i’m trying to use the parameter knob to change the probability that this voice of JF actually makes sound. i want the pattern to keep moving either way so it can return to its original shape when it’s fully CW. i don’t have much experience using several of the functions at play in this script, so i’m not sure what i’m doing wrong . a few other notes:
X is set to 4
i’m trying to use 999 as a rest. weirdly, it works most of the time but occasionally it’ll register as the note value and i’ll get a super high-pitched note, barely in audible range. if i’m doing something wrong in line 2, lmk!
JF.VOX 1 N PN.NEXT 0 V X IF PN.HERE 999: JF.VOX 1 0 0 PROB PARAM: > X 3
I would try setting line JF on line 2 this way:
JF.VOX 1 N 0 V 0
Also, 999 is sometimes getting set as the N value in line 1 of your pattern. Maybe rework the script so that it is never set by getting the pattern value and then checking it. I like using negative numbers for rests so I can check them using GTE.
Here’s an idea where probability would be that we would or wouldn’t execute the rest of the script. I didn’t test this, so let me know how it goes.
PARAM.SCALE 1 100 PROB PARAM: BREAK A PN.NEXT 0 IF GTE A 0: JF.VOX 1 N A V X ELSE: JF.VOX 1 N 0 V 0