Smoothing PWM to interface with SX-150

I’ve been looking all over for a topic that covers this, and I apologize if I missed it.

The Japanese publisher Gakken put out a cheap synthesizer kit last year called the SX-150. It has a voltage-driven external source jack. A few weeks ago, they also came out with the Japanino, which is pretty much just the Arduino with a name change. One of the suggested interface circuits mentioned in the book that comes with the kit is to take a 0.0047uf / 22K ohm RC circuit to smooth out the D9 PWM signal to drive the SX-150 via the stylus (ref to the ground point of the ext. source jack). Problem is that there’s still a nasty square ware component in the signal that comes through the SX-150. I found mention of a 10uf / 5 K RC smoothing circuit that not only still has some of the square wave but it rounds off the leading edge of the sound envelop to force an unwanted attack slope.

If you know what I’m talking about, and know of some way to get the same effect of using the stylus on the resistive strip when as feeding the Arduino’s PMW “analog” signal to the SX-150 stylus, I’d appreciate the help. Thanks.

I’m enclosing the associated links here. Please ignore the part about the touch screen, I’m not using it.

http://otonanokagaku.net/japanino/
http://otonanokagaku.net/japanino/works/touch_synthe.html

An R&C will only give you a second order filter. To remove more of the higher frequncy component without affecting the atack then you have to move to a higher order filter, maybe a 6th order filter. Google active filters.