[LAU] generating wavs
    Erik de Castro Lopo 
    mle+la at mega-nerd.com
       
    Wed Apr 29 07:20:29 EDT 2009
    
    
  
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/
    
    
More information about the Linux-audio-user
mailing list