Yahoo Groups archive

MOTM

Index last updated: 2026-04-28 23:35 UTC

Thread

pulse width...

pulse width...

2003-03-06 by drg3orge

h3y all,
  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?  was 
thinkin' 'bout static waveforms an'timbre/pulse width modulation 
while doin' the dishes an' had never considered the possibility about 
tweakin' the duration of the 2 halves of a waveform.
  does this make any sense?  is it a stupid thought with no answer?  
is it possible to achieve??
thanks,
doc

Re: [motm] pulse width...

2003-03-06 by Paul Schreiber

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.

Paul S.

----- Original Message -----
Show quoted textHide quoted text
From: "drg3orge" <doc@...>
To: <motm@yahoogroups.com>
Sent: Wednesday, March 05, 2003 8:36 PM
Subject: [motm] pulse width...


> h3y all,
>   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?  was
> thinkin' 'bout static waveforms an'timbre/pulse width modulation
> while doin' the dishes an' had never considered the possibility about
> tweakin' the duration of the 2 halves of a waveform.
>   does this make any sense?  is it a stupid thought with no answer?
> is it possible to achieve??
> thanks,
> doc
>
>
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>

Re: pulse width...

2003-03-06 by strohs56k

--- 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

Re: pulse width...

2003-03-06 by strohs56k

For the benefit of those who were thinking "ick - the M word"  I was 
inspired enough to fire up PowerMac the Graphing Calculator and have 
attempted to illustrate visually.  In each of these images, the 
original wave is in the center and going up from the center you see 
the square root (0.5 power) and forth root (0.25 power) - going down 
from center you have 2nd power and 5th power.


The first image is a basic Sine wave:

http://www.eskimo.com/~strohs/Sin.gif


The second image is a sawtooth (or rather, a ramp)

http://www.eskimo.com/~strohs/Saw.gif


The last image is just some arbitrary thing:

http://www.eskimo.com/~strohs/Arb.gif


So, as you see, roots broaden/flatten out the wave shape where powers 
narrow it.



--- In motm@yahoogroups.com, "strohs56k" <strohs@e...> wrote:
Show quoted textHide quoted text
> --- 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. [...]

Re: [motm] pulse width...

2003-03-06 by jhaible

Strictly speaking, PWM only makes sense if the signal is a pulse
wave.

But in Physical Modelling, there's something I cannot help but describe
as "PWM of an arbitrary signal", because it *sound* just like that:
In PM, you have a Resonator (string, air column etc.) modeled by
complex delay line + filter combination.
If you choose a string, for example, you can "pick" that string at
different locations along its length.
The SX WSA-1 synthesizer can modulate this location with
an LFO, and this really sounds like "PWM of a non-pulse signal".
(that's a great feature the WSA-1 has over the Yamaha VL line.
This and polyphony. Other than that, the VL's are better.)

Back to analogue: With the Interpolating Scanner you can set
up a polygon waveform and modulate this back and forth.
This can also sound like PWM on a non-pulse signal.

JH.



-----Urspr\ufffdngliche Nachricht-----
Von: drg3orge <doc@...>
An: <motm@yahoogroups.com>
Gesendet: Donnerstag, 6. M\ufffdrz 2003 03:36
Betreff: [motm] pulse width...
Show quoted textHide quoted text
> h3y all,
>   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?  was
> thinkin' 'bout static waveforms an'timbre/pulse width modulation
> while doin' the dishes an' had never considered the possibility about
> tweakin' the duration of the 2 halves of a waveform.
>   does this make any sense?  is it a stupid thought with no answer?
> is it possible to achieve??
> thanks,
> doc
>
>
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>

Re: [motm] pulse width...

2003-03-06 by J. Larry Hendry

There is a way to produce a wave that seems to me to be similar sounding to
PWM but actually using other VCO waves.  I learned this trick from Ken
Elhardt.  Essentially you use two waves from the same VCO.  Wave # 1 is the
audio source and goes to a VCA.  Wave # 2 is your shaping wave and is used
to control then gain of the VCA.  Varying the gain of the control wave
shapes the audio wave at the output of the VCA. Use an LFO wave mixed into
to the VCA control with the audio wave so that you do not simply produce a
static, but re-shaped wave.

Here is some examples on the o-scope with sound.  Sure it in not PWM.  But,
close your eyes and listen to it and see if it has a PWM effect.  To produce
this effect on an external monophonic signal, I would suppose one would need
a pitch to CV circuit to drive the VCO to be in sync with the incoming wave
and use the original signal into a VCA with the VCA as the CV.  I am
thinking there might be some glitching while the pitch to CV found it's
mark. It might be interesting to try.

Anyhow, here are some little mpg files that shows this effect using the VCA
for waveshaping with the CV being controlled by the VCA itself and an LFO.

External audio timbre modulation really = 410 VCF :)

Larry

http://www.wiseguysynth.com/larry/misc/Mov01.mpg
http://www.wiseguysynth.com/larry/misc/Mov02.mpg
http://www.wiseguysynth.com/larry/misc/Mov03.mpg


--------- original message
Show quoted textHide quoted text
From: drg3orge <doc@...>
 h3y all,
  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?  was
thinkin' 'bout static waveforms an'timbre/pulse width modulation
while doin' the dishes an' had never considered the possibility about
tweakin' the duration of the 2 halves of a waveform.
 does this make any sense?  is it a stupid thought with no answer?
is it possible to achieve??
thanks,
doc

Re: [motm] pulse width...

2003-03-06 by Tentochi

It sounds like Doc has been inspired by Gordon Reid's
Synth Secrets column.  If not, check out the March
2003 (and Feb.) issue of Sound on Sound.  Lots of
background on PWM.

Doc spawned some ideas....

If you take a sample into the digi@l realm, you could
take every wave and either widen it or narrow it.  Now
exactly how you do that is up for debate. 
Mathematically there are several possibilities.  To do
this in really time there would need to be a slight
delay so that one or two waves have been processed
before spweing out the massaged data.

The other idea is to expand and contract everything
locally.  This would essentially be a pitch shifter
being modulated by something like an LFO.  Running the
LFO into the audio range might have some nice
artifacts as a result.

If these are done digit@lly, this is a time when it
might be nice to have 24/96 available....

Cheers!
Shemp

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.