aroscbnkkcps, kamd, kfmd, kpmd, iovrlap, iseed, kl1minf, kl1maxf, kl2minf, kl2maxf, ilfomode, keqminf, keqmaxf, keqminl, keqmaxl, keqminq, keqmaxq, ieqmode, kfn, il1fn, il2fn, ieqffn, ieqlfn, ieqqfn[, itabl[, ioutfn]]

Output is the sum of any number of oscillators, where frequency, phase, and amplitude of each oscillator can be modulated by its own set of two independent LFOs.

*iovrlap* – number of oscillators

*iseed* – seed value for a random number generator. Value must be a positive integer in the range 1 to 2147483646 (231 - 2)). If *iseed* <= 0, the current time is used.

*ilfomode* – LFO modulation mode. Value is sum of:

- 128: LFO1 to frequency
- 64: LFO1 to amplitude
- 32: LFO1 to phase
- 16: LFO1 to EQ
- 8: LFO2 to frequency
- 4: LFO2 to amplitude
- 2: LFO2 to phase
- 1: LFO2 to EQ

If an LFO does not modulate anything, it is not calculated, and the ftable number (*il1fn* or *il2fn*) can be omitted.

*ieqmode* – parametric equalizer mode:

- -1: disable EQ (faster)
- 0: peak
- 1: low shelf
- 2: high shelf
- 3: peak (filter interpolation disabled)
- 4: low shelf (interpolation disabled)
- 5: high shelf (interpolation disabled)

The non-interpolated modes are faster, and in some cases are more stable, such as a high shelf filter at low cutoff frequencies. However, interpolation may avoid "zipper noise" at low control rates.

*il1fn* – function table containing the waveform for LFO1. *il1fn* must be normalized, and is read with linear interpolation.

*il2fn* – function table containing the waveform for LFO2. *il2fn* must be normalized, and is read with linear interpolation.

*ieqffn*, *ieqlfn*, *ieqqfn* – lookup tables for EQ frequency, level, and Q, respectively. These tables are optional if EQ is disabled. The table read position is:

- = 0 if the modulator signal is <=-1
- = table length / 2 if the modulator signal is zero
- = guard point if the modulator signal is >=1

*ieqffn*, *ieqlfn*, and *ieqqfn* must be normalized, and have an extended guard point. All tables are read with linear interpolation.

*itabl* (Optional) – function table storing phase and frequency values for all oscillators. The values in this table are in the following order (5 for each oscillator unit):

- Oscillator 1 phase
- Oscillator 1 LFO1 phase
- Oscillator 1 LFO1 frequency
- Oscillator 1 LFO2 phase
- Oscillator 1 LFO2 frequency
- Oscillator 2 phase

*etc...*

All values are in the range 0 to 1. If the specified number is greater than 1, it is wrapped, in the case of phase, or limited, in the case of frequency, to the allowed range. A negative value (or end of table) will use the output of the random number generator. The random seed is always updated (even if no random number was used), so switching one value between random and fixed will not change the others.

*ioutfn* (Optional) – function table to which to write phase and frequency values. The format is the same as *itabl*. *ioutfn* is useful when experimenting with random numbers to record the best values.

*kcps* – oscillator frequency in Hz

*kamd* – AM depth in the range 0 to 1.

` (AM output) = (AM input) * ((1 - (AM depth)) + (AM depth) * (modulator))`

If amplitude modulation is not enabled by *ilfomode*, *kamd* will have no effect. Amplitude modulation is applied before the parametric equalizer.

*kfmd* – FM depth (in Hz)

*kpmd* – phase modulation depth

*kl1minf*, *kl1maxf* – LFO1 minimum and maximum frequencies, respectively, in Hz

*kl2minf*, *kl2maxf* – LFO2 minimum and maximum frequencies, respectively, in Hz. Oscillator and LFO frequencies are allowed to be zero or negative.

*keqminf*, *keqmaxf* – parametric equalizer minimum and maximum frequencies, respectively, in Hz

*keqminl*, *keqmaxl* – parametric equalizer minimum and maximum levels, repsectively

*keqminq*, *keqmaxq* – parametric equalizer minimum and maximum Q, respectively

*kfn* – oscillator waveform table. The table number can be changed at k-rate. This is useful in avoiding aliasing, by selecting from a set of band-limited tables generated by **GEN30**. *kfn* is read with linear interpolation.

**oscbnk** is useful for rendering ensembles of instruments, such as strings, choir, etc.

The output of all oscillators specified in an **oscbnk** statement are mixed together. Any number of oscillators may be specified. The frequency, phase, and amplitude of each oscillator may be modulated by its own set of LFOs (referred to above as LFO1 and LFO2). In addition, the output of each oscillator can be filtered through an optional parametric equalizer, which is also controlled by the LFOs. Although the LFOs run at k-rate, amplitude, phase, and filter modulation are interpolated internally, so it is possible, and even recommended, to control **oscbnk** at low (~1000 Hz) control rates without audible degradation. The start phase and frequency of each oscillator and LFO can be set by the built-in, seedable, 31-bit random number generator. Refer to the documentation on **rnd31** for more information. Altenatively, these values may specified manually in a function table generated with **GEN2**.

Istvan Varga

2001

New in Csound 4.15