Examples of programChange()


Examples of javax.sound.midi.MidiChannel.programChange()

        AudioInputStream stream = synth.openStream(format, null);
                       
        // Make all voices busy, e.g.
        // send midi on and midi off on all available voices       
        MidiChannel ch1 = synth.getChannels()[0];
        ch1.programChange(48); // Use contionus instrument like string ensemble
        for (int i = 0; i < synth.getMaxPolyphony(); i++) {           
            ch1.noteOn(64, 64);
            ch1.noteOff(64);
        }
       
View Full Code Here

Examples of javax.sound.midi.MidiChannel.programChange()

        synth.unloadAllInstruments(synth.getDefaultSoundbank());
        synth.loadAllInstruments(sf2);
       
        // Send out one midi on message
        MidiChannel ch1 = synth.getChannels()[0];
        ch1.programChange(0);
        ch1.noteOn(64, 64);
       
        // Read 1 sec from stream
        stream.skip(format.getFrameSize() * ((int)(format.getFrameRate() * 2)));

 
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.