Pitch Shifter/Changer

Feature requests for VLC.
Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Pitch Shifter/Changer

Postby Jean-Baptiste Kempf » 05 Sep 2017 16:41

In the nightly build of tomorrow...
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

rambo
Blank Cone
Blank Cone
Posts: 91
Joined: 07 Feb 2013 21:17

Re: Pitch Shifter/Changer

Postby rambo » 05 Sep 2017 17:00

Oh, then I misread it.

rambo
Blank Cone
Blank Cone
Posts: 91
Joined: 07 Feb 2013 21:17

Re: Pitch Shifter/Changer

Postby rambo » 07 Sep 2017 02:30

Finally!

It's THERE! After so many years, the feature is finally implemented, I can't believe it!

For those who want to use it now, you must install the nightly:
vlc-3.0.0-20170906-0457-git-win64

Go to TOOLS, then EFFECTS AND FILTERS, then Audio effects and then in the tab "Advanced". It's exactly how it's supposed to be, you can change the pitch in steps of 0.1 semitones. In western music, the minimum leap is 0.5 semitones, but sometimes there are some albums or tracks that are slightly flat or sharp, so that extra room of 0.1 semitone finetuning is simply perfect.

Two things to consider:

1. There should be a slider button in the Customize UI menu. There's already one for the speed of the playback, lets add now another slide for the pitch.

2. The "sound quality" could be a little bit better. When you change the pitch, the audio quality gets notably worse. This shouldn't happen, since using, in example, Audacity tool for changing the pitch doesn't affect the sound quality at all, so it's possible to do.

Thank you very much!

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Pitch Shifter/Changer

Postby Jean-Baptiste Kempf » 07 Sep 2017 13:36

thx.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

Cantar4
Blank Cone
Blank Cone
Posts: 41
Joined: 18 Sep 2016 00:53
VLC version: 3.0.0
Operating System: mac os
Location: Grenoble France

Re: Pitch Shifter/Changer

Postby Cantar4 » 07 Sep 2017 14:16

When you change the pitch, the audio quality gets notably worse.
In the resampling preferences, is your sinc function set to best quality?

rambo
Blank Cone
Blank Cone
Posts: 91
Joined: 07 Feb 2013 21:17

Re: Pitch Shifter/Changer

Postby rambo » 07 Sep 2017 16:38

All my settings are the default ones. Here's what I got:

Advanced Preferences:
Audio resampler: Audio resampler "Automatic"
Speex resampler: Resampling quality 4
SRC resampler: Sample rate converter type "Sinc function (fast)"


I changed those settings to these:

Resampling quality 10
Sample rate converter type "Sinc function (best quality)"


I didn't noticed any sound quality difference after "upgrading" the quality, it still sounds bad when you apply the new pitch feature.

To see (hear) what I'm talking about, download Audacity 2.1.3, load a track (an acoustic one, like a guitar and a singer to emphasize the quality loss) and apply "Change pitch..." in the Effects menu option. Select the same amount of pitch change in both Audacity and VLC and hear the difference. It's quite noticeable.

Cantar4
Blank Cone
Blank Cone
Posts: 41
Joined: 18 Sep 2016 00:53
VLC version: 3.0.0
Operating System: mac os
Location: Grenoble France

Re: Pitch Shifter/Changer

Postby Cantar4 » 07 Sep 2017 17:03

I am surprised there is no quality gain.
yes I know I should not ask, but...
...have you restarted your application after <save> ?

rambo
Blank Cone
Blank Cone
Posts: 91
Joined: 07 Feb 2013 21:17

Re: Pitch Shifter/Changer

Postby rambo » 07 Sep 2017 20:10

Yeah, I knew I had to make that clear. I've restarted VLC of course, although there should be a warning when changing these options to inform that you need to restart the application, or ever better, prompt if you want to restart now the app.

What about the comparison? Did you installed Audacity to check the difference?

Cantar4
Blank Cone
Blank Cone
Posts: 41
Joined: 18 Sep 2016 00:53
VLC version: 3.0.0
Operating System: mac os
Location: Grenoble France

Re: Pitch Shifter/Changer

Postby Cantar4 » 07 Sep 2017 23:07

Did you installed Audacity to check the difference?
Yes I did. It was utmost easy to set the +/- values on the self explanatory Audacity.
But I'm still unable to do the same on the provisional interface of the yesterday VLC's test version
for MacOS. We should leave the developper some more time to refine his interface.

Alternately, would you post your numbers to enter in Audacity 2.1.3 and VLC 3.0.0 to get
the same pitch shift. I will run the tests on <Plain Gold Ring> by Raphael Quenehen / Saxo.
--

rambo
Blank Cone
Blank Cone
Posts: 91
Joined: 07 Feb 2013 21:17

Re: Pitch Shifter/Changer

Postby rambo » 07 Sep 2017 23:54

Well, both work the exact same way: VLC and Audacity both let you adjust the pitch by semitones, in 0.1 semitone steps.

It's as simple as load the audio file into Audacity, click on the option and select for example -1 semitone.

Then you go to VLC, open the same audio file and then set -1 semitone.

And, compare them, you don't even need headphones, any speaker would make the difference quite noticeable, but if you feel like it, wear some headphones to listen more carefuly. I'm using a Windows 10 machine though.

Cantar4
Blank Cone
Blank Cone
Posts: 41
Joined: 18 Sep 2016 00:53
VLC version: 3.0.0
Operating System: mac os
Location: Grenoble France

Re: Pitch Shifter/Changer

Postby Cantar4 » 08 Sep 2017 08:31

to insure that VLC & Audacity modified signals are equally treated,
I want to store both then convert them alternatively through the same DtoA chain.
Problem, I didn't find a way to record the VLC modified sound like Audacity does it,
what's your method?

rambo
Blank Cone
Blank Cone
Posts: 91
Joined: 07 Feb 2013 21:17

Re: Pitch Shifter/Changer

Postby rambo » 08 Sep 2017 10:27

My method for what?

The only thing I've done is listening to the pitch changed audio in both programs and simply notice the quality difference, I have not compared the audio wave or signal visually at all.

Cantar4
Blank Cone
Blank Cone
Posts: 41
Joined: 18 Sep 2016 00:53
VLC version: 3.0.0
Operating System: mac os
Location: Grenoble France

Re: Pitch Shifter/Changer

Postby Cantar4 » 09 Sep 2017 23:44

My method for what? /.../simply notice the quality difference, I have not compared the audio wave or signal visually at all.
My ears are probably not as selective as yours... To get a well documented advice I will do two things:
- with sinewaves I will compare the before & after distorsion figures on an audio analyser.
- I will also send two short music/speech files to a cello player friend who beneficiates
of an 'absolute ear' (+ a HiQ audio chain :-)

Now you understand why I have to know how to record the VLC's pitch modified audio files.
Is somebody here who can help me ? (Latest night VLC 3.0 / OSX 10.12.5)
--

rambo
Blank Cone
Blank Cone
Posts: 91
Joined: 07 Feb 2013 21:17

Re: Pitch Shifter/Changer

Postby rambo » 10 Sep 2017 02:48

Oh, I don't think I have better ear capacities than you, I'm so average even average gods envy me, hahahaha.

OK, I'll try to record the VLC playback with the effect included losslessly, so I can compare visually both waves. Anyways, this actually doesn't prove anything, you could simply say that the signal is "different", but not better. It's simply your ears.

Another possibility is that I have something bad configured, but as I've said, I have almost all the settings in the default position/set.

OK, so after a few tries I've finally done some progress.
First, I've recorded with a lossy program the internal audio of Audacity and VLC. The first track shows the file loaded into Audacity and with the effect applied, the second one should be an exact copy of the first, but since the recording process was lossy, you see that the signal is way different, and finally the VLC rec.
Image

Then I've managed to record losslessly the Audacity playback, as you can see in the next picture because the first and second tracks are similar. The third track is the VLC playback recorded by Audacity, but it can't be lossless becase I play the recorded VLC playback in Audacity and it sounds a little worse than the actual VLC playback.
Image

So, as you can see, I think this proves what I'm saying. By the way, the audio file tested was an mp3, although this happens with all of them. Just know that some songs are so "dirty" that it's harder to listen the different, simply try a clean one.

Cantar4
Blank Cone
Blank Cone
Posts: 41
Joined: 18 Sep 2016 00:53
VLC version: 3.0.0
Operating System: mac os
Location: Grenoble France

Re: Pitch Shifter/Changer

Postby Cantar4 » 10 Sep 2017 10:18

I'll try to record the VLC playback with the effect included, losslessly
Looking at analog waveforms will tell you nothing about distortion, intermodulation and granularity ; the only way to evaluate a pitch shifter is to analyse its digital output with a spectrum analyser. I guess VLC can store the pitch-modified stream sent to the pc's D->A converter, something Audacity allows.
Is there somebody on this forum knowing how to activate this function and get access to the stored data? (I tried with the Convert/Stream menus but failed)
--

EodiV
Blank Cone
Blank Cone
Posts: 92
Joined: 15 Jul 2017 16:50

Re: Pitch Shifter/Changer

Postby EodiV » 20 Nov 2017 00:18

If you gents can clarify exactly what you need I can see if we can formulate a fix for it, so keep up the research, sounds like Cantar4 is onto something.
(I also dont knopw how to access the data you need)

rambo
Blank Cone
Blank Cone
Posts: 91
Joined: 07 Feb 2013 21:17

Re: Pitch Shifter/Changer

Postby rambo » 20 Nov 2017 00:58

Hi, thanks for passing by. It's just that the new pitch shifter feature in VLC, when it changes the pitch, it "messes up" the track, because I can clearly hear that the sound quality gets notably worse. I don't know what it can be, may be the process is lossy. I think it should use a better plug-in or whatever it is that adds this feature. I know it's lossy because when I change the exact amount of pitch using Audacity, the sound quality is just as good as the original track, but of course with the modified pitch.

I spent some hours doing the research to write my last message up there, where I compare the sound waves of the resulting modified track using Audacity and VLC. By the way, when you change the pitch in Audacity, it takes like 1-2 seconds (well, since this is a CPU process, it depends on the power of your CPU) of processing, it's not a on-the-go feature, like VLC.
May be that's the problem?
May be you should use a process that is more CPU demanding but the result is almost lossless?

CrystalMatrix
New Cone
New Cone
Posts: 1
Joined: 20 Feb 2018 23:36

Re: Pitch Shifter/Changer

Postby CrystalMatrix » 20 Feb 2018 23:44

Thanks for considering a basic pitch adjuster.
WIll buy VLC with this feature preferred to any other player.
Namaste

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Pitch Shifter/Changer

Postby Jean-Baptiste Kempf » 17 Jun 2018 22:58

Hi, thanks for passing by. It's just that the new pitch shifter feature in VLC, when it changes the pitch, it "messes up" the track, because I can clearly hear that the sound quality gets notably worse. I don't know what it can be, may be the process is lossy. I think it should use a better plug-in or whatever it is that adds this feature. I know it's lossy because when I change the exact amount of pitch using Audacity, the sound quality is just as good as the original track, but of course with the modified pitch.

I spent some hours doing the research to write my last message up there, where I compare the sound waves of the resulting modified track using Audacity and VLC. By the way, when you change the pitch in Audacity, it takes like 1-2 seconds (well, since this is a CPU process, it depends on the power of your CPU) of processing, it's not a on-the-go feature, like VLC.
May be that's the problem?
May be you should use a process that is more CPU demanding but the result is almost lossless?

Change the quality of the resampler.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

dor1angray
New Cone
New Cone
Posts: 1
Joined: 05 May 2019 21:49

Re: Pitch Shifter/Changer

Postby dor1angray » 05 May 2019 22:09

Using the last nightly build of VLC in MacOS. Trying to use the Pitch Shifter but it is not working.

Here is how I am activating it:

1) Open VLC
2) Add a song to the playlist, checking its original pitch
3) Go to the VLC menu in the upper-left corner, select Preferences in the drop-down menu
4) In the preferences window, click the Show All button. This changes the layout of the window to a 2-column one with the list of elements on the left and their properties on the right
5) On the left side, go to Filters menu expanding it to show all elements
6) While having highlighted the main Filters element, select the necessary filters from the list on the right checking the boxes next to their names, including tempo scaler, volume normalization, equalizer and the pitch shifter. The audio filter field get populated with the filters name: scaletempo:param_eq:scaletempo_pitch:normvol
7) Go down the list of filters on the left below the expanded Filters menu, select Audio pitch changer
8) In the Pitch shift box on the right, change the Pitch Shift value to different values including -5, 0, 0.5, 3, etc.
9) Click Save. Start the audio playback. The pitch remains original.

I love VLC but its Mac version has a different way of doing things and somehow I cannot figure this seemingly simple thing out. :cry:

What am I missing here guys?
Any advice would be appreciated.

Thanks!

privatecrunch
New Cone
New Cone
Posts: 2
Joined: 17 Oct 2017 08:34

Re: Pitch Shifter/Changer

Postby privatecrunch » 18 Sep 2021 02:25

Thanks so much for including this pitch shifting feature.

Is there any way to get a hook for pitch up and pitch down to get shortcut keys to be changed live while playing? I'm using VLC as the media player on a karaoke machine, and being able to shift the key live on the fly without necessitating going into a menu, make changes, and restart playing is the only missing feature preventing VLC from being amazing for this purpose.


Return to “VLC media player Feature Requests”

Who is online

Users browsing this forum: Bing [Bot] and 7 guests