Simple regenerating delay-line + filter.
in RTcmix/insts/jg
JDELAY(outsk, insk, dur, AMP, DELAYTIME, FEEDBACK, ringdowndur, FILTFREQ, SIGMIX[, inputchan, PAN, prefadesend, dcblock])
CAPITALIZED parameters are pfield-enabled for table or dynamic control (see the maketable or makeconnection scorefile commands). Parameters after the [bracket] are optional and default to 0 unless otherwise noted.
| Param Field | Parameter | Units | Dynamic | Optional | Notes | 
|---|---|---|---|---|---|
| p0 | output start time | seconds | no | no | |
| p1 | input start time | seconds | no | no | |
| p2 | input duration | seconds | no | no | |
| p3 | amplitude multiplier | relative multiplier of input signal | yes | no | |
| p4 | delay time | seconds | yes | no | |
| p5 | delay feedback | regeneration multiplier, 0-1 | yes | no | |
| p6 | ring-down duration | seconds | no | no | |
| p7 | cutoff freq for low-pass filter | Hz, 0 to disable filter | yes | no | |
| p8 | wet/dry mix | 0: dry, 1: wet | yes | no | |
| p9 | input channel number | - | no | yes | default: 0 | 
| p10 | pan | 0-1 stereo; 0.5 is middle | yes | yes | default: 0 | 
| p11 | pre-fader send | 0: no, 1: yes | no | yes | default: no | 
| p12 | apply DC blocking filter | 0: no, 1: yes | no | yes | default: yes | 
Parameters labled as Dynamic can receive dynamic updates from a table or real-time control source.
Author: John Gibson, 6/23/99; rev for v4, 7/21/04
JDELAY instantiates a regenerating delay, similar to DELAY.
The differences between JDELAY and DELAY are:
JDELAY can produce mono or stereo output.
very basic:
   rtsetparams(44100, 1)
   load("JDELAY")
   rtinput("mysound.aif")
    JDELAY(0, 0, 4.3, 1.0, 0.35, 0.7, 5.0, 0, 1)
slightly more advanced:
   rtsetparams(44100, 2)
   load("JDELAY")
   
   rtinput("mysound.aif")
   
   outskip = 0
   inskip = 0
   indur = DUR()
   amp = 1.0
   deltime = 1/cpspch(7.02)
   feedback = .990
   ringdur = 1
   percent_wet = 0.5
   prefadersend = 0  // if 0, sound stops abruptly; else env spans indur + ringdur
   
   env = maketable("line", 1000, 0,0, 1,1, 6,1, 10,0)
   
   cutoff = 4000
   JDELAY(outskip, inskip, indur, amp*env, deltime, feedback, ringdur,
      cutoff, percent_wet, inchan=0, pan=0.5, prefadersend)
SEE ALSO