Merge pull request #15 from MrDham/MrDham-patch-1

Mr dham patch 1
MrDham-fix-issue-16 2.1
MrDham 7 years ago committed by GitHub
commit 12029b4165
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      Open_Theremin_V3/application.cpp

@ -209,7 +209,6 @@ void Application::loop() {
if (_state == PLAYING && HW_BUTTON_PRESSED)
{
_state = CALIBRATING;
_midistate = MIDI_STOP;
resetTimer();
}
@ -227,6 +226,8 @@ void Application::loop() {
else
{
HW_LED1_OFF;HW_LED2_ON;
_midistate = MIDI_STOP;
};
// playModeSettingSound();
}
@ -394,6 +395,7 @@ pitchfn1 = GetPitchMeasurement()-pitchfn;
pitchXn2=pitchXn1-((pitchXn1-pitchXn0)*pitchfn1)/(pitchfn1-pitchfn0); // new DAC value
delay(100);
pitchXn0 = pitchXn1;
@ -458,7 +460,7 @@ volumefn1 = GetVolumeMeasurement()-volumefn;
volumeXn2=volumeXn1-((volumeXn1-volumeXn0)*volumefn1)/(volumefn1-volumefn0); // calculate new DAC value
delay_NOP(44316);//44316=100ms
volumeXn0 = volumeXn1;
volumeXn1 = volumeXn2;

Loading…
Cancel
Save