⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 synthesizer.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Makes a particular instrument available for synthesis.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/sound/midi/Synthesizer.html#loadInstruments(javax.sound.midi.Soundbank, javax.sound.midi.Patch[])">loadInstruments</A></B>(<A HREF="../../../javax/sound/midi/Soundbank.html">Soundbank</A>&nbsp;soundbank,                <A HREF="../../../javax/sound/midi/Patch.html">Patch</A>[]&nbsp;patchList)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Loads the instruments referenced by the specified patches, from the  specified <code>Soundbank</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/sound/midi/Synthesizer.html#remapInstrument(javax.sound.midi.Instrument, javax.sound.midi.Instrument)">remapInstrument</A></B>(<A HREF="../../../javax/sound/midi/Instrument.html">Instrument</A>&nbsp;from,                <A HREF="../../../javax/sound/midi/Instrument.html">Instrument</A>&nbsp;to)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Remaps an instrument.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/sound/midi/Synthesizer.html#unloadAllInstruments(javax.sound.midi.Soundbank)">unloadAllInstruments</A></B>(<A HREF="../../../javax/sound/midi/Soundbank.html">Soundbank</A>&nbsp;soundbank)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Unloads all instruments contained in the specified <code>Soundbank</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/sound/midi/Synthesizer.html#unloadInstrument(javax.sound.midi.Instrument)">unloadInstrument</A></B>(<A HREF="../../../javax/sound/midi/Instrument.html">Instrument</A>&nbsp;instrument)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Unloads a particular instrument.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/sound/midi/Synthesizer.html#unloadInstruments(javax.sound.midi.Soundbank, javax.sound.midi.Patch[])">unloadInstruments</A></B>(<A HREF="../../../javax/sound/midi/Soundbank.html">Soundbank</A>&nbsp;soundbank,                  <A HREF="../../../javax/sound/midi/Patch.html">Patch</A>[]&nbsp;patchList)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Unloads the instruments referenced by the specified patches, from the MIDI sound bank specified.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_javax.sound.midi.MidiDevice"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from interface javax.sound.midi.<A HREF="../../../javax/sound/midi/MidiDevice.html">MidiDevice</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../javax/sound/midi/MidiDevice.html#close()">close</A>, <A HREF="../../../javax/sound/midi/MidiDevice.html#getDeviceInfo()">getDeviceInfo</A>, <A HREF="../../../javax/sound/midi/MidiDevice.html#getMaxReceivers()">getMaxReceivers</A>, <A HREF="../../../javax/sound/midi/MidiDevice.html#getMaxTransmitters()">getMaxTransmitters</A>, <A HREF="../../../javax/sound/midi/MidiDevice.html#getMicrosecondPosition()">getMicrosecondPosition</A>, <A HREF="../../../javax/sound/midi/MidiDevice.html#getReceiver()">getReceiver</A>, <A HREF="../../../javax/sound/midi/MidiDevice.html#getTransmitter()">getTransmitter</A>, <A HREF="../../../javax/sound/midi/MidiDevice.html#isOpen()">isOpen</A>, <A HREF="../../../javax/sound/midi/MidiDevice.html#open()">open</A></CODE></TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="getMaxPolyphony()"><!-- --></A><H3>getMaxPolyphony</H3><PRE>public int <B>getMaxPolyphony</B>()</PRE><DL><DD>Obtains the maximum number of notes that this synthesizer can sound simultaneously.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the maximum number of simultaneous notes<DT><B>See Also: </B><DD><A HREF="../../../javax/sound/midi/Synthesizer.html#getVoiceStatus()"><CODE>getVoiceStatus()</CODE></A></DL></DD></DL><HR><A NAME="getLatency()"><!-- --></A><H3>getLatency</H3><PRE>public long <B>getLatency</B>()</PRE><DL><DD>Obtains the processing latency incurred by this synthesizer, expressed in  microseconds.  This latency measures the worst-case delay between the   time a MIDI message is delivered to the synthesizer and the time that the synthesizer actually produces the corresponding result. <p> Although the latency is expressed in microseconds, a synthesizer's actual measured  delay may vary over a wider range than this resolution suggests.  For example, a synthesizer might have a worst-case delay of a few milliseconds or more.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the worst-case delay, in microseconds</DL></DD></DL><HR><A NAME="getChannels()"><!-- --></A><H3>getChannels</H3><PRE>public <A HREF="../../../javax/sound/midi/MidiChannel.html">MidiChannel</A>[] <B>getChannels</B>()</PRE><DL><DD>Obtains the set of MIDI channels controlled by this synthesizer.  Each  non-null element in the returned array is a <code>MidiChannel</code> that  receives the MIDI messages sent on that channel number. <p> The MIDI 1.0 specification provides for 16 channels, so this  method returns an array of at least 16 elements.  However, if this synthesizer  doesn't make use of all 16 channels, some of the elements of the array might be <code>null</code>, so you should check each element before using it.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>an array of the <code>MidiChannel</code> objects managed by this <code>Synthesizer</code>.  Some of the array elements may be <code>null</code>.</DL></DD></DL><HR><A NAME="getVoiceStatus()"><!-- --></A><H3>getVoiceStatus</H3><PRE>public <A HREF="../../../javax/sound/midi/VoiceStatus.html">VoiceStatus</A>[] <B>getVoiceStatus</B>()</PRE><DL><DD>Obtains the current status of the voices produced by this synthesizer.   If this class of <code>Synthesizer</code> does not provide voice  information, the returned array will always be of length 0.  Otherwise, its length is always equal to the total number of voices, as returned by  <code>getMaxPolyphony()</code>.  (See the <code>VoiceStatus</code> class  description for an explanation of synthesizer voices.)<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>an array of <code>VoiceStatus</code> objects that supply  information about the corresponding synthesizer voices<DT><B>See Also: </B><DD><A HREF="../../../javax/sound/midi/Synthesizer.html#getMaxPolyphony()"><CODE>getMaxPolyphony()</CODE></A>, <A HREF="../../../javax/sound/midi/VoiceStatus.html"><CODE>VoiceStatus</CODE></A></DL></DD></DL><HR><A NAME="isSoundbankSupported(javax.sound.midi.Soundbank)"><!-- --></A><H3>isSoundbankSupported</H3><PRE>public boolean <B>isSoundbankSupported</B>(<A HREF="../../../javax/sound/midi/Soundbank.html">Soundbank</A>&nbsp;soundbank)</PRE><DL><DD>Informs the caller whether this synthesizer is capable of loading  instruments from the specified soundbank. If the soundbank is unsupported, any attempts to load instruments from it will result in an <code>IllegalArgumentException</code>.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>soundbank</CODE> - soundbank for which support is queried<DT><B>Returns:</B><DD><code>true</code> if the soundbank is supported, otherwise <code>false</code><DT><B>See Also: </B><DD><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>, <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#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#getDefaultSoundbank()"><CODE>getDefaultSoundbank()</CODE></A></DL></DD></DL><HR><A NAME="loadInstrument(javax.sound.midi.Instrument)"><!-- --></A><H3>loadInstrument</H3><PRE>public boolean <B>loadInstrument</B>(<A HREF="../../../javax/sound/midi/Instrument.html">Instrument</A>&nbsp;instrument)</PRE><DL><DD>Makes a particular instrument available for synthesis.  This instrument is loaded into the patch location specified by its <code>Patch</code>  object, so that if a program-change message is  received (or has been received) that causes that patch to be selected, subsequent notes will be played using the sound of  <code>instrument</code>.  If the specified instrument is already loaded, this method does nothing and returns <code>true</code>. <p> The instrument must be part of a soundbank  that this <code>Synthesizer</code> supports.  (To make sure, you can use the <code>getSoundbank</code> method of <code>Instrument</code> and the  <code>isSoundbankSupported</code> method of <code>Synthesizer</code>.)<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>instrument</CODE> - instrument to load<DT><B>Returns:</B><DD><code>true</code> if the instrument is successfully loaded (or  already had been), <code>false</code> if the instrument could not be  loaded (for example, if the synthesizer has insufficient memory to load it)<DT><B>Throws:</B><DD><CODE><code>IllegalArgumentException</code></CODE> - if this  <code>Synthesizer</code> doesn't support the specified instrument's  soundbank<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#loadInstruments(javax.sound.midi.Soundbank, javax.sound.midi.Patch[])"><CODE>loadInstruments(javax.sound.midi.Soundbank, javax.sound.midi.Patch[])</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#remapInstrument(javax.sound.midi.Instrument, javax.sound.midi.Instrument)"><CODE>remapInstrument(javax.sound.midi.Instrument, javax.sound.midi.Instrument)</CODE></A>, <A HREF="../../../javax/sound/midi/SoundbankResource.html#getSoundbank()"><CODE>SoundbankResource.getSoundbank()</CODE></A>, <A HREF="../../../javax/sound/midi/MidiChannel.html#programChange(int, int)"><CODE>MidiChannel.programChange(int, int)</CODE></A></DL></DD></DL><HR><A NAME="unloadInstrument(javax.sound.midi.Instrument)"><!-- --></A><H3>unloadInstrument</H3><PRE>public void <B>unloadInstrument</B>(<A HREF="../../../javax/sound/midi/Instrument.html">Instrument</A>&nbsp;instrument)</PRE><DL><DD>Unloads a particular instrument.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>instrument</CODE> - instrument to unload<DT><B>Throws:</B><DD><CODE><code>IllegalArgumentException</code></CODE> - if this  <code>Synthesizer</code> doesn't support the specified instrument's 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -