Update performanceconfig.cpp

pull/206/head
arsamus 3 years ago committed by GitHub
parent 4850c3a19d
commit 55d92f7685
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 94
      src/performanceconfig.cpp

@ -98,6 +98,21 @@ bool CPerformanceConfig::Load (void)
PropertyName.Format ("ReverbSend%u", nTG+1);
m_nReverbSend[nTG] = m_Properties.GetNumber (PropertyName, 50);
PropertyName.Format ("PitchBenderRange%u", nTG+1);
m_nPitchBenderRange[nTG] = m_Properties.GetNumber (PropertyName, 2);
PropertyName.Format ("PitchBenderStep%u", nTG+1);
m_nPitchBenderStep[nTG] = m_Properties.GetNumber (PropertyName, 0);
PropertyName.Format ("PortamentoMode%u", nTG+1);
m_nPitchPortamentoMode[nTG] = m_Properties.GetNumber (PropertyName, 0);
PropertyName.Format ("PortamentoGlissando%u", nTG+1);
m_nPortamentoGlissando[nTG] = m_Properties.GetNumber (PropertyName, 0);
PropertyName.Format ("PortamentoTime%u", nTG+1);
m_nPortamentoTime[nTG] = m_Properties.GetNumber (PropertyName, 0);
}
m_bCompressorEnable = m_Properties.GetNumber ("CompressorEnable", 1) != 0;
@ -169,6 +184,21 @@ bool CPerformanceConfig::Save (void)
PropertyName.Format ("ReverbSend%u", nTG+1);
m_Properties.SetNumber (PropertyName, m_nReverbSend[nTG]);
PropertyName.Format ("PitchBenderRange%u", nTG+1);
m_Properties.SetNumber (PropertyName, m_nPitchBenderRange[nTG]);
PropertyName.Format ("PitchBenderStep%u", nTG+1);
m_Properties.SetNumber (PropertyName, m_nPitchBenderStep[nTG]);
PropertyName.Format ("PortamentoMode%u", nTG+1);
m_Properties.SetNumber (PropertyName, m_nPortamentoMode[nTG]);
PropertyName.Format ("PortamentoGlissando%u", nTG+1);
m_Properties.SetNumber (PropertyName, m_nPortamentoGlissando[nTG]);
PropertyName.Format ("PortamentoTime%u", nTG+1);
m_Properties.SetNumber (PropertyName, m_nPortamentoTime[nTG]);
}
m_Properties.SetNumber ("CompressorEnable", m_bCompressorEnable ? 1 : 0);
@ -407,3 +437,67 @@ void CPerformanceConfig::SetReverbLevel (unsigned nValue)
{
m_nReverbLevel = nValue;
}
// Pitch bender and portamento:
void CPerformanceConfig::SetPitchBenderRange (unsigned nValue, unsigned nTG)
{
assert (nTG < CConfig::ToneGenerators);
m_nPitchBenderRange[nTG] = nValue;
}
unsigned CPerformanceConfig::GetPitchBenderRange (unsigned nTG) const
{
assert (nTG < CConfig::ToneGenerators);
return m_nPitchBenderRange[nTG];
}
void CPerformanceConfig::SetPitchBenderStep (unsigned nValue, unsigned nTG)
{
assert (nTG < CConfig::ToneGenerators);
m_nPitchBenderStep[nTG] = nValue;
}
unsigned CPerformanceConfig::GetPitchBenderStep (unsigned nTG) const
{
assert (nTG < CConfig::ToneGenerators);
return m_nPitchBenderStep[nTG];
}
void CPerformanceConfig::SetPortamentoMode (unsigned nValue, unsigned nTG)
{
assert (nTG < CConfig::ToneGenerators);
m_nPortamentoMode[nTG] = nValue;
}
unsigned CPerformanceConfig::GetPortamentoMode (unsigned nTG) const
{
assert (nTG < CConfig::ToneGenerators);
return m_nPortamentoMode[nTG];
}
void CPerformanceConfig::SetPortamentoGlissando (unsigned nValue, unsigned nTG)
{
assert (nTG < CConfig::ToneGenerators);
m_nPortamentoGlissando[nTG] = nValue;
}
unsigned CPerformanceConfig::GetPortamentoGlissando (unsigned nTG) const
{
assert (nTG < CConfig::ToneGenerators);
return m_nPortamentoGlissando[nTG];
}
void CPerformanceConfig::SetPortamentoTime (unsigned nValue, unsigned nTG)
{
assert (nTG < CConfig::ToneGenerators);
m_nPortamentoTime[nTG] = nValue;
}
unsigned CPerformanceConfig::GetPortamentoTime (unsigned nTG) const
{
assert (nTG < CConfig::ToneGenerators);
return m_nPortamentoTime[nTG];
}

Loading…
Cancel
Save