Delaying Sine Waves by Milliseconds

Dec 5, 2013 at 8:28am

Delaying Sine Waves by Milliseconds

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

#274845
Dec 5, 2013 at 9:52am

[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~].

-110

#274866
Dec 10, 2013 at 6:53am

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!

#275319
Dec 10, 2013 at 7:40am

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.

<code>

– Pasted Max Patch, click to expand. –

</code>

#275326
Dec 11, 2013 at 8:19am

Christopher,

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.

Best!

#275423

You must be logged in to reply to this topic.