Hans-Christoph Steiner wrote:
I just realized the answer to my question about getting positive-only
voltages from the sound card. The DC filters will probably remove the DC offset, therefore, the output voltage on a PWM signal will also be centered again on 0, and therefore swing from negative to positive. I do remember getting some very low frequencies out of a computer when testing speakers. But I haven't actually tested this [pwm~] object for electronics. But it would be nice to have a very well implemented [pwm~], so its great that this discussion happened.I did use the [pwm] object with a MIDI-controlled relay box, worked
quite well at 30-60Hz on a biggish DC motor.
But that sounds like you're sending MIDI messages at a rate determined by the [pwm], so bandwidth is limited by MIDI to ~1kHz. Better to program your relay box to do pwm with the pulse width controlled by MIDI, instead of using MIDI just to turn the motor on and off.
Martin