|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--quicktime.QTObject | +--quicktime.std.music.NoteChannel
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.
Field Summary | |
static float |
kMicroControllerResolution
The smallest step that will effect a change in controller resolution |
static float |
kMicrotonalResolution
The smallest microtone is a semitone / 128. |
Fields inherited from interface quicktime.jdirect.QuickTimeLib |
JDirect_MacOSX, libraryInstance, name |
Constructor Summary | |
NoteChannel(int gmNumber,
int poly)
Creates a new NoteChannel object with the request instrument and polyphony. |
|
NoteChannel(NoteAllocator na,
int gmNumber)
Creates a new NoteChannel object. |
|
NoteChannel(NoteAllocator na,
NoteRequest nr)
Creates a new NoteChannel object. |
|
NoteChannel(NoteRequest nr)
Creates a new NoteChannel object using the default NoteAllocator QuickTime::NANewNoteChannel |
Method Summary | |
int |
findTone(ToneDescription td)
Locate the best fitting instrument number for the given ToneDescription. |
float |
getController(int controllerNumber)
Retrieves the current value for the specified controller The micro controller resolution is 128 steps (kMicroControllerResolution) per semitone. |
int |
getIndexInfo()
Returns the index of the NoteAllocator of the MusicComponent that is used by this NoteChannel. |
int |
getKnob(int knobNumber)
Returns the value of a knob for the note channel. |
MusicComponent |
getMusicComponent()
Returns the Music component in use by the note channel. |
NoteAllocator |
getNoteAllocator()
Returns the NoteAllocator that owns this NoteChannel |
NoteRequest |
getNoteRequest()
Get the NoteRequest that corresponds to this NoteChannel. |
int |
getPartInfo()
Returns the part number within the NoteChannel's MusicComponent that corresponds to this channel. |
void |
pickEditInstrument(java.lang.String prompt,
int flags)
Presents a user interface for changing the instrument used by the note channel. |
void |
playNote(float pitch,
int velocity)
Plays a musical note with given pitch and velocity. |
void |
playNoteCents(int noteNumber,
int cents,
int velocity)
Plays a musical note with given pitch and velocity. |
void |
playNoteRaw(int pitch,
int velocity)
Plays a musical note with given pitch and velocity. |
void |
preroll()
Will attempt to re-allocate the note channel if it was invalid previously. |
void |
reset()
Turns off all currently sounding notes, and resets all controllers to their default values. |
void |
sendMIDI(MusicMIDIPacket mp)
Get the NoteRequest that corresponds to this NoteChannel. |
void |
setAtomicInstrument(AtomicInstrument instrument,
int flags)
Initialises a note channel with an atomic instrument. |
void |
setBalance(int balance)
Modifies the pan controller setting for the note channel. |
void |
setController(int controllerNumber,
float controllerValue)
Changes the specified controller to the specified value. |
void |
setControllerRaw(int controllerNumber,
int controllerValue)
Changes the specified controller to the specified value. |
void |
setInstrumentNumber(int instrumentNumber)
Change the instrument setting to the specified instrument number. |
void |
setKnob(int knobNumber,
int knobValue)
Sets the value of a knob for the note channel. |
void |
setSoundLocalization(SoundLocalization slData)
Passes sound localization data to a note channel. |
void |
setVolume(float volume)
Sets the volume on the note channel. |
void |
unroll()
Marks a note channel as available to be stolen. |
Methods inherited from class quicktime.QTObject |
disposeQTObject, equals, ID, toString |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final float kMicrotonalResolution
public static final float kMicroControllerResolution
Constructor Detail |
public NoteChannel(int gmNumber, int poly) throws QTException
na
- the NoteAllocator component instance to usenr
- attributes of note requestpublic NoteChannel(NoteRequest nr) throws QTException
na
- the NoteAllocator component instance to usenr
- attributes of note requestpublic NoteChannel(NoteAllocator na, NoteRequest nr) throws QTException
na
- the NoteAllocator component instance to usenr
- attributes of note requestpublic NoteChannel(NoteAllocator na, int gmNumber) throws QTException
na
- the NoteAllocator component instance to usegmNumber
- the general MIDI number for the desired instrumentMethod Detail |
public final NoteAllocator getNoteAllocator()
public final int getIndexInfo() throws StdQTException
public final int getPartInfo() throws StdQTException
public MusicComponent getMusicComponent() throws StdQTException
public final void preroll() throws StdQTException
public final void unroll() throws StdQTException
public final void reset() throws StdQTException
public final void setVolume(float volume) throws StdQTException
volume
- volume valuepublic final void setBalance(int balance) throws StdQTException
balance
- pan value (-128 left, to 128 right)public final void playNoteRaw(int pitch, int velocity) throws StdQTException
pitch
- MIDI pitch values (0 to 127, 60 is middle C)velocity
- velocity of note, where 0 = silence - note off.public final void playNoteCents(int noteNumber, int cents, int velocity) throws StdQTException
noteNumber
- 0 -> 127 correspond to MIDI note numbers (60 is middle C).cents
- 0 -> 100 correspond to the division of a semitone into 100 logarithmically equal segments.velocity
- velocity of note, where 0 = silence - note off.public final void playNote(float pitch, int velocity) throws StdQTException
pitch
- 1.000 -> 127.999 correspond to MIDI note numbers (60 is middle C).velocity
- velocity of note, where 0 = silence - note off.public final float getController(int controllerNumber) throws StdQTException
controllerNumber
- which controllercontrollerValue
- the new controller value, range -128.000 to 127.999public final void setControllerRaw(int controllerNumber, int controllerValue) throws StdQTException
controllerNumber
- which controllercontrollerValue
- the new controller value,
dealing with raw controller values, which have the full range of a short (-32768 to 32767)public final void setController(int controllerNumber, float controllerValue) throws StdQTException
controllerNumber
- which controllercontrollerValue
- the new controller value, range -128.000 to 127.999public final int getKnob(int knobNumber) throws StdQTException
knobNumber
- index or ID of the knobpublic final void setKnob(int knobNumber, int knobValue) throws StdQTException
knobNumber
- index or ID of the knobknobValue
- the value of the knobpublic final int findTone(ToneDescription td) throws StdQTException
td
- description for instrument fitpublic final void setAtomicInstrument(AtomicInstrument instrument, int flags) throws StdQTException
instrument
- the AtomicInstrument to set the channel to.flags
- use the set flags from Atomic instrument.public final void setInstrumentNumber(int instrumentNumber) throws StdQTException
instrumentNumber
- instrument number to applypublic final NoteRequest getNoteRequest() throws QTException
public final void pickEditInstrument(java.lang.String prompt, int flags) throws StdQTException
prompt
- Dialog box prompt "New Instrument..."flags
- flags to limit user optionspublic final void sendMIDI(MusicMIDIPacket mp) throws StdQTException
public final void setSoundLocalization(SoundLocalization slData) throws StdQTException
slData
- sound localization data
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |