delay~ object not sample accurate
I am working on an Intel MacBook with a Motu 828mkII audio interface and Max/MSP.
To my shocked surprise, I found that delay~ in fact is not sample accurate.
The following patch contains a quick demonstration of the bug, along with a hypothesis as to its cause.
Thanks in advance for any feedback on this.
Kind regards, Staas.
Hello Staas,
I don't really understand what the patch you've created is doing, but this patch demonstrates (to me at least) that delay~ is sample-accurate. I'm happy to let someone else determine whether there is another issue involved.
David Z.
I can confirm the problem that Staas is mentioning. delay~ is giving
the wrong delay for the sample rates 48kHz and 96 kHz. Furthermore I
seem to now and then get one of errors at 44.1kHz as well.
Here is my test patch. Please try it at different sample rates.
all the best,
Edwin
On 3 okt 2008, at 02:12, David Zicarelli wrote:
>
> Hello Staas,
>
> I don't really understand what the patch you've created is doing,
> but this patch demonstrates (to me at least) that delay~ is sample-
> accurate. I'm happy to let someone else determine whether there is
> another issue involved.
>
It appears that 44.1KHz may be hard coded as the SR for delay~
Eric
I believe there are two distinct issues here:
1 - as eric identifies delay seems to be somehow tied to a 44.1kHz sample rate
2 - At 44.1kHz certain values seem to work as expected - others do not. I believe this issue has been raised in this thread (https://cycling74.com/forums/index.php?t=msg&goto=149972&rid=0&S=7638b027ad91b570e9ef8c1924cc7990), but not yet resolved. The patch below demonstrates a few unexpected cases.
I do not experience EITHER issue in Max 4.6 - these appear to be Max 5 only problems.
I'm running on OS 10.4.11 with the latest version of Max 5.
Alex
Yeah, it's gotten all busted up at some point.
We'll fix it. Thanks guys.
-A
Here is a version of the delay~ object for the Mac that should fix the reported problems with sample accuracy at sample rates other than 44100. We may not be able to build an updated Windows version for a few days, but if you are really concerned about this problem immediately you can use the Max 4.6 version.
Replace in Cycling '74/msp-externals folder.
There is a very slight lack of accuracy at 44100 that has been fixed as well.
David Z.
Hi David,
The new version of delay~ that you posted doesn't seem to work with a one sample delay at 44.1. A series of clicks going into delay~ don't come out. I'm on 5.0.5.
JM
> The new version of delay~ that you posted doesn't seem to work with a one sample delay at 44.1. A series of clicks going into delay~ don't come out. I'm on 5.0.5.
The patch below works for me. But maybe I don't understand what you mean by a "series" of clicks?
David Z.
Hi David--thanks for looking into this.
The patch below doesn't work for me with the recently posted version of delay~, but works fine with the original version. It looks like the new version of delay~ isn't actually delaying the signal in this case. I've attached two 4-channel aif files produced by the patch below which demonstrate the problem.
Thanks again,
JM
Thanks for the example, which demonstrates a rounding error when setting delay times via the initial argument. I have replaced the updated delay object with a new one at the same location:
David Z.
Thanks a lot--the new one works great.
JM