QAudioRoom#
Synopsis#
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
()
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
.
- 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
Defines the dimensions of the room in 3D space. Units are in centimeters by default.
See also
- PySide6.QtSpatialAudio.QAudioRoom.dimensionsChanged()#
- PySide6.QtSpatialAudio.QAudioRoom.position()#
- Return type
Defines the position of the center of the room in 3D space. Units are in centimeters by default.
See also
- PySide6.QtSpatialAudio.QAudioRoom.positionChanged()#
- PySide6.QtSpatialAudio.QAudioRoom.reflectionGain()#
- Return type
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.
- PySide6.QtSpatialAudio.QAudioRoom.reflectionGainChanged()#
- PySide6.QtSpatialAudio.QAudioRoom.reverbBrightness()#
- Return type
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.
- PySide6.QtSpatialAudio.QAudioRoom.reverbBrightnessChanged()#
- PySide6.QtSpatialAudio.QAudioRoom.reverbGain()#
- Return type
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.
- PySide6.QtSpatialAudio.QAudioRoom.reverbGainChanged()#
- PySide6.QtSpatialAudio.QAudioRoom.reverbTime()#
- Return type
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.
- PySide6.QtSpatialAudio.QAudioRoom.reverbTimeChanged()#
- PySide6.QtSpatialAudio.QAudioRoom.rotation()#
- Return type
Defines the orientation of the room in 3D space.
- PySide6.QtSpatialAudio.QAudioRoom.rotationChanged()#
- PySide6.QtSpatialAudio.QAudioRoom.setDimensions(dim)#
- Parameters
dim –
PySide6.QtGui.QVector3D
Defines the dimensions of the room in 3D space. Units are in centimeters by default.
See also
- PySide6.QtSpatialAudio.QAudioRoom.setPosition(pos)#
- Parameters
pos –
PySide6.QtGui.QVector3D
Defines the position of the center of the room in 3D space. Units are in centimeters by default.
See also
- PySide6.QtSpatialAudio.QAudioRoom.setReflectionGain(factor)#
- Parameters
factor – 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.
- PySide6.QtSpatialAudio.QAudioRoom.setReverbBrightness(factor)#
- Parameters
factor – 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.
- PySide6.QtSpatialAudio.QAudioRoom.setReverbGain(factor)#
- Parameters
factor – 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.
- PySide6.QtSpatialAudio.QAudioRoom.setReverbTime(factor)#
- Parameters
factor – 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.
- PySide6.QtSpatialAudio.QAudioRoom.setRotation(q)#
- Parameters
Defines the orientation of the room in 3D space.
- 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()#