From 687ac28cbcf8e988af5153d0787141b37d5679eb Mon Sep 17 00:00:00 2001 From: positionhigh Date: Sun, 29 Aug 2021 15:08:21 +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 --- config.h | 2 +- dexed_sd.cpp | 109 +++++-- drums.h | 786 +++++++++++++++++++++++++++++++++++---------------- midinotes.h | 9 + 4 files changed, 642 insertions(+), 264 deletions(-) diff --git a/config.h b/config.h index 51e4008..694b982 100644 --- a/config.h +++ b/config.h @@ -112,7 +112,7 @@ // NUMBER OF PARALLEL SAMPLEDRUMS #define NUM_DRUMS 8 // NUMBER OF SAMPLES IN DRUMSET -#define NUM_DRUMSET_CONFIG 50 +#define NUM_DRUMSET_CONFIG 69 // CHORUS parameters #define MOD_DELAY_SAMPLE_BUFFER int32_t(TIME_MS2SAMPLES(20.0)) // 20.0 ms delay buffer. diff --git a/dexed_sd.cpp b/dexed_sd.cpp index 53b9092..1519d87 100644 --- a/dexed_sd.cpp +++ b/dexed_sd.cpp @@ -33,21 +33,6 @@ using namespace TeensyTimerTool; #include "synth_dexed.h" #include "dexed_sd.h" -// Bad hack!!! -typedef struct drum_config_s { - uint8_t drum_class; // Type of drum - uint8_t midinote; // Triggered by note - char name[DRUM_NAME_LEN]; - const uint8_t* drum_data; - char shortname[2]; // 1 char name for sequencer - uint32_t len; // number of elements in drum_data - float32_t pitch; // - float32_t pan; // Panorama (-1.0 - +1.0) - float32_t vol_max; // max. Volume (0.0 - 1.0) - float32_t vol_min; // min. Volume (0.0 - 1.0, should be <= vol_max) - float32_t reverb_send; // how much signal to send to the reverb (0.0 - 1.0) -} drum_config_t; - extern void init_MIDI_send_CC(void); extern void check_configuration_dexed(uint8_t instance_id); extern void check_configuration_performance(void); @@ -75,9 +60,22 @@ extern uint8_t arp_style; extern uint8_t seq_chord_velocity; extern uint8_t seq_chord_dexed_inst; extern uint8_t seq_inst_dexed[4]; +extern char seq_name[FILENAME_LEN]; +extern char seq_name_temp[FILENAME_LEN]; extern PeriodicTimer timer1; extern float midi_volume_transform(uint8_t midi_amp); -extern drum_config_t drum_config[NUM_DRUMSET_CONFIG]; +extern void set_sample_pitch(uint8_t sample, float playbackspeed); +extern void set_sample_p_offset(uint8_t sample, float s_offset); +extern void set_sample_pan(uint8_t sample, float s_pan); +extern void set_sample_vol_max(uint8_t sample, float s_max); +extern void set_sample_vol_min(uint8_t sample, float s_min); +extern void set_sample_reverb_send(uint8_t sample, float s_reverb); +extern float get_sample_pitch(uint8_t sample); +extern float get_sample_p_offset(uint8_t sample); +extern float get_sample_pan(uint8_t sample); +extern float get_sample_vol_max(uint8_t sample); +extern float get_sample_vol_min(uint8_t sample); +extern float get_sample_reverb_send(uint8_t sample); /****************************************************************************** SD BANK/VOICE LOADING @@ -484,11 +482,12 @@ bool load_sd_drumsettings_json(uint8_t number, uint8_t target) for (uint8_t i = 0; i < NUM_DRUMSET_CONFIG; i++) { - drum_config[i].pitch = data_json["pitch"][i] ; - drum_config[i].pan = data_json["pan"][i] ; - drum_config[i].vol_max = data_json["vol_max"][i] ; - drum_config[i].vol_min = data_json["vol_min"][i] ; - drum_config[i].reverb_send = data_json["reverb_send"][i]; + set_sample_pitch( i, data_json["pitch"][i] ); + set_sample_p_offset ( i, data_json["p_offset"][i] ); + set_sample_pan( i, data_json["pan"][i]) ; + set_sample_vol_max( i, data_json["vol_max"][i]) ; + set_sample_vol_min( i, data_json["vol_min"][i] ); + set_sample_reverb_send( i, data_json["reverb_send"][i]); } return (true); } @@ -535,6 +534,7 @@ bool save_sd_drumsettings_json(uint8_t number, uint8_t target) if (SD.exists(filename)) { Serial.println("remove old drumsettings file"); + SD.begin(); SD.remove(filename); } json = SD.open(filename, FILE_WRITE); @@ -544,11 +544,12 @@ bool save_sd_drumsettings_json(uint8_t number, uint8_t target) for (uint8_t i = 0; i < NUM_DRUMSET_CONFIG; i++) { - data_json["pitch"][i] = drum_config[i].pitch; - data_json["pan"][i] = drum_config[i].pan; - data_json["vol_max"][i] = drum_config[i].vol_max; - data_json["vol_min"][i] = drum_config[i].vol_min; - data_json["reverb_send"][i] = drum_config[i].reverb_send; + data_json["pitch"][i] = get_sample_pitch(i); + data_json["p_offset"][i] = get_sample_p_offset(i); + data_json["pan"][i] = get_sample_pan(i); + data_json["vol_max"][i] = get_sample_vol_max(i); + data_json["vol_min"][i] = get_sample_vol_min(i); + data_json["reverb_send"][i] = get_sample_reverb_send(i); } #ifdef DEBUG Serial.println(F("Write JSON data:")); @@ -696,6 +697,8 @@ bool save_sd_voiceconfig_json(uint8_t vc, uint8_t instance_id, uint8_t target) #endif AudioNoInterrupts(); + SD.begin(); + SD.remove(filename); json = SD.open(filename, FILE_WRITE); if (json) { @@ -814,7 +817,9 @@ bool load_sd_fx_json(uint8_t fx, uint8_t target) configuration.fx.delay_sync[i] = data_json["delay_sync"][i]; configuration.fx.reverb_send[i] = data_json["reverb_send"][i]; if (configuration.fx.delay_sync[i] > 0) + { configuration.fx.delay_time[i] = 0; + } } configuration.fx.reverb_roomsize = data_json["reverb_roomsize"]; configuration.fx.reverb_damping = data_json["reverb_damping"]; @@ -878,6 +883,8 @@ bool save_sd_fx_json(uint8_t fx, uint8_t target) #endif AudioNoInterrupts(); + SD.begin(); + SD.remove(filename); json = SD.open(filename, FILE_WRITE); if (json) { @@ -980,7 +987,8 @@ bool save_sd_seq_json(uint8_t seq_number) Serial.print(F(" ")); AudioNoInterrupts(); - + SD.begin(); + SD.remove(filename); json = SD.open(filename, FILE_WRITE); if (json) { @@ -1046,6 +1054,10 @@ bool save_sd_seq_json(uint8_t seq_number) for (uint8_t i = 0; i < sizeof(seq_inst_dexed); i++) { data_json["seq_inst_dexed"][i] = seq_inst_dexed[i]; } + for (uint8_t i = 0; i < FILENAME_LEN; i++) { + data_json["seq_name"][i] = seq_name[i]; + } + #ifdef DEBUG Serial.println(F("Write JSON data:")); @@ -1071,6 +1083,41 @@ bool save_sd_seq_json(uint8_t seq_number) return (false); } +void get_sd_seq_name_json(uint8_t seq_number) +{ + seq_number = constrain(seq_number, 0, 99); + memset(seq_name_temp, 0, FILENAME_LEN); + if (sd_card > 0) + { + File json; + StaticJsonDocument data_json; + char filename[FILENAME_LEN]; + + sprintf(filename, "/%s/%d-S.json", SEQ_CONFIG_PATH, seq_number); + + // first check if file exists... + AudioNoInterrupts(); + if (SD.exists(filename)) + { + // ... and if: load + + json = SD.open(filename); + if (json) + { + deserializeJson(data_json, json); + + json.close(); + AudioInterrupts(); + } + if (data_json["seq_name"][0] != 0) { + for (uint8_t i = 0; i < FILENAME_LEN; i++) { + seq_name_temp[i] = data_json["seq_name"][i]; + } + } + + } + } +} bool load_sd_seq_json(uint8_t seq_number) { if (seq_number < 0) @@ -1152,6 +1199,13 @@ bool load_sd_seq_json(uint8_t seq_number) for (uint8_t i = 0; i < sizeof(seq_inst_dexed); i++) { seq_inst_dexed[i] = data_json["seq_inst_dexed"][i]; } + + if (data_json["seq_name"][0] != 0) { + for (uint8_t i = 0; i < FILENAME_LEN; i++) { + seq_name[i] = data_json["seq_name"][i]; + } + } + count = 0; seq_tempo_ms = data_json["seq_tempo_ms"] ; seq_bpm = data_json["seq_bpm"]; @@ -1167,6 +1221,7 @@ bool load_sd_seq_json(uint8_t seq_number) seq_oct_shift = data_json["seq_oct_shift"]; seq_element_shift = data_json["seq_element_shift"]; + for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) { configuration.performance.bank[instance_id] = data_json["bank"][instance_id]; diff --git a/drums.h b/drums.h index 6419cbb..cbebc73 100644 --- a/drums.h +++ b/drums.h @@ -2,7 +2,8 @@ MicroDexed MicroDexed is a port of the Dexed sound engine - Dexed ist heavily based on https://github.com/google/music-synthesizer-for-android + Dexed ist heavily based on https://github.com/google/music-synthesizer-for-an + droid (c)2018-2021 H. Wirtz @@ -20,8 +21,6 @@ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ @@ -36,202 +35,442 @@ typedef struct drum_config_s { uint8_t drum_class; // Type of drum uint8_t midinote; // Triggered by note char name[DRUM_NAME_LEN]; - const unsigned int* drum_data; + const uint8_t* drum_data; char shortname[2]; // 1 char name for sequencer uint32_t len; // number of elements in drum_data - float32_t pitch; // + float32_t pitch; // variable pitch per note for sequencer + float32_t p_offset; // "static" pitch offset to correct root note to root of other samples float32_t pan; // Panorama (-1.0 - +1.0) float32_t vol_max; // max. Volume (0.0 - 1.0) float32_t vol_min; // min. Volume (0.0 - 1.0, should be <= vol_max) float32_t reverb_send; // how much signal to send to the reverb (0.0 - 1.0) } drum_config_t; -enum {DRUM_NONE, DRUM_BASS, DRUM_SNARE, DRUM_HIHAT, DRUM_HANDCLAP, DRUM_RIDE, DRUM_CHRASH, DRUM_LOWTOM, DRUM_MIDTOM, DRUM_HIGHTOM, DRUM_PERCUSSION}; +enum {DRUM_NONE, DRUM_BASS, DRUM_SNARE, DRUM_HIHAT, DRUM_HANDCLAP, DRUM_RIDE, DRUM_CRASH, DRUM_LOWTOM, DRUM_MIDTOM, DRUM_HIGHTOM, DRUM_PERCUSSION}; // DEFAULT MIDI CHANNEL FOR SAMPLEDRUMS uint8_t drum_midi_channel = 10; drum_config_t drum_config[NUM_DRUMSET_CONFIG] = { - { - DRUM_BASS, - MIDI_A2, - "Xrhitom", - AudioSampleXrhitom, + { + DRUM_HIHAT, + 210, + "SQBass", + SQBass, "B", - 6785, + 32000, + 1.0, + 1.39, + 0.0, + 1.0, 0.0, + 0.0 + }, + { + DRUM_MIDTOM, + 211, + "CALLIOP", + CALLIOP, + "C", + 45056, + 1.0, + 1.0, 0.0, 0.8, 0.0, 0.0 }, { - DRUM_BASS, - MIDI_AIS2, - "Vl1lbeep", - AudioSampleVl1lbeepw, - "B", - 769, + DRUM_CRASH, + 212, + "CALLIOP", + CALLIOP, + "C", + 45056, + 1.0, + 1.0, 0.0, + 0.8, + 0.0, + 0.0 + }, + { + DRUM_RIDE, + 213, + "ARR1", + ARR1, + "A", + 21248, + 1.0, + 0.65, + 0.0, + 0.7, + 0.0, + 0.0 + }, + { + DRUM_BASS, + 214, + "FVoice", + FVoice, + "F", + 39040, + 1.0, + 1.0, 0.0, 0.8, 0.0, 0.0 }, + + { + DRUM_BASS, + MIDI_A2, + "Clap808", + Clap808, + "C", + 7744, + 0.0, + 1.0, + 0.0, + 1.0, + 0.0, + 0.0 + }, { DRUM_BASS, MIDI_B2, - "Vl1hbeep", - AudioSampleVl1hbeepw, + "S_Kick1", + S_kick_1, "B", - 513, + 22208, 0.0, + 1.0, 0.0, - 0.8, + 1.0, 0.0, 0.0 }, { DRUM_BASS, MIDI_C3, - "bd01", - AudioSampleBd01, + "S_Kick2", + S_kick2_8, "B", - 3617, + 22528, 0.0, + 1.0, 0.0, - 0.8, + 1.0, 0.0, 0.0 }, { - DRUM_HANDCLAP, + DRUM_PERCUSSION, MIDI_CIS3, - "cp02l", - AudioSampleCp02, - "C", - 4961, + "S_Stick", + S_Stick_1, + "B", + 13632, 0.0, - -1.0, - 0.6, + 1.0, 0.0, - 0.1 + 1.0, + 0.0, + 0.0 }, { - DRUM_HANDCLAP, + DRUM_SNARE, + MIDI_D3, + "S_snare1", + S_snare_Ghost_1, + "B", + 22272, + 0.0, + 1.0, + 0.0, + 1.0, + 0.0, + 0.0 + }, + { + DRUM_SNARE, MIDI_DIS3, - "cp02r", - AudioSampleCp02, - "C", - 4961, + "S_sna2G", + S_snare2_Ghost_1, + "B", + 28032, 0.0, 1.0, - 0.6, 0.0, - 0.2 + 1.0, + 0.0, + 0.0 }, { DRUM_SNARE, - MIDI_D3, - "sd15", - AudioSampleSd15, - "S", - 3905, + MIDI_E3, + "S_snar2", + S_snare_2, + "B", + 17920, + 0.0, + 1.0, + 0.0, + 1.0, + 0.0, + 0.0 + }, + { + DRUM_LOWTOM, + MIDI_F3, + "S_loTom1", + S_loTom_1, + "B", + 58752, + 0.0, + 1.0, + 0.0, + 1.0, 0.0, - 0.2, - 0.6, - 0.2, 0.0 }, { DRUM_HIHAT, MIDI_FIS3, - "hh01", - AudioSampleHh01, - "h", - 1441, + "S_hhCl1", + S_hhClosed_1, + "B", + 9280, + 0.0, + 1.0, + 0.0, + 0.7, 0.0, - 0.8, - 0.8, - 0.3, 0.0 }, { + DRUM_MIDTOM, + MIDI_G3, + "S_lTom1", + S_loTom_1, + "B", + 58752, + 1.2, + 1.0, + 0.0, + 1.0, + 0.0, + 0.0 + }, + { //10 DRUM_HIHAT, MIDI_GIS3, - "hh02", - AudioSampleHh02, - "h", - 2113, + "S_hh_o1", + S_hh_o_1_2, + "B", + 18240, + 0.0, + 1.0, + 0.0, + 0.7, + 0.0, + 0.0 + }, + { + DRUM_MIDTOM, + MIDI_A3, + "S_hiTom5", + S_hiTom_5, + "B", + 38592, + 0.0, + 1.0, + 0.0, + 1.0, 0.0, - 0.8, - 0.8, - 0.3, 0.0 }, { DRUM_HIHAT, MIDI_AIS3, - "oh02", - AudioSampleOh02, - "H", - 6753, + "S_hh_o5", + S_hh_o_5_4, + "B", + 98368, + 0.0, + 1.0, + 0.0, + 0.7, 0.0, - 0.8, - 0.8, - 0.3, 0.0 }, { - DRUM_LOWTOM, - MIDI_G3, - "lt01", - AudioSampleLt01, - "T", - 6817, + DRUM_MIDTOM, + MIDI_B3, + "S_hiTm5", + S_hiTom_5, + "B", + 38592, + 1.1, + 1.0, 0.0, - -0.7, - 0.8, + 1.0, 0.0, 0.0 }, { DRUM_HIGHTOM, - MIDI_A3, - "ht01", - AudioSampleHt01, - "T", - 2497, + MIDI_C4, + "S_hiTm5", + S_hiTom_5, + "B", + 38592, + 1.3, + 1.0, 0.0, - -0.5, - 0.8, + 1.0, 0.0, 0.0 }, { - DRUM_RIDE, + DRUM_CRASH, MIDI_CIS4, - "rd01", - AudioSampleRd01, - "R", - 15713, + "S_splsh1", + S_splash1_1, + "B", + 57856, + 0.0, + 1.0, 0.0, - -0.6, - 0.3, + 1.0, 0.0, 0.0 }, { - DRUM_RIDE, + DRUM_HIGHTOM, + MIDI_D4, + "S_hiTom5", + S_hiTom_5, + "B", + 38592, + 1.4, + 1.0, + 0.0, + 1.0, + 0.0, + 0.0 + }, + { + DRUM_CRASH, MIDI_DIS4, - "rd02", - AudioSampleRd02, - "R", - 7681, + "S_china4", + S_china1_4, + "B", + 96832, 0.0, - -0.6, - 0.3, + 1.0, + 0.0, + 1.0, + 0.0, + 0.0 + }, + { + DRUM_CRASH, + MIDI_E4, + "S_china2", + S_china2_1, + "B", + 68864, + 0.0, + 1.0, + 0.0, + 1.0, + 0.0, + 0.0 + }, + { + DRUM_RIDE, + MIDI_F4, + "S_rBell1", + S_ride1Bell_1, + "B", + 86336, + 0.0, + 1.0, + 0.0, + 1.0, + 0.0, + 0.0 + }, + { + DRUM_RIDE, + MIDI_FIS4, + "S_rBell1", + S_ride1Bell_1, + "B", + 86336, + 0.0, + 1.0, + 0.0, + 1.0, + 0.0, + 0.0 + }, + { + DRUM_CRASH, + MIDI_G4, + "S_crash1", + S_crash1_1, + "B", + 122112, + 0.0, + 1.0, + 0.0, + 1.0, + 0.0, + 0.0 + }, + { + DRUM_PERCUSSION, + MIDI_GIS4, + "S_cowb2", + S_cowbell_2, + "B", + 18368, + 0.0, + 1.0, + 0.0, + 1.0, + 0.0, + 0.0 + }, + { + DRUM_CRASH, + MIDI_A4, + "S_Crash2", + S_ride2Crash_2, + "B", + 143808, + 0.0, + 1.0, + 0.0, + 1.0, + 0.0, + 0.0 + }, + { + DRUM_RIDE, + MIDI_AIS4, + "S_ride2", + S_ride2_1, + "B", + 132928, + 0.0, + 1.0, + 0.0, + 1.0, 0.0, 0.0 }, @@ -239,12 +478,13 @@ drum_config_t drum_config[NUM_DRUMSET_CONFIG] = DRUM_BASS, MIDI_B4, "808Kick", - AudioSample808Kick, + Kick808, "B", - 13377, + 26688, 0.0, + 1.0, 0.0, - 0.8, + 1.0, 0.0, 0.0 }, @@ -252,51 +492,41 @@ drum_config_t drum_config[NUM_DRUMSET_CONFIG] = DRUM_BASS, MIDI_C5, "phkick1", - AudioSamplePhkick1, + phkick1, "B", - 2433, + 4800, 0.0, + 1.0, 0.0, 1.0, 0.0, 0.0 }, { - DRUM_SNARE, + DRUM_PERCUSSION, MIDI_CIS5, "rims1", - AudioSampleRims1wav, + rims1, "R", - 385, + 768, 0.0, + 1.0, -0.2, - 0.7, + 0.9, 0.0, 0.0 }, { - DRUM_SNARE, + DRUM_PERCUSSION, MIDI_D5, "Shaker", Shaker, "R", - 897, + 1792, 0.0, + 1.0, -0.2, - 0.5, - 0.0, - 0.0 - }, - { - DRUM_SNARE, - MIDI_E5, - "LNsnare1", - AudioSampleLnsnare1, - "S", - 5313, - 0.0, - 0.0, - 0.9, + 0.7, 0.0, 0.0 }, @@ -304,23 +534,39 @@ drum_config_t drum_config[NUM_DRUMSET_CONFIG] = DRUM_HANDCLAP, MIDI_DIS5, "LNclap1", - AudioSampleLnclap, + LNclap1, "C", - 3521, + 6976, 0.0, + 1.0, 0.1, - 0.9, + 1.0, 0.0, 0.1 }, + { //30 + DRUM_SNARE, + MIDI_E5, + "LNsnare1", + LNsnare1, + "S", + 10560, + 0.0, + 1.0, + 0.0, + 1.0, + 0.0, + 0.0 + }, { DRUM_BASS, MIDI_F5, - "Bdtrancy", - AudioSampleBdtrancy, + "Bdtranc", + Bdtrancy, "B", - 3969, + 7872, 0.0, + 1.0, 0.0, 0.9, 0.0, @@ -330,63 +576,67 @@ drum_config_t drum_config[NUM_DRUMSET_CONFIG] = DRUM_HIHAT, MIDI_FIS5, "hhcl1", - AudioSampleHhcl1wav, + hhcl1, "H", - 3137, + 6208, 0.0, 1.0, + 1.0, 0.6, 0.0, 0.0 }, - { - DRUM_BASS, + DRUM_PERCUSSION, MIDI_G5, - "Belltree", - AudioSampleBelltree, + "Belltre", + Belltree, "B", - 60737, + 121408, 0.0, + 1.0, 0.0, 0.7, 0.0, 0.0 }, { - DRUM_BASS, + DRUM_PERCUSSION, MIDI_GIS5, "Bongo16", - AudioSampleBongo16, + Bongo16, "B", - 1633, + 6464, 0.0, + 1.0, 0.0, 0.9, 0.0, 0.0 }, { - DRUM_BASS, + DRUM_PERCUSSION, MIDI_A5, "Bongo27", - AudioSampleBongo27, + Bongo27, "B", - 5889, + 11712, 0.0, + 1.0, 0.0, 0.9, 0.0, 0.0 }, { - DRUM_BASS, + DRUM_PERCUSSION, MIDI_AIS5, "Casta", - AudioSampleCasta, - "B", - 513, + Casta, + "C", + 2048, 0.0, + 1.0, 0.0, 0.9, 0.0, @@ -396,26 +646,27 @@ drum_config_t drum_config[NUM_DRUMSET_CONFIG] = DRUM_BASS, MIDI_B5, "Cr78kick", - AudioSampleCr78kick, + Cr78kick, "B", - 5057, + 10048, 0.0, + 1.0, 0.0, 1.0, 0.0, 0.0 }, - { DRUM_HIHAT, MIDI_C6, "Cr78tmb1", - AudioSampleCr78tmb1, - "B", - 3777, + Cr78tmb1, + "T", + 7552, 0.0, + 1.0, 0.0, - 0.8, + 1.0, 0.0, 0.0 }, @@ -423,35 +674,38 @@ drum_config_t drum_config[NUM_DRUMSET_CONFIG] = DRUM_HIHAT, MIDI_CIS6, "Cr78tmb2", - AudioSampleCr78tmb2, - "B", - 5441, + Cr78tmb2, + "T", + 10880, 0.0, + 1.0, 0.0, - 0.8, + 1.0, 0.0, 0.0 }, { - DRUM_BASS, + DRUM_CRASH, MIDI_D6, "Crash1", - AudioSampleCrash1, + Crash1, "B", - 36417, + 72768, 0.0, + 1.0, 0.0, 0.9, 0.0, 0.0 }, { - DRUM_BASS, + DRUM_PERCUSSION, MIDI_DIS6, "Dmpop", - AudioSampleDmpop, + Dmpop, "B", - 1953, + 7808, + 1.0, 0.0, 0.0, 0.9, @@ -459,26 +713,28 @@ drum_config_t drum_config[NUM_DRUMSET_CONFIG] = 0.0 }, { - DRUM_BASS, + DRUM_PERCUSSION, MIDI_E6, "Electr1", - AudioSampleElectr1, + Electr1, "B", - 737, + 2880, 0.0, + 1.0, 0.0, 0.9, 0.0, 0.0 }, { - DRUM_BASS, + DRUM_PERCUSSION, MIDI_F6, "Excow", - AudioSampleExcow, + Excow, "B", - 5057, + 20160, 0.0, + 1.0, 0.0, 0.9, 0.0, @@ -488,25 +744,13 @@ drum_config_t drum_config[NUM_DRUMSET_CONFIG] = DRUM_PERCUSSION, MIDI_FIS6, "Tamb", - AudioSampleTamb, + Tamb, "T", - 4097, + 8128, 0.0, + 1.0, -0.2, - 0.6, - 0.0, - 0.0 - }, - { - DRUM_PERCUSSION, - MIDI_GIS6, - "Cowbell", - AudioSampleCowbell, - "S", - 1825, - 0.0, - 0.2, - 0.6, + 0.8, 0.0, 0.0 }, @@ -514,12 +758,27 @@ drum_config_t drum_config[NUM_DRUMSET_CONFIG] = DRUM_HIHAT, MIDI_G6, "660HatC1", - AudioSampleHatc1, + HatC660, "T", - 3009, + 5952, 0.0, + 1.0, 0.0, - 0.6, + 0.8, + 0.0, + 0.0 + }, + { + DRUM_PERCUSSION, + MIDI_GIS6, + "Cowbell", + Cowbell, + "S", + 7296, + 0.0, + 1.0, + 0.2, + 0.8, 0.0, 0.0 }, @@ -527,50 +786,67 @@ drum_config_t drum_config[NUM_DRUMSET_CONFIG] = DRUM_HIHAT, MIDI_A6, "Hhopen1", - AudioSampleHhopen1, + Hhopen1, "S", - 5633, + 11200, 0.0, + 1.0, 0.0, - 0.6, + 0.8, 0.0, 0.0 }, { DRUM_PERCUSSION, MIDI_AIS6, - "Histicks", - AudioSampleHisticks, + "Histick", + Histicks, "S", - 609, + 2432, 0.0, + 1.0, 0.0, - 0.6, + 0.8, 0.0, 0.0 }, { - DRUM_PERCUSSION, + DRUM_SNARE, MIDI_B6, "Hr16snr2", - AudioSampleHr16snr2, + Hr16snr2, "S", - 7617, + 15168, 0.0, + 1.0, 0.0, - 0.6, + 1.0, + 0.0, + 0.0 + }, + { //50 + DRUM_HIGHTOM, + MIDI_C7, + "Xrhitom", + Xrhitom, + "B", + 13504, + 0.0, + 1.0, + 0.0, + 1.0, 0.0, 0.0 }, - { DRUM_PERCUSSION, MIDI_CIS7, "Tick1", - AudioSampleTick1, + Tick1, "S", - 321, + 640, 0.0, + 1.0, 0.0, 0.9, 0.0, @@ -579,24 +855,26 @@ drum_config_t drum_config[NUM_DRUMSET_CONFIG] = { DRUM_PERCUSSION, MIDI_D7, - "M118w", - AudioSampleM118w, + "M1-18", + M1_18, "S", - 1153, + 2240, 0.0, + 1.0, 0.0, 0.9, 0.0, 0.0 }, { - DRUM_PERCUSSION, + DRUM_HANDCLAP, MIDI_DIS7, - "Md16_clp", - AudioSampleMd16_clp, + "Md16clp", + Md16_clp, "S", - 6657, + 13312, 0.0, + 1.0, 0.0, 0.9, 0.0, @@ -606,10 +884,11 @@ drum_config_t drum_config[NUM_DRUMSET_CONFIG] = DRUM_HIHAT, MIDI_E7, "Ohhwav", - AudioSampleOhhwav, + Ohhwav, "S", - 11777, + 23488, 0.0, + 1.0, 0.0, 0.9, 0.0, @@ -619,10 +898,11 @@ drum_config_t drum_config[NUM_DRUMSET_CONFIG] = DRUM_PERCUSSION, MIDI_F7, "Quijada", - AudioSampleQuijada, + Quijada, "S", - 18049, + 36096, 0.0, + 1.0, 0.0, 0.9, 0.0, @@ -632,23 +912,25 @@ drum_config_t drum_config[NUM_DRUMSET_CONFIG] = DRUM_PERCUSSION, MIDI_FIS7, "tabla1", - AudioSampleR8tabla1, + tabla1, "S", - 7745, + 15488, 0.0, + 1.0, 0.0, 0.9, 0.0, 0.0 }, { - DRUM_PERCUSSION, - MIDI_GIS7, - "Ridewav", - AudioSampleRidewav, + DRUM_RIDE, + MIDI_G7, + "Ride808", + Ride808, "S", - 10881, + 21696, 0.0, + 1.0, 0.0, 0.9, 0.0, @@ -656,44 +938,75 @@ drum_config_t drum_config[NUM_DRUMSET_CONFIG] = }, { DRUM_PERCUSSION, - MIDI_A7, - "Scratch1", - AudioSampleScratch1, + MIDI_GIS7, + "Scratch", + Scratch1, "S", - 1473, + 5888, 0.0, + 1.0, 0.0, - 0.7, + 0.8, 0.0, 0.0 }, { - DRUM_PERCUSSION, - MIDI_B7, + DRUM_LOWTOM, + MIDI_A7, "Tomlow", - AudioSampleTomlow, + Tomlow, "S", - 7681, + 15360, 0.0, + 1.0, 0.0, 0.9, 0.0, 0.0 }, - { - DRUM_PERCUSSION, - MIDI_C8, - "Tomwav", - AudioSampleTomwav, + { //60 + DRUM_LOWTOM, + MIDI_AIS7, + "Tom808", + Tom808, "S", - 3137, + 6272, 0.0, + 1.0, 0.0, 0.9, 0.0, 0.0 }, { + DRUM_LOWTOM, + MIDI_B7, + "Vl1lbeep", + Vl1lbeep, + "B", + 3008, + 0.0, + 1.0, + 0.0, + 1.0, + 0.0, + 0.0 + }, + { + DRUM_HIGHTOM, + MIDI_C8, + "Vl1hbeep", + Vl1hbeep, + "B", + 1984, + 0.0, + 1.0, + 0.0, + 1.0, + 0.0, + 0.0 + }, + { //63 DRUM_NONE, 0, "EMPTY", @@ -704,6 +1017,7 @@ drum_config_t drum_config[NUM_DRUMSET_CONFIG] = 0.0, 0.0, 0.0, + 0.0, 0.0 } }; diff --git a/midinotes.h b/midinotes.h index 1d43573..47ff5c4 100644 --- a/midinotes.h +++ b/midinotes.h @@ -5,6 +5,15 @@ #ifndef _MIDINOTES_H #define _MIDINOTES_H +#define MIDI_C0 12 +#define MIDI_CIS0 13 +#define MIDI_D0 14 +#define MIDI_DIS0 15 +#define MIDI_E0 16 +#define MIDI_F0 17 +#define MIDI_FIS0 18 +#define MIDI_G0 19 +#define MIDI_GIS0 20 #define MIDI_A0 21 #define MIDI_AIS0 22 #define MIDI_B0 23