Periodicity Block Calculator
This is a simple iPhone application which calculates 5-limit Fokker periodicity blocks. The user sets a comma tolerance, which determines the threshold of unison vector acceptance, and search limits for each dimension. The application then constructs a harmonic lattice in memory, searches for periodicity blocks, and returns the block with least-ratio unison vectors in coordinate form.



The harmonicLattice class @implementation code: harmonicLattice.m
More on periodicity blocks here.
Beat Detector
Here is some code for a beat detection algorithm based on this paper: beatDetector.m
More on this and examples very soon.
The ‘Noise’ and ‘Anything’ Transforms
Although the beloved Fourier transform is absolutely central to signal processing and extremely useful in all of its incarnations, there are plenty of different sorts of transforms – check out the Weierstrass and chirplet transforms, for instance. In a discrete domain, there are some simple rules to govern which sets of vectors can form a transform matrix. It’s simple: the matrix (let’s call it T) has to be invertible – that is, it’s a square (n by n) matrix where Ax = 0 has only the trivial solution – that is, T has n pivot points – that is, the columns of T are linearly independent – that is, the columns of A span the set of reals in which they exist – that is, it abides by all the equivalent statements in the invertible matrix theorem. Any set of basis vectors constitute a transform matrix! The question really is, is the transform useful? The Fourier transform, for instance, is remarkable because it transforms a signal in terms of the fundamental units of frequency – sinusoids. This makes the transform a powerful analysis and synthesis tool. Which other kinds of transforms can yield awesome results?
The Noise Transform
This technique uses the Gram-Schmidt process to generate an orthonormal basis set from pseudo-randomly generated vectors. This effectively transforms the signal into bursts of slightly different-colored noise. I’ve been experimenting with this, and most manipulations and inverse transformations of the signal in noise-domain result in the original signal plus… noise. The transform is most interesting when only a few of the elements of the noise-domain signal are inverse transformed back to the time domain. Since the basis vectors are broadband signals, the original signal sounds virtually undistorted when only a small portion of the noise-domain signal is transformed. This makes for an interesting effect where the original signal is present, but with an accompanying series of overlapping noise bursts, which follow the general contour of the original signal. Lo-fi.
Here’s some code that generates the noise-transform matrix, transforms an input signal to noise-domain, and inverse-transforms it (warning: this script takes about 45 minutes to process a 15-second 44.1k input on my computer): RandTransform.m
A sound example when applied to the method of granular synthesis below: randex
A Method of Additive Granular Synthesis
The paper
This is a method of granular synthesis that uses only sinusoidal grains to reconstruct or (more often) tear apart an input signal. The algorithm works by chunking the input signal into hamming windows with user-defined overlap, taking FFTs of the windows, and then reconstructing the signal using sinusoidal grains of varying amplitude and length. Although the algorithm can be quite expensive depending on the grain density, window size and such, most frequency-domain operations (such as pitch shifting) can be done at virtually no extra computational cost. This could make for a cool real-time synth with many possible user manipulations. Here are some sounds I’ve made:
These are most awesome over headphones or on a system with good stereo imaging.
Input = Tom’s Diner – Suzanne Vega
1
2
3
4
5
Input = Double Violin Concerto in D minor, Largo – J.S. Bach
1
2
3
Input = 15 Step – Radiohead
1
2
Here is the code for the basis of the algorithm – gransynth_basis.m
ModCFS
The modular chorus-flanger-spreader is a plugin I wrote in C++ for Will Pirkle‘s DSPKit environment.

The idea here is that the user can implement a chorus or flanger without the limits that commercial plugins typically impose. In stereo mode, each channel has four simple modulator waveforms to choose from: sine, square, triangle and sawtooth. The depth, rate and phase of each can be altered independently, yeilding a wide array of mostly-crazy sounds. By selecting appropriate delay, blend, feedforward, feedback, waveforms, depths and rates, this plugin has the capability of sounding like a conventional chorus or flanger. The RANDOM! function changes all of the inputs to values as random as rand() allows, while retaining the user’s previous inputs for when the function is switched off. The stereo spreader has second order low pass filters in each cross path to avoid a screechy timbre as the spread increases. The plugin uses an implementation for the Lagrange method of polynomial interpolation for the moment, but I will revert to linear interpolation if the plugin is ever used for real time processing.
LCRDelay
LCRDelay is another plugin I wrote for the same environment. There are three separate delay lines: left, center and right. The center delay has a feedback path with high and low pass filters, which are variable by cutoff frequency. Each line can be toggled between delay in milliseconds or delay according to BPM and division of that tempo (quarter notes through sextuplets) independently. WaCkY OvErIde performs a Reich-ish phasing effect, varying the delay time continuously throughout a delay window at a specific rate, each chosen by the user.

.