public interface Soundbank
Soundbank包含一组Instruments ,可以加载到Synthesizer 。
请注意,Java Sound Soundbank与MIDI bank不同。
MIDI允许多达16383个银行,每个银行最多包含128个工具(有时也称为程序,补丁或音色)。
但是, Soundbank可以包含16383次128个乐器,因为Soundbank中的Soundbank由MIDI程序号和MIDI存储体号(通过Patch对象)进行Patch 。
因此,一个Soundbank可以被认为是一个集合的MIDI银行。
Soundbank包括返回方法String包含音库的名称,制造商,版本号和描述对象。 这些字符串的精确内容和格式留给了实现者。
不同的合成器使用各种合成技术。 一个常见的是波形合成,其中一段录制的声音被播放,通常是循环和音调变化。 可下载声音(DLS)格式使用录音的段,头空间引擎也是如此。 Soundbanks和Instruments基于波形合成(或存储声音记录的其他用途)应通常实现getResources()方法来提供对这些记录段的访问。 然而,这是可选的; 如果合成技术不使用采样声音(FM综合和物理建模是这种技术的例子),则该方法可以返回零长度数组,或者如果它不是但实现者选择不使样本可访问的话。
| Modifier and Type | Method and Description |
|---|---|
String |
getDescription()
获取声音库的文字描述,适合显示。
|
Instrument |
getInstrument(Patch patch)
获取一个
Instrument从给定
Patch 。
|
Instrument[] |
getInstruments()
获取这个声音库中包含的乐器列表。
|
String |
getName()
获取声音库的名称。
|
SoundbankResource[] |
getResources()
提取声音库中包含的非仪器资源列表。
|
String |
getVendor()
获得一个
string命名提供声音库的公司
|
String |
getVersion()
获取声音库的版本字符串。
|
String getName()
String命名声音库
String getVersion()
String ,表示声音银行的版本
String getVendor()
string命名提供声银行的公司
String getDescription()
String声音库的String
SoundbankResource[] getResources()
Instrument[] getInstruments()
Instruments一个数组在这个
SoundBank如果声音库不包含乐器,返回一个长度为0的数组。
Synthesizer.getLoadedInstruments() ,
getInstrument(Patch)
Instrument getInstrument(Patch patch)
Instrument从给定
Patch 。
patch - 一个
Patch对象,指定银行索引和程序更改号
null如果音库不包含仪器
getInstruments() ,
Synthesizer.loadInstruments(Soundbank, Patch[])
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.