Package org.lilypondbeans.jccparser

Examples of org.lilypondbeans.jccparser.ASTPitch.jjtGetParent()


    }

    public void calcStemDirection() {
        ASTPitch pitch = (ASTPitch) this.parent;
        //in chord stemmdirection from highest
        if (pitch.jjtGetParent().id == ParserTreeConstants.JJTCHORD) {
            pitch = ((ASTChord) pitch.jjtGetParent()).getLowestPitch();
        }

        if (pitch.stemDirection == 0) {
            if (pitch.absoluteHeight > 5) {
View Full Code Here


    public void calcStemDirection() {
        ASTPitch pitch = (ASTPitch) this.parent;
        //in chord stemmdirection from highest
        if (pitch.jjtGetParent().id == ParserTreeConstants.JJTCHORD) {
            pitch = ((ASTChord) pitch.jjtGetParent()).getLowestPitch();
        }

        if (pitch.stemDirection == 0) {
            if (pitch.absoluteHeight > 5) {
                stemDirection = -1;
View Full Code Here

        }
    }

    private void drawFlag(Graphics g, int x, int y, int flagCount) {
        ASTPitch pitch = (ASTPitch) this.parent;
        if (pitch.jjtGetParent().id == ParserTreeConstants.JJTCHORD) {
            if (stemDirection == -1 && ((ASTChord) pitch.jjtGetParent()).getLowestPitch() != pitch) {
                return;
            }
            if (stemDirection == 1 && ((ASTChord) pitch.jjtGetParent()).getHighestPitch() != pitch) {
                return;
View Full Code Here

    }

    private void drawFlag(Graphics g, int x, int y, int flagCount) {
        ASTPitch pitch = (ASTPitch) this.parent;
        if (pitch.jjtGetParent().id == ParserTreeConstants.JJTCHORD) {
            if (stemDirection == -1 && ((ASTChord) pitch.jjtGetParent()).getLowestPitch() != pitch) {
                return;
            }
            if (stemDirection == 1 && ((ASTChord) pitch.jjtGetParent()).getHighestPitch() != pitch) {
                return;
            }
View Full Code Here

        ASTPitch pitch = (ASTPitch) this.parent;
        if (pitch.jjtGetParent().id == ParserTreeConstants.JJTCHORD) {
            if (stemDirection == -1 && ((ASTChord) pitch.jjtGetParent()).getLowestPitch() != pitch) {
                return;
            }
            if (stemDirection == 1 && ((ASTChord) pitch.jjtGetParent()).getHighestPitch() != pitch) {
                return;
            }
        }
        if (hasBeam()) {
            return;
View Full Code Here

            ASTPitch prev = (ASTPitch) node;
            pitch.noteHeight=noteHeight;
            pitch.absoluteHeight = noteHeight;
            if (!prev.isBreake() && !pitch.isBreake()) {
                int highPrev = prev.absoluteHeight;
                if (prev.jjtGetParent().id == ParserTreeConstants.JJTCHORD) {
                    highPrev = ((ASTPitch) prev.jjtGetParent().jjtGetChild(0)).absoluteHeight;
                }
                while (Math.abs(highPrev - pitch.absoluteHeight) > 3) {
                    if (pitch.absoluteHeight > highPrev) {
                        pitch.absoluteHeight -= 7;
View Full Code Here

            pitch.noteHeight=noteHeight;
            pitch.absoluteHeight = noteHeight;
            if (!prev.isBreake() && !pitch.isBreake()) {
                int highPrev = prev.absoluteHeight;
                if (prev.jjtGetParent().id == ParserTreeConstants.JJTCHORD) {
                    highPrev = ((ASTPitch) prev.jjtGetParent().jjtGetChild(0)).absoluteHeight;
                }
                while (Math.abs(highPrev - pitch.absoluteHeight) > 3) {
                    if (pitch.absoluteHeight > highPrev) {
                        pitch.absoluteHeight -= 7;
                    } else {
View Full Code Here

            pitch.durationDots = prev.durationDots;
            pitch.durationInteger = prev.durationInteger;

            pitch.lastBar = prev.lastBar;
            pitch.stemDirection = prev.stemDirection;
            pitch.jjtSetParent(prev.jjtGetParent());
            pitch.jjtGetParent().jjtAddChild(pitch, pitch.jjtGetParent().jjtGetNumChildren());
            pitch.setParentContext(prev.getParentContext());

            PitchLayout.testLayout(new LayoutEnv(), pitch);
            if (chordMode) {
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.