The fade is approximately exponential, which is what we want, but with less computation.Īny amplitude less than or equal to -60 dB (0.001) gets switched to 0 (–infinity decibels) for complete silence. The difference between those two methods is imperceptible, but this way is more efficient. Conversion from decibels to amplitude is a computationally expensive operation, so we do it only 100 times per second (every 10 ms) rather than for every single sample, and then we interpolate to each new amplitude with line~. It might seem a bit redundant to use both a line and a line~ (with a dbtoa between them), but in fact this is more efficient than using just a line~ and a dbtoa~. The line~ object then interpolates to each new amplitude. Those values are converted to amplitude with the dbtoa object. We use a line object to interpolate to the new decibel value, outputting a new value every 10 milliseconds. You can also send an amplitude-time pair in the left inlet to achieve the same result. Perceptually, a linear fade in decibels (which yields an exponential fade in amplitude) sounds smoother than a linear fade in amplitude.Ī number in the right inlet supplies a fade time in milliseconds, and a number in the left inlet supplies the desired amplitude, in decibels, and triggers a fade to that new amplitude. The abstraction fades to the new amplitude in a specified amount of time. The amplitude factor is expressed in decibels, which is generally a more intuitive way to refer to the volume of a sound. The output of this abstraction is intended to go to a *~ object to scale the volume of a sound. This patch is an abstraction for supplying an amplitude factor to control the level of an audio signal.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |