Re: synth seems to generate "pops"?
Brian Watson <[email protected]> Tue, 25 Mar 2025 14:10:26 -0300
| Newsgroups | gmane.comp.audio.sox |
|---|---|
| Message-ID | <CAN255p7P+BGoq68yz9sOULq_MOH34Fjf1QMjngzcApkJSxtvrA@mail.gmail.com> |
--===============8127679855679789779== Content-Type: multipart/alternative; boundary="000000000000b4d81306312dcc4a" --000000000000b4d81306312dcc4a Content-Type: text/plain; charset="UTF-8" On Tue, 25 Mar 2025 at 12:57, SoX NG <[email protected]> wrote: > 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 > This won't really work. I'm planning to play hundreds of tones with logic like "that frequency on that channel was heard at -30dB - next time try -40dB" etc. etc. 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. > My USB hardware is a Schiit Modi+ DAC. This is far from "premium" by HiFi DAC standards, but I believe it should be more than capable of this task. I tried using the built-in sound hardware in my device (card 1: PCH [HDA Intel PCH], device 0: ALC283 Analog [ALC283 Analog]) and I get similar, but worse, artefacts at the end - there in now some delay between the end of the tone and the "pop" and the different channels seem to "pop" independently. --000000000000b4d81306312dcc4a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div class=3D"gmail_quote gmail_quote_container"><div dir= =3D"ltr" class=3D"gmail_attr">On Tue, 25 Mar 2025 at 12:57, SoX NG <<a h= ref=3D"mailto:[email protected]">[email protected]</a>> wrote:<br></= div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;bor= der-left:1px solid rgb(204,204,204);padding-left:1ex">On 25/03/25 15:58, Br= ian Watson wrote:<br> > play -r 44100 -n -t alsa synth 0.5 sin 5000 vol -25dB remix 1 0<br> ><br> > wrapped into a script with the frequency, gain and remix parameters<br= > > replaced with variables will work exactly as I had hoped.<br> ><br> > Except - when I listen to the generated sounds there is a small pop, o= r<br> > crack, at the start and end of each sound.<br> <br> I've tried your exact command line here (Debian GNU/Linux)<br> and just get a peep, no pops.<br> <br> One workaround would be generate them first and play them<br> in one session, if that is feasible in your use case.<br> <br> for f in 5000 6000 7000 8000 9000 10000<br> do<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0sox -n tone-$f.wav synth 0.5 sin $f<br> done<br> play --combine concat tone*wav<br></blockquote><div><br></div><div>This won= 't really work.=C2=A0 I'm planning to play hundreds of tones with l= ogic like "that frequency on that channel was heard at -30dB - next ti= me try -40dB" etc. etc. <br></div><div><br></div><blockquote class=3D"= gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(20= 4,204,204);padding-left:1ex">If instead you need variable pauses between to= nes, I suspect you need<br> a different sound device; USB ones exist and are cheap0est and easiest<br> if quality is not at a premium.<br></blockquote><div><br></div><div>My USB = hardware is a Schiit Modi+ DAC.=C2=A0 This is far from "premium" = by HiFi DAC standards, but I believe it should be more than capable of this= task. I tried using the built-in sound hardware in my device (card 1: PCH = [HDA Intel PCH], device 0: ALC283 Analog [ALC283 Analog]) and I get similar= , but worse, artefacts at the end - there in now some delay between the end= of the tone and the "pop" and the different channels seem to &qu= ot;pop" independently.</div><div>=C2=A0</div><br></div></div> --000000000000b4d81306312dcc4a-- --===============8127679855679789779== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============8127679855679789779== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Sox-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sox-users --===============8127679855679789779==--