|
|
|
@ -43,6 +43,9 @@ |
|
|
|
|
#include "UI.hpp" |
|
|
|
|
#if NUM_DRUMS > 0 |
|
|
|
|
#include "drums.h" |
|
|
|
|
#if NUM_DRUMS > 4 |
|
|
|
|
#include "mixer8.h" |
|
|
|
|
#endif |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
// Audio engines
|
|
|
|
@ -89,11 +92,21 @@ AudioMixer4 audio_thru_mixer_l; |
|
|
|
|
AudioPlaySdRaw* Drum[NUM_DRUMS]; |
|
|
|
|
AudioAmplifier* drum_volume[NUM_DRUMS]; |
|
|
|
|
AudioEffectMonoStereo* drum_mono2stereo[NUM_DRUMS]; |
|
|
|
|
#if NUM_DRUMS < 5 |
|
|
|
|
AudioMixer4 drum_mixer_r; |
|
|
|
|
AudioMixer4 drum_mixer_l; |
|
|
|
|
#else |
|
|
|
|
AudioMixer8 drum_mixer_r; |
|
|
|
|
AudioMixer8 drum_mixer_l; |
|
|
|
|
#endif |
|
|
|
|
#ifdef USE_FX |
|
|
|
|
#if NUM_DRUMS < 5 |
|
|
|
|
AudioMixer4 drum_reverb_send_mixer_r; |
|
|
|
|
AudioMixer4 drum_reverb_send_mixer_l; |
|
|
|
|
#else |
|
|
|
|
AudioMixer8 drum_reverb_send_mixer_r; |
|
|
|
|
AudioMixer8 drum_reverb_send_mixer_l; |
|
|
|
|
#endif |
|
|
|
|
#endif |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
@ -810,6 +823,8 @@ void handleNoteOn(byte inChannel, byte inNumber, byte inVelocity) |
|
|
|
|
if (inNumber == drum_config[d].midinote) |
|
|
|
|
{ |
|
|
|
|
uint8_t slot = drum_get_slot(drum_config[d].type); |
|
|
|
|
if (Drum[slot]->isPlaying()) |
|
|
|
|
Drum[slot]->stop(); |
|
|
|
|
drum_volume[slot]->gain(pseudo_log_curve(mapfloat(inVelocity, 0, 127, drum_config[d].vol_min, drum_config[d].vol_max))); |
|
|
|
|
drum_mono2stereo[slot]->panorama(drum_config[d].pan); |
|
|
|
|
drum_reverb_send_mixer_r.gain(slot, pseudo_log_curve(drum_config[d].reverb_send)); |
|
|
|
|