TonnSDK Example Walkthrough¶
This document provides a detailed walkthrough of the example included with TonnSDK, explaining key concepts and implementation details.
Table of Contents¶
- Example Overview
- Feature Examples
- Simple Mixing Example
- AudioReprocessor Example
- Mastering Example
- Running the Examples
Example Overview¶
TonnSDK includes a comprehensive example to demonstrate its functionality:
Simple Mixing Example with AudioReprocessor and Mastering: Demonstrates a complete music production pipeline. The example shows:
- Complete mixing workflow from loading tracks to generating the final mix and stems
- NEW in v1.6: GPU-accelerated mixing with
--gpuflag for faster, higher quality results - Creative Compression toggle for genre-specific stylized compression
- FX Chain JSON export showing all applied effects per track
- How to use the AudioReprocessor feature for offline reprocessing with modified settings
- How to apply professional mastering to the final mix
- Integration of mixing, reprocessing, and mastering in a single workflow
- Comparison between original and reprocessed results
The example is located in the /examples directory and is set up to be built with the included CMake configuration.
Feature Examples¶
GPU-Accelerated Mixing Example (v1.6)¶
This example shows how to enable GPU-accelerated mixing for faster processing and higher quality results:
#include "TonnSDK.h"
#include <iostream>
int main(int argc, char* argv[]) {
tonn::TonnSDK sdk(44100.0f, tonn::MusicalStyle::ROCK_INDIE);
if (!sdk.initialize("your-license-key")) {
std::cerr << "Failed to initialize SDK" << std::endl;
return -1;
}
// Check for --gpu flag
bool useGPU = false;
for (int i = 1; i < argc; ++i) {
if (std::string(argv[i]) == "--gpu") {
useGPU = true;
}
}
// Enable GPU mixing if requested
if (useGPU) {
sdk.setMixingModel(tonn::MixingModel::GPU_STATIC);
std::cout << "GPU mode enabled (CUDA)" << std::endl;
} else {
std::cout << "CPU mode (default)" << std::endl;
}
// Add tracks and process as normal
tonn::MixTrackSettings drumSettings(tonn::GroupType::DRUMS_GROUP,
tonn::PresenceSetting::NORMAL,
tonn::MusicalStyle::ROCK_INDIE);
sdk.addTrack("drums.wav", drumSettings);
tonn::MixTrackSettings vocalSettings(tonn::GroupType::VOCAL_GROUP,
tonn::PresenceSetting::LEAD,
tonn::MusicalStyle::ROCK_INDIE);
sdk.addTrack("vocals.wav", vocalSettings);
// Process — GPU or CPU depending on the flag
tonn::MixResult result = sdk.process();
std::cout << "Mix completed. Duration: " << result.trackLengthInSecs << "s" << std::endl;
return 0;
}
Running with GPU:
./TonnSDK_Simple_Mixing_Example ../configs/Masks_config.json --gpu
Creative Compression Example¶
This example shows how to use the new Creative Compression feature for genre-specific stylized compression:
#include "TonnSDK.h"
#include <iostream>
int main() {
// Initialize SDK with musical style
tonn::TonnSDK sdk(44100.0f, tonn::MusicalStyle::ROCK_INDIE);
if (!sdk.initialize("your-license-key")) {
std::cerr << "Failed to initialize SDK" << std::endl;
return -1;
}
// Creative compression is ENABLED by default
std::cout << "Creative compression: "
<< (sdk.isCreativeCompressionEnabled() ? "ENABLED" : "DISABLED")
<< std::endl;
// Option 1: Keep enabled for genre-specific compression character
// (punchy drums for rock, tight bass for electronic, etc.)
sdk.setCreativeCompressionEnabled(true);
// Option 2: Disable for transparent, natural sound
// sdk.setCreativeCompressionEnabled(false);
// Add tracks with track names for FX chain JSON
tonn::MixTrackSettings vocalSettings(tonn::GroupType::VOCAL_GROUP,
tonn::PresenceSetting::LEAD,
tonn::MusicalStyle::ROCK_INDIE);
sdk.addTrackFromBuffer(vocalBuffer, vocalSettings, "lead_vocals.wav");
tonn::MixTrackSettings drumSettings(tonn::GroupType::DRUMS_GROUP,
tonn::PresenceSetting::NORMAL,
tonn::MusicalStyle::ROCK_INDIE);
sdk.addTrackFromBuffer(drumBuffer, drumSettings, "drums.wav");
// Process - creative compression will be applied to applicable tracks
tonn::MixResult result = sdk.process();
// Check compression settings in FX chain JSON
if (!result.fxChainsJson.empty()) {
std::cout << "FX Chain (includes compression settings):" << std::endl;
std::cout << result.fxChainsJson << std::endl;
}
return 0;
}
FX Chain JSON Export Example¶
This example shows how to access and use the FX Chain JSON export:
#include "TonnSDK.h"
#include <nlohmann/json.hpp>
#include <iostream>
#include <fstream>
using json = nlohmann::json;
int main() {
tonn::TonnSDK sdk(44100.0f, tonn::MusicalStyle::ELECTRONIC);
sdk.initialize("your-license-key");
// Add tracks with descriptive names
sdk.addTrackFromBuffer(kickBuffer, kickSettings, "kick.wav");
sdk.addTrackFromBuffer(bassBuffer, bassSettings, "bass.wav");
sdk.addTrackFromBuffer(synthBuffer, synthSettings, "synth_lead.wav");
// Process the mix
tonn::MixResult result = sdk.process();
// Access FX Chain JSON
if (!result.fxChainsJson.empty()) {
// Parse the JSON
json fxChains = json::parse(result.fxChainsJson);
// Display formatted output
std::cout << "\n=== FX Chain Settings ===" << std::endl;
std::cout << "This shows all effects applied to each track," << std::endl;
std::cout << "in the exact order they were processed:" << std::endl;
std::cout << std::endl;
std::cout << fxChains.dump(2) << std::endl; // Pretty print with 2-space indent
// Save to file for DAW integration or analysis
std::ofstream fxFile("fx_chain_settings.json");
if (fxFile.is_open()) {
fxFile << fxChains.dump(2) << std::endl;
fxFile.close();
std::cout << "\nFX chain saved to: fx_chain_settings.json" << std::endl;
}
// Example: Access specific track's FX chain
for (const auto& track : fxChains) {
std::cout << "\nTrack: " << track["trackName"] << std::endl;
std::cout << " Group: " << track["groupType"] << std::endl;
// List all effects
for (const auto& fx : track["fxChain"]) {
std::cout << " " << fx["order"].get<int>() << ". "
<< fx["type"].get<std::string>();
if (fx.contains("subtype")) {
std::cout << " (" << fx["subtype"].get<std::string>() << ")";
}
std::cout << " - " << (fx["enabled"].get<bool>() ? "ON" : "OFF")
<< std::endl;
}
}
}
return 0;
}
FX Chain JSON Structure:
- Each track contains:
trackId,trackName,groupType,musicalStyle,analysis,fxChain - The
fxChainarray contains 9 ordered effect slots:- LOW_CUT (high-pass filter)
- GAIN (PRE_GAIN - loudness normalization)
- EQ (6-band parametric)
- COMPRESSOR (CORRECTIVE - initial mix)
- COMPRESSOR (CREATIVE - stylized, genre-specific)
- PAN (stereo positioning)
- GAIN (POST_GAIN - final level)
- REVERB (send amount)
- SIDECHAIN_COMPRESSOR (ducking)
Skip Quiet Tracks Feature Example (v1.3.1)¶
This example shows how to use the new skipQuietTracks feature for graceful handling of quiet tracks:
#include "TonnSDK.h"
#include <iostream>
#include <vector>
int main() {
// Enable skip quiet tracks for batch processing
tonn::TonnSDK sdk(44100.0f, tonn::MusicalStyle::ROCK_INDIE, true);
if (!sdk.initialize("your-license-key")) {
std::cerr << "Failed to initialize SDK" << std::endl;
return -1;
}
// Create settings for different track types
tonn::MixTrackSettings vocalSettings(tonn::GroupType::VOCAL_GROUP,
tonn::PresenceSetting::LEAD,
tonn::MusicalStyle::ROCK_INDIE);
// Add tracks - some might be skipped if too quiet
std::vector<std::string> trackFiles = {
"vocal_loud.wav", // Will be processed
"vocal_quiet.wav", // Might be skipped with notification
"vocal_normal.wav", // Will be processed
"silence.wav" // Will be skipped with notification
};
int processed = 0;
for (const auto& file : trackFiles) {
try {
std::cout << "Adding track: " << file << std::endl;
sdk.addTrack(file, vocalSettings);
processed++;
} catch (const std::exception& e) {
std::cerr << "Error adding " << file << ": " << e.what() << std::endl;
}
}
std::cout << "Processing " << processed << " tracks..." << std::endl;
// Process the mix - only non-quiet tracks will be included
tonn::MixResult result = sdk.process();
std::cout << "Final mix contains " << result.mixTrackSettings.size() << " tracks" << std::endl;
return 0;
}
Pre-gain Access Example (v1.3.1)¶
This example shows how to access the preserved pre-gain information:
#include "TonnSDK.h"
#include <iostream>
#include <cmath>
int main() {
tonn::TonnSDK sdk(44100.0f, tonn::MusicalStyle::POP);
if (!sdk.initialize("your-license-key")) {
std::cerr << "Failed to initialize SDK" << std::endl;
return -1;
}
// Add tracks with different loudness levels
tonn::MixTrackSettings settings(tonn::GroupType::VOCAL_GROUP,
tonn::PresenceSetting::LEAD,
tonn::MusicalStyle::POP);
sdk.addTrack("quiet_vocal.wav", settings); // Will need positive pre-gain
sdk.addTrack("loud_vocal.wav", settings); // Will need negative pre-gain
sdk.addTrack("normal_vocal.wav", settings); // Minimal pre-gain adjustment
// Process and get results with preserved pre-gain values
tonn::MixResult result = sdk.process();
std::cout << "Pre-gain analysis:" << std::endl;
for (size_t i = 0; i < result.mixTrackSettings.size(); ++i) {
float preGainDb = result.mixTrackSettings[i].getPreGain();
float preGainLinear = std::pow(10.0f, preGainDb / 20.0f);
std::cout << "Track " << i << ":" << std::endl;
std::cout << " Pre-gain: " << preGainDb << " dB (" << preGainLinear << "x)" << std::endl;
if (std::abs(preGainDb) > 6.0f) {
std::cout << " ⚠️ Large gain adjustment - source material might need attention" << std::endl;
}
if (preGainDb > 0) {
std::cout << " 📈 Track was boosted for loudness normalization" << std::endl;
} else if (preGainDb < 0) {
std::cout << " 📉 Track was attenuated for loudness normalization" << std::endl;
}
}
return 0;
}
Simple Mixing Example¶
The Simple Mixing Example (simple_mixing_example.cpp) demonstrates the complete workflow for using TonnSDK to mix multiple audio tracks.
Key Concepts¶
- Loading Configuration: The example starts by loading track information from a JSON configuration file
- Initializing the SDK: Sets up the SDK with the appropriate sample rate and musical style, including license validation
- Mixing Model Selection (NEW in v1.6): Optionally enable GPU-accelerated mixing with
--gpuflag - Creative Compression Configuration: Optionally enable/disable genre-specific stylized compression
- Loading Audio Tracks: Loads audio data from WAV files into memory buffers
- Configuring Track Settings: Creates MixTrackSettings for each track with appropriate parameters
- Processing the Mix: Calls the process() method to generate the optimized mix (with optional settings-only mode)
- Using the Results: Saves the final mix and individual processed stems
- FX Chain Export: Outputs the complete effects chain as JSON for DAW integration
Code Structure¶
The example is organized into these main sections:
#include "TonnSDK.h"
#include "MixTrackSettings.h"
// Step 1: Load the configuration file
std::ifstream configFile(configPath);
json config;
configFile >> config;
// Step 2: Initialize the TonnSDK
tonn::TonnSDK tonnSDK(static_cast<float>(sampleRate), style);
// Initialize with license key (required)
if (!tonnSDK.initialize(testLicenseKey)) {
std::cerr << "Failed to initialize SDK: " << tonnSDK.getLastErrorMessage() << std::endl;
return 1;
}
// Step 3: Load audio tracks into memory buffers
for (const auto& track : trackData) {
std::vector<std::vector<float>> audioBuffer = loadWavFileToBuffer(fullPath, trackSampleRate, channels);
// Create track settings using constructor
tonn::MixTrackSettings trackSettings(
getGroupTypeFromString(track["instrumentGroup"]),
getPresenceFromString(track["presenceSetting"]),
style
);
// Add track to the SDK
tonnSDK.addTrackFromBuffer(audioBuffer, trackSettings);
}
// Step 4: Process the mix
// For full processing:
tonn::MixResult mixResult = tonnSDK.process();
// For settings-only mode (10-50x faster):
// tonn::MixResult settingsResult = tonnSDK.process(true);
// Step 5: Save the output mix
saveWavFile(outputPath, mixResult.audio_x, sampleRate);
// Step 6: Save individual processed stems
for (size_t i = 0; i < mixResult.stems.size(); ++i) {
std::string stemFilename = "stem_" + std::to_string(i) + "_" + mixResult.trackNames[i] + ".wav";
saveWavFile(stemFilename, mixResult.stems[i], sampleRate);
}
Key Takeaways¶
- This example processes all tracks simultaneously using a single SDK instance
- Demonstrates proper SDK initialization with license validation
- Shows both full processing and settings-only mode options
- Appropriate for most mixing scenarios and provides complete control
- Results in fully optimized track settings for each input track
- Generates both a final mix and individually processed stems with track names
- Provides a solid foundation for integrating TonnSDK into your applications
AudioReprocessor Example¶
The AudioReprocessor functionality is integrated into the Simple Mixing Example (simple_mixing_example.cpp) and can be activated using the --reprocess flag. This demonstrates how to use the
AudioReprocessor feature for offline reprocessing of existing stems with modified settings.
Key Concepts¶
- Loading Original Stems: The example shows how to load previously processed or original audio stems
- Modifying Settings: Demonstrates how to create modified MixTrackSettings for reprocessing
- Offline Reprocessing: Uses AudioReprocessor to generate new mixes without re-rendering from source
- Iterative Workflow: Perfect for scenarios where you want to tweak mix parameters without starting from scratch
Code Structure¶
The AudioReprocessor functionality is activated when the --reprocess flag is provided and follows this workflow:
#include "public/AudioReprocessor.h"
#include "public/MixTrackSettings.h"
// Step 1: Create AudioReprocessor instance
tonn::AudioReprocessor reprocessor(static_cast<float>(sampleRate), style);
// Step 2: Load original stems with their original settings
for (const auto& track : trackData) {
// Load the original settings that were used
tonn::MixTrackSettings originalSettings(
getGroupTypeFromString(track["instrumentGroup"]),
getPresenceFromString(track["presenceSetting"]),
style
);
// Load the stem into the reprocessor
if (!reprocessor.loadStem(track["filePath"], originalSettings)) {
std::cerr << "Failed to load stem: " << track["filePath"] << std::endl;
continue;
}
}
// Step 3: Create modified settings for reprocessing
std::vector<tonn::MixTrackSettings> modifiedSettings;
for (size_t i = 0; i < reprocessor.getStemCount(); ++i) {
tonn::MixTrackSettings newSettings = originalSettings[i];
// Example modifications:
// Increase vocal compression
if (newSettings.getGroupType() == tonn::GroupType::VOCAL_GROUP) {
newSettings.setCompressorRatio(6.0f);
newSettings.setCompressorThreshold(-15.0f);
}
// Adjust drum panning
if (newSettings.getGroupType() == tonn::GroupType::DRUMS_GROUP) {
newSettings.setPanAngle(-10.0f); // Slight left pan
}
// Apply EQ changes to guitars
if (newSettings.getGroupType() == tonn::GroupType::E_GUITAR_GROUP) {
newSettings.setEQGains({0, 2, -1, 3, 0, 0}); // Mid boost
}
modifiedSettings.push_back(newSettings);
}
// Step 4: Reprocess with modified settings
tonn::ReprocessResult result = reprocessor.reprocess(modifiedSettings);
if (!result.success) {
std::cerr << "Reprocessing failed: " << result.errorMessage << std::endl;
return 1;
}
// Step 5: Save the reprocessed results
// Save the new mix
if (!reprocessor.saveReprocessedMix(result, "reprocessed_mix.wav")) {
std::cerr << "Failed to save reprocessed mix" << std::endl;
}
// Save individual reprocessed stems
for (size_t i = 0; i < result.getStemCount(); ++i) {
std::string stemFilename = "reprocessed_" + result.trackNames[i] + ".wav";
if (!reprocessor.saveReprocessedStem(result, i, stemFilename)) {
std::cerr << "Failed to save reprocessed stem: " << stemFilename << std::endl;
}
}
std::cout << "Reprocessing completed successfully!" << std::endl;
std::cout << "New mix length: " << result.lengthInSeconds << " seconds" << std::endl;
Key Takeaways¶
- Efficient Iteration: AudioReprocessor allows quick iteration on mix parameters without re-rendering from source
- Preserves Quality: Uses the same high-quality processing pipeline as the main TonnSDK
- Flexible Input: Can load stems from files or audio buffers
- Complete Control: Provides access to all processing parameters for modification
- Batch Processing: Can modify multiple tracks simultaneously
- Error Handling: Comprehensive error reporting for robust applications
Use Cases¶
The AudioReprocessor is particularly useful for:
- Post-mix adjustments: Tweaking mix parameters after initial processing
- A/B testing: Comparing different mix settings quickly
- Client revisions: Making changes based on feedback without full re-render
- Template application: Applying mix templates to existing stems
- DAW integration: Allowing real-time parameter changes in digital audio workstations
Mastering Example¶
The Mastering functionality is integrated into the Simple Mixing Example (simple_mixing_example.cpp) and can be activated using the --master flag. This demonstrates how to apply professional
mastering to a completed mix, whether it's the original mix or a reprocessed version.
Key Concepts¶
- Professional Loudness: Applies industry-standard loudness processing to meet streaming and broadcast standards
- Three-Tier Loudness System: Choose from LOW (streaming), MEDIUM (balanced), or HIGH (competitive) loudness targets
- Integrated Workflow: Seamlessly master the output from mixing or reprocessing stages
- Complete Pipeline: Demonstrates mix → reprocess → master in a single example
Code Structure¶
The Mastering functionality is activated when the --master flag is provided and follows this workflow:
#include "public/TonnSDK.h"
#include "public/MasteringSettings.h"
// Step 1: Initialize a new TonnSDK instance for mastering
tonn::TonnSDK masteringSDK(static_cast<float>(sampleRate), style);
// Initialize with license key
if (!masteringSDK.initialize(licenseKey)) {
std::cerr << "Failed to initialize SDK for mastering" << std::endl;
return 1;
}
// Step 2: Configure mastering settings
tonn::MasteringSettings settings;
// Choose loudness target:
// - LOW: Streaming-optimized (-14 LUFS) for Spotify, Apple Music, YouTube
// - MEDIUM: Balanced (-10 LUFS) preserves dynamics while competitive
// - HIGH: Competitive (-8 LUFS) for club, radio, loud playback
tonn::MasteringLoudnessTarget loudnessTarget = tonn::MasteringLoudnessTarget::MEDIUM;
settings.setLoudnessPreference(loudnessTarget);
std::cout << "Loudness target: MEDIUM (Balanced, -10 LUFS)" << std::endl;
// Step 3: Load the mix for mastering
// This can be the output from mixing or reprocessing
std::string inputMixPath = "output/mix_output.wav"; // Or reprocessed mix
masteringSDK.addMix(inputMixPath, settings);
std::cout << "✓ Mix loaded successfully" << std::endl;
// Step 4: Process the mastering
tonn::MasteringResult result = masteringSDK.processMastering();
if (!result.success) {
std::cerr << "Mastering failed: " << masteringSDK.getLastErrorMessage() << std::endl;
return 1;
}
std::cout << "✓ Mastering complete!" << std::endl;
// Step 5: Display mastering results
std::cout << "\n=== Mastering Results ===" << std::endl;
std::cout << "Measured LUFS: " << result.measuredLUFS << " LUFS" << std::endl;
std::cout << "Peak Level: " << result.peakLevel << " dB" << std::endl;
std::cout << "Duration: " << result.trackLengthInSecs << " seconds" << std::endl;
// Step 6: Save the mastered audio
std::string masteredPath = "output/mix_output_mastered.wav";
saveWavFile(masteredPath, result.audio, sampleRate);
std::cout << "✓ Mastered audio saved to: " << masteredPath << std::endl;
Loudness Targets Explained¶
The mastering system offers three loudness targets optimized for different use cases:
LOW (Streaming-Optimized)¶
- Target: -14 LUFS
- Best For: Streaming platforms (Spotify, Apple Music, YouTube)
- Characteristics: Maximum dynamic range preservation, no loudness penalties on streaming services
- Use When: You want the most natural, dynamic sound for streaming
MEDIUM (Balanced)¶
- Target: -10 LUFS
- Best For: General distribution, professional releases
- Characteristics: Competitive loudness while preserving good dynamics
- Use When: You want a balance between loudness and dynamics (recommended for most cases)
HIGH (Competitive)¶
- Target: -8 LUFS
- Best For: Club playback, radio, loud environments
- Characteristics: Maximum competitive loudness
- Use When: You need maximum loudness for club/radio play
Integration with Mixing and Reprocessing¶
The mastering feature integrates seamlessly with the mixing and reprocessing workflows:
Mix Only:
// 1. Mix tracks
tonn::MixResult mixResult = sdk.process();
saveWavFile("output.wav", mixResult.audio_x, sampleRate);
Mix + Master:
// 1. Mix tracks
tonn::MixResult mixResult = sdk.process();
saveWavFile("output.wav", mixResult.audio_x, sampleRate);
// 2. Master the mix
tonn::TonnSDK masteringSDK(sampleRate, style);
masteringSDK.addMix("output.wav", masteringSettings);
tonn::MasteringResult masterResult = masteringSDK.processMastering();
saveWavFile("output_mastered.wav", masterResult.audio, sampleRate);
Mix + Reprocess + Master (Complete Pipeline):
// 1. Initial mix
tonn::MixResult mixResult = sdk.process();
saveWavFile("output.wav", mixResult.audio_x, sampleRate);
// 2. Reprocess with modified settings
tonn::AudioReprocessor reprocessor(sampleRate, style);
// ... load stems and reprocess ...
tonn::ReprocessResult reprocessResult = reprocessor.reprocess(modifiedSettings);
saveWavFile("output_reprocessed.wav", reprocessResult.mixedAudio, sampleRate);
// 3. Master the reprocessed mix
tonn::TonnSDK masteringSDK(sampleRate, style);
masteringSDK.addMix("output_reprocessed.wav", masteringSettings);
tonn::MasteringResult masterResult = masteringSDK.processMastering();
saveWavFile("output_reprocessed_mastered.wav", masterResult.audio, sampleRate);
Key Takeaways¶
- Professional Results: Achieves broadcast and streaming-ready loudness standards
- Flexible Targets: Three loudness options for different distribution scenarios
- Seamless Integration: Works with both original mixes and reprocessed versions
- Complete Metrics: Provides LUFS measurements, peak levels, and duration
- Industry Standards: Implements professional mastering algorithms
- Quality Preservation: Maintains audio quality while achieving target loudness
Use Cases¶
The Mastering feature is particularly useful for:
- Streaming Preparation: Preparing mixes for Spotify, Apple Music, YouTube with optimal loudness
- Professional Releases: Creating distribution-ready masters for albums and singles
- A/B Comparison: Testing different loudness targets to find the best fit for your music
- Complete Workflow: Finishing the entire production pipeline from mix to master in one application
- Batch Processing: Processing multiple mixes with consistent mastering settings
- Genre-Specific Mastering: Using musical style information for optimized mastering
Running the Examples¶
To build and run the example:
1. Build the Example¶
# From the project root directory
mkdir build && cd build
# Configure the build
cmake -DCMAKE_BUILD_TYPE=Release ..
# Build the example
cmake --build . --target TonnSDK_Simple_Mixing_Example
2. Run the Examples¶
Simple Mixing Example¶
# Full processing — CPU mode (default)
./TonnSDK_Simple_Mixing_Example ../examples/configs/Masks_config.json
# GPU-accelerated mixing (requires NVIDIA GPU + CUDA)
./TonnSDK_Simple_Mixing_Example ../examples/configs/Masks_config.json --gpu
# Settings-only mode (10-50x faster, no audio output)
./TonnSDK_Simple_Mixing_Example ../examples/configs/Masks_config.json --settings-only
# Specify custom output file
./TonnSDK_Simple_Mixing_Example ../examples/configs/Masks_config.json output_mix.wav
# Run with AudioReprocessor example after initial mixing
./TonnSDK_Simple_Mixing_Example ../examples/configs/Masks_config.json --reprocess
# Run with Mastering example after initial mixing
./TonnSDK_Simple_Mixing_Example ../examples/configs/Masks_config.json --master
# Complete workflow: Mix → Reprocess → Master
./TonnSDK_Simple_Mixing_Example ../examples/configs/Masks_config.json --reprocess --master
# Combine custom output with complete workflow
./TonnSDK_Simple_Mixing_Example ../examples/configs/Masks_config.json custom_mix.wav --reprocess --master
3. Example Configuration Files¶
The included configuration files in /examples/configs/ demonstrate different mixing scenarios:
Masks_config.json: Electronic track mixing configuration (supports mixing, reprocessing, and mastering)
The example demonstrates a complete production workflow:
- Mixing: Uses the configuration file to load tracks and generate the initial mix
- Reprocessing: Uses the same configuration to load original stems and apply parameter modifications
- Mastering: Processes the final mix (original or reprocessed) with professional mastering
This configuration demonstrates how TonnSDK handles different musical styles and instrument combinations across the entire production pipeline, and you can use it as a template for your own projects.