324 |
volume = 0; |
volume = 0; |
325 |
volume_oncc.clear(); |
volume_oncc.clear(); |
326 |
volume_curvecc.clear(); |
volume_curvecc.clear(); |
327 |
|
volume_smoothcc.clear(); |
328 |
pan = 0; |
pan = 0; |
329 |
width = 100; |
width = 100; |
330 |
position = 0; |
position = 0; |
607 |
region->volume = volume; |
region->volume = volume; |
608 |
region->volume_oncc = volume_oncc; |
region->volume_oncc = volume_oncc; |
609 |
region->volume_curvecc = volume_curvecc; |
region->volume_curvecc = volume_curvecc; |
610 |
|
region->volume_smoothcc = volume_smoothcc; |
611 |
region->pan = pan; |
region->pan = pan; |
612 |
region->width = width; |
region->width = width; |
613 |
region->position = position; |
region->position = position; |
969 |
Region* r = _instrument->regions[k]; |
Region* r = _instrument->regions[k]; |
970 |
|
|
971 |
copyCurves(r->volume_curvecc, r->volume_oncc); |
copyCurves(r->volume_curvecc, r->volume_oncc); |
972 |
|
copySmoothValues(r->volume_smoothcc, r->volume_oncc); |
973 |
|
|
974 |
r->volume_curvecc.clear(); |
r->volume_curvecc.clear(); |
975 |
|
r->volume_smoothcc.clear(); |
976 |
} |
} |
977 |
} |
} |
978 |
|
|
997 |
} |
} |
998 |
} |
} |
999 |
} |
} |
1000 |
|
|
1001 |
|
void File::copySmoothValues(LinuxSampler::ArrayList<CC>& smooths, LinuxSampler::ArrayList<CC>& dest) { |
1002 |
|
for (int i = 0; i < smooths.size(); i++) { |
1003 |
|
for (int j = 0; j < dest.size(); j++) { |
1004 |
|
if (smooths[i].Controller == dest[j].Controller) { |
1005 |
|
dest[j].Smooth = smooths[i].Smooth; |
1006 |
|
} |
1007 |
|
} |
1008 |
|
} |
1009 |
|
} |
1010 |
|
|
1011 |
void |
void |
1012 |
File::push_header(std::string token) |
File::push_header(std::string token) |
1481 |
else if ("amplfo_freq" == key_cc) pCurDef->amplfo_freqcc.add( CC(num_cc, check(key, -200.0f, 200.0f, ToFloat(value))) ); |
else if ("amplfo_freq" == key_cc) pCurDef->amplfo_freqcc.add( CC(num_cc, check(key, -200.0f, 200.0f, ToFloat(value))) ); |
1482 |
else if ("volume_on" == key_cc) pCurDef->volume_oncc.add( CC(num_cc, check(key, -100.0f, 100.0f, ToFloat(value))) ); |
else if ("volume_on" == key_cc) pCurDef->volume_oncc.add( CC(num_cc, check(key, -100.0f, 100.0f, ToFloat(value))) ); |
1483 |
else if ("volume_curve" == key_cc) pCurDef->volume_curvecc.add( CC(num_cc, 0, check(key, 0, 30000, ToInt(value))) ); |
else if ("volume_curve" == key_cc) pCurDef->volume_curvecc.add( CC(num_cc, 0, check(key, 0, 30000, ToInt(value))) ); |
1484 |
|
else if ("volume_smooth" == key_cc) pCurDef->volume_smoothcc.add( CC(num_cc, 0, -1, check(key, 0.0f, 100000.0f /* max? */, ToFloat(value))) ); |
1485 |
else std::cerr << "The opcode '" << key << "' is unsupported by libsfz!" << std::endl; |
else std::cerr << "The opcode '" << key << "' is unsupported by libsfz!" << std::endl; |
1486 |
} |
} |
1487 |
|
|