Delaying Sine Waves by Milliseconds
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
[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~].
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 :(
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. --Copy all of the following text. Then, in Max, select New From Clipboard.----------begin_max5_patcher---------- 866.3oc2XsrbaBCEcs8WgJqSSQhGFxtNS2zOgNc5jQFTbTJHXPxoNIS72d0C vORskkcv3NYCLRbQ5bO5bu5J8x3QdSqVP3dfa.+DLZzKiGMR2kpiQssG4UhW jUf4Zy7xpJKILg2UluIHKD594DB.WvqtAjyq4Brfrryl6ZlMUYi+09s8vlWR YEDgdHgq6rZtnq2NSuqhI3zmIZKQqFgZrH6dJa1sMjLgA+gooxOCRiUOgvP0 KjbNA+p8en4ZjVM8gOGD4sw3yvk5w26qMTbgm5CuNdr5wUuSV4ae+GCMKDln b7IJi.APqjPP+RBjmywYqV02x6PV8tc3FIJZBX7kvntm6zKfmBV4YU0jdBqH TqVSiYXv5W6BunzSAu2UTIwim6JGjckiwRwS0DiOnl.rT+B7lhYy7VA7c4tI IqiyhCrovPIVTXqlgFY+BRysDFdZg1B+SfgXj+Hmx+IBrjKp33xZ9xyH4woy XJOpiFsReF0hI.MwN8E1uAn+GIhBglzzwZsTjuUZH3hqh9zWjIVgx.7iHiA7 jHOWHsvPGzNv9U6LctPTwNBsCbe9oqZCSDBxtzv+CRbfwMsGG.u7YSk9Ut1m NdcfqbmqTlo1fX6LV7G2DnlJjZENI1ogKeBzbRA9okljnmwbnsaD6v9uvIwG NIJrmShtGxAmqNvzbNf2bDbywpsTxJJyocXRcga76WtoOqHuKbvoBxSd+YBj XkVJad3i2IGjNKkQBaY7vT7tQ8G5PYWwW7jF03reKITv4MmgKG1oMM6DqQDg CRxhBJirD.g9nnqOiYKVejFWOPXaYoShrdmCCBGk8TVgjjPW1cZZ2hokWhrx KH23E8upk.u4R6zSup+sIKd07lrNH2pQAqAPNgKnLrfJqresMAaYy8z7bBay Dt4TtJXOe+Q6thl.GPiZOX.bPfCxA3jb.xojlWWI2lsc8AlDccj5bt56lLIc Ui0SSuAe0NxavT6gNGtUWU02GjOQ9CFddyTsG9Y3vCLwE9ANb3IvU7LPgiPW vyvomUWG2AiuPICFdbJ7Jb3jONsbkNbKWtt4xokNW9BEDrp0YHeNxk7Cm55q oRBbc8ijFd6PpQhr.qGpZTMiuZr4rMll5Jj7ZHOR6rOP2CtQV3iPV0y7FSUK KRhk0rHmmWG+WHKOBZO -----------end_max5_patcher-----------
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.
Forums > MaxMSP