|
|
|
@ -276,10 +276,10 @@ void create_audio_drum_chain(uint8_t instance_id) |
|
|
|
|
Drum[instance_id] = new AudioPlayMemory(); |
|
|
|
|
|
|
|
|
|
dynamicConnections[nDynamic++] = new AudioConnection(*Drum[instance_id], 0, drum_mixer_r, instance_id); |
|
|
|
|
dynamicConnections[nDynamic++] = new AudioConnection(*Drum[instance_id], 1, drum_mixer_l, instance_id); |
|
|
|
|
dynamicConnections[nDynamic++] = new AudioConnection(*Drum[instance_id], 0, drum_mixer_l, instance_id); |
|
|
|
|
#ifdef USE_FX |
|
|
|
|
dynamicConnections[nDynamic++] = new AudioConnection(*Drum[instance_id], 0, drum_reverb_send_mixer_r, instance_id); |
|
|
|
|
dynamicConnections[nDynamic++] = new AudioConnection(*Drum[instance_id], 1, drum_reverb_send_mixer_l, instance_id); |
|
|
|
|
dynamicConnections[nDynamic++] = new AudioConnection(*Drum[instance_id], 0, drum_reverb_send_mixer_l, instance_id); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
#ifdef DEBUG |
|
|
|
@ -783,10 +783,10 @@ void handleNoteOn(byte inChannel, byte inNumber, byte inVelocity) |
|
|
|
|
uint8_t slot = drum_get_slot(drum_config[d].drum_class); |
|
|
|
|
float pan = mapfloat(drum_config[d].pan, -1.0, 1.0, 0.0, 1.0); |
|
|
|
|
|
|
|
|
|
drum_mixer_r.gain(slot, pan * pseudo_log_curve(mapfloat(inVelocity, 0, 127, drum_config[d].vol_min, drum_config[d].vol_max))); |
|
|
|
|
drum_mixer_l.gain(slot, (1.0 - 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, pan * pseudo_log_curve(drum_config[d].reverb_send)); |
|
|
|
|
drum_reverb_send_mixer_l.gain(slot, (1.0 - pan) * pseudo_log_curve(drum_config[d].reverb_send)); |
|
|
|
|
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); |
|
|
|
@ -802,6 +802,8 @@ void handleNoteOn(byte inChannel, byte inNumber, byte inVelocity) |
|
|
|
|
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(" PAN")); |
|
|
|
|
Serial.print(pan, 2); |
|
|
|
|
Serial.print(F(" RS")); |
|
|
|
|
Serial.println(drum_config[d].reverb_send, 2); |
|
|
|
|
#endif |
|
|
|
|