public class Patch extends Object
Patch
对象代表一个位置,在一个MIDI合成器,为一个单一的仪器存储(加载)。每一
Instrument
对象有它自己的
Patch
对象指定的内存位置,仪器应装。位置是由银行指数和计划数的抽象规定的(没有任何计划,是指一个特定的地址或偏移的RAM)。这是一个分层索引机制:MIDI提供了16384家银行,其中包含128个程序的位置。例如,一个最小的类型的合成器可能只有一个仪器,只有32个工具(程序)在该银行。
选择什么样的工具应该在一个特定的MIDI通道演奏音符,两种MIDI消息用于指定贴片位置:银行选择命令,和一个程序改变通道命令。java的声音是MidiChannel
programChange(int, int)
等效的方法。
Constructor and Description |
---|
Patch(int bank, int program)
从指定的银行和程序号构造一个新的修补程序对象。
|
public Patch(int bank, int program)
bank
-银行指数(范围从0到16383)
program
-程序指数(范围从0到127)
public int getBank()
Patch
指定银行的数量。
MidiChannel.programChange(int, int)
public int getProgram()
Patch
指定。
MidiChannel.getProgram()
,
MidiChannel.programChange(int)
,
MidiChannel.programChange(int, int)
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.