Gong Synth

Gong synth in the browser

In the first coronavirus of lockdown of 2019, like many other people I was in lower spirits than I would otherwise be. Very uncharacteristically of me, I decided to lie on the living room floor and put some gong sounds on, but it really had a beneficial effect on my mood.

After that I started getting interested in the acoustics of gongs to see if I could model this sound on a computer – I started making experiments with my library cppsketch (which lets you live-code quick prototypes in C++). After a while I had a passable demo, that lets you play a virtual gong with a bit of expression: e.g. hitting it in different places for different tones or the ability to dampen the gong whilst its ringing.

I wanted everyone to be able to use it, so I set about converting it to a web-browser-based experience – elf-audio.com/synths/gong/ (warning, best experienced on safari) – to do this I used emscripten which can convert C++ to Javascript

From Web to Hardware

Since it was already written in C++, I wondered what it would take to run it on a microcontroller – a board called the teensy 4.0 had just been released, with a 600MHz processor, so I tried that, and the same code ran with little modification.

In order for it to be usable in a modular synthesizer, I needed to design a circuit that would incorporate the teensy, a DAC chip, power supply and other things. The circuit was mostly cobbled together from other schematics on the web, surprisingly it all worked first time! I really enjoyed laying this board out, doing the PCB traces is like a puzzle game.

The final PCB assembled

In short, I love how the same snippet of C++ code can run in the browser or on a tiny microcontroller to produce the same effect – it’s the ultimate cross-platform experience, and the gong has now been immortalized by being converted to Javascript. Namaste

🧘🧘🧘

Schematic
PCB design in Kicad