Developer API
Integrate a commercial-grade, adaptive mixing engine into your platform. Unlike static AI black-boxes, our deterministic DSP measures the audio (Crest Factor, SNR, PLR) and makes real-time engineering decisions to protect your user's groove and dynamics.
API Access
Please sign in to generate your test key or purchase production access.
Supported Genres
Pass the preset parameter in your JSON body to change how the Idan mix engine processes the audio.
| Preset ID (API Value) | Genre / Style | DSP Profile |
|---|---|---|
| afrobeats | Afrobeats | Warm body EQ + 0.95s plate reverb + dynamic beat carving |
| rap | Hip-Hop / Rap | Multiband compression + 0.70s room + aggressive slap delay |
| rnb | R&B | Silky air boost (+4.0dB) + 1.30s lush plate reverb |
| amapiano | Electronic / Amapiano | Heavy sub mono (100Hz) + long 1.20s reverb tails |
| dancehall | Reggae / Dancehall | Punchy compression + fast 0.85s tempo-synced delay |
| gospel | Gospel | Massive 1.50s cathedral reverb + slow optical compression |
| pop | Pop | Maximum air (+5.0dB) + radio-ready 3.5:1 compression |
Make a Request
curl -X POST https://wrattygstudio2.zevcloud.app/api/v1/mix \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"mode": "mix",
"preset": "afrobeats",
"stems": [
{ "url": "https://your-s3-bucket.com/beat.wav", "role": "beat" },
{ "url": "https://your-s3-bucket.com/vocal.wav", "role": "lead" }
]
}'Featured Artist Routing: If your track has a featured rapper, set their role to "feature". The engine automatically routes their vocals through the Rap preset (slap delay, heavy saturation) while keeping the main singer on the original genre preset.
Why Adaptive DSP beats Black-Box AI
Neural-network mastering tools blindly force an EQ curve onto your audio. Our engine acts like a human engineer: it measures the source and makes logical decisions.
🎚️ Transient Protection (PLR Guard)
If the requested LUFS target will crush the Peak-to-Loudness Ratio below 9.0, the engine refuses to destroy the kick drum's punch. It backs off the loudness to save the groove.
🎛️ Dynamic Beat Carving
It doesn't just turn the beat down. It analyzes the vocal's frequency range and applies a dynamic 2dB to 4dB dip in the beat only when the singer is active.
🎤 Smart Noise Gating
The denoiser measures artifact distortion (flutter). If a noise reduction level causes robotic artifacts, it automatically backs off the amount of reduction to keep the vocal natural.
🎼 Confidence-Gated Autotune
If the pitch tracker isn't confident in a note, the autotune doesn't guess. It holds back the correction to prevent warbling and unnatural glitches.
Vocal Tuning API
Our pitch correction engine uses a hybrid Resplice/PSOLA approach. It automatically detects the song key and preserves formants so the vocal never sounds robotic. You can trigger it via the /api/tune endpoint.
# Internal Adaptive Logic (engine.py)
if q.profile == "poor":
# Protect bad recordings from robotic artifacts
s.amount *= 0.70
s.retune_ms = max(s.retune_ms, 45)
if singer_err < 10:
# Singer is already in tune, let them keep their natural vibrato
s.flex_cents = max(s.flex_cents, 14.0)
if voiced_conf_mean < 0.75:
# Pitch tracker is unsure (whispers/breath), hold back tuning
s.conf_gate = (s.conf_gate[0] + 0.06, s.conf_gate[1] + 0.04)| Feature | Details |
|---|---|
| Engine Type | Hybrid Resplice + PSOLA (Pitch Synchronous Overlap and Add) |
| Formant Preservation | Yes (prevents the "chipmunk" effect during large pitch shifts) |
| Spectral Restoration | Restores lost breath and high-frequency air after processing |
| Key Detection | Analyzes both the vocal and the beat to snap to the correct scale |
JSON Telemetry & Mix Reports
Unlike black-box AI tools, we don't hide our processing. Every render generates a detailed JSON telemetry report. Once a mix is complete, you can fetch the exact engineering decisions our engine made by calling the report endpoint:
GET /api/v1/report?id=YOUR_JOB_IDThe response includes the full DSP chain, allowing you to display exactly what was done to the user's track (e.g., "The engine cut 2dB at 2500Hz to remove harshness and backed off the loudness to protect your transients").
{
"plr_guard": {
"requested_lufs": -9.9,
"applied_lufs": -10.2,
"reason": "transient_protection"
},
"eq_db": {
"31": -3.0,
"80": 1.27,
"4000": 1.55
},
"vocal_chain": {
"lead": [
["highpass", 85.0],
["body-mud 320", -3.69],
["compress", "opto 2.5:1 @ -20.8"],
["saturate", 3.38]
]
},
"space": {
"plate": { "rt60": 0.78, "predelay_ms": 38.7 },
"ducking": { "while_singing_db": 10.6 }
}
}Under the Hood: The Adaptive DSP Architecture
Unlike commercial AI mastering tools that use static, black-box neural networks, WrattyGstudio is a Deterministic Adaptive Expert System. It measures the source audio and makes real-time engineering decisions. Here is the complete list of live, active modules running in our engine:
1. Ingestion, Alignment & Repair
- declip.py: Analyzes waveforms at the sample level. If it detects digital clipping (e.g., flat-topped peaks), it mathematically reconstructs the missing waveform to prevent harsh distortion.
- vocal_align.py: Uses transient detection to align vocal timing to the beat. It has a confidence gate: if the alignment confidence is too low, it aborts the shift to protect the groove.
- noise_clean.py: A Wiener-filter based noise gate. It features a "Flutter Guard" that measures artifact distortion. If noise reduction causes robotic fluttering, it automatically backs off the reduction to keep the vocal natural.
2. The Adaptive Vocal Chain
- adaptive_tone.py: Analyzes the vocal against commercial references to apply surgical dynamic EQ cuts (e.g., cutting "mud" at 320Hz and "boxiness" at 600Hz only when needed).
- vocal_polish.py (The Vocal Rider): Rides the vocal fader dynamically (averaging ~1.48dB of movement) to lock it at the target loudness. It also cleans the gaps between phrases by ducking the noise floor by ~6.9dB.
- adaptive_ambience.py: Measures the crest factor to set compressor thresholds and makeup gain dynamically.
- vocal_fix.py: Forwardness Guard. Measures masking at 500Hz-2kHz to prevent the vocal from being pushed so far above the beat that it sounds disconnected.
- polish.py: Dynamic EQ that tracks harshness (2.5k-4k) and sibilance (5.5k-9k) in real-time.
- opto_comp.py: Emulates the Teletronix LA-2A optical compressor (EL panel model) for smooth, program-dependent vocal glue.
- vocal_sat.py: Applies 4x oversampled tube-style saturation based on measured vocal brightness, adding even and odd harmonics without aliasing.
- dsp_tier1.py (ADT): Generates an Automatic Double Track using a 14ms/22ms delay, LFO modulation, and ±0.30 pan to widen the lead vocal without phase cancellation.
3. The 3D Spatial Engine (vocal_space.py)
- The "Tiny Room" (Early Reflections): Generates ultra-short reflections to simulate the acoustic shadow of the human head. This creates a psychoacoustic 3D effect designed specifically for headphone intimacy, keeping the vocal close to the ear.
- Adaptive Ducking (Sidechain): The reverb and delay are sidechained to the vocal. While the singer is active, the space is ducked by up to 10.6dB. The moment they stop, the space swells back up.
- Fragment Delay: A tempo-synced delay that does not echo the whole vocal. It analyzes the syllables, finds the last word of a phrase, and throws only that fragment onto the 1/8 or 1/16 note grid (e.g., 309.3ms).
- Tempo-Synced Reverb: Generates a stereo plate reverb dynamically, with a low-pass filter that gets darker on every delay repeat to push the echo further into the background.
4. Beat Interaction & Dynamic Carving
- Dynamic Beat Carving (vocal_polish.py): Instead of just turning the beat down, the engine dynamically carves a 2dB to 4dB pocket in the beat's 2kHz-4kHz range only when the vocal is active. The beat literally opens up to surround the vocal.
- beat_punch.py (Kick Transient Punch Preserve): Measures the kick's crest factor and the beat's low-end share before applying punch. It adds 0-3dB of punch and uses a peak guard to ensure the kick peak never rises more than +0.3dB. If it detects no real kicks or too much noise, it adds nothing.
- song_sections.py: Analyzes the energy of the beat and vocals to map out Intro/Verse/Chorus. It applies volume automation curves to ride the vocal based on the section's intensity.
5. Hybrid PSOLA Autotune (vocaltune/)
- Hybrid Algorithm: Uses Resplice for shifts under 160 cents (ultra-transparent), and PSOLA (Pitch Synchronous Overlap and Add) for massive shifts to prevent robotic artifacts.
- Adaptive Blue Notes: Analyzes the vocal's pitch class. If the artist intentionally bends a note outside the scale and holds it steady, the engine allows it (preserving emotion).
- Confidence Gating: If the pitch tracker detects whispers or breath (low confidence), it holds back the correction to prevent warbling.
- Spectral Restoration: Calculates the spectral difference (via Welch's method) between the original and tuned audio, and restores lost breath and high-frequency air via FIR convolution.
6. Adaptive Mastering Bus & PLR Guard
- Adaptive EQ (master_bus.py): Measures the tonal gaps against commercial references and applies surgical EQ (e.g., cutting sub-bass at 31Hz while boosting the kick at 80Hz).
- mix_balance.py: Low-Mid Stereo Trims. Applies adaptive Low Shelf (80Hz) and Peak Filter (125Hz) on the Mid channel, while trimming high-frequency Side energy (5.5k-16kHz) to prevent harsh stereo sibilance.
- mix_tone_guard.py: Dull/Bright Guard. Cuts harsh 6kHz and boosts dull 2kHz using precise FFT band trims against reference profiles.
- Multiband & Glue: Splits the mix into low, mid, and high bands to apply transparent compression, followed by a gentle glue compressor.
- PLR Guard (Peak-to-Loudness Ratio): The engine's ultimate safety net. If pushing the loudness to a target like -9 LUFS would crush the transients (dropping the PLR below 9.0), the engine refuses. It backs off the loudness to protect the kick drum's punch and the song's groove.
- True-Peak Clipper: Before the limiter, the engine catches inter-sample peaks (e.g., 6dB of them) and shaves them off smoothly to prevent distortion.
- Brickwall Limiter & Mono-Bass: The final limiter hits the target ceiling, while the engine forces everything below 120Hz to mono, ensuring the bass and kick are dead center and punchy.
- Stereo Correlation Guard: Monitors the phase of the final mix. If the mix is out of phase, it collapses the sides to protect mono compatibility.
Developer Support
Send an Email
Instant Messaging
Prefer to chat directly with an engineer? Reach out on WhatsApp.
Chat on WhatsApp