Prototype for running 16 TGs on a RPi 4

pull/557/head
Kevin 2 years ago
parent 87dc5ce432
commit 179aa8f406
  1. 6
      src/config.h
  2. 10
      src/minidexed.cpp
  3. 2
      src/minidexed.h
  4. 8
      src/uimenu.cpp

@ -33,11 +33,17 @@ class CConfig // Configuration for MiniDexed
public:
#ifndef ARM_ALLOW_MULTI_CORE
static const unsigned ToneGenerators = 1;
#else
#if RASPPI == 4
static const unsigned TGsCore1 = 4; // process 4 TGs on core 1
static const unsigned TGsCore23 = 6; // process 6 TGs on core 2 and 3 each
static const unsigned ToneGenerators = TGsCore1 + 2*TGsCore23;
#else
static const unsigned TGsCore1 = 2; // process 2 TGs on core 1
static const unsigned TGsCore23 = 3; // process 3 TGs on core 2 and 3 each
static const unsigned ToneGenerators = TGsCore1 + 2*TGsCore23;
#endif
#endif
#if RASPPI == 1
static const unsigned MaxNotes = 8; // polyphony

@ -45,7 +45,7 @@ CMiniDexed::CMiniDexed (CConfig *pConfig, CInterruptSystem *pInterrupt,
m_pSoundDevice (0),
m_bChannelsSwapped (pConfig->GetChannelsSwapped ()),
#ifdef ARM_ALLOW_MULTI_CORE
m_nActiveTGsLog2 (0),
//m_nActiveTGsLog2 (0),
#endif
m_GetChunkTimer ("GetChunk",
1000000U * pConfig->GetChunkSize ()/2 / pConfig->GetSampleRate ()),
@ -567,9 +567,9 @@ void CMiniDexed::SetMIDIChannel (uint8_t uchChannel, unsigned nTG)
}
}
assert (nActiveTGs <= 8);
static const unsigned Log2[] = {0, 0, 1, 2, 2, 3, 3, 3, 3};
m_nActiveTGsLog2 = Log2[nActiveTGs];
//assert (nActiveTGs <= 16);
//static const unsigned Log2[] = {0, 0, 1, 2, 2, 3, 3, 3, 3};
//m_nActiveTGsLog2 = Log2[nActiveTGs];
#endif
m_UI.ParameterChanged ();
@ -1018,7 +1018,7 @@ void CMiniDexed::ProcessSound (void)
// Audio signal path after tone generators starts here
//
assert (CConfig::ToneGenerators == 8);
assert (CConfig::ToneGenerators == 16);
uint8_t indexL=0, indexR=1;

@ -282,7 +282,7 @@ private:
unsigned m_nQueueSizeFrames;
#ifdef ARM_ALLOW_MULTI_CORE
unsigned m_nActiveTGsLog2;
//unsigned m_nActiveTGsLog2;
volatile TCoreStatus m_CoreStatus[CORES];
volatile unsigned m_nFramesToProcess;
float32_t m_OutputLevel[CConfig::ToneGenerators][CConfig::MaxChunkSize];

@ -50,6 +50,14 @@ const CUIMenu::TMenuItem CUIMenu::s_MainMenu[] =
{"TG6", MenuHandler, s_TGMenu, 5},
{"TG7", MenuHandler, s_TGMenu, 6},
{"TG8", MenuHandler, s_TGMenu, 7},
{"TG9", MenuHandler, s_TGMenu, 8},
{"TG10", MenuHandler, s_TGMenu, 9},
{"TG11", MenuHandler, s_TGMenu, 10},
{"TG12", MenuHandler, s_TGMenu, 11},
{"TG13", MenuHandler, s_TGMenu, 12},
{"TG14", MenuHandler, s_TGMenu, 13},
{"TG15", MenuHandler, s_TGMenu, 14},
{"TG16", MenuHandler, s_TGMenu, 15},
#endif
{"Effects", MenuHandler, s_EffectsMenu},
{"Performance", MenuHandler, s_PerformanceMenu},

Loading…
Cancel
Save