Created
October 3, 2014 14:16
-
-
Save danreedy/82d9a7335b6cc0e3bd0e to your computer and use it in GitHub Desktop.
Sketches on an OSCon
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use_bpm 120 | |
use_synth :fm | |
$root = 52 | |
$key = :major | |
define :metro do | |
cue :tick | |
sleep 1 | |
end | |
define :left_hand do | |
sync :tick | |
play_pattern [55, 55, 57, 59], amp: 0.6, divisor: 1 | |
end | |
define :harmonic do | |
sync :tick | |
sleep 8 | |
$root = [52, 50, 48].sample | |
$key = [:major, :minor].sample | |
play $root, divisor: 1 | |
end | |
define :root do | |
sync :tick | |
sleep 0.5 | |
play $root, amp: 0.5, divisor: 1 | |
end | |
define :right do | |
sync :tick | |
play_pattern_timed chord($root+24, :minor).shuffle, (dice(10) > 3 ? 0.25 : 0.5), amp: 0.1, divisor: 1 | |
end | |
define :bass do | |
sync :tick | |
play_pattern_timed [$root, $root, $root], [1, 0.5, 1], divisor: 2, amp: 1, release: 0.25 | |
sleep 1.5 | |
end | |
define :kick do | |
sync :tick | |
2.times do | |
sample :drum_heavy_kick, amp: 0.3, release: 0.25 | |
sleep 0.25 | |
end | |
end | |
define :hats do | |
sync :tick | |
sample :drum_cymbal_closed, amp: 0.2 | |
sleep 0.5 | |
end | |
in_thread(name: :mt) { loop { metro } } | |
in_thread(name: :left) { loop { left_hand } } | |
in_thread(name: :root) { loop { root } } | |
in_thread(name: :ht) { loop { harmonic } } | |
in_thread(name: :right) { loop { right } } | |
in_thread(name: :bass) { loop { bass } } | |
in_thread(name: :kick) { loop { kick } } | |
in_thread(name: :hats) { loop { hats } } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment