Play_pattern_timed adding sustain...?

Hi,

as always many roads lead to Rome; here is one of the alternative ways to do that:

live_loop :play_with_release do
  # nrd -> n(otes), r(eleases), d(urations)
  # -> (ring n1, r1, d1, n2, r2, d2 ...)
  nrd = (ring :c, 1, 2, :e, 2, 2, :g, 3, 2, :c5, 4, 2)
  play nrd.tick, release: nrd.tick
  sleep nrd.tick
end
1 Like