Home · Standalone · rtcmix~ · uRTcmix · iRTcmix · Tutorials · Reference |
RTcmix an open-source digital signal processing and sound synthesis language |
about · links · contact |
SPECTACLE -- FFT-based delay processor
in RTcmix/insts/jg/SPECTACLE quick syntax:SPECTACLE(outsk, insk, dur, amp, ringdowndur, fftsize, windowsize, windowtype, overlap[, sigmix, inputchan, pan])
NOTE: This is an older RTcmix instrument, the newer SPECTACLE2 instrument is probably better to use. p0 = output start time (seconds) p1 = input start time (seconds) p2 = input duration (seconds) p3 = amplitude multiplier (relative multiplier of input signal) p4 = ring-down duration (seconds) p5 = FFT length (samples, power of 2, usually 1024) p6 = window length (samples, power of 2, usually FFT length * 2) p7 = window type (0: Hamming, 1: Hanning, 2: Rectangle, 3: Triangle, 4: Blackman, 5: Kaiser) p8 = overlap - how much FFT windows overlap (samples, any power of 2) 1: no overlap, 2: hopsize=FFTlen/2, 4: hopsize=FFTlen/4, etc. 2 or 4 is usually fine; 1 is fluttery; the higher the more CPU time p9 = wet/dry mix (0: dry -> 1: wet) [optional; default is 1] p10 = input channel [optional; default is 0] p11 = pan (0-1 stereo; 0.5 is middle) [optional; default is 0] Because this instrument has not been updated for pfield control, the older makegen control envelope sysystem should be used: Function table 1 is the input amplitude, spanning just the input duration. Function table 2 is the output amplitude, spanning the entire note, including ring-down duration. Function table 3 is the EQ table (i.e., amplitude scaling of each band), in dB (0 dB means no change, + dB boost, - dB cut). Function table 4 is the delay time table. Function table 5 is the delay feedback table. Values > 1 are dangerous! Author: John Gibson SPECTACLE is an FFT-based delay instrument inspired by the totally awesome Spektral Delay plug-in by Native Instruments (but minus the interactive ability and some other stuff). NOTE: This is an older RTcmix instrument, the newer SPECTACLE2 instrument is probably better to use. Usage NotesSPECTACLE is not quite like the current PVOC, though obviously related. Basically, each FFT bin gets fitted with its own recirculating delay line, and the delay times and feedbacks are controlled by makegens. For example, if you randomize the delay times, you get wild repetitive, spectrally splintered patterns.Several makegen function tables control EQ, delay time, and delay feedback (tables 3, 4 and 5) for all the frequency bands of the FFT. Think of them as curves on a graph with frequency on the x axis and amplitude, delay time or feedback on the y axis.
Parameter p8 ("overlap") can also be negative powers of 2, e.g., .5, .25, .125, etc. This leaves a gap between successive FFTs, creating ugly robotic effects -- beware of clipping. SPECTACLE can produce either mono or stereo output. Sample Scoresvery basic:rtsetparams(44100, 2) load("SPECTACLE") /* ftp://presto.music.virginia.edu/pub/rtcmix/snd/ah.snd */ rtinput("mysound.snd") inchan = 0 inskip = 0 indur = 2 ringdur = 15 /* play after indur elapses, while delay lines flush */ amp = 1 wetdry = 1 /* 100% wet */ fftlen = 1024 /* yielding 512 frequency bands */ winlen = fftlen * 2 /* the standard window length is twice FFT size */ overlap = 2 /* 2 hops per fftlen (4 per window) */ wintype = 0 /* use Hamming window */ /* input envelope (covering See AlsoCONVOLVE1, LPCPLAY, PVOC, SPECTACLE2, SPECTEQ, SPECTEQ2, TVSPECTACLE, VOCODE2, VOCODE3, VOCODESYNTH |