QAudioRoom#
Synopsis#
Properties#
Functions#
def
dimensions
()def
position
()def
reflectionGain
()def
reverbBrightness
()def
reverbGain
()def
reverbTime
()def
rotation
()def
setDimensions
(dim)def
setPosition
(pos)def
setReflectionGain
(factor)def
setReverbBrightness
(factor)def
setReverbGain
(factor)def
setReverbTime
(factor)def
setRotation
(q)def
setWallMaterial
(wall, material)def
wallMaterial
(wall)
Signals#
def
dimensionsChanged
()def
positionChanged
()def
reflectionGainChanged
()def
reverbBrightnessChanged
()def
reverbGainChanged
()def
reverbTimeChanged
()def
rotationChanged
()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 PySide6.QtSpatialAudio.QAudioRoom(engine)#
- Parameters:
engine –
PySide6.QtSpatialAudio.QAudioEngine
Constructs a QAudioRoom
for engine
.
Note
Properties can be used directly when from __feature__ import true_property
is used or via accessor functions otherwise.
- property PᅟySide6.QtSpatialAudio.QAudioRoom.dimensions: PySide6.QtGui.QVector3D#
Defines the dimensions of the room in 3D space. Units are in centimeters by default.
See also
- Access functions:
dimensions
()setDimensions
(dim)Signal
dimensionsChanged
()
- property PᅟySide6.QtSpatialAudio.QAudioRoom.position: PySide6.QtGui.QVector3D#
Defines the position of the center of the room in 3D space. Units are in centimeters by default.
See also
- Access functions:
position
()setPosition
(pos)Signal
positionChanged
()
- property PᅟySide6.QtSpatialAudio.QAudioRoom.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:
setReflectionGain
(factor)Signal
reflectionGainChanged
()
- property PᅟySide6.QtSpatialAudio.QAudioRoom.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:
setReverbBrightness
(factor)Signal
reverbBrightnessChanged
()
- property PᅟySide6.QtSpatialAudio.QAudioRoom.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:
reverbGain
()setReverbGain
(factor)Signal
reverbGainChanged
()
- property PᅟySide6.QtSpatialAudio.QAudioRoom.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:
reverbTime
()setReverbTime
(factor)Signal
reverbTimeChanged
()
- property PᅟySide6.QtSpatialAudio.QAudioRoom.rotation: PySide6.QtGui.QQuaternion#
Defines the orientation of the room in 3D space.
- Access functions:
rotation
()setRotation
(q)Signal
rotationChanged
()
- PySide6.QtSpatialAudio.QAudioRoom.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
- PySide6.QtSpatialAudio.QAudioRoom.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)
- PySide6.QtSpatialAudio.QAudioRoom.dimensions()#
- Return type:
See also
Getter of property dimensions
.
- PySide6.QtSpatialAudio.QAudioRoom.dimensionsChanged()#
Notification signal of property dimensions
.
- PySide6.QtSpatialAudio.QAudioRoom.position()#
- Return type:
See also
Getter of property position
.
- PySide6.QtSpatialAudio.QAudioRoom.positionChanged()#
Notification signal of property position
.
- PySide6.QtSpatialAudio.QAudioRoom.reflectionGain()#
- Return type:
float
See also
Getter of property reflectionGain
.
- PySide6.QtSpatialAudio.QAudioRoom.reflectionGainChanged()#
Notification signal of property reflectionGain
.
- PySide6.QtSpatialAudio.QAudioRoom.reverbBrightness()#
- Return type:
float
See also
Getter of property reverbBrightness
.
- PySide6.QtSpatialAudio.QAudioRoom.reverbBrightnessChanged()#
Notification signal of property reverbBrightness
.
- PySide6.QtSpatialAudio.QAudioRoom.reverbGain()#
- Return type:
float
See also
Getter of property reverbGain
.
- PySide6.QtSpatialAudio.QAudioRoom.reverbGainChanged()#
Notification signal of property reverbGain
.
- PySide6.QtSpatialAudio.QAudioRoom.reverbTime()#
- Return type:
float
See also
Getter of property reverbTime
.
- PySide6.QtSpatialAudio.QAudioRoom.reverbTimeChanged()#
Notification signal of property reverbTime
.
- PySide6.QtSpatialAudio.QAudioRoom.rotation()#
- Return type:
See also
Getter of property rotation
.
- PySide6.QtSpatialAudio.QAudioRoom.rotationChanged()#
Notification signal of property rotation
.
- PySide6.QtSpatialAudio.QAudioRoom.setDimensions(dim)#
- Parameters:
dim –
PySide6.QtGui.QVector3D
See also
Setter of property dimensions
.
- PySide6.QtSpatialAudio.QAudioRoom.setPosition(pos)#
- Parameters:
pos –
PySide6.QtGui.QVector3D
See also
Setter of property position
.
- PySide6.QtSpatialAudio.QAudioRoom.setReflectionGain(factor)#
- Parameters:
factor – float
See also
Setter of property reflectionGain
.
- PySide6.QtSpatialAudio.QAudioRoom.setReverbBrightness(factor)#
- Parameters:
factor – float
See also
Setter of property reverbBrightness
.
- PySide6.QtSpatialAudio.QAudioRoom.setReverbGain(factor)#
- Parameters:
factor – float
See also
Setter of property reverbGain
.
- PySide6.QtSpatialAudio.QAudioRoom.setReverbTime(factor)#
- Parameters:
factor – float
See also
Setter of property reverbTime
.
- PySide6.QtSpatialAudio.QAudioRoom.setRotation(q)#
- Parameters:
See also
Setter of property rotation
.
- PySide6.QtSpatialAudio.QAudioRoom.setWallMaterial(wall, material)#
Sets wall
to material
.
Different wall materials have different reflection and reverb properties that influence the sound of the room.
See also
wallMaterial()
Material
Wall
returns the material being used for wall
.
See also
setWallMaterial()
Material
Wall
- PySide6.QtSpatialAudio.QAudioRoom.wallsChanged()#
Signals when the wall material changes.