Interface SongContextFactory


public interface SongContextFactory
Create SongContext instances.

  • Method Details

    • getDefault

      static SongContextFactory getDefault()
    • of

      SongContext of(Song song, MidiMix midiMix)
      Create a SongContext for the whole song.

      Loop restart bar is set to 0.

      Parameters:
      song -
      midiMix -
      Returns:
    • of

      SongContext of(Song s, MidiMix mm, IntRange barRange)
      Create a SongContext for a whole or part of the song.

      Loop restart bar is set to barRange.from.

      Parameters:
      s -
      mm -
      barRange - If null uses the whole song bar range. Must be within Song bar range.
      Returns:
    • of

      SongContext of(Song s, MidiMix mm, IntRange barRange, int loopRestartBar)
      Create a SongContext for a whole or part of the song, with the specified loop restart bar.

      Parameters:
      s -
      mm -
      barRange - If null uses the whole song bar range. Must be within Song bar range.
      loopRestartBar - Must be within barRange
      Returns:
    • of

      SongContext of(SongContext sgContext, IntRange newBarRange)
      Create a copy using a part of the song.

      If sgContext.getLoopRestartBar() is outside of newBarRange, returned value will use newBarRange.from as LoopRestartBar.

      Parameters:
      sgContext -
      newBarRange -
      Returns:
    • of

      Create a SongPartContext for one SongPart.

      Loop restart bar is set to spt.getBarRange().from.

      Parameters:
      s -
      mm -
      spt -
      Returns:
    • of

      SongPartContext of(Song s, MidiMix mix, SongPart spt, IntRange barRange)
      Create a SongPartContext for a part of the SongPart. Loop restart bar is set to barRange.from.
      Parameters:
      s -
      mix -
      spt -
      barRange - Must be within spt barRange
      Returns: