| 1 |
// testing for filter blowup | 1.5.0.0 (ge) added |
| 2 |
// NOTE: intended to be run with --silent |
| 3 |
// |
| 4 |
// filter explosions observed, before this commit d53cdfb |
| 5 |
// https://github.com/ccrma/chuck/commit/d53cdfbf448c1c52a760fc2769e94204ad3a6f4d |
| 6 |
// |
| 7 |
// macOS (64-bit, macOS Venture) |
| 8 |
// *** BLOW UP at time: 19.815533 value: 100.037407 freq: 0.100000 Q: 7.844161 |
| 9 |
// linux (64-bit, planetCCRMA) |
| 10 |
// *** BLOW UP at time: 33.817312 value: 100.002319 freq: 0.100000 Q: 1.309424 |
| 11 |
// windows (32-bit and 64-bit, windows 10) |
| 12 |
// *** BLOW UP at time: 18.635624 value: 100.004440 freq: 0.100000 Q: 9.886994 |
| 13 |
// |
| 14 |
// author: Ge Wang |
| 15 |
// date: Winter 2023 |
| 16 |
|
| 17 |
// blackhole for maximum safety from filter explosion |
| 18 |
Step n => HPF f => blackhole; |
| 19 |
|
| 20 |
// sus |
| 21 |
30000 => f.freq; |
| 22 |
// set step function |
| 23 |
1 => n.next; |
| 24 |
// did we detect blow up |
| 25 |
false => int blowup; |
| 26 |
|
| 27 |
// later |
| 28 |
now + 50::second => time later; |
| 29 |
// go until later |
| 30 |
while( now < later ) |
| 31 |
{ |
| 32 |
// sweep Q |
| 33 |
.5 + 10*(1+Math.sin(now/second))/2 => f.Q; |
| 34 |
1::samp => now; |
| 35 |
|
| 36 |
// consider this a blow up |
| 37 |
if( f.last() > 100 ) |
| 38 |
{ |
| 39 |
// note |
| 40 |
<<< "*** BLOW UP at time:", now/second, "value:", f.last(), |
| 41 |
"freq:", f.freq(), "Q:", f.Q() >>>; |
| 42 |
// flag |
| 43 |
true => blowup; |
| 44 |
// bail |
| 45 |
break; |
| 46 |
} |
| 47 |
} |
| 48 |
|
| 49 |
// no blow up? great |
| 50 |
if( !blowup ) <<< "success" >>>; |