Hi
I've build a sample player abstraction, and now I just thought of one more feature it needs, and that makes me think I need to redo it again. So here goes:
I need a sample player "motor" that is flexible enough to handle any (most) things I throw at it, at least:
First: Is there such a thing outthere already (before I redo it all again)?
Second: If not, a thing that I can't figure out is the cross-fade part. I thought about having two phasors, and every SAMPLELENGTH-XFADETIME restarting the idle one, and fading it up in XFADETIME while fading the running one down. Problem is that if the playback rate has changed since last cycle the switch will not be at the end of the running sample. Instead I guess the way to go is to look at the output of phasor~ and from it's output determine when it's time to start the fade, which should occur at (SAMPLELENGTH-XFADETIME)/SAMPLELENGTH. How can I inspect an audiosignal and get bang'ed when it's it reaches some value? I looked at [<~], but it seems to output audio, so I guess I can't use that. Or am I totally off in my approach?
Any input appreciated...