ar vco kamp, kfqc[, iwave][, ipw][, ifn][, imaxd]
Implementation of a band limited, analog modeled oscillator, based on integration of band limited impulses. vco can be used to simulate a variety of analog wave forms. Last four arguments were made optional in Csound Version 4.16.
iwave (optional) – determines the waveform:
iwave defaults to 1.
ipw (optional) – determines the pulse width when iwave is set to 2, and determines Saw/Ramp character when iwave is set to 3. The value of ipw should be between 0 and 1. A value of .5 will generate a square wave or a triangle wave depending on iwave. Default is 1.
ifn (optional) – the table number of a of a stored sine wave. Default is 1.
imaxd (optional) – is the maximum delay time. A time of 1/ifqc may be required for the pwm and triangle waveform. To bend the pitch down this value must be as large as 1/(minimum frequency). Default is 1.
kamp – determines the amplitude
kfqc – is the frequency of the wave
instr 10 idur = p3 ; Duration iamp = p4 ; Amplitude ifqc = cpspch(p5) ; Frequency iwave = p6 ; Selected wave form 1=Saw, 2=Square/PWM, 3=Tri/Saw-Ramp-Mod isine = 1 imaxd = 1/ifqc*2 ; Allows pitch bend down of two octaves kpw1 oscil .25, ifqc/200, 1 kpw = kpw1 + .5 asig vco iamp, ifqc, iwave, kpw, 1, imaxd outs asig, asig ;Output and amplification endin f1 0 65536 10 1 ; Sta Dur Amp Pitch Wave i10 0 2 20000 5.00 1 i10 + . . . 2 i10 . . . . 3 i10 . 2 20000 7.00 1 i10 . . . . 2 i10 . . . . 3 i10 . 2 20000 9.00 1 i10 . . . . 2 i10 . . . . 3 i10 . 2 20000 11.00 1 i10 . . . . 2 i10 . . . . 3 e
December, 1998 (New in Csound version 3.50)