diff --git a/src/config.cpp b/src/config.cpp index 00d4d2d..8f2d382 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -72,6 +72,15 @@ void CConfig::Load (void) m_nDACI2CAddress = m_Properties.GetNumber ("DACI2CAddress", 0); m_bChannelsSwapped = m_Properties.GetNumber ("ChannelsSwapped", 0) != 0; + unsigned newVelocityScale = m_Properties.GetNumber ("VelocityScale", 0); + if (newVelocityScale == 1) { + m_VelocityScale = MIDI_VELOCITY_SCALING_DX7; + } else if (newVelocityScale == 2) { + m_VelocityScale = MIDI_VELOCITY_SCALING_DX7II; + } else { + m_VelocityScale = MIDI_VELOCITY_SCALING_OFF; + } + unsigned newEngineType = m_Properties.GetNumber ("EngineType", 1); if (newEngineType == 2) { m_EngineType = MKI; @@ -81,6 +90,7 @@ void CConfig::Load (void) m_EngineType = MSFA; } + m_nMIDIBaudRate = m_Properties.GetNumber ("MIDIBaudRate", 31250); const char *pMIDIThru = m_Properties.GetString ("MIDIThru"); @@ -199,6 +209,7 @@ void CConfig::Load (void) m_bMIDIDumpEnabled = m_Properties.GetNumber ("MIDIDumpEnabled", 0) != 0; m_bProfileEnabled = m_Properties.GetNumber ("ProfileEnabled", 0) != 0; m_bPerformanceSelectToLoad = m_Properties.GetNumber ("PerformanceSelectToLoad", 1) != 0; + m_bPerformanceSelectChannel = m_Properties.GetNumber ("PerformanceSelectChannel", 0); // Network @@ -308,6 +319,11 @@ bool CConfig::GetChannelsSwapped (void) const return m_bChannelsSwapped; } +unsigned CConfig::GetVelocityScale (void) const +{ + return m_VelocityScale; +} + unsigned CConfig::GetEngineType (void) const { return m_EngineType; diff --git a/src/config.h b/src/config.h index fcb8cca..789e286 100644 --- a/src/config.h +++ b/src/config.h @@ -117,9 +117,13 @@ public: unsigned GetChunkSize (void) const; unsigned GetDACI2CAddress (void) const; // 0 for auto probing bool GetChannelsSwapped (void) const; + + unsigned GetVelocityScale (void) const; + unsigned GetEngineType (void) const; bool GetQuadDAC8Chan (void) const; // false if not specified + // MIDI unsigned GetMIDIBaudRate (void) const; const char *GetMIDIThruIn (void) const; // "" if not specified @@ -269,6 +273,9 @@ private: unsigned m_nChunkSize; unsigned m_nDACI2CAddress; bool m_bChannelsSwapped; + + unsigned m_VelocityScale; + unsigned m_EngineType; bool m_bQuadDAC8Chan; diff --git a/src/minidexed.cpp b/src/minidexed.cpp index 0063b11..018851c 100644 --- a/src/minidexed.cpp +++ b/src/minidexed.cpp @@ -115,6 +115,11 @@ CMiniDexed::CMiniDexed (CConfig *pConfig, CInterruptSystem *pInterrupt, m_nReverbSend[i] = 0; + m_pTG[i] = new CDexedAdapter (CConfig::MaxNotes, pConfig->GetSampleRate ()); + assert (m_pTG[i]); + + m_pTG[i]->setVelocityScale(pConfig->GetVelocityScale ()); + // Active the required number of active TGs if (i