From e5481cbbd4959188b30c76fd1b2334da8802b494 Mon Sep 17 00:00:00 2001 From: positionhigh Date: Sun, 12 Sep 2021 11:30:37 +0200 Subject: [PATCH] =?UTF-8?q?Dateien=20hochladen=20nach=20=E2=80=9E=E2=80=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MicroDexed.ino | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/MicroDexed.ino b/MicroDexed.ino index b40cad2..1b746bb 100644 --- a/MicroDexed.ino +++ b/MicroDexed.ino @@ -378,7 +378,6 @@ extern char seq_chord_names[7][4]; ***********************************************************************/ void setup() { - delay(50); #ifdef DEBUG Serial.begin(SERIAL_SPEED); #endif @@ -2159,6 +2158,12 @@ bool eeprom_get_performance() /****************************************************************************** PARAMETER-HELPERS ******************************************************************************/ + +void set_sample_note(uint8_t sample, uint8_t note) +{ + drum_config[sample].midinote = note; +} + void set_sample_pitch(uint8_t sample, float playbackspeed) { drum_config[sample].pitch = playbackspeed; @@ -2189,7 +2194,10 @@ void set_sample_reverb_send(uint8_t sample, float s_reverb) drum_config[sample].reverb_send = s_reverb; } - +uint8_t get_sample_note(uint8_t sample) +{ + return (drum_config[sample].midinote); +} float get_sample_pitch(uint8_t sample) { return (drum_config[sample].pitch); @@ -2215,6 +2223,20 @@ float get_sample_reverb_send(uint8_t sample) return (drum_config[sample].reverb_send); } +uint8_t find_drum_number_from_note(uint8_t note) +{ + uint8_t number=0; + for (uint8_t d = 0; d < NUM_DRUMSET_CONFIG - 1; d++) + { + if (note == drum_config[d].midinote) + { + number = d; + break; + } + } + return number; +} + void set_fx_params(void) { #if defined(USE_FX)