I picked this up somewhere and thought it was something in computer language:

nil is the object that means “there is no object”

If you see a 0, it’s a 0. CHAOS always returns a value.

If you want to know why CHAOS(0) = 0 for some values of ALG and R, check the CHAOS thread.


Put another way, Teletype commands that reduce to numbers produce numbers. Commands that do not do not, e.g.: TR.P 1.

CHAOS reduces to a value.

think i see the problem in the alg setter and will do a PR for it

Don’t bother. That might not be the right repo. A bug has already been fixed, unless the problem is in chaos.c.

Won’t be able to fix this until tonight, out for the day.

it is in chaos.c. algo setter should call scale_values, otherwise the new algo runs with inappropriate value/param ranges. i made a PR.

out for the day.

of course, no rush. its stormy here and the power went out for a couple hours. nature break!

@Leverkusen Thanks for alerting us to the CHAOS.ALG bug, it’s fixed in Alpha 3.

Cool-ass rhythm generator:

#I
CHAOS.ALG 3
CHAOS.R 25
CHAOS 63
M 125

#M
A CHAOS
IF BGET A 0: TR.P 1
IF BGET A 1: TR.P 2
IF BGET A 2: TR.P 3
IF BGET A 3: TR.P 4
9 Likes

thread recategorized to Development

@zebra: Thanks much for the explanation! Good thing is I can ride this elevator (and read the linked Wikipedia articles) over and over, until I will eventually get it…

The CA is easier to understand for me. Some questions:

When you say “wrapped”, you mean that the leftmost of its 8 cells has a neighbour to its left which is the rightmost of its 8 cells? So that if I want to calculate the next state of the leftmost cell, I have to look at the current states of cells 8, 1, and 2. Correct?

If it would be “unwrapped”, then there is nothing to the left of cell 1. Is it then always assumed (on calculating the next state of cell 1) that to the left of cell 1 and to the right of cell 8 there is always value 0?

:+1:


I plan to procrastinate the USB Disk Mode interface to spin out CA fro CHAOS tomorrow.

Initial Proposed Operators

CA.R 123          | select rule 123
CA 63             | set current value to 63
CA                | get next value

Larger Data Set

We can make the set wider, but on teletype, we’ll only be able to access 16 of them at a time, as we use 16 bit integers. What’s musically most useful? 64 cells (= 4 x 16 bit)?

To support windowed operation on a larger data set, we will need to allow the user to access the offset of the window, either as:

  • Number of bits relative to MSb or LSb
  • Number of words (16 bits) relative to MSB or LSB, i.e.: its window number
    • This effectively limits the range of the offset, which might be musically limited

For example,

CA.OFFSET 17      | set window offset to 17 bits from MSb position
    --- OR ----
CA.WINDOW 3       | get current value at window 3

Additionally, using a window means we need an access operator that does not iterate

CA                | get current windowed value
CA.NEXT           | get and store next iteration

Edge behaviour

Who likes the idea of configuring edge mode between WRAP, ZERO, and ONE?

CA.WRAP 1         | set wrap at edge on |  looks clumsy, but
CA.ONE 1          | set '1' at edges on |  follows paradigm
CA.ZERO 1         | set '0' at edges on |

If we had to prefer one of the behaviours, which one would be most useful?

i took the mildly ridiculous step of making a little c program to do interactive ascii animations of elementary CA. (i want to include these structures in a New Thing anyways.)

you can change the rule, boundary positions, boundary modes, and (partially) the state. might be helpful in getting a feel for the range of things this structure can generate and what parameters would be useful.

[ https://github.com/catfact/cabash/ ]

(ed: oh i guess its linux only now until/unless i work around lack of posix clocks)

some point this week i’ll add OSC bindings and maybe libmonome bindings to make it actually usable for music. and certainly something to save and recall states. maybe other tweaks.

i’d also like try asymmetrical bound modes actually, and add some functions to clear state, set random state, set simple patterns (like a single active cell or an euclidean pattern.)

BTW, i’m not advocating this for inclusion in teletype, just posting in case anyone is interested. if it were considered useful for TT, the relveant functionality is encapsulated by ca.h, ca.c (this includes the features proposed above.) it is not implemented in a very memory-efficient way - cell states are bool arrays instead of bitfields - but that’s easy enough to modify.

7 Likes

Very nice!

Let me know when you’re ‘done’ with it, and I’ll integrate it into teletype.

Or make a PR against my master with those two files added and I’ll start work on the operator code in a local branch.

Heeeey! I thought we were a team!
:grin:

1 Like

To spite us both, I did nothing yesterday. :stuck_out_tongue:

(Interesting news cycles make me unproductive)

2 Likes

$ and CHAOS remind me of Malcolm McLaren’s t-shirt… :sunglasses:
Unknown

1 Like

in case it is interesting, i updated the cabash sequencer (linked above)

algorithmically:

  • can set asymmetrical bound modes. this turns out have interesting possibilities; by fixing one side and wrapping the other, i’ve seen “stable” behavior on one side that “flows” off into a virtually infinite field on the other.

i think that pretty much brings this to “completion” in the sense that i can’t think of any other parameters you can really add to this (very simple) structure. i have few opinions to what params should/shouldn’t be included in a TT op. but a sliding output window of 16 cells seems like an obvious choice. probably don’t need full control over the bounds.

also added some features that have no little or no bearing on TT but do make this thing usable for computer music:

  • sends an OSC message on each update, containing the complete cell array. (sends to supercollider lang port on localhost, by default)

  • OSC destination, rule, bounds mode, bounds positions, and speed can be specified in a configuration file at startup (actually a lua script.)

  • added a “patterns” module that initializes the state with randomness, emptiness, single cell or other simple patterns in response to keypresses

if you want to use this code i’d just grab ca.h and ca.c. replace bool arrays with bit manipulation if reducing static memory by 8x is worth, um, 2-4 extra operations per cell, per update.

might try this thing at audio rate, with interpolation, as a massively multichannel oscillator.

3 Likes

What’s the current status on the alias? Can I suggest that we hold off giving it one for now, especially if it’s a symbol. It’s easy to add an alias later, but it’s hard to take it away once it exists already.

3 Likes

No alias yet.

@zebra amazing! I’ll start sewing this into teletype. Given how good CA mode has been for rhythms already, I look forward to these new edge modes.

2 Likes

it seems CA.OFFSET has a wider use than fixed CA.WINDOW positions (which would be equivalent to CA.OFFSET with multiples of 16, right?)

the edge mode config seems awkward?

otherwise i’ll defer to those closest to this functionality (ie @zebra)

1 Like

It follows the mode change syntax of the turtle fence mode, but I agree that it looks clumsy.

cool, no problem then.

1 Like