enum class OpCodeKind
{
HiKey,
+ HiVelocity,
LoKey,
LoopEnd,
LoopMode,
LoopStart,
+ LoVelocity,
PitchKeyCenter,
Sample
};
}
break;
+ case OpCodeKind::HiVelocity:
case OpCodeKind::LoopEnd:
case OpCodeKind::LoopStart:
+ case OpCodeKind::LoVelocity:
try
{
opVal.Value = std::stod(valView.ToString());
static const std::unordered_map<std::string_view, OpCodeKind> OpCodeMap{
{"hikey"sv, OpCodeKind::HiKey},
+ {"hivel"sv, OpCodeKind::HiVelocity},
{"lokey"sv, OpCodeKind::LoKey},
{"loop_end"sv, OpCodeKind::LoopEnd},
{"loop_mode"sv, OpCodeKind::LoopMode},
{"loop_start"sv, OpCodeKind::LoopStart},
+ {"lovel"sv, OpCodeKind::LoVelocity},
{"pitch_keycenter"sv, OpCodeKind::PitchKeyCenter},
{"sample"sv, OpCodeKind::Sample}
};
pSample->high_key = static_cast<int8>(std::get<std::int32_t>(i.Value));
break;
+ case OpCodeKind::HiVelocity:
+ pSample->high_vel = static_cast<uint8>(std::get<double>(i.Value));
+ break;
+
case OpCodeKind::LoKey:
pSample->low_key = static_cast<int8>(std::get<std::int32_t>(i.Value));
break;
pSample->loop_start = static_cast<splen_t>(std::get<double>(i.Value)) << FRACTION_BITS;
break;
+ case OpCodeKind::LoVelocity:
+ pSample->low_vel = static_cast<uint8>(std::get<double>(i.Value));
+ break;
+
case OpCodeKind::PitchKeyCenter:
pSample->root_key = static_cast<int8>(std::get<std::int32_t>(i.Value));
pSample->root_freq = ::freq_table[pSample->root_key];