Continuous mixes

WeaveShift: scoring every handoff in a continuous mix

How WeaveShift searches for and scores track-to-track transitions across six explainable categories, why profiles are plain TOML files that shape the search itself, and how a mix becomes chapters for a long-form video.

4 min read · checked against weaveshift 1.x · updated 2026-11-26

WeaveShift builds a continuous mix from an ordered list of full-mix WAV or MP3 tracks. It is designed for repeatable, explainable, audio-aware transitions without hand-editing every handoff. Original timing and pitch are preserved by default, so tracks are blended rather than time-stretched.

For each junction, WeaveShift builds candidate windows: where to leave Track A, where to cue Track B, and how long to overlap. Cut points in Track A are the detected beats and onsets near its tail (within the maximum tail trim) plus fixed trim steps; cue points in Track B are the beats and onsets near its start (within the maximum cue depth), always including the very start. Each side is de-duplicated and capped at 22 candidates. A window that would start before the track begins or run past its end is scored −999 and discarded. Each remaining candidate is scored across six categories.

CategoryWhat it rewards
Vocal safetyLittle overlap between Track A's vocal segments and Track B's during the blend. A penalty applies when both tracks are vocally dense in the window.
Beat alignmentThe cut in A and the cue in B each landing close to a detected beat or onset.
Energy continuityMatching level across the overlap, blending perceptual loudness (LUFS) with RMS, so the handoff does not jump.
LoudnessSmall gain correction needed on Track B. Large corrections score lower.
CompatibilityTempo closeness (BPM) and harmonic compatibility on the Camelot wheel.
PlacementLittle of Track A's tail trimmed, and Track B cued near its start rather than deep inside.

Overlap length adds small bonuses and penalties: a short overlap suits a big BPM jump, a long one suits highly compatible tracks, and an overlap that is too short is penalized. Every candidate also carries plain-language notes such as “vocal collision risk”, “trims 4.2s from Track A tail” or “applies +2.1 dB to Track B”, generated from the same measurements that produced the score.

Profiles are data, and they shape the search

A profile is a TOML file with three sections: [weights] for the categories above plus overlap preference, gain, tail-trim and cue-depth penalties; [preferences] for target and preferred overlap lengths; and [limits] for hard caps such as maximum Track B gain, maximum tail trim, maximum cue depth and maximum vocal collision. Eight ship with the package, and --scoring-config loads your own.

A custom profile
name = "my_profile"
description = "My custom transition personality."

[weights]
vocal_collision = 1.5
beat_alignment = 1.0
energy = 1.0

[preferences]
target_overlap_sec = 8.0
preferred_overlap_min_sec = 4.0
preferred_overlap_max_sec = 12.0

[limits]
max_abs_b_gain_db = 3.0
max_tail_trim_sec = 5.0
max_b_cue_sec = 12.0
max_vocal_collision_score = 0.25

In profile mode the limits do more than re-rank candidates that were already found. max_b_cue_sec, max_tail_trim_sec and the preferred overlap range change which candidates are searched in the first place. That is why heart and jazz feel different from edm: they never look at the aggressive cuts.

Built-in profiles · preferred overlap and limits
edm
Running mixes, workout EDM, club sets
gain ≤
4 dB
trim ≤
8s
cue ≤
12s
vocal ≤
0.35
smooth
Balanced vocal-aware electronic & hybrid sets
gain ≤
2.5 dB
trim ≤
6s
cue ≤
8s
vocal ≤
0.25
vocal_trance
Vocal trance, euphoric EDM, melodic running mixes
gain ≤
3 dB
trim ≤
5s
cue ≤
16s
vocal ≤
0.25
vocal_trance_strict
Vocal-heavy trance where vocal overlap must be tightly capped
gain ≤
2 dB
trim ≤
4s
cue ≤
20s
vocal ≤
0.10
lounge
Speakeasy, global nightclub, cafe & background mixes
gain ≤
2.5 dB
trim ≤
4s
cue ≤
10s
vocal ≤
0.30
jazz
Jazz, blues, and organic live-feel recordings
gain ≤
2 dB
trim ≤
2.5s
cue ≤
8s
vocal ≤
0.25
heart
Love songs, heartbreak ballads, emotional arcs
gain ≤
2 dB
trim ≤
2s
cue ≤
8s
vocal ≤
0.20
cinematic
Soundtrack, ambient, atmospheric & narrative mixes
gain ≤
2.25 dB
trim ≤
3s
cue ≤
10s
vocal ≤
0.30

Values are read from the eight TOML profiles shipped in weaveshift/configs. The bar is the preferred overlap range in seconds; the tick is the target overlap.

Vocal awareness: draft fast, finish careful

  • heuristic: a fast midrange and harmonic estimator. The default for setlist runs, and the right choice while you audition and reorder.
  • demucs: neural vocal separation (htdemucs). Slower; use it for a final pass when vocal-aware blending matters.
  • auto: tries Demucs and falls back to the heuristic if it is unavailable. The default for two-track runs.
  • none: skips vocal analysis, so vocal collision sees no vocals.

Explainable, and overridable by ear

Runs write audition snippets and a detailed JSON report with every candidate's scores and notes, so you can hear and read why a transition was chosen before committing to the full render. When the ear disagrees with the math, per-junction overrides win.

  • Candidate modes force a style for one junction while WeaveShift still computes timing, cue, overlap and gain: recommended, vocal_safe, beat_aligned, quick_cut, smooth, profile, vocal_ducked, long_blend.
  • natural plays the outgoing track to its last sample, then a normal gap, then the next song from zero, like consecutive tracks on a CD.
  • manual and handoff set exact timings for a single junction.
  • Manifest transition_overrides are always honored. Other manifest settings are copied onto CLI defaults only with --apply-manifest-settings, from a fixed allowlist; explicit CLI values win.
  • Track paths in a manifest are resolved so they stay inside the manifest's folder (absolute paths, .., ~ and symlinks are all judged by where they finally resolve, unless you opt out), and built-in profile names are validated.

From a mix to a long-form video

weaveshift-cues produces a CSV cue sheet from the source tracks and the timeline report. mvdirector's mix mode ingests that, or a .cue sheet, or a plain timestamp list, and treats each track as a chapter. It measures per-chapter BPM, downbeat offset and normalized energy in bounded memory without needing vocal stems or lyrics, assigns each chapter an uninhabited visual environment and two or three loopable b-roll units, then crossfades them into a seamless circular loop. Each rendered chapter is cached, so re-assembling after a change only re-renders what changed, and the output gets embedded MP4 chapter markers plus a YouTube-ready chapters file.

Frequently asked questions

Does WeaveShift warp or time-stretch my tracks by default?
No. Original track timing and pitch are preserved by default, focusing on clean beat-aligned, vocal-safe blends rather than aggressive pitch/tempo warping.
How does WeaveShift prevent vocal clashes between consecutive songs?
It estimates vocal activity (via fast heuristic mode for drafting or htdemucs neural separation for final passes) and penalizes overlap windows where both tracks carry dense vocals.
Can a WeaveShift setlist feed directly into a long-form YouTube music video?
Yes. weaveshift-cues exports a chapter cue sheet that mvdirector's mix mode converts into chaptered visual worlds with embedded MP4 chapters and a YouTube chapters list.