Skip to content

Mixing Basics ​

Mixing is the craft of taking several recorded parts and balancing them into one stereo whole that sounds intentional: every element audible, nothing fighting, a sense of front-to-back depth and left-to-right space. This page defines the words you need before reading the Mixing Engine guide. A short example near the end shows the main controls as calls.

Where mixing sits

You usually edit individual parts (timing, pitch, noise), then mix them together, then master the finished stereo file for delivery. Mixing is the middle step that turns a folder of separate stems into a balanced song. Get the balance right here and mastering becomes a polish, not a rescue.

Tracks and channel strips ​

A track is one recorded part: a lead vocal, a bass DI (a direct-injected line signal taken straight from the instrument), a stereo drum overhead pair. In a mixer, each track flows through a channel strip — a vertical lane of controls that processes just that part. The whole art of mixing is setting each strip so the parts combine well, then routing them to a common output.

ENGINE · LANE MIXERIDLE
The engine lane mixer — faders and mutes inside the playback engine

Three MIDI clips loop through the realtime engine: each track occupies a lane with its own channel strip, and the lanes sum into a master strip carrying the engine’s true-peak limiter. The faders call the strip setters and the mutes call setSoloMute — every band below is the engine’s separate solo previews through the master chain, re-rendered through renderOffline as you move the controls.

Lead fader
0 dB
Bass fader
3 dB
Drums fader
-8 dB
Mute lead
Mute bass
Mute drums

Level: trim, fader, and gain staging ​

There are two level controls on a strip and they do different jobs:

  • Input trim sets a sensible working level on the way in, before any processing. Recordings arrive at wildly different volumes; trim evens them out so the processors that follow see a healthy signal.
  • Fader is the balance control you ride against the other tracks: vocal forward, music back.

Keeping levels sensible at every stage — not too quiet (noisy), not too hot (clipping) — is called gain staging, and it is the single most important habit in mixing. See Gain Staging.

Pan: placing sound left to right ​

Pan positions a track across the stereo field, from hard left to hard right. Spreading parts out gives each room to breathe instead of stacking in the center. Two refinements matter:

  • Pan mode decides how a position maps to the channels — a true pan that moves a mono source, a balance control that just turns one side of a stereo track down, or independent left/right positioning.
  • Pan law decides how loud the center is relative to the sides, so a part does not jump in volume as you pan it.

Inserts vs sends ​

This is the distinction beginners most often miss, and it is simple once named:

InsertSend
Signal pathIn series: the whole track passes through it.In parallel: a copy of the track goes to a shared destination.
Typical useProcessing that belongs to that track, such as a compressor on the vocal or an EQ on the bass.An effect several tracks share, such as one reverb fed by the vocal, the snare, and the guitar so they sit in the same space.
Level controlThe track's fader sets how much of the processed signal continues.The send level (sendDb) sets how much goes to the destination.

Pre-fader vs post-fader

A send can tap the signal before the fader or after it. A pre-fader send is independent of the balance, which is what you want for headphone/cue mixes; a post-fader send follows the balance, so an effect stays proportional as you ride the fader. Choosing the right one is a common gotcha; the Mixing Engine page traces exactly where each tap sits.

MIXER · SENDSIDLE
Pre-fader vs post-fader sends — drag the fader

One channel feeds two sends and the main output. Pull the channel fader down: the POST-fader send and the MAIN output follow it, because they are tapped after the fader; the PRE-fader send is tapped before it and stays put. Press play to hear it — the dry tone (post-fader) fades out while the pre-fader send (a stand-in for a reverb/aux return) keeps sounding even with the fader all the way down. That is why a vocal reverb fed pre-fader does not disappear when you ride the vocal down — the classic routing surprise.

Channel fader
0 dB

Buses and subgroups ​

A bus is a shared destination that sums several signals. The most important bus is the master — the final stereo output everything reaches. Two other common roles:

  • An aux bus is the return for sends (your shared reverb lives here).
  • A subgroup (or submix) collects related tracks — all the drums, say — so you can process and ride them as one. A compressor on the drum subgroup glues the kit together; one fader controls the whole kit's level.

A VCA group (VCA, from voltage-controlled amplifier) is a related idea: a single fader that trims several tracks at once without re-routing their audio, useful when the parts must still flow to different buses.

Automation ​

A static mix is rarely the best mix. Automation lets a control change over time: push the vocal up half a dB in the chorus, fade the synth out over four bars, open a filter on a riser. The control follows a curve between the points you set — a straight ramp, an eased S-curve, or an instant jump. This is how a mix breathes instead of sitting still.

Metering: trusting your eyes as well as your ears ​

Ears tire and rooms lie, so mixers watch meters too. The ones that matter most:

  • Peak / true peak — the highest level; true peak catches inter-sample overs your sample meter misses.
  • RMS / LUFS — average level (root mean square) and perceived loudness in LUFS, Loudness Units relative to Full Scale, which is what listeners actually judge.
  • Correlation — whether the left and right channels agree; strongly negative values warn that the mix may weaken or cancel in mono.

Try it in libsonare ​

mixStereo renders a few stems to one stereo master in a single call. Trim, fader, pan, and width are per-track settings, and every track comes back with its own meter reading.

typescript
import { init, mixStereo } from '@libraz/libsonare';

await init();

const mix = mixStereo([vocalL, musicL], [vocalR, musicR], sampleRate, {
  inputTrimDb: [3, 0],    // working level, before any processing
  faderDb: [-3, -12],     // balance: vocal forward, music back
  pan: [0, -0.2],         // music slightly left
});

// mix.left, mix.right: the master
// mix.meters[i].peakDb, .rmsDb, .correlation: one reading per track
python
import libsonare as sonare

mix = sonare.mix_stereo(
    [(vocal_l, vocal_r), (music_l, music_r)],
    sample_rate=48000,
    input_trim_db=[3, 0],
    fader_db=[-3, -12],
    pan=[0, -0.2],
)

# mix.left, mix.right: the master
# mix.meters[i]: one reading per track
bash
# The native CLI's mix-strip runs one file through one channel strip.
sonare-cli mix-strip vocal.wav --input-trim-db 3 --fader-db -3 --pan 0.2 -o out.wav

Sends, buses, subgroups, and automation need the scene-based Mixer; see the Mixing Engine guide.

How libsonare models all of this

libsonare's mixing engine maps these concepts to concrete objects:

ConceptIn the engine
StripA ChannelStrip with input trim, EQ, fader, pan, width, inserts, and sends in a fixed signal order
BusA routing destination carrying a master/aux/submix role
SendA tap taken pre- or post-fader
AutomationScheduled at sample-accurate positions with linear/exponential/s-curve/hold curves
MetersA meter snapshot plus a goniometer history buffer on every strip
SceneA JSON description of the whole mixer you can save and reload

The engine is real-time-safe — denormal-guarded, lock-free parameter changes, pre-allocated buffers, and plugin-delay compensation across the routing graph — so the same model runs offline and inside an AudioWorklet.

Related: Mixing Engine, Mixing Scene JSON, Gain Staging, Mono Compatibility, Audio Basics