Package jm.music.data

Examples of jm.music.data.Part


        }

      //go through the phrases one by one and accent them
        Enumeration enum1 = score.getPartList().elements();
    while(enum1.hasMoreElements()){
        Part part = (Part) enum1.nextElement();
            accents(part, meter, accentedBeats, accentAmount);
    }
    }
View Full Code Here


        }
        // get the curent max
        int max = 0;
        Enumeration enumS = score.getPartList().elements();
    while(enumS.hasMoreElements()){
    Part part = (Part) enumS.nextElement();
            Enumeration enum1 = part.getPhraseList().elements();
            while(enum1.hasMoreElements()) {
                Phrase phrase = (Phrase) enum1.nextElement();
                Enumeration enum2 = phrase.getNoteList().elements();
            while(enum2.hasMoreElements()){
                    Note n = (Note) enum2.nextElement();
                    if (n.getDynamic() > max) max = n.getDynamic();
            }
          }
        }
    // increase the normalisation
    if (max == Note.MAX_DYNAMIC) {
        return;
    }
    int diff = Note.MAX_DYNAMIC - max;
    Enumeration enumS2 = score.getPartList().elements();
    while(enumS2.hasMoreElements()){
      Part part = (Part) enumS2.nextElement();
        Enumeration enum3 = part.getPhraseList().elements();
            while(enum3.hasMoreElements()) {
                Phrase phrase = (Phrase) enum3.nextElement();
            Enumeration enum2 = phrase.getNoteList().elements();
            while(enum2.hasMoreElements()){
                    Note n = (Note) enum2.nextElement();
View Full Code Here

    if (score == null) {
      return;
    }
    int chan, phraseSize, scoreSize;
    for (int c = 0; c < score.size(); c++) {
      Part p = score.getPart(c);
      chan = p.getChannel();
      scoreSize = score.size();
      for (int i = scoreSize - 1; i > c; i--) {
        //System.out.println("i = " + i + " Part = " + c + " channel = " + chan);
        Part p2 = score.getPart(i);
        if (p2.getChannel() == chan) {
          // move all phrases into the other part
          phraseSize = p2.size();
          for (int j = 0; j < phraseSize; j++) {
            //System.out.println("Moving a phrase");
            Phrase phr = p2.getPhrase(j);
            phr.setAppend(false);
            p.addPhrase(phr);
          }
          // delete the part
          score.removePart(i);
View Full Code Here

        if (score == null || scaleFactor <= 0.0) {
            return;
        }
        Enumeration enum1 = score.getPartList().elements();
        while(enum1.hasMoreElements()){
                Part part = (Part) enum1.nextElement();
                elongate(part, scaleFactor);
        }
    }
View Full Code Here

     * @param score     Score to be processed
     */
    public static void tiePitches (Score score) {
        Enumeration enum1 = score.getPartList().elements();
        while(enum1.hasMoreElements()){
            Part part = (Part)enum1.nextElement();
            tiePitches(part);
        }
    }
View Full Code Here

     * @param score     Score to be processed
     */
    public static void tieRests (Score score) {
        Enumeration enum1 = score.getPartList().elements();
        while(enum1.hasMoreElements()){
            Part part = (Part)enum1.nextElement();
            tieRests(part);
        }
    }
View Full Code Here

     * @param Score     Score to be processed
     */
    public static void fillRests (Score score) {
        Enumeration enum1 = score.getPartList().elements();
        while(enum1.hasMoreElements()){
            Part part = (Part)enum1.nextElement();
            fillRests(part);
        }
    }
View Full Code Here

            return;
        }
        int currentValue, newValue;
        Enumeration enum1 = score.getPartList().elements();
  while(enum1.hasMoreElements()){
            Part p = (Part) enum1.nextElement();
      // create new pan value
            Mod.spread(p);
  }
    }
View Full Code Here

        if (score == null) {
            return;
        }
        Enumeration enum1 = score.getPartList().elements();
  while(enum1.hasMoreElements()){
            Part p = (Part) enum1.nextElement();
      Mod.bounce(p);
  }
    }
View Full Code Here

        if (score == null || maxLength < minLength) {
            return;
        }
        Enumeration enum1 = score.getPartList().elements();
    while(enum1.hasMoreElements()){
      Part part = (Part) enum1.nextElement();
          varyLength(part, minLength, maxLength);
       }
    }
View Full Code Here

TOP

Related Classes of jm.music.data.Part

Copyright © 2018 www.massapicom. 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.