<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">If the tone is the result of beating between the two PWM frequencies, then better filtering to remove the PWM clock will help.<div class=""><br class=""></div><div class="">I'm betting both of the individual synths use the PWM at such a high frequency that they probably don't bother with much filtering. You can't hear it anyway, so what's the problem?! That's fine until you do something like you've done, and then the problems begin.</div><div class=""><br class=""></div><div class="">I'd run the audio from each synth through a lowpass filter set for 20KHz before mixing them together, and see if that helps. If the frequencies are really high, a simple 2nd or 3rd pole filter would do it. A MFB filter is to be preferred in this situation for the better high frequency response - it continues to roll off, whereas a SK doesn't.</div><div class=""><br class=""></div><div class="">Here's a page with tools to design one for you - scroll down:</div><div class=""><br class=""></div><div class=""><a href="http://sim.okawa-denshi.jp/en/MultipleFB3Lowkeisan.htm" class="">http://sim.okawa-denshi.jp/en/MultipleFB3Lowkeisan.htm</a></div><div class=""><div class=""><br class="Apple-interchange-newline">
</div>
<div>HTH,</div><div>Tom</div><div><br class=""><blockquote type="cite" class=""><div class="">On 20 Jul 2023, at 15:49, Benjamin Tremblay via Synth-diy <<a href="mailto:synth-diy@synth-diy.org" class="">synth-diy@synth-diy.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="content-type" content="text/html; charset=utf-8" class=""><div style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class="">I had this idea I would use one of my dusty old DSP-G1 synth-on-a-chip modules as a mono synth engine for the shell of my Muppet Babies EP-10 keyboard.</div><div class="">I desoldered the original CPU chip and used an Arduino Mega Pro (the tiny one) to scan the matrix. I can get decent-ish synth sounds of the DSP synth.</div><div class=""><br class=""></div><div class="">Then I got ambitious. I added the Mozzi library and put in a sample player to play back the legacy Casio VL-style rhythm sounds (po, pi, sha). <br class="">Everything in theory works. I can run Mozzi at a decent rate, scan the keyboard, and control the DSP chip with TTL-level MIDI. I chose Mozzi HIFI mode and it does sound a little better. I don’t want it to sound too good, it’s a Casio.</div><div class=""><br class=""></div><div class="">However, I am getting a loud high frequency tone when I try to mix the outputs of Mozzi PWM and the DSP G1 PWM. I suppose this is a beat frequency. It is present when both devices are idle. </div><div class=""><br class=""></div><div class="">Adding oversized lowpass capacitors (47nF) to the inputs of my opamp take the squeal down, but it’s still there. Fading down either signal stops the squeal. </div><div class=""><br class=""></div><div class="">Is there anything I can do about this? Add individual buffers to both? Lower the gain on my opamp (I am using a 100K resistor in the loop and 15K mixer inputs capacitively coupled) ? The opamp is an LM324 running off the 5V supply, so I certainly can improve its power supply. </div><div class=""><br class=""></div><div class="">I am hoping I can get this combination to work and move onto refinement of the firmware. Otherwise I will just punt and use a Teensy. But that would be too easy.</div><div class=""><br class=""></div><div class="">The take-away from this seems to be, do not combine 2 different PWM audio sources running at 2 different clock speeds from 2 different MCUs. (Or don’t use PWM audio at all if you can avoid it!)</div><br class=""><div class="">
<div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div style="font-family: Helvetica; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-position: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div style="font-family: Helvetica; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-position: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div style="font-family: Helvetica; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-position: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div style="font-family: Helvetica; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-position: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class="">Benjamin Tremblay</div><div class=""><a href="mailto:btremblay@me.com" class="">btremblay@me.com</a></div><div class="">Carlisle, MA</div><div class=""><br class=""></div><div class=""><br class=""></div></div></div><br class="Apple-interchange-newline"></div><br class="Apple-interchange-newline"></div><br class="Apple-interchange-newline"></div><br class="Apple-interchange-newline"></div><br class="Apple-interchange-newline"><br class="Apple-interchange-newline">
</div>
<br class=""></div>_______________________________________________<br class="">Synth-diy mailing list<br class=""><a href="mailto:Synth-diy@synth-diy.org" class="">Synth-diy@synth-diy.org</a><br class="">http://synth-diy.org/mailman/listinfo/synth-diy<br class="">Selling or trading? Use marketplace@synth-diy.org<br class=""></div></blockquote></div><br class=""></div></body></html>