Re: Mplayer makes small popping/static sound when speed_set is used
Dominique Michel <[email protected]> Fri, 28 Jul 2023 18:48:30 +0200
| Newsgroups | gmane.comp.video.mplayer.user |
|---|---|
| Message-ID | <20230728184830.73ea0984@tux> |
Le Sun, 16 Jul 2023 18:48:34 -0400, Brad Hermanson <[email protected]> a écrit : > Reimar, > > This is the mplayer command I'm using: > > mplayer -slave -osdlevel 0 -ao pulse -softvol -softvol-max 100 > -hr-mp3-seek -quiet -input file="pipe" -noconfig all -af > equalizer=0:0:0:0:0:0:0:0:0:0,volnorm Did you try it with -ao alsa or with -ao jack? In fvwm-crystal, I use '-ao jack,alsa' and never get this issue. As pulseaudio is not installed into my system, I cannot help you more. > > It also loads the scaletempo filter with speed=pitch or speed=tempo > sometimes depending on what that particular media is locked with. The > clicking seems to happen regardless of what I use on -af. > > By default, the "j" and "k" keys cause playback speed and pitch to > lower or raise by echo'ing (it's just bash script) speed_set commands > that would be equivalent to adjustments in, for example, semitones. > > I got the idea in the mplayer man page: > > "Add `speed_mult 0.9438743126816935´ and `speed_mult > 1.059463094352953´ to your input.conf to step by musical semi-tones." > > My program just calculates the correct numbers to adjust by anything, > 12-EDO (semitone) and beyond. Default is currently 60-EDO. > > If I'm understanding ChatGPT and you correctly, I wouldn't want the > sample rate to stay the same, since the desired effect, by default, > is to lower or raise pitch/speed. I'm not sure about anything beyond > that since I don't know the technical aspect of sound. The clicking > sound is only a minor issue for me and I've just accepted it, though > it would probably prevent my program from being used professionally. > > I suppose depending on the scaletempo setting it wouldn't click, but > the desired effect by default is changing playback speed and pitch. > > Thanks for the help. > > On Sun, Jul 16, 2023 at 4:50 PM Reimar Döffinger > <[email protected]> wrote: > > > > > > > > On 16 Jul 2023, at 04:34, Brad Hermanson <[email protected]> > > > wrote: > > > > > > Over the past two years I've developed a command-line front-end > > > to > > MPlayer > > > called Aletheia that features front-and-center pitch controls > > > using music intervals (e.g. 1/12 of an interval for a semitone, > > > but works with any EDO), and it utilizes speed_set to adjust. > > > Everything works great; > > however, > > > there is a slight clicking/popping/static sound on a speed_set > > > change. > > > > speed_set reinitializes the audio filter chain to adjust to the new > > sample rate. > > If you give an example of the exact filter chain (or better full > > command line) > > and audio output you are using, there's a better chance someone can > > take a look > > and tell you what goes on. > > Maybe you are doing things in a way that results in a sample rate > > change in the audio output: then the behaviour would be > > unsurprising. Maybe you are already using a resampler to ensure the > > final rate stays the same, > > in that case maybe there's just some logic missing to prevent the > > rest of the > > filter chain from being re-initialized etc. > > > > Best regards, > > Reimar > > _______________________________________________ > > MPlayer-users mailing list > > [email protected] > > https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users > > > > On Sun, Jul 16, 2023 at 4:50 PM Reimar Döffinger > <[email protected]> wrote: > > > > > > > > On 16 Jul 2023, at 04:34, Brad Hermanson <[email protected]> > > > wrote: > > > > > > Over the past two years I've developed a command-line front-end > > > to > > MPlayer > > > called Aletheia that features front-and-center pitch controls > > > using music intervals (e.g. 1/12 of an interval for a semitone, > > > but works with any EDO), and it utilizes speed_set to adjust. > > > Everything works great; > > however, > > > there is a slight clicking/popping/static sound on a speed_set > > > change. > > > > speed_set reinitializes the audio filter chain to adjust to the new > > sample rate. > > If you give an example of the exact filter chain (or better full > > command line) > > and audio output you are using, there's a better chance someone can > > take a look > > and tell you what goes on. > > Maybe you are doing things in a way that results in a sample rate > > change in the audio output: then the behaviour would be > > unsurprising. Maybe you are already using a resampler to ensure the > > final rate stays the same, > > in that case maybe there's just some logic missing to prevent the > > rest of the > > filter chain from being re-initialized etc. > > > > Best regards, > > Reimar > > _______________________________________________ > > MPlayer-users mailing list > > [email protected] > > https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users > > > _______________________________________________ > MPlayer-users mailing list > [email protected] > https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users _______________________________________________ MPlayer-users mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users