earwax.ambiance module¶
Provides the Ambiance class.
-
class
earwax.ambiance.Ambiance(protocol: str, path: str, coordinates: earwax.point.Point)¶ Bases:
objectA class that represents a positioned sound on a map.
If you want to know more about the
streamandpathattributes, see the documentation forsynthizer.StreamingGenerator.Variables: - protocol – The
protocolargument to pass tosynthizer.StreamingGenerator``. - path – The
pathargument to pass tosynthizer.StreamingGenerator. - coordinates – The coordinates of this ambiance.
- sound –
The playing sound.
This value is initialised as part of the
play()method.
-
classmethod
from_path(path: pathlib.Path, coordinates: earwax.point.Point) → earwax.ambiance.Ambiance¶ Return a new instance from a path.
Parameters: - path –
The path to build the ambiance from.
If this value is a directory, then a random file will be chosen.
- coordinates – The coordinates of this ambiance.
- path –
-
play(sound_manager: earwax.sound.SoundManager, **kwargs) → None¶ Load and position the sound.
Parameters: - sound_manager – The sound manager which will be used to play this ambiance.
- kwargs – The additional keyword arguments to pass to
play_path().
-
stop() → None¶ Stop this ambiance from playing.
- protocol – The