Totally random, but when I finish this analog lofi matrix dsp, it will be called ‘lofnck.’

So some more mathematics, some more fun parameters, and some fun shiiit.

Another way that you can crunchy down a signal is by lowering its firing rate. That sort of thing acts like a wild form of a low-pass filter, or, as they say in the hood, a pretty gangsta’ LP filter.

Basically, we want to dirty down the signal by downsampling it. There’s a natural tendency for sound to move down to lower tones when they’re downsampled enough (that is, its Nyquist frequency goes down and square-like distortion is introduced).

Recall that I modeled discrete signals with a continuous map f:\mathbb{Z} \rightarrow [-1, 1]. Let’s simplify notation a bit and just look at pairs (x, f(x)) \in \mathbb{Z} \times [-1,1]. I believe that the set of these functions, or the function space, is a Banach space (but thankfully, this consideration is far off as I’m not making a synth here, but a stable audio processing unit). Also, I believe there should be a smooth lifting of these functions into \mathbb{R} \rightarrow [-1,1] (which I will use to model analog signals).

The function space is already a Lebesgue space under the measure \mu(X) = |X|. We can define a Lebesgue integral over it (or we can even go ahead and use the stronger example of sequence spaces, since the difference between N and Z in this application is not really important).

An example of a discrete linear approximation of the analog sound I want would be to simply take our DSP to be a map

(x, f(x)) \mapsto (x, (1/|A|)\sum_A f(x)) where A is a partition element of a nice partition of Z containing x.

but the issue with this map is that it’s naive and probably loses a lot of audio quality (God is in the details, as the old folks would say). There are a couple of details about its use as well:

1) In general, you can’t say if the digital signal is convergent, so you can’t guarantee that things would work out because input ‘niceness’ is something you can’t control. On the other hand, most audio signals people will use with this utility will be at the very least reasonable in that sense, being of finite time length and whatnot. So uh, it will work out, basically.

2) It will cost more to do it the nicer way. But CPUs are pretty powerful nowadays, and having quality shit is good even if it runs your CPU a bit hot.

3) Reasonably well mixed audio signals intended for music are going to be pretty super-nice anyways.

4) The parameter is discrete. Let’s make it more analogy.

So we may decide to anti-alias the downsampling and make it go all smoother and gooeyer all analog-like and shit. The signal we have corresponds with a simple function in the standard Lebesgue space on R. This simple function approximates some smooth functions, since simple functions are dense in the space of smooth functions. We want to find such a weak smooth function which can be approximated well using as little CPU as possible.

One thing we may do with such a lifting is to give nicely anti-aliased sound given a real number parameter for the width of the R-partition (or, in this case, it would be floats or doubles in application). So first we operate on the smooth lifting in this way:

(f:\mathbb{R} \rightarrow [-1, 1]) \mapsto (x \mapsto (1/\mu(A)) \int_A f d\mu) where x \in A a \phi-partition element of \mathbb{R}, and \phi is our partition length (which thus induces a downsampling of the analog signal model)

We also want modulated partition lengths to preserve audio stability. As I recall from an analysis class, subsets of \mathbb{R} of the form [a, b) are an important subcollection of Lebesgue-measurable sets in (\mathbb{R}, M, \mu). We may also partition \mathbb{R} with sets of this form and have a map from \mathbb{Z} into such a partition given by \chi: n \mapsto [a, b), \quad a \leq n < b.

So our audio processor is straight up like this: for (x, f(x)) \in [-1, 1]^\mathbb{Z}, \quad (x, f(x)) \mapsto (x, \frac{1}{\mu(A)} \int_A f d\mu) where A = \chi(x)

We get anti-aliasing and stability for free by how sets of the form [a, b) can build a disjoint partition of R.

The little bit missing from this picture is the smooth lifting. I’ll need some time to think on that one. There may be better ways of directly approximating this whole process that would take CPU use down several notches.

Postscript: I actually don’t know anything about audio engineering. 😉 I suppose I will have to let the plugin itself speak for the various ideas being thrown about here

Post-postscript: I got my VST developing environment set up! Experimentation is forthcoming. Watch this blog for free audio plugins, hehe.

edit: I think that what I really want to do is to find a series of polynomials which converge rapidly to the map mentioned above, as polynomials are both analytic and awesome.

edit2: Taylor series should totally work for this shit.

edit3: http://en.wikipedia.org/wiki/Polynomial_interpolation is the way to victory.

edit4: No, no, wait, it’s splines. Blergh.

Advertisements