From the original SynthMaker forum (2004–2014), with its members’ names and dates.
Andrew J ·
The delay primitive seems to delay one more sample than instructed (sorry if this has been reported before).
The compare audio module simply runs a mono analyser on both inputs and the stream delta of those inputs. The delta is non-zero if only a single DelayS primitive is in the chain.
If I increase the NS input to 2, then I need 3 DelayS primitives to match things up.
This seemed to be happening in SM 1.0.9. This particular example is confirmed on my machine with 1.1beta.
Regards,
Andrew
infuzion ·
Hey, every programmer knows that 0=1st, 1=2nd! 😉
Have you tried to compare them against Code delays?
streamin i;streamout o;
float lastI=0;
o=lastI;
lastI=i;
malc ·
I think the problem is in the Delay by One Sample primitive. If you test with an Analyser you can see that just one of these seems to have no effect. Two of them delay by 1 sample, three delay by 2 samples. Unless I'm going mad (which is quite possible 🙂)
The Delay component seems to work fine (although there is a minimum delay of 1 sample so putting N=0 still delays by 1).
Andrew J ·
Just to be sure, I coded my own delay by one sample - and that matched the Delay by One Sample primitive. In case I made a silly mistake, I also tested with MyCo's optimised fixed delay. That also matches the DelayS correctly.
On the regular delay primitive, setting N=0 and N=1 result in a delay of 2 samples. N=2 gives you a 3 sample delay, N=3 gives you 4 ... and so on.
On MyCo's delay primitive, setting N=0 and N=1 result in a delay of 1 samples. N=2 gives you a 2 sample delay, N=3 gives you 3 ... and so on.
The DelayS primitive definitely works correctly.
See for yourself: Delay_test.osm
-Andrew
Andrew J ·
malc wrote: I think the problem is in the Delay by One Sample primitive. If you test with an Analyser you can see that just one of these seems to have no effect. Two of them delay by 1 sample, three delay by 2 samples. Unless I'm going mad (which is quite possible 🙂)
The Delay component seems to work fine (although there is a minimum delay of 1 sample so putting N=0 still delays by 1).
If I test with one DelayS and look at the samples coming out of the analyser, I see 0.000000 for the first entry. With 2xDelayS I get 0.000000 for the first two entries. That looks to me like it's working correctly.
-Andrew
Andrew J ·
Bump - this is definitely a bug!
Wrote something here? To have a post removed or your name hidden, write to [email protected].