ar hsboscil kamp, ktone, kbrite, ibasfreq, iwfn, ioctfn[, ioctcnt[, iphs]]
An oscillator which takes tonality and brightness as arguments, relative to a base frequency.
ibasfreq - base frequency to which tonality and brighness are relative
iwfn - function table of the waveform, usually a sine
ioctfn - function table used for weighting the octaves, usually something like:
f1 0 1024 -19 1 0.5 270 0.5
ioctcnt - number of octaves used for brightness blending. Must be in the range 2 to 10. Default is 3.
iphs - initial phase of the oscillator. If iphs = -1, initialization is skipped.
kamp - amplitude of note
ktone - cyclic tonality parameter relative to ibasfreq in logarithmic octave, range 0 to 1, values > 1 can be used, and are internally reduced to frac(ktone).
kbrite - brightness parameter relative to ibasfreq, achieved by weighting ioctcnt octaves. It is scaled in such a way, that a value of 0 corresponds to the orignal value of ibasfreq, 1 corresponds to one octave above ibasfreq, -2 corresponds to two octaves below ibasfreq, etc. kbrite may be fractional.
hsboscil takes tonality and brightness as arguments, relative to a base frequency (ibasfreq). Tonality is a cyclic parameter in the logarithmic octave, brightness is realized by mixing multiple weighted octaves. It is useful when tone space is understood in a concept of polar coordinates.
Making ktone a line, and kbrite a constant, produces Risset's glissando.
Oscillator table iwfn is always read interpolated. Performance time requires about ioctcnt * oscili.
giwave ftgen 1, 0, 1024, 10, 1, 1, 1, 1 ; synth wave giblend ftgen 2, 0, 1024, -19, 1, 0.5, 270, 0.5 ; blending window instr 1 ; endless glissando ktona line 0,10,1 asig hsboscil 10000, ktona, 0, 200, giwave, giblend, 5 out asig endin instr 2 ; MIDI instrument: all octaves sound alike, itona octmidi ; velocity is mapped to brightness ibrite ampmidi 3 ibase = cpsoct(6) kenv expon 20000, 1, 100 asig hsboscil kenv, itona, ibrite, ibase, giwave, giblend, 5 out asig endin
Peter Neubäcker
Munich, Germany
August, 1999
New in Csound version 3.58