Skip to content

API Live

LenweSaralonde edited this page Jun 10, 2020 · 8 revisions

Live play module

Functions

Musician.Live.Init

Init live mode

Musician.Live.Init()

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

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

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, ignoreSustain)

Arguments

  • key (int) MIDI key index
  • layer (int)
  • instrument (int)
  • isChordNote (boolean)
  • ignoreSustain (boolean) Force note off even is sustain is enabled for this layer _(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.OnLiveNote

OnLiveNote

Musician.Live.OnLiveNote()

Clone this wiki locally