| JavaTM 2 Platform Std. Ed. v1.5.0 
 
javax.sound.midi
Interface Soundbank
 
public interface Soundbank 
A Soundbankcontains a set ofInstrumentsthat can be loaded into aSynthesizer.
 Note that a Java SoundSoundbankis different from a MIDI bank.
 MIDI permits up to 16383 banks, each containing up to 128 instruments
 (also sometimes called programs, patches, or timbres).
 However, aSoundbankcan contain 16383 times 128 instruments,
 because the instruments within aSoundbankare indexed by both
 a MIDI program number and a MIDI bank number (via aPatchobject). Thus, aSoundbankcan be thought of as a collection
 of MIDI banks. 
 Soundbankincludes methods that returnStringobjects containing the sound bank's name, manufacturer, version number, and
 description.  The precise content and format of these strings is left
 to the implementor. 
 Different synthesizers use a variety of synthesis techniques.  A common
 one is wavetable synthesis, in which a segment of recorded sound is
 played back, often with looping and pitch change.  The Downloadable Sound
 (DLS) format uses segments of recorded sound, as does the Headspace Engine.
 SoundbanksandInstrumentsthat are based on
 wavetable synthesis (or other uses of stored sound recordings) should
 typically implement thegetResources()method to provide access to these recorded segments.  This is optional,
 however; the method can return an zero-length array if the synthesis technique
 doesn't use sampled sound (FM synthesis and physical modeling are examples
 of such techniques), or if it does but the implementor chooses not to make the
 samples accessible. 
 
 
See Also:Synthesizer.getDefaultSoundbank(),Synthesizer.isSoundbankSupported(javax.sound.midi.Soundbank),Synthesizer.loadInstruments(Soundbank, Patch[]),Patch,Instrument,SoundbankResource 
 
 
 
getName
String getName() 
Obtains the name of the sound bank.
 
Returns:a Stringnaming the sound bank 
 
getVersion
String getVersion() 
Obtains the version string for the sound bank.
 
Returns:a Stringthat indicates the sound bank's version 
 
getVendor
String getVendor() 
Obtains a stringnaming the company that provides the
 sound bank
 
Returns:the vendor string 
 
getDescription
String getDescription() 
Obtains a textual description of the sound bank, suitable for display.
 
Returns:a Stringthat describes the sound bank 
 
getResources
SoundbankResource[] getResources() 
Extracts a list of non-Instrument resources contained in the sound bank.
 
Returns:an array of resources, exclusing instruments.  If the sound bank contains
 no resources (other than instruments), returns an array of length 0. 
 
getInstruments
Instrument[] getInstruments() 
Obtains a list of instruments contained in this sound bank.
 
Returns:an array of the Instrumentsin thisSoundBankIf the sound bank contains no instruments, returns an array of length 0.See Also:Synthesizer.getLoadedInstruments(),getInstrument(Patch) 
 
getInstrument
Instrument getInstrument(Patch patch) 
Obtains an Instrumentfrom the givenPatch.
 
Parameters:patch- aPatchobject specifying the bank index
 and program change numberReturns:the requested instrument, or nullif the
 sound bank doesn't contain that instrumentSee Also:getInstruments(),Synthesizer.loadInstruments(Soundbank, Patch[]) 
 Copyright 2003 Sun Microsystems, Inc. All rights reserved |