The pfields for setup are triples, the first being the center frequency of an IIR filter "hump" (in Hz), the second being the bandwidth of the "hump" (Hz, or if negative a multiplier of the center frequency), and the third being the relative amplitude of that "hump" in the final constructed filter. Up to 64 cf-bw-amp triples can be specified.
p0 = output start time (seconds) p1 = input start time (seconds) p2 = duration (seconds) p3 = amplitude multiplier (relative multiplier of input signal) p4 = input channel [optional, default is 0] p5 = pan (0-1 stereo; 0.5 is middle) [optional; default is 0] p3 (amplitude) and p5 (pan) can receive dynamic updates from a table or real-time control source.
p0 = output start time (seconds) p1 = duration (seconds) p2 = amp (absolute, for 16-bit soundfiles: 0-32768) p3 = pan (0-1 stereo; 0.5 is middle) [optional; default is 0] p2 (amplitude) and p3 (pan) can receive dynamic updates from a table or real-time control source.
p0 = output start time (seconds) p1 = duration (seconds) p2 = amp (absolute, for 16-bit soundfiles: 0-32768) p3 = pitch (Hz or oct.pc *) (see note below) p4 = pan (in percent-to-left form: 0-1) [optional, default is 0] p2 (amplitude), p3 (pitch) and p4 (pan) can receive dynamic updates from a table or real-time control source. * If the value of p3 field is < 15.0, it assumes oct.pc. Use the pchcps scorefile convertor for direct frequency specification below 15.0 Hz.
p0 = output start time (seconds) p1 = duration (seconds) p2 = amp (absolute, for 16-bit soundfiles: 0-32768) p3 = pitch (Hz or oct.pc *) (see note below) p4 = pan (in percent-to-left form: 0-1) [optional, default is 0] p2 (amplitude), p3 (pitch) and p4 (pan) can receive dynamic updates from a table or real-time control source. * If the value of p3 field is < 15.0, it assumes oct.pc. Use the pchcps scorefile convertor for direct frequency specification below 15.0 Hz. rev. for v4.0 of all the above by JGG, 7/10/04
BUZZ generates a waveform consisting of all harmonic partials at relative amplitude 1.0 between the specified pitch and the Nyquist frequency. PULSE generates a unit impulse at the specified frequency and pitch. Although they are similar, there are differences in the sound related to the band-limited nature of BUZZ as opposed to PULSE.
For the pitch specification, oct.pc format generally will not work as you expect for p3 (osc freq) if the pfield changes dynamically because of the 'mod 12' aspect of the pitch-class (.pc) specification. Use direct frequency (hz) or linear octaves instead.
The IIR instruments can produce either stereo or mono output.
NOTE: Older versions of the IIR family of commands used
NOISE instead of IINOISE. Unfortunately this conflicted
with the generic RTcmix instrument
NOISE,
so the name was changed.
Sample Scores
very basic:
rtsetparams(44100, 1) load("IIR") rtinput("mysoundfile.aif") ampenv = maketable("line", 1000, 0,0, 1,1, 5,1, 7,0) setup(149.0, 25.0, 1.0, 1415.0, 100.0, 0.8) INPUTSIG(0, 0, 7, 0.25*ampenv, 0) setup(90.0, -0.5, 1.0, 1000.0, -0.1, 0.8) INPUTSIG(8, 0, 7, 0.15, 0)
rtsetparams(44100, 2) load("IIR") ampenv = maketable("line", 1000, 0,0, 0.2,1, 0.3,0) start = 0 for(pc = 0; pc < 0.25; pc = pc + 0.01) { setup(8.00 + pc, 1.0, 1.0) IINOISE(start, 0.3, 15000*ampenv, random()) start = start + 0.1 }
rtsetparams(44100, 2) load("IIR") env = maketable("window", 1000, "hanning") pitch = 134.0 for(start = 0; start < 7.8; start = start + 0.1) { setup((random()*2000.0) + 300.0, -0.5, 1) BUZZ(start, 0.1, 40000*env, pitch, random()) BUZZ(start, 0.1, 40000*env, pitch + 2.5, random()) pitch = pitch + 0.5 } for(start = 7.8; start < 15; start = start + 0.1) { setup((random()*2000.0) + 200.0, -0.5, 1) PULSE(start, 0.1, 40000*env, pitch, random()) PULSE(start, 0.1, 40000*env, pitch + 2.5, random()) pitch = pitch - 0.5 }