OpenSheetMusicDisplay
    Preparing search index...

    Class MusicPartManager

    Index
    • Returns the sheet timestamp of an enrolled timestamp. The enrolled timestamp is the time on the time line with the repetitions played out (like MusicPartManagerIterator.CurrentEnrolledTimestamp), the sheet timestamp the position in the sheet (like CurrentSourceTimestamp): in the second pass of a repeat, the sheet timestamp is earlier by the length of the first pass.

      Parameters

      • timestamp: Fraction

        An enrolled timestamp.

      Returns Fraction

    • Returns the transform for the part of the enrolled time line that an enrolled timestamp is in. A part starts at each jump of the playback, e.g. back to the start of a repeat or forward over an ending, and where a repetition starts. In the part, the sheet timestamp is the enrolled timestamp + (to - $from).

      Parameters

      • curEnrolledTimestamp: Fraction

        An enrolled timestamp, e.g. MusicPartManagerIterator.CurrentEnrolledTimestamp.

      Returns TimestampTransform

    • Main initialize method for MusicPartManager, called by MusicSheetReader when it has read a sheet: copies the sheet's repetitions into Parts, sets the selection to the whole sheet (MusicSheet.SelectionStart and SelectionEnd, which the cursor sets to the measures it draws when it's reset). The mapping between enrolled and sheet timestamps (see absoluteEnrolledToSheetTimestamp()) is calculated when it's first needed, see Timestamps.

      Returns void

    • Does what init() does again. Call it after changing how often a repetition is played (Repetition.UserNumberOfRepetitions, e.g. with MusicSheet.setRepetitionNewUserNumberOfRepetitions()), so that the mapping between enrolled and sheet timestamps follows the new order of the measures.

      Returns void