Skip to content

Audio Feature Rhythm (f8.audiofeat.rhythm)

Rhythm analysis service consuming core features (tempo + pulse clarity).

  • Service class: f8.audiofeat.rhythm
  • Version: 0.0.1
  • Source directory: f8/audiofeat/rhythm
  • Tags: audio, feature, tempo, beat, pulse

When to Use

  • Use f8.audiofeat.rhythm when timing cues such as onset, beat, and tempo matter more than continuous energy.
  • It is well suited to beat-synced visuals, trigger logic, and percussion-like event detection.
  • Pair it with f8.audiofeat.core when you want both intensity and timing from the same source.

Common Wiring Patterns

  • A common setup sends one f8.audiocap stream into both core and rhythm.
  • Rhythm events are often routed into f8.pyengine trigger logic, state machines, or envelope operators.
  • While tuning thresholds, keep a text or log branch attached so you can validate event density in real time.

Pitfalls / Gotchas

  • Rhythm analysis depends heavily on transients; ambient or texture-heavy material may look weak or inconsistent.
  • Low thresholds can flood the graph with false triggers, while high thresholds can make the service appear silent.
  • Tempo estimation often needs a short settling period, so do not treat it as instantly stable on very short clips.

Service Reference

How to Run

pixi run -e default f8pyaudiofeat_rhythm
  • Workdir: ../../../../
  • Environment overrides: none

Typical Inputs / Outputs

  • Data inputs: coreFeatures
  • Data outputs: rhythmFeatures, monitor
  • Commands: none

Service State Fields

Name Access Required On Node Schema Description
tempoWindowSec rw true true number / default=8.0 Window length in seconds for tempo estimation.
pulseWindowSec rw true true number / default=6.0 Window length in seconds for pulse clarity.
emitEvery rw true true integer / default=1 Emit one rhythmFeatures payload every N coreFeatures inputs.
lastError ro true false string / default= Last runtime error string.
active rw true false boolean / default=True Service lifecycle state (activate/deactivate).
svcId ro true false string Readonly: current service instance id (svcId).

Key Fields That Matter

  • tempoWindowSec (Tempo Window (s), rw): Window length in seconds for tempo estimation. Schema: number / default=8.0.
  • pulseWindowSec (Pulse Window (s), rw): Window length in seconds for pulse clarity. Schema: number / default=6.0.
  • emitEvery (Emit Every, rw): Emit one rhythmFeatures payload every N coreFeatures inputs. Schema: integer / default=1.
  • lastError (Last Error, ro): Last runtime error string. Schema: string / default=.
  • active (Active, rw): Service lifecycle state (activate/deactivate). Schema: boolean / default=True.
  • svcId (Service Id, ro): Readonly: current service instance id (svcId). Schema: string.

Service Commands

None

Service Data Input Ports

Name Required On Node Schema Description
coreFeatures true true object{hopLength, onsetEnvelope, onsetStrength, rms, ...} Input core feature payload from f8.audiofeat.core.

Service Data Output Ports

Name Required On Node Schema Description
rhythmFeatures true true object{beatPeriodMs, onsetStrengthMean, onsetStrengthStd, pulseClarity, ...} Rhythm feature payload.
monitor true false object{active, alive, cpu, error, ...} Unified runtime monitor snapshots (health/resource/perf/error).

Operators

None