A photo of Max Glenister Max Glenister

Using ORCA with FluidSynth on the Pocket C.H.I.P.

This post is about using the ORCA livecoding playground on the Pocket C.H.I.P.

From the ORCA wiki:

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. This livecoding language is designed to procedurally generate MIDI, UDP or OSC messages.

So let’s get started…

Follow the official ORCA instructions for installing on Raspberry Pi:

sudo apt-get install git libncurses5-dev libncursesw5-dev libportmidi-dev
git clone https://github.com/hundredrabbits/Orca-c.git
cd Orca-c
make          # Compile ORCA
./build/orca    # Run ORCA

After you’ve installed ORCA, install the binary to make it usable from anywhere:

sudo cp build/orca /usr/local/bin

Next, you’ll want something for ORCA to output to (to make noise!) so you will need either a real MIDI device (e.g. over USB), or you could use a synthesizer. For this I’d recommend FluidSynth. You can install FluidSynth easily from the Debian apt repository:

# install the fluidsynth midi synthesizer
# this should also install the fluidsynth-soundfont-gm package too
sudo apt install fluidsynth

To launch FluidSynth:

# start fluidsynth, using the soundfont that installed with it:
fluidsynth --audio-driver=alsa /usr/share/sounds/sf2/FluidR3_GM.sf2

If you want to launch FluidSynth in the background you can use the -i flag.

Next you need to start ORCA and set it to output to the fluidsynth MIDI output device:

  1. Press Ctrl+D in ORCA to bring up the menu
  2. Go to “Midi Output”
  3. Select “Synth input port (xxxx:0)”

Channels 0-8 should be piano, and 9 is a drum kit.

If you want to launch ORCA from the Pocket C.H.I.P. home menu, you could use pocket-home (instructions here) and add a shortcut to launch ORCA.

The icon command to use would be vala-terminal -fs 8 --fullscreen -e orca, but you’ll also need to have FluidSynth or your MIDI synthesizer of choice running before you launch ORCA.

About the author

A photo of Max Glenister

Max Glenister is a Front-end Developer based in Oxfordshire. For work he spends his time designing, validating and implementing user interfaces. For fun he tinkers with Virtual Reality, 3D printing, embedded systems, game development and many other things.

You can keep up with Max on Github, Twitter and Reddit


    There are no comments yet! You can add a comment using Github issues.