; More demonstrations of the phase distortion opcode ; pdclip ; new in Csound 5.08 ; by Anthony Kozar ; http://www.anthonykozar.net/ sr = 44100 kr = 4410 ksmps = 10 nchnls = 1 ; Shows how to obtain the "pulse" waveform ; of the Casio CZ-series synthesizers by using ; the pdclip opcode to read the entire cosine ; table in less than one period specified by ; the frequency. ; The achieved effect is probably more extreme ; than in the CZs and could perhaps be "softened" ; if the horizontal portion of the phase distorion ; pattern was slightly angled instead. instr 4 idur = p3 iamp = p4 ifreq = p5 itable = p6 aenv linseg 0, .001, 1.0, idur - .051, 1.0, .05, 0 aosc phasor ifreq kamount linseg 1.0, 0.1, 0.9, 1.0, 0.0 apd pdclip aosc, kamount, -kamount aout tablei apd, itable, 1 out aenv*aout*iamp endin f1 0 16385 10 1 f3 0 16385 9 1 1 270 ; inverted cosine ; descending "just blues" scale ; the CZ-series "pulse" waveform t 0 100 i4 0 .333 10000 512 3 i. + . . 448 i. + . . 384 i. + . . 360 i. + . . 341.33 i. + . . 298.67 i. + 2 . 256 e