Instrumentpublic abstract class SoundbankResource extends Object
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 | Constructor | Description | 
|---|---|---|
| protected  | Constructs a new  SoundbankResourcefrom the given sound bank and wavetable index. | 
| Modifier and Type | Method | Description | 
|---|---|---|
| abstract Object | getData() | Obtains the sampled audio that is stored in this  SoundbankResource. | 
| Class | getDataClass() | Obtains the class used by this sample to represent its data. | 
| String | getName() | Obtains the name of the resource. | 
| Soundbank | getSoundbank() | Obtains the sound bank that contains this  SoundbankResource. | 
protected SoundbankResource(Soundbank soundBank, String name, Class<?> dataClass)
SoundbankResource from the given sound bank and wavetable index. (Setting the SoundbankResource's name, sampled audio data, and instruments is a subclass responsibility.)soundBank - the sound bank containing this SoundbankResource
name - the name of the sampledataClass - the class used to represent the sample's datapublic Soundbank getSoundbank()
SoundbankResource.SoundbankResource is storedpublic String getName()
public Class<?> getDataClass()
getData will be of this class. If this SoundbankResource object does not support direct access to its data, returns null.public abstract Object getData()
SoundbankResource. The type of object returned depends on the implementation of the concrete class, and may be queried using getDataClass.
    © 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
    https://docs.oracle.com/en/java/javase/21/docs/api/java.desktop/javax/sound/midi/SoundbankResource.html