
commit
108da284a8
2 changed files with 125 additions and 0 deletions
@ -0,0 +1,65 @@ |
|||||
|
# 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 |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
@ -0,0 +1,60 @@ |
|||||
|
# 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 |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
Loading…
Reference in new issue