Hi ChucK devs, I've been digging into UAnae and having trouble getting AutoCorr/XCorr to work. I get an assertion failure when running a minimal example: SinOsc s => FFT fft =^ AutoCorr cor => blackhole; 1024 => fft.size; 440 => s.freq; while(true) { cor.upchuck(); 20::ms => now; } ... chuck: uana_extract.cpp:1381: void xcorr_fft(float*, long int, float*, long int, float*, long int): Assertion `fsize == gsize == size' failed. The assertion https://github.com/ccrma/chuck/blob/6217b3b08c3b8bb561730fb112d1b3a204cd1834... seems to be buggy. Currently it is: assert( fsize == gsize == size ); Unless size is supposed to always be 0 or 1, this will never pass. I think this is what was intended: assert( fsize == gsize && gsize == size ); When I make that change and build with make linux-jack, my example runs. Am I understanding the intent correctly? If so I can send a pull request with the fix. Thanks, Curtis
Seems right to me! Go ahead and make the pull request.
~Jack
On Wed, Jul 15, 2020 at 10:47 PM Curtis Ullerich
Hi ChucK devs,
I've been digging into UAnae and having trouble getting AutoCorr/XCorr to work.
I get an assertion failure when running a minimal example: SinOsc s => FFT fft =^ AutoCorr cor => blackhole; 1024 => fft.size; 440 => s.freq; while(true) { cor.upchuck(); 20::ms => now; } ... chuck: uana_extract.cpp:1381: void xcorr_fft(float*, long int, float*, long int, float*, long int): Assertion `fsize == gsize == size' failed.
The assertion https://github.com/ccrma/chuck/blob/6217b3b08c3b8bb561730fb112d1b3a204cd1834... seems to be buggy. Currently it is: assert( fsize == gsize == size );
Unless size is supposed to always be 0 or 1, this will never pass. I think this is what was intended: assert( fsize == gsize && gsize == size );
When I make that change and build with make linux-jack, my example runs.
Am I understanding the intent correctly? If so I can send a pull request with the fix.
Thanks, Curtis _______________________________________________ chuck-dev mailing list chuck-dev@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-dev
Done :) https://github.com/ccrma/chuck/pull/150
On Thu, Jul 16, 2020 at 11:17 AM Jack Atherton
Seems right to me! Go ahead and make the pull request. ~Jack
On Wed, Jul 15, 2020 at 10:47 PM Curtis Ullerich
wrote: Hi ChucK devs,
I've been digging into UAnae and having trouble getting AutoCorr/XCorr to work.
I get an assertion failure when running a minimal example: SinOsc s => FFT fft =^ AutoCorr cor => blackhole; 1024 => fft.size; 440 => s.freq; while(true) { cor.upchuck(); 20::ms => now; } ... chuck: uana_extract.cpp:1381: void xcorr_fft(float*, long int, float*, long int, float*, long int): Assertion `fsize == gsize == size' failed.
The assertion https://github.com/ccrma/chuck/blob/6217b3b08c3b8bb561730fb112d1b3a204cd1834... seems to be buggy. Currently it is: assert( fsize == gsize == size );
Unless size is supposed to always be 0 or 1, this will never pass. I think this is what was intended: assert( fsize == gsize && gsize == size );
When I make that change and build with make linux-jack, my example runs.
Am I understanding the intent correctly? If so I can send a pull request with the fix.
Thanks, Curtis _______________________________________________ chuck-dev mailing list chuck-dev@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-dev
_______________________________________________ chuck-dev mailing list chuck-dev@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-dev
participants (2)
-
Curtis Ullerich
-
Jack Atherton