Using ORCA with FluidSynth on the Pocket CHIP
This post is about using the ORCA livecoding playground on the Pocket CHIP
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:
- Press Ctrl+D in ORCA to bring up the menu
- Go to “Midi Output”
- 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 CHIP 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.