...noise space for Batuhan BozkurtSubscribe to my feed!
BatUGens

This is the initial release of my UGens. Any comments and suggestions are welcome.
Sources, mac universal binary and documentation: batugens.zip

Included UGens and descriptions/docs:

Coyote
(an amplitude tracking based onset detector)

Coyote.kr(in, trackFall, slowLag, fastLag, fastMul, thresh, minDur)

Coyote is an onset detector which tries to find onset attacks in a signal without using FFT processing. It tracks the amplitude changes in the incoming signal and sends a trigger when an onset is found. To get the best tracking for a particular signal by tweaking the arguments, one needs to understand how the onset detection works inside the UGen:

Coyote compares three different analysis results in parallel and tries to report an onset event in the signal. The first phase is amplitude tracking. The trackFall argument is the 60dB convergence time of the decaying signal(the attack time is constant: 0.001, the process is the same with the Amplitude UGen, trackFall is the releaseTime). The output of this tracking is divided to 3 inputs inside. The first two are smoothers(lowpass filters) with different lag times. slowLag is the lag time of the slow smoother, and the fastLag is the lag time of the fast one. The fast smoother is multiplied by a value(fastMul argument) which should be between 0 and 0.9 so its output is always below the slow smoother, except in onsets. So when an onset occurs, the fast smoother output rises quicker than the slow smoother, and when the fast one exceeds the slower at an instant(occurs only at onsets), a trigger is sent to the output from the UGen. For the next trigger to happen, a specified time should pass which is defined by the minDur parameter. So minDur defines the minimum time between events/triggers.

This approach is extremely fast in response(compared to FFT based detectors) when detecting onsets and works well on most contexts(guitar, percussion, etc...). But it has a drawback when there are sustaining sounds present from the same instrument at the moment of an onset, so there is a third unit inside that averages the input beginning from the last trigger whose output is also smoothed by a smoother(lag time is also set to slowLag) and it too is compared with the output of fast smoother to make the tracking work better when there are sustaining sounds present at the moment of an onset.

The default values are a good starting point and works well on many contexts.

MarkovSynth
(First order Markov Chain implementation for audio signals)

MarkovSynth.ar(in, isRecording, waitTime, tableSize)

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.

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.

TrigAvg
(triggered signal averager)

TrigAvg.kr(in, trig)

Averages the absolute values of its input between triggers.

WAmp
(windowed amplitude follower)

WAmp.kr(in, winSize)

Averages and outputs the absolute value of incoming signals received between now and (now - winSize) seconds.