Skip to main content

Module music_engine

Module music_engine 

Source
Expand description

Procedural music engine — generates MathAudioSources in real time.

The music engine converts a high-level MusicVibe into a living, evolving stream of synthesized notes using music theory primitives (Scale, Chord, Rhythm, Melody). It ticks every frame and queues AudioEvents for the audio thread.

Structs§

Chord
A set of simultaneously played scale degrees.
MelodyGenerator
Generates melodic lines that follow a scale and chord progression.
MusicEngine
Drives procedural music generation each frame.
NoteEvent
A note produced by the music engine for the audio thread.
Progression
A sequence of chords with durations (in beats).
RhythmPattern
A repeating rhythmic pattern as beat positions.
Scale
A key and scale combination.
VibeConfig
Parameters for a music vibe.

Enums§

NoteVoice
ScaleType
Western equal-temperament scale types.