Examples of loadAllInstruments()


Examples of com.sun.media.sound.AudioSynthesizer.loadAllInstruments()

        insregion.setLayer(layer);
        ins.getRegions().add(insregion);

        // Load the test soundbank into the synthesizer
        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);
View Full Code Here

Examples of com.sun.media.sound.AudioSynthesizer.loadAllInstruments()

        // Create instance of synthesizer using the testing soundbank above
        AudioSynthesizer synth = new SoftSynthesizer();
        AudioInputStream stream = synth.openStream(format, null);
        synth.unloadAllInstruments(synth.getDefaultSoundbank());
        synth.loadAllInstruments(soundbank);
        Receiver recv = synth.getReceiver();

        // Set volume to max and turn reverb off
        ShortMessage reverb_off = new ShortMessage();
        reverb_off.setMessage(ShortMessage.CONTROL_CHANGE, 91, 0);
View Full Code Here

Examples of com.sun.media.sound.SoftSynthesizer.loadAllInstruments()

        // Create instance of synthesizer using the testing soundbank above
        AudioSynthesizer synth = new SoftSynthesizer();
        AudioInputStream stream = synth.openStream(format, null);
        synth.unloadAllInstruments(synth.getDefaultSoundbank());
        synth.loadAllInstruments(soundbank);
        Receiver recv = synth.getReceiver();

        // Set volume to max and turn reverb off
        ShortMessage reverb_off = new ShortMessage();
        reverb_off.setMessage(ShortMessage.CONTROL_CHANGE, 91, 0);
View Full Code Here

Examples of com.sun.media.sound.SoftSynthesizer.loadAllInstruments()

        insregion.setLayer(layer);
        ins.getRegions().add(insregion);

        // Load the test soundbank into the synthesizer
        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);
View Full Code Here

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

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

        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.