Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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");
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down
7 changes: 7 additions & 0 deletions src/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,13 @@ class CConfig // Configuration for MiniDexed
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
Expand Down Expand Up @@ -269,6 +273,9 @@ class CConfig // Configuration for MiniDexed
unsigned m_nChunkSize;
unsigned m_nDACI2CAddress;
bool m_bChannelsSwapped;

unsigned m_VelocityScale;

unsigned m_EngineType;
bool m_bQuadDAC8Chan;

Expand Down
5 changes: 5 additions & 0 deletions src/minidexed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,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<m_nToneGenerators)
{
Expand Down
2 changes: 2 additions & 0 deletions src/minidexed.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ SampleRate=48000
#ChunkSize=256
DACI2CAddress=0
ChannelsSwapped=0
# VelocityScale ( 0=OFF ; 1=DX7 ; 2=DX7II )
VelocityScale=0
# Engine Type ( 1=Modern ; 2=Mark I ; 3=OPL )
EngineType=1
QuadDAC8Chan=0
Expand Down
Loading