Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## quicktime.std.music
Class MusicComponent

    java.lang.Object
      |
      +--quicktime.QTObject
            |
            +--quicktime.std.comp.ComponentIdentifier
                  |
                  +--quicktime.std.comp.Component
                        |
                        +--quicktime.std.music.MusicComponent

All Implemented Interfaces:
  quicktime.jdirect.InterfaceLib, quicktime.jdirect.PrimitivesLib, quicktime.jdirect.QuickTimeLib, com.apple.jdirect.SharedLibrary, quicktime.jdirect.SharedLibrary

public final class MusicComponent
extends Component
implements quicktime.jdirect.QuickTimeLib

Corresponds to an instance of the MusicComponent component type. Typically an applications uses either the NoteChannel or a movie to playback QTMA data. A NoteChannel corresponds to a part in the MusicComponent that it is using (as dictated by the NoteRequest used to create the NoteChannel).

The NoteAllocator keeps an indexed list of each unique MusicComponent that is in use by the system. The Application can call the NoteChannel.getIndexInfo() call to get the index within the NoteAllocator that can then be used to retrieve the MusicComponent that the NoteChannel is using. (There is also a call NoteChannel.getMusicComponent() that will return the actual MusicComponent instance).

There are three calls that require a part number to be known (ie. this is the part number within a MusicComponent that a particular note channel is using), and in those cases the application can use the NoteChannel.getPartInfo() to return that part number. This can then be used in the MusicComponent calls that require a part number to be supplied.

Fields inherited from interface quicktime.jdirect.QuickTimeLib
`JDirect_MacOSX, libraryInstance, name`

Constructor Summary
`MusicComponent()` Deprecated. should use NoteAllocator calls to get a MusicComponent Instance
`MusicComponent(int subType)` Deprecated. should use NoteAllocator calls to get a MusicComponent Instance

Method Summary
`SynthesizerDescription` | `getDescription()` Returns a structure describing the synthesizer controlled by the music component device.
`KnobDescription` | `getDrumKnobDescrption(int knobIndex)` Returns a Drum knob description for the specified knob index or knob ID for the MusicComponent.
`KnobDescription` | `getInstrumentKnobDescrption(int knobIndex)` Returns a Instrument knob description for the specified knob index or knob ID for the MusicComponent.
`int` | `getKnob(int knobID)` Returns the value of the specified global synthesizer knob.
`KnobDescription` | `getKnobDescrption(int knobIndex)` Returns a knob description for the specified global knob index or knob ID for the MusicComponent.
`float` | `getMasterTune()` Returns a value in semitones, which is the synthesizerÕs master tuning.
`AtomicInstrument` | `getPartAtomicInstrument(int part, int flags)` Returns the AtomicInstrument that is set for that part.
`java.lang.String` | `getPartName(int part)` Returns a part's name.
`void` | `setKnob(int knobID, int knobValue)` Sets the value of a global knob for a synthesiser.
`void` | `setMasterTune(float masterTune)` Sets a value in semitones, which is the synthesizerÕs master tuning.
`void` | `setPartName(int part, java.lang.String name)` Sets a part's name.

Methods inherited from class quicktime.std.comp.Component
`count`

Methods inherited from class quicktime.std.comp.ComponentIdentifier
`find, find, getInfo, toString`

Methods inherited from class quicktime.QTObject
`disposeQTObject, equals, ID`

Methods inherited from class java.lang.Object
`getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### MusicComponent

    public MusicComponent()
                   throws QTException

  Deprecated. should use NoteAllocator calls to get a MusicComponent Instance

  Opens the MusicComponent component.
  QuickTime::OpenADefaultComponent

  ### MusicComponent

      public MusicComponent(int subType)
                     throws QTException

    Deprecated. should use NoteAllocator calls to get a MusicComponent Instance

    Opens the MusicComponent component with a specified subType.
    QuickTime::OpenADefaultComponent

    Method Detail

    ### getDescription

        public SynthesizerDescription getDescription()
                                              throws StdQTException

      Returns a structure describing the synthesizer controlled by the music component device.
    Returns:
      a SynthesizerDescription

  ### getPartAtomicInstrument

      public AtomicInstrument getPartAtomicInstrument(int part,
                                                      int flags)
                                               throws StdQTException

    Returns the AtomicInstrument that is set for that part. If not set, this method can return null.
  Parameters:
    `part` - the part
    `flags` - Specify what pieces of information about an atomic instrument the caller is interested in.
  Returns:
    the AtomicInstrument

### getKnob

    public int getKnob(int knobID)
                throws StdQTException

  Returns the value of the specified global synthesizer knob. A global knob controls an aspect of the entire synthesizer. It is not specific to a part within the synthesizer.

  Parameters:
    `knobID` - the knob id
  Returns:
    the knob value

### setKnob

    public void setKnob(int knobID,
                        int knobValue)
                 throws StdQTException

  Sets the value of a global knob for a synthesiser.

  Parameters:
    `knobID` - the knob id
    `knobValue` - the knob value

### getPartName

    public java.lang.String getPartName(int part)
                                 throws StdQTException

  Returns a part's name.

  Parameters:
    `part` - the part
  Returns:
    the name

### setPartName

    public void setPartName(int part,
                            java.lang.String name)
                     throws StdQTException

  Sets a part's name.

  Parameters:
    `part` - the part
    `name` - the name

### setMasterTune

    public void setMasterTune(float masterTune)
                       throws StdQTException

  Sets a value in semitones, which is the synthesizerÕs master tuning.

  Parameters:
    `masterTune` - the new tuning

### getMasterTune

    public float getMasterTune()
                        throws StdQTException

  Returns a value in semitones, which is the synthesizerÕs master tuning.

  Returns:
    tuning

### getInstrumentKnobDescrption

    public KnobDescription getInstrumentKnobDescrption(int knobIndex)
                                                throws StdQTException

  Returns a Instrument knob description for the specified knob index or knob ID for the MusicComponent.

  Parameters:
    `knobIndex` - the knob index to get
  Returns:
    a KnobDescription

### getDrumKnobDescrption

    public KnobDescription getDrumKnobDescrption(int knobIndex)
                                          throws StdQTException

  Returns a Drum knob description for the specified knob index or knob ID for the MusicComponent.

  Parameters:
    `knobIndex` - the knob index to get
  Returns:
    a KnobDescription

### getKnobDescrption

    public KnobDescription getKnobDescrption(int knobIndex)
                                      throws StdQTException

  Returns a knob description for the specified global knob index or knob ID for the MusicComponent.

  Parameters:
    `knobIndex` - the knob index to get
  Returns:
    a KnobDescription

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD