/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* Soundfont instrument.
*
* @author Karl Helgason
*/
= new ArrayList<SF2InstrumentRegion>();
public SF2Instrument() {
}
}
return name;
}
}
if (bank == 128)
else
}
bank = 128;
} else {
}
}
return null;
}
public long getGenre() {
return genre;
}
}
public long getLibrary() {
return library;
}
}
public long getMorphology() {
return morphology;
}
this.morphology = morphology;
}
return regions;
}
return globalregion;
}
globalregion = zone;
}
if (bank == 128)
else
+ " preset #" + preset;
}
int performercount = 0;
int pi = 0;
if (presetglobal != null)
else
int keyfrom = 0;
int keyto = 127;
int velfrom = 0;
int velto = 127;
}
}
}
}
}
}
}
/*
if (startAddrsOffset < 0)
startAddrsOffset = 0;
if (endAddrsOffset > (buff.capacity()/2-startAddrsOffset))
startAddrsOffset = (int)buff.capacity()/2-startAddrsOffset;
byte[] data = buff.array();
int off = (int)buff.arrayOffset() + startAddrsOffset*2;
int len = (int)buff.capacity() + endAddrsOffset*2;
if (off+len > data.length)
len = data.length - off;
buff = new ModelByteBuffer(data, off, len);
if(buff24 != null) {
data = buff.array();
off = (int)buff.arrayOffset() + startAddrsOffset;
len = (int)buff.capacity() + endAddrsOffset;
buff24 = new ModelByteBuffer(data, off, len);
}
*/
}
if (layerglobal != null)
short val;
else
}
// SampleMode:
// 0 indicates a sound reproduced with no loop
// 1 indicates a sound which loops continuously
// 2 is unused but should be interpreted as indicating no loop
// 3 indicates a sound which loops for the duration of key
// depression then proceeds to play the remainder of the sample.
+ startloopAddrsOffset));
if (sampleMode == 1)
if (sampleMode == 3)
}
}
if (volHold != -12000) {
new ModelDestination(dest)));
}
if (volDecay != -12000) {
new ModelDestination(dest)));
}
//float fvolsustain = (960-volSustain)*(1000.0f/960.0f);
if (volSustain < 0)
volSustain = 0;
if (volSustain > 1000)
volSustain = 1000;
if (modHold != -12000) {
}
if (modDecay != -12000) {
}
if (modSustain < 0)
modSustain = 0;
if (modSustain > 1000)
modSustain = 1000;
1000 - modSustain);
}
}
}
}
new ModelConnectionBlock(
new ModelSource(src,
}
new ModelConnectionBlock(
new ModelSource(src,
}
new ModelConnectionBlock(
new ModelSource(src,
}
new ModelConnectionBlock(
new ModelSource(src,
}
}
/ 128.0;
}
}
if (tune != 0) {
}
}
}
}
}
if (fvalue == 0) {
new ModelDestination(dest)));
} else {
new ModelDestination(dest)));
}
}
new ModelConnectionBlock(
new ModelTransform() {
if (value < 0.5)
else
return 0;
}
}),
-2400,
new ModelDestination(
new ModelConnectionBlock(
50, new ModelDestination(
for (SF2Modulator modulator
}
}
if (presetglobal != null) {
}
}
}
return performers;
}
return;
return;
double[] amountcorrection = new double[1];
return;
}
}
if (src == 0)
return null;
} else {
}
return null;
else
else
return msrc;
}
switch (dst) {
break;
break;
break;
break;
case SF2Region.GENERATOR_PAN:
break;
break;
break;
break;
break;
break;
break;
break;
break;
break;
break;
break;
break;
break;
break;
break;
break;
case SF2Region.GENERATOR_KEYNUM:
break;
case SF2Region.GENERATOR_VELOCITY:
break;
break;
case SF2Region.GENERATOR_FINETUNE:
break;
break;
break;
break;
break;
break;
break;
break;
default:
break;
}
return new ModelDestination(id);
return null;
}
double fvalue;
if (value == -12000)
else
}
}
}
}
}