Does amplitude(level) of waveform sound quantized?

tejas

Active member
I'm doing a sweep of level in amplitude(level) of the waveform object. I expected a smooth increase from 0 to 1. However, the amplitude sounds like it is increasing in steps, especially between 0.0 to 0.1 range of input level. Is there a way I can increase the 'resolution' of the sweep? I tried double instead of float, but that didn't help. The volume level of SGTL5000 is set to 0.8.
 
For perfectly smooth ramp, you would need to adjust volume on sample-by-sample basis.
 
How are you "doing a sweep"? Calling the amplitude() method inside loop() or something like that? Doing so will result in the level only changing on every audio update, i.e. every 2.9ms or so, which is very likely to result in audible "zipper noise".

The most flexible way to do a level sweep is to multiply the waveform with a DC source, as you can then select a target level and time. The fade object can only go from 0.0 to 1.0 or the reverse.
1767864276325.png
 
Back
Top