Skip to content

API Live

LenweSaralonde edited this page Mar 25, 2023 · 8 revisions

Live play module

Functions

Musician.Live.Init

Init live mode

Musician.Live.Init()

Musician.Live.EnableLive

Enable or disable live mode

Musician.Live.EnableLive(enabled)

Arguments

  • enabled (boolean)

Musician.Live.IsLiveEnabled

Indicate whenever the live mode is enabled

isLiveEnabled = Musician.Live.IsLiveEnabled()

Returns

  • isLiveEnabled (boolean)

Musician.Live.IsPlaying

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

isPlaying = Musician.Live.IsPlaying()

Returns

  • isPlaying (boolean)

Musician.Live.IsStreaming

Indicate whenever the player is streaming live music

isStreaming = Musician.Live.IsStreaming()

Returns

  • isStreaming (boolean)

Musician.Live.CanStream

Indicate whenever the live mode can stream

canStream = Musician.Live.CanStream()

Returns

  • canStream (boolean)

Musician.Live.CreateLiveSong

Create the live song for streaming, if needed

and assign it to Musician.streamingSong

Musician.Live.CreateLiveSong()

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

Set sustain state for the layer

Musician.Live.SetSustain(enable, layer)

Arguments

  • enable (boolean)
  • layer (int)

Musician.Live.NoteOn

Send note on

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

Arguments

  • key (int) MIDI key index
  • layer (int)
  • instrument (int)
  • isChordNote (boolean) (default=false)
  • source (table) UI component triggering the note (optional)

Musician.Live.NoteOff

Send note off

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

Arguments

  • key (int) MIDI key index
  • layer (int)
  • instrument (int)
  • isChordNote (boolean) (default=false)
  • sustainedNote (table) Stop this previously sustained note instead of the note on (default=false)

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)

Musician.Live.AllNotesOff

Set all notes to off

Musician.Live.AllNotesOff(onlyForLayer)

Arguments

  • onlyForLayer (int)

Musician.Live.IsBandSyncMode

Indicate if the player in band sync mode

isBandSyncMode = Musician.Live.IsBandSyncMode()

Returns

  • isBandSyncMode (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.GetSyncedBandPlayers

Return the list of synced band players

readyPlayers = Musician.Live.GetSyncedBandPlayers()

Returns

  • readyPlayers (table)

Musician.Live.ToggleBandSyncMode

Set sync mode

Musician.Live.ToggleBandSyncMode(enabled)

Arguments

  • enabled (boolean)

Musician.Live.SetBandSyncMode

Set band sync mode

success = Musician.Live.SetBandSyncMode(enabled)

Arguments

  • enabled (boolean)

Returns

  • success (boolean)

Musician.Live.OnBandSync

Receive band sync mode message

Musician.Live.OnBandSync()

Musician.Live.OnGroupJoined

OnGroupJoined

Musician.Live.OnGroupJoined()

Musician.Live.OnBandSyncQuery

OnBandSyncQuery

Musician.Live.OnBandSyncQuery()

Musician.Live.OnGroupLeft

OnGroupLeft

Musician.Live.OnGroupLeft()

Musician.Live.OnRosterUpdate

OnRosterUpdate

Musician.Live.OnRosterUpdate()

Musician.Live.OnSongStop

OnSongStop

Musician.Live.OnSongStop(event, song)

Arguments

  • event (string)
  • song (Musician.song)

Musician.Live.OnLiveNote

OnLiveNote

Musician.Live.OnLiveNote()