PermMod:
Filter:
sc3-plugins/Classes (extension) | Undocumented classes | UGens > Undocumented | UGens > Unclassified

PermMod
ExtensionExtension

Sample permutation UGen.

Description

This UGen takes an audio-rate input and commutes chunks of samples, swapping the odd chunks and the even ones. To avoid bad behaviour, "freq" parameter must always be strictly > 0 and <= double the input samplerate. High frequencies lead to distortion and resonance, low frequencies lead to auto-arpeggio-like and repetition-like effects.

Class Methods

.ar

Arguments:

in

An audio-rate input.

freq

The frequency at which you wish the permutation to occur. For example, a 100Hz value applied on a 44100Hz input generates chunks of 441 samples. Since chunks must contain an integer number of samples, some frequencies yield the same result, because the chunk length is rounded.

mul

Output will be multiplied by this value.

add

This value will be added to the output.

Returns:

A commuted audio-rate output.

Examples

// Permute a simple sinusoid ten times its frequency: {PermMod.ar(SinOsc.ar(220),2200)}.play // Modulate both the sinusoid's and the permutation frequency with the mouse: {PermMod.ar(SinOsc.ar(MouseY.kr(0,440)), MouseX.kr(500, 8800))}.play // Distort any input with an Electronic Telephone Ring effect: {PermMod.ar(SoundIn.ar(0),Pulse.kr(10,0.5,1000,2000))}.play // Remember to use strictly positive unipolar signals as control, in this case the "add" parameter is 1000. // Quantized frequency-sweep-like effect on existing file: b = Buffer.read(s, 'C:/Folder/File.wav') {PermMod.ar(PlayBuf.ar(2, b),SinOsc.kr(0.1,0,2000,4000))}.play