Search in sources :

Example 1 with PlaybackLayouter

use of com.xenoage.zong.musiclayout.layouter.PlaybackLayouter in project Zong by Xenoage.

the class Content method onScoreUpdated.

/**
 * Call this method when the score was modified.
 * The layout and playback is recomputed.
 */
public void onScoreUpdated() {
    // layout the first page
    layout = scoreDoc.getLayout();
    Score score = scoreDoc.getScore();
    layout.updateScoreLayouts(score);
    // create playback layouter for the playback cursor
    playbackLayouter = new PlaybackLayouter(layout.getScoreFrameChain(score).getScoreLayout());
    // set image to view
    mainWindow.renderLayout(layout);
    // load score into MIDI playback
    Playback.openScore(scoreDoc.getScore());
}
Also used : Score(com.xenoage.zong.core.Score) PlaybackLayouter(com.xenoage.zong.musiclayout.layouter.PlaybackLayouter)

Aggregations

Score (com.xenoage.zong.core.Score)1 PlaybackLayouter (com.xenoage.zong.musiclayout.layouter.PlaybackLayouter)1