Several fixes for playing drums.

dev
Holger Wirtz 2 years ago
parent b752880735
commit d6c8eefbf1
  1. 83
      MicroDexed.ino
  2. 26
      addon/SD/PERFORMANCE/0/drums.json
  3. 126
      addon/tools/drumset.cfg
  4. 240038
      addon/tools/drumset.h
  5. 13
      config.h
  6. 12
      dexed_sd.cpp
  7. 1427
      drumset.h

@ -975,50 +975,55 @@ void handleNoteOn(byte inChannel, byte inNumber, byte inVelocity) {
Serial.print(F("Triggring Drum[")); Serial.print(F("Triggring Drum["));
Serial.print(drum_counter, DEC); Serial.print(drum_counter, DEC);
Serial.print(F("]: with note ")); Serial.print(F("]: with note "));
Serial.print(inNumber); Serial.print(note_name);
Serial.print(F("/")); Serial.print(F("/"));
Serial.println(note_name); Serial.println(inNumber, DEC);
Serial.flush(); Serial.flush();
#endif #endif
}
for (uint8_t d = 0; d < NUM_DRUMSET_CONFIG; d++) { for (uint8_t d = 0; d < NUM_DRUMSET_CONFIG; d++) {
if (inNumber == drum_config[d].midinote) { Serial.printf("%d: %d==%d\n", d, inNumber, drum_config[d].midinote);
uint8_t slot = drum_get_slot(drum_config[d].drum_class); if (inNumber == drum_config[d].midinote) {
float pan = mapfloat(drum_config[d].pan, -1.0, 1.0, 0.0, 1.0); uint8_t slot = drum_get_slot(drum_config[d].drum_class);
float pan = mapfloat(drum_config[d].pan, -1.0, 1.0, 0.0, 1.0);
drum_mixer_r.gain(slot, (1.0 - pan) * volume_transform(mapfloat(inVelocity, 0, 127, drum_config[d].vol_min, drum_config[d].vol_max))); //drum_mixer_r.gain(slot, (1.0 - pan) * volume_transform(mapfloat(inVelocity, 0, 127, drum_config[d].vol_min, drum_config[d].vol_max)));
drum_mixer_l.gain(slot, pan * volume_transform(mapfloat(inVelocity, 0, 127, drum_config[d].vol_min, drum_config[d].vol_max))); //drum_mixer_l.gain(slot, pan * volume_transform(mapfloat(inVelocity, 0, 127, drum_config[d].vol_min, drum_config[d].vol_max)));
drum_mixer_r.gain(slot, (1.0 - pan) * mapfloat(inVelocity, 0, 127, drum_config[d].vol_min, drum_config[d].vol_max));
drum_mixer_l.gain(slot, pan * mapfloat(inVelocity, 0, 127, drum_config[d].vol_min, drum_config[d].vol_max));
#ifdef USE_FX #ifdef USE_FX
drum_reverb_send_mixer_r.gain(slot, (1.0 - pan) * volume_transform(drum_config[d].reverb_send)); //drum_reverb_send_mixer_r.gain(slot, (1.0 - pan) * volume_transform(drum_config[d].reverb_send));
drum_reverb_send_mixer_l.gain(slot, pan * volume_transform(drum_config[d].reverb_send)); //drum_reverb_send_mixer_l.gain(slot, pan * volume_transform(drum_config[d].reverb_send));
#endif drum_reverb_send_mixer_r.gain(slot, (1.0 - pan) * drum_config[d].reverb_send);
if (drum_config[d].drum_data != NULL && drum_config[d].len > 0) { drum_reverb_send_mixer_l.gain(slot, pan * drum_config[d].reverb_send);
if (drum_config[d].pitch != 0.0) { #endif
Drum[slot]->enableInterpolation(true); if (drum_config[d].drum_data != NULL && drum_config[d].len > 0) {
Drum[slot]->setPlaybackRate(drum_config[d].pitch); if (drum_config[d].pitch != 0.0) {
} Drum[slot]->enableInterpolation(true);
Drum[slot]->playRaw((int16_t*)drum_config[d].drum_data, drum_config[d].len, 1); Drum[slot]->setPlaybackRate(drum_config[d].pitch);
}
Drum[slot]->playRaw((int16_t*)drum_config[d].drum_data, drum_config[d].len, 1);
#ifdef DEBUG #ifdef DEBUG
Serial.printf("Playing sample [%s][%c%c] on slot [%d] main volume [%d]: drum_data=%p, len=%d\n", drum_config[d].name, drum_config[d].shortname[0], drum_config[d].shortname[1], slot, configuration.drums.main_vol, drum_config[d].drum_data, drum_config[d].len); Serial.printf("Playing sample [%s][%c%c] on slot [%d] main volume [%d]: drum_data=%p, len=%d\n", drum_config[d].name, drum_config[d].shortname[0], drum_config[d].shortname[1], slot, configuration.drums.main_vol, drum_config[d].drum_data, drum_config[d].len);
#endif #endif
} }
#ifdef DEBUG #ifdef DEBUG
Serial.print(F("Drum ")); Serial.print(F("Drum "));
Serial.print(drum_config[d].shortname); Serial.print(drum_config[d].shortname);
Serial.print(F(" [")); Serial.print(F(" ["));
Serial.print(drum_config[d].name); Serial.print(drum_config[d].name);
Serial.print(F("], Slot [")); Serial.print(F("], Slot ["));
Serial.print(slot); Serial.print(slot);
Serial.print(F("]: Velocity=")); Serial.print(F("]: Velocity="));
Serial.print(mapfloat(inVelocity, 0, 127, drum_config[d].vol_min, drum_config[d].vol_max), 2); Serial.print(mapfloat(inVelocity, 0, 127, drum_config[d].vol_min, drum_config[d].vol_max), 2);
Serial.print(F(" Pan=")); Serial.print(F(" Pan="));
Serial.print(pan, 2); Serial.print(pan, 2);
Serial.print(F(" ReverbSend=")); Serial.print(F(" ReverbSend="));
Serial.println(drum_config[d].reverb_send, 2); Serial.println(drum_config[d].reverb_send, 2);
#endif #endif
break; break;
}
} }
} }
#endif #endif
@ -1968,17 +1973,19 @@ void check_configuration_epiano(void) {
configuration.epiano.midi_channel = constrain(configuration.epiano.midi_channel, EP_MIDI_CHANNEL_MIN, EP_MIDI_CHANNEL_MAX); configuration.epiano.midi_channel = constrain(configuration.epiano.midi_channel, EP_MIDI_CHANNEL_MIN, EP_MIDI_CHANNEL_MAX);
} }
void check_configuration_drums(void) { void check_configuration_drums(void) {
configuration.drums.main_vol = constrain(configuration.drums.main_vol, DRUMS_MAIN_VOL_MIN, DRUMS_MAIN_VOL_MAX); configuration.drums.main_vol = constrain(configuration.drums.main_vol, DRUMS_MAIN_VOL_MIN, DRUMS_MAIN_VOL_MAX);
configuration.drums.midi_channel = constrain(configuration.drums.midi_channel, DRUMS_MIDI_CHANNEL_MIN, DRUMS_MIDI_CHANNEL_MAX); configuration.drums.midi_channel = constrain(configuration.drums.midi_channel, DRUMS_MIDI_CHANNEL_MIN, DRUMS_MIDI_CHANNEL_MAX);
for (uint8_t i = 0; i < NUM_DRUMSET_CONFIG - 1; i++) { for (uint8_t i = 0; i < NUM_DRUMSET_CONFIG - 1; i++) {
drum_config[i].midinote = constrain(drum_config[i].midinote, DRUMS_MIDI_NOTE_MIN, DRUMS_MIDI_NOTE_MAX); drum_config[i].midinote = constrain(drum_config[i].midinote, DRUMS_MIDI_NOTE_MIN, DRUMS_MIDI_NOTE_MAX);
drum_config[i].pitch = constrain(drum_config[i].pitch, DRUMS_PITCH_MIN, DRUMS_PITCH_MAX); drum_config[i].pitch = constrain(float32_t(drum_config[i].pitch), -5.0, 5.0); // TODO
drum_config[i].pan = constrain(drum_config[i].pan, DRUMS_PANORAMA_MIN, DRUMS_PANORAMA_MAX); drum_config[i].pan = constrain(drum_config[i].pan, 0.0, 1.0);
drum_config[i].vol_max = constrain(drum_config[i].vol_max, DRUMS_VOL_MIN, DRUMS_VOL_MAX); drum_config[i].vol_max = constrain(drum_config[i].vol_max, 0.0, 1.0);
drum_config[i].vol_min = constrain(drum_config[i].vol_min, DRUMS_VOL_MIN, DRUMS_VOL_MAX); drum_config[i].vol_min = constrain(drum_config[i].vol_min, 0.0, 1.0);
drum_config[i].reverb_send = constrain(drum_config[i].reverb_send, DRUMS_REVERB_SEND_MIN, DRUMS_REVERB_SEND_MAX); drum_config[i].reverb_send = constrain(drum_config[i].reverb_send, 0.0, 1.0);
} }
} }

@ -2,7 +2,19 @@
"main_volume": 0.95, "main_volume": 0.95,
"midi_channel": 10, "midi_channel": 10,
"note": [ "note": [
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45, 45,
46,
47, 47,
48, 48,
49, 49,
@ -42,29 +54,17 @@
83, 83,
84, 84,
85, 85,
86,
87, 87,
88, 88,
89, 89,
90, 90,
92,
91, 91,
92,
93, 93,
94, 94,
95, 95,
96, 96,
97, 97,
98,
99,
100,
101,
102,
103,
104,
105,
106,
107,
108,
0 0
], ],
"pitch": [ "pitch": [

@ -1,64 +1,64 @@
# class, midinote, name, shortname, pitch, p_offset, pan, vol_max, vol_min, reverb_send, filename # class, midinote, name, shortname, pitch, p_offset, pan, vol_max, vol_min, reverb_send, filename
DRUM_BASS, MIDI_A2, Clap808, B, 0.0, 0.0, 0.8, 0.0, 0.0, S_kick_1.wav DRUM_BASS, MIDI_A1, Clap808, B, 0.0, 0.0, 0.8, 0.0, 0.0, Clap808.wav
DRUM_BASS, MIDI_B2, S_kick_1, B, 0.0, 0.0, 0.8, 0.0, 0.0, S_kick_1.wav DRUM_BASS, MIDI_B1, S_kick_1, B, 0.0, 0.0, 0.8, 0.0, 0.0, S_kick_1.wav
DRUM_BASS, MIDI_C3, S_kick2_8, B, 0.0, 0.0, 0.8, 0.0, 0.0, S_kick2_8.wav DRUM_BASS, MIDI_C2, S_kick2_8, B, 0.0, 0.0, 0.8, 0.0, 0.0, S_kick2_8.wav
DRUM_PERCUSSION, MIDI_CIS3, S_Stick_1, B, 0.0, 0.0, 0.8, 0.0, 0.0, S_snareStick_1.wav DRUM_PERCUSSION, MIDI_CIS2, S_Stick_1, B, 0.0, 0.0, 0.8, 0.0, 0.0, S_snareStick_1.wav
DRUM_SNARE, MIDI_D3, S_snare_Ghost_1, B, 0.0, 0.0, 0.8, 0.0, 0.0, S_snare_Ghost_1.wav DRUM_SNARE, MIDI_D2, S_snare_Ghost_1, B, 0.0, 0.0, 0.8, 0.0, 0.0, S_snare_Ghost_1.wav
DRUM_SNARE, MIDI_DIS3, S_snare2_Ghost_1, B, 0.0, 0.0, 0.8, 0.0, 0.0, S_snare2_Ghost_1.wav DRUM_SNARE, MIDI_DIS2, S_snare2_Ghost_1, B, 0.0, 0.0, 0.8, 0.0, 0.0, S_snare2_Ghost_1.wav
DRUM_SNARE, MIDI_E3, S_snare_2, B, 0.0, 0.0, 0.8, 0.0, 0.0, S_snare_2.wav DRUM_SNARE, MIDI_E2, S_snare_2, B, 0.0, 0.0, 0.8, 0.0, 0.0, S_snare_2.wav
DRUM_BASS, MIDI_F3, S_loTom_1, B, 0.0, 0.0, 0.8, 0.0, 0.0, S_loTom_1.wav DRUM_BASS, MIDI_F2, S_loTom_1, B, 0.0, 0.0, 0.8, 0.0, 0.0, S_loTom_1.wav
DRUM_BASS, MIDI_FIS3, S_hhClosed_1, B, 0.0, 0.0, 0.8, 0.0, 0.0, S_hhClosed_1.wav DRUM_BASS, MIDI_FIS2, S_hhClosed_1, B, 0.0, 0.0, 0.8, 0.0, 0.0, S_hhClosed_1.wav
DRUM_LOWTOM, MIDI_G3, S_loTom_1, B, 0.0, 0.0, 0.8, 0.0, 0.0, S_loTom_1.wav DRUM_LOWTOM, MIDI_G2, S_loTom_1, B, 0.0, 0.0, 0.8, 0.0, 0.0, S_loTom_1.wav
DRUM_BASS, MIDI_GIS3, S_hh_o_1_2, B, 0.0, 0.0, 0.8, 0.0, 0.0, S_hh_o_1_2.wav DRUM_BASS, MIDI_GIS2, S_hh_o_1_2, B, 0.0, 0.0, 0.8, 0.0, 0.0, S_hh_o_1_2.wav
DRUM_HIGHTOM, MIDI_A3, S_hiTom_5, B, 0.0, 0.0, 0.8, 0.0, 0.0, S_hiTom_5.wav DRUM_HIGHTOM, MIDI_A2, S_hiTom_5, B, 0.0, 0.0, 0.8, 0.0, 0.0, S_hiTom_5.wav
DRUM_BASS, MIDI_AIS3, S_hh_o_5_4, B, 0.0, 0.0, 0.8, 0.0, 0.0, S_hh_o_5_4.wav DRUM_BASS, MIDI_AIS2, S_hh_o_5_4, B, 0.0, 0.0, 0.8, 0.0, 0.0, S_hh_o_5_4.wav
DRUM_HIGHTOM, MIDI_B3, S_hiTom_5, B, 0.0, 0.0, 0.8, 0.0, 0.0, S_hiTom_5.wav DRUM_HIGHTOM, MIDI_B2, S_hiTom_5, B, 0.0, 0.0, 0.8, 0.0, 0.0, S_hiTom_5.wav
DRUM_HIGHTOM, MIDI_C4, S_hiTom_5, B, 0.0, 0.0, 0.8, 0.0, 0.0, S_hiTom_5.wav DRUM_HIGHTOM, MIDI_C3, S_hiTom_5, B, 0.0, 0.0, 0.8, 0.0, 0.0, S_hiTom_5.wav
DRUM_BASS, MIDI_CIS4, S_splash1_1, B, 0.0, 0.0, 0.8, 0.0, 0.0, S_splash1_1.wav DRUM_BASS, MIDI_CIS3, S_splash1_1, B, 0.0, 0.0, 0.8, 0.0, 0.0, S_splash1_1.wav
DRUM_HIGHTOM, MIDI_D4, S_hiTom_5, B, 0.0, 0.0, 0.8, 0.0, 0.0, S_hiTom_5.wav DRUM_HIGHTOM, MIDI_D3, S_hiTom_5, B, 0.0, 0.0, 0.8, 0.0, 0.0, S_hiTom_5.wav
DRUM_CRASH, MIDI_DIS4, S_china1_4, B, 0.0, 0.0, 0.8, 0.0, 0.0, S_china1_4.wav DRUM_CRASH, MIDI_DIS3, S_china1_4, B, 0.0, 0.0, 0.8, 0.0, 0.0, S_china1_4.wav
DRUM_CRASH, MIDI_E4, S_china2_1, B, 0.0, 0.0, 0.8, 0.0, 0.0, S_china2_1.wav DRUM_CRASH, MIDI_E3, S_china2_1, B, 0.0, 0.0, 0.8, 0.0, 0.0, S_china2_1.wav
DRUM_RIDE, MIDI_F4, S_ride1Bell_1, B, 0.0, 0.0, 0.8, 0.0, 0.0, S_ride1Bell_1.wav DRUM_RIDE, MIDI_F3, S_ride1Bell_1, B, 0.0, 0.0, 0.8, 0.0, 0.0, S_ride1Bell_1.wav
DRUM_RIDE, MIDI_FIS4, S_ride1Bell_1, B, 0.0, 0.0, 0.8, 0.0, 0.0, S_ride1Bell_1.wav DRUM_RIDE, MIDI_FIS3, S_ride1Bell_1, B, 0.0, 0.0, 0.8, 0.0, 0.0, S_ride1Bell_1.wav
DRUM_CRASH, MIDI_G4, S_crash1_1, B, 0.0, 0.0, 0.8, 0.0, 0.0, S_crash1_1.wav DRUM_CRASH, MIDI_G3, S_crash1_1, B, 0.0, 0.0, 0.8, 0.0, 0.0, S_crash1_1.wav
DRUM_BASS, MIDI_GIS4, S_cowbell_2, B, 0.0, 0.0, 0.8, 0.0, 0.0, S_cowbell_2.wav DRUM_BASS, MIDI_GIS3, S_cowbell_2, B, 0.0, 0.0, 0.8, 0.0, 0.0, S_cowbell_2.wav
DRUM_RIDE, MIDI_A4, S_ride2Crash_2, B, 0.0, 0.0, 0.8, 0.0, 0.0, S_ride2Crash_2.wav DRUM_RIDE, MIDI_A3, S_ride2Crash_2, B, 0.0, 0.0, 0.8, 0.0, 0.0, S_ride2Crash_2.wav
DRUM_RIDE, MIDI_AIS4, S_ride2_1, B, 0.0, 0.0, 0.8, 0.0, 0.0, S_ride2_1.wav DRUM_RIDE, MIDI_AIS3, S_ride2_1, B, 0.0, 0.0, 0.8, 0.0, 0.0, S_ride2_1.wav
DRUM_BASS, MIDI_B4, 808Kick, B, 0.0, 0.0, 0.8, 0.0, 0.0, Kick808.wav DRUM_BASS, MIDI_B3, 808Kick, B, 0.0, 0.0, 0.8, 0.0, 0.0, Kick808.wav
DRUM_BASS, MIDI_C5, phkick1, B, 0.0, 0.0, 1.0, 0.0, 0.0, phKick1.wav DRUM_BASS, MIDI_C4, phkick1, B, 0.0, 0.0, 1.0, 0.0, 0.0, phKick1.wav
DRUM_SNARE, MIDI_CIS5, rims1, R, 0.0, -0.2, 0.7, 0.0, 0.0, Rim808.wav DRUM_SNARE, MIDI_CIS4, rims1, R, 0.0, -0.2, 0.7, 0.0, 0.0, Rim808.wav
DRUM_SNARE, MIDI_D5, Shaker, R, 0.0, -0.2, 0.5, 0.0, 0.0, Shaker.wav DRUM_SNARE, MIDI_D4, Shaker, R, 0.0, -0.2, 0.5, 0.0, 0.0, Shaker.wav
DRUM_HANDCLAP, MIDI_DIS5, LNclap1, C, 0.0, 0.1, 0.9, 0.0, 0.1, LnClap.wav DRUM_HANDCLAP, MIDI_DIS4, LNclap1, C, 0.0, 0.1, 0.9, 0.0, 0.1, LnClap.wav
DRUM_SNARE, MIDI_E5, LNsnare1, S, 0.0, 0.0, 0.9, 0.0, 0.0, LnSnare1.wav DRUM_SNARE, MIDI_E4, LNsnare1, S, 0.0, 0.0, 0.9, 0.0, 0.0, LnSnare1.wav
DRUM_BASS, MIDI_F5, Bdtrancy, B, 0.0, 0.0, 0.9, 0.0, 0.0, BDTrancy.wav DRUM_BASS, MIDI_F4, Bdtrancy, B, 0.0, 0.0, 0.9, 0.0, 0.0, BDTrancy.wav
DRUM_HIHAT, MIDI_FIS5, hhcl1, H, 0.0, 1.0, 0.6, 0.0, 0.0, HhCL1-808.wav DRUM_HIHAT, MIDI_FIS4, hhcl1, H, 0.0, 1.0, 0.6, 0.0, 0.0, HhCL1-808.wav
DRUM_BASS, MIDI_G5, Belltree, B, 0.0, 0.0, 0.7, 0.0, 0.0, Belltree.wav DRUM_BASS, MIDI_G4, Belltree, B, 0.0, 0.0, 0.7, 0.0, 0.0, Belltree.wav
DRUM_BASS, MIDI_GIS5, Bongo16, B, 0.0, 0.0, 0.9, 0.0, 0.0, Bongo16.wav DRUM_BASS, MIDI_GIS4, Bongo16, B, 0.0, 0.0, 0.9, 0.0, 0.0, Bongo16.wav
DRUM_BASS, MIDI_A5, Bongo27, B, 0.0, 0.0, 0.9, 0.0, 0.0, Bongo27.wav DRUM_BASS, MIDI_A4, Bongo27, B, 0.0, 0.0, 0.9, 0.0, 0.0, Bongo27.wav
DRUM_BASS, MIDI_AIS5, Casta, B, 0.0, 0.0, 0.9, 0.0, 0.0, Casta.wav DRUM_BASS, MIDI_AIS4, Casta, B, 0.0, 0.0, 0.9, 0.0, 0.0, Casta.wav
DRUM_BASS, MIDI_B5, Cr78kick, B, 0.0, 0.0, 1.0, 0.0, 0.0, CR78Kick.wav DRUM_BASS, MIDI_B4, Cr78kick, B, 0.0, 0.0, 1.0, 0.0, 0.0, CR78Kick.wav
DRUM_HIHAT, MIDI_C6, Cr78tmb1, B, 0.0, 0.0, 0.8, 0.0, 0.0, CR78Tmb1.wav DRUM_HIHAT, MIDI_C5, Cr78tmb1, B, 0.0, 0.0, 0.8, 0.0, 0.0, CR78Tmb1.wav
DRUM_HIHAT, MIDI_CIS6, Cr78tmb2, B, 0.0, 0.0, 0.8, 0.0, 0.0, CR78Tmb2.wav DRUM_HIHAT, MIDI_CIS5, Cr78tmb2, B, 0.0, 0.0, 0.8, 0.0, 0.0, CR78Tmb2.wav
DRUM_BASS, MIDI_D6, Crash1, B, 0.0, 0.0, 0.9, 0.0, 0.0, Crash1.wav DRUM_BASS, MIDI_D5, Crash1, B, 0.0, 0.0, 0.9, 0.0, 0.0, Crash1.wav
DRUM_BASS, MIDI_DIS6, Dmpop, B, 0.0, 0.0, 0.9, 0.0, 0.0, DMpop.wav DRUM_BASS, MIDI_DIS5, Dmpop, B, 0.0, 0.0, 0.9, 0.0, 0.0, DMpop.wav
DRUM_BASS, MIDI_E6, Electr1, B, 0.0, 0.0, 0.9, 0.0, 0.0, Electr1.wav DRUM_BASS, MIDI_E5, Electr1, B, 0.0, 0.0, 0.9, 0.0, 0.0, Electr1.wav
DRUM_BASS, MIDI_F6, Excow, B, 0.0, 0.0, 0.9, 0.0, 0.0, EXcow.wav DRUM_BASS, MIDI_F5, Excow, B, 0.0, 0.0, 0.9, 0.0, 0.0, EXcow.wav
DRUM_PERCUSSION, MIDI_FIS6, Tamb, T, 0.0, -0.2, 0.6, 0.0, 0.0, Tamb.wav DRUM_PERCUSSION, MIDI_FIS5, Tamb, T, 0.0, -0.2, 0.6, 0.0, 0.0, Tamb.wav
DRUM_PERCUSSION, MIDI_GIS6, Cowbell, S, 0.0, 0.2, 0.6, 0.0, 0.0, CowBell.wav DRUM_PERCUSSION, MIDI_GIS5, Cowbell, S, 0.0, 0.2, 0.6, 0.0, 0.0, CowBell.wav
DRUM_HIHAT, MIDI_G6, 660HatC1, T, 0.0, 0.0, 0.6, 0.0, 0.0, HatC660.wav DRUM_HIHAT, MIDI_G5, 660HatC1, T, 0.0, 0.0, 0.6, 0.0, 0.0, HatC660.wav
DRUM_HIHAT, MIDI_A6, Hhopen1, S, 0.0, 0.0, 0.6, 0.0, 0.0, HHopen1.wav DRUM_HIHAT, MIDI_A5, Hhopen1, S, 0.0, 0.0, 0.6, 0.0, 0.0, HHopen1.wav
DRUM_PERCUSSION, MIDI_AIS6, Histicks, S, 0.0, 0.0, 0.6, 0.0, 0.0, HiSticks.wav DRUM_PERCUSSION, MIDI_AIS5, Histicks, S, 0.0, 0.0, 0.6, 0.0, 0.0, HiSticks.wav
DRUM_PERCUSSION, MIDI_B6, Hr16snr2, S, 0.0, 0.0, 0.6, 0.0, 0.0, HR16Snr2.wav DRUM_PERCUSSION, MIDI_B5, Hr16snr2, S, 0.0, 0.0, 0.6, 0.0, 0.0, HR16Snr2.wav
DRUM_HIGHTOM, MIDI_C7, Xrhitom, B, 0.0, 0.0, 0.8, 0.0, 0.0, XRHiTom.wav DRUM_HIGHTOM, MIDI_C6, Xrhitom, B, 0.0, 0.0, 0.8, 0.0, 0.0, XRHiTom.wav
DRUM_PERCUSSION, MIDI_CIS7, Tick1, S, 0.0, 0.0, 0.9, 0.0, 0.0, Tick1.wav DRUM_PERCUSSION, MIDI_CIS6, Tick1, S, 0.0, 0.0, 0.9, 0.0, 0.0, Tick1.wav
DRUM_PERCUSSION, MIDI_D7, M1-18, S, 0.0, 0.0, 0.9, 0.0, 0.0, M1-18.wav DRUM_PERCUSSION, MIDI_D6, M1-18, S, 0.0, 0.0, 0.9, 0.0, 0.0, M1-18.wav
DRUM_PERCUSSION, MIDI_DIS7, Md16_clp, S, 0.0, 0.0, 0.9, 0.0, 0.0, MD16_CLP.wav DRUM_PERCUSSION, MIDI_DIS6, Md16_clp, S, 0.0, 0.0, 0.9, 0.0, 0.0, MD16_CLP.wav
DRUM_HIHAT, MIDI_E7, Ohhwav, S, 0.0, 0.0, 0.9, 0.0, 0.0, OHH909.wav DRUM_HIHAT, MIDI_E6, Ohhwav, S, 0.0, 0.0, 0.9, 0.0, 0.0, OHH909.wav
DRUM_PERCUSSION, MIDI_F7, Quijada, S, 0.0, 0.0, 0.9, 0.0, 0.0, Quijada.wav DRUM_PERCUSSION, MIDI_F6, Quijada, S, 0.0, 0.0, 0.9, 0.0, 0.0, Quijada.wav
DRUM_PERCUSSION, MIDI_FIS7, tabla1, S, 0.0, 0.0, 0.9, 0.0, 0.0, R8Tabla1.wav DRUM_PERCUSSION, MIDI_FIS6, tabla1, S, 0.0, 0.0, 0.9, 0.0, 0.0, R8Tabla1.wav
DRUM_PERCUSSION, MIDI_G7, Ride808, S, 0.0, 0.0, 0.9, 0.0, 0.0, Ride808.wav DRUM_PERCUSSION, MIDI_G6, Ride808, S, 0.0, 0.0, 0.9, 0.0, 0.0, Ride808.wav
DRUM_PERCUSSION, MIDI_GIS7, Scratch1, S, 0.0, 0.0, 0.7, 0.0, 0.0, scratch1.wav DRUM_PERCUSSION, MIDI_GIS6, Scratch1, S, 0.0, 0.0, 0.7, 0.0, 0.0, scratch1.wav
DRUM_PERCUSSION, MIDI_A7, Tomlow, S, 0.0, 0.0, 0.9, 0.0, 0.0, TomLow.wav DRUM_PERCUSSION, MIDI_A6, Tomlow, S, 0.0, 0.0, 0.9, 0.0, 0.0, TomLow.wav
DRUM_PERCUSSION, MIDI_AIS7, Tom808, S, 0.0, 0.0, 0.9, 0.0, 0.0, Tom808.wav DRUM_PERCUSSION, MIDI_AIS6, Tom808, S, 0.0, 0.0, 0.9, 0.0, 0.0, Tom808.wav
DRUM_BASS, MIDI_B7, Vl1lbeep, B, 0.0, 0.0, 0.8, 0.0, 0.0, vl1-Lbeep.wav DRUM_BASS, MIDI_B6, Vl1lbeep, B, 0.0, 0.0, 0.8, 0.0, 0.0, vl1-Lbeep.wav
DRUM_BASS, MIDI_C8, Vl1hbeep, B, 0.0, 0.0, 0.8, 0.0, 0.0, vl1-Hbeep.wav DRUM_BASS, MIDI_C7, Vl1hbeep, B, 0.0, 0.0, 0.8, 0.0, 0.0, vl1-Hbeep.wav

File diff suppressed because it is too large Load Diff

@ -815,7 +815,7 @@
// Buffer-size define for load/save configuration as JSON // Buffer-size define for load/save configuration as JSON
//#define JSON_BUFFER_SIZE 8192 //#define JSON_BUFFER_SIZE 8192
#define JSON_BUFFER_SIZE 4096 #define JSON_BUFFER_SIZE 5120
// Internal configuration structure // Internal configuration structure
typedef struct dexed_s { typedef struct dexed_s {
@ -956,6 +956,17 @@ inline float mapfloat(float val, float in_min, float in_max, float out_min, floa
} }
#endif #endif
/*const float fconstrain(const float x, const float a, const float b) {
if(x < a) {
return a;
}
else if(b < x) {
return b;
}
else
return x;
}*/
/* From: https://forum.pjrc.com/threads/68048-Predefined-Macros /* From: https://forum.pjrc.com/threads/68048-Predefined-Macros
ARDUINO_ARCH_AVR - Avr Architecture / (all Teensy < 3.0) ARDUINO_ARCH_AVR - Avr Architecture / (all Teensy < 3.0)
TEENSYDUINO=Version - Is a Teensy + gives TD version TEENSYDUINO=Version - Is a Teensy + gives TD version

@ -433,12 +433,12 @@ bool load_sd_drumsettings_json(uint8_t number) {
configuration.drums.midi_channel = data_json["midi_channel"]; configuration.drums.midi_channel = data_json["midi_channel"];
for (uint8_t i = 0; i < NUM_DRUMSET_CONFIG - 1; i++) { for (uint8_t i = 0; i < NUM_DRUMSET_CONFIG - 1; i++) {
drum_config[i].midinote = data_json["note"][i]; drum_config[i].midinote = uint8_t(data_json["note"][i]);
drum_config[i].pitch = data_json["pitch"][i]; drum_config[i].pitch = float32_t(data_json["pitch"][i]);
drum_config[i].pan = data_json["pan"][i]; drum_config[i].pan = float32_t(data_json["pan"][i]);
drum_config[i].vol_max = data_json["vol_max"][i]; drum_config[i].vol_max = float32_t(data_json["vol_max"][i]);
drum_config[i].vol_min = data_json["vol_min"][i]; drum_config[i].vol_min = float32_t(data_json["vol_min"][i]);
drum_config[i].reverb_send = data_json["reverb_send"][i]; drum_config[i].reverb_send = float32_t(data_json["reverb_send"][i]);
} }
check_configuration_drums(); check_configuration_drums();
return (true); return (true);

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save