Re: [linux-audio-user] Generating x frames of silence wav.

From: Asbjørn Sæbø <asbjs@email-addr-hidden>
Date: Fri Jun 02 2006 - 13:11:01 EEST

On Wed, May 31, 2006 at 09:45:36PM +0200, Alex Polite wrote:
> I need to programatically pad a wav file with x frames of silence. I
> figure the best way of doing is to generate a wav file containing x
> frames of silence and concatenate the generated file with the
> original. Problem is I don't know how to generate the silence.

Read the wave file into octave (wavread()).
Generate all the zeros you want (zeros()).
Append the the zeros to the original.
Write the wave file out again (wavwrtie()).

> The method I'm using now feels kind of backwards. I generate two sine
> waves that are phase shifted in relation to one another and then I mix
> them so that they cancel one another out.

If you can generate a sine wave, why not generate one with amplitude
zero?

Asbjørn
Received on Fri Jun 2 16:15:02 2006

This archive was generated by hypermail 2.1.8 : Fri Jun 02 2006 - 16:15:02 EEST