public void ensureCapacity(int i) throws MidiUnavailableException {
        if (!initialized)
            throw new MidiUnavailableException();
        int repeat = (int) Math.floor((double)i / 16);
        for (int j = 0; j < repeat; j++) {
            Synthesizer s = new SoftSynthesizer();
            s.open();
            for (Instrument inst : s.getLoadedInstruments())
                s.unloadInstrument(inst);
            for (Instrument inst : this.getLoadedInstruments())
                s.loadInstrument(inst);
            theSynths.add(s);
        }
    }