Skip to content

boorch/bOrca

 
 

Repository files navigation

ORCΛ

Orca is an esoteric programming language and live editor designed to quickly create procedural sequencers. Every letter of the alphabet is an operation, lowercase letters execute on *bang*, and uppercase letters execute each frame.

This is the C implementation of the ORCΛ language and terminal livecoding environment. It's designed to be power efficient. It can handle large files, even if your terminal is small.

Orca is not a synthesizer, but a flexible livecoding environment capable of sending MIDI, OSC, and UDP to your audio/visual interfaces like Ableton, Renoise, VCV Rack, or SuperCollider.

Main git repo GitHub mirror
git.sr.ht/~rabbits/orca github.com/hundredrabbits/Orca-c

About this fork

I'll try to add new operators based on my needs. I'm not a professional programmer, just a hobbyist, so most of the code here is generated by ChatGPT, based on 'painfully' extensive directions I provided. I've tried to include comments as much as possible to remember what I did and why, but I'm fairly certain it's not the most elegant code that adheres to proper standards. You should consider this fork to be 'somewhat' functional. Currently I'm focused on Orca-c only, since it's the main variant I use (on my Raspberry Pi Zero 2W, connected to my iPad Pro 11", accessed through SSH, and outputting notes through USB, acting as a MIDI Gadget).

Scale Operator (^):

Outputs "note" based on the provided root note and scale.

RootNote Scale Operator Degree
R S ^ D

Example:

  • 01^2
  • Input '0': C
  • Input '1': minor
  • Input '2': 3rd
  • Output: 'd' (D#)
Degree Scale
0 Major Scale
1 Minor Scale
2 Major Pentatonic Scale
3 Minor Pentatonic Scale
4 Blues Major Scale
5 Blues Minor Scale
6 Lydian Scale
7 Whole Scale
8 Diminished Scale
9 Super Locrian Scale
a Locrian Scale
b Phrygian Scale
c Neapolitan Minor Scale
d Neapolitan Major Scale
e Hex Phrygian Scale
f Pelog Scale
g Spanish Scale
h Bhairav Scale
i Ahirbhairav Scale
j Augmented2 Scale
k Purvi Scale
l Marva Scale
m Enigmatic Scale
n Scriabin Scale
o Indian Scale

Scales and offset values taken from https://patchstorage.com/author/amiika/

MidiChord Operator (|):

Extension of Midi operator with 3 input notes. The first note processed is always considered the root note. Every following note is assumed to be "higher" than the previous one. (So no chord inversions sorry)

Midichord Channel Octave Note 1 Note 2 Note 3 Velocity Duration
| C O N1 N2 N3 V D

Example 1:

  • |03CEGff
  • Plays C3 E3 G3

Example 2:

  • |03GECff
  • Plays G3 E3 C4

Example 3:

  • |03CCCff
  • Plays C3 C4 C5

Random Unique Operator ($):

Requires bang. Similar to the Random Operator, but designed to avoid producing identical outputs on consecutive bangs in a creative (in other words, "hacky") manner.

MIDI Arpeggiator Operator (&):

The MIDI Arpeggiator operator (&) is designed to generate arpeggiated sequences from a set of input notes across specified octave ranges. It supports dynamic direction control, allowing sequences to ascend, descend, or both based on the input parameters. It only sends MIDI when it's "banged". This bears the possibility of coming up with quite unique patterns since it decouples when a note is "selected" and when a note is "played".

Parameter Description
Arp Pattern Selects the arpeggiation pattern.
Note to Play Determines the current note in the arpeggio pattern.
Octave Range Sets the range and direction of octaves for arpeggiation.
Operator "&"
Channel MIDI channel for output.
Base Octave Starting octave for the first note in the pattern.
Note 1 First note in the arpeggio sequence.
Note 2 Second note in the arpeggio sequence.
Note 3 Third note in the arpeggio sequence.
Velocity MIDI velocity of the played notes.
Duration Length of each note in the sequence.

Inputs

Arp Pattern Note to Play Octave Range Operator Channel Base Octave Note 1 Note 2 Note 3 Velocity Duration
P N R & C O N1 N2 N3 V D
  • P: Arpeggio Pattern Index (0-9 for predefined patterns)
  • N: Note to play (based on selected arpeggio pattern's offset)
  • R: Octave range and direction (0-4 for ascending, a-d for descending, 5-9 & e+ act like 0)
  • C, O, N1, N2, N3, V, D: Similar to the MidiChord operator

Example

  • 02a&04CEGf3: This example uses arpeggio pattern 2, plays the first note in the pattern, spans across 1 octave in a descending direction, on channel 0, starting from octave 4, with the notes C, E, G, velocity f, and duration 3.

This operator generates a MIDI arpeggiated sequence based on the input parameters, allowing for intricate rhythmic patterns to be easily created and manipulated live. Adjust the Arp Pattern, Note to Play, and Octave Range to explore different musical ideas.

Arpeggio Patterns

Each pattern is defined by a sequence of steps that dictate the order of arpeggiation. Below are the currently available patterns and their descriptions:

To use a pattern, select its index as the Arp Pattern input for the MIDI Arpeggiator operator (&). The Note to Play input determines which step in the selected pattern to play, allowing the sequence to progress. Suggestions: Connect Note to Play to a Clock operator, or a Track operator, or a Random Unique operator for complex and/or unexpected patterns.

Pattern Index Notes Sequence Description
0 1, 2, 3 Up
1 3, 2, 1 Down
2 1, 3, 2 Converge up
3 3, 1, 2 Converge down
4 2, 1, 3 Diverge up
5 2, 3, 1 Diverge down
6 1, 2, 3, 2 Up bounce triangle
7 3, 2, 1, 2 Down bounce triangle
8 1, 2, 3, 3, 2, 1 Up bounce sine
9 3, 2, 1, 1, 2, 3 Down bounce sine
a 1, 2, 3, 0 Up with rest
b 3, 2, 1, 0 Down with rest
c 1, 3, 2, 0 Converge up with rest
d 3, 1, 2, 0 Converge down with rest
e 2, 1, 3, 0 Diverge up with rest
f 2, 3, 1, 0 Diverge down with rest
g 1, 2, 3, 2, 0 Up bounce triangle with rest
h 3, 2, 1, 2, 0 Down bounce triangle with rest
i 1, 0, 2, 3, 0 Riff with rests
j 1, 0, 3, 2, 0 Alternate riff with rests
k 1, 2, 0, 3, 0 Riff variation with rests
l 1, 3, 0, 2, 0 Another riff variation with rests
m 1, 2, 0, 1, 3 Riff with internal rest
n 1, 3, 0, 1, 2 Riff alternate with internal rest
o 1, 2, 0, 1, 3, 0 Extended riff with rests
p 1, 0, 2, 1, 0, 3 Complex riff with rests
q 1, 0, 3, 1, 0, 2 Complex alternate riff with rests

*IMPORTANT: Arp patterns 0 to 9 are most likely to be permanent. You can come up with complex sequences using only them and banging the operator in various timings. But the patterns a and above are just some experimental combinations and they're likely to change in future updates.

About

Live Programming Environment(C Port)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 93.9%
  • Shell 6.0%
  • Makefile 0.1%