<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div>On Dec 10, 2024, at 1:00 PM, Mattias Rickardsson <mr@analogue.org> wrote:</div><div><blockquote type="cite"><br class="Apple-interchange-newline"><div><div dir="auto"><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">Donald Tillman <<a href="mailto:don@till.com" target="_blank" rel="noreferrer">don@till.com</a>> skrev:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="line-break:after-white-space"><div>Mattias Rickardsson <<a href="mailto:mr@analogue.org" rel="noreferrer noreferrer" target="_blank">mr@analogue.org</a>> wrote:</div><div><blockquote type="cite"><div><div dir="auto"><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Donald Tillman <<a href="mailto:don@till.com" rel="noreferrer noreferrer" target="_blank">don@till.com</a>> skrev:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="line-break:after-white-space"><div>Note that a sawtooth ramping down has all the harmonics in phase with the fundamental.</div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Yes.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="line-break:after-white-space"><div>And a sawtooth ramping up has its harmonics alternating in phase (+1, -1/2, +1/3, -1/4,...) from the fundamental.</div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">But are you counting from the midpoint now? Surely they must still be in phase if you just flip the sawtooth backwards around its discontinuity?</div></div></div></blockquote><div><br></div>(I had to think about this...)</div><div><br></div><div>Good point! When you play it backwards the even harmonics reverse polarity but the odd harmonics don't. So yeah, it's consistent that way.</div></div></blockquote></div><div dir="auto"><br></div><div dir="auto">Not sure how you mean now, but... :-)</div></div></div></blockquote><div><br></div><div>Yeah, I goofed... I guess I meant to say that when you flip it backwards the sine components reverse polarity but the cosines don't.</div><div><br></div><div>(Sheeshe, you'd think I'd get that right after all those records I played backwards back in the day. So yeah, if you play a sawtooth wave backwards you hear a secret message.)</div><div><br></div><div>And if you were mixing it with a square wave, the square wave would also reverse polarity going backwards.</div><div><br></div><div>---</div><div><br></div><div>So, the traditional slope-up sawtooth that steps down at t=0 is:</div><div><br></div><div> saw = -sin(t) - (1/2)sin(2t) - (1/3)sin(3t) - (1/4)sin(4t) -...</div><div><br></div><div>Which is problematic when you want to mix it with another wave because the fundamental is out of phase. </div><div><br></div><div>You can shift it over so that it steps down halfway through, but then you have alternating harmonic polarities:</div><div><br></div><div> saw = sin(t) - (1/2)sin(2t) + (1/3)sin(3t) - (1/4)sin(4t) +...</div><div><br></div><div>My choice, because I care about phases, is a slope-down sawtooth that steps up at t=0, and that's completely in phase:</div><div><br></div><div> saw = sin(t) + (1/2)sin(2t) + (1/3)sin(3t) + (1/4)sin(4t) +...</div><div><br></div><div>That is, when you start with a description of the spectrum you want, and figure out the waveform from that, the result is a slope-down sawtooth.</div><div><br></div><div> -- Don</div><div>--<br>Donald Tillman, Palo Alto, California<br>https://till.com</div></div></body></html>