Quote: Originally Posted by
justintime 
stric: If you do redesign it, I think I see a problem. How will your code determine the 'intended' reference volume? If the plugin is constantly changing the volume for you, then how will it know when I manually change it up/down, and set a new reference volume? (won't it be confused, given that the volume is constantly changing anyway? How will the code differentiate between a manual up/down volume, vs the plugin changing it as part of the adaptive volume schemes?)
i thought of this exact issue. the way i see it, there are two solutions. they are as follows
1) The first option would be to follow a similar procedure as to what i listed above. there is no need to track a reference volume, only to track the current volume. any time the driver's speed crosses into a new threshold (we'll call 10-30mph level 1, 30-50mph level 2, etc), the current volume will be adjusted up or down by a fixed amount. so if a driver is in speed level 1, and he crosses into level 2, the current volume would be adjusted up by a fixed amount, and vice versa. this, i think would be the simplest solution, and would compensate for any manual volume adjustments during driving. it would meet the basic goal of turning the volume up when speeding up, and down while decelerating. This method would be easily overridden by manual adjustments and not interfere with the driver's choice, because it would simply provide CF with a volume up or down command.
2) The second procedure is a little more intricate but may work better. This would involve tracking two volumes, the user set, and the current. User set would be what the driver manually chooses at any given point. The current volume would be based off the user set and increased and decreased according to speed. However, if the volume is manually changed, that volume would become the new user set, and all future current volumes would be based on that value. This method may work a little bit better in allowing more precise control of volume, for example, based on a logarithmic curve of the user set.
Personally, I think option one would be the easiest to program and implement. The user could have three options (as in the Hummer) of how aggressive they would like their volume adjustments. Minimum could provide +/- adjustments of 5 points, Medium could be 10 points, and Maximum could be 15 points. The only trouble I see with using fixed increase/decrease values is that what happens if you have it set to volume 20 at 70mph, and then stop at a traffic light, your volume would hit zero. However, option 2 might be little tougher, but ultimately provide the best solution. It really only involves tracking one more variable, which is the volume that the user manually sets at any given point, which would override any automatic changes.
Anyways, let me know what you guys think or if I could be of any assistant. This feature would be very cool and nice to have, especially for people like me. After upgrading my suspension and putting bigger wheels and tires on, my ride is definitely noisier on a the highway (not that I mind the tradeoff :-) )
I'll try and come up with a pseudo-code algorithm in the next couple of days and post it up here for you guys to ponder over.