Skip to main content

Module math_source

Module math_source 

Source
Expand description

Math-driven audio sources — the same MathFunctions that drive glyphs also drive sound.

A MathAudioSource maps MathFunction output to frequency and amplitude in realtime. The visual and auditory are the same computation expressed through different senses.

§Design

Each source has:

  • A MathFunction that evolves over time and produces a scalar in [-1, 1]
  • A frequency_range mapping that scalar to Hz
  • A Waveform type (sine, saw, square, etc.)
  • An optional AudioFilter (LP, HP, BP, notch)
  • A 3D position for spatial panning
  • A tag for grouping/stopping sources
  • A lifetime (-1.0 = infinite, positive = seconds)

Structs§

AudioPresets
Quick-access library of common audio source presets.
MathAudioSource
A mathematical audio source — oscillator driven by a MathFunction.

Enums§

AudioFilter
A filter applied to the oscillator output.
Waveform
Waveform shape for this audio source’s oscillator.