Re: synth seems to generate "pops"?

SoX NG <[email protected]> Tue, 25 Mar 2025 16:56:21 +0100
Newsgroups gmane.comp.audio.sox
Message-ID <[email protected]>
On 25/03/25 15:58, Brian Watson wrote:
> play -r 44100 -n -t alsa synth 0.5 sin 5000 vol -25dB remix 1 0
>
> wrapped into a script with the frequency, gain and remix parameters
> replaced with variables will work exactly as I had hoped.
>
> Except - when I listen to the generated sounds there is a small pop, or
> crack, at the start and end of each sound.

I've tried your exact command line here (Debian GNU/Linux)
and just get a peep, no pops.

One workaround would be generate them first and play them
in one session, if that is feasible in your use case.

for f in 5000 6000 7000 8000 9000 10000
do
         sox -n tone-$f.wav synth 0.5 sin $f
done
play --combine concat tone*wav

(by default, "play" uses --combine sequence,
which closes and reopens the audio device between files)

If instead you need variable pauses between tones, I suspect you need
a different sound device; USB ones exist and are cheap0est and easiest
if quality is not at a premium.

Another cause could be impedance mismatching between the audio output and
the amplifier's input, or putting headphone output into a microphone input
or something like that.

     M