Skip to content

Commit

Permalink
Ensure unused TGs in a performance are MIDI disabled. Set polyphony t…
Browse files Browse the repository at this point in the history
…o higher defaults on Pi 4 and 5.
  • Loading branch information
diyelectromusic committed Jul 21, 2024
1 parent d945b9c commit 39b087b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ class CConfig // Configuration for MiniDexed
static const unsigned MaxNotes = 8;
static const unsigned DefaultNotes = 8;
#elif RASPPI == 4
static const unsigned MaxNotes = 24;
static const unsigned DefaultNotes = 16;
static const unsigned MaxNotes = 32;
static const unsigned DefaultNotes = 24;
#elif RASPPI == 5
static const unsigned MaxNotes = 32;
static const unsigned DefaultNotes = 16;
static const unsigned DefaultNotes = 32;
#else
static const unsigned MaxNotes = 16;
static const unsigned DefaultNotes = 16;
Expand Down
7 changes: 6 additions & 1 deletion src/performanceconfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ bool CPerformanceConfig::Load (void)
}

PropertyName.Format ("MIDIChannel%u", nTG+1);
unsigned nMIDIChannel = m_Properties.GetNumber (PropertyName, 255);
unsigned nMIDIChannel = m_Properties.GetNumber (PropertyName, 42);
if (nMIDIChannel == 0)
{
m_nMIDIChannel[nTG] = CMIDIDevice::Disabled;
Expand All @@ -132,6 +132,11 @@ bool CPerformanceConfig::Load (void)
m_nMIDIChannel[nTG] = nMIDIChannel-1;
bResult = true;
}
else if (nMIDIChannel == 42)
{
// Property didn't exist in the file, so disable this TG
m_nMIDIChannel[nTG] = CMIDIDevice::Disabled;
}
else
{
m_nMIDIChannel[nTG] = CMIDIDevice::OmniMode;
Expand Down

0 comments on commit 39b087b

Please sign in to comment.