Module Musician.Comm

Communication module

Functions

Musician.Comm.BroadcastCommMessage (message, type[, groupType]) Broadcast communication message using appropriate channels
Musician.Comm.CanBroadcast () Return true if the player can broadcast via the channel or the group chat
Musician.Comm.CanPlay () Return true if the player can play music
Musician.Comm.ChannelIsReady () Return true if the communication channel is ready
Musician.Comm.GetChannel () Return the communication channel ID
Musician.Comm.GetCurrentSongCrc32 () Return current song CRC32
Musician.Comm.GetGroupChatType () Return communication chat type for group
Musician.Comm.GetReadyBandPlayers () Return the list of ready band players for the current source song
Musician.Comm.Init () Initialize communication
Musician.Comm.IsBandPlayReady () Indicate if the player is ready for band play
Musician.Comm.IsSongPlaying () Indicate if the player song is playing
Musician.Comm.JoinChannel () Join the communication channel and keep it joined
Musician.Comm.OnBandPlay (prefix, message, distribution, sender) OnBandPlay
Musician.Comm.OnBandPlayReady (prefix, message, distribution, sender) Receive band ready or not ready message
Musician.Comm.OnBandReadyQuery (prefix, message, distribution, sender) OnBandReadyQuery
Musician.Comm.OnBandStop (prefix, message, distribution, sender) OnBandStop
Musician.Comm.OnChunk (prefix, message, distribution, sender) Receive compressed chunk
Musician.Comm.OnDead () OnDead Stop music when dead
Musician.Comm.OnGroupJoined () OnGroupJoined
Musician.Comm.OnGroupLeft () OnGroupLeft
Musician.Comm.OnRosterUpdate (event) OnRosterUpdate
Musician.Comm.OnSongLoaded () OnSongLoaded
Musician.Comm.OnSongPlay (event, song) OnSongPlay
Musician.Comm.OnSongStop (event, song) OnSongStop
Musician.Comm.OnStopSong (prefix, message, distribution, sender) Stop a song
Musician.Comm.PlaySong () Play song
Musician.Comm.PlaySongBand () Play song as a band
Musician.Comm.ProcessChunk (packedChunk, sender) Process a packed chunk
Musician.Comm.QueryBandReady () QueryBandReady
Musician.Comm.SetBandPlayReady (isReady) Set band play ready
Musician.Comm.StopSong () Stop song
Musician.Comm.StopSongBand () Stop song as a band
Musician.Comm.StreamCompressedSongChunk (compressedChunk) Stream a compressed song chunk
Musician.Comm.StreamSongChunk (packedChunk) Stream a packed song chunk
Musician.Comm.ToggleBandPlayReady () Toggle band play ready
Musician.Comm.TogglePlaySong () Toggle play song
Musician.Comm.UpdateCurrentSongCrc32 (songCrc32) Update current song CRC32


Functions

Musician.Comm.BroadcastCommMessage (message, type[, groupType])
Broadcast communication message using appropriate channels

Parameters:

  • message (string)
  • type (string)
  • groupType (string) (optional)
Musician.Comm.CanBroadcast ()
Return true if the player can broadcast via the channel or the group chat

Returns:

    canBroadcast (boolean)
Musician.Comm.CanPlay ()
Return true if the player can play music

Returns:

    canPlay (boolean)
Musician.Comm.ChannelIsReady ()
Return true if the communication channel is ready

Returns:

    isReady (boolean)
Musician.Comm.GetChannel ()
Return the communication channel ID

Returns:

    channelId (string)
Musician.Comm.GetCurrentSongCrc32 ()
Return current song CRC32

Returns:

    songCrc32 (number)
Musician.Comm.GetGroupChatType ()
Return communication chat type for group

Returns:

    chatType (string)
Musician.Comm.GetReadyBandPlayers ()
Return the list of ready band players for the current source song

Returns:

    readyPlayers (table)
Musician.Comm.Init ()
Initialize communication
Musician.Comm.IsBandPlayReady ()
Indicate if the player is ready for band play

Returns:

    isBandPlayReady (boolean)
Musician.Comm.IsSongPlaying ()
Indicate if the player song is playing

Returns:

    isSongPlaying (boolean)
Musician.Comm.JoinChannel ()
Join the communication channel and keep it joined
Musician.Comm.OnBandPlay (prefix, message, distribution, sender)
OnBandPlay

Parameters:

  • prefix
  • message
  • distribution
  • sender
Musician.Comm.OnBandPlayReady (prefix, message, distribution, sender)
Receive band ready or not ready message

Parameters:

  • prefix
  • message
  • distribution
  • sender
Musician.Comm.OnBandReadyQuery (prefix, message, distribution, sender)
OnBandReadyQuery

Parameters:

  • prefix
  • message
  • distribution
  • sender
Musician.Comm.OnBandStop (prefix, message, distribution, sender)
OnBandStop

Parameters:

  • prefix
  • message
  • distribution
  • sender
Musician.Comm.OnChunk (prefix, message, distribution, sender)
Receive compressed chunk

Parameters:

  • prefix
  • message
  • distribution
  • sender
Musician.Comm.OnDead ()
OnDead Stop music when dead
Musician.Comm.OnGroupJoined ()
OnGroupJoined
Musician.Comm.OnGroupLeft ()
OnGroupLeft
Musician.Comm.OnRosterUpdate (event)
OnRosterUpdate

Parameters:

  • event Remove players from readyBandPlayers who are no longer in the group
Musician.Comm.OnSongLoaded ()
OnSongLoaded
Musician.Comm.OnSongPlay (event, song)
OnSongPlay

Parameters:

  • event
  • song
Musician.Comm.OnSongStop (event, song)
OnSongStop

Parameters:

  • event
  • song
Musician.Comm.OnStopSong (prefix, message, distribution, sender)
Stop a song

Parameters:

  • prefix
  • message
  • distribution
  • sender
Musician.Comm.PlaySong ()
Play song

Returns:

    success (boolean)
Musician.Comm.PlaySongBand ()
Play song as a band

Returns:

    success (boolean)
Musician.Comm.ProcessChunk (packedChunk, sender)
Process a packed chunk

Parameters:

  • packedChunk (string)
  • sender (string)
Musician.Comm.QueryBandReady ()
QueryBandReady
Musician.Comm.SetBandPlayReady (isReady)
Set band play ready

Parameters:

  • isReady (boolean)

Returns:

    success (boolean)
Musician.Comm.StopSong ()
Stop song

Returns:

    success (boolean)
Musician.Comm.StopSongBand ()
Stop song as a band

Returns:

    success (boolean)
Musician.Comm.StreamCompressedSongChunk (compressedChunk)
Stream a compressed song chunk

Parameters:

  • compressedChunk (string)

Returns:

    success (boolean)
Musician.Comm.StreamSongChunk (packedChunk)
Stream a packed song chunk

Parameters:

  • packedChunk (string)
Musician.Comm.ToggleBandPlayReady ()
Toggle band play ready
Musician.Comm.TogglePlaySong ()
Toggle play song
Musician.Comm.UpdateCurrentSongCrc32 (songCrc32)
Update current song CRC32

Parameters:

  • songCrc32 (number)
generated by LDoc 1.4.6 Last updated 2020-08-09 19:40:05