Skip to content

Instantly share code, notes, and snippets.

@jnslxndr
Last active April 26, 2019 14:55
Show Gist options
  • Save jnslxndr/86a8e714dd46232efe70c71d9083f09b to your computer and use it in GitHub Desktop.
Save jnslxndr/86a8e714dd46232efe70c71d9083f09b to your computer and use it in GitHub Desktop.
# Meditating on Steve
# -------------------
# Modified Piano Phase from Steve Reich, based on an Example of Sonic Pi
# Written by Jens, listened to by all
# Muthesius Academy of Fine Arts & Design
# Seminar 'Poetische Apparate', Summer Term 2016
#
# To run: paste this code into Sonic Pi - http://sonic-pi.net
use_synth :fm
use_synth_defaults depth: 0.3
notes = (ring :E4, :Fs4, :B4, :Cs5, :D5, :Fs4, :E4, :Cs5, :B4, :Fs4, :D5, :Cs5)
slow_amp = 0.8
slow_decay = 0.1
live_loop :slow do
play notes.tick, release: 0.1, amp: slow_amp, decay: slow_decay
slow_decay = [slow_decay * 1.02, 8.4].min
slow_amp = [slow_amp - 0.01, 0.06].max
sleep 0.3
end
fast_amp = 0.9
fast_release = 0.1
live_loop :faster, sync: :slow do
play notes.tick, release: fast_release, rate: 1, amp: fast_amp
fast_amp = [fast_amp * 0.9, 0.2].max
fast_release = [fast_release + 0.01, 100].min
sleep 0.295
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment