Fixes for drums reverb-send.

pull/54/head
Holger Wirtz 3 years ago
parent 84178af143
commit cd3f859d73
  1. 20
      MicroDexed.ino
  2. 8
      drums.h

@ -477,6 +477,8 @@ void setup()
drum_mixer_r.gain(instance_id, 1.0); drum_mixer_r.gain(instance_id, 1.0);
drum_mixer_l.gain(instance_id, 1.0); drum_mixer_l.gain(instance_id, 1.0);
drum_reverb_send_mixer_r.gain(instance_id, 0.0);
drum_reverb_send_mixer_l.gain(instance_id, 0.0);
} }
#endif #endif
@ -813,6 +815,20 @@ void handleNoteOn(byte inChannel, byte inNumber, byte inVelocity)
drum_reverb_send_mixer_r.gain(slot, pseudo_log_curve(drum_config[d].reverb_send)); drum_reverb_send_mixer_r.gain(slot, pseudo_log_curve(drum_config[d].reverb_send));
drum_reverb_send_mixer_l.gain(slot, pseudo_log_curve(drum_config[d].reverb_send)); drum_reverb_send_mixer_l.gain(slot, pseudo_log_curve(drum_config[d].reverb_send));
Drum[slot]->play(drum_config[d].filename); Drum[slot]->play(drum_config[d].filename);
#ifdef DEBUG
Serial.print(F("Drum "));
Serial.print(drum_config[d].shortname);
Serial.print(F(" ["));
Serial.print(drum_config[d].filename);
Serial.print(F("], Slot "));
Serial.print(slot);
Serial.print(F(": V"));
Serial.print(mapfloat(inVelocity, 0, 127, drum_config[d].vol_min, drum_config[d].vol_max), 2);
Serial.print(F(" P"));
Serial.print(drum_config[d].pan, 2);
Serial.print(F(" RS"));
Serial.println(drum_config[d].reverb_send, 2);
#endif
break; break;
} }
} }
@ -2132,8 +2148,8 @@ void set_fx_params(void)
#if NUM_DRUMS > 0 #if NUM_DRUMS > 0
#ifdef USE_FX #ifdef USE_FX
reverb_mixer_r.gain(2, 1.0); // Drums-Send reverb_mixer_r.gain(2, 1.0); // Drums Reverb-Send
reverb_mixer_l.gain(2, 1.0); // Drums-Send reverb_mixer_l.gain(2, 1.0); // Drums Reverb-Send
#endif #endif
#endif #endif

@ -26,7 +26,7 @@
uint8_t drum_counter; uint8_t drum_counter;
uint8_t drum_type[NUM_DRUMS]; uint8_t drum_type[NUM_DRUMS];
enum {DRUM_NONE, DRUM_BASS, DRUM_SNARE, DRUM_HIHAT, DRUM_HANDCLAP, DRUM_RIDE, DRUM_CHRASH, DRUM_LOWTOM, DRUM_MIDTOM, DRUM_HIGHTOM}; enum {DRUM_NONE, DRUM_BASS, DRUM_SNARE, DRUM_HIHAT, DRUM_HANDCLAP, DRUM_RIDE, DRUM_CHRASH, DRUM_LOWTOM, DRUM_MIDTOM, DRUM_HIGHTOM, DRUM_PERCUSSION};
typedef struct drum_config_s { typedef struct drum_config_s {
uint8_t type; // Type of drum uint8_t type; // Type of drum
@ -59,7 +59,7 @@ drum_config_t drum_config[NUM_DRUMCONFIG] = {
-0.4, -0.4,
0.6, 0.6,
0.0, 0.0,
0.0 0.4
}, },
{ {
DRUM_SNARE, DRUM_SNARE,
@ -159,7 +159,7 @@ drum_config_t drum_config[NUM_DRUMCONFIG] = {
0.0, 0.0,
0.9, 0.9,
0.0, 0.0,
0.0 0.4
}, },
{ {
DRUM_SNARE, DRUM_SNARE,
@ -181,7 +181,7 @@ drum_config_t drum_config[NUM_DRUMCONFIG] = {
0.0, 0.0,
0.0 0.0
}, },
{ {
DRUM_NONE, DRUM_NONE,
0, 0,
"/drm/EMPTY ", "/drm/EMPTY ",

Loading…
Cancel
Save