Skip to content

Commit

Permalink
DOCS/man: improve explanation on how to shift notes with --pitch
Browse files Browse the repository at this point in the history
Previously, this was in the rubberband filter but it gives out random
numbers without explaning where they come from. Move it to the --pitch
section instead and reword it a bit. Closes mpv-player#14652.
  • Loading branch information
Dudemanguy committed Aug 9, 2024
1 parent 88885c0 commit 70fad1d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
5 changes: 1 addition & 4 deletions DOCS/man/af.rst
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,7 @@ Available filters are:
using the standard ``speed`` property, not ``af-command``.

``multiply-pitch <factor>``
Multiply the current value of ``<pitch-scale>`` dynamically. For
example: 0.5 to go down by an octave, 1.5 to go up by a perfect fifth.
If you want to go up or down by semi-tones, use 1.059463094352953 and
0.9438743126816935
Multiply the current value of ``<pitch-scale>`` dynamically.

``lavfi=graph``
Filter audio using FFmpeg's libavfilter.
Expand Down
19 changes: 19 additions & 0 deletions DOCS/man/options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,25 @@ Playback Control
affect playback speed. Playing with an altered pitch automatically inserts
the ``scaletempo2`` audio filter.

In a standard 12-tone scale system, octaves are separated by a factor of 2
whereas semitones are represented by a factor of 2^(1/12). This means
pitches can easily be shifted up or down with a simple multiplier.

.. admonition:: Examples

``--pitch=2``
Shifts the pitch up a full octave.
``--pitch=0.5``
Shifts the pitch down an octave.
``--pitch=1.498307`` (2^(7/12))
Shifts the pitch up a perfect fifth.
``--pitch=0.667420`` (2^(-7/12))
Shifts the pitch down a perfect fifth.
``--pitch=1.059463`` (2^(1/12))
Shifts the pitch up a semitone.
``--pitch=0.943874`` (2^(-1/12))
Shifts the pitch down a semitone.

``--pause``
Start the player in paused state.

Expand Down

0 comments on commit 70fad1d

Please sign in to comment.