quicktime.app.audio
Class NoteChannelControl

java.lang.Object
  |
  +--quicktime.app.audio.NoteChannelControl
All Implemented Interfaces:
AudioSpec, ExtendedAudioSpec, MusicPart

Deprecated. since QTJava 6.1

public class NoteChannelControl
extends java.lang.Object
implements MusicPart

This class provides an implementation of the MusicPart interface for NoteChannel objects.


Constructor Summary
NoteChannelControl(int gmNumber)
          Deprecated. since QTJava 6.1
NoteChannelControl(int gmNumber, int poly)
          Deprecated. since QTJava 6.1
NoteChannelControl(NoteChannel nc)
          Deprecated. since QTJava 6.1
 
Method Summary
protected  void finalize()
          Deprecated.  
 float getBalance()
          Deprecated. since QTJava 6.1
 java.lang.String getInstrumentName()
          Deprecated. since QTJava 6.1
 NoteChannel getNoteChannel()
          Deprecated. since QTJava 6.1
 float getVolume()
          Deprecated. since QTJava 6.1
 boolean isMuted()
          Deprecated. since QTJava 6.1
 void playNoteFor(float note, int velocity, int duration)
          Deprecated. since QTJava 6.1
 void selectInstrument(java.lang.String prompt)
          Deprecated. since QTJava 6.1
 void setBalance(float val)
          Deprecated. since QTJava 6.1
 void setMuted(boolean flag)
          Deprecated. since QTJava 6.1
 void setVolume(float volume)
          Deprecated. since QTJava 6.1
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NoteChannelControl

public NoteChannelControl(int gmNumber)
                   throws QTException
Deprecated. since QTJava 6.1

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
Deprecated. since QTJava 6.1

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
Deprecated. since QTJava 6.1

Create a new NoteChannelControl from the given NoteChannel

Parameters:
nc - the given NoteChannel
Method Detail

isMuted

public boolean isMuted()
Deprecated. since QTJava 6.1

Returns the current mute status

Specified by:
isMuted in interface AudioSpec
Returns:
the current mute status

setMuted

public void setMuted(boolean flag)
              throws QTException
Deprecated. since QTJava 6.1

Allows the muting of the specific channel. When unmuted the AudioSpec object will return to its current volume setting.

Specified by:
setMuted in interface AudioSpec
Parameters:
flag - turn muting on - true or off - false.
QTException

setVolume

public void setVolume(float volume)
               throws QTException
Deprecated. since QTJava 6.1

This method will set the volume of this object.

Specified by:
setVolume in interface AudioSpec
Parameters:
volume - the desired volume (range: 0.0F - 1.0F)
QTException

getVolume

public float getVolume()
                throws QTException
Deprecated. since QTJava 6.1

This method will get the volume of this object. (range: 0.0 - 1.0)

Specified by:
getVolume in interface AudioSpec
Returns:
the current volume.
QTException

setBalance

public void setBalance(float val)
                throws QTException
Deprecated. since QTJava 6.1

This method sets the balance of this object.

Specified by:
setBalance in interface ExtendedAudioSpec
Parameters:
val - the desired balance (range: -1F -> 1F)
QTException

getBalance

public float getBalance()
                 throws QTException
Deprecated. since QTJava 6.1

This method gets the balance of the this object. (range: -1.0 -> 1.0)

Specified by:
getBalance in interface ExtendedAudioSpec
Returns:
the balance
QTException

selectInstrument

public void selectInstrument(java.lang.String prompt)
                      throws QTException
Deprecated. since QTJava 6.1

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.

Specified by:
selectInstrument in interface MusicPart
Parameters:
prompt - - any information that the program wants to display to the user to aid in the selection process.
QTException

getInstrumentName

public java.lang.String getInstrumentName()
                                   throws QTException
Deprecated. since QTJava 6.1

Returns the name of the current instrument for this part.

Specified by:
getInstrumentName in interface MusicPart
Returns:
name of the current instrument for this part
QTException

getNoteChannel

public final NoteChannel getNoteChannel()
Deprecated. since QTJava 6.1

This method gets the NoteChannel being controlled by this object.

Specified by:
getNoteChannel in interface MusicPart
Returns:
the NoteChannel

playNoteFor

public void playNoteFor(float note,
                        int velocity,
                        int duration)
                 throws QTException
Deprecated. since QTJava 6.1

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
QTException

finalize

protected final void finalize()
                       throws java.lang.Throwable
Deprecated. 
Overrides:
finalize in class java.lang.Object
java.lang.Throwable