diff projects/d-box/render.cpp @ 51:4f8db16f17b5 newapi

D-Box updates; should work as old version did
author andrewm
date Sat, 30 May 2015 13:25:51 -0500
parents be427da6fb9c
children 3c3a1357657d
line wrap: on
line diff
--- a/projects/d-box/render.cpp	Sat May 30 12:34:32 2015 -0500
+++ b/projects/d-box/render.cpp	Sat May 30 13:25:51 2015 -0500
@@ -106,8 +106,8 @@
 float octaveSplitter;
 float semitones[((int)N_OCT*12)+1];
 float deltaTouch	= 0;
-float deltaWeightP	= 0.5;
-float deltaWeightI	= 0.0005;
+float deltaWeightP	= 0.5 / 65536.0;
+float deltaWeightI	= 0.0005 / 65536.0;
 
 // filter vars
 ne10_fir_instance_f32_t filter[2];
@@ -370,7 +370,7 @@
 			// current pitch is gPitchLatestInput, already retrieved
 			semitoneIndex	= ( gPitchLatestInput * 12 * N_OCT  )+0.5;	// closest semitone
 			deltaTarget		= (semitones[semitoneIndex]-gPitchLatestInput);				// delta between pitch and target
-			deltaTouch 		+= deltaTarget*deltaWeightI;								// update feedback [previous + current]
+			deltaTouch 		+= deltaTarget*(deltaWeightI);								// update feedback [previous + current]
 		}
 		else
 			deltaTouch = 0;