All Packages Class Hierarchy This Package Previous Next Index
Class quicktime.app.audio.NoteChannelControl
java.lang.Object
|
+----quicktime.app.audio.NoteChannelControl
- public class NoteChannelControl
- extends Object
- implements MusicPart
This class provides an implementation of the MusicPart interface for NoteChannel
objects.
-
NoteChannelControl(int)
- Create a new NoteChannelControl and a NoteChannel
with the specified instrument and polyphony of 1.
-
NoteChannelControl(int, int)
- Create a new NoteChannelControl and a NoteChannel
with the specified instrument and polyphony.
-
NoteChannelControl(NoteChannel)
- Create a new NoteChannelControl from the given NoteChannel
-
getBalance()
- This method gets the balance of the this object.
-
getInstrumentName()
-
Returns the name of the current instrument for this part.
-
getNoteChannel()
- This method gets the NoteChannel being controlled by this object.
-
getVolume()
- This method will get the volume of this object.
-
isMuted()
- Returns the current mute status
-
playNoteFor(float, int, int)
- Plays the supplied note for the given duration.
-
selectInstrument(String)
- 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.
-
setBalance(float)
- This method sets the balance of this object.
-
setMuted(boolean)
- Allows the muting of the specific channel.
-
setVolume(float)
- This method will set the volume of this object.
NoteChannelControl
public NoteChannelControl(int gmNumber) throws QTException
- Create a new NoteChannelControl and a NoteChannel
with the specified instrument and polyphony of 1. The resultant
NoteChannel maybe able to play more than one note simultaneously.
- Parameters:
- gmNumber - the specified general MIDI instrument number
NoteChannelControl
public NoteChannelControl(int gmNumber,
int poly) throws QTException
- Create a new NoteChannelControl and a NoteChannel
with the specified instrument and polyphony.
- Parameters:
- gmNumber - the specified general MIDI instrument number
- poly - the maximum number of notes that are expected to be played
by the NoteChannel at the same time.
NoteChannelControl
public NoteChannelControl(NoteChannel nc) throws QTException
- Create a new NoteChannelControl from the given NoteChannel
- Parameters:
- nc - the given NoteChannel
isMuted
public boolean isMuted()
- Returns the current mute status
- Returns:
- the current mute status
setMuted
public void setMuted(boolean flag) throws QTException
- Allows the muting of the specific channel. When unmuted the AudioSpec object will return
to its current volume setting.
- Parameters:
- flag - turn muting on - true or off - false.
setVolume
public void setVolume(float volume) throws QTException
- This method will set the volume of this object.
- Parameters:
- volume - the desired volume (range: 0.0F - 1.0F)
getVolume
public float getVolume() throws QTException
- This method will get the volume of this object. (range: 0.0 - 1.0)
- Returns:
- the current volume.
setBalance
public void setBalance(float val) throws QTException
- This method sets the balance of this object.
- Parameters:
- val - the desired balance (range: -1F -> 1F)
getBalance
public float getBalance() throws QTException
- This method gets the balance of the this object. (range: -1.0 -> 1.0)
- Returns:
- the balance
selectInstrument
public void selectInstrument(String prompt) throws QTException
- 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.
- Parameters:
- prompt - - any information that the program wants to display
to the user to aid in the selection process.
getInstrumentName
public String getInstrumentName() throws QTException
- Returns the name of the current instrument for this part.
- Returns:
- name of the current instrument for this part
getNoteChannel
public final NoteChannel getNoteChannel()
- This method gets the NoteChannel being controlled by this object.
- Returns:
- the NoteChannel
playNoteFor
public void playNoteFor(float note,
int velocity,
int duration) throws QTException
- Plays the supplied note for the given duration.
- Parameters:
- note - the note to play
- velocity - the intial volume of the note - how hard it is struck.
- duration - the number of milliseconds the note should play for
All Packages Class Hierarchy This Package Previous Next Index