Skip to content

API Events

LenweSaralonde edited this page Aug 9, 2020 · 12 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.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 in the song editor

Arguments

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

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 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 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.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.SongImportSucessful

Fired when the song importing process is complete successfully

Arguments

  • song (Musician.Song)
  • data (string) Raw binary song data

Musician.Events.SongImportFailed

Fired when the song importing process failed

Arguments

  • song (Musician.Song)

Musician.Events.SourceSongLoaded

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

Arguments

  • song (Musician.Song)
  • data (string) Raw binary song data

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)

Clone this wiki locally