xfreq1, xfreq2 -- the frequency (i.e. the inverse of delay time) Changed to x-rate in Csound version 3.59.
kcutoff1, kcutoff2 -- the filter cutoff frequency in Hz.
kfeedback1, kfeedback2 -- the feedback factor
wguide2 is a model of beaten plate consisting of two parallel delay-lines and two first-order lowpass filters. The two feedback lines are mixed and sent to the delay again each cycle.
Implementing waveguide algorithms as opcodes, instead of orc instruments, allows the user to set kr different than sr, allowing better performance particulary when using real-time.
wguide2.
Note
As a rule of thumb, to avoid making wguide2 unstable, the sum of the two feedback values should be below 0.5.
Examples
Here is an example of the wguide2 opcode. It uses the file wguide2.csd.
<CsoundSynthesizer><CsOptions>; Select audio/midi flags here according to platform-odac ;;;realtime audio out;-iadc ;;;uncomment -iadc if RT audio input is needed too; For Non-realtime ouput leave only the line below:; -o wguide2.wav -W ;;; for file output any platform</CsOptions><CsInstruments>sr=44100ksmps=32nchnls=20dbfs=1instr1aoutdiskin2"drumsMlp.wav",1,0,1;in signalafreq1line100,p3,2000afreq2line1200,p3,p4;vary second frequency in the score kcutoff1=3000kcutoff2=1500kfeedback1=0.25;the sum of the two feedbackkfeedback2=0.25;values should not exceed 0.5asigwguide2aout,afreq1,afreq2,kcutoff1,kcutoff2,kfeedback1,kfeedback2asigdcblock2asig;get rid of DCoutsasig,asigendin</CsInstruments><CsScore>i1081200;freqency of afreq2 remains the samei198100;freqency of afreq2 gets lowere</CsScore></CsoundSynthesizer>