Re: [LAU] generating wavs

From: Dan S <danstowell+lxau@email-addr-hidden>
Date: Wed Apr 29 2009 - 14:20:55 EEST

2009/4/29, Andrew Gaydenko <a@email-addr-hidden>:
> 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@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