-
-
Save st01c/b2d8db51103f717ff8f5 to your computer and use it in GitHub Desktop.
Sonic Pi 'spread' use
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
| # forked from nicoder | |
| # line 13 '?' asks for conditional and executes either first sample (true) or the one after ':' (false) | |
| # problem with this formulation is that you can't specify sample parameters individually, just across the whole line | |
| live_loop :takt do | |
| sleep 0.5 | |
| end | |
| live_loop :r do | |
| sync :takt | |
| with_fx :slicer, phase: 0.25, filter: 1, mix: 1 do | |
| (spread 5, 12).each do |b| | |
| sample b ? :drum_tom_mid_hard : :drum_cymbal_closed, amp: 0.5 | |
| sleep 0.25 | |
| end | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment