Skip to content

Commit aa5a7c7

Browse files
authored
Switchable performance files improvements + Poly/Mono + Fix to #298 and #83 issues (#267)
1 parent 768d763 commit aa5a7c7

13 files changed

+1174
-105
lines changed

src/config.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ void CConfig::Load (void)
110110

111111
m_bMIDIDumpEnabled = m_Properties.GetNumber ("MIDIDumpEnabled", 0) != 0;
112112
m_bProfileEnabled = m_Properties.GetNumber ("ProfileEnabled", 0) != 0;
113+
m_bPerformanceSelectToLoad = m_Properties.GetNumber ("PerformanceSelectToLoad", 1) != 0;
113114
}
114115

115116
const char *CConfig::GetSoundDevice (void) const
@@ -316,3 +317,8 @@ bool CConfig::GetProfileEnabled (void) const
316317
{
317318
return m_bProfileEnabled;
318319
}
320+
321+
bool CConfig::GetPerformanceSelectToLoad (void) const
322+
{
323+
return m_bPerformanceSelectToLoad;
324+
}

src/config.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,9 @@ class CConfig // Configuration for MiniDexed
126126
// Debug
127127
bool GetMIDIDumpEnabled (void) const;
128128
bool GetProfileEnabled (void) const;
129+
130+
// Load performance mode. 0 for load just rotating encoder, 1 load just when Select is pushed
131+
bool GetPerformanceSelectToLoad (void) const;
129132

130133
private:
131134
CPropertiesFatFsFile m_Properties;
@@ -180,6 +183,7 @@ class CConfig // Configuration for MiniDexed
180183

181184
bool m_bMIDIDumpEnabled;
182185
bool m_bProfileEnabled;
186+
bool m_bPerformanceSelectToLoad;
183187
};
184188

185189
#endif

src/mididevice.cpp

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,12 @@ LOGMODULE ("mididevice");
3333
#define MIDI_NOTE_OFF 0b1000
3434
#define MIDI_NOTE_ON 0b1001
3535
#define MIDI_AFTERTOUCH 0b1010 // TODO
36+
#define MIDI_CHANNEL_AFTERTOUCH 0b1101 // right now Synth_Dexed just manage Channel Aftertouch not Polyphonic AT -> 0b1010
3637
#define MIDI_CONTROL_CHANGE 0b1011
3738
#define MIDI_CC_BANK_SELECT_MSB 0 // TODO
3839
#define MIDI_CC_MODULATION 1
40+
#define MIDI_CC_BREATH_CONTROLLER 2
41+
#define MIDI_CC_FOOT_PEDAL 4
3942
#define MIDI_CC_VOLUME 7
4043
#define MIDI_CC_PAN_POSITION 10
4144
#define MIDI_CC_BANK_SELECT_LSB 32
@@ -226,6 +229,12 @@ void CMIDIDevice::MIDIMessageHandler (const u8 *pMessage, size_t nLength, unsign
226229
m_pSynthesizer->keyup (pMessage[1], nTG);
227230
break;
228231

232+
case MIDI_CHANNEL_AFTERTOUCH:
233+
234+
m_pSynthesizer->setAftertouch (pMessage[1], nTG);
235+
m_pSynthesizer->ControllersRefresh (nTG);
236+
break;
237+
229238
case MIDI_CONTROL_CHANGE:
230239
if (nLength < 3)
231240
{
@@ -238,7 +247,17 @@ void CMIDIDevice::MIDIMessageHandler (const u8 *pMessage, size_t nLength, unsign
238247
m_pSynthesizer->setModWheel (pMessage[2], nTG);
239248
m_pSynthesizer->ControllersRefresh (nTG);
240249
break;
241-
250+
251+
case MIDI_CC_FOOT_PEDAL:
252+
m_pSynthesizer->setFootController (pMessage[2], nTG);
253+
m_pSynthesizer->ControllersRefresh (nTG);
254+
break;
255+
256+
case MIDI_CC_BREATH_CONTROLLER:
257+
m_pSynthesizer->setBreathController (pMessage[2], nTG);
258+
m_pSynthesizer->ControllersRefresh (nTG);
259+
break;
260+
242261
case MIDI_CC_VOLUME:
243262
m_pSynthesizer->SetVolume (pMessage[2], nTG);
244263
break;

0 commit comments

Comments
 (0)