Added the volumeCC parsing and proper range
This commit is contained in:
parent
f9763c0058
commit
1c2d8f4399
2 changed files with 6 additions and 5 deletions
|
|
@ -87,7 +87,7 @@ namespace Default
|
|||
// Performance parameters: amplifier
|
||||
constexpr float volume { -3.0 };
|
||||
constexpr Range<float> volumeRange { -144.0, 6.0 };
|
||||
constexpr Range<float> volumeCCRange { -144.0, 6.0 };
|
||||
constexpr Range<float> volumeCCRange { -144.0, 48.0 };
|
||||
constexpr float amplitude { 100.0 };
|
||||
constexpr Range<float> amplitudeRange { 0.0, 100.0 };
|
||||
constexpr float pan { 0.0 };
|
||||
|
|
|
|||
|
|
@ -260,10 +260,11 @@ bool sfz::Region::parseOpcode(const Opcode& opcode)
|
|||
case hash("volume"):
|
||||
setValueFromOpcode(opcode, volume, Default::volumeRange);
|
||||
break;
|
||||
// case hash("volume_oncc"):
|
||||
// if (opcode.parameter)
|
||||
// setValueFromOpcode(opcode, volumeCCTriggers[*opcode.parameter], Default::volumeCCRange);
|
||||
// break;
|
||||
case hash("gain_cc"):
|
||||
case hash("gain_oncc"):
|
||||
case hash("volume_oncc"):
|
||||
setCCPairFromOpcode(opcode, volumeCC, Default::volumeCCRange);
|
||||
break;
|
||||
case hash("amplitude"):
|
||||
setValueFromOpcode(opcode, amplitude, Default::amplitudeRange);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue