Update

19.07.01 Update, half of this article is irrelevant now, OP-Z can sample from USB or the mic and support custom synth engines (kinda) after some updates.

Background

Since I got my hands on the PO-20 “Arcade” I wanted to write custom firmware for it. Of course that wasn’t possible.

The next best thing was the OTTO inspired by OP-1. I considered joining the project for a moment but writing most of the components from scratch would take years to reach a v.1.0 prototype.

The tools for the job

I considered using Pure Data in a similar way the Critter and Guitari Organelle is using it. But after a few frustrating days it was clear that visual programming will not cut it.

Comparing communities, language features and GitHub stars of audio synthesis environments…

SuperCollider was looking like a winner. With an active open source community, it was like a silver bullet for all my problems, SuperCollider can easily be set up to run on a Raspberry Pi.

First prototypes

The choice of hardware at that moment was clear, a Raspberry Pi Zero and a dedicated audio board (Fe-Pi or Teensy audio adaptor both based on the same chip) would do the trick. Combined with a ~2000 mAh battery it should run for ~4 hours, still not as much as I would like but it will do for the moment.

Looks like a wannabe pocket operator, doesn’t it?

Looks like a wannabe pocket operator, doesn’t it?

The first prototype made with Fusion 360 and the plastic parts printed, It, of course, had a few drawbacks:

  1. The buttons, I did not like the feel of the tall silicone buttons.
  2. Not enough buttons.

The second prototype used mechanical keyboard buttons and a lot more of them. Initially, I cloned Volca Sample functional plus some extra stuff.

OP-1 anyone?

OP-1 anyone?

Then I looked into how OP-Z handles the sequencing and started to recreate it in SuperCollider. The timing didn’t feel that good, it could be the underpowered hardware plus that SuperCollider is actually two components: scsynth + sclang communicating through the network stack. Sooner rather than later I took the plunge and got an OP-Z.

OP-Z Era

A tight fit

A tight fit

After spending some time with OP-Z I thought there is no point to try to recreate the sequencer, it would take too much time. I decided to reuse the Raspberry Pi and audio IO board and slapped them on the back of my OP-Z, it seemed the most reasonable way to get the most out of it in the shortest time possible, OP-Z already had the sequencer that I wanted but it didn’t have any sampling capabilities(at the time of writing) so it should be a beautiful fusion.

The end result

How to build something similar (please dont’t)

Part list:

  1. Dedicated audio board with Line-In and Line-Out, Raspbian suports it out of the box.
  2. Raspberry Pi of your choice.
  3. A 5V power supply.

Steps to reproduce:

  1. Build SuperCollider from source on Raspberry Pi
  2. Go to sleep, compilation is an overnight process on R-Pi Zero.
  3. Clone/download my repo.

It has two folders, opz-sc-extensions contains SuperCollider extension, for more details on how to use extensions with SuperCollider, the opz-plugin folder contains some files that launches the extensions and a golang-opz folder. Next you could open opz-sampler.scd either opz-synth.scd in SuperCollider or run headless:

export DISPLAY=:0.0 && sclang opz-synth.scd

There are quite a few pros and cons to this approach to an op-z plugin.

The pros:

  1. SuperCollider.
  2. An enormous library of UGens (units that process or generate sound) for SuperCollider.
  3. A community behind SuperCollider, usually you can find the answer to common questions but still, documentation is king.

The cons:

  1. Long boot times, around 1 min caused by a massive software stack.
  2. Latency, around 10 ms with just jackd process using 20% of the CPU.
  3. Additional latency because of SuperCollder’s client-server architecture.
  4. Unstable on Raspberry Pi, more software more bugs.
  5. jackd process would crash after one minute of inactivity if using a reverb effect for some reason.

In conclusion, the end product is not as practical as I wished it was, it boots slowly, massive software overhead, buggy and still power-hungry device, SuperCollider on Raspberry Pi Zero isn’t a good enough for this task.

The shape of things to come

I need a device with no boot time and almost real-time performance so I’ll go with a microcontroller, the Zero board is replaced with a Teensy 3.6, a small beast of a microcontroller with an additional chip of 8MB of RAM, and 32 GB of flash storage.

A propper plugin thingy

A propper plugin thingy

The follow-up…