Hi
My student and I are exploring samples and re-pitching via rate:, so here is a simple sketch that fills an array with increments of the 12th root of 2, then applies those values to a sample’s playback rate - this is prolly already in the tutorial somewhere
a = []
12.times do
y = tick #counter from 0 to 11
x = 2**(y/12.0) #12th root of 2 = ~1.0594
a.push(x) #fill array with semitone increments, starting at 1.0
end
puts a
sleep 1
12.times do
sample :bass_thick_c, onset: 0, sustain: 0.4, rate: a.tick
sleep 0.5
end
PD-Pi