Pvelvet:
Filter:
ddwPatterns/Classes (extension) | Streams-Patterns-Events > Patterns > Repetition

Pvelvet
ExtensionExtension

Velvet noise pattern

Description

Velvet noise is defined as a series of single +/-1 impulses, separated by random amounts of silence.

Pvelvet outputs a single value from the source pattern; then, it gets the "length" of this segment (num) and fills out the segment with num-1 values from the zero pattern.

For true velvet noise, zero should simply be 0. In this implementation, it may be a pattern of changing values to intersperse.

Class Methods

.new

Create an instance.

Arguments:

pattern

The source pattern for the "impulses." The default is Prand([-1, 1], inf), corresponding to the classic definition of velvet noise.

num

The "duration" for the current impulse, measured as the number of output values (not clock time). Values will be clipped such that num >= 1.

zero

For each "impulse," num-1 values will be taken from the "zero" stream and embedded in the output. Thus the total number of events for an "impulse" will be exactly num.

Returns:

The instance.

Examples