schnarf said:and set the master volume not too loud (you don't want distortion).
schnarf said:You don't need to do the inverse filtering yourself though, I'm happy to make a few impulses, just send me your sweeps. If anybody is curious, I can show how to generate these sweeps and inverse filters, as well as how to get the impulse response. I use GNU Octave, which is a free open source replacement for MATLAB. Enjoy!
CreateSweep("output filename.wav", length of sweep in seconds, sampling frequency);
DeconvolveSweep("recorded sweep filename.wav", "impulse response output.wav", seconds, sampling frequency);
1. Don't worry about it. It's part of how convolution works -- silence before will translate into a delay in the impulse response. The silence before is just to make sure you don't accidentally cut the beginning off, and the end is to make sure the decay is captured. Think about a system that just consists of a 1 second delay -- what would the resulting sine sweep look like and what would its impulse response look like compared to a system that does nothing to it?Hi, buddy!
First, thanks a lot for your explanations.
I'm here right now at my rehearsal place trying to take some IRs.
I have a couple of questions:
- About the "1/2 second (or so) silence before and after the recording"... how does the octave program "know" if that's silence or just parts of the freqs that could not be reproduced by the nature of the speaker? I guess it compares the sweep with the mic-recorded file, right? Well, they are not even the same length, the sweep is 10 sec and the recorded file is 10 second plus the two half seconds (so, aprox 11 sec). Am I doing something wrong here?
- Also, something weird:
When I try to create a sweep file with the CreateSweep, it works fine, but it's slightly different than yours.
When opened with a wav editor and listening, it goes "up" in frequency but the last second or so it goes down again (not totally, but it does). You can hear it here: http://www.pinktones.net/audio/sweep-alf.wav
What do you think?
Thank you for your help, dude!!
function CreateSweep(filename, sec, fs)
wavwrite(rot90(SineSweep(sec*fs, fs, 20, fs/2), -1), fs, filename);
schnarf said:One note: my code doesn't L1 normalize (so the sum of the absolute values of the samples adds up to 1). It normalizes so the impulse peaks at 1. This is because the utility L1 normalizes (I think, maybe he uses L2 or something)