This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.sound.midi
class SoundbankResource

java.lang.Object extended by javax.sound.midi.SoundbankResource
Direct Known Subclasses:
Instrument

public abstract class SoundbankResource
extends Object

A SoundbankResource represents any audio resource stored in a {@link Soundbank}. Common soundbank resources include:

Synthesizers that use wavetable synthesis or related techniques play back the audio in a sample when synthesizing notes, often when emulating the real-world instrument that was originally recorded. However, there is not necessarily a one-to-one correspondence between the 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.


Constructor Summary
protected
SoundbankResource(Soundbank soundBank, String name, Class dataClass)

          Constructs a new SoundbankResource from the given sound bank and wavetable index.
 
Method Summary
abstract Object

          Obtains the sampled audio that is stored in this SoundbankResource.
 Class

          Obtains the class used by this sample to represent its data.
 String

          Obtains the name of the resource.
 Soundbank

          Obtains the sound bank that contains this SoundbankResource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SoundbankResource

protected SoundbankResource(Soundbank soundBank,
                            String name,
                            Class dataClass)
Constructs a new SoundbankResource from the given sound bank and wavetable index. (Setting the SoundbankResource's name, sampled audio data, and instruments is a subclass responsibility.)

Parameters:
soundBank - the sound bank containing this SoundbankResource
name - the name of the sample
dataClass - the class used to represent the sample's data
Method Detail

getData

public abstract Object 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.

Returns:
an object containing the sampled audio data

getDataClass

public Class getDataClass()
Obtains the class used by this sample to represent its data. The object returned by getData will be of this class. If this SoundbankResource object does not support direct access to its data, returns null.

Returns:
the class used to represent the sample's data, or null if the data is not accessible

getName

public String getName()
Obtains the name of the resource. This should generally be a string descriptive of the resource.

Returns:
the instrument's name

getSoundbank

public Soundbank getSoundbank()
Obtains the sound bank that contains this SoundbankResource.

Returns:
the sound bank in which this SoundbankResource is stored


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.