5

100R — orca

 2 years ago
source link: http://100r.co/site/orca.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
100R — orcaMenu

introduction

orca_01.jpgorca.idle.png

Orca is an esoteric programming language, designed to create procedural sequencers in which each letter of the alphabet is an operation, where lowercase letters operate on bang, uppercase letters operate each frame.

The application is not a synthesiser, but a flexible livecoding environment capable of sending MIDI, OSC & UDP to your audio interface, like Ableton, Renoise, VCV Rack or SuperCollider.

story

Back in 2016 when first operating on a sailboat, we experienced frequent failures with both software & hardware, largely due to our small energy storage and lack of reliable connectivity. The solution was to create tools that would be better suited to our needs. The objective was to replace the bloated, closed-source or subscription software that we were using to do creative work, such as Photoshop, Xcode and Ableton. We were somewhat familiar with web technologies, so we decided to build our programs on this new framework called Electron.

While solving some of our issues, Electron was rapidly increasing in size and soon joined the rest of the software that we wanted to do away with. Our focus shifted toward reducing our energy use, and to ensure reliability by removing all dependencies.

To transition toward our new goals, we developed offline web versions as temporary stand-ins while researching ways to build more resilient software. We eventually ported our tools to C, but while we had achieved ideal energy usage, portability was still an issue, so we kept looking. We learnt 6502 assembly, seeing players run our NES game on all these different platforms gave us a new idea.

And so, in 2021 we took our biggest leap yet toward longtermism and designed a small virtual machine with a focus on implementability; meaning that moving forward, our software will live on a virtual machine. In other words, the code will stop having to be ported, but instead to make something available on a new platform would our needs or devices change, the emulator remains the only piece of code to be ported, which is explicitly designed to be easily implemented.

This is where we are now. uxn may solve our cross-platform issues, while being extremely light. It took us a long while to get here, we hope that one day the Uxn versions of our software replace the desktop and web versions [16.05.21].

Go slow, and fix things.

Distributions

The major distributions are the terminal version (written in C99), the web version, the desktop version, and the norns version, each version implement their own variance of the IO operators.

There is also Orca Toy (written in ANSI C), a minimalist implementation of the basic operators created for educational purposes.

The Desktop and Web version were the first, most stable and user-friendly versions of Orca. As stated in the section above, we are currently working on a light version for uxn that will work on all platforms [16.05.21].

download

Operators

To display the list of operators inside of Orca, use CmdOrCtrl+G.

  • 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 halt: Halts southward operand.
  • I increment(step mod): Increments southward operand.
  • J jumper(val): Outputs northward operand.
  • K konkat(len): Reads multiple variables.
  • L less(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 jymper(val): Outputs westward operand.
  • Z lerp(rate target): Transitions operand to input.
  • * bang: Bangs neighboring operands.
  • # comment: Halts a line.
  • : midi(channel octave note velocity length): Sends a MIDI note.
  • % mono(channel octave note velocity length): Sends monophonic MIDI note.
  • ! cc(channel knob value): Sends MIDI control change.
  • ? pb(channel value): Sends MIDI pitch bench.
  • ; udp: Sends UDP message.
  • = osc(path): Sends OSC message.
  • $ self: Sends ORCA command.

MIDI

The MIDI operator : takes up to 5 inputs('channel, 'octave, 'note, velocity, length).

For example, :25C, is a C note, on the 5th octave, through the 3rd MIDI channel, :04c, is a C# note, on the 4th octave, through the 1st MIDI channel. Velocity is an optional value from 0(0/127) to g(127/127). Note length is the number of frames during which a note remains active.

MIDI MONO

The MONO operator % takes up to 5 inputs('channel, 'octave, 'note, velocity, length).

This operator is very similar to the default Midi operator, but each new note will stop the previously playing note, would its length overlap with the new one. Making certain that only a single note is ever played at once, this is ideal for monophonic analog synthetisers that might struggle to dealing with chords and note overlaps.

MIDI CC

The MIDI CC operator ! takes 3 inputs('channel, 'knob, 'value).

It sends a value between 0-127, where the value is calculated as a ratio of 36, over a maximum of 127. For example, !008, is sending 28, or (8/36)*127 through the first channel, to the control mapped with id0. You can press enter, with the ! operator selected, to assign it to a controller. By default, the operator sends to CC64 and up, the offset can be changed with the command cc:0, to set the offset to 0.

MIDI PITCHBEND

The MIDI PB operator ? takes 3 inputs('channel, 'lsb, 'msb).

It sends two different values between 0-127, where the value is calculated as a ratio of 36, over a maximum of 127. For example, ?008, is sending an MSB of 28, or (8/36)*127 and an LSB of 0 through the first midi channel.

MIDI PROGRAM CHANGE

This is a command (see below) rather than an operator and it combines the MIDI program change and bank select functions.

The syntax is pg:channel;msb;lsb;program. Channel is 0-15, msb/lsb/program are 0-127, but program will automatically be translated to 1-128 by the MIDI driver. program typically correspondes to a "patch" selection on a synth. Note that msb may also be identified as "bank" and lsb as "sub" in some applications (like Ableton Live).

msb and lsb can be left blank if you only want to send a simple program change. For example, pg:0;;;63 will set the synth to patch number 64 (without changing the bank)

UDP

The UDP operator ; locks each consecutive eastwardly ports. For example, ;hello, will send the string "hello", on bang, to the port 49160 on localhost. In commander, use udp:7777 to select the custom UDP port 7777, and ip:127.0.0.12 to change the target IP. UDP is not available in the browser version of Orca.

OSC

The OSC operator = locks each consecutive eastwardly ports. The first character is used for the path, the following characters are sent as integers using the base36 Table. In commander, use osc:7777 to select the custom OSC port 7777, and ip:127.0.0.12 to change the target IP. OSC is not available in the browser version of Orca.

For example, =1abc will send 10, 11 and 12 to /1, via the port 49162 on localhost; =a123 will send 1, 2 and 3, to the path /a.

Advanced Controls

Some of Orca's features can be controlled externally via UDP though port 49160, or via its own command-line interface. To activate the command-line prompt, press CmdOrCtrl+K. The prompt can also be used to inject patterns or change settings.

orca_02.jpg

Project Mode

You can quickly inject orca files into the currently active file, by using the command-line prompt allowing you to navigate across multiple files like you would a project. Press CmdOrCtrl+L to load multiple orca files, then press CmdOrCtrl+B and type the name of a loaded .orca file to inject it.

Default Ports

UDP Input OSC Input UDP Output OSC Output 49160 None 49161 49162

Commands

All commands have a shorthand equivalent to their first two characters, for example, write can also be called using wr. You can see the full list of commands here.

  • play Plays program.
  • stop Stops program.
  • run Runs current frame.
  • bpm:140 Sets bpm speed to 140.
  • apm:160 Animates bpm speed to 160.
  • frame:0 Sets the frame value to 0.
  • skip:2 Adds 2, to the current frame value.
  • rewind:2 Removes 2, to the current frame value.
  • color:f00;0f0;00f Colorizes the interface.
  • find:aV Sends cursor to string aV.
  • select:3;4;5;6 Move cursor to position 3,4, and select size 5:6(optional).
  • inject:pattern;12;34 Inject the local file pattern.orca, at 12,34(optional).
  • write:H;12;34 Writes glyph H, at 12,34(optional).
  • time Prints the time, in minutes seconds, since 0f.

Terminal Version

orca_03.jpg

The livecoding environment for the C implementation runs in a terminal. It's designed to be power efficient. It can handle large files, even if your terminal is small, it is the perfect candidate for your Raspberry Pi.

Web Version

orca_04.jpg

It is now possible to use Orca in your browser, without the need to install it as an application.

We decided to build a browser compatible version in response to Apple moving toward requiring all applications to be notarized, you can learn more about how this issue will impact small developers here. While we no longer support the OSX platform, our web version will allow Orca users still using Apple products to run Orca in their browser.

Use Orca Live

De-evolved Orcabit

license

The license applies to all the documented projects, the projects themselves and their assets. The source code of this website and our apps are under the MIT License, but the assets and text content of this website and of our apps are under the BY-NC-SA4.0 License. We are happy to pass knowledge, and that others can learn from our projects, improve on them, or make them into something else that is useful, but please, do not try to sell our projects as is under a different name. Doing so is very lazy, and disrespectful to us.

DO NOT resell or mint our work.

You can find our more recent projects on Sourcehut.

pull request

See the Github and Sourcehut repositories. Pull Requests are welcome, but please read our design philosophy first.


Edited on Sun Oct 17 23:29:21 2021 [edit]
Hundredrabbits © 2021 — BY-NC-SA 4.0

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK