This commit is contained in:
Dooho Yi 2021-06-17 12:38:30 +09:00
parent 7843e1a0c6
commit 6c8be8c1be

View file

@ -163,7 +163,7 @@ void receiveEvent(int numBytes) {
int velocity = str_velocity.toInt(); // 0 ~ 127 int velocity = str_velocity.toInt(); // 0 ~ 127
float amp_gain = (float)velocity / 127.0; float amp_gain = (float)velocity / 127.0;
// //
amp_gain = amp_gain * 0.2; // 1.0 was too loud. => 0.2 max. amp_gain = amp_gain * 0.3; // 1.0 was too loud. => 0.3 max.
// //
amp1.gain(amp_gain); amp1.gain(amp_gain);
amp2.gain(amp_gain); amp2.gain(amp_gain);
@ -259,8 +259,8 @@ void setup() {
mixer2.gain(1,1.0); mixer2.gain(1,1.0);
mixer2.gain(2,0); mixer2.gain(2,0);
mixer2.gain(3,0); mixer2.gain(3,0);
amp1.gain(0.2); // 1.0 was too loud. => 0.2 amp1.gain(0.3); // 1.0 was too loud. => 0.3
amp2.gain(0.2); amp2.gain(0.3);
//let auto-poweroff speakers stay turned ON! //let auto-poweroff speakers stay turned ON!
sine1.frequency(IDLE_FREQ); sine1.frequency(IDLE_FREQ);