Package com.music.model

Examples of com.music.model.ExtendedPhrase.addRest()


            phrase.add(note);
            if (restLength > 0) {
                phrase.add(new Rest(restLength));
            }
            for (int i = 0; i < phrase.getMeasures() - 1; i++) {
                phrase.addRest(new Rest(lCtx.getScoreContext().getNormalizedMeasureSize()));
            }
            lCtx.setTotalMeasures(lCtx.getTotalMeasures() + phrase.getMeasures());
            part.add(phrase);
        }
    }
View Full Code Here


        pausePhrase.setTitle("Phrase " + lCtx.getPhrases().size());
        pausePhrase.setScale(lCtx.getCurrentScale());
        int measures = Chance.test(85) || lCtx.getScoreContext().getScore().getTempo() < 90 ? 1 : 2;
        pausePhrase.setMeasures(measures);
        for (int i = 0; i < measures; i ++) {
            pausePhrase.addRest(new Rest(lCtx.getNormalizedMeasureSize())); //TODO upbeat here as well?
        }
        lCtx.getPhrases().add(pausePhrase);
        lCtx.setTotalMeasures(lCtx.getTotalMeasures() + measures);

        lCtx.setUsePreviousMeasureLengths(false);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.