cutcutcodec.core.filter.audio.delay.FilterAudioDelay

class cutcutcodec.core.filter.audio.delay.FilterAudioDelay(in_streams: Iterable[Stream], delay: Real)[source]

Change the beginning time of a stream.

Attributes

delayFraction

The delay append to the original beginning time of the stream (readonly). a positive value indicates that the output flow is later than the input flow.

Examples

>>> from cutcutcodec.core.filter.audio.delay import FilterAudioDelay
>>> from cutcutcodec.core.generation.audio.noise import GeneratorAudioNoise
>>>
>>> (s_base_audio,) = GeneratorAudioNoise(0).out_streams
>>> (s_trans_audio,) = FilterAudioDelay([s_base_audio], 10).out_streams
>>>
>>> (s_base_audio.snapshot(0) == s_trans_audio.snapshot(10)).all()
tensor(True)
>>> (s_base_audio.snapshot(10) == s_trans_audio.snapshot(10)).all()
tensor(False)
>>>

Initialise and create the class.

Parameters

in_streamstyping.Iterable[Stream]

Transmitted to cutcutcodec.core.classes.filter.Filter.

delaynumbers.Real

The temporal translation value to apply at the output audio stream.

classmethod default()[source]

Provide a minimalist example of an instance of this node.

property delay: Fraction

Return the delay append to the original beginning time of the stream.