### Install and Run Orca in Electron Source: https://github.com/hundredrabbits/orca/blob/main/README.md This snippet provides the necessary commands to clone the Orca repository, navigate to the desktop directory, install dependencies, and start the application using Electron. It outlines the standard development setup for Orca. ```bash git clone https://github.com/hundredrabbits/Orca.git cd Orca/desktop/ npm install npm start ``` -------------------------------- ### Initialize Orca Client and Register PWA Service Worker Source: https://github.com/hundredrabbits/orca/blob/main/index.html This JavaScript snippet sets up the Orca client, installing it into the document body and starting it upon window load. It also attempts to register 'sw.js' as a service worker for PWA features, but only if the application is not running from a local file protocol (e.g., 'file://'). A basic `require` function is defined to warn about failed module imports. ```javascript function require(name){ console.warn('Failed to require '+name) } Orca 'use strict' const client = new Client() client.install(document.body) window.addEventListener('load', () => { client.start() window.orcaClient = client; }) // Register PWA Service Worker if (location.protocol.substr(0,4) !== ('file') && 'serviceWorker' in navigator) { try { navigator.serviceWorker.register('sw.js') } catch (err) { console.warn(err) } } ``` -------------------------------- ### Orca Golf: Modulo Operator Example Source: https://github.com/hundredrabbits/orca/blob/main/resources/TUTORIAL.md Demonstrates the Orca syntax for performing a modulo operation. This snippet calculates `6 % 4` and outputs the result. ```Orca 1X. 6I4 ``` -------------------------------- ### SonicPi: Receive OSC Messages from Orca Source: https://github.com/hundredrabbits/orca/blob/main/resources/TUTORIAL.md Provides a Ruby `live_loop` example for SonicPi, configured to receive OSC messages from Orca on the `/osc*/a` address. This loop plays a bass drum sample when triggered. ```Ruby live_loop :drum do use_real_time sync "/osc*/a" sample :bd_haus, rate: 1 end ``` -------------------------------- ### Initialize Orca Client on Page Load Source: https://github.com/hundredrabbits/orca/blob/main/desktop/sources/index.html This JavaScript snippet sets up the Orca client. It instantiates a new Client, attaches it to the document's body, and then registers an event listener to start the client and inject 'Orca' into its acceleration system once the entire page has finished loading. ```JavaScript 'use strict'; const client = new Client(); client.install(document.body); window.addEventListener('load', () => { client.start(); client.acels.inject('Orca'); }); ``` -------------------------------- ### Orca Pilot: Add Reverb Command Source: https://github.com/hundredrabbits/orca/blob/main/resources/TUTORIAL.md Shows the Orca command to add reverb using Pilot. This command triggers the reverb effect. ```Orca ;revff ``` -------------------------------- ### Orca Golf: Lowercase Character Conversion Source: https://github.com/hundredrabbits/orca/blob/main/resources/TUTORIAL.md Illustrates the Orca syntax for converting a character to lowercase. This snippet takes 'C' as input and outputs its lowercase equivalent 'c'. ```Orca H.. CM1 ``` -------------------------------- ### Orca Pilot: Play Note Command Source: https://github.com/hundredrabbits/orca/blob/main/resources/TUTORIAL.md Demonstrates the Orca command to play a note through Pilot, assuming UDP is configured to port 49161. This command sends a note C in octave 3 with full velocity. ```Orca ;03Cff ``` -------------------------------- ### Orca Golf: Uppercase Character Conversion Source: https://github.com/hundredrabbits/orca/blob/main/resources/TUTORIAL.md Shows how to convert a character to uppercase using Orca syntax. This snippet takes 'c' as input and outputs its uppercase equivalent 'C'. ```Orca cA1. .dAZ ``` -------------------------------- ### Orca SonicPi: Send OSC Message Command Source: https://github.com/hundredrabbits/orca/blob/main/resources/TUTORIAL.md Shows the Orca command to send an OSC message to a `live_loop` in SonicPi. This command targets the `a` address, which can be synced by a SonicPi `live_loop`. ```Orca =a ``` -------------------------------- ### Orca Golf: Not Null Conditional Bang Source: https://github.com/hundredrabbits/orca/blob/main/resources/TUTORIAL.md Provides an Orca example for triggering an action (bang) if a free input `L` is not null. The `F` operator checks for a non-null value. ```Orca .L0. ..F0 ``` -------------------------------- ### Orca Ableton Live: Send MIDI Note Command Source: https://github.com/hundredrabbits/orca/blob/main/resources/TUTORIAL.md Illustrates the Orca MIDI operator to send a note to Ableton Live. This command sends a note C in octave 3 to MIDI Channel 1. ```Orca :03C ``` -------------------------------- ### Orca VCV Rack: Send MIDI Note and Gate Trigger Source: https://github.com/hundredrabbits/orca/blob/main/resources/TUTORIAL.md Demonstrates the Orca command to send a MIDI note and gate trigger to VCV Rack's MIDI-CV module. This command sends a C note in octave 3 with a velocity of 88. ```Orca :03c88 ``` -------------------------------- ### Orca Desktop Application Commands Source: https://github.com/hundredrabbits/orca/blob/main/README.md A comprehensive list of commands available in the Orca desktop application, including their shorthand equivalents and purpose. These commands control program execution, timing, interface appearance, cursor manipulation, file injection, and external device communication (MIDI, UDP, OSC). ```APIDOC play: Plays program. stop: Stops program. run: Runs current frame. bpm:value: Sets bpm speed to 'value'. apm:value: Animates bpm speed to 'value'. frame:value: Sets the frame value to 'value'. skip:value: Adds 'value' to the current frame value. rewind:value: Removes 'value' from the current frame value. color:r_hex;g_hex;b_hex: Colorizes the interface (e.g., 'f00;0f0;00f'). find:string: Sends cursor to 'string'. select:x;y;width;height: Move cursor to position 'x,y', and select size 'width:height' (optional). inject:filename;x;y: Inject the local file 'filename.orca', at 'x,y' (optional). write:glyph;x;y: Writes 'glyph', at 'x,y' (optional). time: Prints the time, in minutes seconds, since '0f'. midi:output_device_id;input_device_id: Set Midi output device to '#output_device_id', and input device to '#input_device_id'. udp:output_port;input_port: Set UDP output port to 'output_port', and input port to 'input_port'. osc:output_port: Set OSC output port to 'output_port'. ``` -------------------------------- ### Orca Advanced Control Commands (Project Mode) Source: https://github.com/hundredrabbits/orca/blob/main/README.md Orca offers advanced controls via its command-line interface, accessible by 'CmdOrCtrl+K'. This includes 'Project Mode' for injecting and navigating Orca files. Files can be loaded with 'CmdOrCtrl+L' and injected by name with 'CmdOrCtrl+B'. ```APIDOC CmdOrCtrl+K ``` ```APIDOC CmdOrCtrl+L ``` ```APIDOC CmdOrCtrl+B ``` -------------------------------- ### Detailed Usage of Orca MIDI Operator Source: https://github.com/hundredrabbits/orca/blob/main/README.md This documentation provides an in-depth explanation of the Orca MIDI operator (`:`), including its parameters (channel, octave, note, velocity, length) and how to format them. It clarifies how to send specific MIDI notes with optional velocity and duration. ```APIDOC MIDI Operator: Symbol: : Parameters: channel: MIDI channel (0-g) octave: Octave (0-g) note: Note (C-B, # for sharp) velocity: Optional, 0-g (0-127) length: Optional, number of frames note remains active Example Usage: :25C - C note, 5th octave, 3rd MIDI channel :04c - C# note, 4th octave, 1st MIDI channel ``` -------------------------------- ### Orca I/O Operators Reference Source: https://github.com/hundredrabbits/orca/blob/main/README.md This section outlines the input/output operators in Orca, which are crucial for interacting with external audio/visual interfaces. These operators enable sending MIDI, OSC, and UDP messages, as well as internal Orca commands. ```APIDOC : 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](#Commands). ``` -------------------------------- ### Orca MIDI Bank Select / Program Change Command Source: https://github.com/hundredrabbits/orca/blob/main/README.md The 'pg:' command combines MIDI program change and bank select functions. It allows specifying channel, MSB, LSB, and program number. MSB and LSB can be left blank for simple program changes. Program numbers are translated from 0-127 to 1-128 by the MIDI driver. ```APIDOC pg:channel;msb;lsb;program ``` ```APIDOC pg:0;;;63 ``` -------------------------------- ### Detailed Usage of Orca MONO MIDI Operator Source: https://github.com/hundredrabbits/orca/blob/main/README.md This documentation details the Orca MONO MIDI operator (`%`), highlighting its similarity to the standard MIDI operator but with the key distinction of stopping previous notes when a new one is played. This makes it ideal for monophonic synthesizers by preventing note overlaps. ```APIDOC MONO MIDI Operator: Symbol: % Parameters: channel: MIDI channel (0-g) octave: Octave (0-g) note: Note (C-B, # for sharp) velocity: Optional, 0-g (0-127) length: Optional, number of frames note remains active Behavior: Each new note stops the previously playing note if their lengths overlap. Ensures only a single note is played at once, suitable for monophonic analog synthesizers. ``` -------------------------------- ### Orca Core Operators Reference Source: https://github.com/hundredrabbits/orca/blob/main/README.md This section documents the core single-letter operators available in Orca, detailing their function and required inputs. These operators form the fundamental building blocks for creating procedural sequencers within the Orca environment. ```APIDOC 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. ``` -------------------------------- ### Orca MIDI Transpose Value Table Source: https://github.com/hundredrabbits/orca/blob/main/README.md Illustrates how Orca's MIDI operator interprets letters above the chromatic scale as transpose values, providing a mapping from characters to specific musical notes and octaves (e.g., '3H' equivalent to '4A'). ```APIDOC 0: _ 1: _ 2: _ 3: _ 4: _ 5: _ 6: _ 7: _ 8: _ 9: _ A: A0 B: B0 C: C0 D: D0 E: E0 F: F0 G: G0 H: A0 I: B0 J: C1 K: D1 L: E1 M: F1 N: G1 O: A1 P: B1 Q: C2 R: D2 S: E2 T: F2 U: G2 V: A2 W: B2 X: C3 Y: D3 Z: E3 ``` -------------------------------- ### Orca MIDI CC Operator Source: https://github.com/hundredrabbits/orca/blob/main/README.md The MIDI CC operator '!' sends a continuous controller value. It takes three inputs: channel, knob ID, and value. The value is calculated as a ratio of 36 over a maximum of 127. By default, it sends to CC64, with an offset configurable via the 'cc:0' command. ```APIDOC !channel knob value ``` ```APIDOC !008 ``` -------------------------------- ### Orca MIDI Pitchbend Operator Source: https://github.com/hundredrabbits/orca/blob/main/README.md The MIDI Pitchbend operator '?' sends two different values (LSB and MSB) for pitch bend. It takes three inputs: channel, LSB value, and MSB value. Values are calculated as a ratio of 36 over a maximum of 127. ```APIDOC ?channel lsb msb ``` ```APIDOC ?008 ``` -------------------------------- ### Orca Default Communication Ports Source: https://github.com/hundredrabbits/orca/blob/main/README.md This table lists the default UDP and OSC input and output ports used by Orca for external communication. ```APIDOC UDP Input: 49160 OSC Input: None UDP Output: 49161 OSC Output: 49162 ``` -------------------------------- ### Orca Base36 Numeric Conversion Table Source: https://github.com/hundredrabbits/orca/blob/main/README.md Defines the base36 system used by Orca, mapping alphanumeric characters to their corresponding numeric values (0-35). This table is crucial for understanding how numeric values are interpreted from characters in Orca operators. ```APIDOC 0: 0 1: 1 2: 2 3: 3 4: 4 5: 5 6: 6 7: 7 8: 8 9: 9 A: 10 B: 11 C: 12 D: 13 E: 14 F: 15 G: 16 H: 17 I: 18 J: 19 K: 20 L: 21 M: 22 N: 23 O: 24 P: 25 Q: 26 R: 27 S: 28 T: 29 U: 30 V: 31 W: 32 X: 33 Y: 34 Z: 35 ``` -------------------------------- ### Orca OSC Operator and Commands Source: https://github.com/hundredrabbits/orca/blob/main/README.md The OSC operator '=' sends data to consecutive eastwardly ports. The first character defines the OSC path, and subsequent characters are sent as integers using the base36 table. The target port and IP can be customized using the 'osc:' and 'ip:' commands. OSC is not available in the browser version of Orca. ```APIDOC =path_char_values ``` ```APIDOC =1abc ``` ```APIDOC =a123 ``` ```APIDOC osc:7777 ``` ```APIDOC ip:127.0.0.12 ``` -------------------------------- ### Orca UDP Operator and Commands Source: https://github.com/hundredrabbits/orca/blob/main/README.md The UDP operator ';' sends strings to consecutive eastwardly ports on 'localhost' by default. The target port and IP can be customized using the 'udp:' and 'ip:' commands respectively. UDP functionality is not available in the browser version of Orca. ```APIDOC ;message ``` ```APIDOC ;hello ``` ```APIDOC udp:7777 ``` ```APIDOC ip:127.0.0.12 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.