Can play~ accept sub millisecond playback e.g. for zero crossings etc


    Jul 26 2021 | 9:52 am
    Hi. I am exploring using play~ for some sample playback, and have a quick question:
    Can play~ accept values smaller than milliseconds for playback, for example, does "start 0.75 1000.75 1000" playback from 0 to 1000 ms of an audio file, or are the floats recognised (i.e. it plays from 0.75ms to 1000.75ms)?
    I can't find anything in the documentation that suggests this either way, and reasoned that me devising a fullproof test for this might be a stretch of my dsp knowledge!
    If it doesn't, is there an alternative object that would do this (I need to be able to vary the playback rate, so index~ wouldn't be appropriate). Thanks!

    • Jul 26 2021 | 12:44 pm
      hey, you can still use index~ and calculate the ramp timing according to your playback rate needs. It is not clear if play~ accepts a start time in floating point, but from a quick testing it seems it does accept floating points. However, if you want to be sample accurate, it could turn out to be difficult, because you might be prone to rounding error. If you want to have more control over sample accurate timing, using gen~ might be a worthy choice, but again play~ using floating points might be enough for your needs ! anyway here is how i tested it ; it was not so difficult from the helpfile :)
    • Jul 29 2021 | 9:15 pm
      Thanks! This is a very good point regarding round errors - i.e. you'd want it to be sample accurate for zero-crossings (and... I faintly recall that zero crossing points can be between samples).
    • Jul 29 2021 | 11:25 pm
      hehe indeed ! but if you want to synchronize stuff with zero crossing, you could check out zerox~ - again i'm not sure what you want to do exactly, but that object is there and does exist, so there you go.