Package javax.sound.midi

Examples of javax.sound.midi.Synthesizer.loadAllInstruments()


    public static String[] getInstruments() {
        Synthesizer synthesizer = null;
        try {
            synthesizer = MidiSystem.getSynthesizer();
            synthesizer.open();
            synthesizer.loadAllInstruments(synthesizer.getDefaultSoundbank());
        } catch (MidiUnavailableException ex) {
            ex.printStackTrace();
        }
        Instrument in[] = synthesizer.getLoadedInstruments();
        String ret[] = new String[in.length];
View Full Code Here


        try {
            // events directly to the Synthesizer instead.
            Synthesizer synthesizer = MidiSystem.getSynthesizer();
            synthesizer.open();

            synthesizer.loadAllInstruments(synthesizer.getDefaultSoundbank());
            Instrument in[] = synthesizer.getLoadedInstruments();

            synthesizer.loadInstrument(in[70]);
            channel = synthesizer.getChannels()[0];
        } catch (MidiUnavailableException ex) {
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.