sonic-pi icon indicating copy to clipboard operation
sonic-pi copied to clipboard

midi chord not supported in v3.0

Open pierredewilde opened this issue 8 years ago • 3 comments

play chord(:c4, :major) works as expected while midi chord(:c4, :major) returns an error.

pierredewilde avatar Aug 08 '17 12:08 pierredewilde

midi chord not (yet) supported: Sam wanted to get the release out, but such things may be added in the future. However you can fairly easy implement this.

define :midi_chord do |ch,duration|
  ch.each do |n|
    midi n,sustain: duration
  end
end

midi_chord chord(:c4,:major),0.2

rbnpi avatar Aug 10 '17 12:08 rbnpi

Thank you.

Here a slightly updated version which supports any midi parameter:

define :midi_chord do |notes, *args|
  notes.each do |note|
    midi note, *args
  end
end
midi_chord chord(:c4,:major), sustain:0.2

pierredewilde avatar Aug 11 '17 08:08 pierredewilde

Nice!

On 11 Aug 2017, at 09:30, Pierre De Wilde [email protected] wrote:

Thank you.

Here a slightly updated version which supports any midi parameter:

define :midi_chord do |notes, *args| notes.each do |note| midi note, *args end end midi_chord chord(:c4,:major), sustain:0.2 — You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/samaaron/sonic-pi/issues/1691#issuecomment-321757372, or mute the thread https://github.com/notifications/unsubscribe-auth/AFVDiQZX2ix2l5m9EiSXqN-pPUERWdccks5sXBEmgaJpZM4Owqie.

rbnpi avatar Aug 11 '17 09:08 rbnpi