soundstretch(1)

🌸 soundstretch(1) 🌸

okay bestie, sit down, hydrate, because we're about to talk about soundstretch β€” the audio processing utility from the General Commands Manual. she's a little command-line icon and she's about to eat πŸ’…


✨ NAME ✨

soundstretch β€” audio processing utility


πŸŽ€ SYNOPSIS πŸŽ€

soundstretch infile.wav outfile.wav [options]

πŸ¦‹ DESCRIPTION πŸ¦‹

SoundStretch is a simple command-line application that can change tempo, pitch and playback rates of WAV sound files. fr fr.

Now, the tea: this program is intended primarily to demonstrate how the "SoundTouch" library can be used to process sound in your own program β€” like, it's basically a living demo, a vibe, a reference implementation with main character energy. But it can as well be used for processing sound files. so yes, you can absolutely just use it. no cap. πŸ’–


πŸ‘‘ USAGE πŸ‘‘

SoundStretch Usage syntax, and I need you to focus because the placeholders matter:

  • "infile.wav" β€” Name of the input sound data file (in .WAV audio file format). Give "stdin" as filename to use standard input pipe. 🫢
  • "outfile.wav" β€” Name of the output sound file where the resulting sound is saved (in .WAV audio file format). This parameter may be omitted if you don't want to save the output (e.g. when only calculating BPM rate with '-bpm' switch). Give "stdout" as filename to use standard output pipe.
  • [options] β€” Are one or more control options.

πŸ’– OPTIONS πŸ’–

Available control options are (there are seven, and we are listing all seven, obviously):

  • -tempo=n β€” Change the sound tempo by n percents (n = -95.0 .. +5000.0 %) πŸ”₯
  • -pitch=n β€” Change the sound pitch by n semitones (n = -60.0 .. + 60.0 semitones)
  • -rate=n β€” Change the sound playback rate by n percents (n = -95.0 .. +5000.0 %)
  • -bpm=n β€” Detect the Beats-Per-Minute (BPM) rate of the sound and adjust the tempo to meet 'n' BPMs. When this switch is applied, the " -tempo" switch is ignored. If "=n" is omitted, i.e. switch " -bpm" is used alone, then the BPM rate is estimated and displayed, but tempo not adjusted according to the BPM value. πŸ‘€
  • -quick β€” Use quicker tempo change algorithm. Gains speed but loses sound quality. (trade-offs, bestie, we love a trade-off)
  • -naa β€” Don't use anti-alias filtering in sample rate transposing. Gains speed but loses sound quality.
  • -license β€” Displays the program license text (LGPL)

🧚 NOTES 🧚

  • To use standard input/output pipes for processing, give "stdin" and "stdout" as input/output filenames correspondingly. The standard input/output pipes will still carry the audio data in .wav audio file format.
  • The numerical switches allow both integer (e.g. " -tempo=123") and decimal (e.g. " -tempo=123.45") numbers. decimals girlies, you're seen πŸ’œ
  • The " -naa" and/or " -quick" switches can be used to reduce CPU usage while compromising some sound quality.
  • The BPM detection algorithm works by detecting repeating bass or drum patterns at low frequencies of <250Hz. A lower-than-expected BPM figure may be reported for music with uneven or complex bass patterns.
ngl the last one is important β€” if your bassline is chaotic, the BPM reading might lowkey undersell it. that's just how the algorithm works, not a skill issue on your part. 😭

🌈 EXAMPLES 🌈

Example 1

The following command increases tempo of the sound file "originalfile.wav" by 12.5% and stores result to file "destinationfile.wav":

soundstretch originalfile.wav destinationfile.wav -tempo=12.5

Example 2

The following command decreases the sound pitch (key) of the sound file "orig.wav" by two semitones and stores the result to file "dest.wav":

soundstretch orig.wav dest.wav -pitch= -2

Example 3

The following command processes the file "orig.wav" by decreasing the sound tempo by 25.3% and increasing the sound pitch (key) by 1.5 semitones. Resulting .wav audio data is directed to standard output pipe:

soundstretch orig.wav stdout -tempo= -25.3 -pitch=1.5

Example 4

The following command detects the BPM rate of the file "orig.wav" and adjusts the tempo to match 100 beats per minute. Result is stored to file "dest.wav":

soundstretch orig.wav dest.wav -bpm=100

Example 5

The following command reads .wav sound data from standard input pipe and estimates the BPM rate:

soundstretch stdin -bpm

🌸 NOTES 🌸 (yes, again β€” she's a two-notes girlie)

Converted from the README.html that comes with SoundTouch.


okay that's the whole page, you ate it, you read it, you're basically a SoundTouch engineer now. this came out of the General Commands Manual as soundstretch(1) β€” sending you love from the soundstretch(1) corner of the docs, mwah πŸ’–βœ¨πŸŽ€πŸ¦‹