Hello list,
I'm working on a (looping) sample player right now with pitch change, start
and end, and loop controls... Looping is going fine but I am looking for a
better way of making a oneshot sample play with tabread4~. I've attached a
re-creation of what I am doing - using a metro at high speed (1 ms) driving
snapshot~ so that the frequency goes back down to 0 when snapshot yields a
value from the phasor~ approaching 1 (my > test is set at .99 now).
Problem is, when I change the frequency of that phasor~ up really high, the
snapshot~ misses the values sometimes and it keeps looping instead of
stopping like I want it to. Is there a better way of doing this? I thought
about using line~ or vline~ to drive tabread4~ but that wouldn't allow for
pitch changes while the sample is being played, because the messages being
sent to line~ would cause it to reset every time they changed. Also, a pipe
object for the length of the sample (at whatever speed) wouldn't do it
either.
NOTE: I know I can use susloop~ for this just fine (what a great object!),
but I am trying to make it using only native Pd objects so that I can share
this without requiring anything else. I want to distribute it as a learning
patch because my school is interested in teaching some Pd eventually. Plus
I wouldn't really learn as much as I have if I was just using susloop~ ;)
Any help is very much appreciated!
Kevin