Re: [LAU] generating wavs

From: Erik de Castro Lopo <mle+la@email-addr-hidden-nerd.com>
Date: Wed Apr 29 2009 - 14:20:29 EEST

Andrew Gaydenko wrote:

> Say, I need to generate 1 second, 2 ch, given bps and sr wav filled with
> (analog) 0.0 except for the only sample in middle with 1.0 value, or some
> periodic sequence like { -1.0, -1.0, 1.0, 1.0, -1.0, -1.0, ... }, or something
> else which can be described in few lines of C/Java-like language.
>
> What is an appropriate software for such simple tasks?

Do you use GNU Octave at all?

If so, the latest versions of libsndfile ship with Octave modules
allowing you to do:

   octave:2> data = zeros(1,1000);
   octave:3> data (20) = 1 ;
   octave:4> sfwrite ("a.wav", data', 44100, "wav-float");

Erik

-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-user
Received on Wed Apr 29 16:15:04 2009

This archive was generated by hypermail 2.1.8 : Wed Apr 29 2009 - 16:15:04 EEST