Skip to content

Instantly share code, notes, and snippets.

@alistairstead3408
Last active August 29, 2015 14:10
Show Gist options
  • Select an option

  • Save alistairstead3408/00af717cb1c95872655a to your computer and use it in GitHub Desktop.

Select an option

Save alistairstead3408/00af717cb1c95872655a to your computer and use it in GitHub Desktop.
define :test do
with_bpm 120 do
use_synth :saw
31.times do
use_synth :prophet
play 49, release: 0.6
sleep 0.3
end
12.times do
use_synth :prophet
play 44, release: 0.6
sleep 0.3
end
end
end
with_bpm 120 do
#first bit
play_pattern_timed [77, 77, 77], [0.3, 0.3, 0.3], release: 0.3
play_pattern_timed [75, 75, 75], [0.3, 0.3, 0.3], release: 0.3
play_pattern_timed [72, 72, 72], [0.3, 0.3, 0.3], release: 0.3
play_pattern_timed [70, 70, 70], [0.3, 0.3, 0.3], release: 0.3
play_pattern_timed [68, 68, 68], [0.3, 0.3, 0.3], release: 0.3
play 65, release: 3
in_thread do
test
end
sleep 3
#second bit
play_pattern_timed [77, 77, 77], [0.3, 0.3, 0.3], release: 0.3
play_pattern_timed [75, 75, 75], [0.3, 0.3, 0.3], release: 0.3
play_pattern_timed [72, 72, 72], [0.3, 0.3, 0.3], release: 0.3
play_pattern_timed [70, 70, 70], [0.3, 0.3, 0.3], release: 0.3
play_pattern_timed [68, 68, 68], [0.3, 0.3, 0.3], release: 0.3
play 65, release: 1
sleep 0.9
play 63, release: 1
sleep 0.9
play 68, release: 3
sleep 0.9
end
define :drum_one do
sample :drum_bass_hard
sample :drum_cymbal_pedal
sleep 0.9
sample :drum_cymbal_pedal
sleep 0.9
sample :drum_snare_hard
sample :drum_cymbal_pedal
sleep 0.9
sample :drum_cymbal_pedal
sample :drum_cymbal_open if one_in(6)
sleep 0.9
end
sleep 1.2
use_synth :saw
with_bpm 120 do
in_thread do
8.times do
drum_one
end
end
in_thread do
2.times do
8.times do
play_pattern_timed [49, 53, 56], [0.3, 0.3, 0.3], release: 0.4
end
4.times do
play_pattern_timed [44, 48, 56], [0.3, 0.3, 0.3], release: 0.4
end
4.times do
play_pattern_timed [49, 53, 56], [0.3, 0.3, 0.3], release: 0.4
end
end
end
end
@alistairstead3408
Copy link
Author

Awesome - thanks for this Robin. It's interesting to see how a seasoned SonicPier does it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment