Simple Function that Accept Notes or Samples as Arguments?

Hi,

Everyone has their own style… in my case, I dont think I’d want to write
a single function to deal witth 2 such diverse methods, especially if I was
teaching other people.

This works just as well, and is probably much more understandable to people
who are just starting out…

Just my 10p…

Eli…

define :playsample do |name|
  sample name
end

define :playnote do |note, duration|
  play note,sustain: duration
end

playsample :ambi_choir
sleep 8
playnote 62, 2
1 Like