-
Notifications
You must be signed in to change notification settings - Fork 762
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convolution2: kernel size is truncated to fftsize #737
Comments
This OK? (patch attached) 2013/2/26 Joseph Anderson [email protected]
|
Hello Dan, Thanks for this! Sounds very plausible, thanks for such a quick solution. I've just spoken Josh, who has said he'll make a compile this evening and forward to me for a look. I'll let you know when all is confirmed. My best,
On 26 Feb 2013, at 1:25 pm, danstowell [email protected] wrote:
|
Fixed in commit e978406 |
Thanks Dan! Updating the help clarifies this!! |
Input kernel size is truncated to fftsize.
There should probably be a warning in the documentation that this is the case.
// -----------------------------------------------
// Test: Convolution2, kernel size is truncated to fftsize
//
// OS: OSX 10.8
// SC: 3.6.2
// SR: 96000
Server.default = s = Server.local.boot;
// number of frames for buffer (kernel)
~numFrames = 2**10; // 1024
// frames size of FFT
~frameSize = 29; // 512 - bad!
// ~frameSize = 210; // 1024 - good!
// set up buffer (kernel)
~buffer = Buffer.alloc(s, ~numFrames);
~buffer.zero;
// add an impulse @ gain
~gain = 0.dbamp;
~sampleIndex = ~numFrames - 1;
// create impulse at sampleIndex
~buffer.set(~sampleIndex, ~gain);
(
// inspect
"\nnumFrames = ".post; ~buffer.numFrames.postln;
"frameSize = ".post; ~frameSize.postln;
// test!
~synth = {
Convolution2.ar(
Saw.ar(110.0, -18.dbamp),
// PinkNoise.ar(-6.dbamp),
~buffer,
framesize: ~frameSize
)
}.play;
)
~synth.free;
~buffer.free;
s.quit;
The text was updated successfully, but these errors were encountered: