APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.media.sound

public final Class SF2Instrument

extends ModelInstrument
Class Inheritance
Imports
java.util.ArrayList, .HashMap, .List, .Map, javax.sound.midi.Patch

Soundfont instrument.
Author
Karl Helgason

Field Summary

Modifier and TypeField and Description
pack-priv int
pack-priv long
pack-priv SF2GlobalRegion
pack-priv long
pack-priv long
pack-priv String
pack-priv int
pack-priv List<SF2InstrumentRegion>

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
private void
addTimecentValue(ModelPerformer performer, ModelIdentifier dest, short value)

private void
addValue(ModelPerformer performer, ModelIdentifier dest, short value)

private void
addValue(ModelPerformer performer, ModelIdentifier dest, double value)

pack-priv static ModelDestination
convertDestination(int dst, double[] amountcorrection, ModelSource[] extrasrc)

private void
private static ModelSource
convertSource(int src)

public Object
getData()

Implements abstract javax.sound.midi.SoundbankResource.getData.

Obtains the sampled audio that is stored in this SoundbankResource.

private short
getGeneratorValue(Map<Integer, Short> generators, int gen)

public long
public SF2GlobalRegion
public long
public long
public String
getName()

Overrides javax.sound.midi.SoundbankResource.getName.

Obtains the name of the resource.

public Patch
getPatch()

Overrides javax.sound.midi.Instrument.getPatch.

Obtains the Patch object that indicates the bank and program numbers where this instrument is to be stored in the synthesizer.

public ModelPerformer[]
public List<SF2InstrumentRegion>
public void
setGenre(long genre)

public void
public void
setLibrary(long library)

public void
setMorphology(long morphology)

public void
public void
setPatch(Patch patch)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from com.sun.media.sound.ModelInstrument:
getChannelMixergetChannelsgetDirectorgetKeysgetPatchAlias

Field Detail

bankback to summary
pack-priv int bank
genreback to summary
pack-priv long genre
globalregionback to summary
pack-priv SF2GlobalRegion globalregion
libraryback to summary
pack-priv long library
morphologyback to summary
pack-priv long morphology
nameback to summary
pack-priv String name

Hides javax.sound.midi.SoundbankResource.name.

presetback to summary
pack-priv int preset
regionsback to summary
pack-priv List<SF2InstrumentRegion> regions

Constructor Detail

SF2Instrumentback to summary
public SF2Instrument()
SF2Instrumentback to summary
public SF2Instrument(SF2Soundbank soundbank)

Method Detail

addTimecentValueback to summary
private void addTimecentValue(ModelPerformer performer, ModelIdentifier dest, short value)
addValueback to summary
private void addValue(ModelPerformer performer, ModelIdentifier dest, short value)
addValueback to summary
private void addValue(ModelPerformer performer, ModelIdentifier dest, double value)
convertDestinationback to summary
pack-priv static ModelDestination convertDestination(int dst, double[] amountcorrection, ModelSource[] extrasrc)
convertModulatorback to summary
private void convertModulator(ModelPerformer performer, SF2Modulator modulator)
convertSourceback to summary
private static ModelSource convertSource(int src)
getDataback to summary
public Object getData()

Implements abstract javax.sound.midi.SoundbankResource.getData.

Doc from javax.sound.midi.SoundbankResource.getData.

Obtains the sampled audio that is stored in this SoundbankResource. The type of object returned depends on the implementation of the concrete class, and may be queried using getDataClass.

Annotations
@Override
getGeneratorValueback to summary
private short getGeneratorValue(Map<Integer, Short> generators, int gen)
getGenreback to summary
public long getGenre()
getGlobalRegionback to summary
public SF2GlobalRegion getGlobalRegion()
getLibraryback to summary
public long getLibrary()
getMorphologyback to summary
public long getMorphology()
getNameback to summary
public String getName()

Overrides javax.sound.midi.SoundbankResource.getName.

Doc from javax.sound.midi.SoundbankResource.getName.

Obtains the name of the resource. This should generally be a string descriptive of the resource.

Annotations
@Override
getPatchback to summary
public Patch getPatch()

Overrides javax.sound.midi.Instrument.getPatch.

Doc from javax.sound.midi.Instrument.getPatch.

Obtains the Patch object that indicates the bank and program numbers where this instrument is to be stored in the synthesizer.

Annotations
@Override
getPerformersback to summary
public ModelPerformer[] getPerformers()

Overrides com.sun.media.sound.ModelInstrument.getPerformers.

Annotations
@Override
getRegionsback to summary
public List<SF2InstrumentRegion> getRegions()
setGenreback to summary
public void setGenre(long genre)
setGlobalZoneback to summary
public void setGlobalZone(SF2GlobalRegion zone)
setLibraryback to summary
public void setLibrary(long library)
setMorphologyback to summary
public void setMorphology(long morphology)
setNameback to summary
public void setName(String name)
setPatchback to summary
public void setPatch(Patch patch)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override