We've accumulated quite the CHANGELOG for the 0.15 release! https://github.com/overtone/overtone/blob/master/CHANGELOG.md
Something I should give a heads-up about is that I'm changing mono-partial-player and stereo-partial-player to be more basic. The thing is that if you play a single sample with them, it almost always ends with an audible click artifact. I remember this being an issue as far as ten years back... and it makes them basically useless for the base case of simply playing a sample. The downside is that the old version also allowed looping and setting the start and end position, which currently no longer works. The problem is that I really don't understand what the old version is supposed to do.
phase rises monotonically from start to end and then wraps. So (bpz2 phase) will become negative the sample after phase wraps around from end to start again and then the next sample it will transition to positive and trigger the latch. At that point the line value is 0 and so the envelope e-gate is 0 and the sound ends.
This works only if the first value that gets latched is at the very start when the line value is close to 1. That’s the part I don’t get.
(defsynth mono-partial-player
[buf 0 rate 1 start 0 end 1 loop? 0 amp 1 pan 0 release 0 out-bus 0]
(out out-bus
(pan2
(* amp (play-buf 1 buf :loop loop? :rate rate :action FREE))))
(let [n-frames (buf-frames buf)
rate (* rate (buf-rate-scale buf))
start-pos (* start n-frames)
end-pos (* end n-frames)
phase (phasor:ar :start start-pos :end end-pos :rate rate)
snd (buf-rd 1 buf phase)
e-gate (+ loop?
(a2k (latch:ar (line 1 0 0.0001) (bpz2 phase))))
env (env-gen (asr 0 1 release) :gate e-gate :action FREE)]
(out out-bus (* amp env snd))))
this part in particular
(a2k (latch:ar (line 1 0 0.0001) (bpz2 phase)))
it smells like a clever hack of sorts... if someone gets what the intention behind this is then please enlighten me