Topic: Infinite loops
@synthetivv: Don’t know if it fulfills your demands and if my solution is the most elegant way to do this specific behaviour, but I did a infinite loop using 3 scripts to periodically update the param knob value as long as specific buttons are pressed. I wasn’t aware of the limitation which @scanner_darkly described but finally found the rabbit hole (?) even if I still don’t know whats going on in detail (looping “I” from $6 to $7 which redirects to $8, but “I” loop of $6 still have context to $7 and counting properly to 15. And the DEL 200: $8 seems only to be triggered for the complete loop “I” 0 - 15 once! which I still don’t understand :upside_down_face: completely - seems L 0 15: I; $ 7 is overruling the DEL-command til it is looped to “I” 15) here - but at least I understand now why I have needed three scripts. (I added DEL 200: $8 to avoid cpu lags due to constantly cycling through those three scripts.)

#6
L 0 15: I; $ 7

#7
C SCL 0 V 7 0 84 PRM
IF G.BTN.V I: PN % I 4 / I 4 C
CV 4 N C
DEL 200: $ 8

#8
IF > G.GBTN.C 0 1: $ 6
ELSE: BREAK

posted a new beta that contains experimental MIDI in ops here: Teletype MIDI IN ops [experimental]

i’ve created a separate thread for it because there likely will be changes. if you’re not interested in MIDI in, use the beta posted here. the MIDI in version will be updated to always include whatever the beta from this thread includes.

2 Likes

Moving the discussion from this thread as suggested by @scanner_darkly.

I’ve been playing around with a new extension to the DEL.X/R family of mods that allows exponential rhythms by multiplying each successive delay by a fixed factor.
Syntax is:
DEL.G a b c d
where a is the number of repetitions, b is the initial repeat time, c and d are the numerator and denominator of the fractional multiplier.

As a starting point, try out:
DEL.G 16 200 2 3: TR.P 1

You can try an experimental build here:
teletype.hex (620.1 KB)

I’ll leave this to percolate for a couple of weeks in case anyone has any feedback or suggestions, after which I’ll tidy everything up and put up a real PR.

5 Likes

feel free to edit the top post too, it’s a wiki and meant to be updated by whoever is posting the latest version!

another beta for disting ex integration beta testing: Teletype Disting EX integration

to clarify, we have several beta firmwares available:

  • the “official” beta - this is for features that were added after the latest official release and are considered complete
  • several betas for features that are experimental or still being discussed / tested - they will contain everything from the “official” beta.

i’ve updated the OP to make this more clear.

3 Likes

Hi, given the recent additions to W/ in 2.0 firmware (Mannequins W/2 Beta Testing) to the ii communication is someone already working on integrating new ops? I hope I could go around with at least trying to implement like two of them over the weekend but if someone is already doing this then maybe we could settle on just one fork.
By the way what would be prefered way of dealing with “legacy” W/ ops? Should they stay in WS namespace and 2.0 would have WS2 or should they be overwritten or something else altogether? Or maybe there is anything in new 2.0 firmware that would make the teletype integration problematic?
Disclaimer: I have not worked with ii before so I am maybe underestimating such task (or even if it is possible at the moment) so note to anyone reading this - please don’t get your hopes up yet :wink:

2 Likes

My preference would be to replace the old ops, with ops relevant for w/ 2.0. I think you’re going to need more details of what’s been implemented (op numbers?) on the W/ side before you can make a start.

One issue with the w/ 2.0 ops, mentioned by Trent in the demo was the timestamp. If I have this right, given the size of the tape, it needs a larger int size than Teletype supports. I don’t know what length would be implied by sticking to Teletype’s int size. I don’t know what other work arounds might be possible. Perhaps a two arg set operator, and two ops for get?

1 Like

I haven’t catch the stream (and it is not available at the twitch from what I see at the moment) but for timestamp problem with int size the first hacky idea that comes to my mind would be on ii side use timestamp till the available int size at teletype and timestamp + series of seek commands for anything bigger, and as you already mentioned play around with idea of passing two args to operator or even maybe defining precision for timebased values like there are for voltage, so for example you could have:

  • 10S - ten seconds
  • 10M - ten minutes
  • 500MS - five hundred milli seconds

or alternatively:

  • 10 - ten minutes
  • 10T - ten seconds
  • 10TT - ten milliseconds

But again I haven’t done any actual development on teletype in the past so take my ideas with a grain of salt :smiley:

It’s worth pointing out that the only control there is on the TT side is to call the operator with whatever variables are defined. Any changes to the behaviour have to be implemented on the W/ side, and that’s not open source. So yes, there could be multiple ops defining the timestamp resolution, or working around it as I suggested, either of which could be resolved on the W/ side, but that’s not how it’s currently implemented.

I’ve not looked at implementing this on TT yet mostly because it’s not part of my testing case. Adding the ops should be an easy (albeit tedious) process.

The w/2 ii spec is public already. you can see all the required details via the ‘wtwo’ open pull request on the crow github page.

Naming-wise, i’d suggest W/T, W/D and W/S. I used WS previously not realizing there could be ‘special characters’ in op names. The slash is skinny so 3 chars shouldnt be too long.

The only real issue with the timestamp commands is when TT requests a time from W/. The response is 4 bytes long so TT will probably just discard the second 2bytes. The data is 2bytes of seconds (that’s enough for +/-9 hours) and 2bytes of subseconds. I believe this uses 1V = 1second so (0…1638).

This means teletype can already get whole-second accuracy over the tape, but subseconds will require some thinking.

Regarding replacing the old ops, the REC and PLAY ops are backward compatible, and i can probably make that true for the others so the API doesnt break. If people want to move to W/T it doesnt really matter.

If someone has the skills & motivation to add TT support for W/2 and the new JF commands and crow commands i’d be very happy to compensate you with (your choice of) one of those modules.

7 Likes

Here’s a link to that PR: https://github.com/monome/crow/pull/342

2 Likes

Teletype can specify how many bytes it expects the follower to respond with. One way to deal with this is maybe by having two separate ops for seconds and subseconds, receiving all 4 bytes in each op, and discarding either the first two or the last two response bytes depending on which op was called.

3 Likes

the most prominent style is to use dot notation, so would be W.T, W.D, W.S, but tt language has so many ops and styles now slash can also be used if it’s easier to remember.

1 Like

A slash would look like an operator to me and the dot notation looks like a namespace… but it isn’t my language :slight_smile:

3 Likes

How about just dropping the ‘/’, WT, WD, WS?

I’d prefer that but it may upset the current WS op?

How about WP for Polysynth?

1 Like

It’s alive (somewhat :P)


and quick check of w/synth controlled by teletype:

I have implemented most of the commands of w/ synth mode:

W/S.P voice pitch
W/S.V voice velocity
W/S.PV voice pitch velocity
W/S.PN pitch velocity
W/S.AR ar_mode
W/S.LT lpg_time
W/S.LS lpg_symmetry
W/S.C curve
W/S.R ramp
W/S.FI fm_index
W/S.FR fm_numerator fm_denomenator
W/S.FE fm_envelope_amt

Naming is just temporary and is mostly short hand of names in this file: https://github.com/monome/crow/blob/2348ecb01ff8603e3fb483a1235ba305d77337b0/lua/ii/wsyn.lua

Code is here for those interested (albeit it is 2AM here so there will be bugs probably): https://github.com/kfirmanty/teletype/tree/w/-2.0

And firmware hex file for those who are brave/impatient (but please backup everything on teletype before doing upgrade as I can’t promise that I haven’t break anything in the process of adding operators):
teletype.hex (623.0 KB)

19 Likes

That’s some quick work! :slight_smile:
Slashes def look odd to me as an op… :stuck_out_tongue:

Can you speak to two or more with this implementation or is that depending on the W/ firmware?

1 Like

Fantastic work! Bravo!!!

1 Like