Delaying Sine Waves by Milliseconds

    Dec 05 2013 | 4:28 pm
    Hello There!
    It's me again with my rookie questions. I would like to know how can I alter the phase of a Sine wave by measure of milliseconds rather than by angle. I tried doing this simple with a [delay~] object but it tells me the delay time is dependent on a sample rate, which I'm not sure what would it be for a [cycle~]...
    I'm sorry if this is some dumb question, I'm still trying to figure out this whole phase and delay thing.
    Thanks again in advance

    • Dec 05 2013 | 5:52 pm
      [delay~] only does times of full samples, [tapout~] will allow you to use floating point values, for example in milliseconds.
      but i believe you are looking for something else: search the forums for how to drive a [cycle~] by [phasor~].
    • Dec 10 2013 | 2:53 pm
      Hello Roman,
      Thanks for your help,
      Tapin~/tapout~ don't seem to be working, whenever I switch the delay value the audio stops or clicks weirdly, I'm pretty sure there must be a simple way to just delay/change the phase of a signal by a matter of milliseconds, please someone help! I'm stuck :(
      Thanks again!
    • Dec 10 2013 | 3:40 pm
      A couple of suggestions for when you're stuck: 1) Typing "samples milliseconds" into the Max Help search field yields six objects, one or two of which are relevant to your quest. 2) Looking up "millisecond" in the Object Thesaurus also will help.
      mstosamps~ is one easy way to convert milliseconds to samples. To avoid clicks when you change the delay time, use linear interpolation to smooth the changes. See MSP Tutorial 2 for an example and explanation of that technique. I suggest to use delay~ rather than tapin~/tapout~ because the latter objects have a minimum delay time of one signal vector.
    • Dec 11 2013 | 4:19 pm
      Thank you so much for your help, your advice is also very helpful, I will definitely try the max help search method... how dumb am I.
      Anyway, thanks to you I think I solved this issue.