HarmTable(list=[1.0, 0.0], size=8192)
Harmonic waveform generator.
Generates composite waveforms made up of weighted sums of simple sinusoids.
Parent class : PyoTableObject
Parameters:
list : list, optional Relative strengths of the fixed harmonic partial numbers 1,2,3, etc. Defaults to [1]. size : int, optional Table size in samples. Defaults to 8192.
Methods:
setSize(size) : Change the size of the table. This will erase the previously drawn waveform. replace(list) : Redraw the waveform according to the new `list` parameter.
Attributes:
list : list, optional Relative strengths of the fixed harmonic partial numbers. size : int, optional Table size in samples.
Examples:
>>> s = Server().boot() >>> s.start() >>> # Square wave up to 9th harmonic >>> t = HarmTable([1,0,.33,0,.2,0,.143,0,.111]) >>> a = Osc(table=t, freq=200, mul=.5).out()
Methods details:
HarmTable.setSize(size): Change the size of the table. This will erase the previously drawn waveform. Parameters: size : int New table size in samples. HarmTable.replace(list): Redraw the waveform according to a new set of harmonics relative strengths. Parameters: list : list Relative strengths of the fixed harmonic partial numbers 1,2,3, etc.