Several fixes.

dev
Holger Wirtz 2 years ago
parent 300f66ae9a
commit 3d1564b205
  1. 2
      MicroDexed.ino
  2. 128
      addon/tools/drumset.cfg
  3. 1604
      addon/tools/drumset.h.orig
  4. 18
      addon/tools/wav2c.sh
  5. 555
      drumset.h

@ -1016,7 +1016,7 @@ void handleNoteOn(byte inChannel, byte inNumber, byte inVelocity) {
}
Drum[slot]->playRaw((int16_t*)drum_config[d].drum_data, drum_config[d].len, 1);
#ifdef DEBUG
Serial.printf(PSTR("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(PSTR("Playing sample [%s][%c%c] on slot [%d] main volume [%d]: drum_data=%p, len=%d\n"), drum_config[d].name, slot, configuration.drums.main_vol, drum_config[d].drum_data, drum_config[d].len);
Serial.print(F("Drum Slot ["));
Serial.print(slot);

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

File diff suppressed because it is too large Load Diff

@ -56,7 +56,7 @@ while [[ $# -gt 0 ]]; do
shift # past value
;;
-w|--wavs)
WAV_DIR="$2"
WAV_DIR=$(echo "$2" | sed 's/\/$//')
shift # past argument
shift # past value
;;
@ -108,7 +108,6 @@ typedef struct drum_config_s {
uint8_t midinote; // Triggered by note
char name[DRUM_NAME_LEN];
const uint8_t* drum_data;
char shortname[2]; // 1 char namer
uint32_t len; // number of elements in drum_data
float32_t pitch; // variable pitch per note
float32_t pan; // Panorama (-1.0 - +1.0)
@ -143,13 +142,12 @@ do
sample['name']=`echo "${samplecfg[2]}" | xargs`
sample['c_name']=`echo "${samplecfg[2]}" | xargs | sed 's/[^a-zA-Z0-9]/_/g'`
sample['c_name']=`echo "DRUM_${sample[c_name]}"`
sample['shortname']=`echo "${samplecfg[3]}" | xargs`
sample['pitch']=`echo "${samplecfg[4]}" | xargs`
sample['pan']=`echo "${samplecfg[5]}" | xargs`
sample['vol_max']=`echo "${samplecfg[6]}" | xargs`
sample['vol_min']=`echo "${samplecfg[7]}" | xargs`
sample['reverb_send']=`echo "${samplecfg[8]}" | xargs`
sample['filename']=`echo "${samplecfg[9]}" | xargs`
sample['pitch']=`echo "${samplecfg[3]}" | xargs`
sample['pan']=`echo "${samplecfg[4]}" | xargs`
sample['vol_max']=`echo "${samplecfg[5]}" | xargs`
sample['vol_min']=`echo "${samplecfg[6]}" | xargs`
sample['reverb_send']=`echo "${samplecfg[7]}" | xargs`
sample['filename']=`echo "${samplecfg[8]}" | xargs`
if [ -f "${WAV_DIR}/${sample['filename']}" ]
then
@ -229,7 +227,6 @@ do
${sample[midinote]},
"${sample[name]}",
${sample[c_name]},
"${sample[shortname]}",
${sample[len]},
${sample[pitch]},
${sample[pan]},
@ -258,7 +255,6 @@ cat >> "${DRUMS_H}" << EOF
0,
"EMPTY",
NULL,
"-",
0,
0.0,
0.0,

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