D / + KR.CV 4 1 N 1
…this works for the lowest note, and the one above, but returns wrong values above the second semitone… I have to stop for today, it is pretty late here… Thanks for your great support… I am back on this tomorrow…

This is a strange issue because Kria and Teletype use the same note pattern code from libavr…

EDIT: From libavr first 12tet values for 14-bit DAC are 0, 137, 273, 410, 546, 683, 819, 956, 1092, 1229, 1365...

…or is it a calibration issue. I have never used it, but I think there is a possibility to fine-tune the Kria-Scaling…

the values I get are: 0, 136, 272, 408, 544, 680 and all of a sudden 820, 956, 1092,1228, 1364…

EDIT: I’m going to start a new thread for this question because it could clog up this one with technical biz.

1 Like

From my understanding there are four “patterns” to work with. However is there a limit to the number of variables and size of variables one can assign? As an example, I may have all four patterns in use but want to generate some variation on them - can I store this variation in an array of some kind? or are the four pattern “arrays” all one has?

You can use the pattern buffers as an array-- though it could take some co-ordinate mapping depending on how you want to use it.

I put together a system for storing 18 short arpeggiator patterns in the pattern buffer, with a routine connected to the param knob that’ll select which pattern, whereby it copies the one from the “storage” portion I set aside in the buffers into a “working” section where the main script would cycle through the pattern. You’re limited to the 256 16-bit values, but you can use them however you want.

One thing that would make this sort of thing a bit easier though is if we could address the pattern array as a single linear array, 0-255 cells, in addition to the existing way, using another opcode or something. For me, I needed a 10x18 array so I had to “unmap” my 10x18 coordinates, and re-map them to 4x64 which could have been simpler with an array that didn’t assume how you might want to structure it…

But, I was able to get it going that way, so it can be made to work.

1 Like

RE: address patterns as 0-255:

Say we have the address 0-255 stored in A, this will retrieve the value on location A:

PN / A 64 % A 64

And this will store 7 in location A:

PN / A 64 % A 64 7

But I guess you already figured that out :slight_smile:

EDIT: It’s not my itch, but if you’re ready to roll up your sleeves, this should be fairly easy to add as a new OP, could be useful to others. PX seems available, so the above could be:

PX A
PX A 7 

The OP should IMO handle addresses outside the 0-255 range (including negative numbers) elegantly by wrapping them into 0-255, so the following should yield identical results:

PX 0
PX 256
PX -256

Or you could step it up a notch and have it accept user defined wrapping points:

PX.WRAP X (turn wrapping on/off default to on)
PX.MIN (lower bound, default to 0)
PX.MAX (upper bound, default to 255)

So to work with only locations 10-19 in pattern 1 () you could do

PX.MIN 74; PX.MAX 83
PX 0 (same as PN 1 10)
PX 1 (same as PN 1 11)
PX 10 (same as PN 1 10)

NB: Hope I got the wrapping right, but you get the idea…

I guess further discussion related to such new OP should go in Teletype 3.2+ feature requests and discussions

2 Likes

Yeah, I’ll post a link to this there. Having something like your PX would save quite a few characters in my case, and quite possibly obviate the need to even use the A variable to hold the coordinate (because I can likely get away with not having to use the index value more than once). Example: to store a value in a “virtual” two-dimensional array of arbitrary dimensions would reduce to something like this:

PX + X * 12 Y Z

Where Z is the value being stored, and X and Y are the indices of an arbitrary Nx12 “virtual” array.

Can a delay trigger multiple things to happen? For example, a delay causes both a trigger to fire and a CV output to advance through a pattern of values. Would the delay have to simply call a separate script to make this happen?

I think (but I’m not sure) that DEL operator will only delay code from the same line (post section). But you can have two commands on the post section. So I think it is possible a line like this:

DEL 300: TR.P 1; CV 1 N 7

2 Likes

I’m wondering if anybody has a tip for a simplified clock divider.
At the moment my approach is the following (with X being the clock division):

T WRAP + T 1 0 X
IF EZ T: TR.P 1

I would love to use EVERY but it doesn’t seem work for my purposes as I need the trigger to fire on the zero as in the case of the counter above. Or am I looking at this the wrong way?

Hello.
I would like limit the param knob range for controlling some parameters in Disting Ex.
(I control Disting with i2C from the Metro script for continuous value)

So I write
LIM PARAM V 0 V 2
In live mode but the Param is still to the same value.
Am I wrong with the command ?

I would use this operator:

PARAM.SCALE min max set the min/max scale of the Parameter Knob

2 Likes

@SMesquida thanks perfect :ok_hand: that’s pretty easy and precise with this.
:blush::raised_hands:

1 Like

I’d do

IF ! % T X: TR.P 1
T + T 1

I always maintain T (second line) as global time keeper in M after calling the “regular” scripts. This way all scripts share a common, clean clock and are free to handle time individually. If you want to start from zero automatically, the following resets T to 0 if not called within the last second (1000ms):

IF > LAST $ 1000: T 0
7 Likes

Such an elegant solution! Thank you for the tip!

1 Like

Super newb quick question here, as I’m busy with the TT studies these days:

Why if I set up TR.TIME x y within I SCRIPT doesn’t change the actual pulse width of an out in any case?
I’m able to achieve this command only in Live Mode.

Where I’m wrong?

Sounds odd, should work. Things to check:

  1. exactly the same command? (use copy/paste from live prompt to script)
  2. sure you’ve executed I? (press F10 to run it)
  3. overwriting the values somewhere else (check other scripts have no “TR.TIME” in them)
  4. I assume you’re using numbers instead of x and y (so something like TR.TIME 1 100), right?
  5. sure you’re triggering + watching the same TR as you’ve set TIME on?

If everything fails, post your complete scene here (also good exercise on writing to USB-stick, opening on computer and copy/paste to forum)…

1 Like

Thanks, I definitely not executed script I …

For some reason I assumed it was enough to press Enter on the keyboard for script I… maybe because there isn’t a trigger in for that script?

I’ll definitely manage to do it as soon as I have an other issue, so very soon :slight_smile:

EDIT: I would like to ask another question, i read somewhere here on a TT Topic about someone “stuck” with TT Studies because of some changes in the firmware over the time, there are parts of the Studies they have become misleading maybe or i misunderstood?

1 Like

We try to keep all the documentation up to date. Anyone is welcome to make contributions to the docs repo, or if you post here about errors then someone will try and fix them. What post are you referring to that mentioned errors in the studies?