ExPilot's music: pieces written in Strudel, one per mood and kind of arena, each in
four layers — :drums, :bass, :pad, :lead — for Cauldron2D.Audio.Music.
| piece | section | when |
|---|---|---|
drift | :drift | the title, the lobby and settings |
orbit | :cruise | a dogfight arena, flying with no one near |
burn | :combat | a dogfight arena, an enemy within reach |
banner | :cruise | a capture-the-flag arena, no one near |
raid | :combat | a capture-the-flag arena, an enemy within reach |
phalanx | :cruise | a team arena, no one near |
siege | :combat | a team arena, an enemy within reach |
circuit | :cruise | a race, no one near |
overtake | :combat | a race, a rival within reach |
ember | :low_fuel | fuel below 150 |
adrift | :out | out of lives, watching the others |
laurels | :victory | the summary of a round won |
ashes | :defeat | the summary of a round lost |
The kind of arena is the view's mode (ExPilot.Game.mode/1); the arena pieces for
each kind live in ExPilot.Music.Ctf, ExPilot.Music.Team and ExPilot.Music.Race,
a duel taking the dogfight's. A stage whose music is static asks
cue(view, {:static, :arena}) and gets a song written to loop, one a kind of arena,
from ExPilot.Music.Static; the layered pieces above are for stages that follow the
play.
A bar is one Strudel cycle. Each layer is one Strudel chain, performed live on the
player's stage by Cauldron2D.Audio.Music; the chains are written for the number of
bars in the table and repeat from there. The title and lobby differ only in layer
levels, so they share one section. Sound names are Strudel's: the drum machines and
the General MIDI soundfonts, fetched on first use and synthesised until they arrive
(Cauldron2D.Audio.Music.prefetch/1 at the application's start fetches them all
ahead). Every drum, pad and lead chain plays into a hall unless it sets its own
.room( (polish/2).
cue/2 turns a player's view and screen into the cue for the piece and section that
fit; the director changes piece at the next bar.
ExPilot.Music.pieces()
ExPilot.Music.cue(view, :arena)
ExPilot.Music.source("burn", :combat, :drums)
Summary
Functions
Which piece, section and layer levels a player's view calls for on screen; {:static, :arena} names the song a static stage loops for the arena's kind.
Every piece as Cauldron2D.Audio.Music.piece/3 takes it, with its name.
The chain as the stage plays it: a chain with no .room( of its own is given the
layer's hall — drums 0.12, pad 0.3, lead 0.3, bass dry — and a pad with no .attack(
of its own swells in and out of every chord, a little short of the bar, under a
low-pass, so no chord change is a blast and no chord a drone.
The Strudel chain a layer of a section is played as, and the bars it runs for.
Functions
@spec cue(map() | nil, Cauldron2D.Client.Game.screen()) :: Cauldron2D.Audio.Music.cue()
Which piece, section and layer levels a player's view calls for on screen; {:static, :arena} names the song a static stage loops for the arena's kind.
@spec pieces() :: [{String.t(), Cauldron2D.Audio.Music.spec()}]
Every piece as Cauldron2D.Audio.Music.piece/3 takes it, with its name.
The chain as the stage plays it: a chain with no .room( of its own is given the
layer's hall — drums 0.12, pad 0.3, lead 0.3, bass dry — and a pad with no .attack(
of its own swells in and out of every chord, a little short of the bar, under a
low-pass, so no chord change is a blast and no chord a drone.
@spec source(String.t(), atom(), atom()) :: {pos_integer(), String.t()}
The Strudel chain a layer of a section is played as, and the bars it runs for.