sparrowpy.sound_object#

SoundObject class for spatial audio reproduction.

Classes:

Receiver(position, view, up)

Receiver object inhered from SoundObject.

SoundObject(position, view, up)

A class holding the common properties for Source and Receiver.

SoundSource(position, view, up[, ...])

Acoustic sound source inhered from SoundObject.

class sparrowpy.sound_object.Receiver(position: ndarray, view: ndarray, up: ndarray)[source]#

Bases: SoundObject

Receiver object inhered from SoundObject.

Methods:

plot(ax, **kwargs)

Plot Receiver position and orientation.

plot(ax, **kwargs)[source]#

Plot Receiver position and orientation.

Parameters:
  • ax (matplotlib.axes.Axes) – Axes to plot on.

  • **kwargs – Keyword arguments that are passed to matplotlib.pyplot.scatter().

class sparrowpy.sound_object.SoundObject(position: ndarray, view: ndarray, up: ndarray)[source]#

Bases: object

A class holding the common properties for Source and Receiver.

Methods:

plot(ax, **kwargs)

Plot SoundObject position and orientation.

Attributes:

plot(ax: Axes, **kwargs)[source]#

Plot SoundObject position and orientation.

Parameters:
  • ax (matplotlib.axes.Axes) – Axes to plot on.

  • **kwargs – Keyword arguments that are passed to matplotlib.pyplot.scatter().

position: ndarray#
up: ndarray#
view: ndarray#
class sparrowpy.sound_object.SoundSource(position: ndarray, view: ndarray, up: ndarray, directivity: _DirectivityMS = None, sound_power: float = 1)[source]#

Bases: SoundObject

Acoustic sound source inhered from SoundObject.

Attributes:

Methods:

plot(ax, **kwargs)

Plot Source position and orientation.

directivity: _DirectivityMS#
plot(ax, **kwargs)[source]#

Plot Source position and orientation.

Parameters:
  • ax (matplotlib.axes.Axes) – Axes to plot on.

  • **kwargs – Keyword arguments that are passed to matplotlib.pyplot.scatter().

position: ndarray#
sound_power: float#
up: ndarray#
view: ndarray#