📄 notechannel.html
字号:
<!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 Mon Jul 15 11:50:58 PDT 2002 --><TITLE>: Class NoteChannel</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> </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/NoteChannel.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-all.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></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../quicktime/std/music/NoteAllocator.html"><B>PREV CLASS</B></A> <A HREF="../../../quicktime/std/music/NoteRequest.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="NoteChannel.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">quicktime.std.music</FONT><BR>Class NoteChannel</H2><PRE>java.lang.Object | +--<A HREF="../../../quicktime/QTObject.html">quicktime.QTObject</A> | +--<B>quicktime.std.music.NoteChannel</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../quicktime/jdirect/InterfaceLib.html">InterfaceLib</A>, <A HREF="../../../quicktime/jdirect/PrimitivesLib.html">PrimitivesLib</A>, <A HREF="../../../quicktime/jdirect/QuickTimeLib.html">QuickTimeLib</A>, <A HREF="../../../quicktime/jdirect/SharedLibrary.html">SharedLibrary</A>, com.apple.jdirect.SharedLibrary</DD></DL><HR><DL><DT>public final class <B>NoteChannel</B><DT>extends <A HREF="../../../quicktime/QTObject.html">QTObject</A><DT>implements <A HREF="../../../quicktime/jdirect/QuickTimeLib.html">QuickTimeLib</A></DL><P>Note channels are used to play notes. The application can either provide the NoteAllocator component for the NoteChanel or can allow the system to create a default one.<P><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static float</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/std/music/NoteChannel.html#kMicroControllerResolution">kMicroControllerResolution</A></B></CODE><BR> The smallest step that will effect a change in controller resolution</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static float</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/std/music/NoteChannel.html#kMicrotonalResolution">kMicrotonalResolution</A></B></CODE><BR> The smallest microtone is a semitone / 128.</TD></TR></TABLE> <A NAME="fields_inherited_from_class_quicktime.jdirect.QuickTimeLib"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from interface quicktime.jdirect.<A HREF="../../../quicktime/jdirect/QuickTimeLib.html">QuickTimeLib</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../quicktime/jdirect/QuickTimeLib.html#JDirect_MacOSX">JDirect_MacOSX</A>, <A HREF="../../../quicktime/jdirect/QuickTimeLib.html#libraryInstance">libraryInstance</A>, <A HREF="../../../quicktime/jdirect/QuickTimeLib.html#name">name</A></CODE></TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../quicktime/std/music/NoteChannel.html#NoteChannel(int, int)">NoteChannel</A></B>(int gmNumber, int poly)</CODE><BR> Creates a new NoteChannel object with the request instrument and polyphony.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../quicktime/std/music/NoteChannel.html#NoteChannel(quicktime.std.music.NoteAllocator, int)">NoteChannel</A></B>(<A HREF="../../../quicktime/std/music/NoteAllocator.html">NoteAllocator</A> na, int gmNumber)</CODE><BR> Creates a new NoteChannel object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../quicktime/std/music/NoteChannel.html#NoteChannel(quicktime.std.music.NoteAllocator, quicktime.std.music.NoteRequest)">NoteChannel</A></B>(<A HREF="../../../quicktime/std/music/NoteAllocator.html">NoteAllocator</A> na, <A HREF="../../../quicktime/std/music/NoteRequest.html">NoteRequest</A> nr)</CODE><BR> Creates a new NoteChannel object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../quicktime/std/music/NoteChannel.html#NoteChannel(quicktime.std.music.NoteRequest)">NoteChannel</A></B>(<A HREF="../../../quicktime/std/music/NoteRequest.html">NoteRequest</A> nr)</CODE><BR> Creates a new NoteChannel object using the default NoteAllocator <BR><BR><b> <a href="http://developer.apple.com/techpubs/quicktime/qtdevdocs/REF/tp_qtma_qtmaref.37.htm#32754">QuickTime::NANewNoteChannel</a> </b><BR><BR></TR></TABLE> <!-- ========== 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> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/std/music/NoteChannel.html#findTone(quicktime.std.music.ToneDescription)">findTone</A></B>(<A HREF="../../../quicktime/std/music/ToneDescription.html">ToneDescription</A> td)</CODE><BR> Locate the best fitting instrument number for the given ToneDescription.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> float</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/std/music/NoteChannel.html#getController(int)">getController</A></B>(int controllerNumber)</CODE><BR> Retrieves the current value for the specified controller The micro controller resolution is 128 steps (kMicroControllerResolution) per semitone.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/std/music/NoteChannel.html#getIndexInfo()">getIndexInfo</A></B>()</CODE><BR> Returns the index of the NoteAllocator of the MusicComponent that is used by this NoteChannel.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/std/music/NoteChannel.html#getKnob(int)">getKnob</A></B>(int knobNumber)</CODE><BR> Returns the value of a knob for the note channel.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../quicktime/std/music/MusicComponent.html">MusicComponent</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/std/music/NoteChannel.html#getMusicComponent()">getMusicComponent</A></B>()</CODE><BR> Returns the Music component in use by the note channel.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../quicktime/std/music/NoteAllocator.html">NoteAllocator</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/std/music/NoteChannel.html#getNoteAllocator()">getNoteAllocator</A></B>()</CODE><BR> Returns the NoteAllocator that owns this NoteChannel</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../quicktime/std/music/NoteRequest.html">NoteRequest</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/std/music/NoteChannel.html#getNoteRequest()">getNoteRequest</A></B>()</CODE><BR> Get the NoteRequest that corresponds to this NoteChannel.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/std/music/NoteChannel.html#getPartInfo()">getPartInfo</A></B>()</CODE><BR> Returns the part number within the NoteChannel's MusicComponent that corresponds to this channel.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/std/music/NoteChannel.html#pickEditInstrument(java.lang.String, int)">pickEditInstrument</A></B>(java.lang.String prompt, int flags)</CODE><BR> Presents a user interface for changing the instrument used by the note channel.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/std/music/NoteChannel.html#playNote(float, int)">playNote</A></B>(float pitch, int velocity)</CODE><BR> Plays a musical note with given pitch and velocity.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/std/music/NoteChannel.html#playNoteCents(int, int, int)">playNoteCents</A></B>(int noteNumber, int cents, int velocity)</CODE><BR> Plays a musical note with given pitch and velocity.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/std/music/NoteChannel.html#playNoteRaw(int, int)">playNoteRaw</A></B>(int pitch, int velocity)</CODE><BR> Plays a musical note with given pitch and velocity.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/std/music/NoteChannel.html#preroll()">preroll</A></B>()</CODE><BR> Will attempt to re-allocate the note channel if it was invalid previously.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/std/music/NoteChannel.html#reset()">reset</A></B>()</CODE><BR> Turns off all currently sounding notes, and resets all controllers to their default values.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/std/music/NoteChannel.html#sendMIDI(quicktime.std.music.MusicMIDIPacket)">sendMIDI</A></B>(<A HREF="../../../quicktime/std/music/MusicMIDIPacket.html">MusicMIDIPacket</A> mp)</CODE><BR> Get the NoteRequest that corresponds to this NoteChannel.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/std/music/NoteChannel.html#setAtomicInstrument(quicktime.std.music.AtomicInstrument, int)">setAtomicInstrument</A></B>(<A HREF="../../../quicktime/std/music/AtomicInstrument.html">AtomicInstrument</A> instrument, int flags)</CODE><BR> Initialises a note channel with an atomic instrument.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/std/music/NoteChannel.html#setBalance(int)">setBalance</A></B>(int balance)</CODE><BR>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -