📄 synthesizer.html
字号:
soundbank<DT><B>See Also: </B><DD><A HREF="../../../javax/sound/midi/Synthesizer.html#loadInstrument(javax.sound.midi.Instrument)"><CODE>loadInstrument(javax.sound.midi.Instrument)</CODE></A>, <A HREF="../../../javax/sound/midi/Synthesizer.html#unloadInstruments(javax.sound.midi.Soundbank, javax.sound.midi.Patch[])"><CODE>unloadInstruments(javax.sound.midi.Soundbank, javax.sound.midi.Patch[])</CODE></A>, <A HREF="../../../javax/sound/midi/Synthesizer.html#unloadAllInstruments(javax.sound.midi.Soundbank)"><CODE>unloadAllInstruments(javax.sound.midi.Soundbank)</CODE></A>, <A HREF="../../../javax/sound/midi/Synthesizer.html#getLoadedInstruments()"><CODE>getLoadedInstruments()</CODE></A>, <A HREF="../../../javax/sound/midi/Synthesizer.html#remapInstrument(javax.sound.midi.Instrument, javax.sound.midi.Instrument)"><CODE>remapInstrument(javax.sound.midi.Instrument, javax.sound.midi.Instrument)</CODE></A></DL></DD></DL><HR><A NAME="remapInstrument(javax.sound.midi.Instrument, javax.sound.midi.Instrument)"><!-- --></A><H3>remapInstrument</H3><PRE>public boolean <B>remapInstrument</B>(<A HREF="../../../javax/sound/midi/Instrument.html">Instrument</A> from, <A HREF="../../../javax/sound/midi/Instrument.html">Instrument</A> to)</PRE><DL><DD>Remaps an instrument. Instrument <code>to</code> takes the place of instrument <code>from</code>. For example, if <code>from</code> was located at bank number 2, program number 11, remapping causes that bank and program location to be occupied instead by <code>to</code>. Instrument <code>from</code> is unloaded.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>from</CODE> - instrument to be replaced<DD><CODE>to</CODE> - new instrument to be used in place of the old instrument<DT><B>Returns:</B><DD><code>true</code> if the instrument could be remapped, <code>false</code> otherwise<DT><B>Throws:</B><DD><CODE><code>IllegalArgumentException</code></CODE> - if the soundbank is not supported</DL></DD></DL><HR><A NAME="getDefaultSoundbank()"><!-- --></A><H3>getDefaultSoundbank</H3><PRE>public <A HREF="../../../javax/sound/midi/Soundbank.html">Soundbank</A> <B>getDefaultSoundbank</B>()</PRE><DL><DD>Obtains the default soundbank for the synthesizer, if one exists. (Some synthesizers provide a default or built-in soundbank.) If a synthesizer doesn't have a default soundbank, instruments must be loaded explicitly from an external soundbank.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>default soundbank, or <code>null</code> if one does not exist.<DT><B>See Also: </B><DD><A HREF="../../../javax/sound/midi/Synthesizer.html#isSoundbankSupported(javax.sound.midi.Soundbank)"><CODE>isSoundbankSupported(javax.sound.midi.Soundbank)</CODE></A></DL></DD></DL><HR><A NAME="getAvailableInstruments()"><!-- --></A><H3>getAvailableInstruments</H3><PRE>public <A HREF="../../../javax/sound/midi/Instrument.html">Instrument</A>[] <B>getAvailableInstruments</B>()</PRE><DL><DD>Obtains a list of instruments that come with the synthesizer. These instruments might be built into the synthesizer, or they might be part of a default soundbank provided with the synthesizer, etc. <p> Note that you don't use this method to find out which instruments are currently loaded onto the synthesizer; for that purpose, you use <code>getLoadedInstruments()</code>. Nor does the method indicate all the instruments that can be loaded onto the synthesizer; it only indicates the subset that come with the synthesizer. To learn whether another instrument can be loaded, you can invoke <code>isSoundbankSupported()</code>, and if the instrument's <code>Soundbank</code> is supported, you can try loading the instrument.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>list of available instruments.<DT><B>See Also: </B><DD><A HREF="../../../javax/sound/midi/Synthesizer.html#getLoadedInstruments()"><CODE>getLoadedInstruments()</CODE></A>, <A HREF="../../../javax/sound/midi/Synthesizer.html#isSoundbankSupported(javax.sound.midi.Soundbank)"><CODE>isSoundbankSupported(Soundbank)</CODE></A>, <A HREF="../../../javax/sound/midi/Synthesizer.html#loadInstrument(javax.sound.midi.Instrument)"><CODE>loadInstrument(javax.sound.midi.Instrument)</CODE></A></DL></DD></DL><HR><A NAME="getLoadedInstruments()"><!-- --></A><H3>getLoadedInstruments</H3><PRE>public <A HREF="../../../javax/sound/midi/Instrument.html">Instrument</A>[] <B>getLoadedInstruments</B>()</PRE><DL><DD>Obtains a list of the instruments that are currently loaded onto this <code>Synthesizer</code>.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>a list of currently loaded instruments<DT><B>See Also: </B><DD><A HREF="../../../javax/sound/midi/Synthesizer.html#loadInstrument(javax.sound.midi.Instrument)"><CODE>loadInstrument(javax.sound.midi.Instrument)</CODE></A>, <A HREF="../../../javax/sound/midi/Synthesizer.html#getAvailableInstruments()"><CODE>getAvailableInstruments()</CODE></A>, <A HREF="../../../javax/sound/midi/Soundbank.html#getInstruments()"><CODE>Soundbank.getInstruments()</CODE></A></DL></DD></DL><HR><A NAME="loadAllInstruments(javax.sound.midi.Soundbank)"><!-- --></A><H3>loadAllInstruments</H3><PRE>public boolean <B>loadAllInstruments</B>(<A HREF="../../../javax/sound/midi/Soundbank.html">Soundbank</A> soundbank)</PRE><DL><DD>Loads onto the <code>Synthesizer</code> all instruments contained in the specified <code>Soundbank</code>.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>soundbank</CODE> - the <code>Soundbank</code> whose are instruments are to be loaded<DT><B>Returns:</B><DD><code>true</code> if the instruments are all successfully loaded (or already had been), <code>false</code> if any instrument could not be loaded (for example, if the <code>Synthesizer</code> had insufficient memory)<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if the requested soundbank is incompatible with this synthesizer.<DT><B>See Also: </B><DD><A HREF="../../../javax/sound/midi/Synthesizer.html#isSoundbankSupported(javax.sound.midi.Soundbank)"><CODE>isSoundbankSupported(javax.sound.midi.Soundbank)</CODE></A>, <A HREF="../../../javax/sound/midi/Synthesizer.html#loadInstrument(javax.sound.midi.Instrument)"><CODE>loadInstrument(javax.sound.midi.Instrument)</CODE></A>, <A HREF="../../../javax/sound/midi/Synthesizer.html#loadInstruments(javax.sound.midi.Soundbank, javax.sound.midi.Patch[])"><CODE>loadInstruments(javax.sound.midi.Soundbank, javax.sound.midi.Patch[])</CODE></A></DL></DD></DL><HR><A NAME="unloadAllInstruments(javax.sound.midi.Soundbank)"><!-- --></A><H3>unloadAllInstruments</H3><PRE>public void <B>unloadAllInstruments</B>(<A HREF="../../../javax/sound/midi/Soundbank.html">Soundbank</A> soundbank)</PRE><DL><DD>Unloads all instruments contained in the specified <code>Soundbank</code>.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>soundbank</CODE> - soundbank containing instruments to unload<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - thrown if the soundbank is not supported.<DT><B>See Also: </B><DD><A HREF="../../../javax/sound/midi/Synthesizer.html#isSoundbankSupported(javax.sound.midi.Soundbank)"><CODE>isSoundbankSupported(javax.sound.midi.Soundbank)</CODE></A>, <A HREF="../../../javax/sound/midi/Synthesizer.html#unloadInstrument(javax.sound.midi.Instrument)"><CODE>unloadInstrument(javax.sound.midi.Instrument)</CODE></A>, <A HREF="../../../javax/sound/midi/Synthesizer.html#unloadInstruments(javax.sound.midi.Soundbank, javax.sound.midi.Patch[])"><CODE>unloadInstruments(javax.sound.midi.Soundbank, javax.sound.midi.Patch[])</CODE></A></DL></DD></DL><HR><A NAME="loadInstruments(javax.sound.midi.Soundbank, javax.sound.midi.Patch[])"><!-- --></A><H3>loadInstruments</H3><PRE>public boolean <B>loadInstruments</B>(<A HREF="../../../javax/sound/midi/Soundbank.html">Soundbank</A> soundbank, <A HREF="../../../javax/sound/midi/Patch.html">Patch</A>[] patchList)</PRE><DL><DD>Loads the instruments referenced by the specified patches, from the specified <code>Soundbank</code>. Each of the <code>Patch</code> objects indicates a bank and program number; the <code>Instrument</code> that has the matching <code>Patch</code> is loaded into that bank and program location.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>soundbank</CODE> - the <code>Soundbank</code> containing the instruments to load<DD><CODE>patchList</CODE> - list of patches for which instruments should be loaded<DT><B>Returns:</B><DD><code>true</code> if the instruments are all successfully loaded (or already had been), <code>false</code> if any instrument could not be loaded (for example, if the <code>Synthesizer</code> had insufficient memory)<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - thrown if the soundbank is not supported.<DT><B>See Also: </B><DD><A HREF="../../../javax/sound/midi/Synthesizer.html#isSoundbankSupported(javax.sound.midi.Soundbank)"><CODE>isSoundbankSupported(javax.sound.midi.Soundbank)</CODE></A>, <A HREF="../../../javax/sound/midi/Instrument.html#getPatch()"><CODE>Instrument.getPatch()</CODE></A>, <A HREF="../../../javax/sound/midi/Synthesizer.html#loadAllInstruments(javax.sound.midi.Soundbank)"><CODE>loadAllInstruments(javax.sound.midi.Soundbank)</CODE></A>, <A HREF="../../../javax/sound/midi/Synthesizer.html#loadInstrument(javax.sound.midi.Instrument)"><CODE>loadInstrument(javax.sound.midi.Instrument)</CODE></A>, <A HREF="../../../javax/sound/midi/Soundbank.html#getInstrument(javax.sound.midi.Patch)"><CODE>Soundbank.getInstrument(Patch)</CODE></A>, <A HREF="../../../javax/sound/midi/Sequence.html#getPatchList()"><CODE>Sequence.getPatchList()</CODE></A></DL></DD></DL><HR><A NAME="unloadInstruments(javax.sound.midi.Soundbank, javax.sound.midi.Patch[])"><!-- --></A><H3>unloadInstruments</H3><PRE>public void <B>unloadInstruments</B>(<A HREF="../../../javax/sound/midi/Soundbank.html">Soundbank</A> soundbank, <A HREF="../../../javax/sound/midi/Patch.html">Patch</A>[] patchList)</PRE><DL><DD>Unloads the instruments referenced by the specified patches, from the MIDI sound bank specified.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>soundbank</CODE> - soundbank containing instruments to unload<DD><CODE>patchList</CODE> - list of patches for which instruments should be unloaded<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - thrown if the soundbank is not supported.<DT><B>See Also: </B><DD><A HREF="../../../javax/sound/midi/Synthesizer.html#unloadInstrument(javax.sound.midi.Instrument)"><CODE>unloadInstrument(javax.sound.midi.Instrument)</CODE></A>, <A HREF="../../../javax/sound/midi/Synthesizer.html#unloadAllInstruments(javax.sound.midi.Soundbank)"><CODE>unloadAllInstruments(javax.sound.midi.Soundbank)</CODE></A>, <A HREF="../../../javax/sound/midi/Synthesizer.html#isSoundbankSupported(javax.sound.midi.Soundbank)"><CODE>isSoundbankSupported(javax.sound.midi.Soundbank)</CODE></A>, <A HREF="../../../javax/sound/midi/Instrument.html#getPatch()"><CODE>Instrument.getPatch()</CODE></A>, <A HREF="../../../javax/sound/midi/Synthesizer.html#loadInstruments(javax.sound.midi.Soundbank, javax.sound.midi.Patch[])"><CODE>loadInstruments(javax.sound.midi.Soundbank, javax.sound.midi.Patch[])</CODE></A></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Synthesizer.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Std. Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../javax/sound/midi/Soundbank.html"><B>PREV CLASS</B></A> <A HREF="../../../javax/sound/midi/Transmitter.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="Synthesizer.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="http://java.sun.com/products/jdk/1.3/devdocs-vs-specs.html">Java 2 SDK SE Developer Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. <p>Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road<br>Palo Alto, California, 94303, U.S.A. All Rights Reserved.</font></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -