- class QAudioRoom¶
-
Synopsis¶
Properties¶
Methods¶
def
__init__()
def
dimensions()
def
position()
def
reflectionGain()
def
reverbGain()
def
reverbTime()
def
rotation()
def
setDimensions()
def
setPosition()
def
setReverbGain()
def
setReverbTime()
def
setRotation()
def
wallMaterial()
Signals¶
def
wallsChanged()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
Defines a room for the spatial audio engine.
If the listener is inside a room, first order sound reflections and reverb matching the rooms properties will get applied to the sound field.
A room is always square and defined by its center position, its orientation and dimensions. Each of the 6 walls of the room can be made of different materials that will contribute to the computed reflections and reverb that the listener will experience while being inside the room.
If multiple rooms cover the same position, the engine will use the room with the smallest volume.
- class Material¶
Defines different materials that can be applied to the different walls of the room.
Constant
Description
QAudioRoom.Transparent
The side of the room is open and won’t contribute to reflections or reverb.
QAudioRoom.AcousticCeilingTiles
Acoustic tiles that suppress most reflections and reverb.
QAudioRoom.BrickBare
Bare brick wall.
QAudioRoom.BrickPainted
Painted brick wall.
QAudioRoom.ConcreteBlockCoarse
Raw concrete wall
QAudioRoom.ConcreteBlockPainted
Painted concrete wall
QAudioRoom.CurtainHeavy
Heavy curtain. Will mostly reflect low frequencies
QAudioRoom.FiberGlassInsulation
Fiber glass insulation. Only reflects very low frequencies
QAudioRoom.GlassThin
Thin glass wall
QAudioRoom.GlassThick
Thick glass wall
QAudioRoom.Grass
Grass
QAudioRoom.LinoleumOnConcrete
Linoleum floor
QAudioRoom.Marble
Marble floor
QAudioRoom.Metal
Metal
QAudioRoom.ParquetOnConcrete
Parquet wooden floor on concrete
QAudioRoom.PlasterRough
Rough plaster
QAudioRoom.PlasterSmooth
Smooth plaster
QAudioRoom.PlywoodPanel
Plywodden panel
QAudioRoom.PolishedConcreteOrTile
Polished concrete or tiles
QAudioRoom.Sheetrock
Rock
QAudioRoom.WaterOrIceSurface
Water or ice
QAudioRoom.WoodCeiling
Wooden ceiling
QAudioRoom.WoodPanel
Wooden panel
QAudioRoom.UniformMaterial
Artificial material giving uniform reflections on all frequencies
- class Wall¶
An enum defining the 6 walls of the room
Constant
Description
QAudioRoom.LeftWall
Left wall (negative x)
QAudioRoom.RightWall
Right wall (positive x)
QAudioRoom.Floor
Bottom wall (negative y)
QAudioRoom.Ceiling
Top wall (positive y)
QAudioRoom.FrontWall
Front wall (negative z)
QAudioRoom.BackWall
Back wall (positive z)
Note
Properties can be used directly when
from __feature__ import true_property
is used or via accessor functions otherwise.Defines the dimensions of the room in 3D space. Units are in centimeters by default.
See also
- Access functions:
Defines the position of the center of the room in 3D space. Units are in centimeters by default.
See also
- Access functions:
- property reflectionGainᅟ: float¶
A gain factor for reflections generated in this room. A value from 0 to 1 will dampen reflections, while a value larger than 1 will apply a gain to reflections, making them louder.
The default is 1, a factor of 0 disables reflections. Negative values are mapped to 0.
- Access functions:
- property reverbBrightnessᅟ: float¶
A brightness factor to be applied to the generated reverb. A positive value will increase reverb for higher frequencies and dampen lower frequencies, a negative value does the reverse.
The default is 0.
- Access functions:
- property reverbGainᅟ: float¶
A gain factor for reverb generated in this room. A value from 0 to 1 will dampen reverb, while a value larger than 1 will apply a gain to the reverb, making it louder.
The default is 1, a factor of 0 disables reverb. Negative values are mapped to 0.
- Access functions:
- property reverbTimeᅟ: float¶
A factor to be applies to all reverb timings generated for this room. Larger values will lead to longer reverb timings, making the room sound larger.
The default is 1. Negative values are mapped to 0.
- Access functions:
- property rotationᅟ: QQuaternion¶
Defines the orientation of the room in 3D space.
- Access functions:
- __init__(engine)¶
- Parameters:
engine –
QAudioEngine
Constructs a
QAudioRoom
forengine
.- dimensions()¶
- Return type:
See also
Getter of property
dimensionsᅟ
.- dimensionsChanged()¶
Notification signal of property
dimensionsᅟ
.- position()¶
- Return type:
See also
Getter of property
positionᅟ
.- positionChanged()¶
Notification signal of property
positionᅟ
.- reflectionGain()¶
- Return type:
float
See also
Getter of property
reflectionGainᅟ
.- reflectionGainChanged()¶
Notification signal of property
reflectionGainᅟ
.- reverbBrightness()¶
- Return type:
float
See also
Getter of property
reverbBrightnessᅟ
.- reverbBrightnessChanged()¶
Notification signal of property
reverbBrightnessᅟ
.- reverbGain()¶
- Return type:
float
See also
Getter of property
reverbGainᅟ
.- reverbGainChanged()¶
Notification signal of property
reverbGainᅟ
.- reverbTime()¶
- Return type:
float
See also
Getter of property
reverbTimeᅟ
.- reverbTimeChanged()¶
Notification signal of property
reverbTimeᅟ
.- rotation()¶
- Return type:
See also
Getter of property
rotationᅟ
.- rotationChanged()¶
Notification signal of property
rotationᅟ
.Setter of property
dimensionsᅟ
.Setter of property
positionᅟ
.- setReflectionGain(factor)¶
- Parameters:
factor – float
See also
Setter of property
reflectionGainᅟ
.- setReverbBrightness(factor)¶
- Parameters:
factor – float
See also
Setter of property
reverbBrightnessᅟ
.- setReverbGain(factor)¶
- Parameters:
factor – float
See also
Setter of property
reverbGainᅟ
.- setReverbTime(factor)¶
- Parameters:
factor – float
See also
Setter of property
reverbTimeᅟ
.- setRotation(q)¶
- Parameters:
q –
QQuaternion
See also
Setter of property
rotationᅟ
.Sets
wall
tomaterial
.Different wall materials have different reflection and reverb properties that influence the sound of the room.
See also
returns the material being used for
wall
.See also
- wallsChanged()¶
Signals when the wall material changes.