[MPlayer-users] Audio Pitch Shift (solved)

Nan Null hovh03 at yahoo.com
Tue Dec 4 22:28:22 CET 2007


While there are solutions out there, it's not easy to find, at least with newbies like me to the mplayer.

I found the solution and want to share it here.  I still can't figure out the on the fly control of this (through slave mode + input file).

mplayer  -af ladspa=tap_pitch:tap_pitch:0:0:-90:0  song.mp3

The above command does not shift anything.  Basically transform the information to exactly the same as before.

The parameters (4 of them) above needs some explanation.  You can read the documentation here:

http://tap-plugins.sourceforge.net/ladspa/pitch.html

But it doesn't explain which is which.  But it's in the same order as in the document: semitone: rate:dry:wet

For newbie, semitone is a smallest discrete increment/decrement unit of pitch in Western musics.  This filter allows down/up to 12 semitones (or 1 octave).

If keeping the semitone value at 0, you can use a different method to change pitch, by adjust the 2nd value, rate.  You can go up 100% (shift up 1 octave) or go down 50% (-50), or go down 1 octave.  I think these corresponding to the frequency, but I am not sure it's linear or in some log scale (probably linear).

The dry value means the original sound.  You can pass that through.  If pass a value of -90 dB, you suppress it completely.  If pass in as 0, you let it goes through as usual.  You can amplify it up to 20dB.  These are volume information here, not frequency (not pitch, just the loudness).

The wet value means the modified sound (this is a 2nd stream coming out of the filter).  Same range of -90 to 20 to either suppress it or let it pass through (0) or amplify it up to 20db

Here's a reference:

value1:value2:value3:value4

1st value is the shift by semitones, which takes precedent over percentage shift on the 2nd parameter (value2).
valid value is from -12 to 12 semitones (1 octave = 12 semitones).

The 2nd value is shifting by percentage.  Value values are from -50 to
 100, which means shift down by half, or shift up double.

The
dry level is value 3, which means the original value.  Range from -90
to 20. This is the volume.  If set to 0, means it comes out as original.
set to -90 to suppress it completely.

The
wet level is the modified value (value4) (that's why it's called wet,
or no longer original).  Range is from -90 to 20 (db).  It's set to 0
as the same volume as the original without any amplification.





      ____________________________________________________________________________________
Be a better sports nut!  Let your teams follow you 
with Yahoo Mobile. Try it now.  http://mobile.yahoo.com/sports;_ylt=At9_qDKvtAbMuh1G1SQtBI7ntAcJ


More information about the MPlayer-users mailing list