The Audiophonic Workbench - Recreate Early Electronic Music With Arduino

by techno-womble in Circuits > Audio

8306 Views, 134 Favorites, 0 Comments

The Audiophonic Workbench - Recreate Early Electronic Music With Arduino

AWB

This project is inspired by the early electronic music and sound effects produced by the BBC's Radiophonic Workshop in the 1960's. Before music synthesizers were commonplace a combination of industrial test equipment and tape manipulation were used to create previously unheard sounds. Test oscillators and 'found sounds' often provided the raw audio material that were looped, reversed, sped up and slowed down via multiple tape recorders to provide the eerie and unnatural sounds that accompanied the radio and TV productions of the time.

Recently, documentaries on the work of Delia Derbyshire and the Radiophonic Workshop have caused a resurgence of interest in the techniques of early electronic music. At the same time, artists such as Hainbach are producing contemporary sounding tracks using vintage equipment and techniques. Inevitably, this increased interest has boosted the demand (and asking price) for used test equipment. Devices that were almost worthless a few years ago now change hands for over £200 on auction sites.

This project simulates three vintage style test oscillators using an Arduino microcontroller and can be built for less than £15. While it lacks the aesthetic charm and analogue sound of the real thing it retains the tactile, hands-on control missing from software plug-ins and is inherently hackable, updatable and repairable.

Supplies

This project requires only a handful of components: -

  • 1 X Arduino microcontroller - I used a Nano but any compatible should work
  • 2 X 1M Ohm resistor
  • 1 X 3.9K Ohm resistor
  • 1 X 4.7 nF capacitor
  • 1 X Audio output socket (6.3mm or 3.5mm)
  • 6 X 10K linear potentiometers
  • 3 X 10K logarithmic potentiometers
  • 2 X SPST toggle switches
  • USB cable for power
  • Perfboard (Veroboard)
  • Perfboard socket strip (optional)

You will also need a PC with the Arduino IDE installed to load the software.

The circuit is simple enough for point-to-point hand wiring using low cost perfboard. The AudioPhonic Workbench runs happily off USB power so no special power supply is required.

Description

This project uses the absolute minimum number of components, keeping the cost down and simplifying construction. Using the Arduino Nano board it is possible to run three simultaneous oscillators. Additionally, the oscillators can cross-modulate each other giving a wide range of sounds from a simple design.

The early electronic music pioneers used devices such as "Wobbulators" and "Ring Modulators" in their creations. The Wobbulator used one oscillator to change the pitch of a second oscillator, a form of Frequency Modulation (FM). At low frequencies this gives a vibrato effect which becomes increasingly discordant at higher frequencies. The Ring Modulator allows one oscillator to change the volume of a second one, a process known as Amplitude Modulation (AM). This gives a tremelo effect at low frequencies which, again, becomes increasingly discordant as the modulating frequency is raised. The Audiophonic Workbench provides both Amplitude and Frequency modulation.

The front panel of the Audiophonic Workbench is shown above. The top row of knobs control the pitch of each oscillator while the bottom row control the volume. The two knobs on the middle row control the modulation. The first controls how Oscillator 1 modulates Oscillator 2. Turning the knob clockwise increases the amount of Amplitude Modulation while turning anti-clockwise increases Frequency Modulation. The second knob on the middle row controls how Oscillator 2 modulates Oscillator 3. With these controls in the centre position there is no cross modulation.

The last two controls are the oscillator rate switches. These allow Oscillators 1 and 2 to act as Low Frequency Oscillators (LFO's) giving the vibrato and tremelo effects described above.

The Hardware

Protobox-schem_schem.jpg

The circuit diagram for the project is shown above. It simply comprises 8 potentiometers connected to the Arduino's eight analogue inputs, 2 switches wired to digital inputs pins and an RC network for the audio output.

The Audiophonic Workbench uses Pulse Width Modulation (PWM) for audio output avoiding the need for a separate Digital to Analogue converter (DAC). The Mozzi audio library supports a 'HIFI PWM' mode which is used here. This combines the output from two PWM pins to improve the quality of the audio. Enabling HIFI PWM mode requires some extra steps before uploading the code. These are described in Step 4.

Construction

P1010207.JPG

The first step in building the project is to choose a case. I used a cheap pine jewellery box from a local craft store, painting it matt black for a retro look. At 140 X 90 X 50mm it is only just big enough to take the front panel controls - larger would have been better. The front panel wiring diagram is shown below.

All potentiometers have their left hand legs connected together and wired to 5V on the Arduino (pin 27). Similarly, the right hand pins are connected and linked to the two toggle switches and GND on the Arduino (pin 29). The centre legs of each potentiometer connect to the Arduino analogue inputs via flying leads.

It would be possible to wire the front panel directly to the Arduino but I prefer to use perfboard as this allows me to re-use components between projects. It also allows extra experimental circuitry to be easily added. If using perfboard it makes sense to fit the Arduino into a socket. The diagram below shows both sides of the perfboard layout. Note the cut tracks along the centre of the board. Perfboard tracks can be cut with a special tool or knife but I prefer to use a 6mm drill bit for a clean, easily visible break.

I placed the audio output socket on the rear of the box but this is personal preference. I also drilled a large hole in the rear allowing a USB cable to enter the box to power the Arduino. When fitting the board into the case make sure there is sufficient room to connect the USB cable.

Install and Configure Mozzi

This project uses the Mozzi sound synthesis library to implement the oscillators. In order to compile the sketch you will need to download Mozzi and install it into the Arduino IDE

Download the Mozzi Library here:- https://sensorium.github.io/Mozzi/download/

The audio output is generated using Pulse Width Modulation (PWM) to reduce the component count. The PWM output is a string of digital pulses. If the pulses are high enough frequency they will charge a capacitor and give a rising voltage on the output. If the pulses are of low frequency the capacitor will discharge and the output voltage falls. By varying the pulse frequency (or pulsewidth) a waveform can be generated.

Arduino PWM audio is generally low quality but Mozzi supports a "HIFI PWM" mode which is a significant improvement. This uses two PWM pins and requires one additional resistor to implement. The only complication is that the file 'mozzi_config.h' in the Mozzi library must be modified for this to work.

Firstly, find the file (on my Linux PC it is located in /home/john/Arduino/libraries/Mozzi-master). You will need to edit the file and make the following changes :-

change

//#define AUDIO_MODE STANDARD
#define AUDIO_MODE STANDARD_PLUS
//#define AUDIO_MODE HIFI

to

//#define AUDIO_MODE STANDARD
//#define AUDIO_MODE STANDARD_PLUS
#define AUDIO_MODE HIFI

These changes are near the start of the file around line 27.

Testing the Hardware

Screenshot from 2021-01-29 08-33-26.jpg

I have provided a simple sketch to test the completed hardware. It can be downloaded from my GitHub page here :-

https://github.com/techno-womble/Audiophonic-Workbench/blob/main/APW-HW-Test.ino

The sketch reads the values of each analogue input once per second. These, together with the two switch inputs, are displayed in the Arduino IDE serial monitor as shown above. Once the sketch is loaded, try turning each potentiometer in turn and check that the values change between 0 and 1023.

The sketch also generates a test tone on the audio output. For this to work you must modify the mozzi-config.h file as described in the previous section.

The Software

The software for the Audiophonic Workbench can be downloaded from my GitHub page at :-

https://github.com/techno-womble/Audiophonic-Workbench/blob/main/APW-Sketch.ino

The code is fairly simple but not easy to follow as it has been optimised for speed over readability. It has been written inline and uses integer arithmetic throughout with data scaling to avoid numeric overflows.

The sketch creates three instances of the Mozzi Oscillator using a sine wave-table. The main control loop (updateControl) reads the potentiometers and switches 128 times per second and updates a number of global variables accordingly.

The audio processing loop (updateAudio) uses these global variables to calculate the individual samples for each oscillator. These are then mixed together and output.

Feel free to experiment with the code but remember that the updateAudio loop is called 32768 times per second. The code it contains must execute quickly. If the processing overruns it will cause pops and glitches in the audio.

In Use

AWB-Demo

The Audiophonc Workbench rewards playful experimentation. The controls have been designed such that it will always produce some sort of sound so long as Oscillator three volume is not set to zero. While it may get discordant, it should never glitch or give a badly distorted output. Sci-fi style sweeps and pulsating rhythms are easily achieved with a few tweaks of the knobs.

The simple sinewaves benefit hugely from additional audio effects. The original work of the Radiophonic Workshop gets much of its character from the heavy use of reverb and echo. A multi-fx pedal is ideal - I use an old Zoom guitar pedal. Plug-in software effects are great if recording to a computer. Vintage style effects such as simulated "Tape Echo" and "Spring Reverb" work well as these are in keeping with the 60's sound.

Interesting tones can also be recorded into a sampler and 'played' using a conventional MIDI keyboard.

Potential modifications include switches for additional waveforms, a DAC for high quality audio output and a MIDI interface to control the pitch of Oscillator 3. Leave a comment if you do build this - I'd love to know what people think!

Cheers,

John