I haven't played with pd very much, so I'm only scratching the surface here, but I assembled a little instrument that responds to the ambient light in the room by altering the pitch of a sine wave oscillator. Of course, I couldn't see fit to leave well enough alone, so I added a bit of FM synthesis (based on the pd tutorials), whose parameters are also controlled by the ambient light, so this is sort of a twisted theremin.
I can't figure out how to record the audio output of pd (in the 30 minutes I spent trying to figure it out), so there's no recording of this experiment. The circuit is very simple - a voltage divider to measure the voltage drop across a photoresistor, connected to analog input 0 on the Arduino. Here's a screen capture of the pd patch.

I got a little tricky where the sampled output of the photoresistor feeds the oscillator input frequency, but also feeds the amplitude and frequency of the FM component of the sound (for more information on FM synthesis, see the "A09.frequency.mod.pd" section of the PD help files. It sounds like a theremin with a "send-back-to-factory" problem.
No comments:
Post a Comment