[mpg123-devel] [ mpg123-Feature Requests-1897198 ] simple pitch control
Brought to you by:
sobukus
From: SourceForge.net <no...@so...> - 2011-04-08 08:18:53
|
Feature Requests item #1897198, was opened at 2008-02-19 20:34 Message generated for change (Settings changed) made by sobukus You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=733197&aid=1897198&group_id=135704 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: mpg123 Group: None Status: Closed Resolution: Fixed Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: simple pitch control Initial Comment: Would it be possible to add a simple way to slightly alter the pitch of playback? Just like the control you find on some vinyl recordplayers, to decrease or increase the playback speed between say -10% .. + 10%. This way you can tune the music to your guitar instead of the other way around. ---------------------------------------------------------------------- Comment By: Thomas Orgis (sobukus) Date: 2008-04-17 01:11 Message: Logged In: YES user_id=470743 Originator: NO Eh... that error is natural... there was no hardware playback rate available for that pitch. I hope it's OK to close this now... as the feature works where it makes sense. It's a bit embarassing that I forgot to mention that feature in any release notes... heck, it slipped through;-) ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2008-03-09 12:16 Message: Logged In: NO I forgot, when played too slow (< -0.9 or too fast (> 3) you get an error message: /home/user> mpg123 --pitch -1 02_no_one_knows.mp3 High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3 version 20080309000000; written and copyright by Michael Hipp and others free software (LGPL/GPL) without any warranty but with best wishes [format.c:144] error: Unable to set up output format! Constraints: 44100, 22050 or 11025Hz. [mpg123.c:885] error: Initial seek failed: Unable to set up output format! (code 1) /home/user> ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2008-03-09 12:10 Message: Logged In: NO Wow, I hadn't expected this to be ready so quickly! I tried it and everything works wonderful. I assume that the resampling isn't used if no pitch correction is requested. I have one last suggestion: could you add this to the remote interface so frontends can also implement this awsome feature. In anycase, thank you very much indeed! ---------------------------------------------------------------------- Comment By: Thomas Orgis (sobukus) Date: 2008-03-08 10:03 Message: Logged In: YES user_id=470743 Originator: NO Please try http://mpg123.org/snapshot I added the --pitch parameter as well as some new key to the terminal control mode (-C) to influence the pitch via output sample rate. That indeed is the most natural and best quality way to do this. Also, I realized that if your audio hardware doesn't do the pitched rate, you can still (and possibly do already without knowing) use an output module that does resampling when needed anyway. The default alsa output does that, portaudio does that... I guess SDL and friends, too. Anyhow, please give me some feedback on this (actually very cool;-) feature. When there isn't something terribly broken, it will be part of a 1.4.0 release (though the next official mpg123 will most probably be a 1.3.1 bugfix release, 1.4.0 following somewhat later). ---------------------------------------------------------------------- Comment By: Thomas Orgis (sobukus) Date: 2008-03-07 08:46 Message: Logged In: YES user_id=470743 Originator: NO Playing the file at lower sample rate is no problem for most (good) sound hardware. But playing a file of 44100KHz at a higer rate may be impossible because you sound hardware may have a limit there. So I strongly suppose that alsaplayer does resampling in software. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2008-03-06 21:37 Message: Logged In: NO I was thinking it would be as simple as playing a, say 44100 samples/sec file at a slightly lower or higher samplerate, say 39000 or whatever. Or is that what you call resampling? The alsaplayer e.g. has a slider to control the pitch, i have no idea how they do it but it works. ---------------------------------------------------------------------- Comment By: Thomas Orgis (sobukus) Date: 2008-03-02 23:52 Message: Logged In: YES user_id=470743 Originator: NO Sure that's possible... we have simple resampling code there. Either one can tell the library to resample to the output sampling rate +- 10% but then still play with the real rate (causing a mismatch = pitch change) or just set a different output rate when the hardware supports it. When you play the guitar I suppose you have a sound card that supports a range of sample frequencies? Hm... of course it's not always workable, In case you have a file with 96KHz and your sound card can do just that. Well, letting libmpg123 resample to a fixed desired output rate + pitch would be the solution, then. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=733197&aid=1897198&group_id=135704 |