| |
- quasimoto.wave.mixins.FormatMixin(vcorelib.logging.LoggerMixin)
-
- quasimoto.wave.reader.WaveReader
- quasimoto.wave.writer.WaveWriter
class WaveReader(quasimoto.wave.mixins.FormatMixin) |
|
WaveReader(riff: quasimoto.riff.RiffInterface) -> None
A class for reading and writing WAVE files. |
|
- Method resolution order:
- WaveReader
- quasimoto.wave.mixins.FormatMixin
- vcorelib.logging.LoggerMixin
- builtins.object
Methods defined here:
- __init__(self, riff: quasimoto.riff.RiffInterface) -> None
- Initialize this instance.
Static methods defined here:
- from_path(path: pathlib.Path) -> Iterator[ForwardRef('WaveReader')]
- Get a WAVE reader from a path.
Readonly properties defined here:
- duration_s
- Get the duration in seconds of this data.
- duration_str
- Get this data's duration as a human-readable string.
- num_samples
- Get the number of samples contained.
- samples
- Get raw samples as a generator.
Data and other attributes defined here:
- __annotations__ = {}
Methods inherited from quasimoto.wave.mixins.FormatMixin:
- validate_header(self, header: runtimepy.codec.protocol.Protocol) -> None
- Validate the 'fmt ' chunk data.
Readonly properties inherited from quasimoto.wave.mixins.FormatMixin:
- channels
- Get the number of channels in this stream.
- sample_bits
- Get the number of bits per sample.
- sample_bytes
- Get the number of bytes per sample.
- sample_period
- Get the sample period for this data.
- sample_rate
- Get the sample rate.
Data and other attributes inherited from quasimoto.wave.mixins.FormatMixin:
- byte_order = <ByteOrder.LITTLE_ENDIAN: 2>
Methods inherited from vcorelib.logging.LoggerMixin:
- log_time(self, message: str, *args, level: int = 20, reminder: bool = False, **kwargs) -> Iterator[NoneType]
- A simple wrapper.
Data descriptors inherited from vcorelib.logging.LoggerMixin:
- __dict__
- dictionary for instance variables
- __weakref__
- list of weak references to the object
|
class WaveWriter(quasimoto.wave.mixins.FormatMixin) |
|
WaveWriter(riff: quasimoto.riff.RiffInterface, num_channels: int = 2, sample_rate: int = 44100, bits_per_sample: int = 16) -> None
A class for reading and writing WAVE files. |
|
- Method resolution order:
- WaveWriter
- quasimoto.wave.mixins.FormatMixin
- vcorelib.logging.LoggerMixin
- builtins.object
Methods defined here:
- __init__(self, riff: quasimoto.riff.RiffInterface, num_channels: int = 2, sample_rate: int = 44100, bits_per_sample: int = 16) -> None
- Initialize this instance.
- write(self, samples: Iterable[tuple[int, ...]]) -> None
- Write samples to the output.
Class methods defined here:
- to_bytes(value: int) -> bytes from builtins.type
- Convert a sample value to bytes.
- to_stream(stream: <class 'BinaryIO'>, value: int) -> int from builtins.type
- Write a value to a stream.
Static methods defined here:
- from_path(path: pathlib.Path, **kwargs) -> Iterator[ForwardRef('WaveWriter')]
- Get a WAVE reader from a path.
Data and other attributes defined here:
- __annotations__ = {}
Methods inherited from quasimoto.wave.mixins.FormatMixin:
- validate_header(self, header: runtimepy.codec.protocol.Protocol) -> None
- Validate the 'fmt ' chunk data.
Readonly properties inherited from quasimoto.wave.mixins.FormatMixin:
- channels
- Get the number of channels in this stream.
- sample_bits
- Get the number of bits per sample.
- sample_bytes
- Get the number of bytes per sample.
- sample_period
- Get the sample period for this data.
- sample_rate
- Get the sample rate.
Data and other attributes inherited from quasimoto.wave.mixins.FormatMixin:
- byte_order = <ByteOrder.LITTLE_ENDIAN: 2>
Methods inherited from vcorelib.logging.LoggerMixin:
- log_time(self, message: str, *args, level: int = 20, reminder: bool = False, **kwargs) -> Iterator[NoneType]
- A simple wrapper.
Data descriptors inherited from vcorelib.logging.LoggerMixin:
- __dict__
- dictionary for instance variables
- __weakref__
- list of weak references to the object
| |