From 187f178a1996c4215088cc7857ac248486384fbd Mon Sep 17 00:00:00 2001 From: Holger Wirtz Date: Tue, 2 Oct 2018 14:11:08 +0200 Subject: [PATCH] Fixes for bank selection between 0 and 99. --- MicroDexed.ino | 4 ++-- UI.cpp | 11 +++++++++-- addon/SD/0/sonus1.syx | Bin 0 -> 4104 bytes config.h | 6 +++--- 4 files changed, 14 insertions(+), 7 deletions(-) create mode 100644 addon/SD/0/sonus1.syx diff --git a/MicroDexed.ino b/MicroDexed.ino index 9d9b323..a7fd540 100644 --- a/MicroDexed.ino +++ b/MicroDexed.ino @@ -432,13 +432,13 @@ bool handle_master_key(uint8_t data) if (get_voice_names_from_bank(bank)) { strip_extension(bank_names[bank], bank_name); - lcd.show(0, 0, 2, bank + 1); + lcd.show(0, 0, 2, bank); lcd.show(0, 2, 1, " "); lcd.show(0, 3, 10, bank_name); } else { - lcd.show(0, 0, 2, bank + 1); + lcd.show(0, 0, 2, bank); lcd.show(0, 2, 10, " *ERROR*"); } #endif diff --git a/UI.cpp b/UI.cpp index 694f104..d4b1dbd 100644 --- a/UI.cpp +++ b/UI.cpp @@ -177,9 +177,12 @@ void handle_ui(void) void ui_show_main(void) { - ui_state = UI_MAIN; + if (ui_state != UI_MAIN) + { + lcd.clear(); + } - lcd.show(0, 0, 2, bank + 1); + lcd.show(0, 0, 2, bank); lcd.show(0, 2, 1, " "); strip_extension(bank_names[bank], bank_name); @@ -222,6 +225,8 @@ void ui_show_main(void) lcd.show(1, 3, 10, voice_names[voice]); lcd.show(1, 14, 1, " "); } + + ui_state = UI_MAIN; } void ui_show_midichannel(void) @@ -242,6 +247,7 @@ void ui_show_midichannel(void) if (midi_channel == 1) lcd.show(1, 2, 2, " "); } + ui_state = UI_MIDICHANNEL; } @@ -270,6 +276,7 @@ void ui_show_volume(void) lcd.show(1, i, 1, " "); } } + ui_state = UI_VOLUME; } #endif diff --git a/addon/SD/0/sonus1.syx b/addon/SD/0/sonus1.syx new file mode 100644 index 0000000000000000000000000000000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gXsqCTh?IYlN{w&UKa^RS)fAlZwbN^?SPTxPY zY3zUO?p*HNQ~z@SB7YY{06Wnh)p|09fv)tw?DzaHz`eIuKif0Q&AOgAv#fzA_f*l> zVXIzGRmigB{htc&{_Fs@rJ2{;HiO+2h=;OZN^GUECBR6nENIsCVvile&yclwF{UdGT~i5%1D zVdB5Mb8m literal 0 HcmV?d00001 diff --git a/config.h b/config.h index 75048f9..4f88a7d 100644 --- a/config.h +++ b/config.h @@ -47,7 +47,7 @@ #define AUDIO_MEM 80 #endif #define SAMPLE_RATE 44100 -#define MAX_BANKS 99 +#define MAX_BANKS 100 #define MAX_VOICES 32 // voices per bank #define BANK_NAME_LEN 13 // FAT12 filenames (plus '\0') #define VOICE_NAME_LEN 11 // 10 (plus '\0') @@ -65,7 +65,7 @@ // Debug output #define SERIAL_SPEED 38400 -#define DEBUG 1 +//#define DEBUG 1 #define SHOW_MIDI_EVENT 1 #define SHOW_XRUN 1 #define SHOW_CPU_LOAD_MSEC 5000 @@ -95,7 +95,7 @@ #define LCD_I2C_ADDRESS 0x27 #define LCD_CHARS 16 #define LCD_LINES 2 -#define UI_AUTO_BACK_MS 2000 +#define UI_AUTO_BACK_MS 3000 #define AUTOSTORE_MS 5000 // Encoder with button