VirtualRoom:
Filter:
Classes (extension) | Libraries > AmbIEM | UGens > Multichannel > Ambisonics

VirtualRoom : Object
ExtensionExtension

Easy to use class for creation of virtual environments

Description

A convenience class for easy creation and management of virtual audio environments. The rendering is done in a class method (ar) while multiple instances of a VirtualRoom may be defined to be able to switch between them (its also possible to play them simultaniously, if that makes sense to some application).

Class Methods

VirtualRoom.new

VirtualRoom.maxSources

VirtualRoom.maxSources = value

VirtualRoom.kemarPath

VirtualRoom.kemarPath = value

Inherited class methods

Instance Methods

.room

.room = value

Arguments:

value

.bin

.bin = value

.hfDamping

.hfDamping = value

Arguments:

value

.roomProperties

.roomProperties = value

.refGain

.refGain = value

Arguments:

value

.play

.init

.gui

.addSource(source, key, x, y, z)

Arguments:

source
key
x
y
z

.removeSource(key)

Arguments:

key

.stop

.out

.out = value

.roomSize

.roomSize = value

.fullSourceFunc(source)

Arguments:

source

.addSourceLight(source, key, x, y, z)

Arguments:

source
key
x
y
z

.encoded

.encoded = value

.end(fadeTime: 0.1)

Arguments:

fadeTime

.sources

.sources = value

.lightSourceFunc(source)

Arguments:

source

.revIn

.revIn = value

.listener

.listener = value

.revGain

.revGain = value

Arguments:

value

.prAddSource(light: true, source, key, x, y, z)

Arguments:

light
source
key
x
y
z

Inherited instance methods

Examples

NOTE: For better performance the following server options should be set before booting the server.

First thing is to set the path to the full Kemar HRTFs (dowloadable from http://sound.media.mit.edu/KEMAR/full.tar.Z). Default is "KemarHRTF/" (located in the SC3 application folder)

Then init the class - that will switch on the rendering (and consumes CPU) and route the output to the standard output with .play

NOTE: The coordinate system is given according to the listener's head: x-axis (nose), y-axis (left-ear) and z-axis (vertex) and Rooms are defined by the origin and width/depth/height