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.
60 lines
896 B
60 lines
896 B
# Welcome to Sonic Pi
|
|
|
|
def ASCIISeq(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
|
|
|
|
|
|
def pattrKD()
|
|
sample :drum_bass_soft
|
|
end
|
|
|
|
def pattrSD()
|
|
sample :drum_snare_soft
|
|
end
|
|
|
|
def pattrHH()
|
|
sample :drum_cymbal_closed
|
|
end
|
|
|
|
def pattrSilence()
|
|
end
|
|
|
|
#
|
|
# with_fx :bitcrusher, bits:6 do
|
|
# ASCIISeq "."
|
|
# ASCIISeq "o-o-"
|
|
# with_fx :gverb do
|
|
# ASCIISeq "--x-"
|
|
# end
|
|
# end
|
|
|
|
|
|
|
|
|
|
|