Skip to content

API Events

LenweSaralonde edited this page Jun 11, 2023 · 10 revisions

Musician.Events.Frame

Fired at every screen refresh. OnUpdate functions can be attached to this event without needing to create a new frame.

Arguments

  • elapsed (number) Time in seconds since last frame

Musician.Events.RegistryReady

Fired when the player registry is ready to use.

Musician.Events.CommChannelUpdate

Fired when the status of the communication channel has changed

Arguments

  • isConnected (boolean) True when connected to the channel

Musician.Events.CommSendAction

Fired when a communication action has been initiated

Arguments

  • action (string) Action name, from Musician.Comm.action

Musician.Events.CommSendActionComplete

Fired when a communication action has been completed

Arguments

  • action (string) Action name, from Musician.Comm.action

Musician.Events.SongPlay

Fired when a song starts playing

Arguments

  • song (Musician.Song)

Musician.Events.SongStop

Fired when a song stops playing

Arguments

  • song (Musician.Song)

Musician.Events.GlobalMute

Fired when the global mute state has changed

Arguments

  • isMuted (boolean)

Musician.Events.SongChunk

Fired when a song chunk has been received

Arguments

  • sender (string) Player name
  • mode (number) Song mode (Musician.Song.MODE_DURATION or Musician.Song.MODE_LIVE)
  • songId (number)
  • chunkDuration (number) in seconds
  • playtimeLeft (number) in seconds
  • posY (number) Player world position Y
  • posX (number) Player world position X
  • posZ (number) Player world position Z
  • instanceID (number) Player instance ID
  • guid (string) Player GUID

Musician.Events.StreamStart

Fired when a song starts streaming

Arguments

  • song (Musician.Song)

Musician.Events.StreamStop

Fired when a song stops streaming

Arguments

  • song (Musician.Song)

Musician.Events.SongCursor

Fired when the song cursor position has changed

Arguments

  • song (Musician.Song)

Musician.Events.SongInstrumentChange

Fired when the instrument of a song track has changed

Arguments

  • song (Musician.Song)
  • track (table) Track object of the song
  • midiId (number) MIDI id of the instrument

Musician.Events.SongTransposeChange

Fired when the transposition of a song track has changed

Arguments

  • song (Musician.Song)
  • track (table) Track object of the song
  • semitones (number) Transposition level, in semitones

Musician.Events.SongMutedChange

Fired when the muted flag of a song track has changed

Arguments

  • song (Musician.Song)
  • track (table) Track object of the song
  • isMuted (boolean) Muted flag

Musician.Events.SongSoloChange

Fired when the solo flag of a song track has changed

Arguments

  • song (Musician.Song)
  • track (table) Track object of the song
  • isSolo (boolean) Solo flag

Musician.Events.SongAudibleChange

Fired when the audible flag of a song track has changed

Arguments

  • song (Musician.Song)
  • track (table) Track object of the song
  • isAudible (boolean) Audible flag

Musician.Events.SongAccentChange

Fired when the accent flag of a song track has changed

Arguments

  • song (Musician.Song)
  • track (table) Track object of the song
  • isAccent (boolean) Accent flag

Musician.Events.SongCropFromChange

Fired when the song crop from point has changed

Arguments

  • song (Musician.Song)
  • cropFrom (number) Crop from point

Musician.Events.SongCropToChange

Fired when the song crop to point has changed

Arguments

  • song (Musician.Song)
  • cropTo (number) Crop to point

Musician.Events.NoteOn

Fired when a song note starts playing and is audible

Arguments

  • song (Musician.Song)
  • track (table) Track object of the song
  • key (number) MIDI key of the note

Musician.Events.NoteOff

Fired when a song note stops playing

Arguments

  • song (Musician.Song)
  • track (table) Track object of the song
  • key (number) MIDI key of the note

Musician.Events.VisualNoteOn

Fired when a song note starts playing, even when it's not audible (track muted, note dropped due to low polyphony etc.)

Used for visual feedback

Arguments

  • song (Musician.Song)
  • track (table) Track object of the song
  • key (number) MIDI key of the note
  • play (boolean) true when the note is audible

Musician.Events.VisualNoteOff

Fired when a song note stops playing, even when it was not audible (track muted, note dropped due to low polyphony etc.)

Used for visual feedback

Arguments

  • song (Musician.Song)
  • track (table) Track object of the song
  • key (number) MIDI key of the note

Musician.Events.LiveNoteOn

Fired when a live note on event is being sent in live mode

Arguments

  • key (number) MIDI key of the note
  • layer (number) Keyboard layer from Musician.KEYBOARD_LAYER
  • instrumentData (table) Instrument data from Musician.INSTRUMENTS
  • isChordNote (boolean) true when note is a power chord
  • source (table) UI component triggering the note

Musician.Events.LiveNoteOff

Fired when a live note off event is being sent in live mode

Arguments

  • key (number) MIDI key of the note
  • layer (number) Keyboard layer from Musician.KEYBOARD_LAYER
  • isChordNote (boolean) true when note is a power chord
  • source (table) UI component triggering the note

Musician.Events.LiveModeChange

Fired when the live mode state is changed, by user's action or any other event that affects the live mode.

Musician.Events.NoteDropped

Fired when one or more note have been dropped due to a lack of polyphony during one frame while playing

Arguments

  • song (Musician.Song)
  • totalDrops (number) Total dropped notes since the song has been created
  • drops (number) Number of notes dropped during the same frame

Musician.Events.PreloadingProgress

Fired when the preloading process is making progress

Arguments

  • progress (number) Progression between 0 and 1

Musician.Events.PreloadingComplete

Fired when the preloading process is complete and all samples are now in disk cache

Musician.Events.QuickPreloadingComplete

Fired when the quick preloading process is complete and the loading screen has been dismissed

Musician.Events.SongImportStart

Fired when the song importing process is starting

Arguments

  • song (Musician.Song)

Musician.Events.SongImportProgress

Fired when the song importing process is making progress

Arguments

  • song (Musician.Song)
  • progress (number) Progression between 0 and 1

Musician.Events.SongImportComplete

Fired when the song importing process is complete, regardless if it failed or not

Arguments

  • song (Musician.Song)

Musician.Events.SongImportSuccessful

Fired when the song importing process is complete successfully

Arguments

  • song (Musician.Song)

Musician.Events.SongImportFailed

Fired when the song importing process failed

Arguments

  • song (Musician.Song)

Musician.Events.SongExportStart

Fired when the song exporting process is starting

Arguments

  • song (Musician.Song)

Musician.Events.SongExportProgress

Fired when the song exporting process is making progress

Arguments

  • song (Musician.Song)
  • progress (number) Progression between 0 and 1

Musician.Events.SongExportComplete

Fired when the song exporting process is complete, regardless if it failed or not

Arguments

  • song (Musician.Song)

Musician.Events.SourceSongLoaded

Fired when the source song Musician.sourceSong has been successfully loaded

Arguments

  • song (Musician.Song)

Musician.Events.PromoEmote

Fired when a "promo" emote has been received and filtered in the chat

Arguments

  • isPromoEmoteSuccessful (boolean) true if the music can be heard
  • msg (string)
  • fullPlayerName (string)
  • ... (string) Other arguments provided by ChatFrame_AddMessageEventFilter() (languageName, channelName...)

Musician.Events.Bandwidth

Fired when bandwidth limit indicator has changed while streaming a song

Arguments

  • bandwidth (number) Equals to 0 when < Musician.BANDWIDTH_LIMIT_MIN and > 1 when exceeding Musician.BANDWIDTH_LIMIT_MAX

Musician.Events.BandPlay

Fired when a player of the party or raid starts playing a song as a band

Arguments

  • sender (string) Player name
  • songCrc32 (number) The song CRC32 that will play

Musician.Events.BandStop

Fired when a player of the party or raid stops playing a song as a band

Arguments

  • sender (string) Player name
  • songCrc32 (number) The song CRC32 that will be stopped

Musician.Events.BandPlayReady

Fired when a player of the party or raid is ready (or no longer ready) for band play

Arguments

  • player (string) Player name
  • songCrc32 (number) The song CRC32 the player has loaded
  • isReady (boolean) Player is ready when true
  • eventPrefix (string) Message prefix from Musician.Comm.event

Musician.Events.BandReadyPlayersUpdated

Fired every time the list of players ready for band play should be updated

Musician.Events.LiveBandSync

Fired when a player of the party or raid is synchronized (or no longer synchronized) for band play in live mode

Arguments

  • player (string) Player name
  • isSynced (boolean)

Musician.Events.SongReceiveStart

Fired when the song reception process is starting

Arguments

  • sender (string)
  • context (table) Reference to the module that initiated the song request. (optional)

Musician.Events.SongReceiveProgress

Fired when the song reception process is making progress

Arguments

  • sender (string)
  • progress (number) Progression between 0 and 1
  • context (table) Reference to the module that initiated the song request. (optional)

Musician.Events.SongReceiveComplete

Fired when the song reception process is complete, regardless if it failed or not

Arguments

  • sender (string)
  • context (table) Reference to the module that initiated the song request. (optional)

Musician.Events.SongReceiveCanceled

Fired when the song reception process has been canceled

Arguments

  • sender (string)
  • context (table) Reference to the module that initiated the song request. (optional)

Musician.Events.SongReceiveSuccessful

Fired when the song reception process is complete successfully

Arguments

  • sender (string)
  • songData (string)
  • song (Musician.Song) (optional)
  • context (table) Reference to the module that initiated the song request. (optional)

Musician.Events.SongReceiveFailed

Fired when the song reception process failed

Arguments

  • sender (string)
  • reason (string)
  • title (string)
  • context (table) Reference to the module that initiated the song request. (optional)

Musician.Events.SongLink

Fired when the user clicks on a song link

Arguments

  • title (string)
  • playerName (string)
Clone this wiki locally