audiblelight.worldstate.Emitter#
- class audiblelight.worldstate.Emitter(alias, coordinates_absolute)#
Bases:
object
Represents an individual position for a sound source within a mesh.
The Emitter object handles all information with respect to a single sound source at a single position. This includes its absolute coordinates within the mesh, as well as its relative position (Cartesian + polar) compared to all other MicArray and Emitter instances.
Note that, in the case of a static (non-moving) audio source, a single Event will be associated with a single Emitter. In the case of a moving audio source, we will instead have multiple Emitter objects per Event.
- Parameters:
alias (str)
coordinates_absolute (ndarray)
- __init__(alias, coordinates_absolute)#
- Parameters:
alias (str)
coordinates_absolute (ndarray)
Methods
__init__
(alias, coordinates_absolute)from_dict
(input_dict)Instantiate an Emitter from a dictionary.
to_dict
()Returns a dictionary representation of the Emitter
update_coordinates
(coordinates)Updates coordinates of this emitter WRT a dictionary in the format {alias: MicArray | list[Emitter]}
- __eq__(other)#
Compare two Emitter objects for equality.
- Returns:
True if two Emitter objects are equal, False otherwise
- Return type:
bool
- Parameters:
other (Any)
- __repr__()#
Returns a JSON-formatted string representation of the Emitter
- Return type:
str
- __str__()#
Returns a string representation of the Emitter
- Return type:
str
- classmethod from_dict(input_dict)#
Instantiate an Emitter from a dictionary.
- Parameters:
input_dict (dict[str, Any]) – Dictionary that will be used to instantiate the Emitter.
- Returns:
Emitter instance.
- to_dict()#
Returns a dictionary representation of the Emitter
- Returns:
dict
- Return type:
dict