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.
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 tools for the job
Comparing communities, language features and GitHub stars of audio synthesis environments…
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.
The first prototype made with Fusion 360 and the plastic parts printed, It, of course, had a few drawbacks:
- The buttons, I did not like the feel of the tall silicone buttons.
- 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.
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.
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)
- Dedicated audio board with Line-In and Line-Out, Raspbian suports it out of the box.
- Raspberry Pi of your choice.
- A 5V power supply.
Steps to reproduce:
- Build SuperCollider from source on Raspberry Pi
- Go to sleep, compilation is an overnight process on R-Pi Zero.
- 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
Next you could open
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.
- An enormous library of UGens (units that process or generate sound) for SuperCollider.
- A community behind SuperCollider, usually you can find the answer to common questions but still, documentation is king.
- Long boot times, around 1 min caused by a massive software stack.
- Latency, around 10 ms with just jackd process using 20% of the CPU.
- Additional latency because of SuperCollder’s client-server architecture.
- Unstable on Raspberry Pi, more software more bugs.
- 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.