Basic Sources
Creating a omnidirectional source
To define an omnidirectional source, an object Source
is created with make_omni. Moreover, the source can be labeled by using the parameter label
.
from treble_tsdk import treble
source_omni = treble.Source.make_omni(
position=treble.Point3d(1,1,1.5),
label="Omni_source"
)
Creating dipole and cardioid sources
Other basic sources that can be defined are the dipole and cardioid source.
source_dipole = treble.Source.make_dipole(
position=treble.Point3d(2,1,1.5),
label="Dipole_source",
orientation=treble.Rotation(azimuth=90)
)
source_cardioid = treble.Source.make_cardioid(
position=treble.Point3d(4,1,1.5),
label="Cardioid_source",
orientation=treble.Rotation(azimuth=180)
)
Combining sources in a simulation
Several sources can be used in a signle simulation as follows
sources = []
sources.append(source_omni)
sources.append(source_dipole)
sources.append(source_cardioid)