psychos.sound.Sawtooth#
- class psychos.sound.Sawtooth(duration: float, frequency: int = 440, sample_rate: int = 44800, envelope: Envelope | None = None)[source]#
Bases:
SoundMixin,SawtoothSawtooth wave generator.
This class is a subclass of pyglet.media.synthesis.Sawtooth.
- Parameters:
- __init__(duration: float, frequency: int = 440, sample_rate: int = 44800, envelope: Envelope | None = None)[source]#
Create a Sawtooth waveform.
Methods
__init__(duration[, frequency, sample_rate, ...])Create a Sawtooth waveform.
get_animation()Import all video frames into memory.
get_audio_data(num_bytes[, compensation_time])Return
num_bytesbytes of audio data.get_next_video_frame()Get the next video frame.
get_next_video_timestamp()Get the timestamp of the next video frame.
get_queue_source()Return the
Sourceto be used as the queue source for a player.is_precise()bool: Whether this source is considered precise.
play([block])Play the sound.
save(filename[, file, encoder])Save this Source to a file.
seek(timestamp)Seek to given timestamp.
Attributes
audio_formatdurationThe length of the source, in seconds.
infois_player_sourcevideo_format