Archive of the former Yahoo!Groups mailing list: MOTM

previous by date index next by date
previous in topic topic list next in topic

Subject: Re: pulse width...

From: "strohs56k" <strohs@...>
Date: 2003-03-06

--- In motm@yahoogroups.com, "Paul Schreiber" wrote:
> > In motm@yahoogroups.com, "drg3orge" wrote:
> >
> > is there a way to manipulate the duty cycle {for lack o' a
> > better term} of ∗any∗ audio signal??? CD, guitar, wife's flute,
> > etc?
>
> No, you can't and preserve the original waveshape. However, you can
> run audio into a comparator chip (LM311, used on the MOTM-120) with
> a variable reference on the other input and get a "PWM'd", 100%
> distorted version of the output. Would sound like the input,
> through a fuzz box, underwater.


Actually, pseudo-mathematically speaking, you can do something a
little bit like this by raising the signal to a power (makes it
"spiky" or roughly equivalent to narrowing the pulse width) or by
taking a root of the signal (makes it "broad" or roughly equivalent to
widening the pulse width.) The original waveform is somewhat
preserved in this operation. (A simple example - start with a sine
wave. As you increase the power, the peaks of the sine wave start to
look like bell curves. With a really high power, the peaks of the
sine wave turn into narrow pulses. Conversely, taking a small root
broadens the peaks where a very large root basically turns a sine wave
into a square wave.)

The reason I say pseudo-mathematically is because, normally, raising
to even powers results in only positive going output (rectification)
and taking the root of a negative number results in an imaginary
result. For our signal processing purposes, we can just doctor the
math to always work for us, like this:

Out = (sgn(In)) ∗ (|In| ^ n)

Where "n" is the power or root, "sgn" extracts the sign (positive or
negative) of the waveform, and the vertical pipes are absolute value
(make the value always positive)

If you force the input to peak at, or just under, +/- 1 unit, the
output will also peak at +/- 1 unit. And I think you want to be
pretty close to the full range else most of the waveform will get
squashed in the power operations.


I don't know if you have a particular sound in mind, and I have no
idea if doing the above to an arbitrary waveform would sound
interesting, but it is probably about as close as you can come to
varying the "duty cycle" of an arbitrary waveform.


Probably the closest to doing this in the analog domain is the soon to
be available MOTM wave warper module as it does powers and roots -
though not in the extreme. Probably you could cascade two of these
modules to experiment with larger powers or roots. (I already have
one of these on order! :)

The power/root is not CV controlled on the wave warper. So if one day
there should be a MOTM "user programmable DSP module" - this might be
something fun to tinker with.


Seth