Re: generating wavs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2009/4/29, Andrew Gaydenko <a@xxxxxxxxxxxx>:
> 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?

Almost anything, to be honest. If you're comfortable with python then
maybe that, or octave if you know that, if you're comfortable with
Audacity maybe learn how to use the "nyquist prompt".

I use SuperCollider, here's one of your cases done in an interactive session:

~seconds = 1;
~samplerate = 44100;

c = [-1, -1, 1, 1].wrapExtend(~samplerate * ~seconds).stutter(2).as(Signal)

c.plot(numChannels: 2)
c.play(numChannels: 2, mul: 0.05) // BE CAREFUL, turn yr speakers down

f = SoundFile("test.aiff").numChannels_(2);
f.openWrite;
f.writeData(c)
f.close

Dan
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@xxxxxxxxxxxxxxxxxxxx
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-user

[Index of Archives]     [Linux Sound]     [ALSA Users]     [Pulse Audio]     [ALSA Devel]     [Sox Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux