Vixen
02b45cc4
csharp
public record class MusicSegment

One piece of music, and what follows it.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

A segment is a clip with a tempo written on it. The tempo is not derived from the audio and cannot be — it is what the composer wrote, and it is the only thing that makes a bar line a real position rather than a guess. A segment whose declared tempo disagrees with its recording will transition in the wrong place, which is a content mistake this cannot detect and which is why the value belongs beside the clip rather than in the player.

Next is what makes a sequence rather than a playlist. An intro that names a loop, and a loop that names itself, is the whole structure of most game music — and it is arranged so that gameplay says nothing at all until it wants something to change.

Fields and properties (8)

  • public string Name

    What it is called, and what a transition names it by.

  • public AudioClip? Clip

    The audio.

  • public MusicTempo Tempo

    How fast it is, and how it is counted, where it begins.

  • public MusicTempoChange[] TempoChanges

    Where it changes tempo or metre, if it does.

  • public bool Sustains

    Whether it vamps here rather than moving on, until gameplay releases it.

  • public int LoopCount

    How many times it repeats before moving on. Zero plays it once; negative is forever.

  • public string Next

    Which segment follows when this one runs out. Empty stops.

  • public MusicMarker[] Markers

    Named places in it, for gameplay to hang on.

Used by (3)

  • MusicPlayerVixen.Audio
  • MusicPlayerTestsVixen.Audio.Tests
  • MusicSegmentAssetVixen.Audio