Feedback

sonicAPI.com

process/elastique

Show demo

Change the tempo and the pitch.

The elastique task allows you to modify three important parameters of an audio file: its tempo, its pitch, and its timbre.
Thus it enables you to, for example, slow down a playback for playing along to an unfamiliar song for rehearsing or to adjust the speed of a recorded speech to your typing speed when transcribing. It also allows to synchronize two audio files with different tempi (beat matching, compare analyze/tempo) or to adjust their pitch/key to be compatible (harmonic mixing, compare analyze/key)) in order to create mashups.

Parameters

Parameter Type Description
pitch_semitones optional float [-24 .. 24] default: 0 Shift the pitch up/down (+- 24 semitones).

Change the pitch without changing the tempo. Example: A value of 2.0 leads to pitch increase of 2 semitones and a frequency increase of factor 2^(2/12), respectively.

tempo_factor optional float [0.25 .. 4] default: 1 Scale the tempo up/down by this factor (0.25-4.0).

Change the tempo without changing the pitch. Example: Factor 2.0 leads to twice the tempo and half the file length, respectively.

formant_semitones optional float [-12 .. 12] default: 0 Shift the formants up/down (+- 12 semitones).

Change the timbre without changing tempo/pitch. Use high values for Mickey Mouse and low values for Darth Vader. Link with pitch factor for traditional style pitch shifting.

  • tempo_factor: audio can be slowed down to a fourth of its original tempo (tempo_factor=0.25). The output file length will change with the inverse tempo_factor: a tempo factor of two results in half the file length. Linking tempo_factor and pitch_factor will sound like changing the playback tempo on a tape recorder or with vinyl.
  • pitch_factor and pitch_semitones: audio can be pitch shifted up/down by 2 octaves (pitch_factor) and 24 semi-tones (pitch_semitones), respectively.
  • formant_semitones: shifting up results in a brighter sound quality, shifting down in a darker sound quality. In traditional style pitch shifting, formant_semitones is linked to pitch_semitones.
  • parameter interdependencies: the ratio of tempo_factor and pitch_factor must never exceed the boundaries of .1 and 10, respectively.
  • sound quality: extreme parameter settings may impact the resulting audio quality.

Response

blocking=false

The response gives you a status code, the file_id and the corresponding download URL of the resulting file (audio for process tasks and xml for analyze tasks). For processing reports, use the file/status request with the parameter format=xml(p)/json(p).

Name Description
status The status code of the task.
file_id The unique identifier of the file.
href The direct download link to the file including the file_id

blocking=true

The response will be the resulting audio file. If you request the file_id with format=xml(p)/json(p), you will receive additional info on the task, its parametrization, and the output file.

Name Description
warning If there is anything you should know about, we will tell you here.
output_info Information on the level of the output file: peak_level is the overall maximum level of the output file in dBFS - if peak level is higher than 0, clipped is set to true and you should consider actions to avoid the overload.
parameters Contains the values of all task parameters for this process.


One-click example

Manipulate the tempo (speed up by factor 1.2) and pitch (lower pitch by 1 semi-tone) of this song snippet with a simple click on this button:
Process Learn more The button is just a link with a specially constructed URL:
https://api.sonicapi.com/process/elastique
?access_id=584ee88b-4525-4f14-b2ea-94dedda17a30
&input_file=http://www.sonicapi.com/music/brown_eyes_by_ueberschall.mp3
&tempo_factor=1.2
&pitch_semitones=-1
&formant_semitones=-1
By requesting this URL, the input file will be imported into the system, processed by sonicAPI and the output file will be downloaded by your browser. The Live-Demo helps you to explore the available parameters and to generate some example code.



About the technology

The elastique task uses the élastique Pro engine by zplane.development for time and pitch scaling. This highly acclaimed technology is used by many manufacturers of professional audio work stations and DJ software.