> teletype : code exchange

llllllll

#343

but you are triggering the script?


#344

no, it doesn’t get triggered. at least, earthsea doesn’t do anything. this is the only bit that works, and only in live mode (as it requires typing and executing each line rather than waiting for an event):

Y RRAND 1 4
II ES.PATTERN Y
II ES.RESET 1

that will launch the pattern number determined by RRAND; re-run to get another random value for Y. is the problem with waiting for knob changes, or with getting earthsea to run?


#345

I mean does script 1 get triggered? anything in tt just happens when a script gets triggered. being it 1-8 from trigger input or manually, M periodically or I on startup.

maybe try putting SCRIPT 1 in the M script and adjust M to something very small?


#346

i didn’t realize that’s how the script numbering works, corresponding to the inputs. i tried putting it in I, and that allows me to manually launch it at any time with Win-I–with the expected stop/start results if PARAM is zero or not. but the script doesn’t run on its own.

setting M to a small value (5) and moving the script to it results in earthsea freaking out as it attempts to launch random scripts but is immediately stopped by TT, because param is zero. that doesn’t keep earthsea’s playhead from lighting and dimming, though. turning param past 0 results in crazy earthsea pattern launch speed, LEDs flickering wildly. TT doesn’t seem care about ES recorded playback time. it’s sending an unending stream of start messages.

so…partial success.


#347

what you’re trying to do will require a bit more plumbing. here it is in psuedo-code:

  • use metro to check param value
  • if param state (zero or not) is different than the last read, then do your action

so your script needs to know what happened on the last read. right now it’s probably just flooding ES with random pattern calls or doing nothing, as you describe.

if you can’t figure this out i’ll write it up later today for you


#348

ahh, a couple of the linking bits that hadn’t occurred to me–using metro, and what may turn out to be reading/manipulating the stack. it’s further ahead than where i’m at in the TT lessons, but you’ve got me thinking about some ideas already. i’ll check back in with my progress. thanks!


#349

i just would like to know if it’s possible to connect two white whale to one teletype, and if there’ll be reconised as different module ? sorry if this have been already asked.
thanks


#350

Currently no. Right now,only ansible has the framework for multiple modules. With different firmwares(orca and white whale) they show up differently. With same firmware, it’s not supported.


#351

If you’re a coder I can talk you through the theory of what to change to get 2 White Whales addressed.

But it would be a complete hack and you’d have to remake the modifications each time a new firmware came out. It’s definitely only something to attempt if you feel confident at these things.


#352

Ok thanks, i’m not a coder :slight_smile:
There’s already à lot of things to do with the trilogy !


#353

hello !

i’m learning teletype with the great studies we have here ! what a great a module !
there’s something i don’t understand in operator… MOD ?
what is the operration exactly ? MOD 7 2 = 1, i don’t get it :frowning:

by the way, i create pdf for teletype manual and studies, maybe it can interrest someone, i don’t know maybe if you want to upload them on monome website ?


#354

MOD means modulo. It means, what is left when you divide 7 by 2 and you only work in integers. Maybe not the most elegant explanation.
But for example:

7 / 2 = 6 and 1 left.

So something like like equal amount of apples in 2 baskets. You’ve got seven. How many apples do you have to eat yourself to have nothing left, after you put the apples in the baskets


#355

thanks for your explanation !
i find the exact operation :slight_smile: :
MOD 7 2 = 7 - ((7/2) x 2) = 7 - (3 x 2) = 7 - 6 = 1

i don’t know how i’ll use it but i’m happy to understand it :slight_smile:
hahaha !


#356

very useful when you maintain your own counter which needs to stay in a certain range.

say you want 16 steps.

I
X 0

1
X ADD X 1
X MOD X 16

triggering Script 1 will increase X by 1.
because of the modulo calculus, X will always stay between 0-15 (16 steps). after 15 it will return to 0.

(of course you don’t need that with P.Next and the like, as it does this for you with P.L)


#357

great, thanks ! i just try it and it will usefull like that !


#358

is there any way to reset the 4 pattern with only one script ?
i used P.I and P.N in four script actually.

or change an index value ( P 0 X for exemple) in pattern 0 and 1 at the same time in one script ?

thanks


#359

yeah, the patterns are currently not really great to use in parallel, at least not all 4.

this should work, but it’s 2 scripts:

1
P.N I
P.I 0

2
L 0 3 : SCRIPT 1


#360

That’s an interesting idea…

I’m currently in the process of adding a PN.* command for every P command e.g. PN.PUSH. Maybe a PA.* version that affects all the patterns might be worth considering.

edit: actually once the PN.I op exists, you’ll be able to L 0 3 : PN.I I (or any other PN op), so maybe PA might be overkill.


#361

PA is interesting for sure, but good for setting, not so much getting


#362

They could sum values maybe? Anyway, hoping to get the new PN ops finished this week. Then I’ll start thinking about ;.