Base64Sound
December 22, 2023 ยท View on GitHub
from tdw.physics_audio.base64_sound import Base64Sound
This class is used only in PyImpact, which has been deprecated. See: Clatter.
A sound encoded as a base64 string.
Fields
-
bytesByte data of the sound. -
wav_strA base64 string of the sound. Send this to the build. -
lengthThe length of the byte array.
Functions
__init__
Base64Sound(snd)
| Parameter | Type | Default | Description |
|---|---|---|---|
| snd | np.ndarray | The sound byte array. |
write
self.write(path)
Write audio to disk.
| Parameter | Type | Default | Description |
|---|---|---|---|
| path | PATH | The path to the .wav file. |