Package jm.music.data

Examples of jm.music.data.Score


     *
     * @param file File to convert to a score
     * @see #processFiles
     */
    private void processFile(final File file) {
        Score score = Read.midiOrJmWithSwingMessaging(file, owner);
        if (score == null) {
            return;
        }
        if (readListenerList != null) {
            score = readListenerList.scoreRead(score);
View Full Code Here


                                  if (directoryName == null) {
                                      return;
                                  }
                                  String[] filenames = new File(directoryName).list(filter);
                                  for (int i = 0; i < filenames.length; i++) {
                                      Score score = Read.midiOrJmWithAWTMessaging(directoryName,
                                              filenames[i],
                                              owner);
                                      if (score != null && readListenerList != null) {
                                          readListenerList.scoreRead(score);
                                      }
View Full Code Here

                "Select a MIDI file to display...",
                FileDialog.LOAD);
        fd.show();
        String fileName = fd.getFile();
        if (fileName != null) {
            Score score = new Score();
            jm.util.Read.midi(score, fd.getDirectory() + fileName);
            this.score = score;
            sp.setScore(score);
        }
    }
View Full Code Here

                "Select a jMusic XML file to display.",
                FileDialog.LOAD);
        fd.show();
        String fileName = fd.getFile();
        if (fileName != null) {
            Score score = new Score();
            jm.util.Read.xml(score, fd.getDirectory() + fileName);
            this.score = score;
            sp.setScore(score);
        }
    }
View Full Code Here

     * extend the HelperGUI class.
     */
    protected Score compose() {
        // Simple example composition
        Phrase phrase = new Phrase();
        Score s = new Score(new Part(phrase));
        //for(int i = 0; i < 8; i++) {
        Note n = new Note(48 + (int) (Math.random() * variableA), 0.5 + variableB * 0.25);
        phrase.addNote(n);
        //}

View Full Code Here

     * @param String fileName
     */
    public static void midi(Score s, String fileName) {
        if (s == null) {
            System.err.println("jMusic Read.midi error: The score is not initialised! I'm doing it for you.");
            s = new Score();
        }
        s.empty();
        SMF smf = new SMF();
        smf.setVerbose(true);
        try {
View Full Code Here

     * Read the first track from a standard MIDI file into a jMusic part
     *
     * @param Part
     */
    public static void midi(Part p) {
        Score s = new Score();
        midi(s);
        p = s.getPart(0);

    }
View Full Code Here

     *
     * @param Part
     * @param String fileName
     */
    public static void midi(Part p, String fileName) {
        Score s = new Score();
        midi(s, fileName);
        p = s.getPart(0);
    }
View Full Code Here

     * into a jMusic phrase
     *
     * @param Phrase
     */
    public static void midi(Phrase phr) {
        Score s = new Score();
        midi(s);
        phr = s.getPart(0).getPhrase(0);
    }
View Full Code Here

     *
     * @param Part
     * @param String fileName
     */
    public static void midi(CPhrase cphr, String fileName) {
        Score s = new Score();
        midi(s, fileName);
        Part p = new Part();
        p = s.getPart(0);
        for (int i = 0; i < p.size(); i++) {
            cphr.addPhrase(p.getPhrase(i));
        }
    }
View Full Code Here

TOP

Related Classes of jm.music.data.Score

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.