QAudioRoom#

Inheritance diagram of PySide6.QtSpatialAudio.QAudioRoom

Synopsis#

Properties#

Functions#

Signals#

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:

enginePySide6.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.

Access functions:
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.

Access functions:
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:
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:
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:
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:
property PᅟySide6.QtSpatialAudio.QAudioRoom.rotation: PySide6.QtGui.QQuaternion#

Defines the orientation of the room in 3D space.

Access functions:
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:

PySide6.QtGui.QVector3D

See also

setDimensions()

Getter of property dimensions .

PySide6.QtSpatialAudio.QAudioRoom.dimensionsChanged()#

Notification signal of property dimensions .

PySide6.QtSpatialAudio.QAudioRoom.position()#
Return type:

PySide6.QtGui.QVector3D

See also

setPosition()

Getter of property position .

PySide6.QtSpatialAudio.QAudioRoom.positionChanged()#

Notification signal of property position .

PySide6.QtSpatialAudio.QAudioRoom.reflectionGain()#
Return type:

float

Getter of property reflectionGain .

PySide6.QtSpatialAudio.QAudioRoom.reflectionGainChanged()#

Notification signal of property reflectionGain .

PySide6.QtSpatialAudio.QAudioRoom.reverbBrightness()#
Return type:

float

Getter of property reverbBrightness .

PySide6.QtSpatialAudio.QAudioRoom.reverbBrightnessChanged()#

Notification signal of property reverbBrightness .

PySide6.QtSpatialAudio.QAudioRoom.reverbGain()#
Return type:

float

See also

setReverbGain()

Getter of property reverbGain .

PySide6.QtSpatialAudio.QAudioRoom.reverbGainChanged()#

Notification signal of property reverbGain .

PySide6.QtSpatialAudio.QAudioRoom.reverbTime()#
Return type:

float

See also

setReverbTime()

Getter of property reverbTime .

PySide6.QtSpatialAudio.QAudioRoom.reverbTimeChanged()#

Notification signal of property reverbTime .

PySide6.QtSpatialAudio.QAudioRoom.rotation()#
Return type:

PySide6.QtGui.QQuaternion

See also

setRotation()

Getter of property rotation .

PySide6.QtSpatialAudio.QAudioRoom.rotationChanged()#

Notification signal of property rotation .

PySide6.QtSpatialAudio.QAudioRoom.setDimensions(dim)#
Parameters:

dimPySide6.QtGui.QVector3D

See also

dimensions()

Setter of property dimensions .

PySide6.QtSpatialAudio.QAudioRoom.setPosition(pos)#
Parameters:

posPySide6.QtGui.QVector3D

See also

position()

Setter of property position .

PySide6.QtSpatialAudio.QAudioRoom.setReflectionGain(factor)#
Parameters:

factor – float

See also

reflectionGain()

Setter of property reflectionGain .

PySide6.QtSpatialAudio.QAudioRoom.setReverbBrightness(factor)#
Parameters:

factor – float

Setter of property reverbBrightness .

PySide6.QtSpatialAudio.QAudioRoom.setReverbGain(factor)#
Parameters:

factor – float

See also

reverbGain()

Setter of property reverbGain .

PySide6.QtSpatialAudio.QAudioRoom.setReverbTime(factor)#
Parameters:

factor – float

See also

reverbTime()

Setter of property reverbTime .

PySide6.QtSpatialAudio.QAudioRoom.setRotation(q)#
Parameters:

qPySide6.QtGui.QQuaternion

See also

rotation()

Setter of property rotation .

PySide6.QtSpatialAudio.QAudioRoom.setWallMaterial(wall, material)#
Parameters:

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

PySide6.QtSpatialAudio.QAudioRoom.wallMaterial(wall)#
Parameters:

wallWall

Return type:

Material

returns the material being used for wall.

See also

setWallMaterial() Material Wall

PySide6.QtSpatialAudio.QAudioRoom.wallsChanged()#

Signals when the wall material changes.