GUI: fix values button working as notes

This commit is contained in:
tildearrow 2022-05-05 13:23:06 -05:00
parent 9915fc0c8f
commit 9a2938ff3e
2 changed files with 10 additions and 4 deletions

View file

@ -70,16 +70,24 @@
// OPZ supports a "fixed frequency" mode for each operator, with a 3-bit
// range and 4-bit frequency value, plus a 1-bit enable. Not sure how that
// works at all, so it's not implemented.
// note by tildearrow:
// - I have verified behavior of this mode against real hardware.
// after applying a small fix on the existing early implementation, it matches hardware.
// this means fixed frequency is fully implemented and working.
//
// There are also several mystery fields in the operators which I have no
// clue about: "fine" (4 bits), "eg_shift" (2 bits), and "rev" (3 bits).
// eg_shift is some kind of envelope generator effect, but how it works is
// unknown.
// note by tildearrow:
// - behavior of "fine" is now confirmed and matches hardware.
//
// Also, according to the site above, the panning controls are changed from
// OPM, with a "mono" bit and only one control bit for the right channel.
// Current implementation is just a guess.
//
// additional modifications by tildearrow for Furnace
//
namespace ymfm
{
@ -409,9 +417,6 @@ uint32_t opz_registers::lfo_am_offset(uint32_t choffs) const
void opz_registers::cache_operator_data(uint32_t choffs, uint32_t opoffs, opdata_cache &cache)
{
// TODO: how does fixed frequency mode work? appears to be enabled by
// op_fix_mode(), and controlled by op_fix_range(), op_fix_frequency()
// TODO: what is op_rev()?
// set up the easy stuff
@ -468,6 +473,7 @@ void opz_registers::cache_operator_data(uint32_t choffs, uint32_t opoffs, opdata
cache.eg_rate[EG_REVERB] = std::min<uint32_t>(effective_rate(reverb * 4 + 2, ksrval), cache.eg_rate[EG_REVERB]);
// set the envelope shift; TX81Z manual says operator 1 shift is fixed at "off"
// TODO: change 0 to 3? operators are in reverse order in TX81Z
cache.eg_shift = ((opoffs & 0x18) == 0) ? 0 : op_eg_shift(opoffs);
}

View file

@ -2091,7 +2091,7 @@ void FurnaceGUI::editOptions(bool topMenu) {
}
ImGui::SameLine();
if (ImGui::Button("Values")) {
doTranspose(transposeAmount,opMaskTransposeNote);
doTranspose(transposeAmount,opMaskTransposeValue);
ImGui::CloseCurrentPopup();
}