Pitch Shifter
Professional-grade audio transposition tool. Independent control of Pitch and Speed, realtime FFT analysis, Smart Key Transposition, and studio-quality WAV export.
About
This utility addresses the fundamental challenge in Digital Signal Processing (DSP): decoupling the auditory properties of Pitch (Frequency) and Duration (Time). In analog tape systems, these two variables are linearly linked - doubling the playback speed doubles the frequency (f โ v). This tool utilizes a browser-based implementation of granular synthesis and buffer manipulation to allow independent control.
Accuracy is paramount for musicians. A deviation of just 5 cents is perceptible to the trained ear. This engine uses 64-bit floating-point math for internal calculations before downsampling to 16-bit PCM for export. It is designed for:
- Vocalists: Transposing backing tracks to match specific vocal ranges (e.g., Alto G3 to E5).
- Producers: Sample manipulation, creating "Chopped and Screwed" or "Nightcore" aesthetics without artifacts.
- Transcription: Slowing down complex jazz solos (Time-stretch 50%) while maintaining the original key.
The system operates locally within the AudioContext of your browser, ensuring strict data privacy and zero server latency.
Formulas
To calculate the required sample rate modification or detuning factor, we utilize the logarithmic relationship between frequency and pitch intervals. The frequency f after shifting n semitones is given by:
Where n is the integer semitone shift and c is the fine-tuning in cents. The Time Stretch ratio ฯ is inversely proportional to the playback rate r when pitch is maintained:
Reference Data
| Musical Interval | Semitones (n) | Ratio (r) | Cents (ยข) | Ref (A4=440) | Vocal Range Note |
|---|---|---|---|---|---|
| Unison | 0 | 1.0000 | 0 | 440.00 Hz | - |
| Minor Second | +1 | 1.0595 | 100 | 466.16 Hz | - |
| Major Second | +2 | 1.1225 | 200 | 493.88 Hz | - |
| Minor Third | +3 | 1.1892 | 300 | 523.25 Hz | C5 (Soprano High) |
| Major Third | +4 | 1.2599 | 400 | 554.37 Hz | - |
| Perfect Fourth | +5 | 1.3348 | 500 | 587.33 Hz | - |
| Tritone | +6 | 1.4142 | 600 | 622.25 Hz | - |
| Perfect Fifth | +7 | 1.4983 | 700 | 659.25 Hz | E5 (Belting) |
| Minor Sixth | +8 | 1.5874 | 800 | 698.46 Hz | - |
| Major Sixth | +9 | 1.6818 | 900 | 739.99 Hz | - |
| Minor Seventh | +10 | 1.7818 | 1000 | 783.99 Hz | - |
| Major Seventh | +11 | 1.8877 | 1100 | 830.61 Hz | - |
| Octave | +12 | 2.0000 | 1200 | 880.00 Hz | A5 (Whistle) |