Hi, I’ll try to explain clearly what I mean. Since I’m french and english is not my native language, this could be a bit difficult !
So, I have a code with functions like this one :
phrygia = lambda do use_bpm [100, 1000, 2500, 6000].choose play scale(:A3, :phrygian, num_octave: 2).choose, attack: choose([0, 0.2,0.5]), release: 5, sustain: 5, velocity: rrand_i(50, 120) sleep 8 play choose([:A3,:Cs4, :E4, :A4]), release: 10, sustain: 10, velocity: rrand_i(50, 120) sleep choose([1, 4, 8, 16]) end
and I call them like this :
in_thread(name: :demiurge) do loop do sleep choose([7, 10, 666]) [ding, lydia, phrygia, eol].choose.call end end
My question is : can I create a function that “gets” the result of the .choose.call ?
A thing that would go like : “if phrygia is true, then play this or that” ?
Or maybe more specifically : “if that note is played, then play this one or this sample” ?
Or : “anytime a “c” is played by any thread, play this or that”
I hope this is not too confused !