Skip to content

API Interface MusicEvent

github-actions[bot] edited this page Nov 29, 2026 · 2 revisions

Interface: MusicEvent

Defined in: src/engine/core/musicEvents.ts:59

What a beat, bar or cue callback carries (§1.1). Every field states its unit.

Properties

bar

bar: number;

Defined in: src/engine/core/musicEvents.ts:64

1-based integers; a bar event has beat 1.


beat

beat: number;

Defined in: src/engine/core/musicEvents.ts:65


beatsPerBar

beatsPerBar: number;

Defined in: src/engine/core/musicEvents.ts:70


cue?

cue?: string;

Defined in: src/engine/core/musicEvents.ts:67

onMusicCue only: the cue's name.


handle

handle: MusicEventHandle;

Defined in: src/engine/core/musicEvents.ts:60


heardIn

heardIn: number;

Defined in: src/engine/core/musicEvents.ts:74

Seconds until it is heard: time - Audio.time; >= 0 unless missed > 0.


missed

missed: number;

Defined in: src/engine/core/musicEvents.ts:76

Beats of this kind coalesced into this call; 0 normally.


segment

segment: string;

Defined in: src/engine/core/musicEvents.ts:62

Node id of the playing segment.


skippedCues?

skippedCues?: string[];

Defined in: src/engine/core/musicEvents.ts:78

Cue events only: the names of cues coalesced away (R20).


tempo

tempo: number;

Defined in: src/engine/core/musicEvents.ts:69

Beats per minute at this point.


time

time: number;

Defined in: src/engine/core/musicEvents.ts:72

Seconds: when this beat is heard, Audio.time's base.

Clone this wiki locally