How to Change Playback Speed and Pitch Together by an Exact Ratio
To change playback speed and pitch together, apply one speed multiplier, r, without pitch preservation. Every frequency becomes r times its original value, while duration becomes the original duration divided by r. For example, 1.25× playback raises a 440 Hz tone to 550 Hz and shortens 60 seconds to 48 seconds.
This guide is for audio editors who want to create that linked change in an exported sound file. You will calculate the ratio, apply it with a suitable tool, and check whether the result matches your intended timing and tuning. Audacity documents this behavior in its Change Speed and Pitch manual.
What does changing speed and pitch together mean?
In a linked speed change, the recording’s events happen faster or slower, and its frequencies rise or fall proportionally. Audacity’s Change Speed and Pitch effect explicitly changes tempo, pitch, and frequency content together. Its separate Change Pitch effect leaves duration unchanged. Choose the operation that matches the result you need. Sources: Change Speed and Pitch, Change Pitch.
For this task, define the ratio as new playback speed ÷ original playback speed. A ratio above 1 speeds the recording up and raises its pitch. A ratio between 0 and 1 slows it down and lowers its pitch. Write the direction explicitly before entering a value: “new speed is 5/4 of original speed” is clearer than “change it by 5:4.”
How do you calculate the exact ratio?
Start with whichever requirement you actually know. The following equations describe an ideal constant linked speed change; the examples are illustrative calculations, not measured editing results.
| Known requirement | Calculate the speed multiplier r | Illustrative example |
|---|---|---|
| Direct speed ratio | r = new speed ÷ original speed | 5/4 = 1.25 |
| Original and target frequencies | r = target frequency ÷ original frequency | 550 ÷ 440 = 1.25 |
| Original and target durations | r = original duration ÷ target duration | 60 ÷ 48 = 1.25 |
| Original and target tempo | r = target BPM ÷ original BPM | 120 ÷ 96 = 1.25 |
Once you have r, calculate the expected result: new duration = original duration ÷ r, and new frequency = original frequency × r. The duration relationship follows directly from playing the same sequence of audio events at the new speed.
If an effect asks for a percentage change, enter 100 × (r − 1). Thus, 1.25× means +25%, while 0.8× means −20%. Audacity’s manual uses the same multiplier-to-percentage relationship. Source: Change Speed and Pitch.
A frequent mistake is confusing playback percentage with percentage change. “125% of original speed” means 1.25×. “Increase speed by 125%” means 2.25×. Another is reversing the duration formula: fitting 60 seconds into 48 seconds requires faster playback, so the multiplier must exceed 1.
How do musical intervals convert to speed ratios?
For an interval of n equal-tempered semitones, use r = 2^(n/12). Positive n raises pitch; negative n lowers it. To find the interval produced by an existing ratio, use n = 12 × log₂(r). These relationships follow from dividing an octave, a 2:1 frequency ratio, into twelve equal semitone ratios. Source: UNSW, Note names, MIDI numbers and frequencies.
The table below applies those equations to an illustrative 60-second recording. Displayed decimals are rounded.
| Speed multiplier | Percentage change | New duration | Pitch interval |
|---|---|---|---|
| 0.5× | −50% | 120 seconds | −12 semitones |
| 0.8× | −20% | 75 seconds | About −3.863 semitones |
| 1.25× | +25% | 48 seconds | About +3.863 semitones |
| 1.5× | +50% | 40 seconds | About +7.020 semitones |
| 2× | +100% | 30 seconds | +12 semitones |
| About 1.059463094× | About +5.946309% | About 56.632459 seconds | +1 semitone |
Decide whether your target is a numerical ratio or an equal-tempered interval. A 3:2 ratio is exactly 1.5, whereas seven equal-tempered semitones requires 2^(7/12), approximately 1.498307077. Those settings are close, but produce different results. Keep the defining fraction or formula in your editing notes so a rounded display does not become your only record of the target.
How can you apply the ratio in Audacity?
In versions that provide the documented effect, select the intended audio and open Effect → Pitch and Tempo → Change Speed and Pitch. Enter the ratio in Speed Multiplier, or its equivalent in Percent Change. The dialog links these controls with the resulting selection length. Source: Audacity’s Change Speed and Pitch manual.
For the illustrative 5/4 conversion, enter 1.25 or +25% and check that a 60-second selection becomes 48 seconds. Preview, apply, and export to a separate output file. Keep the original available so later revisions can start from the same source.
Menu labels and available controls can vary between versions. Verify that the selected operation couples speed and pitch. The current Audacity manual describes Change Pitch as preserving duration, so entering an interval there alone will not complete this task. Source: Audacity’s Change Pitch manual.
Treat the number the interface actually retains as your setting. If it rounds your requested ratio, calculate the result from that retained number before committing to a long export. For a ratio such as 1.25, the decimal terminates; for one equal-tempered semitone, any finite decimal entry is an approximation.
How can you make a repeatable conversion with FFmpeg?
FFmpeg provides another route: asetrate changes the sample rate without altering the PCM sample data, producing a linked speed and pitch change. aresample then converts the result to your desired delivery sample rate. Sources: FFmpeg filter documentation source, FFmpeg Filters Documentation.
The complete example below requires FFmpeg installed and available as ffmpeg in your terminal. Run it in a writable directory with unused filenames. The first command generates a 10-second, 440 Hz test tone at 48,000 Hz; the second applies a 5/4 ratio and writes a 48,000 Hz WAV file. FFmpeg’s documented sine source supplies the sample data. Source: FFmpeg filter documentation source.
ffmpeg -n -f lavfi -i "sine=frequency=440:sample_rate=48000:duration=10" -c:a pcm_s16le ratio-input.wav
ffmpeg -n -i ratio-input.wav -af "asetrate=60000,aresample=48000" -c:a pcm_s24le ratio-output.wav
The intermediate rate is 48,000 × 1.25 = 60,000 Hz. The expected output is 8 seconds with a 550 Hz tone. Returning the delivery rate to 48,000 Hz through resampling retains the changed playback timing. These commands were inspected against the documentation; FFmpeg was unavailable in the research environment, so they were not executed.
To adapt this example, establish your source file’s sample rate first. For a source rate S, the intermediate rate must be S × r. Reusing 60,000 for a source that is not 48,000 Hz changes the ratio. Check that the intermediate rate is accepted by your build and filter chain, particularly for large changes.
How exact is an exact ratio in a digital file?
Separate three questions: what ratio you intend, what value the tool accepts, and what duration the exported sample count can represent. An exact fraction such as 5/4 can have a terminating decimal. Many musical interval ratios require an approximation when entered numerically.
A rate-based conversion also needs scrutiny if its intermediate sample rate is rounded. For illustration, raising a 48,000 Hz source by one equal-tempered semitone mathematically calls for approximately 50,854.228529 Hz. If the chosen rate is 50,854 Hz, the implemented ratio is 50,854/48,000, rather than the full mathematical target. Calculating 1200 × log₂(actual ratio ÷ target ratio) gives an error of approximately −0.00778 cents. The cents relationship is documented by UNSW’s frequency and note reference.
Duration has a separate constraint: a digital file contains a whole number of sample frames. At 48,000 Hz, one sample frame spans about 20.833 microseconds. A calculated target duration that falls between sample boundaries must be represented by a nearby boundary. For the 10-second test above, the expected eight-second output corresponds to exactly 384,000 sample frames per channel.
These calculations provide a useful decision rule: preserve the defining ratio, record the value actually applied, and compare any resulting difference with the precision your project requires. Avoid describing a rounded setting as mathematically identical to its target.
How do you verify the exported result?
Check the exported file itself. A useful diagnostic sequence tests timing first, frequency second, and the complete recording last.
- Compare durations. Calculate original duration ÷ r. For the generated example, expect 10 ÷ 1.25 = 8 seconds. Check the whole file, including its ending.
- Compare a known frequency. A 440 Hz test tone should become 550 Hz at 1.25×. Use a frequency analyzer with enough resolution for your intended comparison.
- Check the retained settings. Record the multiplier or intermediate sample rate actually used, including any rounding.
- Listen through the result. Check the beginning, ending, transitions, and whether you processed the intended selection.
The pattern of a mismatch helps narrow the cause. Correct timing with unchanged pitch suggests pitch-preserving processing. Correct pitch with unchanged duration suggests an independent pitch operation. If both changes are wrong by the same ratio, revisit the ratio’s direction and, for rate-based processing, the source sample rate. These are diagnostic inferences from the linked-change equations.
If you have both a duration target and a pitch target, compare their required ratios before editing. A 60-second recording shortened to 48 seconds requires r = 1.25; a requested pitch doubling requires r = 2. One constant linked change cannot satisfy both. You would need to revise a target or choose processing that controls pitch and duration independently.
For a dependable conversion, write down the ratio, calculate the expected duration and frequency, apply one linked change, and verify the export against those predictions. That gives you a reproducible result and a clear explanation of any rounding involved.
