# CHAOS Operators

#119

0 Likes

#120

@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?

0 Likes

#121

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?

0 Likes

#122

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.

(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

#123

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.

0 Likes

#124

Heeeey! I thought we were a team!

1 Like

#125

To spite us both, I did nothing yesterday.

(Interesting news cycles make me unproductive)

2 Likes

#126

\$ and CHAOS remind me of Malcolm McLarenâs t-shirtâŚ

1 Like

#127

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

#128

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

#129

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

#130

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

#131

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

0 Likes

#132

cool, no problem then.

1 Like

#133

offset seems important and immediately useful. âscrubbingâ the offset will give you immediate gratifiction.

bounds mode, iâm not so sure. main reason i made the standalone thing is to investigate. there are some possibilities in there but i dunno about parameterization. here are three options:

1. no parameter: just fix the bounds to one behvavior. iâd suggest both fixed low for âclassicalâ results.

2. one parameter: have 9 (?) different settings for bounds:

• wrap / wrap
• wrap / lo
• wrap / hi
• lo / wrap
• hi / wrap
• lo / lo
• lo / hi
• hi / lo
• hi / hi

or i guess just skip the symmetries / inversions and have wrap / wrap, lo / hi, lo/lo and lo / wrap.

1. two parameters: 3 values each.
2 Likes

#134

gratifiction!

///////////////
(20ch)

2 Likes

#135

This one gets my vote.

1 Like

#136

HmmmmâŚ

If the total data set is N 16-bit ints, complete initialization of the population takes 2N commands, or a loop.

For example, with a 64 bit population,

``````L 0 3: CA.OFF * 16 I; CA 21845
``````

Should there be a shortcut for this behaviour?

0 Likes

#137

i dunno, sure - i made these âpatternâ commands in the cabash cause i thought they were convenient:

1 Like

#138

If I enter a value somewhere above 10,000 on CHAOS.R, the CV value will continue for about 4 or 5 triggers after hitting F10, after that the CV stops changing value.

If I then change from say CHAOS.R 12000 back to CHAOS.R 500 the CV remains silent until I go through a INIT and start over. I want to verify that I do indeed press F10 between value changes and that for values under 10k I donât have any issue with CHAOS.R

0 Likes