Hallo, Hans-Christoph Steiner hat gesagt: // Hans-Christoph Steiner wrote:
Ah yes, [pwm~] is using zexy's [>~]. I was looking at [pwm]. That
example (I am looking at K01.pulse.width.mod.pd from 0.38.4) is very
simple, but as it is, it is not usable. Notice how the LOW and HIGH
change values. PWM needs be 0 for LOW and 1 for HIGH. That example
is usable in an audio context, since DC offset doesn't really
matter. I guess you could rely on the DAC in the soundcard to remove
the DC, but that is probably asking for trouble.
Well, the phasor-substraction is the classical analog synth pwm, where you can do pwm with substracting two sawtooth waves. It is limited because of the DC wandering, but it works quite okay for sound.
Attached is your patch where I replaced the zexy object with a crude waveshaper. I also replaced the phase-inlet with a frequency inlet, because I think, this is more useful to have than an inlet to reset the phase. Of course both inlets would be useful in the end.
Attached patch is more a proof of concept and not recommended for real use.
Frank Barknecht _ ______footils.org_ __goto10.org__