This goes wrong if e.g. the second-last note is long enough that it lasts beyond the last note e.g. [{:time 0 :duration 4 :pitch 0} {:time 1 :duration 1 :pitch 2}]. We need to use a max strategy rather than just looking at the final note (which we can only rely on starting last).
melody/duration
measures the duration of a melody.This goes wrong if e.g. the second-last note is long enough that it lasts beyond the last note e.g.
[{:time 0 :duration 4 :pitch 0} {:time 1 :duration 1 :pitch 2}]
. We need to use a max strategy rather than just looking at the final note (which we can only rely on starting last).