I spent about half a day developing this automated music generator. It randomly generates harmonically coherent sequences with controlled note intervals, synth parameters, and pitch variations. The current version includes a melody generator and a basic drum pattern module. Potential future updates may incorporate chord progression support:
use_random_seed 0
use_bpm rrand(90,130)
synths = [:piano, :saw, :square, :tri, :supersaw]
use_synth choose(synths)
m = [:g3, :a3, :b3, :c4, :d4, :e4, :f4, :g4]
times = [0.5, 1]
c = choose(m)
t = choose(times)
in_thread do
loop do
sample :bd_ada
sleep 1
end
end
loop do
play c
if c == :c4 || c == :e4 || c == :g3 || c == :g4 then
c = choose([m[0], m[3], m[5], m[7]])
elsif c == :f4 || c == :d4 || c == :b3
c = choose([m[5], m[4], m[2]])
elsif c == :a3
c = choose([m[0], m[2], m[3]])
end
sleep choose(times)
end