[linux-audio-dev] one-sample length impulse - HOWTO?

Asbjørn Sæbø asbjs at stud.ntnu.no
Mon Jan 16 11:57:19 UTC 2006


On Sat, Jan 14, 2006 at 12:03:55AM +0300, Andrew Gaydenko wrote:
> Hi!
> 
> The aim is to generate audiofile with one/few-sample-length impulse inside
> silence. Is there suitable software to do the job?

I usually use Matlab for this.  Octave may also be used.  Both of these 
are very suitable for that kind of work.

In Octave:
-----------------------------------------
% Make a 100000 sample vector of zeros,
% set sample 50000 to one (the impulse),
% write to file

t = zeros(1,100000);   
t(50000) = 1;
ausave('impulse.wav',t,44100,'long');
-----------------------------------------


Asbjørn





More information about the Linux-audio-dev mailing list