Something that I need to do again and again is rate limit the values sent to parameter->setValue. I would love it if the designers could set the maximum rate a parameter could change in designer and not have to worry about it insted of having these rates hardcoded in code.
Even if you just applied the velocity already specified to the parameter this would work well. So when i call parameter->setValue it moves to that value at the rate specified.
- stephenmccaul asked 11 years ago
The situation is the game is sending raw numbers based on gameplay (say player’s speed) to the parameter.
The problem is that sometimes these numbers change very quickly in game which causes zipper (pops or level jumps) in the sound. To fix this I have to manually push this parameter through a rate limiting class that makes sure it only changes so much over a period of time. I need to do this on pretty much every parameter we use since having continuous and good sounding audio is far more important than instantanious tracking of the number and most numbers derived from motion or game progress jump around a lot and sometimes rather unpredictably. Having a safety net so sounds dont pop based on parameter changes is important.
A possible model of implementation would be for me to set the parameter value and then the parameter would track to that value at the velocity currently specified in designer. If velocity == 0 than it could jump. You may or may not want another velocity for this. I think one is plenty. You can almost think of this as setting a dynamic sustain point based on parameter value.
This would give the sound designers a way to control the smoothing of the parameter and remove a bunch of repetitive braindead code for me.
Please login first to submit.