I'm new at using Audio Weaver and trying to understand the smoothing functions. I've attached a diagram of my system which writes to a file. Note the linear gain has a smoothing time of 1000 ms. I wasn't sure if this smoothing applies to a change in the input level or to a change in gain while the system is running. So I tried both and plotted the results using Matlab. As you can see from the 2nd plot, the red output line did not appear to take 1000 ms to reach it's new level after changing the DC output level from 2 to 1 at about 17 seconds in to the file. Nor did it appear to have any smoothing at about 9 seconds in to the file when I changed the gain from 1.0 to 1.2.
I replaced the DC source with a pulse generator and got the 2nd Matlab plot below. Is the idea that the gain goes from 1.0 when I hit run to it's setpoint of 1.2 over the smoothing time at startup only and not during other changes? Does smoothing work the same way in other blocks like Sb RMS?
Thanks in advance for any help. I'm still learning Audio Weaver so I could have messed something up.
1:51pm
Hi Dan,
Thanks for your interest in AudioWeaver! The smoothingTime of the scaler module simply smooths the gain value as it is adjusted. For example, if you had a higher smoothing value and tweaked the gain quickly, it would smooth the change in gain. All of the smoothing factors for our modules will smooth the control value.
Thanks,
-Andrew P
2:39pm
Thanks for the response Andrew. That doesn't seem to match with what I measured by writing the output to a file sink and plotting it. In the top Matlab plot, I switched both the input level and the gain level while collecting data. The smoothing time was set to 1000 ms but the output change seemed to happen immediately vs being smoothed. Is it possible I need to enable something else to make this work as you described?
10:36am
Hi Dan,
The smoothing is applied to the gain itself, not the input signal. So a change in the gain is smoothly applied, but a change to the input signal is immediately reflected in the output. This explains your first plot.
The smoothing time parameter is actually a time constant and describes an exponential rate of change (you can google "time constant" or look at Wikipedia for more info). This is a pretty typical way to describe rates of change in audio and electrical engineering. In a concrete example, if you change the gain from 1 to 2 the gain will smoothly change from 1 to 2 and after 1 "smoothing time" the gain will reach about 1.63 (adding 63% of the difference to the initial value) or so. After 5 "smoothing times" the gain will be about 1.99. Your second plot shows this behavior. As Andrew mentioned, if you shorten the smoothing time, the gain will reach it's final value more quickly. Another point is that smoothing is continuously applied to the gain, so any gain change will be smoothed, not just on startup or some other condition.
Many of the other smoothed modules work similarly -- although the smoothing may be applied to a different parameter, the smoothing time always refers to a time constant.
By the way, your experimental Audio Weaver layout was nicely set up.
Hope this helps.
Steve
4:26pm
Hi , I am not an expert in any way...
I just place those blocks side by side to make my loudspeakers work...
Could you please explain to me, for audio, smoothing of 10msec is set by defolt, but for best sound quality , should it be set to 0 ?
12:26pm
If you set the smoothing time to 0 ms then you run the risk of having pops/clicks in your audio when you quickly change values in the gain or mute modules. This is easy to hear in the mute module if you set the smoothing time to zero and mute the audio while it's playing. Compare this to the sound when the smoothing time is 10 or even 1000 ms.
As Steve I mentions above, the variable will reach ~99% of the target value after 5 smoothing times. If you aren't changing the variables in the modules, then the smoothing time has no impact on the audio processing.
12:50pm
Thanks Axel for clearing this to me ;)