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

Re: A software function generator for /dev/dsp?



On Tue, 12 Jan 2010 10:53:37 +0100, Michael Renner wrote:

> I'm looking for a function generator for the soundcard. It should
> generate sine, square and triangle.

Take a look at sox. Eg, the following from 'man sox',

,-----
| synth [-j KEY] [-n] [len [off [ph [p1 [p2 [p3]]]]]] {[type] [combine]
| [[%]freq[k][:|+|/|-[%]freq2[k]]] [off [ph [p1 [p2 [p3]]]]]}
|        This  effect  can  be  used to generate fixed or swept frequency
|        audio tones with various wave shapes, or to  generate  wide-band
|        noise  of  various  `colours'. . . 
| 
|        For  example,  the  following  produces a 3 second, 48kHz, audio
|        file containing a sine-wave swept from 300 to 3300 Hz:
|           sox -n output.wav synth 3 sine 300-3300
|        and this produces an 8 kHz version:
|           sox -r 8000 -n output.wav synth 3 sine 300-3300
`-----


-- 
Tong (remove underscore(s) to reply)
  http://xpt.sourceforge.net/techdocs/
  http://xpt.sourceforge.net/tools/


Reply to: