-
public interface Soundbank
ASoundbank
contains a set ofInstruments
that can be loaded into aSynthesizer
. Note that a Java SoundSoundbank
is 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, aSoundbank
can contain 16383 times 128 instruments, because the instruments within aSoundbank
are indexed by both a MIDI program number and a MIDI bank number (via aPatch
object). Thus, aSoundbank
can be thought of as a collection of MIDI banks.Soundbank
includes methods that returnString
objects 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.
Soundbanks
andInstruments
that 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.
-
-
Method Summary
Methods Modifier and Type Method and Description String
getDescription()
Obtains a textual description of the sound bank, suitable for display.Instrument
getInstrument(Patch patch)
Obtains anInstrument
from the givenPatch
.Instrument[]
getInstruments()
Obtains a list of instruments contained in this sound bank.String
getName()
Obtains the name of the sound bank.SoundbankResource[]
getResources()
Extracts a list of non-Instrument resources contained in the sound bank.String
getVendor()
Obtains astring
naming the company that provides the sound bankString
getVersion()
Obtains the version string for the sound bank.
-
-
-
Method Detail
-
getName
String getName()
Obtains the name of the sound bank.- Returns:
- a
String
naming the sound bank
-
getVersion
String getVersion()
Obtains the version string for the sound bank.- Returns:
- a
String
that indicates the sound bank's version
-
getVendor
String getVendor()
Obtains astring
naming 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
String
that 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
Instruments
in thisSoundBank
If the sound bank contains no instruments, returns an array of length 0. - See Also:
Synthesizer.getLoadedInstruments()
,getInstrument(Patch)
-
getInstrument
Instrument getInstrument(Patch patch)
Obtains anInstrument
from the givenPatch
.- Parameters:
patch
- aPatch
object specifying the bank index and program change number- Returns:
- the requested instrument, or
null
if the sound bank doesn't contain that instrument - See Also:
getInstruments()
,Synthesizer.loadInstruments(Soundbank, Patch[])
-
-
Traduction non disponible
Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.
Version en cache
06/11/2024 02:50:41 Cette version de la page est en cache (à la date du 06/11/2024 02:50:41) afin d'accélérer le traitement. Vous pouvez activer le mode utilisateur dans le menu en haut pour afficher la dernère version de la page.Document créé le 31/08/2006, dernière modification le 04/03/2020
Source du document imprimé : https://www.gaudry.be/java-api-rf-javax/sound/midi/soundbank.html
L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.
Références
Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.