Orca is a livecoding language and virtual machine.
Orca is a two-dimensional esoteric programming language in which every letter of the alphabet is an operator, where lowercase letters operate on bang, uppercase letters operate each frame.
If you wish to learn how to use Orca, watch a tutorial or ask your questions in the forum.
Orca is a wildly unique visual programming tool. It's also an inky black and seafoam green alphabet soup, pulsating to some species of broody electronic industrial throb.Ivan Reese, The Future Of Coding
- Read Manual
- Download Orca
- Graphical version, Uxntal.
- Terminal version, ANSI C.
- Browser version, Javascript
- Norns version, Lua
The Orca operations Manual
The base operators are present in every version of Orca, no matter the platform:
A
add(a b): Outputs sum of inputs.B
subtract(a b): Outputs difference of inputs.C
clock(rate mod): Outputs modulo of frame.D
delay(rate mod): Bangs on modulo of frame.E
east: Moves eastward, or bangs.F
if(a b): Bangs if inputs are equal.G
generator(x y len): Writes operands with offset.H
hold: Holds southward operand.I
increment(step mod): Increments southward operand.J
jumper(val): Outputs northward operand.K
konkat(len): Reads multiple variables.L
lesser(a b): Outputs smallest of inputs.M
multiply(a b): Outputs product of inputs.N
north: Moves Northward, or bangs.O
read(x y read): Reads operand with offset.P
push(len key val): Writes eastward operand.Q
query(x y len): Reads operands with offset.R
random(min max): Outputs random value.S
south: Moves southward, or bangs.T
track(key len val): Reads eastward operand.U
uclid(step max): Bangs on Euclidean rhythm.V
variable(write read): Reads and writes variable.W
west: Moves westward, or bangs.X
write(x y val): Writes operand with offset.Y
yumper(val): Outputs westward operand.Z
lerp(rate target): Transitions operand to input.*
bang: Bangs neighboring operands.#
comment: Holds a line.
The special operators make use of a platform's devices, here are the suggested special operators:
$
self(cmd): Send a command to Orca, or load external file.:
midi(ch oct note velocity*): Send a midi note.!
midi cc(ch knob val): Send a midi control change.;
pitch(oct note): Send pitch byte out./
byte(high low): Send a raw hexadecimal byte.=
play(ch oct note velocity*): Play note with built-in synth.
Source
uxnasm orca.tal orca.rom view raw
An introduction to basic operations in Orca.
Basics
This section will teach the basics of playing a note and a sequence of notes.
Send a midi note
D8
, will send a bang, every 8th frame.:03C
, will send theC
note, on the 3rd octave, to sendC#
, use the lowercasec3
.
D8... .:03C
Play a random note
aRG
, will output a random value betweenA
&G
, the rightside uppercase letter indicates an uppercase output.
D8.aRG. .:03D..
Make a melody
04TCAFE
, will create a track of 4 notes, and output its first value.
D814TCAFE .:03A....
Play the melody
8C4
, will count from0
to3
, at 1/8th speed.
.8C4..... D804TCAFE .:03C....
Logic
This section will teach the basics of automating logic decisions and changing the values of operators dynamically.
Play every second note
2I6
, will increment to6
at a rate of2
.
.2I6....... D646TCAFEDG .:03D......
Play a note with an offset
1AC
, will add1
toC
, to outputD
. To getD#
, use the lowercased
, like1Ac
.
D8.1AC. .:03D..
Play a sequence back and forth
- The combination of the output of
C6
intoB3
will bounce a value between 0 and 3 over 6 frames.
4C6...... .4B3..... D414TCAFE .:03A....
Play a note at a specific interval
.I4
, will increment to4
, at a rate of1
..F2
, will bang only if leftside input is equal to2
.
I4..... 3F2.1AC ..:03D.
Play a note at a specific frame
aCa
, will count to 10, at 1/10th of the speed..Ca
, will count to 10, at normal speed..f5
, will bang every 65th frame.
.aCa. ..6F4 Ca... .Y.f5
Projectors
This section will teach the basics of creating new operators procedurally.
Hold a moving operator
E
, will travel further eastward, every frame.H
, will stop aE
from moving.
..H E..
Read an operator at position
22O
, will get the operatorE
at the offset2,2
.
22O... ..E..H .....E
Write an operator at position
22X
, will output the operatorE
at the offset2,2
.
22XE. ..... ..... ....E
Animate a projector
B8
, will bounce between0
and8
.
C........... .B4......... .1XE........ ........:03C ........:03D ........:03E ........:03F ........:03G
Variables
This section will teach the basics of storing accessing and combining that stored data.
Write a variable
aV5
, will store5
in the variablea
.
aV5
Read a variable
Va
, will output the value of the variablea
. Notice how variables always have to be written above where they are read.
.....Va ....... aV5..Va .....5. ....... aV6..Va .....6.
Read 3 variables
3Kion
, will output the values ofi
,o
&n
, side-by-side.
iV0.oV3.nVC ........... 3Kion...... .:03C......
Carry a value horizontally and vertically
Y
, will output the west input, eastward.J
, will output the north input, southward.
3.. J.. 3Y3
Carry a bang
- This method will allow you to bring bangs into tight spots.
D43Ka... .Y.:03C.
I hope this workshop has been enlightening, if you have questions or suggestions, please visit the forum, or the chatroom. Enjoy!
Base 36 Table
Orca operates on a base of 36 increments. Operators using numeric values will typically also operate on letters and convert them into values as per the following table. For instance Do
will bang every 24th frame.
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
C | D | E | F | G | H | I | J | K | L | M | N |
12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
O | P | Q | R | S | T | U | V | W | X | Y | Z |
24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 |
Transpose Table
The midi operator interprets any letter above the chromatic scale as a transpose value, for instance 3H, is equivalent to 4A.
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B |
---|---|---|---|---|---|---|---|---|---|---|---|
_ | _ | _ | _ | _ | _ | _ | _ | _ | _ | A0 | B0 |
C | D | E | F | G | H | I | J | K | L | M | N |
C0 | D0 | E0 | F0 | G0 | A0 | B0 | C1 | D1 | E1 | F1 | G1 |
O | P | Q | R | S | T | U | V | W | X | Y | Z |
A1 | B1 | C2 | D2 | E2 | F2 | G2 | A2 | B2 | C3 | D3 | E3 |
Golf
Here are a few interesting snippets to achieve various arithmetic operations.
1X.. | Modulo Will output the modulo of 6 % 4 . |
cA1. | Uppercase Will output uppercase C. |
H... | Lowercase Will output lowercase C. |
.L0. | Not Null Will bang if L free input is not null. |
15M05
— Orca Uxn Release14C11
— Orca Workshop Mila, Montreal13V03
— Orca Workshop Foolab, Montreal13J12
— Orca Workshop Algomech, Sheffield12W13
— Orca Release
incoming alicef azolla roms marabu pilot enfer norns studio merveilles