Hello,<div><br></div><div>I&#39;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 (&quot;OSCulator&quot; app), but i&#39;ve found that the data from the remote&#39;s gyroscope is constantly changing. For example, i&#39;ll turn the remote so the yaw turns the volume up 100%, then i&#39;ll move it around, but when I come back to this same position the yaw/volume will be 75% up. </div>
<div><br></div><div>To fix this I&#39;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&#39;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&#39;t over-written.</div>
<div><br></div><div>Does anyone know the best way of doing this?</div><div><br></div><div>I&#39;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.</div>
<div><br></div><div>Sorry for the long message, thank you for your time.</div><div>-Sebastian<br clear="all"><div><br></div>-- <br><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px">Sebastian Ignacio Valenzuela Rojas<font size="1" color="#666666"><br>
</font></span><div><div><div><font face="arial, sans-serif"><span style="border-collapse:collapse">Composer - Performer</span></font></div><div><font face="arial, sans-serif" size="1"><span style="border-collapse:collapse"><a href="http://svalenzuelamusic.wix.com/home" target="_blank">svalenzuelamusic.wix.com/home</a></span></font></div>
<div><font face="arial, sans-serif" size="1"><span style="border-collapse:collapse"><a href="http://www.youtube.com/svalenzuelamusic" target="_blank">youtube.com/svalenzuelamusic</a></span></font></div></div></div><br>
</div>