From 0667f1b57a457c192ac500d8a7d13fdc4f335cd4 Mon Sep 17 00:00:00 2001 From: Gergo Koteles Date: Mon, 21 Apr 2025 23:41:07 +0200 Subject: [PATCH] fix op ordering The ops are in reverse order in the OPMask as well --- src/minidexed.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/minidexed.cpp b/src/minidexed.cpp index 1cca446..6b034be 100644 --- a/src/minidexed.cpp +++ b/src/minidexed.cpp @@ -1177,6 +1177,8 @@ void CMiniDexed::SetVoiceParameter (uint8_t uchOffset, uint8_t uchValue, unsigne if (nOP < 6) { + nOP = 5 - nOP; // OPs are in reverse order + if (uchOffset == DEXED_OP_ENABLE) { if (uchValue) @@ -1191,9 +1193,7 @@ void CMiniDexed::SetVoiceParameter (uint8_t uchOffset, uint8_t uchValue, unsigne m_pTG[nTG]->setOPAll (m_uchOPMask[nTG]); return; - } - - nOP = 5 - nOP; // OPs are in reverse order + } } uchOffset += nOP * 21; @@ -1212,12 +1212,12 @@ uint8_t CMiniDexed::GetVoiceParameter (uint8_t uchOffset, unsigned nOP, unsigned if (nOP < 6) { + nOP = 5 - nOP; // OPs are in reverse order + if (uchOffset == DEXED_OP_ENABLE) { return !!(m_uchOPMask[nTG] & (1 << nOP)); } - - nOP = 5 - nOP; // OPs are in reverse order } uchOffset += nOP * 21;