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

📄 midichannel.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<HR><A NAME="getProgram()"><!-- --></A><H3>getProgram</H3><PRE>public int <B>getProgram</B>()</PRE><DL><DD>Obtains the current program number for this channel.<DD><DL><DT><B>Returns:</B><DD>the program number of the currently selected patch<DT><B>See Also: </B><DD><A HREF="../../../javax/sound/midi/Patch.html#getProgram()"><CODE>Patch.getProgram()</CODE></A>, <A HREF="../../../javax/sound/midi/Synthesizer.html#loadInstrument(javax.sound.midi.Instrument)"><CODE>Synthesizer.loadInstrument(javax.sound.midi.Instrument)</CODE></A>, <A HREF="../../../javax/sound/midi/MidiChannel.html#programChange(int)"><CODE>programChange(int)</CODE></A></DL></DD></DL><HR><A NAME="setPitchBend(int)"><!-- --></A><H3>setPitchBend</H3><PRE>public void <B>setPitchBend</B>(int&nbsp;bend)</PRE><DL><DD>Changes the pitch offset for all notes on this channel. This affects all currently sounding notes as well as subsequent ones. (For pitch bend to cease, the value needs to be reset to the center position.) <p> The MIDI specification stipulates that pitch bend be a 14-bit value, where zero is maximum downward bend, 16383 is maximum upward bend, and 8192 is the center (no pitch bend).  The actual amount of pitch change is not specified; it can be changed by a pitch-bend sensitivy setting.  However, the General MIDI specification says that the default range should be two semitones up and down from center.<DD><DL><DT><B>Parameters:</B><DD><CODE>bend</CODE> - the amount of pitch change, as a nonnegative 14-bit value (8192 = no bend)<DT><B>See Also: </B><DD><A HREF="../../../javax/sound/midi/MidiChannel.html#getPitchBend()"><CODE>getPitchBend()</CODE></A></DL></DD></DL><HR><A NAME="getPitchBend()"><!-- --></A><H3>getPitchBend</H3><PRE>public int <B>getPitchBend</B>()</PRE><DL><DD>Obtains the upward of downward pitch offset for this channel.<DD><DL><DT><B>Returns:</B><DD>bend amount, as a nonnegative 14-bit value (8192 = no bend)<DT><B>See Also: </B><DD><A HREF="../../../javax/sound/midi/MidiChannel.html#setPitchBend(int)"><CODE>setPitchBend(int)</CODE></A></DL></DD></DL><HR><A NAME="resetAllControllers()"><!-- --></A><H3>resetAllControllers</H3><PRE>public void <B>resetAllControllers</B>()</PRE><DL><DD>Resets all the implemented controllers to their default values.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../../javax/sound/midi/MidiChannel.html#controlChange(int, int)"><CODE>controlChange(int, int)</CODE></A></DL></DD></DL><HR><A NAME="allNotesOff()"><!-- --></A><H3>allNotesOff</H3><PRE>public void <B>allNotesOff</B>()</PRE><DL><DD>Turns off all notes that are currently sounding on this channel. The notes might not die away instantaneously; their decay  rate is determined by the internals of the <code>Instrument</code>. If the Hold Pedal controller (see  <A HREF="../../../javax/sound/midi/MidiChannel.html#controlChange(int, int)"><CODE>controlChange</CODE></A>)  is down, the effect of this method is deferred until the pedal is  released.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../../javax/sound/midi/MidiChannel.html#allSoundOff()"><CODE>allSoundOff()</CODE></A>, <A HREF="../../../javax/sound/midi/MidiChannel.html#noteOff(int)"><CODE>noteOff(int)</CODE></A></DL></DD></DL><HR><A NAME="allSoundOff()"><!-- --></A><H3>allSoundOff</H3><PRE>public void <B>allSoundOff</B>()</PRE><DL><DD>Immediately turns off all sounding notes on this channel, ignoring the  state of the Hold Pedal and the internal decay rate of the current  <code>Instrument</code>.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../../javax/sound/midi/MidiChannel.html#allNotesOff()"><CODE>allNotesOff()</CODE></A></DL></DD></DL><HR><A NAME="localControl(boolean)"><!-- --></A><H3>localControl</H3><PRE>public boolean <B>localControl</B>(boolean&nbsp;on)</PRE><DL><DD>Turns local control on or off.  The default is for local control  to be on.  The "on" setting means that if a device is capable of both synthesizing sound and transmitting MIDI messages, it will synthesize sound in response to the note-on and note-off messages that it itself transmits.  It will also respond to messages received from other transmitting devices. The "off" setting means that the synthesizer will ignore its own transmitted MIDI messages, but not those received from other devices.<DD><DL><DT><B>Parameters:</B><DD><CODE>on</CODE> - <code>true</code> to turn local control on, <code>false</code>  to turn local control off<DT><B>Returns:</B><DD>the new local-control value</DL></DD></DL><HR><A NAME="setMono(boolean)"><!-- --></A><H3>setMono</H3><PRE>public void <B>setMono</B>(boolean&nbsp;on)</PRE><DL><DD>Turns mono mode on or off.  In mono mode, the channel synthesizes only one note at a time.  In poly mode (identical to mono mode off), the channel can synthesize multiple notes simultaneously. The default is mono off (poly mode on). <p> "Mono" is short for the word "monophonic," which in this context is opposed to the word "polyphonic" and refers to a single synthesizer  voice per MIDI channel.  It  has nothing to do with how many audio channels there might be (as in "monophonic" versus "stereophonic" recordings).<DD><DL><DT><B>Parameters:</B><DD><CODE>on</CODE> - <code>true</code> to turn mono mode on, <code>false</code> to  turn it off (which means turning poly mode on).<DT><B>See Also: </B><DD><A HREF="../../../javax/sound/midi/MidiChannel.html#getMono()"><CODE>getMono()</CODE></A>, <A HREF="../../../javax/sound/midi/VoiceStatus.html"><CODE>VoiceStatus</CODE></A></DL></DD></DL><HR><A NAME="getMono()"><!-- --></A><H3>getMono</H3><PRE>public boolean <B>getMono</B>()</PRE><DL><DD>Obtains the current mono/poly mode.<DD><DL><DT><B>Returns:</B><DD><code>true</code> if mono mode is on, otherwise  <code>false</code> (meaning poly mode is on).<DT><B>See Also: </B><DD><A HREF="../../../javax/sound/midi/MidiChannel.html#setMono(boolean)"><CODE>setMono(boolean)</CODE></A></DL></DD></DL><HR><A NAME="setOmni(boolean)"><!-- --></A><H3>setOmni</H3><PRE>public void <B>setOmni</B>(boolean&nbsp;on)</PRE><DL><DD>Turns omni mode on or off.  In omni mode, the channel responds to messages sent on all channels.  When omni is off, the channel responds only to messages sent on its channel number. The default is omni off.<DD><DL><DT><B>Parameters:</B><DD><CODE>on</CODE> - <code>true</code> to turn omni mode on, <code>false</code> to  turn it off.<DT><B>See Also: </B><DD><A HREF="../../../javax/sound/midi/MidiChannel.html#getOmni()"><CODE>getOmni()</CODE></A>, <A HREF="../../../javax/sound/midi/VoiceStatus.html"><CODE>VoiceStatus</CODE></A></DL></DD></DL><HR><A NAME="getOmni()"><!-- --></A><H3>getOmni</H3><PRE>public boolean <B>getOmni</B>()</PRE><DL><DD>Obtains the current omni mode status.<DD><DL><DT><B>Returns:</B><DD><code>true</code> if omni mode is on, otherwise  <code>false</code>.<DT><B>See Also: </B><DD><A HREF="../../../javax/sound/midi/MidiChannel.html#setOmni(boolean)"><CODE>setOmni(boolean)</CODE></A></DL></DD></DL><HR><A NAME="setMute(boolean)"><!-- --></A><H3>setMute</H3><PRE>public void <B>setMute</B>(boolean&nbsp;mute)</PRE><DL><DD>Sets the mute state for this channel. A value of <code>true</code> means the channel is to be muted, <code>false</code> means the channel can sound (if other channels are not soloed). <p>   Unlike <A HREF="../../../javax/sound/midi/MidiChannel.html#allSoundOff()"><CODE>allSoundOff()</CODE></A>, this method applies to only a specific channel, not to all channels.  Further, it silences not only currently sounding notes, but also subsequently  received notes.<DD><DL><DT><B>Parameters:</B><DD><CODE>mute</CODE> - the new mute state<DT><B>See Also: </B><DD><A HREF="../../../javax/sound/midi/MidiChannel.html#getMute()"><CODE>getMute()</CODE></A>, <A HREF="../../../javax/sound/midi/MidiChannel.html#setSolo(boolean)"><CODE>setSolo(boolean)</CODE></A></DL></DD></DL><HR><A NAME="getMute()"><!-- --></A><H3>getMute</H3><PRE>public boolean <B>getMute</B>()</PRE><DL><DD>Obtains the current mute state for this channel.<DD><DL><DT><B>Returns:</B><DD><code>true</code> the channel is muted, <code>false</code> if  not<DT><B>See Also: </B><DD><A HREF="../../../javax/sound/midi/MidiChannel.html#setMute(boolean)"><CODE>setMute(boolean)</CODE></A></DL></DD></DL><HR><A NAME="setSolo(boolean)"><!-- --></A><H3>setSolo</H3><PRE>public void <B>setSolo</B>(boolean&nbsp;soloState)</PRE><DL><DD>Sets the solo state for this channel. If <code>solo</code> is <code>true</code> only this channel and other soloed channels will sound. If <code>solo</code> is <code>false</code> then only other soloed channels will sound, unless no channels are soloed, in which case all unmuted channels will sound.<DD><DL><DT><B>Parameters:</B><DD><CODE>soloState</CODE> - new solo state for the channel<DT><B>See Also: </B><DD><A HREF="../../../javax/sound/midi/MidiChannel.html#getSolo()"><CODE>getSolo()</CODE></A>, <A HREF="../../../javax/sound/midi/MidiChannel.html#setMute(boolean)"><CODE>setMute(boolean)</CODE></A></DL></DD></DL><HR><A NAME="getSolo()"><!-- --></A><H3>getSolo</H3><PRE>public boolean <B>getSolo</B>()</PRE><DL><DD>Obtains the current solo state for this channel.<DD><DL><DT><B>Returns:</B><DD><code>true</code> if soloed, <code>false</code> if not<DT><B>See Also: </B><DD><A HREF="../../../javax/sound/midi/MidiChannel.html#setSolo(boolean)"><CODE>setSolo(boolean)</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>&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/MidiChannel.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/MetaEventListener.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../javax/sound/midi/MidiDevice.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="MidiChannel.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><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 + -