-
-
Notifications
You must be signed in to change notification settings - Fork 4
API Main
Main module
-
Functions
- Musician:OnInitialize
- Musician:OnEnable
- Musician.AddModule
- Musician.InitLocale
- Musician.ShowTrackEditor
- Musician.GetCommands
- Musician.Help
- Musician.RunCommandLine
- Musician.StopPlayerSong
- Musician.OnSongPlayed
- Musician.ImportSource
- Musician.OnSourceImportSuccessful
- Musician.OnSourceImportFailed
- Musician.OnUpdate
- Musician.MutePlayer
- Musician.PlayerIsMuted
- Musician.OnHyperlinkEnter
- Musician.OnHyperlinkLeave
- Musician.OnHyperlinkClick
- Musician.EnableHyperlinks
- Musician.GetPlayerMenuItems
- Musician.SetupHooks
- Musician.AddTipsAndTricks
- Musician.ShowTipsAndTricks
OnInitialize
Musician:OnInitialize()
OnEnable
Musician:OnEnable()
Add a module
Musician.AddModule(moduleName)
Arguments
- moduleName (string)
Initialize a locale and returns the initialized message table
msg = Musician.InitLocale(languageCode, languageName, localeCode, ...)
Arguments
- languageCode (string) Short language code (ie 'en')
- languageName (string) Locale name (ie "English")
- localeCode (string) Long locale code (ie 'enUS')
- ... (string) Additional locale codes (optional)
Returns
- msg (table) Initialized message table
Show the song editor
Musician.ShowTrackEditor()
Get command definitions
commands = Musician.GetCommands()
Returns
- commands (table)
Display command-line help
Musician.Help()
Run command line
Musician.RunCommandLine(commandLine)
Arguments
- commandLine (string)
Stop a song playing by a player
Musician.StopPlayerSong(playerName, remove)
Arguments
- playerName (string)
- remove (boolean)
Handle playing song
Musician.OnSongPlayed(event, song)
Arguments
- event (table)
- song (Musician.Song)
Import song from encoded string
Musician.ImportSource(str)
Arguments
- str (string)
Handle successful source import
Musician.OnSourceImportSuccessful(event, song)
Arguments
- event (string)
- song (Musician.Song)
Handle failed source import
Musician.OnSourceImportFailed()
Perform all on-frame actions
Musician.OnUpdate(frame, elapsed)
Arguments
- frame (Frame)
- elapsed (number)
Mute or unmute a player
Musician.MutePlayer(playerName, isMuted)
Arguments
- playerName (string)
- isMuted (boolean)
Return true if the player is muted
isMuted = Musician.PlayerIsMuted(playerName)
Arguments
- playerName (string)
Returns
- isMuted (boolean)
Hyperlink mouse enter handler
Musician.OnHyperlinkEnter()
Hyperlink mouse leave handler
Musician.OnHyperlinkLeave()
Hyperlink click handler
Musician.OnHyperlinkClick(self, link, text, button)
Arguments
- self (Frame)
- link (string)
- text (string)
- button (string)
Enable hyperlinks support on frame
Musician.EnableHyperlinks(self)
Arguments
- self (Frame)
Return menu entries for player menu
items = Musician.GetPlayerMenuItems(unit, chatTarget, name, server)
Arguments
- unit (string)
- chatTarget (string)
- name (string)
- server (string)
Returns
- items (table)
Setup hooks
Musician.SetupHooks()
Add a tips and tricks callback
Musician.AddTipsAndTricks(callback, priority)
Arguments
- callback (function)
- priority (boolean) If true, add the tip to the top of the list
Show the first tips and tricks
Musician.ShowTipsAndTricks(callback)
Arguments
- callback (function)
Table of contents
- User guide (FR)
- Optional modules
- What the FAQ
- Tips and Tricks
- Music producer guide
- Localization
- Technical design
- API documentation
Discord / MusicianList / Patreon / Donate