@ -658,6 +658,7 @@ void CMiniDexed::ProgramChange (unsigned nProgram, unsigned nTG)
assert ( m_pTG [ nTG ] ) ;
m_pTG [ nTG ] - > loadVoiceParameters ( Buffer ) ;
setOPMask ( 0b111111 , nTG ) ;
if ( m_pConfig - > GetMIDIAutoVoiceDumpOnPC ( ) )
{
@ -1178,23 +1179,22 @@ 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 )
{
m_uchOPMask [ nTG ] | = 1 < < nOP ;
setOPMask ( m_uchOPMask [ nTG ] | 1 < < nOP , nTG ) ;
}
else
{
m_uchOPMask [ nTG ] & = ~ ( 1 < < nOP ) ;
setOPMask ( m_uchOPMask [ nTG ] & ~ ( 1 < < nOP ) , nTG ) ;
}
m_pTG [ nTG ] - > setOPAll ( m_uchOPMask [ nTG ] ) ;
return ;
}
nOP = 5 - nOP ; // OPs are in reverse order
}
uchOffset + = nOP * 21 ;
@ -1213,12 +1213,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 ;
@ -1792,6 +1792,8 @@ void CMiniDexed::loadVoiceParameters(const uint8_t* data, uint8_t nTG)
m_pTG [ nTG ] - > loadVoiceParameters ( & voice [ 6 ] ) ;
m_pTG [ nTG ] - > doRefreshVoice ( ) ;
setOPMask ( 0b111111 , nTG ) ;
m_UI . ParameterChanged ( ) ;
}
@ -1848,6 +1850,12 @@ void CMiniDexed::getSysExVoiceDump(uint8_t* dest, uint8_t nTG)
dest [ 162 ] = 0xF7 ; // SysEx end
}
void CMiniDexed : : setOPMask ( uint8_t uchOPMask , uint8_t nTG )
{
m_uchOPMask [ nTG ] = uchOPMask ;
m_pTG [ nTG ] - > setOPAll ( m_uchOPMask [ nTG ] ) ;
}
void CMiniDexed : : setMasterVolume ( float32_t vol )
{
if ( vol < 0.0 )
@ -2022,6 +2030,7 @@ void CMiniDexed::LoadPerformanceParameters(void)
{
uint8_t * tVoiceData = m_PerformanceConfig . GetVoiceDataFromTxt ( nTG ) ;
m_pTG [ nTG ] - > loadVoiceParameters ( tVoiceData ) ;
setOPMask ( 0b111111 , nTG ) ;
}
setMonoMode ( m_PerformanceConfig . GetMonoMode ( nTG ) ? 1 : 0 , nTG ) ;
SetReverbSend ( m_PerformanceConfig . GetReverbSend ( nTG ) , nTG ) ;