Csound Csound-dev Csound-tekno Search About

[Csnd] [slightly off-topic]

Date2014-09-26 14:14
FromRory Walsh
Subject[Csnd] [slightly off-topic]
In the formula for an inverse sawtooth waveform shown here:
http://en.wikipedia.org/wiki/Sawtooth_wave
What is the relevance of (-1)^k?. I can't see any reason for it. And
if anyone could please show me the shorthand to plot the sum of
difference waveforms in python I'd be most grateful. Right now I'm
summing each harmonic the long way...

t = arange(0.0, 1.0, 0.01)
fig = figure(1)
ax1 = fig.add_subplot(111)

#there has to be an easier way to do this
ax1.plot(t, 1*sin(2*pi*t)+.5*sin(2*pi*t*2)+.3*sin(2*pi*t*3)+.25*sin(2*pi*t*4)+.20*sin(2*pi*t*5))
ax1.grid(True)
ax1.set_ylim( (-5,5) )
show()