diff --git a/algorithm/signals/lehhs12c.wav b/algorithm/signals/lehhs12c.wav new file mode 100644 index 0000000..a057213 Binary files /dev/null and b/algorithm/signals/lehhs12c.wav differ diff --git a/algorithm/signals/lehhs12c_all.wav b/algorithm/signals/lehhs12c_all.wav new file mode 100644 index 0000000..5bea758 Binary files /dev/null and b/algorithm/signals/lehhs12c_all.wav differ diff --git a/algorithm/signals/lehhs12c_rim.wav b/algorithm/signals/lehhs12c_rim.wav new file mode 100644 index 0000000..73ef507 Binary files /dev/null and b/algorithm/signals/lehhs12c_rim.wav differ diff --git a/algorithm/signals/lehhs12c_stomps.wav b/algorithm/signals/lehhs12c_stomps.wav new file mode 100644 index 0000000..1ef5cea Binary files /dev/null and b/algorithm/signals/lehhs12c_stomps.wav differ diff --git a/algorithm/signals/mps750x_crash.wav b/algorithm/signals/mps750x_crash.wav new file mode 100644 index 0000000..1e2d523 Binary files /dev/null and b/algorithm/signals/mps750x_crash.wav differ diff --git a/algorithm/signals/mps750x_crash_all.wav b/algorithm/signals/mps750x_crash_all.wav new file mode 100644 index 0000000..9a27e9e Binary files /dev/null and b/algorithm/signals/mps750x_crash_all.wav differ diff --git a/algorithm/signals/mps750x_crash_rim.wav b/algorithm/signals/mps750x_crash_rim.wav new file mode 100644 index 0000000..4a207df Binary files /dev/null and b/algorithm/signals/mps750x_crash_rim.wav differ diff --git a/algorithm/signals/mps750x_hihat.wav b/algorithm/signals/mps750x_hihat.wav new file mode 100644 index 0000000..1a840f8 Binary files /dev/null and b/algorithm/signals/mps750x_hihat.wav differ diff --git a/algorithm/signals/mps750x_kick.wav b/algorithm/signals/mps750x_kick.wav new file mode 100644 index 0000000..6365964 Binary files /dev/null and b/algorithm/signals/mps750x_kick.wav differ diff --git a/algorithm/signals/mps750x_ride.wav b/algorithm/signals/mps750x_ride.wav new file mode 100644 index 0000000..b30bbae Binary files /dev/null and b/algorithm/signals/mps750x_ride.wav differ diff --git a/algorithm/signals/mps750x_ride_all.wav b/algorithm/signals/mps750x_ride_all.wav new file mode 100644 index 0000000..5b039e8 Binary files /dev/null and b/algorithm/signals/mps750x_ride_all.wav differ diff --git a/algorithm/signals/mps750x_ride_bell.wav b/algorithm/signals/mps750x_ride_bell.wav new file mode 100644 index 0000000..f1c521d Binary files /dev/null and b/algorithm/signals/mps750x_ride_bell.wav differ diff --git a/algorithm/signals/mps750x_ride_rim.wav b/algorithm/signals/mps750x_ride_rim.wav new file mode 100644 index 0000000..4f52cc9 Binary files /dev/null and b/algorithm/signals/mps750x_ride_rim.wav differ diff --git a/algorithm/signals/mps750x_snare.wav b/algorithm/signals/mps750x_snare.wav new file mode 100644 index 0000000..93a9105 Binary files /dev/null and b/algorithm/signals/mps750x_snare.wav differ diff --git a/algorithm/signals/mps750x_snare_rim.wav b/algorithm/signals/mps750x_snare_rim.wav new file mode 100644 index 0000000..0d3bf93 Binary files /dev/null and b/algorithm/signals/mps750x_snare_rim.wav differ diff --git a/algorithm/signals/mps750x_tom.wav b/algorithm/signals/mps750x_tom.wav new file mode 100644 index 0000000..1f369f2 Binary files /dev/null and b/algorithm/signals/mps750x_tom.wav differ diff --git a/algorithm/signalsandsettings.m b/algorithm/signalsandsettings.m index 9ab8f1a..9fef566 100644 --- a/algorithm/signalsandsettings.m +++ b/algorithm/signalsandsettings.m @@ -70,6 +70,13 @@ %x = audioread("signals/tp80.wav");padtype='tp80'; %x = audioread("signals/vh12.wav");padtype='vh12';%x = x(900000:end, :);%x = x(376000:420000, :);%x = x(1:140000, :); %x = audioread("signals/drumtec_diabolo12.wav");x=x(:,1);padtype='diabolo12'; +%x = audioread("signals/mps750x_tom.wav");padtype='mps750x_tom';x = x(156000:end, :); %until press rolls: 1:156000, press rolls: 156000:end +%x = audioread("signals/mps750x_snare.wav");padtype='mps750x_tom';x = x(1:172000, :); %until press rolls: 1:172000, press rolls: 172000:end +%x = audioread("signals/mps750x_snare_rim.wav");padtype='mps750x_tom'; +%x = audioread("signals/mps750x_kick.wav");padtype='mps750x_kick'; +%x = audioread("signals/mps750x_ride_all.wav");padtype='mps750x_cymbal'; +%x = audioread("signals/mps750x_crash_all.wav");padtype='mps750x_cymbal'; +%x = audioread("signals/lehhs12c_all.wav");padtype='lehhs12c'; % scale to the ESP32 input range to match the signal level of the ESP32 @@ -108,6 +115,31 @@ case 'pd120' % note: the PRESET settings are from the PD120 pad pad.hot_spot_attenuation_db = 3; + case 'lehhs12c' + pad.scan_time_ms = 4; + pad.decay_fact_db = 5; + pad.decay_len_ms2 = 600; + pad.decay_grad_fact2 = 100; + case 'mps750x_tom' + pad.scan_time_ms = 6; + pad.pre_scan_time_ms = 3.5; + pad.decay_grad_fact2 = 150; + pad.decay_len_ms2 = 450; + pad.rim_use_low_freq_bp = false; + case 'mps750x_kick' + pad.first_peak_diff_thresh_db = 3; + pad.scan_time_ms = 6; + pad.pre_scan_time_ms = 3.5; + pad.decay_grad_fact2 = 150; + pad.decay_len_ms2 = 450; + pad.threshold_db = 30; + case 'mps750x_cymbal' + pad.scan_time_ms = 3; + pad.decay_est_delay_ms = 1; + pad.decay_grad_fact2 = 150; + pad.decay_len_ms2 = 450; + pad.threshold_db = 30; + pad.rim_use_low_freq_bp = false; case 'pda120ls' pad.decay_grad_fact2 = 250; pad.decay_fact_db = 5; diff --git a/edrumulus.h b/edrumulus.h index 63b2b27..bde7e51 100644 --- a/edrumulus.h +++ b/edrumulus.h @@ -115,7 +115,14 @@ class Edrumulus PD5 = 17, PDA120LS = 18, PDX100 = 19, - KT10 = 20 + KT10 = 20, + MPS750X_TOM = 21, + MPS750X_SNARE = 22, + MPS750X_KICK = 23, + MPS750X_RIDE = 24, + MPS750X_CRASH = 25, + LEHHS12C = 26, + LEHHS12C_CTRL = 27 }; enum Ecurvetype // note that the enums need assigned integers for MIDI settings transfer diff --git a/edrumulus.ino b/edrumulus.ino index bb1a267..29ee74d 100644 --- a/edrumulus.ino +++ b/edrumulus.ino @@ -199,6 +199,15 @@ void loop() midi_note = edrumulus.get_midi_note_open ( pad_idx ); } } + // special case: MPS 750x ride bell heuristic + if ( edrumulus.get_pad_type(pad_idx) == Edrumulus::MPS750X_RIDE ) + { + // heuristic: if the bell is hit, it usually triggers a low velocity rim shot + if ( ( midi_velocity <= 70 ) && ( midi_note == edrumulus.get_midi_note_rim(pad_idx) ) ) + { + midi_note = edrumulus.get_midi_note_open_norm(pad_idx); + } + } MYMIDI.sendNoteOn ( midi_note, midi_velocity, midi_channel ); // (note, velocity, channel) MYMIDI.sendNoteOff ( midi_note, 0, midi_channel ); // we need a note off diff --git a/edrumulus_parameters.cpp b/edrumulus_parameters.cpp index 55914c5..be67180 100644 --- a/edrumulus_parameters.cpp +++ b/edrumulus_parameters.cpp @@ -57,6 +57,97 @@ void Edrumulus::Pad::apply_preset_pad_settings() switch ( pad_settings.pad_type ) { + + case LEHHS12C: // dual trigger + pad_settings.is_rim_switch = true; + pad_settings.scan_time_ms = 4.0f; + pad_settings.decay_fact_db = 5.0f; + pad_settings.decay_len2_ms = 600.0f; + pad_settings.decay_grad_fact2 = 100.0f; + pad_settings.rim_shot_is_used = true; + pad_settings.rim_shot_treshold = 25; + pad_settings.rim_shot_boost = 0; + pad_settings.velocity_threshold = 18; + pad_settings.velocity_sensitivity = 6; + break; + + case LEHHS12C_CTRL: // 0-35k poti + pad_settings.is_control = true; + pad_settings.velocity_threshold = 12; + pad_settings.velocity_sensitivity = 10; + break; + + /* MPS 750X: + * - recommended circuit: Rs=10k, Rp=10k, Cp=0 (https://github.com/corrados/edrumulus/discussions/98) + * - TRS pins: + * - Toms: hit piezo = T, rim piezo = R, GND = S + * - Cymbals incl. Hihat: bow piezo = S, rim switch = R (none for Hihat), GND = T, ride bell = ? + * - set all MPS750X potis to maximum output with a screw driver (sometimes the direction appears to be indicated incorrectly) + */ + + case MPS750X_TOM: // dual trigger + pad_settings.scan_time_ms = 6.0f; + pad_settings.pre_scan_time_ms = 3.5f; + pad_settings.decay_grad_fact2 = 150.0f; + pad_settings.decay_len2_ms = 450.0f; + pad_settings.rim_shot_is_used = false; + pad_settings.velocity_threshold = 2; + pad_settings.velocity_sensitivity = 3; + break; + + case MPS750X_SNARE: // dual trigger + pad_settings.scan_time_ms = 6.0f; + pad_settings.pre_scan_time_ms = 3.5f; + pad_settings.decay_grad_fact2 = 150.0f; + pad_settings.decay_len2_ms = 450.0f; + pad_settings.rim_use_low_freq_bp = false; + pad_settings.rim_shot_is_used = true; + pad_settings.rim_shot_treshold = 12; + pad_settings.velocity_threshold = 2; + pad_settings.velocity_sensitivity = 6; + pad_settings.pos_sense_is_used = true; + pad_settings.pos_sensitivity = 3; + break; + + case MPS750X_KICK: // single trigger + pad_settings.first_peak_diff_thresh_db = 3.0f; + pad_settings.scan_time_ms = 6.0f; + pad_settings.pre_scan_time_ms = 3.5f; + pad_settings.decay_grad_fact2 = 150.0f; + pad_settings.decay_len2_ms = 450.0f; + pad_settings.velocity_threshold = 10; + pad_settings.velocity_sensitivity = 10; + pad_settings.curve_type = LOG2; + break; + + case MPS750X_RIDE: // 3-zone + pad_settings.is_rim_switch = true; + pad_settings.scan_time_ms = 3.0f; + pad_settings.decay_est_delay_ms = 1.0f; + pad_settings.decay_grad_fact2 = 150.0f; + pad_settings.decay_len2_ms = 450.0f; + pad_settings.rim_use_low_freq_bp = false; + pad_settings.rim_shot_is_used = true; + pad_settings.rim_shot_treshold = 18; + pad_settings.rim_shot_boost = 0; + pad_settings.velocity_threshold = 12; + pad_settings.velocity_sensitivity = 6; + break; + + case MPS750X_CRASH: // 2-zone + pad_settings.is_rim_switch = true; + pad_settings.scan_time_ms = 3.0f; + pad_settings.decay_est_delay_ms = 1.0f; + pad_settings.decay_grad_fact2 = 150.0f; + pad_settings.decay_len2_ms = 450.0f; + pad_settings.rim_use_low_freq_bp = false; + pad_settings.rim_shot_is_used = true; + pad_settings.rim_shot_treshold = 20; + pad_settings.rim_shot_boost = 0; + pad_settings.velocity_threshold = 12; + pad_settings.velocity_sensitivity = 6; + break; + case PD120: // dual trigger pad_settings.velocity_threshold = 6; pad_settings.velocity_sensitivity = 6; diff --git a/tools/edrumulus_gui.py b/tools/edrumulus_gui.py index d0bd01d..ab470ac 100755 --- a/tools/edrumulus_gui.py +++ b/tools/edrumulus_gui.py @@ -48,7 +48,8 @@ # tables pad_types = ["PD120", "PD80R", "PD8", "FD8", "VH12", "VH12CTRL", "KD7", "TP80", "CY6", "CY8", "DIABOLO12", \ - "CY5", "HD1TOM", "PD6", "KD8", "PDX8", "KD120", "PD5", "PDA120LS", "PDX100", "KT10"] + "CY5", "HD1TOM", "PD6", "KD8", "PDX8", "KD120", "PD5", "PDA120LS", "PDX100", "KT10", "MPS750X_TOM", \ + "MPS750X_SNARE", "MPS750X_KICK", "MPS750X_RIDE", "MPS750X_CRASH", "LEHHS12C", "LEHHS12C_CTRL" ] pad_names = ["snare", "kick", "hi-hat", "ctrl", "crash", "tom1", "ride", "tom2", "tom3"] curve_types = ["LINEAR", "EXP1", "EXP2", "LOG1", "LOG2"] cmd_names = [ "type", "thresh", "sens", "pos thres", "pos sens", "rim thres", "mask", "curve"]