2020-09-16 Orca

I saw a fascinating introduction to ORCA. Basically, it’s a very terse programming language that you write in all four directions. One of the possible uses for Orca is to make music. If you start looking, you’ll find some fantastic live coding setups.

One of the output formats is MIDI. The problem is that it doesn’t come with a synthesizer. I looked at some of the stuff I had and was confused. Jack, Aeolus, Yoshimi, Supercollider, Sonic Pi, what the hell?

I finally settled on VCV Rack. It’s the modular synth emulator. When you start it up, it already comes with a minimal setup that allows you to play on your keyboard, as it gets translated to MIDI, and from MIDI to (emulated) voltage.

So all I had to do was to pick ALSA and Midi through in VCV Rack. In Orca, I used Ctrl-D to show the menu → MIDI Output → Midi Through. And it worked!

First little program:



Give you a regular beep as the D emits bangs on every third frame which plays a MIDI note: octave 5, C.

A little more:

D1  C

The D emits bangs which activate the MIDI output, and the note is determined by the adder which adds a (10) to whatever the counter emits (0-9). Use < to slow it down.

Sadly, I know very little about modular synthesizers and therefore I would have to learn a lot before getting anything done! 😅

Screenshot of a modular synthesizer emulator and a tiny Orca window

What also works is to connect Orca to the OP-1 by Teenage Engineering. Use Ctrl-D to show the menu → MIDI Output → OP-1 Midi Device MIDI 1. It’s going to play whatever you have active on your OP-1. Hm... I guess that means you can only use MIDI channel 1 (0 in Orca) and that means you only get one instrument.

Table with laptop and a tiny synthesizer connected to it

Ah, and FluidSynth works on the command-line! Thank you, @dokuja, for this suggestion. There’s also a GUI if you want it, called Qsynth. I needed --audio-driver=alsa for it to work. I never quite know how these things work: OSS, ALSA, Jack, who knows… But MIDI+ALSA seems to be what works on my system, so yay! 😃

Orca and FluidSynth running side-by-side in Tilix

FluidSynth uses sound fonts. I guess you want a “standard” sound font to get started? I’m using FluidR3_GM.sf2. So, on a Debian system, that would be packages fluidsynth and fluid-soundfont-gm.

Nothing else is required:

fluidsynth --audio-driver=alsa /usr/share/sounds/sf2/FluidR3_GM.sf2

In Orca, use Ctrl-D to show the menu → MIDI Output → Synth input port or similar. As far as I can tell, the first nine MIDI channels (:0 to :8 in Orca) are a piano, and MIDI channel ten (:9 in Orca) is a drum kit.

So here’s how I like to my beats. Use a clock to pick items from list of 16 items. I seem to be doing this a lot.

The numbers often confuse me, so let’s go over this again. You probably saw it in a tutorial video already. The numbers being limited to a single digit, numbers above ten are simply the letters of the alphabet with ten being a, eleven being b, and so on. So if we want sixteen items, we need to tell the clock to have “g” items (1 2 3 4 5 6 7 8 9 a b c d e f g). The actual numbers generated by the clock start at 0 and don’t reach the limit (0 1 2 3 4 5 6 7 8 9 a b c d e f, that is from zero to fifteen).

When I’m confused, I change the clock to have “4” items and pause Orca, then I use Ctrl-F to step through the frames and I can see that it is looping 0 1 2 3 0 1 2 3, etc.

OK, so here’s a clock (C) producing sixteen (g) numbers below the C, (0–f).


Next, we need to the T operator. Use Ctrl-G to get a short description of all the operators. It takes the item to fetch and the total number of items on the left, and the actual items on the right.

 gT** *** **   * **

This setup means that the bang (the asterisk) shows up in the rythm that I can “see” in the list items. It appears below the T. So now I put a MIDI operator (🙂 below it using channel ten (that is, 9!), and pick a drum. Watch out: if you put the MIDI operator to the right of the bang, then it will also be activated by the bang in the T operator data above, so don’t do that.

Wrong (you get constant banging):

 gT** *** **   * **


 gT** *** **   * **


Now repeat and use different patterns and different drums.

 gT*   *   * *




Well done, Alex 🙂

– Anonymous 2020-09-18 11:36 UTC

Please make sure you contribute only your own work, or work licensed under the GNU Free Documentation License. Note: in order to facilitate peer review and fight vandalism, we will store your IP number for a number of days. See Privacy Policy for more information. See Info for text formatting rules. You can edit the comment page if you need to fix typos. You can subscribe to new comments by email without leaving a comment.

To save this page you must answer this question:

Just say HELLO

Referrers: The Ever Expanding Sandbox This blog is on Extended HiatusI'll be back when I'm back.Take care an... DIY & Dragons Ynas Midgard's RPG Blog Dreams of Mythic Fantasy HERR ZINNLINGS ARBEITSZIMMER