SoundbankResource represents any audio resource stored in a
Soundbank. Common soundbank resources include:
Patch which specifies the MIDI program and
bank by which it may be referenced in MIDI messages. Instrument information
may be stored in Instrument objects.
Synthesizer to synthesize sound in response to MIDI commands, or
extracted for use by an application. (The terminology reflects musicians'
use of the word "sample" to refer collectively to a series of contiguous
audio samples or frames, rather than to a single, instantaneous sample.)
The data class for an audio sample will be an object that encapsulates
the audio sample data itself and information about how to interpret it
(the format of the audio data), such as an AudioInputStream.
Sequence.
Instruments and
samples in a Soundbank. A single Instrument can use multiple
SoundbankResources (typically for notes of dissimilar pitch or brightness).
Also, more than one Instrument can use the same sample.
| Modifier and Type | Field and Description |
|---|---|
| private final Class | dataClass
The class used to represent the sample's data. |
| private final String | name
The name of the |
| private final Soundbank | soundBank
The sound bank that contains the |
| Access | Constructor and Description |
|---|---|
| protected | SoundbankResource(Soundbank
the sound bank containing this
soundBank, String SoundbankResourcethe name of the sample name, Class<?> the class used to represent the sample's data dataClass)Constructs a new |
| Modifier and Type | Method and Description |
|---|---|
| public abstract Object | Returns: an object containing the sampled audio dataObtains the sampled audio that is stored in this
|
| public Class | Returns: the class used to represent the sample's data, or null if the data is not accessibleObtains the class used by this sample to represent its data. |
| public String | |
| public Soundbank | Returns: the sound bank in which thisSoundbankResource is storedObtains the sound bank that contains this |
| dataClass | back to summary |
|---|---|
| private final Class<?> dataClass The class used to represent the sample's data. | |
| name | back to summary |
|---|---|
| private final String name The name of the | |
| soundBank | back to summary |
|---|---|
| private final Soundbank soundBank The sound bank that contains the | |
| SoundbankResource | back to summary |
|---|---|
| protected SoundbankResource(Soundbank soundBank, String name, Class<?> dataClass) Constructs a new
| |
| getData | back to summary |
|---|---|
| public abstract Object getData() Obtains the sampled audio that is stored in this
| |
| getDataClass | back to summary |
|---|---|
| public Class Obtains the class used by this sample to represent its data. The object
returned by
| |
| getName | back to summary |
|---|---|
| public String getName() Obtains the name of the resource. This should generally be a string descriptive of the resource.
| |
| getSoundbank | back to summary |
|---|---|
| public Soundbank getSoundbank() Obtains the sound bank that contains this
| |