1182 |
depth = 5; |
depth = 5; |
1183 |
} |
} |
1184 |
pVelocityCutoffTable = GetVelocityTable(curveType, depth, |
pVelocityCutoffTable = GetVelocityTable(curveType, depth, |
1185 |
VCFCutoffController == vcf_cutoff_ctrl_none ? VCFVelocityScale : 0); |
VCFCutoffController <= vcf_cutoff_ctrl_none2 ? VCFVelocityScale : 0); |
1186 |
|
|
1187 |
SampleAttenuation = pow(10.0, -Gain / (20.0 * 655360)); |
SampleAttenuation = pow(10.0, -Gain / (20.0 * 655360)); |
1188 |
} |
} |
1449 |
for (int i = 0; i < dimensionBits; i++) { |
for (int i = 0; i < dimensionBits; i++) { |
1450 |
dimension_t dimension = static_cast<dimension_t>(_3lnk->ReadUint8()); |
dimension_t dimension = static_cast<dimension_t>(_3lnk->ReadUint8()); |
1451 |
uint8_t bits = _3lnk->ReadUint8(); |
uint8_t bits = _3lnk->ReadUint8(); |
1452 |
|
_3lnk->ReadUint8(); // probably the position of the dimension |
1453 |
|
_3lnk->ReadUint8(); // unknown |
1454 |
|
uint8_t zones = _3lnk->ReadUint8(); // new for v3: number of zones doesn't have to be == pow(2,bits) |
1455 |
if (dimension == dimension_none) { // inactive dimension |
if (dimension == dimension_none) { // inactive dimension |
1456 |
pDimensionDefinitions[i].dimension = dimension_none; |
pDimensionDefinitions[i].dimension = dimension_none; |
1457 |
pDimensionDefinitions[i].bits = 0; |
pDimensionDefinitions[i].bits = 0; |
1463 |
else { // active dimension |
else { // active dimension |
1464 |
pDimensionDefinitions[i].dimension = dimension; |
pDimensionDefinitions[i].dimension = dimension; |
1465 |
pDimensionDefinitions[i].bits = bits; |
pDimensionDefinitions[i].bits = bits; |
1466 |
pDimensionDefinitions[i].zones = 0x01 << bits; // = pow(2,bits) |
pDimensionDefinitions[i].zones = zones ? zones : 0x01 << bits; // = pow(2,bits) |
1467 |
pDimensionDefinitions[i].split_type = (dimension == dimension_layer || |
pDimensionDefinitions[i].split_type = (dimension == dimension_layer || |
1468 |
dimension == dimension_samplechannel || |
dimension == dimension_samplechannel || |
1469 |
dimension == dimension_releasetrigger || |
dimension == dimension_releasetrigger || |
1472 |
: split_type_normal; |
: split_type_normal; |
1473 |
pDimensionDefinitions[i].ranges = NULL; // it's not possible to check velocity dimensions for custom defined ranges at this point |
pDimensionDefinitions[i].ranges = NULL; // it's not possible to check velocity dimensions for custom defined ranges at this point |
1474 |
pDimensionDefinitions[i].zone_size = |
pDimensionDefinitions[i].zone_size = |
1475 |
(pDimensionDefinitions[i].split_type == split_type_normal) ? 128 / pDimensionDefinitions[i].zones |
(pDimensionDefinitions[i].split_type == split_type_normal) ? 128.0 / pDimensionDefinitions[i].zones |
1476 |
: 0; |
: 0; |
1477 |
Dimensions++; |
Dimensions++; |
1478 |
|
|
1479 |
// if this is a layer dimension, remember the amount of layers |
// if this is a layer dimension, remember the amount of layers |
1480 |
if (dimension == dimension_layer) Layers = pDimensionDefinitions[i].zones; |
if (dimension == dimension_layer) Layers = pDimensionDefinitions[i].zones; |
1481 |
} |
} |
1482 |
_3lnk->SetPos(6, RIFF::stream_curpos); // jump forward to next dimension definition |
_3lnk->SetPos(3, RIFF::stream_curpos); // jump forward to next dimension definition |
1483 |
} |
} |
1484 |
|
|
1485 |
// check velocity dimension (if there is one) for custom defined zone ranges |
// check velocity dimension (if there is one) for custom defined zone ranges |
1577 |
bits[i] = DimValues[i]; |
bits[i] = DimValues[i]; |
1578 |
switch (pDimensionDefinitions[i].split_type) { |
switch (pDimensionDefinitions[i].split_type) { |
1579 |
case split_type_normal: |
case split_type_normal: |
1580 |
bits[i] /= pDimensionDefinitions[i].zone_size; |
bits[i] = uint8_t(bits[i] / pDimensionDefinitions[i].zone_size); |
1581 |
break; |
break; |
1582 |
case split_type_customvelocity: |
case split_type_customvelocity: |
1583 |
bits[i] = VelocityTable[bits[i]]; |
bits[i] = VelocityTable[bits[i]]; |
1806 |
for (int i = 0 ; i < WavePoolCount ; i++) { |
for (int i = 0 ; i < WavePoolCount ; i++) { |
1807 |
if (pWavePoolTableHi[i] > lastFileNo) lastFileNo = pWavePoolTableHi[i]; |
if (pWavePoolTableHi[i] > lastFileNo) lastFileNo = pWavePoolTableHi[i]; |
1808 |
} |
} |
1809 |
String name(pRIFF->Filename); |
String name(pRIFF->GetFileName()); |
1810 |
int nameLen = pRIFF->Filename.length(); |
int nameLen = name.length(); |
1811 |
char suffix[6]; |
char suffix[6]; |
1812 |
if (nameLen > 4 && pRIFF->Filename.substr(nameLen - 4) == ".gig") nameLen -= 4; |
if (nameLen > 4 && name.substr(nameLen - 4) == ".gig") nameLen -= 4; |
1813 |
|
|
1814 |
for (int fileNo = 0 ; ; ) { |
for (int fileNo = 0 ; ; ) { |
1815 |
RIFF::List* wvpl = file->GetSubList(LIST_TYPE_WVPL); |
RIFF::List* wvpl = file->GetSubList(LIST_TYPE_WVPL); |