Live Coding Music

Music is in general a versatile when it comes to how you make it. There are people who use literally garbage and whatever they have on hand, others pay thousands of money to get high quality equipment, some renounce the world of already existing instruments completely and only build their own, the habits and workflows are almost uncountable.

Recently I stumbled over another, very special and mostly unknown way of making music; live coding with Sonic Pi. Yes you read right, a programming language is used to write a program in realtime which then creates music based on the logic you coded. It is running on Windows, MacOS and (as the name suggests) on a Raspberry Pi. See the video below for an impressive example.

Live Coding example of Earth to Abigail

Sonic Pi offers sample based music creation as well as synthesizers and oscillators to create our own waveforms. Furthermore you can use effects and even a microphone input, one can only imagine how versatile the opportunities are when combining (musical) creativity with the possibilities of programming. The language itself is as simple as possible, in order to enable people with few or no coding experience to get started.

Sonic Pi is an Open Source Project released under the MIT Licence. It was originally created by the University of Cambridge Computer Laboratory, today it is maintained by Sam Aaron and the Sonic Pi core team.

If you are interested you should definitely check out Sam Aarons Youtube channel where he offers tutorials and examples to get started (besides other work).

Example of a sonic Pi code, taken from the official websites examples (“Tron Bikes”)

Oscilloscope Music

Are you tired of making music just for good sound? Have you played all the scales and used all the PlugIns in every DAW? Are you searching for a new meaning for your music and with that, for your live?

Maybe it is time to get into Oscilloscope Music!

The idea is to use an Oscilloscope to draw images and even create moving ones. This is done by having two audio channels visualized on the oscilloscope in the so called “X-Y-Mode”. While in many cases an Oscilloscope shows the change of the voltage of a signal over time, the X-Y-Mode shows two channels modulating the display at the same time, with one channel controlling the X deflection and the other channel controlling the Y deflection.

An example;
Imagine, at a certain moment in time both channels have the value “1” (no units, just “value”). The screen of an oscilloscpe can be visualized as a coordinate system, like back in school. The zeropoint ((0, 0) e.g. no signal connected or signal is silent) is in the middle of the screen, so if both channels equal “1” (written (1, 1)) a point is drawn in the upper right corner. Respectively, if the channels equal (-1, 1) the point appears on the opposite side of the zeropoint.

A basic coordinate System with X / Y Axis and the Points (0, 0), (1, 1) and (-1 , -1) visualized.

If we now imagine we apply a simple sinewave of e.g. 1Hz to each channel, the point starts to move in a circle, as the values slowly change from 0 to 1 to -1 to 0 again. By changing the frequency of the input signals we can achieve a full circle instead of a moving point as the point is moving so fast that our eyes can not see the movement anymore and start to visualize a connected circle.

Jerobeam Fenderson went several steps further and created audio signals that again create whole images and even “films” on an oscilloscope. As a result the music created by this work does not focus on sounding good but literally focuses on looking good. Of course he is not the only one in this field but definitely one of the best ones!

So the next time you get bored of creating hits, consider drawing images with sound and send them to your friends to hear your last weekend visually, if that makes sense…

If you do not have an oscilloscope you could use a balloon and a small piece of mirror to get to play with kind of similar results for cheap, Steve Mould is showing it here (I know, we used that link before but it fits too well :))

Jerobeam Fenderson’s Youtube Channel:
Steve Mould’s Youtube Channel: