Skip to content

Instantly share code, notes, and snippets.

@hhyyg hhyyg/operators.md

Last active May 8, 2019
Embed
What would you like to do?

A add: Outputs the sum of inputs.

aAb
 z
z = a + b

Screen Shot 2019-04-24 at 22 35 58

B bounce: Bounces between two values based on the runtime frame.

rBt
 z

C clock: Outputs a constant value based on the runtime frame.

xCy
 z
  • x: rate
  • y: mod
// 1frame : 1x
for (i = 0; i++; i < y) {
  z = i;
}

2019-04-23 22 38 57

D delay: Bangs on a fraction of the runtime frame.

xDy
 z
  • x: rate
  • y: mod

1 bangs / x * y frame

2019-04-23 22 40 56

E east: Moves eastward, or bangs.

-----> E ----->

F if: Bangs if both inputs are equal.

aFb
 z
if (a == b) {
  z = Bangs;
}

Screen Shot 2019-04-24 at 22 41 59

G generator: Writes distant operators with offset.

xylG
   z
  • x: offset x
  • y: offset y
  • l: length

Screen Shot 2019-04-22 at 21 46 49

H halt: Stops southward operators from operating.

H
* #<-- stop

2019-04-23 22 43 37

I increment: Increments southward operator.

xIy
 z
  • x: min
  • y: max
for (i = x; i++; i < y) {
  z = i;
}

2019-04-23 22 44 51

J jumper: Outputs the northward operator.

x
J
z
z = x;

Screen Shot 2019-04-23 at 22 45 44

K konkat: Outputs multiple variables.

It works with variables.

lK[variables...]
  [z]

l:length

Screen Shot 2019-04-23 at 8 20 56

L loop: Loops a number of eastward operators.

rlL[...z]

r: rate l: length

M modulo: Outputs the modulo of input.

aMb
 z
z = a % b

Screen Shot 2019-04-23 at 22 47 24

N north: Moves Northward, or bangs.

↑
N

O offset: Reads a distant operator with offset.

xyOp
  z
  • x: offset x
  • y: offset y
  • p: Reads position

Screen Shot 2019-04-22 at 22 04 29

P push: Writes an eastward operator with offset.

xyPi
  z
  • x: offset
  • y: length(capacity size of offset)
  • i: input value

Screen Shot 2019-04-22 at 22 12 32

Q query: Reads distant operators with offset.

xylQp
   z
  • p: Read position
  • x: offset x
  • y: offset y
  • l: length

Screen Shot 2019-04-22 at 22 17 59

R random: Outputs a random value.

xRy
 z
  • x: min value
  • y: max value
  • z = Random(x..<y)

S south: Moves southward, or bangs.

S
↓

T track: Reads an eastward operator with offset.

xyT[input values]
  z
  • x: key
  • y: length
  • z = (input values)[key]

Screen Shot 2019-04-23 at 22 48 31

U uturn: Reverses movement of inputs.

U like a mirror

2019-04-23 22 50 23

V variable: Reads and write globally available variables.

Write:

aV2
let a = 2

Read:

 Va
 z
z = a

Screen Shot 2019-04-22 at 22 35 06

W west: Moves westward, or bangs.

<--- W

X teleport: Writes a distant operator with offset.

xyXv
  z
  • x: offset x
  • y: offset y
  • v: input value

Screen Shot 2019-04-23 at 22 51 33

Y jymper: Outputs the westward operator.

xYz
z = x

Z zoom: Moves eastwardly, respawns west on collision.

* bang: Bangs neighboring operators.

# comment: Comments a line, or characters until the next hash.

: midi: Sends a MIDI note.

^ cc: Sends a MIDI CC value.

; udp: Sends a UDP message.

= osc: Sends a OSC message.

Notes

Move operators:

.N.
W.E
 S.
Z
.................................................................
............................................3....................
.A12.0B.1C4.2D3..F33..124Gabcd...H..I2b.....J............3L312...
.3.......3.......*..................5.......3....................
.................................................................
..........................abcd...................................
.................................................................
.................................................................
.....M65..12O...25Pa.....125Q...........R2a.......#NS............
.....1......5.......a...12345...........5........#W.E............
..............5...............12345...............#S.............
.................................................................
.................................................................
..13Tabc......U...00Xz...4Y4....................Z................
....b...............z.............Z....Z.........................
.................................................................
.................................................................
.................................................................
..............................dV8.eV9............................
.................................................................
...............................2Kde..............................
....aV2.bV5.cV7..................89..............................
.................................................................
.....Va..Vb..Vc..................................................
.....2...5...7...................................................
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.