MarkovSynth:
Filter:
Classes (extension) | UGens > Generators > Stochastic

MarkovSynth : UGen : AbstractFunction : Object
ExtensionExtension

First order Markov Chain implementation for audio signals
Source: BatUGens.sc

Description

MarkovSynth populates a sample to sample transition probability table with its signal input. Each possible sample value in an 16bit signal has its own transition probability table whose size is defined by the "tableSize" argument at creation time. It waits and populates the table for "waitTime" seconds and then starts synthesizing audio by continuously outputting a random value selected from the probability table of the last synthesized sample. Once the end of table is reached for a single sample, its index wraps back to zero and populating continues in this fashion as long as "isRecording" argument is non-zero. The character of the input is mainly defined by the way its input signal changes. So input signals showing little difference in amplitude and periodicity has a similar quality in output. The output becomes less dynamic.

If the tableSize is 1, the output is usually a reflection of the input. tableSize of 2 makes some funny blips and blops. When tableSize goes higher, older and older transition values are taken into account and the output changes accordingly. You should be careful with the tableSize as it allocates all the memory for the tables beforehand so it may cause troubles.

NOTE: You may want to use LeakDC on its output as the output is offset agnostic, it just selects a past-recorded transition value at random.

Class Methods

MarkovSynth.ar(in: 0.0, isRecording: 1, waitTime: 2, tableSize: 10)

Arguments:

in

Signal input. Should be a signal between -1 and 1. Higher and lower values are clipped and inserted into table as that.

isRecording

if non-zero, MarkovSynth populates the internal table with its signal input.

waitTime

Defines the wait time of the UGen to start synthesizing the table, in seconds.

tableSize

The probability table size for each sample. High values are memory hungry! (Default: 10 samples)

Inherited class methods

Instance Methods

Inherited instance methods

Examples