| |
- builtins.object
-
- Volume
class Volume |
|
Volume(volume_level: int = 9, offset: int = 9) -> None
Allows for changing the volume level and applying gain coefficients to audio signals.
Attributes:
volume_level: level of the audio signal
offset: reference point for the volume control |
|
Methods defined here:
- __init__(self, volume_level: int = 9, offset: int = 9) -> None
- Initialize self. See help(type(self)) for accurate signature.
- calculate_gain(self) -> float
- calculate the gain coefficient based on default offset and current knob
volume level setting.
- change_gain(self, samples: numpy.ndarray[typing.Any, numpy.dtype[numpy.int16]]) -> numpy.ndarray[typing.Any, numpy.dtype[numpy.int16]]
- change the gain of a given sound wave.
- config(self, volume_level: int) -> None
- configure all volume parameter given a knob value.
| |