|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--quicktime.app.audio.NoteChannelControl
This class provides an implementation of the MusicPart interface for NoteChannel objects.
| Constructor Summary | |
NoteChannelControl(int gmNumber)
Create a new NoteChannelControl and a NoteChannel with the specified instrument and polyphony of 1. |
|
NoteChannelControl(int gmNumber,
int poly)
Create a new NoteChannelControl and a NoteChannel with the specified instrument and polyphony. |
|
NoteChannelControl(NoteChannel nc)
Create a new NoteChannelControl from the given NoteChannel |
|
| Method Summary | |
protected void |
finalize()
|
float |
getBalance()
This method gets the balance of the this object. |
java.lang.String |
getInstrumentName()
Returns the name of the current instrument for this part. |
NoteChannel |
getNoteChannel()
This method gets the NoteChannel being controlled by this object. |
float |
getVolume()
This method will get the volume of this object. |
boolean |
isMuted()
Returns the current mute status |
void |
playNoteFor(float note,
int velocity,
int duration)
Plays the supplied note for the given duration. |
void |
selectInstrument(java.lang.String prompt)
This method allows for the class to allow some selection process whereby the user would choose a particular instrument that will be consequently used by a MusicPart to produce the sounds that it plays. |
void |
setBalance(float val)
This method sets the balance of this object. |
void |
setMuted(boolean flag)
Allows the muting of the specific channel. |
void |
setVolume(float volume)
This method will set the volume of this object. |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public NoteChannelControl(int gmNumber) throws QTException
gmNumber - the specified general MIDI instrument numberpublic NoteChannelControl(int gmNumber, int poly) throws QTException
gmNumber - the specified general MIDI instrument numberpoly - the maximum number of notes that are expected to be played
by the NoteChannel at the same time.public NoteChannelControl(NoteChannel nc) throws QTException
nc - the given NoteChannel| Method Detail |
public boolean isMuted()
isMuted in interface AudioSpecpublic void setMuted(boolean flag) throws QTException
setMuted in interface AudioSpecflag - turn muting on - true or off - false.public void setVolume(float volume) throws QTException
setVolume in interface AudioSpecvolume - the desired volume (range: 0.0F - 1.0F)public float getVolume() throws QTException
getVolume in interface AudioSpecpublic void setBalance(float val) throws QTException
setBalance in interface ExtendedAudioSpecval - the desired balance (range: -1F -> 1F)public float getBalance() throws QTException
getBalance in interface ExtendedAudioSpecpublic void selectInstrument(java.lang.String prompt) throws QTException
selectInstrument in interface MusicPartprompt - - any information that the program wants to display
to the user to aid in the selection process.public java.lang.String getInstrumentName() throws QTException
getInstrumentName in interface MusicPartpublic final NoteChannel getNoteChannel()
getNoteChannel in interface MusicPartpublic void playNoteFor(float note, int velocity, int duration) throws QTException
note - the note to playvelocity - the intial volume of the note - how hard it is struck.duration - the number of milliseconds the note should play forprotected final void finalize() throws java.lang.Throwable
finalize in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||