[PD] arduino melody example in PD?

altern altern2 at gmail.com
Sun Nov 8 19:22:25 CET 2009


> That sketch is playing a tune making square waves of different 
> frequencies. That's not really the same as PWM, which varies the length 
> of the pulse, but the frequency stays constant. There are a few ways to 
> generate a square wave of a given freq. in Pd, if that is your goal. If 
> you want to do it by modeling the Arduino's use of a timer to turn a 
> signal on and off, that might be an interesting exercise. One easier 
> way, though, would be to amplify and clip a sine wave.
> 
> [osc~ 440]
> |
> [*~ 50]
> |
> [clip~ -0.5 0.5]
> 
> then if you plug a 50 cent piezo buzzer into the sound card of your 
> $1000 laptop, it will sound just like a $3 avr!

hehe... thanks for your suggestion :)

enrike




More information about the Pd-list mailing list