Subject: Re: [linux-audio-dev] Subharmonic synthesizer, is there one?
From: Paul Winkler (pw_lists_AT_slinkp.com)
Date: Wed Jun 18 2003 - 15:54:41 EEST
On Wed, Jun 18, 2003 at 06:52:05PM +0300, Kimmo Sundqvist wrote:
> Hello
>
> I'd like to know if there is a subharmonic synthesizer for linux. That is a
> plugin which adds low frequency content to sound not by boosting, but by
> synthesizing frequency components that are below what the signal otherwise
> contains. I'm thinking about something like Delaydots Phat Pro.
>
> If there is no such thing, is anyone thinking about developing one?
I have an old csound instrument i wrote that does this, in a similar way
to the old analog "octave" pedals.
there are more sophisicated techniques, i guess involving analysis of the signal
and generating sine waves based on the analysis... but mine can be
quite useful. I would love it if somebody made a LADSPA plugin out
of this algorithm.
my basic technique was this:
steep lowpass filter (reduces the number of zero crossings)
count upward-going zero crossings in the sine wave.
if count % N == 1, set the output to 1.
if count % N == 0, set the output to -1.
N determines the frequency of the subharmonic. If N == 2,
you get an octave down. If N == 4, you get two octaves down.
You now have a square wave with no dynamics, whose fundamental frequency
is a subharmonic of the input signal. It has no dynamics, meaning it's
likely to produce horrible noise if the input is low with a non-zero noise
floor :) We'll fix that later.
Note that, like its analog counterparts, this algorithm gives somewhat
odd results when the input signal is complex, e.g. a dissonant chord.
Next, apply a steep lowpass filter on the output unless you like the
square wave :)
Now apply gain balancing so that the output volume tracks the input volume.
I don't know how you'd do that efficiently in C, i just used a csound
opcode that's provided for this purpose.
The csound instrument is attached, if that's useful...
--Paul Winkler http://www.slinkp.com Look! Up in the sky! It's OCTO BARON-MAN! (random hero from isometric.spaceninja.com)
This archive was generated by hypermail 2b28 : Wed Jun 18 2003 - 20:04:35 EEST