Package jm.midi

Examples of jm.midi.MidiSynth.play()


    }

    private void playScore() {
        MidiSynth ms = new MidiSynth();
        try {
            ms.play(score);
        } catch (Exception e) {
            System.err.println("MIDI Playback Error:" + e);
            return;
        }
    }
View Full Code Here


            Field fld = ReflectionUtils.findField(Play.class, "ms");
            ReflectionUtils.makeAccessible(fld);
            MidiSynth synth = (MidiSynth) fld.get(null);
            // playing for the first time initializes the synthesizer
            try {
                synth.play(null);
            } catch (Exception ex){};
            Field synthField = ReflectionUtils.findField(MidiSynth.class, "m_synth");
            ReflectionUtils.makeAccessible(synthField);
            Synthesizer synthsizer = (Synthesizer) synthField.get(synth);
            loadSoundbankInstruments(synthsizer);
View Full Code Here

        System.out.println("jMusic Play: Playing score " + score.getTitle() + " using JavaSound General MIDI soundbank.");
        msFill(synths); // add instances of MidSynths if required
        MidiSynth currentMidiSynth = (MidiSynth) ms.elementAt(msCnt);
        if (currentMidiSynth.isPlaying()) currentMidiSynth.stop();
        try {
            currentMidiSynth.play(score);
            if (wait) {
                System.out.println("jMusic Play: Waiting for the end of " + score.getTitle() + ".");
                if (exit && decayAllowance == 0) { // allow reverb trail to end
                    waitCycle(score, 200);
                } else waitCycle(score, decayAllowance);
View Full Code Here

    System.out.println("jMusic Play: Playing score " + score.getTitle() + " using JavaSound General MIDI soundbank.");
    msFill(synths); // add instances of MidSynths if required
    MidiSynth currentMidiSynth = (MidiSynth) ms.elementAt(msCnt);
    if (currentMidiSynth.isPlaying()) currentMidiSynth.stop();
    try {
      currentMidiSynth.play(score);
      if (wait) {
        System.out.println("jMusic Play: Waiting for the end of "+ score.getTitle() + ".");
        if (exit && decayAllowance == 0) { // allow reverb trail to end
          waitCycle(score, 200);
        } else waitCycle(score, decayAllowance);
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.