|
|
|
@ -466,6 +466,7 @@ void setup() |
|
|
|
|
setup_debug_message(); |
|
|
|
|
#endif |
|
|
|
|
Serial.begin(SERIAL_SPEED); |
|
|
|
|
Serial.println(CrashReport); |
|
|
|
|
#endif |
|
|
|
|
#ifndef ENABLE_LCD_UI |
|
|
|
|
#ifdef DEBUG |
|
|
|
@ -878,14 +879,12 @@ void handleNoteOn(byte inChannel, byte inNumber, byte inVelocity) |
|
|
|
|
if (inNumber == drum_config[d].midinote) |
|
|
|
|
{ |
|
|
|
|
uint8_t slot = drum_get_slot(drum_config[d].drum_class); |
|
|
|
|
float fsin = mapfloat(arm_sin_f32(drum_config[d].pan * PI / 2.0), -1.0, 1.0, 0.0, 1.0); |
|
|
|
|
|
|
|
|
|
//drum_mixer_r.gain(slot, (1.0 - fsin) * pseudo_log_curve(mapfloat(inVelocity, 0, 127, drum_config[d].vol_min, drum_config[d].vol_max)));
|
|
|
|
|
//drum_mixer_l.gain(slot, fsin * pseudo_log_curve(mapfloat(inVelocity, 0, 127, drum_config[d].vol_min, drum_config[d].vol_max)));
|
|
|
|
|
drum_mixer_r.gain(slot, (1.0 - fsin) * mapfloat(inVelocity, 0, 127, drum_config[d].vol_min, drum_config[d].vol_max)); |
|
|
|
|
drum_mixer_l.gain(slot, fsin * mapfloat(inVelocity, 0, 127, drum_config[d].vol_min, drum_config[d].vol_max)); |
|
|
|
|
drum_reverb_send_mixer_r.gain(slot, (1.0 - fsin) * pseudo_log_curve(drum_config[d].reverb_send)); |
|
|
|
|
drum_reverb_send_mixer_l.gain(slot, fsin * pseudo_log_curve(drum_config[d].reverb_send)); |
|
|
|
|
float pan = mapfloat(drum_config[d].pan, -1.0, 1.0, 0.0, 1.0); |
|
|
|
|
|
|
|
|
|
drum_mixer_r.gain(slot, (1.0 - pan) * pseudo_log_curve(mapfloat(inVelocity, 0, 127, drum_config[d].vol_min, drum_config[d].vol_max))); |
|
|
|
|
drum_mixer_l.gain(slot, pan * pseudo_log_curve(mapfloat(inVelocity, 0, 127, drum_config[d].vol_min, drum_config[d].vol_max))); |
|
|
|
|
drum_reverb_send_mixer_r.gain(slot, (1.0 - pan) * pseudo_log_curve(drum_config[d].reverb_send)); |
|
|
|
|
drum_reverb_send_mixer_l.gain(slot, pan * pseudo_log_curve(drum_config[d].reverb_send)); |
|
|
|
|
|
|
|
|
|
if (drum_config[d].drum_data != NULL) |
|
|
|
|
Drum[slot]->play(drum_config[d].drum_data); |
|
|
|
|