Skip to main content

Module audio

Module audio 

Source
Expand description

The scene’s music: the synthesizer’s voice, and the sequences played into it.

The audio world is a world of its own, so the scene reaches it through jobs. Installing the voice is one question: it builds the voice and answers the entity that carries it, and every note the gameplay world plays is addressed to that entity afterwards. The sequences themselves live in the gameplay world, with the clocks that advance them, so a track’s play state is a component field rather than a job.

Re-exports§

use std::sync::Arc; 🔒
use unlit_ecs::Bundle; 🔒
use unlit_ecs::DynamicBundle; 🔒
use unlit_ecs::Entity; 🔒
use unlit_ecs::Scope; 🔒
use unlit_ecs::World; 🔒
use unlit_ecs::bundle; 🔒
use super::Scene; 🔒
use super::music::bgm_midi; 🔒
use super::music::sequence_midi; 🔒
use super::tick::advancing; 🔒
use unlit3dx::prelude::*; 🔒

Structs§

Music 🔒
The music and the tick that starts it, spawned together.
PlayingTrack 🔒
One track and the tick that advances it, spawned together.
SceneAudio
The music, living on its own entity in the gameplay world.
SceneTracks
The tracks the control panel transports.
Track
One sequence playing into the audio world.

Enums§

AudioSetup
How a scene’s audio world gets its synthesizer and its output.

Functions§

install_synth
Install the demo’s synthesizer on an audio world, answering the entity that carries it.
start_tracks 🔒
Put the scene’s two sequences on the gameplay world, playing into voice.