From 56f65206a923cb708b4e31b84807408121a32887 Mon Sep 17 00:00:00 2001 From: Justin Mammarella Date: Wed, 20 Mar 2019 21:11:36 +1100 Subject: [PATCH] 2.30 --- Changelog | 55 ++++++++++ avr/cores/megacommand/MCL/MCL.h | 3 +- avr/cores/megacommand/MCL/MCLGfx.cpp | 103 +++++++++---------- avr/cores/megacommand/MCL/SoundBrowserPage.h | 1 + avr/cores/megacommand/Midi/MidiSDS.cpp | 2 +- 5 files changed, 108 insertions(+), 56 deletions(-) diff --git a/Changelog b/Changelog index f817059aa..9a4638597 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,58 @@ +MCL 2.30 20/03/2019 + +Features and Fixes: + +- Chain Mode Improvements: Chain mode no longer saves and requests the +current kit when sequencer is running. This fixes some complications with +parameter locks, and also improves chain page responsiveness. + +- MIDI SDS Receive is fixed and working. + +- Added Loudness Page, and loudness features + + Auto Normalize: When activated, all saved track have their LEV boosted to + 127, and parameters controlling VOL (including parameter locks) are lowered + to compensate. VOL parameter locks and LFOs with destination VOL are + adjusted too. + + The resulting track loudness remains the same, but the Track LEV parameter + is no longer set arbitrarily. LEV == 127 will always be the loudest volume + for a track. + + Gain Boost: The ability to boost / reduce the VOL of all tracks in the + current kit by a percentage amount. + + Peak Analyser: The MD is instructed to record 1 Bar of the current pattern. + The recording is transferred to the MegaCommand and the WAV file is decoded + and analysed. The peak value in the recording is found and this is used to + determine an appropriate gain boost to increase pattern/kit loudness using + the Boost function above. + +- Added Sound Page, to Page Select Menu. + It's now possible to save and recall sounds from the MD. A sound consists of + 1 or more tracks (2 maximum). + + To save a sound enter the Sound Page. Select the desired track on the MD, + and then choose save. If the selected track triggers another machine, both + track machines will saved as part of the sound. + + To load a sound enter the Sound Page. Select the desired track on the MD, + select the sound to be loaded from the browser, and press an encoder + buttton. + +- fixed unreliable button response in WavDesigner + +- New file browser page, with memory improvements. 1024 files visble per +directory. + +- Added the ability to rename rows. + +- Added the ability to copy and paste slots within the grid + +- Graphically depict slot selection when modifying slot_apply + +- Fix for chromatic mode, tuning map was not available for ROM machines greater than 31 + MCL 2.20 09/11/2018 ###### IMPORTANT ###### diff --git a/avr/cores/megacommand/MCL/MCL.h b/avr/cores/megacommand/MCL/MCL.h index 769c47df5..949851577 100644 --- a/avr/cores/megacommand/MCL/MCL.h +++ b/avr/cores/megacommand/MCL/MCL.h @@ -76,7 +76,8 @@ #include "Fonts/Elektrothic.h" #endif -#define VERSION 2021 +#define VERSION 2030 +#define VERSION_STR "2.30" #define CALLBACK_TIMEOUT 500 #define GUI_NAME_TIMEOUT 800 diff --git a/avr/cores/megacommand/MCL/MCLGfx.cpp b/avr/cores/megacommand/MCL/MCLGfx.cpp index 58d0e78e5..9296b095c 100644 --- a/avr/cores/megacommand/MCL/MCLGfx.cpp +++ b/avr/cores/megacommand/MCL/MCLGfx.cpp @@ -20,66 +20,60 @@ void MCLGfx::init_oled() { #define BITMAP_MCL_LOGO_H 19 const unsigned char mcl_logo_bitmap[] PROGMEM = { -0x01,0xff,0xf3,0xff,0xf3,0xfe,0x00,0x00 -,0x03,0xff,0xf3,0xff,0xf3,0xfe,0x00,0x00 -,0x07,0xff,0xf3,0xff,0xf3,0xfe,0x00,0x00 -,0x0f,0xff,0xf3,0xff,0xf3,0xfe,0x00,0x00 -,0x1f,0xff,0xf3,0xff,0xf3,0xfe,0x00,0x00 -,0x3f,0xff,0xf3,0xff,0xf3,0xfe,0x00,0x00 -,0x7f,0xff,0xf3,0xf8,0x03,0xfe,0x00,0x00 -,0xff,0xff,0xf3,0xf8,0x03,0xfe,0x00,0x00 -,0xff,0xff,0xf3,0xf8,0x03,0xfe,0x00,0x00 -,0x7f,0xff,0xf3,0xf8,0x03,0xfe,0x00,0x00 -,0x3f,0xdf,0xf3,0xf8,0x03,0xfe,0x7f,0xc0 -,0x1f,0x9f,0xf3,0xf8,0x03,0xfe,0x7f,0xc0 -,0x0f,0x1f,0xf3,0xf8,0x03,0xfe,0x7f,0xc0 -,0x06,0x1f,0xf3,0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, 0x00, + 0x00, 0x1f, 0xf3, 0xff, 0xf3, 0xfe, 0x70, 0x00}; #endif void MCLGfx::splashscreen() { #ifdef OLED_DISPLAY - + DEBUG_PRINTLN("OLED enabled"); oled_display.setTextSize(2); oled_display.setTextColor(WHITE, BLACK); oled_display.setCursor(40, 0); - oled_display.drawBitmap(35, 8, mcl_logo_bitmap, BITMAP_MCL_LOGO_W, BITMAP_MCL_LOGO_H, WHITE); - /* oled_display.println("MEGA"); - oled_display.setCursor(22, 15); - oled_display.println("COMMAND"); - */ + oled_display.drawBitmap(35, 8, mcl_logo_bitmap, BITMAP_MCL_LOGO_W, + BITMAP_MCL_LOGO_H, WHITE); + /* oled_display.println("MEGA"); + oled_display.setCursor(22, 15); + oled_display.println("COMMAND"); + */ oled_display.setCursor(90, 8); oled_display.setTextSize(1); oled_display.print("V"); - oled_display.print(VERSION / 1000); - oled_display.print("."); - oled_display.print(VERSION - 2000); -/* for (float length = 0; length < 32; length += 0.7) { + oled_display.print(VERSION_STR); + /* for (float length = 0; length < 32; length += 0.7) { - // display.fillRect(0, 0, 128, length, BLACK); - for (uint8_t x = 0; x < 50 + (length * 5); x++) { + // display.fillRect(0, 0, 128, length, BLACK); + for (uint8_t x = 0; x < 50 + (length * 5); x++) { - oled_display.drawPixel(random(20, 110), 30 - random(0, (int)length), - BLACK); - } + oled_display.drawPixel(random(20, 110), 30 - random(0, (int)length), + BLACK); + } - √ //: display.drawLine(0, length, 128, length, BLACK); + √ //: display.drawLine(0, length, 128, length, BLACK); - oled_display.display(); - } oled_display.clearDisplay(); - */ + oled_display.display(); + } oled_display.clearDisplay(); + */ oled_display.display(); delay(800); #else + + DEBUG_PRINTLN("HD44780 enabled"); char str1[17] = "MEGACOMMAND LIVE"; - char str2[17] = "V2.21"; + char str2[17] = VERSION_STR; str1[16] = '\0'; LCD.goLine(0); LCD.puts(str1); @@ -95,22 +89,23 @@ void MCLGfx::splashscreen() { void MCLGfx::alert(char *str1, char *str2) { #ifdef OLED_DISPLAY - GFXfont *old_font = oled_display.getFont(); - oled_display.clearDisplay(); - oled_display.setFont(&TomThumb); - oled_display.setCursor(0, 8); - oled_display.setTextColor(WHITE, BLACK); - oled_display.println(str1); - oled_display.setCursor(0, 18); - oled_display.println(str2); - oled_display.display(); - delay(700); - oled_display.setFont(old_font); + GFXfont *old_font = oled_display.getFont(); + oled_display.clearDisplay(); + oled_display.setFont(&TomThumb); + oled_display.setCursor(0, 8); + oled_display.setTextColor(WHITE, BLACK); + oled_display.println(str1); + oled_display.setCursor(0, 18); + oled_display.println(str2); + oled_display.display(); + delay(700); + oled_display.setFont(old_font); #else - GUI.flash_strings_fill(str1, str2); - GUI.display(); + GUI.flash_strings_fill(str1, str2); + GUI.display(); #endif - + DEBUG_PRINTLN(str1); + DEBUG_PRINTLN(str2); } MCLGfx gfx; diff --git a/avr/cores/megacommand/MCL/SoundBrowserPage.h b/avr/cores/megacommand/MCL/SoundBrowserPage.h index b795b713c..8b0b473c5 100644 --- a/avr/cores/megacommand/MCL/SoundBrowserPage.h +++ b/avr/cores/megacommand/MCL/SoundBrowserPage.h @@ -15,6 +15,7 @@ class SoundBrowserPage : public FileBrowserPage { void add_entry(char *entry); void draw_scrollbar(uint8_t x_offset); void init(); + void setup(); void save_sound(); void load_sound(); }; diff --git a/avr/cores/megacommand/Midi/MidiSDS.cpp b/avr/cores/megacommand/Midi/MidiSDS.cpp index 18e0ffc13..6c3e71a29 100644 --- a/avr/cores/megacommand/Midi/MidiSDS.cpp +++ b/avr/cores/megacommand/Midi/MidiSDS.cpp @@ -74,7 +74,7 @@ void MidiSDSClass::cancel() { bool MidiSDSClass::sendWav(char *filename, uint16_t sample_number, uint8_t loop_type, uint32_t loop_start, - uint32_t loop_end) { + uint32_t loop_end, bool handshake) { if (state != SDS_READY) { DEBUG_PRINTLN("sds not in ready state"); return false;