Temporal Thresholds

← Back to Index


Definition

Temporal Thresholds are the model’s mechanism for distinguishing real state changes from transient noise.

Live audio is messy. Kicks drop for a beat during a DJ transition. Filters sweep and snap back. Energy spikes on a one-shot FX. Without temporal thresholds, the model would fire story transitions on every glitch, every mix artifact, every momentary fluctuation β€” producing visual chaos instead of meaningful narrative.

A temporal threshold is simple: a new state must persist for N beats or M bars before the model treats it as real.


The Problem Without Thresholds

  Raw presence signal during a DJ mix:

  ON ON ON ON OFF ON ON ON OFF OFF OFF OFF OFF OFF ON ON ON ON
  1  2  3  4  5   6  7  8  9  10 11 12 13 14  15 16 17 18

  Without thresholds (story changes on every state flip):

  Story: groove──┐  β”Œgroove──┐  β”Œβ”€β”€β”€β”€β”€breakdown────┐  β”Œgroove──
                 β”‚  β”‚        β”‚  β”‚                   β”‚  β”‚
                 BRK         BRK                     BRK
                 (beat 5)    (beat 9)                 (beat 15)
                 ↑           ↑
                 FALSE       This one is real,
                 ALARM       but the audience has
                 (DJ mixing) already been jarred
                             by the false alarm.

  With thresholds (4 beats required before confirming):

  Story: groove────────────────────┐  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€groove──
                                   β”‚  β”‚
                              breakdown
                              (confirmed at beat 12:
                               4 consecutive OFF beats)
                               
                              Return confirmed at beat 18:
                              (2 consecutive ON beats β€”
                               asymmetric threshold)

The difference is the difference between a system that works in a test environment and one that works on a real sound system during a live set.


The Two-Tier System

Not all values in the model need thresholds. The model separates values into two tiers:

Immediate Values

These update every frame with no delay. They drive smooth, responsive visual mappings. They never trigger story transitions directly.

  foundation.weight          continuous (0.0–1.0)
  foundation.presence        continuous (0.0–1.0), NOT the gate
  variance.magnitude         continuous (0.0–1.0)

Immediate values are inherently smoothed by the analysis layer. A single outlier frame doesn’t cause problems because the smoothing absorbs it. Visual artists use these values for things like shape size, opacity, blur β€” parameters where smooth, frame-to-frame variation is desirable.

Confirmed Values

These must pass a temporal threshold before the model updates them. They drive story transitions and narrative-level changes.

  foundation.presence.gate   binary (open / closed)
  foundation.sustain         categorical (dry / mid / wet)
  variance.direction         discrete (rising / stable / falling)
  story.name                 derived from confirmed values
  story.phase                derived from confirmed values

Confirmed values change infrequently β€” on the order of every few bars to every few minutes. When they do change, it means something significant has happened in the music.

  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
  β”‚                                                          β”‚
  β”‚  IMMEDIATE (visual layer)      CONFIRMED (story layer)   β”‚
  β”‚  ─────────────────────────     ──────────────────────── β”‚
  β”‚  Updates: every frame          Updates: when confirmed   β”‚
  β”‚  Latency: none                 Latency: N beats / M bars β”‚
  β”‚  Smoothed: yes (by analysis)   Smoothed: yes (by time)   β”‚
  β”‚  Drives: visual params         Drives: story transitions β”‚
  β”‚  Jitter: absorbed              Jitter: rejected          β”‚
  β”‚                                                          β”‚
  β”‚  These are fast and fluid.     These are slow and stable. β”‚
  β”‚  They make visuals responsive. They make stories coherent.β”‚
  β”‚                                                          β”‚
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Threshold Rules

Each confirmed value has its own threshold, tuned to the nature of the state change it guards.

Presence Gate β€” Opening (kick disappears)

  Threshold:  N beats (suggested default: 4 beats = 1 bar)
  
  Why 4 beats: One bar is the minimum musically meaningful duration
  for a kick to be "gone." Anything shorter is a mix artifact, a
  brief dropout, or a transition glitch.
  
  Mechanism:
  
    Beat 1: Presence drops below gate threshold
    Beat 2: Still below β†’ counter = 2
    Beat 3: Still below β†’ counter = 3
    Beat 4: Still below β†’ counter = 4 β†’ GATE OPENS β†’ story transition
    
    If presence rises above threshold at any point before beat 4,
    the counter resets. No transition fires.

Presence Gate β€” Closing (kick returns)

  Threshold:  N beats (suggested default: 2 beats)
  
  Why 2 beats: The return of the kick is felt faster than its
  absence. When a drop hits, the audience recognizes it within
  1-2 beats. The asymmetry is intentional β€” disappearance
  requires more confirmation than return.
  
  Mechanism:
  
    Beat 1: Presence rises above gate threshold
    Beat 2: Still above β†’ counter = 2 β†’ GATE CLOSES β†’ story transition

Sustain Shift

  Threshold:  M bars (suggested default: 2 bars)
  
  Why 2 bars: Sustain classification can fluctuate beat-to-beat due
  to dynamic processing, FX sends, and room acoustics. A full 2 bars
  (8 beats at 4/4) ensures the decay character has genuinely changed
  and isn't just a momentary FX.
  
  Mechanism:
  
    Bar 1: Sustain classified as new category (e.g., DRY β†’ WET)
    Bar 2: Still classifying as new category β†’ SHIFT CONFIRMED
    
    If the classification reverts at any point during the 2 bars,
    the counter resets. Original category is maintained.

Variance Direction Change

  Threshold:  M bars (suggested default: 2 bars)
  
  Why 2 bars: A single bar of rising energy might just be a
  fill or a momentary swell. Two bars of consistent direction
  means the music is actually going somewhere.
  
  Mechanism:
  
    Bar 1: Direction classified as new state (e.g., stable β†’ rising)
    Bar 2: Still classifying as rising β†’ DIRECTION CONFIRMED
    
    If the direction reverts or becomes ambiguous during the 2 bars,
    the counter resets. Original direction is maintained.

Weight β€” No Threshold

  Weight has no temporal threshold. It is a continuous, smoothed
  value that updates every frame. The smoothing applied by the
  audio analysis layer is sufficient to prevent jitter.
  
  Weight does not trigger story transitions β€” it contributes to
  story determination through the matrix, but the matrix lookup
  only runs when a confirmed value changes. Weight alone cannot
  cause a transition.

Why Beats and Bars, Not Milliseconds

Thresholds are expressed in musical time β€” beats and bars β€” not clock time.

  At 125 BPM:  1 bar = 4 beats = 1,920 ms
  At 130 BPM:  1 bar = 4 beats = 1,846 ms
  At 140 BPM:  1 bar = 4 beats = 1,714 ms
  At 150 BPM:  1 bar = 4 beats = 1,600 ms

The absolute duration changes, but the musical meaning is the same. A β€œone bar pause” feels like a one bar pause regardless of tempo. A β€œ2000ms pause” feels like one bar at 120 BPM but more than a bar at 140 BPM.

Since the system has access to BPM from Pro DJ Link, converting between musical time and clock time is trivial. But the model thinks in musical time because that’s how the music thinks.


Threshold Interaction with Continuous Values

A critical subtlety: during the confirmation window (while a threshold counter is running), the continuous values are already responding.

  Example: Kick disappears at beat 1

  Beat:     1      2      3      4      5
  Presence
  (continuous): 0.9 β†’ 0.3 β†’ 0.1 β†’ 0.05 β†’ 0.0
  
  Presence
  (gate):   closed  closed  closed  closed  OPEN
                                            ↑
                                   4 beats confirmed.
                                   Story transition fires.

  Visual response:
  Beat 1:  Visuals start fading (opacity drops with continuous value)
  Beat 2:  Visuals noticeably dimmer
  Beat 3:  Visuals nearly gone
  Beat 4:  Gate opens β€” story officially transitions to "breakdown"
           Visual system can now trigger breakdown-specific behaviors
           (color change, different geometry, etc.)

This is why the two-tier system works well. The audience sees smooth visual changes immediately (driven by continuous values), and the structural changes (driven by confirmed values) arrive slightly later but with confidence. By the time the story transition fires, the visual transition is already underway β€” the gate opening confirms what the audience already feels.


Tuning Thresholds

All threshold values are configurable, not hardcoded. The suggested defaults are starting points for standard techno performances. Different contexts may require different values.

  Faster threshold (fewer beats):
    Pros: More responsive. Catches quick changes.
    Cons: More false positives. Jittery in noisy environments.
    Use:  Studio/controlled playback, where the signal is clean.

  Slower threshold (more beats):
    Pros: More stable. Filters out noise and artifacts.
    Cons: More latency. May miss quick story transitions.
    Use:  Live sound systems, where room acoustics and
          compression add noise to the signal.

The right values depend on the context and should be discovered through real-world testing.


  • Presence β€” the gate mechanism that thresholds guard
  • Sustain β€” categorical shifts that require confirmation
  • Variance β€” direction changes that require confirmation
  • Story β€” transitions that fire when confirmed values change

← Back to Index