pull/446/merge
Luca 2 months ago committed by GitHub
commit 3950505ab2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 16
      src/config.cpp
  2. 7
      src/config.h
  3. 5
      src/minidexed.cpp
  4. 2
      src/minidexed.ini

@ -72,6 +72,15 @@ void CConfig::Load (void)
m_nDACI2CAddress = m_Properties.GetNumber ("DACI2CAddress", 0); m_nDACI2CAddress = m_Properties.GetNumber ("DACI2CAddress", 0);
m_bChannelsSwapped = m_Properties.GetNumber ("ChannelsSwapped", 0) != 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); unsigned newEngineType = m_Properties.GetNumber ("EngineType", 1);
if (newEngineType == 2) { if (newEngineType == 2) {
m_EngineType = MKI; m_EngineType = MKI;
@ -81,6 +90,7 @@ void CConfig::Load (void)
m_EngineType = MSFA; m_EngineType = MSFA;
} }
m_nMIDIBaudRate = m_Properties.GetNumber ("MIDIBaudRate", 31250); m_nMIDIBaudRate = m_Properties.GetNumber ("MIDIBaudRate", 31250);
const char *pMIDIThru = m_Properties.GetString ("MIDIThru"); const char *pMIDIThru = m_Properties.GetString ("MIDIThru");
@ -199,6 +209,7 @@ void CConfig::Load (void)
m_bMIDIDumpEnabled = m_Properties.GetNumber ("MIDIDumpEnabled", 0) != 0; m_bMIDIDumpEnabled = m_Properties.GetNumber ("MIDIDumpEnabled", 0) != 0;
m_bProfileEnabled = m_Properties.GetNumber ("ProfileEnabled", 0) != 0; m_bProfileEnabled = m_Properties.GetNumber ("ProfileEnabled", 0) != 0;
m_bPerformanceSelectToLoad = m_Properties.GetNumber ("PerformanceSelectToLoad", 1) != 0; m_bPerformanceSelectToLoad = m_Properties.GetNumber ("PerformanceSelectToLoad", 1) != 0;
m_bPerformanceSelectChannel = m_Properties.GetNumber ("PerformanceSelectChannel", 0); m_bPerformanceSelectChannel = m_Properties.GetNumber ("PerformanceSelectChannel", 0);
// Network // Network
@ -308,6 +319,11 @@ bool CConfig::GetChannelsSwapped (void) const
return m_bChannelsSwapped; return m_bChannelsSwapped;
} }
unsigned CConfig::GetVelocityScale (void) const
{
return m_VelocityScale;
}
unsigned CConfig::GetEngineType (void) const unsigned CConfig::GetEngineType (void) const
{ {
return m_EngineType; return m_EngineType;

@ -117,9 +117,13 @@ public:
unsigned GetChunkSize (void) const; unsigned GetChunkSize (void) const;
unsigned GetDACI2CAddress (void) const; // 0 for auto probing unsigned GetDACI2CAddress (void) const; // 0 for auto probing
bool GetChannelsSwapped (void) const; bool GetChannelsSwapped (void) const;
unsigned GetVelocityScale (void) const;
unsigned GetEngineType (void) const; unsigned GetEngineType (void) const;
bool GetQuadDAC8Chan (void) const; // false if not specified bool GetQuadDAC8Chan (void) const; // false if not specified
// MIDI // MIDI
unsigned GetMIDIBaudRate (void) const; unsigned GetMIDIBaudRate (void) const;
const char *GetMIDIThruIn (void) const; // "" if not specified const char *GetMIDIThruIn (void) const; // "" if not specified
@ -269,6 +273,9 @@ private:
unsigned m_nChunkSize; unsigned m_nChunkSize;
unsigned m_nDACI2CAddress; unsigned m_nDACI2CAddress;
bool m_bChannelsSwapped; bool m_bChannelsSwapped;
unsigned m_VelocityScale;
unsigned m_EngineType; unsigned m_EngineType;
bool m_bQuadDAC8Chan; bool m_bQuadDAC8Chan;

@ -115,6 +115,11 @@ CMiniDexed::CMiniDexed (CConfig *pConfig, CInterruptSystem *pInterrupt,
m_nReverbSend[i] = 0; 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 // Active the required number of active TGs
if (i<m_nToneGenerators) if (i<m_nToneGenerators)
{ {

@ -10,6 +10,8 @@ SampleRate=48000
#ChunkSize=256 #ChunkSize=256
DACI2CAddress=0 DACI2CAddress=0
ChannelsSwapped=0 ChannelsSwapped=0
# VelocityScale ( 0=OFF ; 1=DX7 ; 2=DX7II )
VelocityScale=0
# Engine Type ( 1=Modern ; 2=Mark I ; 3=OPL ) # Engine Type ( 1=Modern ; 2=Mark I ; 3=OPL )
EngineType=1 EngineType=1
QuadDAC8Chan=0 QuadDAC8Chan=0

Loading…
Cancel
Save