diff --git a/UI.hpp b/UI.hpp index 3492819..d403d43 100644 --- a/UI.hpp +++ b/UI.hpp @@ -3970,9 +3970,10 @@ void UI_func_voice_select(uint8_t param) lcd.show(0, 0, 2, configuration.performance.bank[selected_instance_id]); lcd.show(1, 0, 2, configuration.performance.voice[selected_instance_id] + 1); + string_toupper(bank_name); lcd.show(0, 3, 8, bank_name); + string_toupper(voice_name); lcd.show(1, 3, 10, voice_name); - //lcd.show(0, 3, 10, bank_name); switch (menu_voice_select) { diff --git a/config.h b/config.h index 1d9ac22..cca430a 100644 --- a/config.h +++ b/config.h @@ -129,9 +129,9 @@ //************************************************************************************************* #define SAMPLE_RATE 44100 #if AUDIO_BLOCK_SAMPLES == 64 -#define AUDIO_MEM 64 +#define AUDIO_MEM 256 #else -#define AUDIO_MEM 32 +#define AUDIO_MEM 128 #endif #ifdef TEENSY_AUDIO_BOARD diff --git a/dexed.cpp b/dexed.cpp index d077919..bf7263b 100644 --- a/dexed.cpp +++ b/dexed.cpp @@ -317,14 +317,16 @@ void Dexed::keyup(int16_t pitch) { if ( voices[note].midi_note == pitch && voices[note].keydown ) { voices[note].keydown = false; voices[note].key_pressed_timer = 0; -#ifdef DEBUG - Serial.print(F("Stop voice: ")); - Serial.print(note, DEC); - Serial.print(F(" pitch: ")); - Serial.println(pitch, DEC); - Serial.print(F(" id: ")); - Serial.println(id, DEC); -#endif + /* + #ifdef DEBUG + Serial.print(F("Stop voice: ")); + Serial.print(note, DEC); + Serial.print(F(" pitch: ")); + Serial.println(pitch, DEC); + Serial.print(F(" id: ")); + Serial.println(id, DEC); + #endif + */ break; } } @@ -492,7 +494,7 @@ uint8_t Dexed::getNumNotesPlaying(void) uint8_t i; uint8_t count_playing_voices = 0; VoiceStatus voiceStatus; - + for (i = 0; i < max_notes; i++) { if (voices[i].live == true) @@ -502,29 +504,29 @@ uint8_t Dexed::getNumNotesPlaying(void) memset(&voiceStatus, 0, sizeof(VoiceStatus)); voices[i].dx7_note->peekVoiceStatus(voiceStatus); - -#ifdef DEBUG - Serial.println(i); - Serial.print("ALG: "); - Serial.println(data[134]+1); -#endif - + /* + #ifdef DEBUG + Serial.println(i); + Serial.print("ALG: "); + Serial.println(data[134]+1); + #endif + */ for (uint8_t op = 0; op < 6; op++) { if ((op_carrier & (1 << op))) { // this voice is a carrier! op_carrier_num++; - -#ifdef DEBUG - Serial.print("OP: "); - Serial.print(op); - Serial.print(" AMP_STEP: "); - Serial.print(voiceStatus.ampStep[op],DEC); - Serial.print(" AMP: "); - Serial.println(voiceStatus.amp[op],DEC); -#endif - + /* + #ifdef DEBUG + Serial.print("OP: "); + Serial.print(op); + Serial.print(" AMP_STEP: "); + Serial.print(voiceStatus.ampStep[op],DEC); + Serial.print(" AMP: "); + Serial.println(voiceStatus.amp[op],DEC); + #endif + */ if (voiceStatus.amp[op] < VOICE_SILENCE_LEVEL && voiceStatus.ampStep[op] >= 3) { // this voice produces no audio output @@ -542,13 +544,14 @@ uint8_t Dexed::getNumNotesPlaying(void) Serial.println(op_amp, DEC); */ -#ifdef DEBUG - Serial.print("OP_AMP: "); - Serial.print(op_amp); - Serial.print(" OP_CARRIER_NUM: "); - Serial.println(op_carrier_num); -#endif - + /* + #ifdef DEBUG + Serial.print("OP_AMP: "); + Serial.print(op_amp); + Serial.print(" OP_CARRIER_NUM: "); + Serial.println(op_carrier_num); + #endif + */ if (op_amp == op_carrier_num) { // all carrier-operators are silent -> disable the voice diff --git a/dexed_sd.cpp b/dexed_sd.cpp index 9a15586..b8586e5 100644 --- a/dexed_sd.cpp +++ b/dexed_sd.cpp @@ -50,7 +50,7 @@ bool load_sd_voice(uint8_t b, uint8_t v, uint8_t instance_id) get_bank_name(b, bank_name, sizeof(bank_name)); sprintf(filename, "/%d/%s.syx", b, bank_name); - + sysex = SD.open(filename); if (!sysex) { @@ -833,7 +833,7 @@ uint8_t calc_checksum(uint8_t* data, uint16_t len) return (bulk_checksum_calc & 0x7f); } -void strip_extension(char* s, char* target, uint8_t len) +void strip_extension(const char* s, char* target, uint8_t len) { char tmp[FILENAME_LEN]; char* token; @@ -987,3 +987,12 @@ bool get_voice_by_bank_name(uint8_t b, const char* bank_name, uint8_t v, char* v return (false); } + +void string_toupper(char* s) +{ + while (*s) + { + *s = toupper((unsigned char) * s); + s++; + } +} diff --git a/dexed_sd.h b/dexed_sd.h index d783295..52fe9af 100644 --- a/dexed_sd.h +++ b/dexed_sd.h @@ -67,9 +67,11 @@ bool save_sd_performance(uint8_t p); bool get_sd_data(File sysex, uint8_t format, uint8_t* conf); bool write_sd_data(File sysex, uint8_t format, uint8_t* data, uint16_t len); uint8_t calc_checksum(uint8_t* data, uint16_t len); -void strip_extension(char* s, char* target); +void strip_extension(const char* s, char* target); bool get_bank_name(uint8_t b, char* name, uint8_t len); bool get_voice_name(uint8_t b, uint8_t v, char* name, uint8_t len); bool get_voice_by_bank_name(uint8_t b, const char* bank_name, uint8_t v, char* voice_name, uint8_t len); + +void string_toupper(char* s); #endif