From a1f8a87620671e908082368a2e7d1955148db9bd Mon Sep 17 00:00:00 2001 From: MrDham <32593747+MrDham@users.noreply.github.com> Date: Fri, 2 Mar 2018 21:12:48 +0100 Subject: [PATCH 1/2] Add files via upload --- Open_Theremin_V3/application.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Open_Theremin_V3/application.cpp b/Open_Theremin_V3/application.cpp index bed0f5c..a157a12 100644 --- a/Open_Theremin_V3/application.cpp +++ b/Open_Theremin_V3/application.cpp @@ -394,6 +394,7 @@ pitchfn1 = GetPitchMeasurement()-pitchfn; pitchXn2=pitchXn1-((pitchXn1-pitchXn0)*pitchfn1)/(pitchfn1-pitchfn0); // new DAC value +delay(100); pitchXn0 = pitchXn1; @@ -458,7 +459,7 @@ volumefn1 = GetVolumeMeasurement()-volumefn; volumeXn2=volumeXn1-((volumeXn1-volumeXn0)*volumefn1)/(volumefn1-volumefn0); // calculate new DAC value - +delay_NOP(44316);//44316=100ms volumeXn0 = volumeXn1; volumeXn1 = volumeXn2; From 591e9881318c2ed7456904a438aff2ed335db5ef Mon Sep 17 00:00:00 2001 From: MrDham <32593747+MrDham@users.noreply.github.com> Date: Sat, 17 Mar 2018 19:10:17 +0100 Subject: [PATCH 2/2] Add files via upload --- Open_Theremin_V3/application.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Open_Theremin_V3/application.cpp b/Open_Theremin_V3/application.cpp index a157a12..c6c9b1f 100644 --- a/Open_Theremin_V3/application.cpp +++ b/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(); }