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

📄 synthesizer.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Thu Apr 27 23:37:48 PDT 2000 --><TITLE>Java 2 Platform SE v1.3: Interface  Synthesizer</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_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>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Synthesizer.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup>&nbsp;2&nbsp;Platform<br>Std.&nbsp;Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../javax/sound/midi/Soundbank.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<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>  &nbsp;&nbsp;<A HREF="Synthesizer.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: &nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">javax.sound.midi</FONT><BR>Interface  Synthesizer</H2><DL><DT><B>All Superinterfaces:</B> <DD><A HREF="../../../javax/sound/midi/MidiDevice.html">MidiDevice</A></DD></DL><HR><DL><DT>public interface <B>Synthesizer</B><DT>extends <A HREF="../../../javax/sound/midi/MidiDevice.html">MidiDevice</A></DL><P>A <code>Synthesizer</code> generates sound.  This usually happens when one of  the <code>Synthesizer</code>'s <A HREF="../../../javax/sound/midi/MidiChannel.html"><CODE>MidiChannel</CODE></A> objects receives a  <A HREF="../../../javax/sound/midi/MidiChannel.html#noteOn(int, int)"><CODE>noteOn</CODE></A> message, either directly or via the <code>Synthesizer</code> object. Many <code>Synthesizer</code>s support <code>Receivers</code>, through which MIDI events can be delivered to the <code>Synthesizer</code>.   In such cases, the <code>Synthesizer</code> typically responds by sending a corresponding message to the appropriate <code>MidiChannel</code>, or by processing the event itself if the event isn't one of the MIDI channel  messages. <p> The <code>Synthesizer</code> interface includes methods for loading and  unloading instruments from soundbanks.  An instrument is a specification for synthesizing a certain type of sound, whether that sound emulates a traditional instrument or is some kind of sound effect or other imaginary sound. A soundbank is a collection of instruments, organized by bank and program number (via the instrument's <code>Patch</code> object).   Different <code>Synthesizer</code> classes might implement different sound-synthesis techniques, meaning that some instruments and not others might be compatible with a given synthesizer. Also, synthesizers may have a limited amount of memory for instruments, meaning that not every soundbank and instrument can be used by every synthesizer, even if the synthesis technique is compatible. To see whether the instruments from  a certain soundbank can be played by a given synthesizer, invoke the <A HREF="../../../javax/sound/midi/Synthesizer.html#isSoundbankSupported(javax.sound.midi.Soundbank)"><CODE>isSoundbankSupported</CODE></A> method of  <code>Synthesizer</code>. <p> "Loading" an instrument means that that instrument becomes available for  synthesizing notes.  The instrument is loaded into the bank and  program location specified by its <code>Patch</code> object.  Loading does not necessarily mean that subsequently played notes will immediately have  the sound of this newly loaded instrument.  For the instrument to play notes,  one of the synthesizer's <code>MidiChannel</code> objects must receive (or have received) a program-change message that causes that particular instrument's bank and program number to be selected.<P><DL><DT><B>See Also: </B><DD><A HREF="../../../javax/sound/midi/MidiSystem.html#getSynthesizer()"><CODE>MidiSystem.getSynthesizer()</CODE></A>, <A HREF="../../../javax/sound/midi/Soundbank.html"><CODE>Soundbank</CODE></A>, <A HREF="../../../javax/sound/midi/Instrument.html"><CODE>Instrument</CODE></A>, <A HREF="../../../javax/sound/midi/MidiChannel.html#programChange(int, int)"><CODE>MidiChannel.programChange(int, int)</CODE></A>, <A HREF="../../../javax/sound/midi/Receiver.html"><CODE>Receiver</CODE></A>, <A HREF="../../../javax/sound/midi/Transmitter.html"><CODE>Transmitter</CODE></A>, <A HREF="../../../javax/sound/midi/MidiDevice.html"><CODE>MidiDevice</CODE></A></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><A NAME="inner_classes_inherited_from_class_javax.sound.midi.MidiDevice"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Inner classes inherited from class 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.Info.html">MidiDevice.Info</A></CODE></TD></TR></TABLE>&nbsp;<!-- =========== FIELD SUMMARY =========== --><!-- ======== CONSTRUCTOR SUMMARY ======== --><!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../javax/sound/midi/Instrument.html">Instrument</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/sound/midi/Synthesizer.html#getAvailableInstruments()">getAvailableInstruments</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Obtains a list of instruments that come with the synthesizer.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../javax/sound/midi/MidiChannel.html">MidiChannel</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/sound/midi/Synthesizer.html#getChannels()">getChannels</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Obtains the set of MIDI channels controlled by this synthesizer.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../javax/sound/midi/Soundbank.html">Soundbank</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/sound/midi/Synthesizer.html#getDefaultSoundbank()">getDefaultSoundbank</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Obtains the default soundbank for the synthesizer, if one exists.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;long</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/sound/midi/Synthesizer.html#getLatency()">getLatency</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Obtains the processing latency incurred by this synthesizer, expressed in  microseconds.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../javax/sound/midi/Instrument.html">Instrument</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/sound/midi/Synthesizer.html#getLoadedInstruments()">getLoadedInstruments</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Obtains a list of the instruments that are currently loaded onto this  <code>Synthesizer</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/sound/midi/Synthesizer.html#getMaxPolyphony()">getMaxPolyphony</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Obtains the maximum number of notes that this synthesizer can sound simultaneously.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../javax/sound/midi/VoiceStatus.html">VoiceStatus</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/sound/midi/Synthesizer.html#getVoiceStatus()">getVoiceStatus</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Obtains the current status of the voices produced by this synthesizer.</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#isSoundbankSupported(javax.sound.midi.Soundbank)">isSoundbankSupported</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;Informs the caller whether this synthesizer is capable of loading  instruments from the specified soundbank.</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#loadAllInstruments(javax.sound.midi.Soundbank)">loadAllInstruments</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;Loads onto the <code>Synthesizer</code> 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;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/sound/midi/Synthesizer.html#loadInstrument(javax.sound.midi.Instrument)">loadInstrument</A></B>(<A HREF="../../../javax/sound/midi/Instrument.html">Instrument</A>&nbsp;instrument)</CODE>

⌨️ 快捷键说明

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