From 55d92f76857d265d60e6b832056d895a67ddcff5 Mon Sep 17 00:00:00 2001 From: arsamus Date: Thu, 5 May 2022 09:22:41 -0300 Subject: [PATCH] Update performanceconfig.cpp --- src/performanceconfig.cpp | 98 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 96 insertions(+), 2 deletions(-) diff --git a/src/performanceconfig.cpp b/src/performanceconfig.cpp index 1204103..e66fbd9 100644 --- a/src/performanceconfig.cpp +++ b/src/performanceconfig.cpp @@ -98,7 +98,22 @@ 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,7 +184,22 @@ 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]; +}