hi Janosch, > I've played with the 'gh' function recently, and I'd like to have a > better understanding of the output of this function. If I understood > the docs right, 'gh 1' gives me the current amplitude of the first > harmonic. fluxus calculates the fourier transform of the audio signal, which is an algorithm that transforms a signal in the time domain, such as a sample buffer, into a signal in the frequency domain, the spectrum. the spectrum does not represent individual frequencies, but actually represents frequency bands centered on particular frequencies. what is more, fluxus sums up the results of the fft calculation in 16 fft bins. as far as i know, it calculates the fft for the buffer size you specify in start-audio, then sums up the neighbouring values according to a non-linear mapping table, which specifies for example that the 9th harmonic will be calculated by summing up the bands between 28 and 40.
there are 16 harmonic bins available, and the harmonic-value argument will be wrapped around if it is greater than 16. the bin index starts at 0, so to get the value of the first harmonic bin you use (gh 0), not (gh 1). actually it just occured to me that because of this averaging algorithm you can probably crash fluxus by using a buffer size less than 255 in start-audio. best, gabor
