Skip to content

Instantly share code, notes, and snippets.

@shivioua
Forked from darinwilson/ambient1
Created January 20, 2023 22:57
Show Gist options
  • Save shivioua/b0172a59b1e6a33af29975a3ee07a440 to your computer and use it in GitHub Desktop.
Save shivioua/b0172a59b1e6a33af29975a3ee07a440 to your computer and use it in GitHub Desktop.
Ambient experiment using Sonic Pi
# Ambient experiment for Sonic Pi (http://sonic-pi.net/)
#
# The piece consists of three long loops, each of which plays one of
# two randomly selected pitches. Each note has different attack,
# release and sleep values, so that they move in and out of phase
# with each other. This can play for quite awhile without
# repeating itself :)
live_loop :note1 do
use_synth :hollow
with_fx :reverb, mix: 0.7 do
play choose([:D4,:E4]), attack: 6, release: 6
sleep 8
end
end
live_loop :note2 do
use_synth :hollow
with_fx :reverb, mix: 0.7 do
play choose([:Fs4,:G4]), attack: 4, release: 5
sleep 10
end
end
live_loop :note3 do
use_synth :hollow
with_fx :reverb, mix: 0.7 do
play choose([:A4, :Cs5]), attack: 5, release: 5
sleep 11
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment