Optimizatioins for memory footprint.

dev
Holger Wirtz 2 years ago
parent 00de27798a
commit fdf072be0d
  1. 8
      MicroDexed.ino
  2. 4
      UI.hpp
  3. 8
      midi_devices.hpp

@ -280,7 +280,7 @@ AudioConnection* dynamicConnections[NUM_DEXED * 15 + NUM_DRUMS * 4];
#else #else
AudioConnection* dynamicConnections[NUM_DEXED * 4 + NUM_DRUMS * 2]; AudioConnection* dynamicConnections[NUM_DEXED * 4 + NUM_DRUMS * 2];
#endif #endif
void create_audio_dexed_chain(uint8_t instance_id) FLASHMEM void create_audio_dexed_chain(uint8_t instance_id)
{ {
MicroDexed[instance_id] = new AudioSynthDexed(MAX_NOTES / NUM_DEXED, SAMPLE_RATE); MicroDexed[instance_id] = new AudioSynthDexed(MAX_NOTES / NUM_DEXED, SAMPLE_RATE);
mono2stereo[instance_id] = new AudioEffectMonoStereo(); mono2stereo[instance_id] = new AudioEffectMonoStereo();
@ -331,7 +331,7 @@ void create_audio_dexed_chain(uint8_t instance_id)
// Dynamic patching of Drum objects // Dynamic patching of Drum objects
// //
#if NUM_DRUMS > 0 #if NUM_DRUMS > 0
void create_audio_drum_chain(uint8_t instance_id) FLASHMEM void create_audio_drum_chain(uint8_t instance_id)
{ {
//Drum[instance_id] = new AudioPlayMemory(); //Drum[instance_id] = new AudioPlayMemory();
Drum[instance_id] = new AudioPlayArrayResmp(); Drum[instance_id] = new AudioPlayArrayResmp();
@ -2585,7 +2585,7 @@ void generate_version_string(char* buffer, uint8_t len)
#endif #endif
} }
uint8_t check_sd_cards(void) FLASHMEM uint8_t check_sd_cards(void)
{ {
uint8_t ret = 0; uint8_t ret = 0;
@ -2689,7 +2689,7 @@ uint8_t check_sd_cards(void)
return (ret); return (ret);
} }
void check_and_create_directories(void) FLASHMEM void check_and_create_directories(void)
{ {
if (sd_card > 0) if (sd_card > 0)
{ {

@ -540,7 +540,7 @@ uint8_t * rotTile(const uint8_t * tile)
} }
#endif #endif
void setup_ui(void) FLASHMEM void setup_ui(void)
{ {
// LCD Begin // LCD Begin
#ifdef I2C_DISPLAY #ifdef I2C_DISPLAY
@ -564,7 +564,7 @@ void setup_ui(void)
} }
#ifdef DEBUG #ifdef DEBUG
void setup_debug_message(void) FLASHMEM void setup_debug_message(void)
{ {
// LCD Begin // LCD Begin
display.clear(); display.clear();

@ -108,7 +108,7 @@ void handle_generic(byte inChannel, byte inData1, byte inData2, const char *midi
break; break;
} }
#ifdef DEBUG #ifdef DEBUG
Serial.printf("[%s] %s", midi_device, text); Serial.printf_P(PSTR("[%s] %s"), midi_device, text);
#endif #endif
// MIDI THRU // MIDI THRU
@ -222,7 +222,7 @@ void handle_generic(byte inChannel, byte inData1, byte inData2, const char *midi
void handleSystemExclusive_generic(byte *data, uint len, const char *midi_device) { void handleSystemExclusive_generic(byte *data, uint len, const char *midi_device) {
handleSystemExclusive(data, len); handleSystemExclusive(data, len);
#ifdef DEBUG #ifdef DEBUG
Serial.printf("[%s] SysEx", midi_device); Serial.printf_P(PSTR("[%s] SysEx"), midi_device);
#endif #endif
// MIDI THRU // MIDI THRU
@ -282,7 +282,7 @@ void handleSystemCommon_generic(byte inData1, const char *midi_device, midi::Mid
break; break;
} }
#ifdef DEBUG #ifdef DEBUG
Serial.printf("[%s] %s", midi_device, text); Serial.printf_P(PSTR("[%s] %s"), midi_device, text);
#endif #endif
// MIDI THRU // MIDI THRU
@ -390,7 +390,7 @@ void handleRealtime_generic(const char *midi_device, midi::MidiType event)
break; break;
} }
#ifdef DEBUG #ifdef DEBUG
Serial.printf("[%s] %s", midi_device, text); Serial.printf_P(PSTR("[%s] %s"), midi_device, text);
#endif #endif
// MIDI THRU // MIDI THRU

Loading…
Cancel
Save