You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
1008 B
65 lines
1008 B
# Welcome to Sonic Pi
|
|
|
|
use_bpm 120
|
|
|
|
##| pString = "x.o-.xx.xo.x-o--x.x--oxox.-ox.xo-x.xo------"
|
|
|
|
|
|
define :ASCIISeq do |pat|
|
|
in_thread do
|
|
pattern = pat.chars
|
|
loop do
|
|
i = 0
|
|
for i in 0..pattern.count-1 do
|
|
##| pattern.count.times do
|
|
instr = pattern[i]
|
|
print instr
|
|
|
|
if instr == "o"
|
|
pattrKD
|
|
end
|
|
if instr == "x"
|
|
pattrSD
|
|
end
|
|
if instr == "."
|
|
pattrHH
|
|
end
|
|
if instr == "-"
|
|
pattrSilence
|
|
end
|
|
sleep 1
|
|
i = i + 1
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|
|
|
|
define :pattrKD do
|
|
sample :drum_bass_soft
|
|
end
|
|
|
|
define :pattrSD do
|
|
sample :drum_snare_soft
|
|
end
|
|
|
|
define :pattrHH do
|
|
sample :drum_cymbal_closed
|
|
end
|
|
|
|
define :pattrSilence do
|
|
end
|
|
|
|
|
|
with_fx :bitcrusher, bits:6 do
|
|
ASCIISeq "."
|
|
ASCIISeq "o-o-"
|
|
with_fx :gverb do
|
|
ASCIISeq "--x-"
|
|
end
|
|
end
|
|
|
|
|
|
|
|
|
|
|