Multitrack Productions and Presets
An Auphonic Multitrack post production takes multiple parallel input audio tracks/files, analyzes and processes them individually as well as combined and creates the final mixdown automatically.
Please see Multitrack Productions and Multitrack Post Production Algorithms for more details.
This page describes how to use the multitrack algorithms with our API.
Multitrack Productions
Multitrack Productions can be created in the same way as any other productions.
The only difference is, that you have to specify multiple audio input files (multiple tracks)
by using the parameter multi_input_files
(or the corresponding separate request)
as introduced in Adding Intro and Outro.
The following command creates a multitrack production with 2 tracks:
curl -X POST -H "Content-Type: application/json" \
https://auphonic.com/api/productions.json \
-u username:password \
-d '{
"multi_input_files": [
{"type": "multitrack", "id": "speech track"},
{"type": "multitrack", "id": "music track"}
],
"metadata": { "title": "My first Multitrack Production" },
"output_files": [{"format": "mp3"}],
"is_multitrack": true
}'
- Parameters:
is_multitrack
: must be set to true for multitrack productionsmulti_input_files
:
type
: every track of a multitrack production must set thetype
tomultitrack
(other possible types areintro
oroutro
, see Adding Intro and Outro)id
: a readable identifier for the current track
Uploading Audio Files
After the production is created, you can upload local audio files for each track.
This uses the same request as in Start a Production and Upload a File, but the the track id
is used as the key for each file:
curl -X POST https://auphonic.com/api/production/{uuid}/upload.json \
-u username:password \
-F "speech track=@/home/user/Desktop/file-for-track1.wav" \
-F "music track=@/home/user/Desktop/file-for-track2.wav"
This uploads the local file file-for-track1.wav
to "speech track"
and the file
file-for-track2.wav
to "music track"
of our previous request.
Note
For uploading files, it’s necessary to encode your POST
request in multipart/form-data
, not JSON!
You can now start your production:
curl -X POST https://auphonic.com/api/production/{uuid}/start.json -u username:password
Uploading Files from External Services
Now we add 3 more tracks to our production: one from an External Service, one from an HTTP source and also an intro (type
is set to intro
):
curl -X POST -H "Content-Type: application/json" \
https://auphonic.com/api/production/{uuid}.json \
-u username:password \
-d '{
"multi_input_files": [
{
"service": "pmefeNCzkyT4TbRbDmoCDf",
"input_file": "my_dropbox_file.mp3",
"type": "multitrack",
"id": "speech track 2"
},
{
"input_file": "http://your_server.com/speech_fritz.mp3",
"type": "multitrack",
"id": "speech track 3"
},
{
"service": "pmefeNCzkyT4TbRbDmoCDf",
"input_file": "intro_from_soundcloud.m4a",
"type": "intro"
}
],
...
"action": "start"
}'
The syntax is the same as in Adding Intro and Outro.
When the multitrack production does not involve a local file upload,
it can be created and started in one go by
adding "action": "start"
as a parameter to the request.
Omit the action
parameter to just save the production without starting it.
Multitrack Audio Algorithm Settings
Audio algorithm settings can be specified for each track and for the master output file
in the same way as it is done in the web interface -
see Audio Tracks and Algorithms and Master Audio Algorithms.
If some parameters are not set, the default values are used.
Here is an example with audio algorithm settings for each track and for the master track:
curl -X POST -H "Content-Type: application/json" \
https://auphonic.com/api/productions.json \
-u username:password \
-d '{
"metadata": { "title": "Multitrack Production with Algorithms" },
"output_files": [{"format": "mp3"}],
"multi_input_files": [
{
"type": "multitrack", "id": "speech track",
"algorithms": {"denoise": true}
},
{
"type": "multitrack", "id": "music track",
"algorithms": {"hipfilter": false, "backforeground": "background"}
}
],
"algorithms":
{
"loudnesstarget": -23,
"leveler": true,
"gate": true,
"crossgate": true
}
}'
- Algorithms per track:
hipfilter
: Filters unnecessary and disturbing low frequencies depending on the context (speech, music, noise). Default istrue
.denoise
: Automatic noise reduction in current track. Default isfalse
.backforeground
: You can force one track to beforeground
,background
(e.g. background music),unchanged
orducking
(track will be reduced in volume if other speakers are active). If nothing is set, Auphonic will decide automatically which parts of your track should be in foreground or background (this should work most of the time).
- Master algorithms:
loudnesstarget
: Loudness target in LUFS for Loudness Normalization, higher values result in louder audio outputs. Default is-16
LUFS.leveler
: The Multitrack Adaptive Leveler corrects level differences between and within tracks. Default istrue
.gate
: The Adaptive Noise Gate decreases background noise if a speaker is not active. Default istrue
.crossgate
: Analyzes which speaker is active and decreases crosstalk/spill, ambience, reverb and noise recorded from other tracks. Default istrue
.
For details about our multitrack algorithms see Multitrack Post Production Algorithms.
See also (Single Track) Audio Algorithms API.
Multitrack Advanced Audio Algorithm Settings
Multitrack Advanced Algorithm Parameters can be set using the API as well:
curl -X POST -H "Content-Type: application/json" \
https://auphonic.com/api/productions.json \
-u username:password \
-d '{
"metadata": { "title": "Multitrack Advanced Algorithms" },
"output_files": [{"format": "mp3"}],
"multi_input_files": [
{
"type": "multitrack", "id": "speech track",
"algorithms": {
"denoise": true, "denoiseamount": 12, "dehum": 50, "dehumamount": 6,
"levelerstrength": 50, "compressor": hard, "pan": "L25"
}
},
{
"type": "multitrack", "id": "music track",
"algorithms": {
"backforeground": "ducking", "backgroundgain": -12, "ducking_fadetime": 1000,
"msclassifier": "music", "compressor": "off", "pan": "R25"
}
}
],
"algorithms":
{
"leveler": true, "maxlra": 10, "maxs": 5,
"loudnesstarget": -24, "maxpeak": -2,
"dualmono": true, "loudnessmethod": "program"
}
}'
- Advanced algorithms per track:
levelerstrength
: 100, 90, 80, 70, … 0 (values in %)compressor
: auto, soft, medium, hard or offmsclassifier
(use classifier or set whole track to speech/music): on (default), speech, musicpan
: stereo panning, L100, L75, …, C, R25, …, R100gain
: add positive/negative gain to a track in dB, default is 0 (dB)backgroundgain
: level of background segments in dB, default is -18 (dB)ducking_fadetime
: fade down/up length (attack/release) for ducking segments, default is 500 (ms)denoiseamount
(noise reduction amount, higher values remove more noise): -1 (disable denoise, dehum only), 0 (Auto), 3, 6, … (values in dB)dehum
(hum reduction base frequency): 0 (Auto), 50 or 60dehumamount
(hum reduction amount): -1 (disable dehum), 0 (Auto), 3, 6, … (values in dB)
- Advanced master algorithms:
maxpeak
(maximum true peak level): 0 (Auto), -0.5, -1, -1.5, -2, -3, -4, -5, -6 (values in dBTP)dualmono
(treat mono production as dual-mono / -3LU offset): false (default), trueloudnessmethod
(anchor-based loudness normalization): program (default), dialog (measure dialog/voice loudness)- Leveler Broadcast Mode :
use a Maximum Loudness Range (LRA), Maximum Short-term Loudness or Maximum Momentary Loudness target to control the strength of the Leveler in the mixdown
maxlra
: 0 (Auto), 5, 6, 7, 8, …, 20 (values in LU)maxs
: 0 (Auto), 3, 4, 5, 6, …, 12 (values in LU, relative to the target loudness)maxm
: 0 (Auto), 8, 9, 10, 11, …, 20 (values in LU, relative to the target loudness)
For details please see Multitrack Advanced Algorithm Parameters.
Getting back the Processed Tracks
By default, a multitrack production will create a final mixdown of all your input files.
If you want to get back the individual, processed tracks, you have to add an additional tracks
output format:
curl -X POST -H "Content-Type: application/json" \
https://auphonic.com/api/productions.json \
-u username:password \
-d '{
"metadata": { "title": "Multitrack Tracks Export" },
"multi_input_files": [
{
"type": "multitrack", "id": "speech track",
"algorithms": {"denoise": true, "denoiseamount": 12}
},
{
"type": "multitrack", "id": "music track",
"algorithms": {"hipfilter": false, "backforeground": "background"}
}
],
...
"output_files": [
{"format": "tracks", "ending": "wav.zip"},
{"format": "tracks", "ending": "flac.zip"}
]
}'
Individual tracks can be exported as FLAC (default) or as WAV files. All tracks are zipped into one single file to download.
Adding offsets to Tracks
Each track in a multitrack production can have an offset, which determines when the track starts: an offset of 3.5 would start the track 3.5 seconds after the first track started.
Add the parameter offset
, which must be a positive number and in seconds,
to your tracks in the following way:
curl -X POST -H "Content-Type: application/json" \
https://auphonic.com/api/production/{uuid}.json \
-u username:password \
-d '{
"multi_input_files": [
{
"service": "pmefeNCzkyT4TbRbDmoCDf",
"input_file": "my_dropbox_file.mp3",
"type": "multitrack",
"id": "speech track 2"
"offset": 1.25
},
{
"input_file": "http://your_server.com/speech_fritz.mp3",
"type": "multitrack",
"id": "speech track 3"
"offset": 5.1
}
,
...
]
}'
Changing Tracks
Use the following endpoint to change settings for the track with the ID my track id
:
curl -X POST -H "Content-Type: application/json" \
https://auphonic.com/api/production/{uuid}/multi_input_files/my track id.json \
-u username:password \
-d '{
"service": "pmefeNCzkyT4TbRbDmoCDf",
"input_file": "my_dropbox_file2.mp3",
"id": "my new track id",
"offset": 5,
"algorithms": {"denoise": true, "denoiseamount": 12}
}'
It’s also possible to delete all tracks:
curl -X DELETE https://auphonic.com/api/production/{uuid}/multi_input_files.json -u username:password
Or one specific track (here with the track ID my new track id
):
curl -X DELETE https://auphonic.com/api/production/{uuid}/multi_input_files/my new track id.json -u username:password
Multitrack Presets
The creation of multitrack presets is mostly equivalent to the creation of multitrack productions, with the exception that it’s not possible to add an input file for each track:
curl -X POST -H "Content-Type: application/json" \
https://auphonic.com/api/presets.json \
-u username:password \
-d '{
"preset_name": "My Multitrack Preset",
"output_files": [{"format": "mp3"}],
"multi_input_files": [
{
"type": "multitrack", "id": "speech track",
"algorithms": {"denoise": true, "denoiseamount": 12}
},
{
"type": "multitrack", "id": "music track",
"algorithms": {"hipfilter": false}
},
{
"input_file": "http://your_server.com/intro.mp3",
"type": "intro", "id": ""
},
],
"algorithms": {
"loudnesstarget": -23,
"leveler": true,
"gate": false,
"crossgate": true
},
"is_multitrack": true
}'
See also Creation of Presets.
API Response of Multitrack Productions
curl https://auphonic.com/api/production/{uuid}.json -u username:password
returns the following response (some details are stripped):
{
"status_code": 200,
"form_errors": {},
"error_code": null,
"error_message": "",
"data": {
"status": 3,
"status_string": "Done",
"is_multitrack": true,
"image": null,
"creation_time": "2014-08-29T10:07:43.009Z",
"chapters": [ ... ],
"edit_page": "https://auphonic.com/engine/multitrack/edit/WMLwjD4sHJMJV5zEg6oaMh",
"output_files": [ ... ],
"uuid": "WMLwjD4sHJMJV5zEg6oaMh",
"error_status": null,
"thumbnail": null,
"metadata": { ... },
"warning_status": null,
"webhook": null,
"status_page": "https://auphonic.com/engine/status/WMLwjD4sHJMJV5zEg6oaMh",
"length": 118.975986394558,
"length_timestring": "00:01:58.975",
"output_basename": "multitrack_test_production",
"outgoing_services": [],
"change_time": "2014-08-29T10:12:19.104Z",
"error_message": "",
"warning_message": "",
"speech_recognition": null,
"waveform_image": "https://auphonic.com/api/download/audio-result/WMLwjD4sHJMJV5zEg6oaMh/waveform.png",
"multi_input_files": [
{
"input_channels": 1,
"service": null,
"input_file": "file_1.m4a",
"input_samplerate": 48000,
"algorithms": {
"hipfilter": true,
"denoise": false,
"denoiseamount": 0,
"backforeground": "auto"
},
"input_bitrate": 82.701,
"input_filetype": "aac",
"type": "multitrack",
"id": "track 1",
"input_length": 118.975986394558,
"offset": 0
},
{
"input_channels": 2,
"service": null,
"input_file": "File 2.mp3",
"input_samplerate": 44100,
"algorithms": {
"hipfilter": true,
"denoise": false,
"denoiseamount": 0,
"backforeground": "background"
},
"input_bitrate": 128.0,
"input_filetype": "mp3",
"type": "multitrack",
"id": "track 2",
"input_length": 91.6908616780045,
"offset": 3.5
}
],
"statistics": {
"tracks": [
{
"music_speech": "speech",
"levels": {
"lra": [9.94, "LU"],
"gain_mean": [-25.23, "dB"],
"noise_level": [-76.85, "dB"],
"max_momentary": [-27.23, "LUFS"],
"signal_level": [-32.52, "dB"],
"gain_min": [-98.86, "dB"],
"snr": [44.33, "dB"],
"max_shortterm": [-31.27, "LUFS"],
"loudness": [-34.12, "LUFS"],
"gain_max": [17.01, "dB"]
},
"identifier": "track 2",
"activity": [[3.32, 7.73], [12.08, 20.67], [22.22, 28.87], ...]
},
{
"music_speech": "speech",
"levels": {
"lra": [3.52, "LU"],
"gain_mean": [-1.52, "dB"],
"noise_level": [-49.72, "dB"],
"max_momentary": [-10.58, "LUFS"],
"signal_level": [-16.2, "dB"],
"gain_min": [-61.3, "dB"],
"snr": [33.52, "dB"],
"max_shortterm": [-15.51, "LUFS"],
"loudness": [-17.64, "LUFS"],
"gain_max": [2.07, "dB"]
},
"identifier": "track 1",
"activity": [[0.11, 3.78], [7.93, 15.23], ...]
}
],
"master": {
"levels": {
"lra": [3.04, "LU"],
"max_momentary": [-11.44, "LUFS"],
"peak": [-1.0, "dBTP"],
"max_shortterm": [-14.19, "LUFS"],
"loudness": [-16.0, "LUFS"]
}
}
},
"algorithms": {
"leveler": true,
"loudnesstarget": -16,
"crossgate": true,
"gate": true
},
"start_allowed": false,
"change_allowed": true
}
}
- Multitrack specific parameters:
is_multitrack
: true for multitrack productionlength
: output audio length in seconds (longest track with intro/outro) - IMPORTANT: if you have intro or outro files, they are included in this length!length_timestring
: parameterlength
in HH:MM:SS.mmmmulti_input_files
: audio file details, identifier and algorithms for each trackstatistics
: level, activity, music-speech, noise reduction (and more) statistics per track and for the master track of multitrack productions
For more information about all the other parameters please see Details about a Production.