Skip to content

API documentation

LenweSaralonde edited this page Feb 9, 2020 · 25 revisions

Functions

Main

Musician.ImportSource

Import song from encoded string. Triggers SongImport* events

Musician.ImportSource(str)

Arguments

  • str (string)

Musician.MutePlayer

Mute or unmute a player

Musician.MutePlayer(playerName, isMuted)

Arguments

  • playerName (string)
  • isMuted (boolean)

Musician.PlayerIsMuted

Return true if the player is muted

isMuted = Musician.PlayerIsMuted(playerName)

Arguments

  • playerName (string)

Returns

  • isMuted (boolean)

Communication

Musician.Comm.CanBroadcast

Return true if the player can broadcast via the channel or the group chat

canBroadcast = Musician.Comm.CanBroadcast()

Returns

  • canBroadcast (boolean)

Musician.Comm.CanPlay

Return true if the player can play music

canPlay = Musician.Comm.CanPlay()

Returns

  • canPlay (boolean)

Musician.Comm.PlaySong

Play song

success = Musician.Comm.PlaySong()

Returns

  • success (boolean)

Musician.Comm.StopSong

Stop song

success = Musician.Comm.StopSong()

Returns

  • success (boolean)

Musician.Comm.TogglePlaySong

Toggle play song

Musician.Comm.TogglePlaySong()

Musician.Comm.GetCurrentSongCrc32

Return current song CRC32

songCrc32 = Musician.Comm.GetCurrentSongCrc32()

Returns

  • songCrc32 (number)

Musician.Comm.SetBandPlayReady

Set band play ready

success = Musician.Comm.SetBandPlayReady(isReady)

Arguments

  • isReady (boolean)

Returns

  • success (boolean)

Musician.Comm.QueryBandReady

QueryBandReady

Musician.Comm.QueryBandReady()

Musician.Comm.IsBandPlayReady

Indicates if the player is ready for band play

isBandPlayReady = Musician.Comm.IsBandPlayReady()

Returns

  • isBandPlayReady (boolean)

Musician.Comm.PlaySongBand

Play song as a band

success = Musician.Comm.PlaySongBand()

Returns

  • success (boolean)

Musician.Comm.StopSongBand

Stop song as a band

success = Musician.Comm.StopSongBand()

Returns

  • success (boolean)

Registry

Musician.Registry.PlayerIsInLoadingRange

Return true if the player is in loading range

isInLoadingRange = Musician.Registry.PlayerIsInLoadingRange(player)

Arguments

  • player (string)

Returns

  • isInLoadingRange (boolean)

Musician.Registry.PlayerIsInRange

Return true if the player is in listening range

isInRange = Musician.Registry.PlayerIsInRange(player)

Arguments

  • player (string)

Returns

  • isInRange (boolean)

Musician.Registry.GetPlayerGUID

Return player GUID

guid = Musician.Registry.GetPlayerGUID(player)

Arguments

  • player (string)

Returns

  • guid (string)

Musician.Registry.SendHello

Send a Hello to the channel

Musician.Registry.SendHello()

Musician.Registry.PlayerIsRegistered

Return true if this player has Musician

isRegistered = Musician.Registry.PlayerIsRegistered(player)

Arguments

  • player (string)

Returns

  • isRegistered (boolean)

Musician.Registry.PlayerIsRegisteredWithVersion

Return true if this player has Musician with version number

isRegisteredWithVersion = Musician.Registry.PlayerIsRegisteredWithVersion(player)

Arguments

  • player (string)

Returns

  • isRegisteredWithVersion (boolean)

Live

Musician.Live.Enable

Enable or disable live mode

Musician.Live.Enable(enabled)

Arguments

  • enabled (boolean)

Musician.Live.IsEnabled

Indicate whenever the live mode is enabled stream

isLiveEnabled = Musician.Live.IsEnabled()

Returns

  • isLiveEnabled (boolean)

Musician.Live.IsPlayingLive

Indicate whenever the player is playing live, regardless if in solo or live mode

isPlayingLive = Musician.Live.IsPlayingLive()

Returns

  • isPlayingLive (boolean)

Musician.Live.CanStream

Indicate whenever the live mode can stream

canStream = Musician.Live.CanStream()

Returns

  • canStream (boolean)

Musician.Live.NoteOn

Send note on

Musician.Live.NoteOn(key, layer, instrument, isChordNote)

Arguments

  • key (int) MIDI key index
  • layer (int)
  • instrument (int)
  • isChordNote (boolean)

Musician.Live.NoteOff

Send note off

Musician.Live.NoteOff(key, layer, instrument, isChordNote)

Arguments

  • key (int) MIDI key index
  • layer (int)
  • instrument (int)
  • isChordNote (boolean)

Musician.Live.AllNotesOff

Set all notes to off

Musician.Live.AllNotesOff(onlyForLayer)

Arguments

  • onlyForLayer (int)

Musician.Live.InsertNote

Send note

Musician.Live.InsertNote(noteOn, key, layer, instrument)

Arguments

  • noteOn (boolean) Note on/off
  • key (int) MIDI key index
  • layer (int)
  • instrument (int)

Musician.Live.IsBandSyncMode

Indicate if the player in band sync mode

isBandSyncMode = Musician.Live.IsBandSyncMode()

Returns

  • isBandSyncMode (boolean)

Musician.Live.SetBandSyncMode

Set band sync mode

success = Musician.Live.SetBandSyncMode(enabled)

Arguments

  • enabled (boolean)

Returns

  • success (boolean)

Musician.Live.ToggleBandSyncMode

Set sync mode

Musician.Live.ToggleBandSyncMode(enabled)

Arguments

  • enabled (boolean)

Musician.Live.IsPlayerSynced

Indicate if the provided player is in band sync mode

isPlayerSynced = Musician.Live.IsPlayerSynced(player)

Arguments

  • player (string)

Returns

  • isPlayerSynced (boolean)

Musician.Live.BandNote

Send note event in band mode

Musician.Live.BandNote(noteOn, key, layer, instrument)

Arguments

  • noteOn (boolean)
  • key (int) MIDI key index
  • layer (int)
  • instrument (int)

Utility functions

Musician.Utils.Print

Display a message in the console

Musician.Utils.Print(msg)

Arguments

  • msg (string)

Musician.Utils.Debug

Print debug stuff in the console

Musician.Utils.Debug(module, ...)

Arguments

  • module (string)
  • ... (string)

Musician.Utils.PlaySoundFile

Safely play a sound file, even if the sound file does not exist.

willPlay, soundHandle = Musician.Utils.PlaySoundFile(soundFile, channel)

Arguments

  • soundFile (string)
  • channel (string)

Returns

  • willPlay (boolean)
  • soundHandle (int)

Musician.Utils.PrintError

Display an error message in the console

Musician.Utils.PrintError(msg)

Arguments

  • msg (string)

Musician.Utils.Error

Display an error message in a popup

Musician.Utils.Error(msg)

Arguments

  • msg (string)

Musician.Utils.Popup

Display a message in a popup

Musician.Utils.Popup(msg, callback, force)

Arguments

  • msg (string)
  • callback (function)
  • force (boolean)

Musician.Utils.Highlight

Highlight text

highlightedText = Musician.Utils.Highlight(text, color)

Arguments

  • text (string)
  • color (string|Color)

Returns

  • highlightedText (string)

Musician.Utils.GetColorCode

Get color code from RGB values

colorCode = Musician.Utils.GetColorCode(r, g, b)

Arguments

  • r (number) 0-1
  • g (number) 0-1
  • b (number) 0-1

Returns

  • colorCode (string)

Musician.Utils.FormatText

Format text, adding highlights etc.

formattedText = Musician.Utils.FormatText(text)

Arguments

  • text (string)

Returns

  • formattedText (string)

Musician.Utils.GetLink

Get hyperlink

link = Musician.Utils.GetLink(command, text, ...)

Arguments

  • command (string)
  • text (string)
  • ... (string)

Returns

  • link (string)

Musician.Utils.GetPlayerLink

Get player hyperlink

playerLink = Musician.Utils.GetPlayerLink(player)

Arguments

  • player (string)

Returns

  • playerLink (string)

Musician.Utils.FormatPlayerName

Get player name for display

formattedPlayerName = Musician.Utils.FormatPlayerName(player)

Arguments

  • player (string)

Returns

  • formattedPlayerName (string)

Musician.Utils.GetChatIcon

Return the code to insert an icon in a chat message or a text string

chatIcon = Musician.Utils.GetChatIcon(path, r, g, b)

Arguments

  • path (string)
  • r (number) 0-1 (optional)
  • g (number) 0-1 (optional)
  • b (number) 0-1 (optional)

Returns

  • chatIcon (string)

Musician.Utils.DisplayEmote

Display a faked emote

Musician.Utils.DisplayEmote(player, playerGUID, message)

Arguments

  • player (string)
  • playerGUID (string)
  • message (string)

Musician.Utils.RemoveChatMessage

Remove a chat message by its line ID

Musician.Utils.RemoveChatMessage(lineID)

Arguments

  • lineID (int)

Musician.Utils.NoteName

Return the note name corresponding its MIDI key

name = Musician.Utils.NoteName(key)

Arguments

  • key (int) MIDI key index

Returns

  • name (string) from Musician.NOTE_NAMES

Musician.Utils.NoteKey

Return the MIDI key of the note name

key = Musician.Utils.NoteKey(noteName)

Arguments

  • noteName (string) from Musician.NOTE_NAMES

Returns

  • key (int)

Musician.Utils.ReadBytes

Read some bytes from a string and remove them

data, str = Musician.Utils.ReadBytes(str, bytes)

Arguments

  • str (string)
  • bytes (int)

Returns

  • data (string) read bytes
  • str (string) new string

Musician.Utils.PackNumber

Pack an integer number into a string

data = Musician.Utils.PackNumber(num, bytes)

Arguments

  • num (int) integer to pack
  • bytes (int) number of bytes

Returns

  • data (string)

Musician.Utils.UnpackNumber

Unpack a string into an integer number

num = Musician.Utils.UnpackNumber(data)

Arguments

  • data (string)

Returns

  • num (int)

Musician.Utils.Base64Decode

Decode base 64 string

Lua 5.1+ base64 v3.0 (c) 2009 by Alex Kloss alexthkloss@web.de

licensed under the terms of the LGPL2

http://lua-users.org/wiki/BaseSixtyFour

str = Musician.Utils.Base64Decode(data)

Arguments

  • data (string)

Returns

  • str (string)

Musician.Utils.PackTime

Pack a time or duration in seconds into a string

data = Musician.Utils.PackTime(seconds, bytes, fps)

Arguments

  • seconds (float)
  • bytes (int) Number of bytes
  • fps (float) Precision in frames par second

Returns

  • data (string)

Musician.Utils.UnpackTime

Unpack a string into a time or duration in seconds

seconds = Musician.Utils.UnpackTime(data, fps)

Arguments

  • data (string)
  • fps (float) Precision in frames par second

Returns

  • seconds (float)

Musician.Utils.PackPlayerGuid

Pack player GUID into a 6-byte string

data = Musician.Utils.PackPlayerGuid()

Returns

  • data (string)

Musician.Utils.UnpackPlayerGuid

Unpack player GUID from string

guid = Musician.Utils.UnpackPlayerGuid(data)

Arguments

  • data (string)

Returns

  • guid (string)

Musician.Utils.PackPlayerPosition

Pack player position into a 18-byte chunk string

data = Musician.Utils.PackPlayerPosition()

Returns

  • data (string)

Musician.Utils.UnpackPlayerPosition

Unpack player position from chunk string

posY, posX, posZ, instanceID, guid = Musician.Utils.UnpackPlayerPosition(str)

Arguments

  • str (string)

Returns

  • posY (number)
  • posX (number)
  • posZ (number)
  • instanceID (int)
  • guid (string)

Musician.Utils.FromHex

Convert hex string to string

str = Musician.Utils.FromHex(hex)

Arguments

  • hex (string)

Returns

  • str (string)

Musician.Utils.ToHex

Convert string to hex string

hex = Musician.Utils.ToHex(str)

Arguments

  • str (string)

Returns

  • hex (string)

Musician.Utils.GetInstrumentName

Return instrument name from its MIDI ID

instrumentName = Musician.Utils.GetInstrumentName(instrument, key)

Arguments

  • instrument (int)
  • key (int)

Returns

  • instrumentName (string) used as key in Musician.INSTRUMENTS

Musician.Utils.GetSoundFile

Get the path to a sound file for an instrument and a key.

Also returns the instrument data from Musician.INSTRUMENTS

and all other suitable sound file paths for randomization.

filePath, instrumentData, soundFiles = Musician.Utils.GetSoundFile(instrument, key)

Arguments

  • instrument (int) MIDI instrument index
  • key (int) MIDI key

Returns

  • filePath (string) file path to be played
  • instrumentData (table) from Musician.INSTRUMENTS
  • soundFiles (table) all suitable file paths for this instrument and note

Musician.Utils.SongIsPlaying

Return true if a song is actually playing and is audible

isPlaying = Musician.Utils.SongIsPlaying()

Returns

  • isPlaying (boolean)

Musician.Utils.MuteGameMusic

Start or stop the actual game music if a song can actually be heard

Musician.Utils.MuteGameMusic(force)

Arguments

  • force (boolean)

Musician.Utils.GetNormalizedRealmName

Return the normalized realm name the player belongs to

Safer than the standard GetNormalizedRealmName() that may return nil sometimes

realmName = Musician.Utils.GetNormalizedRealmName()

Returns

  • realmName (string)

Musician.Utils.GetRealmLocale

Return the short locale code of the realm the player belongs to

locale = Musician.Utils.GetRealmLocale()

Returns

  • locale (string) 'en', 'fr' etc.

Musician.Utils.NormalizePlayerName

Return the normalized player name, including realm slug

normalizedPlayerName = Musician.Utils.NormalizePlayerName(playerName)

Arguments

  • playerName (string)

Returns

  • normalizedPlayerName (string)

Musician.Utils.SimplePlayerName

Return the simple player name, including the realm slug if needed

simpleName = Musician.Utils.SimplePlayerName(playerName)

Arguments

  • playerName (string)

Returns

  • simpleName (string)

Musician.Utils.PlayerRealm

Return the player realm slug

realmSlug = Musician.Utils.PlayerRealm(playerName)

Arguments

  • playerName (string)

Returns

  • realmSlug (string)

Musician.Utils.PlayerIsInGroup

Return true if the player is in my party or raid

isInMyGroup = Musician.Utils.PlayerIsInGroup(playerName)

Arguments

  • playerName (string)

Returns

  • isInMyGroup (boolean)

Musician.Utils.PlayerIsMyself

Return true if the provided player name is myself

isMyself = Musician.Utils.PlayerIsMyself(playerName)

Arguments

  • playerName (string)

Returns

  • isMyself (boolean)

Musician.Utils.PlayerIsOnSameRealm

Return true if the provided player name is on the same realm or connected realm as me

isOnSameRealm = Musician.Utils.PlayerIsOnSameRealm(playerName)

Arguments

  • playerName (string)

Returns

  • isOnSameRealm (boolean)

Musician.Utils.PlayerGuidIsVisible

Return true if the player whose GUID is provided is visible (loaded) by the game client

isVisible = Musician.Utils.PlayerGuidIsVisible(guid)

Arguments

  • guid (string)

Returns

  • isVisible (boolean)

Musician.Utils.GetPromoEmote

Return the "Player is playing music" emote with promo message

promoEmote = Musician.Utils.GetPromoEmote()

Returns

  • promoEmote (string)

Musician.Utils.HasPromoEmote

Return true if the message contains the promo emote, in any language

hasPromoEmote, isFullPromoEmote = Musician.Utils.HasPromoEmote(message)

Arguments

  • message (string)

Returns

  • hasPromoEmote (boolean)
  • isFullPromoEmote (boolean) true if the emote contains the part invinting other players to install Musician

Musician.Utils.ResetFullPromoEmoteCooldown

Mark the full promo emote as recently seen

Musician.Utils.ResetFullPromoEmoteCooldown()

Musician.Utils.OverrideNextFullPromoEmote

Override the next full promo emote

Musician.Utils.OverrideNextFullPromoEmote()

Musician.Utils.SendPromoEmote

Send the "Player is playing music" emote with promo message

Musician.Utils.SendPromoEmote()

Musician.Utils.GetVersionText

Return the current version as text for the end user

version = Musician.Utils.GetVersionText()

Returns

  • version (string)

Musician.Utils.VersionCompare

Compare two version numbers

difference = Musician.Utils.VersionCompare(versionA, versionB)

Arguments

  • versionA (string)
  • versionB (string)

Returns

  • difference (number) 0 if A = B, 1 if A > B, -1 if A < B

Musician.Utils.PaddingZeros

Add padding zeros

formattedNumber = Musician.Utils.PaddingZeros(number, zeros)

Arguments

  • number (int)
  • zeros (int)

Returns

  • formattedNumber (string)

Musician.Utils.FormatTime

Format time to mm:ss.ss format

formattedTime = Musician.Utils.FormatTime(time, simple)

Arguments

  • time (number)
  • simple (boolean)

Returns

  • formattedTime (string)

Musician.Utils.ParseTime

Parse time in seconds from mm:ss.ss format

seconds = Musician.Utils.ParseTime(timestamp)

Arguments

  • timestamp (string)

Returns

  • seconds (number)

Musician.Utils.GetInstrumentData

Return instrument data for given MIDI key number

instrumentData = Musician.Utils.GetInstrumentData(instrumentName, key)

Arguments

  • instrumentName (string)
  • key (int) MIDI key number

Returns

  • instrumentData (table) from Musician.INSTRUMENTS

Musician.Utils.GetSampleId

Return sample ID for note and instrument data

sampleId = Musician.Utils.GetSampleId(instrumentData, key)

Arguments

  • instrumentData (table) as returned by Musician.Utils.GetSoundFile()
  • key (int) MIDI key number

Returns

  • sampleId (string)

Musician.Utils.PlayNote

Start playing a note

Returns true if sound will actually be played, sound handle and instrument data

willPlay, soundHandle, instrumentData = Musician.Utils.PlayNote(instrument, key)

Arguments

  • instrument (int) MIDI instrument
  • key (int)

Returns

  • willPlay (boolean)
  • soundHandle (int)
  • instrumentData (table) from Musician.INSTRUMENTS

Musician.Utils.PreloadNote

Preload note

hasSample, preloadTime = Musician.Utils.PreloadNote(instrument, key)

Arguments

  • instrument (int)
  • key (int)

Returns

  • hasSample (boolean)
  • preloadTime (number) in seconds

Musician.Utils.DeepCopy

Deep copy a table

http://lua-users.org/wiki/CopyTable

copy = Musician.Utils.DeepCopy(orig)

Arguments

  • orig (table)

Returns

  • copy (table)

Musician.Utils.DeepMerge

Deep merge two tables

merged = Musician.Utils.DeepMerge(merged, orig)

Arguments

  • merged (table)
  • orig (table)

Returns

  • merged (table)

Musician.Utils.FlipTable

Flip a table

flipped = Musician.Utils.FlipTable(orig)

Arguments

  • orig (table)

Returns

  • flipped (table)

Musician.Utils.GetOs

Return operating system name

os = Musician.Utils.GetOs()

Returns

  • os (string)

Musician.Utils.EasyMenu

Blizzard's EasyMenu using MSA_DropDownMenu

Musician.Utils.EasyMenu()

Musician.Utils.EasyMenu_Initialize

Blizzard's EasyMenu_Initialize using MSA_DropDownMenu

Musician.Utils.EasyMenu_Initialize()

Musician.Utils.SetFontStringTextFixedSize

Set text to a FontString element ensuring the visual text size is respected

Musician.Utils.SetFontStringTextFixedSize(fontString, text)

Arguments

  • fontString (FontString)
  • text (string)

Classes

Musician.Song

Song class

The Musician.Song:OnUpdate member function of your song instance should be attached to a Musician.Events.Frame event in order to be able to play, stream and import.

Fields

  • id (int) Song ID, used for streaming
  • crc32 (int) CRC32 of imported song data
  • tracks (table) Song tracks, including instrument and notes
  • duration (float) Song duration in seconds
  • name (string) Song title
  • player (string) Player name, with realm slug
  • notified (boolean) True when the notification for the song playing has been displayed
  • playing (boolean) True when the song is playing
  • streaming (boolean) True when the song is streaming
  • importing (boolean) True when the song is being imported
  • chunkDuration (number) Duration of a streaming chunk, in seconds
  • mode (int) Song mode
  • cropFrom (number) Play song from this position
  • cropTo (number) Play song until this position
  • cursor (number) Cursor position, in seconds
  • soloTracks (int) Number of tracks in solo
  • polyphony (int) Current polyphony
  • drops (int) Dropped notes

Musician.Song.create

Musician.Song.create()

Musician.Song:OnUpdate

Main on frame update function

Musician.Song:OnUpdate(elapsed)

Arguments

  • elapsed (number)

Musician.Song:GetId

Return song ID

songId = Musician.Song:GetId()

Returns

  • songId (int)

Musician.Song:Import

Import song from a base 64 string

Musician.Song:Import(str, crop)

Arguments

  • str (string)
  • crop (boolean)

Musician.Song:Play

Play song

Musician.Song:Play(delay)

Arguments

  • delay (number) Delay in seconds to wait before playing the song

Musician.Song:Reset

Reset song to initial position

Musician.Song:Reset()

Musician.Song:Seek

Seek to position

Musician.Song:Seek(cursor)

Arguments

  • cursor (number)

Musician.Song:Resume

Resume a song playing

Musician.Song:Resume(eventSent)

Arguments

  • eventSent (boolean)

Musician.Song:Stop

Stop song

Musician.Song:Stop()

Musician.Song:IsPlaying

Return true if the song is playing or about to be played (preloading).

isPlaying = Musician.Song:IsPlaying()

Returns

  • isPlaying (boolean)

Musician.Song:GetProgression

Return playing progression

progression = Musician.Song:GetProgression()

Returns

  • progression (number)

Musician.Song:Stream

Stream song

Musician.Song:Stream()

Musician.Song:StopStreaming

Stop streaming song

Musician.Song:StopStreaming()

Musician.Song:Clone

Clone song

song = Musician.Song:Clone()

Returns

  • song (Musician.Song)

Musician.Song:SetTrackMuted

Mute or unmute track

Musician.Song:SetTrackMuted(track, isMuted)

Arguments

  • track (table)
  • isMuted (boolean)

Musician.Song:TrackIsMuted

Return true if the track is muted

isMuted = Musician.Song:TrackIsMuted(track)

Arguments

  • track (table)

Returns

  • isMuted (boolean)

Musician.Song:SetTrackSolo

Set/unset track solo

Musician.Song:SetTrackSolo(track, isSolo)

Arguments

  • track (table)
  • isSolo (boolean)

Musician.VolumeMeter

Events

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

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

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)

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

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