Hello,
I'm creating a patch that will adjust the volume of an incoming signal. It is controlled by the Yaw of a wii remote connected to my laptop via bluetooth ("OSCulator" app), but i've found that the data from the remote's gyroscope is constantly changing. For example, i'll turn the remote so the yaw turns the volume up 100%, then i'll move it around, but when I come back to this same position the yaw/volume will be 75% up.
To fix this I've created a subpatch that stores the raw Yaw data into an array and uses the min/max of that array to adjust the range of the yaw data controlling the volume. The problem is that i've set the array to write over itself after the 99th index... so the min/max values are only stored for a few seconds before being over-written. This auto-offset adjuster works great ONLY for those few seconds where the array isn't over-written.
Does anyone know the best way of doing this?
I've attached the subpatch. Its hot inlet is where i send my raw gyroscope data, the cold inlet is used to turn on/off the patch, and the outlet is the scaled data (between 0-1) which controls volume.
Sorry for the long message, thank you for your time.
-Sebastian
--
Sebastian Ignacio Valenzuela Rojas