Jonathan Leonard wrote: > On Oct 11, 2007, at 2:45 PM, Jonatan Liljedahl wrote: ...snip... >> But, this is interesting, when recording a pure sawtooth from my >> analogue modular into my soundcard (through a mixing desk) there was >> some ringing too, but it didn't sound at all as dirty as the previous >> computer-generated sawtooth. When playing back this recorded analogue >> sawtooth, I had a hard time hearing the difference. ...snip... > My thinking from your last post was a bit depth or format mismatch. > Whatever method used to create the saw, must be explicitly duplicated in > your aplay command parameters. aplay does not detect anything for you, > so you have to specify every parameter for the wav file including > channels, format, bit depth, sampling rate. > > Looking at your pictures, the distortion occurs at the min and maxima of > the waveform which would also suggest a headroom mismatch. You ever > listen to a 24 bit file played back at 16 bit without dithering? Can be > interesting... > > I was also going to say in the experiment, which can be a little more > rigorous, to look at spectrum for comparison you need to do FFT. And > there is no audible control - maybe play the file back on a system you > know is working, not some other hacked linux box ;) > > Look at man aplay and make sure it has all the parameters exactly > matching your input conditions in audacity - which you have not > completely enumerated yet. What does your aplay command so far look > like? You want me to write it for you? ;P I found the problem. :) This is a bit embarrassing, but I come from a very analogue background regarding synthesis (I've built 3 analogue synthesizers)... The thing is, I knew nothing about DSP methods and thought that a sawtooth oscillator was just about incrementing a phase and wrap it back to -1.0 when it was above 1.0. Now I've learned that this is a naive implementation and that it produces infinite harmonics which leads to aliasing effects, audible as rough sub-harmonics. This is what I did in my JACK oscillator code, and apparently what Audacity does in their "generate tone" function. (And probably thousands of DSP-coding-beginners before me... ;) To get a good-sounding sawtooth (or other waveform with rich harmonics), a bandlimited oscillator is needed. -- /Jonatan [ http://kymatica.com ] ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Alsa-user mailing list Alsa-user@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/alsa-user