This is a huge can of worms you're opening here ... A simple sawtooth wave is going to have a lot of aliasing, unless you specifically use an algorithm that produces a band-limited approximation, at which point you've already left me far behind ;-) For FFT, my needs have been very modest, I just eyeball stuff in Snd. There is also www.baudline.com , very slick but it is merely free and not Free. -PW On 10/25/05, Mark Knecht <markknecht@xxxxxxxxx> wrote: > On 10/25/05, Paul Winkler <pw_lists@xxxxxxxxxx> wrote: > > Awk is powerful and concise, but it's not my friend - I can never remember how > > the heck it works ;-) > > > > I'd probably do like Paul D. suggests and use existing tools - e.g. > > find something > > to generate an appropriate soundfile, then feed it through sox. > > But just for fun, here's something silly I just whipped up: > > > > $ ./sine_hex.py > > Usage: ./sine_hex.py frequency [sampling rate] [bits] > > Print one cycle of a sine wave of approximately the > > given frequency. > > Values given in hex with *bits* precision at *sampling rate*. > > Default sampling rate is 44100. Default bits is 16. > > > > pwinkler@Winkler-P-LT2K ~ > > $ ./sine_hex.py 24000 48000 > > 0000 > > ffff > > > > pwinkler@Winkler-P-LT2K ~ > > $ ./sine_hex.py 3000 48000 > > 0000 > > 31f1 > > 61f7 > > 8e39 > > b504 > > d4da > > ec82 > > fb14 > > ffff > > fb14 > > ec82 > > d4da > > b504 > > 8e39 > > 61f7 > > 31f1 > > > > And here's the source. Most of it is argument handling :-) > > http://www.slinkp.com/~paul/sine_hex.py > > > > Intereing. Another country heard from. > > One question that comes to mind, as I play with these solutions, is > deciding how to evaluate the outputs. For instance I was fiddling with > generating a sawtooth from Marcus' s method. I could do the same with > this, but how do I know each of them is really implementing what I'm > interested in? > > What tools do people use for FFT analysis on files like this? > > Cheers, > Mark > > -- http://www.slinkp.com