GEN30

GEN30 — Generates harmonic partials by analyzing an existing table.

Description

Extracts a range of harmonic partials from an existing waveform.

Syntax

f # time size  30  src  minh maxh [ref_sr] [interp]

Performance

src -- source ftable

minh -- lowest harmonic number

maxh -- highest harmonic number

ref_sr (optional) -- maxh is scaled by (sr / ref_sr). The default value of ref_sr is sr. If ref_sr is zero or negative, it is now ignored.

interp (optional) -- if non-zero, allows changing the amplitude of the lowest and highest harmonic partial depending on the fractional part of minh and maxh. For example, if maxh is 11.3 then the 12th harmonic partial is added with 0.3 amplitude. This parameter is zero by default.

GEN30 does not support tables with an extended guard point (ie. table size = power of two + 1). Although such tables will work both for input and output, when reading source table(s), the guard point is ignored, and when writing the output table, guard point is simply copied from the first sample (table index = 0).

The reason of this limitation is that GEN30 uses FFT, which requires power of two table size. GEN32 allows using linear interpolation for resampling and phase shifting, which makes it possible to use any table size (however, for partials calculated with FFT, the power of two limitation still exists).

Credits

Author: Istvan Varga

New in version 4.16