Skip to content

Instantly share code, notes, and snippets.

@samaaron
Created November 16, 2015 14:33
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samaaron/d0f5bd73683420196216 to your computer and use it in GitHub Desktop.
Save samaaron/d0f5bd73683420196216 to your computer and use it in GitHub Desktop.
# Melodic Fun w/ Sonic Pi
# Playing basic notes with either MIDI numbers or
# note names:
comment do
play 70
sleep 1
play :C4
sleep 2
end
# Using octaves for a basic arpegiator:
comment do
live_loop :arp do
tick
synth :tb303, note: (ring :e1, :e2, :e3).look, cutoff: 70, release: 0.1
sleep 0.125
end
end
# Pulling notes from scales:
comment do
live_loop :arp_scale do
with_fx :reverb, reps: 4 do
notes = (scale :e3, :minor_pentatonic)
#notes = (scale :e3, :minor_pentatonic).shuffle
#notes = (scale :e3, :minor_pentatonic).shuffle.take(3)
#notes = (scale :e3, :minor_pentatonic).shuffle.drop(5).take(3)
#notes = (scale :e3, :minor_pentatonic).drop(5).take(3)
tick
synth :beep, note: notes.look, cutoff: 70, release: 0.1
sleep 0.125
end
end
end
# halfing rate of melodic/rhythmic samples:
comment do
live_loop :guits do
with_fx :flanger do
sample :guit_em9, rate: 0.5
#sample :guit_em9, rate: 1
#sample :guit_em9, rate: 0.25
#sample :guit_em9, rate: 0.125
end
sleep 8
end
end
comment do
live_loop :choral do
sample :ambi_choir, rate: 0.25, rpitch: 0
#sample :ambi_choir, rate: 0.25, rpitch: 5
#sample :ambi_choir, rate: 0.25, rpitch: 12
sleep 2
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment