Merge with main + fixing compiling error for RPI2

pull/495/head
Vincent GAUCHE 2 years ago
parent 5e90726403
commit ac43ec5f73
  1. 20
      performance/000064_RockOrgan.ini
  2. 114
      performance/000126_INIT.ini
  3. 6
      src/config.cpp
  4. 2
      src/config.h
  5. 20
      src/mididevice.cpp
  6. 72
      src/minidexed.cpp
  7. 33
      src/performanceconfig.cpp
  8. 4
      src/performanceconfig.h
  9. 55
      src/uimenu.cpp

@ -42,7 +42,7 @@ PitchBendStep2=0
PortamentoMode2=0 PortamentoMode2=0
PortamentoGlissando2=0 PortamentoGlissando2=0
PortamentoTime2=0 PortamentoTime2=0
VoiceData2=63 63 63 1B 63 63 63 00 27 05 00 00 00 00 00 00 56 00 02 00 01 41 63 63 24 63 63 63 00 27 00 00 00 00 03 00 02 56 01 00 00 07 63 63 63 00 63 63 63 00 27 00 00 00 00 00 00 00 54 00 00 00 0A 41 63 63 28 63 63 63 00 27 00 00 00 00 02 00 02 63 00 00 00 0C 63 63 63 00 63 63 63 00 27 00 00 00 00 00 00 00 54 00 01 00 02 41 63 63 28 63 63 63 00 27 00 00 00 00 02 00 02 63 00 01 00 03 63 63 63 63 32 32 32 32 05 05 01 29 00 03 00 01 00 04 18 52 6F 63 6B 6F 72 67 61 6E 20 D5 VoiceData2=63 63 63 1B 63 63 63 00 27 05 00 00 00 00 00 00 56 00 02 00 01 41 63 63 24 63 63 63 00 27 00 00 00 00 03 00 02 56 01 00 00 07 63 63 63 00 63 63 63 00 27 00 00 00 00 00 00 00 54 00 00 00 0A 41 63 63 28 63 63 63 00 27 00 00 00 00 02 00 02 63 00 00 00 0C 63 63 63 00 63 63 63 00 27 00 00 00 00 00 00 00 54 00 01 00 02 41 63 63 28 63 63 63 00 27 00 00 00 00 02 00 02 63 00 01 00 03 63 63 63 63 32 32 32 32 05 05 01 29 00 03 00 01 00 04 18 52 6F 63 6B 6F 72 67 61 6E 20 55
MonoMode2=0 MonoMode2=0
ModulationWheelRange2=99 ModulationWheelRange2=99
ModulationWheelTarget2=1 ModulationWheelTarget2=1
@ -69,7 +69,7 @@ PitchBendStep3=0
PortamentoMode3=0 PortamentoMode3=0
PortamentoGlissando3=0 PortamentoGlissando3=0
PortamentoTime3=0 PortamentoTime3=0
VoiceData3=63 63 63 1B 63 63 63 00 27 05 00 00 00 00 00 00 56 00 02 00 01 41 63 63 24 63 63 63 00 27 00 00 00 00 03 00 02 56 01 00 00 07 63 63 63 00 63 63 63 00 27 00 00 00 00 00 00 00 54 00 00 00 0A 41 63 63 28 63 63 63 00 27 00 00 00 00 02 00 02 63 00 00 00 0C 63 63 63 00 63 63 63 00 27 00 00 00 00 00 00 00 54 00 01 00 02 41 63 63 28 63 63 63 00 27 00 00 00 00 02 00 02 63 00 01 00 03 63 63 63 63 32 32 32 32 05 05 01 29 00 03 00 01 00 04 18 52 6F 63 6B 6F 72 67 61 6E 20 7D VoiceData3=63 63 63 1B 63 63 63 00 27 05 00 00 00 00 00 00 56 00 02 00 01 41 63 63 24 63 63 63 00 27 00 00 00 00 03 00 02 56 01 00 00 07 63 63 63 00 63 63 63 00 27 00 00 00 00 00 00 00 54 00 00 00 0A 41 63 63 28 63 63 63 00 27 00 00 00 00 02 00 02 63 00 00 00 0C 63 63 63 00 63 63 63 00 27 00 00 00 00 00 00 00 54 00 01 00 02 41 63 63 28 63 63 63 00 27 00 00 00 00 02 00 02 63 00 01 00 03 63 63 63 63 32 32 32 32 05 05 01 29 00 03 00 01 00 04 18 52 6F 63 6B 6F 72 67 61 6E 20 5D
MonoMode3=0 MonoMode3=0
ModulationWheelRange3=99 ModulationWheelRange3=99
ModulationWheelTarget3=1 ModulationWheelTarget3=1
@ -150,7 +150,7 @@ PitchBendStep6=0
PortamentoMode6=0 PortamentoMode6=0
PortamentoGlissando6=0 PortamentoGlissando6=0
PortamentoTime6=0 PortamentoTime6=0
VoiceData6=54 24 0A 10 63 63 5F 00 34 00 00 03 00 00 03 00 38 00 03 00 00 54 24 0A 0C 63 63 5F 00 34 12 00 03 00 00 00 01 49 00 01 00 01 54 24 0A 00 63 63 63 00 26 06 00 00 00 00 00 01 50 01 00 27 04 26 07 07 29 5D 5C 5C 00 24 1F 00 00 00 00 00 01 63 00 01 00 0D 2C 24 0A 16 63 63 63 00 22 00 00 00 00 00 00 01 4C 00 01 00 07 2D 23 0A 30 63 63 63 00 24 1F 00 00 00 00 03 01 61 01 00 1A 07 54 5F 5F 3C 32 32 32 32 0E 07 00 1E 0F 12 00 00 04 01 18 57 61 72 6D 20 53 74 67 20 41 74 VoiceData6=54 24 0A 10 63 63 5F 00 34 00 00 03 00 00 03 00 38 00 03 00 00 54 24 0A 0C 63 63 5F 00 34 12 00 03 00 00 00 01 49 00 01 00 01 54 24 0A 00 63 63 63 00 26 06 00 00 00 00 00 01 50 01 00 27 04 26 07 07 29 5D 5C 5C 00 24 1F 00 00 00 00 00 01 63 00 01 00 0D 2C 24 0A 16 63 63 63 00 22 00 00 00 00 00 00 01 4C 00 01 00 07 2D 23 0A 30 63 63 63 00 24 1F 00 00 00 00 03 01 61 01 00 1A 07 54 5F 5F 3C 32 32 32 32 0E 07 00 1E 0F 12 00 00 04 01 18 57 61 72 6D 20 53 74 67 20 41 55
MonoMode6=0 MonoMode6=0
ModulationWheelRange6=99 ModulationWheelRange6=99
ModulationWheelTarget6=1 ModulationWheelTarget6=1
@ -177,7 +177,7 @@ PitchBendStep7=0
PortamentoMode7=0 PortamentoMode7=0
PortamentoGlissando7=0 PortamentoGlissando7=0
PortamentoTime7=0 PortamentoTime7=0
VoiceData7=54 24 0A 10 63 63 5F 00 34 00 00 03 00 00 03 00 38 00 03 00 00 54 24 0A 0C 63 63 5F 00 34 12 00 03 00 00 00 01 49 00 01 00 01 54 24 0A 00 63 63 63 00 26 06 00 00 00 00 00 01 50 01 00 27 04 26 07 07 29 5D 5C 5C 00 24 1F 00 00 00 00 00 01 63 00 01 00 0D 2C 24 0A 16 63 63 63 00 22 00 00 00 00 00 00 01 4C 00 01 00 07 2D 23 0A 30 63 63 63 00 24 1F 00 00 00 00 03 01 61 01 00 1A 07 54 5F 5F 3C 32 32 32 32 0E 07 00 1E 0F 12 00 00 04 01 18 57 61 72 6D 20 53 74 67 20 41 D5 VoiceData7=54 24 0A 10 63 63 5F 00 34 00 00 03 00 00 03 00 38 00 03 00 00 54 24 0A 0C 63 63 5F 00 34 12 00 03 00 00 00 01 49 00 01 00 01 54 24 0A 00 63 63 63 00 26 06 00 00 00 00 00 01 50 01 00 27 04 26 07 07 29 5D 5C 5C 00 24 1F 00 00 00 00 00 01 63 00 01 00 0D 2C 24 0A 16 63 63 63 00 22 00 00 00 00 00 00 01 4C 00 01 00 07 2D 23 0A 30 63 63 63 00 24 1F 00 00 00 00 03 01 61 01 00 1A 07 54 5F 5F 3C 32 32 32 32 0E 07 00 1E 0F 12 00 00 04 01 18 57 61 72 6D 20 53 74 67 20 41 55
MonoMode7=0 MonoMode7=0
ModulationWheelRange7=99 ModulationWheelRange7=99
ModulationWheelTarget7=1 ModulationWheelTarget7=1
@ -204,7 +204,7 @@ PitchBendStep8=0
PortamentoMode8=0 PortamentoMode8=0
PortamentoGlissando8=0 PortamentoGlissando8=0
PortamentoTime8=0 PortamentoTime8=0
VoiceData8=54 24 0A 10 63 63 5F 00 34 00 00 03 00 00 03 00 38 00 03 00 00 54 24 0A 0C 63 63 5F 00 34 12 00 03 00 00 00 01 49 00 01 00 01 54 24 0A 00 63 63 63 00 26 06 00 00 00 00 00 01 50 01 00 27 04 26 07 07 29 5D 5C 5C 00 24 1F 00 00 00 00 00 01 63 00 01 00 0D 2C 24 0A 16 63 63 63 00 22 00 00 00 00 00 00 01 4C 00 01 00 07 2D 23 0A 30 63 63 63 00 24 1F 00 00 00 00 03 01 61 01 00 1A 07 54 5F 5F 3C 32 32 32 32 0E 07 00 1E 0F 12 00 00 04 01 18 57 61 72 6D 20 53 74 67 20 41 D1 VoiceData8=54 24 0A 10 63 63 5F 00 34 00 00 03 00 00 03 00 38 00 03 00 00 54 24 0A 0C 63 63 5F 00 34 12 00 03 00 00 00 01 49 00 01 00 01 54 24 0A 00 63 63 63 00 26 06 00 00 00 00 00 01 50 01 00 27 04 26 07 07 29 5D 5C 5C 00 24 1F 00 00 00 00 00 01 63 00 01 00 0D 2C 24 0A 16 63 63 63 00 22 00 00 00 00 00 00 01 4C 00 01 00 07 2D 23 0A 30 63 63 63 00 24 1F 00 00 00 00 03 01 61 01 00 1A 07 54 5F 5F 3C 32 32 32 32 0E 07 00 1E 0F 12 00 00 04 01 18 57 61 72 6D 20 53 74 67 20 41 55
MonoMode8=0 MonoMode8=0
ModulationWheelRange8=99 ModulationWheelRange8=99
ModulationWheelTarget8=1 ModulationWheelTarget8=1
@ -217,8 +217,8 @@ AftertouchTarget8=0
CompressorEnable=0 CompressorEnable=0
ReverbEnable=1 ReverbEnable=1
ReverbSize=75 ReverbSize=75
ReverbHighDamp=45 ReverbHighDamp=35
ReverbLowDamp=22 ReverbLowDamp=24
ReverbLowPass=30 ReverbLowPass=65
ReverbDiffusion=99 ReverbDiffusion=74
ReverbLevel=99 ReverbLevel=54

@ -1,7 +1,7 @@
BankNumber1=18 BankNumber1=71
VoiceNumber1=32 VoiceNumber1=1
MIDIChannel1=1 MIDIChannel1=1
Volume1=50 Volume1=38
Pan1=64 Pan1=64
Detune1=0 Detune1=0
Cutoff1=99 Cutoff1=99
@ -9,13 +9,13 @@ Resonance1=0
NoteLimitLow1=0 NoteLimitLow1=0
NoteLimitHigh1=127 NoteLimitHigh1=127
NoteShift1=0 NoteShift1=0
ReverbSend1=0 ReverbSend1=99
PitchBendRange1=2 PitchBendRange1=2
PitchBendStep1=0 PitchBendStep1=0
PortamentoMode1=0 PortamentoMode1=0
PortamentoGlissando1=0 PortamentoGlissando1=0
PortamentoTime1=0 PortamentoTime1=0
VoiceData1=63 63 63 63 63 63 63 00 27 00 00 00 00 00 00 00 00 00 01 00 07 63 63 63 63 63 63 63 00 27 00 00 00 00 00 00 00 00 00 01 00 07 63 63 63 63 63 63 63 00 27 00 00 00 00 00 00 00 00 00 01 00 07 63 63 63 63 63 63 63 00 27 00 00 00 00 00 00 00 00 00 01 00 07 63 63 63 63 63 63 63 00 27 00 00 00 00 00 00 00 00 00 01 00 07 63 63 63 63 63 63 63 00 27 00 00 00 00 00 00 00 63 00 01 00 07 63 63 63 63 32 32 32 32 00 00 01 23 00 00 00 01 00 03 18 49 4E 49 54 20 56 4F 49 43 45 51 VoiceData1=5F 1D 14 32 63 5F 00 00 29 00 13 00 00 03 00 06 4F 00 01 00 0E 5F 14 14 32 63 5F 00 00 00 00 00 00 00 03 00 00 63 00 01 00 00 5F 1D 14 32 63 5F 00 00 36 00 1B 00 00 03 00 06 55 00 01 00 07 5F 14 14 32 63 5F 00 00 00 00 00 00 00 03 00 02 63 00 01 00 07 5F 32 23 4E 63 4B 00 00 37 00 34 00 00 03 00 07 3A 00 1A 00 07 60 19 19 43 63 4B 00 00 00 00 00 00 00 03 00 02 63 00 01 00 0A 5E 43 5F 3C 32 32 32 32 04 06 00 0F 21 00 00 00 04 02 18 46 45 4E 44 45 52 48 4F 44 45 55
MonoMode1=0 MonoMode1=0
ModulationWheelRange1=99 ModulationWheelRange1=99
ModulationWheelTarget1=1 ModulationWheelTarget1=1
@ -25,24 +25,24 @@ BreathControlRange1=99
BreathControlTarget1=0 BreathControlTarget1=0
AftertouchRange1=99 AftertouchRange1=99
AftertouchTarget1=0 AftertouchTarget1=0
BankNumber2=0 BankNumber2=71
VoiceNumber2=1 VoiceNumber2=1
MIDIChannel2=0 MIDIChannel2=2
Volume2=100 Volume2=38
Pan2=63 Pan2=0
Detune2=0 Detune2=-3
Cutoff2=99 Cutoff2=99
Resonance2=0 Resonance2=0
NoteLimitLow2=0 NoteLimitLow2=0
NoteLimitHigh2=127 NoteLimitHigh2=127
NoteShift2=0 NoteShift2=0
ReverbSend2=0 ReverbSend2=99
PitchBendRange2=2 PitchBendRange2=2
PitchBendStep2=0 PitchBendStep2=0
PortamentoMode2=0 PortamentoMode2=0
PortamentoGlissando2=0 PortamentoGlissando2=0
PortamentoTime2=0 PortamentoTime2=0
VoiceData2=31 63 1C 44 62 62 5B 00 27 36 32 01 01 04 00 02 52 00 01 00 07 4D 24 29 47 63 62 62 00 27 00 00 03 03 00 00 02 62 00 01 00 08 4D 24 29 47 63 62 62 00 27 00 00 03 03 00 00 02 63 00 01 00 07 4D 4C 52 47 63 62 62 00 27 00 00 03 03 00 00 02 63 00 01 00 05 3E 33 1D 47 52 5F 60 00 1B 00 07 03 01 00 00 00 56 00 00 00 0E 48 4C 63 47 63 58 60 00 27 00 0E 03 03 00 00 00 62 00 00 00 0E 54 5F 5F 3C 32 32 32 32 15 07 01 25 00 05 00 00 04 03 18 42 52 41 53 53 20 20 20 31 20 5D VoiceData2=5F 1D 14 32 63 5F 00 00 29 00 13 00 00 03 00 06 4F 00 01 00 0E 5F 14 14 32 63 5F 00 00 00 00 00 00 00 03 00 00 63 00 01 00 00 5F 1D 14 32 63 5F 00 00 36 00 1B 00 00 03 00 06 55 00 01 00 07 5F 14 14 32 63 5F 00 00 00 00 00 00 00 03 00 02 63 00 01 00 07 5F 32 23 4E 63 4B 00 00 37 00 34 00 00 03 00 07 3A 00 1A 00 07 60 19 19 43 63 4B 00 00 00 00 00 00 00 03 00 02 63 00 01 00 0A 5E 43 5F 3C 32 32 32 32 04 06 00 0F 21 00 00 00 04 02 18 46 45 4E 44 45 52 48 4F 44 45 75
MonoMode2=0 MonoMode2=0
ModulationWheelRange2=99 ModulationWheelRange2=99
ModulationWheelTarget2=1 ModulationWheelTarget2=1
@ -52,24 +52,24 @@ BreathControlRange2=99
BreathControlTarget2=0 BreathControlTarget2=0
AftertouchRange2=99 AftertouchRange2=99
AftertouchTarget2=0 AftertouchTarget2=0
BankNumber3=0 BankNumber3=71
VoiceNumber3=1 VoiceNumber3=1
MIDIChannel3=0 MIDIChannel3=2
Volume3=100 Volume3=38
Pan3=64 Pan3=127
Detune3=0 Detune3=3
Cutoff3=99 Cutoff3=99
Resonance3=0 Resonance3=0
NoteLimitLow3=0 NoteLimitLow3=0
NoteLimitHigh3=127 NoteLimitHigh3=127
NoteShift3=0 NoteShift3=0
ReverbSend3=0 ReverbSend3=99
PitchBendRange3=2 PitchBendRange3=2
PitchBendStep3=0 PitchBendStep3=0
PortamentoMode3=0 PortamentoMode3=0
PortamentoGlissando3=0 PortamentoGlissando3=0
PortamentoTime3=0 PortamentoTime3=0
VoiceData3=31 63 1C 44 62 62 5B 00 27 36 32 01 01 04 00 02 52 00 01 00 07 4D 24 29 47 63 62 62 00 27 00 00 03 03 00 00 02 62 00 01 00 08 4D 24 29 47 63 62 62 00 27 00 00 03 03 00 00 02 63 00 01 00 07 4D 4C 52 47 63 62 62 00 27 00 00 03 03 00 00 02 63 00 01 00 05 3E 33 1D 47 52 5F 60 00 1B 00 07 03 01 00 00 00 56 00 00 00 0E 48 4C 63 47 63 58 60 00 27 00 0E 03 03 00 00 00 62 00 00 00 0E 54 5F 5F 3C 32 32 32 32 15 07 01 25 00 05 00 00 04 03 18 42 52 41 53 53 20 20 20 31 20 57 VoiceData3=5F 1D 14 32 63 5F 00 00 29 00 13 00 00 03 00 06 4F 00 01 00 0E 5F 14 14 32 63 5F 00 00 00 00 00 00 00 03 00 00 63 00 01 00 00 5F 1D 14 32 63 5F 00 00 36 00 1B 00 00 03 00 06 55 00 01 00 07 5F 14 14 32 63 5F 00 00 00 00 00 00 00 03 00 02 63 00 01 00 07 5F 32 23 4E 63 4B 00 00 37 00 34 00 00 03 00 07 3A 00 1A 00 07 60 19 19 43 63 4B 00 00 00 00 00 00 00 03 00 02 63 00 01 00 0A 5E 43 5F 3C 32 32 32 32 04 06 00 0F 21 00 00 00 04 02 18 46 45 4E 44 45 52 48 4F 44 45 DD
MonoMode3=0 MonoMode3=0
ModulationWheelRange3=99 ModulationWheelRange3=99
ModulationWheelTarget3=1 ModulationWheelTarget3=1
@ -79,24 +79,24 @@ BreathControlRange3=99
BreathControlTarget3=0 BreathControlTarget3=0
AftertouchRange3=99 AftertouchRange3=99
AftertouchTarget3=0 AftertouchTarget3=0
BankNumber4=0 BankNumber4=71
VoiceNumber4=1 VoiceNumber4=1
MIDIChannel4=0 MIDIChannel4=3
Volume4=100 Volume4=38
Pan4=64 Pan4=0
Detune4=0 Detune4=-3
Cutoff4=99 Cutoff4=99
Resonance4=0 Resonance4=0
NoteLimitLow4=0 NoteLimitLow4=0
NoteLimitHigh4=127 NoteLimitHigh4=127
NoteShift4=0 NoteShift4=0
ReverbSend4=0 ReverbSend4=99
PitchBendRange4=2 PitchBendRange4=2
PitchBendStep4=0 PitchBendStep4=0
PortamentoMode4=0 PortamentoMode4=0
PortamentoGlissando4=0 PortamentoGlissando4=0
PortamentoTime4=0 PortamentoTime4=0
VoiceData4=31 63 1C 44 62 62 5B 00 27 36 32 01 01 04 00 02 52 00 01 00 07 4D 24 29 47 63 62 62 00 27 00 00 03 03 00 00 02 62 00 01 00 08 4D 24 29 47 63 62 62 00 27 00 00 03 03 00 00 02 63 00 01 00 07 4D 4C 52 47 63 62 62 00 27 00 00 03 03 00 00 02 63 00 01 00 05 3E 33 1D 47 52 5F 60 00 1B 00 07 03 01 00 00 00 56 00 00 00 0E 48 4C 63 47 63 58 60 00 27 00 0E 03 03 00 00 00 62 00 00 00 0E 54 5F 5F 3C 32 32 32 32 15 07 01 25 00 05 00 00 04 03 18 42 52 41 53 53 20 20 20 31 20 57 VoiceData4=5F 1D 14 32 63 5F 00 00 29 00 13 00 00 03 00 06 4F 00 01 00 0E 5F 14 14 32 63 5F 00 00 00 00 00 00 00 03 00 00 63 00 01 00 00 5F 1D 14 32 63 5F 00 00 36 00 1B 00 00 03 00 06 55 00 01 00 07 5F 14 14 32 63 5F 00 00 00 00 00 00 00 03 00 02 63 00 01 00 07 5F 32 23 4E 63 4B 00 00 37 00 34 00 00 03 00 07 3A 00 1A 00 07 60 19 19 43 63 4B 00 00 00 00 00 00 00 03 00 02 63 00 01 00 0A 5E 43 5F 3C 32 32 32 32 04 06 00 0F 21 00 00 00 04 02 18 46 45 4E 44 45 52 48 4F 44 45 55
MonoMode4=0 MonoMode4=0
ModulationWheelRange4=99 ModulationWheelRange4=99
ModulationWheelTarget4=1 ModulationWheelTarget4=1
@ -106,24 +106,24 @@ BreathControlRange4=99
BreathControlTarget4=0 BreathControlTarget4=0
AftertouchRange4=99 AftertouchRange4=99
AftertouchTarget4=0 AftertouchTarget4=0
BankNumber5=0 BankNumber5=71
VoiceNumber5=1 VoiceNumber5=1
MIDIChannel5=0 MIDIChannel5=3
Volume5=100 Volume5=38
Pan5=64 Pan5=127
Detune5=0 Detune5=3
Cutoff5=99 Cutoff5=99
Resonance5=0 Resonance5=0
NoteLimitLow5=0 NoteLimitLow5=0
NoteLimitHigh5=127 NoteLimitHigh5=127
NoteShift5=0 NoteShift5=0
ReverbSend5=0 ReverbSend5=99
PitchBendRange5=2 PitchBendRange5=2
PitchBendStep5=0 PitchBendStep5=0
PortamentoMode5=0 PortamentoMode5=0
PortamentoGlissando5=0 PortamentoGlissando5=0
PortamentoTime5=0 PortamentoTime5=0
VoiceData5=31 63 1C 44 62 62 5B 00 27 36 32 01 01 04 00 02 52 00 01 00 07 4D 24 29 47 63 62 62 00 27 00 00 03 03 00 00 02 62 00 01 00 08 4D 24 29 47 63 62 62 00 27 00 00 03 03 00 00 02 63 00 01 00 07 4D 4C 52 47 63 62 62 00 27 00 00 03 03 00 00 02 63 00 01 00 05 3E 33 1D 47 52 5F 60 00 1B 00 07 03 01 00 00 00 56 00 00 00 0E 48 4C 63 47 63 58 60 00 27 00 0E 03 03 00 00 00 62 00 00 00 0E 54 5F 5F 3C 32 32 32 32 15 07 01 25 00 05 00 00 04 03 18 42 52 41 53 53 20 20 20 31 20 5D VoiceData5=5F 1D 14 32 63 5F 00 00 29 00 13 00 00 03 00 06 4F 00 01 00 0E 5F 14 14 32 63 5F 00 00 00 00 00 00 00 03 00 00 63 00 01 00 00 5F 1D 14 32 63 5F 00 00 36 00 1B 00 00 03 00 06 55 00 01 00 07 5F 14 14 32 63 5F 00 00 00 00 00 00 00 03 00 02 63 00 01 00 07 5F 32 23 4E 63 4B 00 00 37 00 34 00 00 03 00 07 3A 00 1A 00 07 60 19 19 43 63 4B 00 00 00 00 00 00 00 03 00 02 63 00 01 00 0A 5E 43 5F 3C 32 32 32 32 04 06 00 0F 21 00 00 00 04 02 18 46 45 4E 44 45 52 48 4F 44 45 5D
MonoMode5=0 MonoMode5=0
ModulationWheelRange5=99 ModulationWheelRange5=99
ModulationWheelTarget5=1 ModulationWheelTarget5=1
@ -133,24 +133,24 @@ BreathControlRange5=99
BreathControlTarget5=0 BreathControlTarget5=0
AftertouchRange5=99 AftertouchRange5=99
AftertouchTarget5=0 AftertouchTarget5=0
BankNumber6=0 BankNumber6=71
VoiceNumber6=1 VoiceNumber6=1
MIDIChannel6=0 MIDIChannel6=3
Volume6=100 Volume6=38
Pan6=64 Pan6=0
Detune6=0 Detune6=1
Cutoff6=99 Cutoff6=99
Resonance6=0 Resonance6=0
NoteLimitLow6=0 NoteLimitLow6=0
NoteLimitHigh6=127 NoteLimitHigh6=127
NoteShift6=0 NoteShift6=0
ReverbSend6=0 ReverbSend6=99
PitchBendRange6=2 PitchBendRange6=2
PitchBendStep6=0 PitchBendStep6=0
PortamentoMode6=0 PortamentoMode6=0
PortamentoGlissando6=0 PortamentoGlissando6=0
PortamentoTime6=0 PortamentoTime6=0
VoiceData6=31 63 1C 44 62 62 5B 00 27 36 32 01 01 04 00 02 52 00 01 00 07 4D 24 29 47 63 62 62 00 27 00 00 03 03 00 00 02 62 00 01 00 08 4D 24 29 47 63 62 62 00 27 00 00 03 03 00 00 02 63 00 01 00 07 4D 4C 52 47 63 62 62 00 27 00 00 03 03 00 00 02 63 00 01 00 05 3E 33 1D 47 52 5F 60 00 1B 00 07 03 01 00 00 00 56 00 00 00 0E 48 4C 63 47 63 58 60 00 27 00 0E 03 03 00 00 00 62 00 00 00 0E 54 5F 5F 3C 32 32 32 32 15 07 01 25 00 05 00 00 04 03 18 42 52 41 53 53 20 20 20 31 20 75 VoiceData6=5F 1D 14 32 63 5F 00 00 29 00 13 00 00 03 00 06 4F 00 01 00 0E 5F 14 14 32 63 5F 00 00 00 00 00 00 00 03 00 00 63 00 01 00 00 5F 1D 14 32 63 5F 00 00 36 00 1B 00 00 03 00 06 55 00 01 00 07 5F 14 14 32 63 5F 00 00 00 00 00 00 00 03 00 02 63 00 01 00 07 5F 32 23 4E 63 4B 00 00 37 00 34 00 00 03 00 07 3A 00 1A 00 07 60 19 19 43 63 4B 00 00 00 00 00 00 00 03 00 02 63 00 01 00 0A 5E 43 5F 3C 32 32 32 32 04 06 00 0F 21 00 00 00 04 02 18 46 45 4E 44 45 52 48 4F 44 45 55
MonoMode6=0 MonoMode6=0
ModulationWheelRange6=99 ModulationWheelRange6=99
ModulationWheelTarget6=1 ModulationWheelTarget6=1
@ -160,24 +160,24 @@ BreathControlRange6=99
BreathControlTarget6=0 BreathControlTarget6=0
AftertouchRange6=99 AftertouchRange6=99
AftertouchTarget6=0 AftertouchTarget6=0
BankNumber7=0 BankNumber7=71
VoiceNumber7=1 VoiceNumber7=1
MIDIChannel7=0 MIDIChannel7=3
Volume7=100 Volume7=38
Pan7=64 Pan7=120
Detune7=0 Detune7=-4
Cutoff7=99 Cutoff7=99
Resonance7=0 Resonance7=0
NoteLimitLow7=0 NoteLimitLow7=0
NoteLimitHigh7=127 NoteLimitHigh7=127
NoteShift7=0 NoteShift7=0
ReverbSend7=0 ReverbSend7=99
PitchBendRange7=2 PitchBendRange7=2
PitchBendStep7=0 PitchBendStep7=0
PortamentoMode7=0 PortamentoMode7=0
PortamentoGlissando7=0 PortamentoGlissando7=0
PortamentoTime7=0 PortamentoTime7=0
VoiceData7=31 63 1C 44 62 62 5B 00 27 36 32 01 01 04 00 02 52 00 01 00 07 4D 24 29 47 63 62 62 00 27 00 00 03 03 00 00 02 62 00 01 00 08 4D 24 29 47 63 62 62 00 27 00 00 03 03 00 00 02 63 00 01 00 07 4D 4C 52 47 63 62 62 00 27 00 00 03 03 00 00 02 63 00 01 00 05 3E 33 1D 47 52 5F 60 00 1B 00 07 03 01 00 00 00 56 00 00 00 0E 48 4C 63 47 63 58 60 00 27 00 0E 03 03 00 00 00 62 00 00 00 0E 54 5F 5F 3C 32 32 32 32 15 07 01 25 00 05 00 00 04 03 18 42 52 41 53 53 20 20 20 31 20 75 VoiceData7=5F 1D 14 32 63 5F 00 00 29 00 13 00 00 03 00 06 4F 00 01 00 0E 5F 14 14 32 63 5F 00 00 00 00 00 00 00 03 00 00 63 00 01 00 00 5F 1D 14 32 63 5F 00 00 36 00 1B 00 00 03 00 06 55 00 01 00 07 5F 14 14 32 63 5F 00 00 00 00 00 00 00 03 00 02 63 00 01 00 07 5F 32 23 4E 63 4B 00 00 37 00 34 00 00 03 00 07 3A 00 1A 00 07 60 19 19 43 63 4B 00 00 00 00 00 00 00 03 00 02 63 00 01 00 0A 5E 43 5F 3C 32 32 32 32 04 06 00 0F 21 00 00 00 04 02 18 46 45 4E 44 45 52 48 4F 44 45 55
MonoMode7=0 MonoMode7=0
ModulationWheelRange7=99 ModulationWheelRange7=99
ModulationWheelTarget7=1 ModulationWheelTarget7=1
@ -187,10 +187,10 @@ BreathControlRange7=99
BreathControlTarget7=0 BreathControlTarget7=0
AftertouchRange7=99 AftertouchRange7=99
AftertouchTarget7=0 AftertouchTarget7=0
BankNumber8=0 BankNumber8=71
VoiceNumber8=1 VoiceNumber8=1
MIDIChannel8=0 MIDIChannel8=0
Volume8=100 Volume8=64
Pan8=64 Pan8=64
Detune8=0 Detune8=0
Cutoff8=99 Cutoff8=99
@ -198,13 +198,13 @@ Resonance8=0
NoteLimitLow8=0 NoteLimitLow8=0
NoteLimitHigh8=127 NoteLimitHigh8=127
NoteShift8=0 NoteShift8=0
ReverbSend8=0 ReverbSend8=99
PitchBendRange8=2 PitchBendRange8=2
PitchBendStep8=0 PitchBendStep8=0
PortamentoMode8=0 PortamentoMode8=0
PortamentoGlissando8=0 PortamentoGlissando8=0
PortamentoTime8=0 PortamentoTime8=0
VoiceData8=31 63 1C 44 62 62 5B 00 27 36 32 01 01 04 00 02 52 00 01 00 07 4D 24 29 47 63 62 62 00 27 00 00 03 03 00 00 02 62 00 01 00 08 4D 24 29 47 63 62 62 00 27 00 00 03 03 00 00 02 63 00 01 00 07 4D 4C 52 47 63 62 62 00 27 00 00 03 03 00 00 02 63 00 01 00 05 3E 33 1D 47 52 5F 60 00 1B 00 07 03 01 00 00 00 56 00 00 00 0E 48 4C 63 47 63 58 60 00 27 00 0E 03 03 00 00 00 62 00 00 00 0E 54 5F 5F 3C 32 32 32 32 15 07 01 25 00 05 00 00 04 03 18 42 52 41 53 53 20 20 20 31 20 55 VoiceData8=5F 1D 14 32 63 5F 00 00 29 00 13 00 00 03 00 06 4F 00 01 00 0E 5F 14 14 32 63 5F 00 00 00 00 00 00 00 03 00 00 63 00 01 00 00 5F 1D 14 32 63 5F 00 00 36 00 1B 00 00 03 00 06 55 00 01 00 07 5F 14 14 32 63 5F 00 00 00 00 00 00 00 03 00 02 63 00 01 00 07 5F 32 23 4E 63 4B 00 00 37 00 34 00 00 03 00 07 3A 00 1A 00 07 60 19 19 43 63 4B 00 00 00 00 00 00 00 03 00 02 63 00 01 00 0A 5E 43 5F 3C 32 32 32 32 04 06 00 0F 21 00 00 00 04 02 18 46 45 4E 44 45 52 48 4F 44 45 01
MonoMode8=0 MonoMode8=0
ModulationWheelRange8=99 ModulationWheelRange8=99
ModulationWheelTarget8=1 ModulationWheelTarget8=1
@ -216,12 +216,12 @@ AftertouchRange8=99
AftertouchTarget8=0 AftertouchTarget8=0
CompressorEnable=1 CompressorEnable=1
ReverbEnable=1 ReverbEnable=1
ReverbSize=70 ReverbSize=52
ReverbHighDamp=50 ReverbHighDamp=28
ReverbLowDamp=50 ReverbLowDamp=28
ReverbLowPass=30 ReverbLowPass=66
ReverbDiffusion=65 ReverbDiffusion=66
ReverbLevel=99 ReverbLevel=33
FXTubeEnable=1 FXTubeEnable=1
FXTubeOverdrive=10 FXTubeOverdrive=10
FXChorusEnable=1 FXChorusEnable=1

@ -72,6 +72,7 @@ void CConfig::Load (void)
m_bIgnoreAllNotesOff = m_Properties.GetNumber ("IgnoreAllNotesOff", 0) != 0; m_bIgnoreAllNotesOff = m_Properties.GetNumber ("IgnoreAllNotesOff", 0) != 0;
m_bMIDIAutoVoiceDumpOnPC = m_Properties.GetNumber ("MIDIAutoVoiceDumpOnPC", 1) != 0; m_bMIDIAutoVoiceDumpOnPC = m_Properties.GetNumber ("MIDIAutoVoiceDumpOnPC", 1) != 0;
m_bHeaderlessSysExVoices = m_Properties.GetNumber ("HeaderlessSysExVoices", 0) != 0; m_bHeaderlessSysExVoices = m_Properties.GetNumber ("HeaderlessSysExVoices", 0) != 0;
m_bExpandPCAcrossBanks = m_Properties.GetNumber ("ExpandPCAcrossBanks", 1) != 0;
m_bLCDEnabled = m_Properties.GetNumber ("LCDEnabled", 0) != 0; m_bLCDEnabled = m_Properties.GetNumber ("LCDEnabled", 0) != 0;
m_nLCDPinEnable = m_Properties.GetNumber ("LCDPinEnable", 4); m_nLCDPinEnable = m_Properties.GetNumber ("LCDPinEnable", 4);
@ -185,6 +186,11 @@ bool CConfig::GetHeaderlessSysExVoices (void) const
return m_bHeaderlessSysExVoices; return m_bHeaderlessSysExVoices;
} }
bool CConfig::GetExpandPCAcrossBanks (void) const
{
return m_bExpandPCAcrossBanks;
}
bool CConfig::GetLCDEnabled (void) const bool CConfig::GetLCDEnabled (void) const
{ {
return m_bLCDEnabled; return m_bLCDEnabled;

@ -78,6 +78,7 @@ public:
bool GetIgnoreAllNotesOff (void) const; bool GetIgnoreAllNotesOff (void) const;
bool GetMIDIAutoVoiceDumpOnPC (void) const; // true if not specified bool GetMIDIAutoVoiceDumpOnPC (void) const; // true if not specified
bool GetHeaderlessSysExVoices (void) const; // false if not specified bool GetHeaderlessSysExVoices (void) const; // false if not specified
bool GetExpandPCAcrossBanks (void) const; // true if not specified
// HD44780 LCD // HD44780 LCD
// GPIO pin numbers are chip numbers, not header positions // GPIO pin numbers are chip numbers, not header positions
@ -159,6 +160,7 @@ private:
bool m_bIgnoreAllNotesOff; bool m_bIgnoreAllNotesOff;
bool m_bMIDIAutoVoiceDumpOnPC; bool m_bMIDIAutoVoiceDumpOnPC;
bool m_bHeaderlessSysExVoices; bool m_bHeaderlessSysExVoices;
bool m_bExpandPCAcrossBanks;
bool m_bLCDEnabled; bool m_bLCDEnabled;
unsigned m_nLCDPinEnable; unsigned m_nLCDPinEnable;

@ -101,8 +101,7 @@ void CMIDIDevice::MIDIMessageHandler (const u8 *pMessage, size_t nLength, unsign
switch (nLength) switch (nLength)
{ {
case 1: case 1:
if ( pMessage[0] != MIDI_TIMING_CLOCK if (pMessage[0] != MIDI_TIMING_CLOCK && pMessage[0] != MIDI_ACTIVE_SENSING)
&& pMessage[0] != MIDI_ACTIVE_SENSING)
{ {
printf("MIDI%u: %02X\n", nCable, (unsigned)pMessage[0]); printf("MIDI%u: %02X\n", nCable, (unsigned)pMessage[0]);
} }
@ -215,8 +214,7 @@ void CMIDIDevice::MIDIMessageHandler (const u8 *pMessage, size_t nLength, unsign
} }
else else
{ {
if ( m_ChannelMap[nTG] == ucChannel if (m_ChannelMap[nTG] == ucChannel || m_ChannelMap[nTG] == OmniMode)
|| m_ChannelMap[nTG] == OmniMode)
{ {
switch (ucType) switch (ucType)
{ {
@ -343,7 +341,10 @@ void CMIDIDevice::MIDIMessageHandler (const u8 *pMessage, size_t nLength, unsign
break; break;
case MIDI_CC_ALL_NOTES_OFF: case MIDI_CC_ALL_NOTES_OFF:
if (!m_pConfig->GetIgnoreAllNotesOff ()) // As per "MIDI 1.0 Detailed Specification" v4.2
// From "ALL NOTES OFF" states:
// "Receivers should ignore an All Notes Off message while Omni is on (Modes 1 & 2)"
if (!m_pConfig->GetIgnoreAllNotesOff() && m_ChannelMap[nTG] != OmniMode)
{ {
m_pSynthesizer->notesOff(pMessage[2], nTG); m_pSynthesizer->notesOff(pMessage[2], nTG);
} }
@ -357,7 +358,8 @@ void CMIDIDevice::MIDIMessageHandler (const u8 *pMessage, size_t nLength, unsign
m_pSynthesizer->ProgramChange(pMessage[1], nTG); m_pSynthesizer->ProgramChange(pMessage[1], nTG);
break; break;
case MIDI_PITCH_BEND: { case MIDI_PITCH_BEND:
{
if (nLength < 3) if (nLength < 3)
{ {
break; break;
@ -368,7 +370,8 @@ void CMIDIDevice::MIDIMessageHandler (const u8 *pMessage, size_t nLength, unsign
nValue -= 0x2000; nValue -= 0x2000;
m_pSynthesizer->setPitchbend(nValue, nTG); m_pSynthesizer->setPitchbend(nValue, nTG);
} break; }
break;
default: default:
break; break;
@ -529,8 +532,7 @@ void CMIDIDevice::SendSystemExclusiveVoice(uint8_t nVoice, const unsigned nCable
TDeviceMap::const_iterator Iterator; TDeviceMap::const_iterator Iterator;
// send voice dump to all MIDI interfaces // send voice dump to all MIDI interfaces
auto end = s_DeviceMap.end(); for (Iterator = s_DeviceMap.begin(); Iterator != s_DeviceMap.end(); ++Iterator)
for(Iterator = s_DeviceMap.begin(); Iterator != end; ++Iterator)
{ {
Iterator->second->Send(voicedump, sizeof(voicedump) * sizeof(uint8_t)); Iterator->second->Send(voicedump, sizeof(voicedump) * sizeof(uint8_t));
// LOGDBG("Send SYSEX voice dump %u to \"%s\"",nVoice,Iterator->first.c_str()); // LOGDBG("Send SYSEX voice dump %u to \"%s\"",nVoice,Iterator->first.c_str());

@ -51,6 +51,7 @@ CMiniDexed::CMiniDexed (
#ifdef ARM_ALLOW_MULTI_CORE #ifdef ARM_ALLOW_MULTI_CORE
m_nActiveTGsLog2 (0), m_nActiveTGsLog2 (0),
#endif #endif
m_GetChunkTimer ("GetChunk", 1000000U * pConfig->GetChunkSize ()/2 / pConfig->GetSampleRate ()), m_GetChunkTimer ("GetChunk", 1000000U * pConfig->GetChunkSize ()/2 / pConfig->GetSampleRate ()),
m_bProfileEnabled (m_pConfig->GetProfileEnabled ()), m_bProfileEnabled (m_pConfig->GetProfileEnabled ()),
m_bSavePerformance (false), m_bSavePerformance (false),
@ -82,6 +83,15 @@ CMiniDexed::CMiniDexed (
m_nNoteLimitHigh[i] = 127; m_nNoteLimitHigh[i] = 127;
m_nNoteShift[i] = 0; m_nNoteShift[i] = 0;
m_nModulationWheelRange[i] = 99; m_nModulationWheelRange[i] = 99;
m_nModulationWheelTarget[i] = 7; m_nModulationWheelTarget[i] = 7;
m_nFootControlRange[i] = 99; m_nFootControlRange[i] = 99;
@ -318,6 +328,8 @@ bool CMiniDexed::Initialize (void)
} }
#if defined(ARM_ALLOW_MULTI_CORE) #if defined(ARM_ALLOW_MULTI_CORE)
m_pSoundDevice->SetWriteFormat (SoundFormatSigned16, 2); // 16-bit Stereo m_pSoundDevice->SetWriteFormat (SoundFormatSigned16, 2); // 16-bit Stereo
#else #else
m_pSoundDevice->SetWriteFormat (SoundFormatSigned16, 1); // 16-bit Mono m_pSoundDevice->SetWriteFormat (SoundFormatSigned16, 1); // 16-bit Mono
@ -510,13 +522,34 @@ void CMiniDexed::ProgramChange (unsigned nProgram, unsigned nTG)
{ {
assert (m_pConfig); assert (m_pConfig);
unsigned nBankOffset;
bool bPCAcrossBanks = m_pConfig->GetExpandPCAcrossBanks();
if (bPCAcrossBanks)
{
// Note: This doesn't actually change the bank in use
// but will allow PC messages of 0..127
// to select across four consecutive banks of voices.
//
// So if the current bank = 5 then:
// PC 0-31 = Bank 5, Program 0-31
// PC 32-63 = Bank 6, Program 0-31
// PC 64-95 = Bank 7, Program 0-31
// PC 96-127 = Bank 8, Program 0-31
nProgram=constrain((int)nProgram,0,127);
nBankOffset = nProgram >> 5;
nProgram = nProgram % 32;
}
else
{
nBankOffset = 0;
nProgram=constrain((int)nProgram,0,31); nProgram=constrain((int)nProgram,0,31);
}
assert (nTG < CConfig::ToneGenerators); assert (nTG < CConfig::ToneGenerators);
m_nProgram[nTG] = nProgram; m_nProgram[nTG] = nProgram;
uint8_t Buffer[156]; uint8_t Buffer[156];
m_SysExFileLoader.GetVoice (m_nVoiceBankID[nTG], nProgram, Buffer); m_SysExFileLoader.GetVoice (m_nVoiceBankID[nTG]+nBankOffset, nProgram, Buffer);
assert (m_pTG[nTG]); assert (m_pTG[nTG]);
m_pTG[nTG]->loadVoiceParameters (Buffer); m_pTG[nTG]->loadVoiceParameters (Buffer);
@ -656,6 +689,8 @@ void CMiniDexed::SetResonance (int nResonance, unsigned nTG)
m_UI.ParameterChanged (); m_UI.ParameterChanged ();
} }
void CMiniDexed::SetMIDIChannel (uint8_t uchChannel, unsigned nTG) void CMiniDexed::SetMIDIChannel (uint8_t uchChannel, unsigned nTG)
{ {
assert (nTG < CConfig::ToneGenerators); assert (nTG < CConfig::ToneGenerators);
@ -771,6 +806,7 @@ void CMiniDexed::setModWheel (uint8_t value, unsigned nTG)
m_pTG[nTG]->setModWheel (value); m_pTG[nTG]->setModWheel (value);
} }
void CMiniDexed::setFootController (uint8_t value, unsigned nTG) void CMiniDexed::setFootController (uint8_t value, unsigned nTG)
{ {
assert (nTG < CConfig::ToneGenerators); assert (nTG < CConfig::ToneGenerators);
@ -808,6 +844,8 @@ void CMiniDexed::ControllersRefresh (unsigned nTG)
void CMiniDexed::SetParameter (TParameter Parameter, int nValue) void CMiniDexed::SetParameter (TParameter Parameter, int nValue)
{ {
assert(Parameter < TParameter::ParameterUnknown); assert(Parameter < TParameter::ParameterUnknown);
m_nParameter[Parameter] = nValue; m_nParameter[Parameter] = nValue;
@ -1812,6 +1850,8 @@ void CMiniDexed::ProcessSound (void)
uint8_t indexL=0, indexR=1; uint8_t indexL=0, indexR=1;
// BEGIN TG mixing // BEGIN TG mixing
float32_t tmp_float[nFrames*2];
if(nMasterVolume > 0.0f) if(nMasterVolume > 0.0f)
{ {
for (uint8_t i = 0; i < CConfig::ToneGenerators; i++) for (uint8_t i = 0; i < CConfig::ToneGenerators; i++)
@ -2315,6 +2355,11 @@ void CMiniDexed::getSysExVoiceDump(uint8_t* dest, uint8_t nTG)
void CMiniDexed::setMasterVolume (float32_t vol) void CMiniDexed::setMasterVolume (float32_t vol)
{ {
this->nMasterVolume = constrain(vol, 0.0f, 1.0f); this->nMasterVolume = constrain(vol, 0.0f, 1.0f);
} }
std::string CMiniDexed::GetPerformanceFileName(unsigned nID) std::string CMiniDexed::GetPerformanceFileName(unsigned nID)
@ -2375,7 +2420,7 @@ bool CMiniDexed::DoSetNewPerformance (void)
bool CMiniDexed::SavePerformanceNewFile () bool CMiniDexed::SavePerformanceNewFile ()
{ {
m_bSavePerformanceNewFile = m_PerformanceConfig.GetInternalFolderOk(); m_bSavePerformanceNewFile = m_PerformanceConfig.GetInternalFolderOk() && m_PerformanceConfig.CheckFreePerformanceSlot();
return m_bSavePerformanceNewFile; return m_bSavePerformanceNewFile;
} }
@ -2404,7 +2449,8 @@ void CMiniDexed::LoadPerformanceParameters(void)
{ {
for (unsigned nTG = 0; nTG < CConfig::ToneGenerators; nTG++) for (unsigned nTG = 0; nTG < CConfig::ToneGenerators; nTG++)
{ {
BankSelectLSB (m_PerformanceConfig.GetBankNumber (nTG), nTG);
BankSelect (m_PerformanceConfig.GetBankNumber (nTG), nTG);
ProgramChange (m_PerformanceConfig.GetVoiceNumber (nTG), nTG); ProgramChange (m_PerformanceConfig.GetVoiceNumber (nTG), nTG);
SetMIDIChannel (m_PerformanceConfig.GetMIDIChannel (nTG), nTG); SetMIDIChannel (m_PerformanceConfig.GetMIDIChannel (nTG), nTG);
SetVolume (m_PerformanceConfig.GetVolume (nTG), nTG); SetVolume (m_PerformanceConfig.GetVolume (nTG), nTG);
@ -2422,6 +2468,24 @@ void CMiniDexed::LoadPerformanceParameters(void)
m_nNoteLimitHigh[nTG] = m_PerformanceConfig.GetNoteLimitHigh (nTG); m_nNoteLimitHigh[nTG] = m_PerformanceConfig.GetNoteLimitHigh (nTG);
m_nNoteShift[nTG] = m_PerformanceConfig.GetNoteShift (nTG); m_nNoteShift[nTG] = m_PerformanceConfig.GetNoteShift (nTG);
if(m_PerformanceConfig.VoiceDataFilled(nTG)) if(m_PerformanceConfig.VoiceDataFilled(nTG))
{ {
uint8_t* tVoiceData = m_PerformanceConfig.GetVoiceDataFromTxt(nTG); uint8_t* tVoiceData = m_PerformanceConfig.GetVoiceDataFromTxt(nTG);
@ -2429,6 +2493,7 @@ void CMiniDexed::LoadPerformanceParameters(void)
} }
setMonoMode(m_PerformanceConfig.GetMonoMode(nTG) ? 1 : 0, nTG); setMonoMode(m_PerformanceConfig.GetMonoMode(nTG) ? 1 : 0, nTG);
this->SetParameter(TParameter::ParameterCompressorEnable, this->m_PerformanceConfig.GetCompressorEnable()); this->SetParameter(TParameter::ParameterCompressorEnable, this->m_PerformanceConfig.GetCompressorEnable());
#if defined(MIXING_CONSOLE_ENABLE) #if defined(MIXING_CONSOLE_ENABLE)
for(size_t fx = 0; fx < MixerOutput::kFXCount; ++fx) for(size_t fx = 0; fx < MixerOutput::kFXCount; ++fx)
@ -2738,5 +2803,4 @@ unsigned CMiniDexed::getModController (unsigned controller, unsigned parameter,
return 0; return 0;
break; break;
} }
} }

@ -20,11 +20,13 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>. // along with this program. If not, see <http://www.gnu.org/licenses/>.
// //
#include <circle/logger.h>
#include "performanceconfig.h" #include "performanceconfig.h"
#include "mididevice.h" #include "mididevice.h"
#include <cstring> #include <cstring>
#include <algorithm> #include <algorithm>
#include <sstream>
LOGMODULE ("Performance");
CPerformanceConfig::CPerformanceConfig (FATFS *pFileSystem) CPerformanceConfig::CPerformanceConfig (FATFS *pFileSystem)
: m_Properties ("performance.ini", pFileSystem) : m_Properties ("performance.ini", pFileSystem)
@ -890,8 +892,27 @@ bool CPerformanceConfig::GetInternalFolderOk()
return nInternalFolderOk; return nInternalFolderOk;
} }
bool CPerformanceConfig::CheckFreePerformanceSlot(void)
{
if (nLastPerformance < NUM_PERFORMANCES)
{
// There is a free slot...
return true;
}
else
{
return false;
}
}
bool CPerformanceConfig::CreateNewPerformanceFile(void) bool CPerformanceConfig::CreateNewPerformanceFile(void)
{ {
if (nLastPerformance >= NUM_PERFORMANCES) {
// No space left for new performances
LOGWARN ("No space left for new performance");
return false;
}
std::string sPerformanceName = NewPerformanceName; std::string sPerformanceName = NewPerformanceName;
NewPerformanceName=""; NewPerformanceName="";
nActualPerformance=nLastPerformance; nActualPerformance=nLastPerformance;
@ -971,6 +992,12 @@ bool CPerformanceConfig::ListPerformances()
{ {
Result = f_findfirst (&Directory, &FileInfo, "SD:/" PERFORMANCE_DIR, "*.ini"); Result = f_findfirst (&Directory, &FileInfo, "SD:/" PERFORMANCE_DIR, "*.ini");
for (unsigned i = 0; Result == FR_OK && FileInfo.fname[0]; i++) for (unsigned i = 0; Result == FR_OK && FileInfo.fname[0]; i++)
{
if (nLastPerformance >= NUM_PERFORMANCES)
{
LOGNOTE ("Skipping performance %s", FileInfo.fname);
}
else
{ {
if (!(FileInfo.fattrib & (AM_HID | AM_SYS))) if (!(FileInfo.fattrib & (AM_HID | AM_SYS)))
{ {
@ -987,6 +1014,7 @@ bool CPerformanceConfig::ListPerformances()
m_nPerformanceFileName[nLastPerformance++]= FileName; m_nPerformanceFileName[nLastPerformance++]= FileName;
} }
} }
}
Result = f_findnext (&Directory, &FileInfo); Result = f_findnext (&Directory, &FileInfo);
} }
@ -997,10 +1025,11 @@ bool CPerformanceConfig::ListPerformances()
} }
} }
LOGNOTE ("Number of Performances: %d", nLastPerformance);
return nInternalFolderOk; return nInternalFolderOk;
} }
void CPerformanceConfig::SetNewPerformance (unsigned nID) void CPerformanceConfig::SetNewPerformance (unsigned nID)
{ {
nActualPerformance=nID; nActualPerformance=nID;

@ -29,6 +29,7 @@
#include <Properties/propertiesfatfsfile.h> #include <Properties/propertiesfatfsfile.h>
#define NUM_VOICE_PARAM 156 #define NUM_VOICE_PARAM 156
#define PERFORMANCE_DIR "performance" #define PERFORMANCE_DIR "performance"
#define NUM_PERFORMANCES 256
class CPerformanceConfig // Performance configuration class CPerformanceConfig // Performance configuration
{ {
@ -212,6 +213,7 @@ public:
std::string GetNewPerformanceDefaultName(void); std::string GetNewPerformanceDefaultName(void);
void SetNewPerformanceName(std::string nName); void SetNewPerformanceName(std::string nName);
bool DeletePerformance(unsigned nID); bool DeletePerformance(unsigned nID);
bool CheckFreePerformanceSlot(void);
private: private:
CPropertiesFatFsFile m_Properties; CPropertiesFatFsFile m_Properties;
@ -251,7 +253,7 @@ private:
unsigned nLastFileIndex; unsigned nLastFileIndex;
unsigned nActualPerformance = 0; unsigned nActualPerformance = 0;
//unsigned nMenuSelectedPerformance = 0; //unsigned nMenuSelectedPerformance = 0;
std::string m_nPerformanceFileName[1024]; std::string m_nPerformanceFileName[NUM_PERFORMANCES];
FATFS *m_pFileSystem; FATFS *m_pFileSystem;
bool nInternalFolderOk=false; bool nInternalFolderOk=false;

@ -893,6 +893,7 @@ const CUIMenu::TMenuItem CUIMenu::s_PerformanceMenu[] =
{0} {0}
}; };
CUIMenu::CUIMenu (CUserInterface *pUI, CMiniDexed *pMiniDexed) : CUIMenu::CUIMenu (CUserInterface *pUI, CMiniDexed *pMiniDexed) :
m_pUI (pUI), m_pUI (pUI),
m_pMiniDexed (pMiniDexed), m_pMiniDexed (pMiniDexed),
@ -904,6 +905,23 @@ CUIMenu::CUIMenu (CUserInterface *pUI, CMiniDexed *pMiniDexed) :
m_nCurrentMenuDepth (0) m_nCurrentMenuDepth (0)
{ {
assert(pMiniDexed); assert(pMiniDexed);
#ifndef ARM_ALLOW_MULTI_CORE
// If there is just one core, then there is only a single
// tone generator so start on the TG1 menu...
m_pParentMenu = s_MainMenu;
m_pCurrentMenu = s_TGMenu;
m_nCurrentMenuItem = 0;
m_nCurrentSelection = 0;
m_nCurrentParameter = 0;
m_nCurrentMenuDepth = 1;
// Place the "root" menu at the top of the stack
m_MenuStackParent[0] = s_MenuRoot;
m_MenuStackMenu[0] = s_MainMenu;
m_nMenuStackItem[0] = 0;
m_nMenuStackSelection[0] = 0;
m_nMenuStackParameter[0] = 0;
#endif
} }
void CUIMenu::EventHandler (TMenuEvent Event) void CUIMenu::EventHandler (TMenuEvent Event)
@ -926,13 +944,28 @@ void CUIMenu::EventHandler (TMenuEvent Event)
break; break;
case MenuEventHome: case MenuEventHome:
#ifdef ARM_ALLOW_MULTI_CORE
m_pParentMenu = s_MenuRoot; m_pParentMenu = s_MenuRoot;
m_pCurrentMenu = s_MainMenu; m_pCurrentMenu = s_MainMenu;
m_nCurrentMenuItem = 0; m_nCurrentMenuItem = 0;
m_nCurrentSelection = 0; m_nCurrentSelection = 0;
m_nCurrentParameter = 0; m_nCurrentParameter = 0;
m_nCurrentMenuDepth = 0; m_nCurrentMenuDepth = 0;
#else
// "Home" is the TG0 menu if only one TG active
m_pParentMenu = s_MainMenu;
m_pCurrentMenu = s_TGMenu;
m_nCurrentMenuItem = 0;
m_nCurrentSelection = 0;
m_nCurrentParameter = 0;
m_nCurrentMenuDepth = 1;
// Place the "root" menu at the top of the stack
m_MenuStackParent[0] = s_MenuRoot;
m_MenuStackMenu[0] = s_MainMenu;
m_nMenuStackItem[0] = 0;
m_nMenuStackSelection[0] = 0;
m_nMenuStackParameter[0] = 0;
#endif
EventHandler (MenuEventUpdate); EventHandler (MenuEventUpdate);
break; break;
@ -954,12 +987,17 @@ void CUIMenu::MenuHandler (CUIMenu *pUIMenu, TMenuEvent Event)
pUIMenu->m_MenuStackParent[pUIMenu->m_nCurrentMenuDepth] = pUIMenu->m_pParentMenu; pUIMenu->m_MenuStackParent[pUIMenu->m_nCurrentMenuDepth] = pUIMenu->m_pParentMenu;
pUIMenu->m_MenuStackMenu[pUIMenu->m_nCurrentMenuDepth] = pUIMenu->m_pCurrentMenu; pUIMenu->m_MenuStackMenu[pUIMenu->m_nCurrentMenuDepth] = pUIMenu->m_pCurrentMenu;
pUIMenu->m_nMenuStackItem[pUIMenu->m_nCurrentMenuDepth] = pUIMenu->m_nCurrentMenuItem; pUIMenu->m_nMenuStackItem[pUIMenu->m_nCurrentMenuDepth] = pUIMenu->m_nCurrentMenuItem;
pUIMenu->m_nMenuStackSelection[pUIMenu->m_nCurrentMenuDepth] = pUIMenu->m_nCurrentSelection; pUIMenu->m_nMenuStackSelection[pUIMenu->m_nCurrentMenuDepth] = pUIMenu->m_nCurrentSelection;
pUIMenu->m_nMenuStackParameter[pUIMenu->m_nCurrentMenuDepth] = pUIMenu->m_nCurrentParameter; pUIMenu->m_nMenuStackParameter[pUIMenu->m_nCurrentMenuDepth] = pUIMenu->m_nCurrentParameter;
pUIMenu->m_nCurrentMenuDepth++; pUIMenu->m_nCurrentMenuDepth++;
pUIMenu->m_pParentMenu = pUIMenu->m_pCurrentMenu; pUIMenu->m_pParentMenu = pUIMenu->m_pCurrentMenu;
pUIMenu->m_nCurrentParameter = pUIMenu->m_pCurrentMenu[pUIMenu->m_nCurrentSelection].Parameter; pUIMenu->m_nCurrentParameter = pUIMenu->m_pCurrentMenu[pUIMenu->m_nCurrentSelection].Parameter;
pUIMenu->m_pCurrentMenu = pUIMenu->m_pCurrentMenu[pUIMenu->m_nCurrentSelection].MenuItem; pUIMenu->m_pCurrentMenu = pUIMenu->m_pCurrentMenu[pUIMenu->m_nCurrentSelection].MenuItem;
pUIMenu->m_nCurrentMenuItem = pUIMenu->m_nCurrentSelection; pUIMenu->m_nCurrentMenuItem = pUIMenu->m_nCurrentSelection;
pUIMenu->m_nCurrentSelection = 0; pUIMenu->m_nCurrentSelection = 0;
@ -1092,7 +1130,6 @@ void CUIMenu::EditVoiceBankNumber (CUIMenu *pUIMenu, TMenuEvent Event)
void CUIMenu::EditProgramNumber (CUIMenu *pUIMenu, TMenuEvent Event) void CUIMenu::EditProgramNumber (CUIMenu *pUIMenu, TMenuEvent Event)
{ {
unsigned nTG = pUIMenu->m_nMenuStackParameter[pUIMenu->m_nCurrentMenuDepth-1]; unsigned nTG = pUIMenu->m_nMenuStackParameter[pUIMenu->m_nCurrentMenuDepth-1];
int nHighestBank = pUIMenu->m_pMiniDexed->GetSysExFileLoader ()->GetNumHighestBank();
int nValue = pUIMenu->m_pMiniDexed->GetTGParameter (CMiniDexed::TTGParameter::TGParameterProgram, nTG); int nValue = pUIMenu->m_pMiniDexed->GetTGParameter (CMiniDexed::TTGParameter::TGParameterProgram, nTG);
@ -1107,11 +1144,7 @@ void CUIMenu::EditProgramNumber (CUIMenu *pUIMenu, TMenuEvent Event)
// Switch down a voice bank and set to the last voice // Switch down a voice bank and set to the last voice
nValue = CSysExFileLoader::VoicesPerBank-1; nValue = CSysExFileLoader::VoicesPerBank-1;
int nVB = pUIMenu->m_pMiniDexed->GetTGParameter(CMiniDexed::TTGParameter::TGParameterVoiceBank, nTG); int nVB = pUIMenu->m_pMiniDexed->GetTGParameter(CMiniDexed::TTGParameter::TGParameterVoiceBank, nTG);
if (--nVB < 0) nVB = pUIMenu->m_pMiniDexed->GetSysExFileLoader ()->GetNextBankDown(nVB);
{
// Wrap around to last loaded bank
nVB = nHighestBank;
}
pUIMenu->m_pMiniDexed->SetTGParameter (CMiniDexed::TTGParameter::TGParameterVoiceBank, nVB, nTG); pUIMenu->m_pMiniDexed->SetTGParameter (CMiniDexed::TTGParameter::TGParameterVoiceBank, nVB, nTG);
} }
pUIMenu->m_pMiniDexed->SetTGParameter (CMiniDexed::TTGParameter::TGParameterProgram, nValue, nTG); pUIMenu->m_pMiniDexed->SetTGParameter (CMiniDexed::TTGParameter::TGParameterProgram, nValue, nTG);
@ -1123,11 +1156,7 @@ void CUIMenu::EditProgramNumber (CUIMenu *pUIMenu, TMenuEvent Event)
// Switch up a voice bank and reset to voice 0 // Switch up a voice bank and reset to voice 0
nValue = 0; nValue = 0;
int nVB = pUIMenu->m_pMiniDexed->GetTGParameter(CMiniDexed::TTGParameter::TGParameterVoiceBank, nTG); int nVB = pUIMenu->m_pMiniDexed->GetTGParameter(CMiniDexed::TTGParameter::TGParameterVoiceBank, nTG);
if (++nVB > (int) nHighestBank) nVB = pUIMenu->m_pMiniDexed->GetSysExFileLoader ()->GetNextBankUp(nVB);
{
// Wrap around to first bank
nVB = 0;
}
pUIMenu->m_pMiniDexed->SetTGParameter (CMiniDexed::TTGParameter::TGParameterVoiceBank, nVB, nTG); pUIMenu->m_pMiniDexed->SetTGParameter (CMiniDexed::TTGParameter::TGParameterVoiceBank, nVB, nTG);
} }
pUIMenu->m_pMiniDexed->SetTGParameter (CMiniDexed::TTGParameter::TGParameterProgram, nValue, nTG); pUIMenu->m_pMiniDexed->SetTGParameter (CMiniDexed::TTGParameter::TGParameterProgram, nValue, nTG);
@ -2145,5 +2174,3 @@ void CUIMenu::EditTGParameterModulation (CUIMenu *pUIMenu, TMenuEvent Event)
nValue > rParam.Minimum, nValue < rParam.Maximum); nValue > rParam.Minimum, nValue < rParam.Maximum);
} }

Loading…
Cancel
Save