| 1 |
////////////////////////////////////////////////////// |
| 2 |
// Spectacle - FFT-based spectral delay and EQ // |
| 3 |
// // |
| 4 |
// SPECTACLE is an FFT-based delay instrument by // |
| 5 |
// John Gibson and inspired by the totally awesome // |
| 6 |
// Spektral Delay plug-in by Native Instruments. // |
| 7 |
// This version is adapted from RTcmix (rtcmix.org) // |
| 8 |
// by Joel Matthys // |
| 9 |
////////////////////////////////////////////////////// |
| 10 |
|
| 11 |
// Options |
| 12 |
// |
| 13 |
// mix (float) [0-1]: mix of processed and unprocessed signal. default 1.0 |
| 14 |
// clear (void) : reset Spectacle |
| 15 |
// fftlen (int) : set FFT frame size (power of 2) |
| 16 |
// overlap (int) : set frame overlap; best between 2 and 6 |
| 17 |
// delayMax (dur) : maximum delay time |
| 18 |
// delayMin (dur) : minimum delay time |
| 19 |
// freqMax (float) : maximum frequency processed by Spectacle |
| 20 |
// freqMin (float) : minimum frequency processed by Spectacle |
| 21 |
// range (float, float) : set both min and min freqs in one command |
| 22 |
// bands (int) : set number of frequency bands, 1-512, default 64 |
| 23 |
// delay (dur) : set the same duration for all bands |
| 24 |
// eq (float) : set the same EQ value for all bands (value is +/- dB) |
| 25 |
// feedback (float) : set the same feedback value for all bands (-1.0 - 1.0) |
| 26 |
// |
| 27 |
// table (string, string) : set delay, eq, or feedback tables to |
| 28 |
// random, ascending, or descending |
| 29 |
// example: table ("delay", "random"); |
| 30 |
|
| 31 |
// warning: use headphones or you'll get feedback! |
| 32 |
adc => Spectacle spect => dac; |
| 33 |
0.5 => spect.mix; // mix half processed and unprocessed signal |
| 34 |
spect.range(100,4100); // limit frequency range |
| 35 |
20 => spect.bands; // set number of bands to 20 |
| 36 |
// This will divide the spectrum evenly within the frequency range. |
| 37 |
// Band 1 will cover 100-300 Hz, Band 2 will cover 300-500 Hz, etc. |
| 38 |
// up to Band 20, which covers 3900-4100 Hz. |
| 39 |
<<< spect.bands(), "frequency bands with random delay by default" >>>; |
| 40 |
10::second => now; |
| 41 |
<<< "switching to ascending delay and descending eq","">>>; |
| 42 |
spect.table("delay","ascending"); |
| 43 |
spect.table("eq","descending"); |
| 44 |
10::second => now; |
| 45 |
<<< "switching to ascending eq with feedback","" >>>; |
| 46 |
0 => spect.eq; |
| 47 |
0.8 => spect.feedback; |
| 48 |
20::second => now; |
| 49 |
adc =< spect; // disconnect input |
| 50 |
<<< "ringing down","" >>>; |
| 51 |
minute => now; // let it ring down |