Skip to content

Instantly share code, notes, and snippets.

@fitsum
Created December 10, 2017 18:05
Show Gist options
  • Select an option

  • Save fitsum/24b8eddd0bc4d186340d673b04da1227 to your computer and use it in GitHub Desktop.

Select an option

Save fitsum/24b8eddd0bc4d186340d673b04da1227 to your computer and use it in GitHub Desktop.
functions in sonic pi
# Welcome to Sonic Pi v2.10
A = :A
B = :B
C = :C
D = :D
G = :G
mainPattern = [
[B, 0],
[C, 0],
[B, 0],
[G, 0],
[D, 0],
[G, -1]
]
subPattern = [
[C, -1],
[G, -2],
[C, -1],
[D, -1],
[C, -1],
[B, -2]
]
define :modz do |pattern|
newPattern = []
for (_note,_mag) in pattern
newPattern.append(_note + (12 * _mag))
end
return newPattern
end
live_loop :bells do
with_fx :reverb do
play_pattern_timed modz(mainPattern), 0.6, amp: 0.05
end
end
live_loop :bells2 do
with_fx :reverb do
play_pattern_timed modz(subPattern), 0.3, amp: 0.2
end
end
live_loop :bells3 do
with_fx :reverb do
play_pattern_timed modz(subPattern), 2.4, amp: 0.1
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment