I was experimenting with recording my live loops, cutting and shuffling the recording and overlaying them back on top of the loop. The idea was that I could have a fairly simple drum loop (with some interesting timing) but by having these re-ordered previous runs of the loop accumulating run after run build up into interesting patterns.
The core part of the machinery being:
def with_record(bufs)
# Re-record one of the buffers
buf = bufs.delete_at(rand_i(bufs.length))
puts "recording #{buf.path.split("/")[-1]}"
with_fx :record, buffer: buf do
yield
end
end
def play_cuts(bufs, length, cuts, amp: 1.0)
# Cut up one of the buffers and play pieces back in shuffled order
play_buf = bufs.choose
puts "playing #{play_buf.path.split("/")[-1]}"
at line(0, length, steps: cuts), (0...cuts).to_a.shuffle do |s|
sample play_buf, start: s.to_f/length, finish: (s.to_f + length.to_f/cuts)/length, amp: amp
end
end
And then using it something like this:
live_loop :drums do
bufs = make_buffers(:drums, 4, 4)
with_record bufs do
# some seed drum patterns to play here, will be recorded to one of the buffers
# play back a shffled buffer, with some fx and reduced levels so they fade out over multiple recordings
with_fx :bitcrusher, mix: 0.3 do
play_cuts bufs, 4, 8, amp: 0.7
end
end
end
I think the drum part sounded kind of cool. I didn’t get as far in applying it to the melody or harmony - it may be slightly harder as you may either have to use a single chord or accept some dissonance. But perhaps there is a clever way to make it work…