Implementation of the Devil's Staircase
Clojure Ruby
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commitโ€ฆ
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

The Devils Staircase

1. First steps in Ruby/SonicPi

Inspired by this [video] ( we implemented the algorithm in SonicPi with Ruby.

How to run it?
If you want to try it out install [Sonic Pi] ( and copy the code from the devils_staircase.rb into your Sonic Pi workspace and run it.

alt tag

Goal: Turn it into Clojure and use Overtone for real instruments.

2. Starting to convert into Clojure

We created a file devils_staircase.clj which for some time inlcuded a piano and a simple melody with chords.

Next step: Implement the devils staircase algorithm.

3. Converted into Clojure

Finally we converted the algorithm in Clojure. You can find the code in the devils_staircase.clj.

How to run it?
It is a bit complicated. Don't panic. ๐Ÿ™€
Create a file in an Overtone project like mad-sounds and copy the code of the devils_staircase.clj into it.
In emacs start a REPL with meta-x shortcut and choose cider-jack-in.
Load Overtone in the REPL with (use '
Switch to your files namespace e.g. (in-ns 'mad-sounds.devils_staircase).
Evaluate the code in your file with the last bracket selected and shortcut C-x C-e.
Then run the code with C-c C-c shortcut.

๐Ÿ˜œ ๐ŸŽถ ๐Ÿ”ฅ ๐ŸŒŸ GOAL COMPLETED ๐ŸŒŸ ๐Ÿ”ฅ ๐ŸŽถ ๐Ÿ˜œ

Next goal: Make the sound more diverse.