RolloffDesc
- class carb.audio.RolloffDesc
Bases:
pybind11_object
Descriptor of the rolloff mode and range. The C++ API allows rolloff curves to be set through this struct, but in python you need to use voice.set_rolloff_curve() to do this instead.
Methods
__init__
(self)Attributes
The far distance range for the sound.
The near distance range for the sound.
The default type of rolloff calculation to use for all DSP values that are not overridden by a custom curve.
- __init__(self: carb.audio._audio.RolloffDesc) None
- property far_distance
The far distance range for the sound. This is specified in arbitrary world units. When a custom curve is used, this far distance will map to a distance of 1.0 on the curve. This must be greater than the `near_distance` distance. The far distance is the furthest distance that the emitters attributes will rolloff at. At distances further than this value, the calculated DSP values will always be the same as if they were at the far distance (usually silence). Emitters further than this distance will often become inactive in the scene since they cannot be heard any more. This defaults to 10000.0.
- property near_distance
The near distance range for the sound. This is specified in arbitrary world units. When a custom curve is used, this near distance will map to a distance of 0.0 on the curve. This must be less than the `far_distance` distance. The near distance is the closest distance that the emitter’s attributes start to rolloff at. At distances closer than this value, the calculated DSP values will always be the same as if they were at the near distance. This defaults to 0.0.
- property type
The default type of rolloff calculation to use for all DSP values that are not overridden by a custom curve. This defaults to `RolloffType.LINEAR`.