Unified · Split
| @@ -1,5 +1,5 @@ | |||
| 1 | // testing Math.euclidean, which has three overloaded variants | 1 | // testing Math.euclidean, which has three overloaded variants |
| 2 | // added 1.4.2.1 | 2 | // added 1.5.0.0 |
| 3 | 3 | ||
| 4 | @(0,0,0) => vec3 a; | 4 | @(0,0,0) => vec3 a; |
| 5 | @(1,1,1) => vec3 b; | 5 | @(1,1,1) => vec3 b; |
| @@ -14,7 +14,7 @@ fun vec3 hasReturn() · 13 unmodified lines | |||
| 14 | // like vec3 | 14 | // like vec3 |
| 15 | <<< hasReturn(), missingReturn() >>>; | 15 | <<< hasReturn(), missingReturn() >>>; |
| 16 | 16 | ||
| 17 | // before the fix in 1.4.2.1, the above would incorrectly print | 17 | // before the fix in 1.5.0.0, the above would incorrectly print |
| 18 | // #(0.0000,0.0000,1.0000) #(0.0000,0.0000,0.0000) | 18 | // #(0.0000,0.0000,1.0000) #(0.0000,0.0000,0.0000) |
| 19 | // this implies the stack pointer is off, due to missingReturn | 19 | // this implies the stack pointer is off, due to missingReturn |
| 20 | // not accounting for the size of its return type, vec3 | 20 | // not accounting for the size of its return type, vec3 |
| @@ -1,4 +1,4 @@ | |||
| 1 | // test args pass through | 1.4.2.1 (ge) added | 1 | // test args pass through | 1.5.0.0 (ge) added |
| 2 | 2 | ||
| 3 | // make a SndBuf | 3 | // make a SndBuf |
| 4 | SndBuf buf => dac; | 4 | SndBuf buf => dac; |
| @@ -1,4 +1,4 @@ | |||
| 1 | // testing for filter blowup | 1.4.2.1 (ge) added | 1 | // testing for filter blowup | 1.5.0.0 (ge) added |
| 2 | // NOTE: intended to be run with --silent | 2 | // NOTE: intended to be run with --silent |
| 3 | // | 3 | // |
| 4 | // filter explosions observed, before this commit d53cdfb | 4 | // filter explosions observed, before this commit d53cdfb |
| @@ -1,16 +1,50 @@ | |||
| 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 | ||
| 1 | 16 | ||
| 2 | [1,2,3,4,5] @=> int a[]; | 17 | // blackhole for maximum safety from filter explosion |
| 3 | Math.srandom(11); | 18 | Step n => HPF f => blackhole; |
| 4 | a.shuffle(); | ||
| 5 | 19 | ||
| 6 | [1,2,3,4,5] @=> int b[]; | 20 | // sus |
| 7 | Math.srandom(11); | 21 | 30000 => f.freq; |
| 8 | b.shuffle(); | 22 | // set step function |
| 23 | 1 => n.next; | ||
| 24 | // did we detect blow up | ||
| 25 | false => int blowup; | ||
| 9 | 26 | ||
| 10 | for( int i; i < a.size(); i++ ) | 27 | // later |
| 28 | now + 50::second => time later; | ||
| 29 | // go until later | ||
| 30 | while( now < later ) | ||
| 11 | { | 31 | { |
| 12 | if( a[i] != b[i] ) me.exit(); | 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 | } | ||
| 13 | } | 47 | } |
| 14 | 48 | ||
| 15 | // got here, good | 49 | // no blow up? great |
| 16 | <<< "success" >>>; | 50 | if( !blowup ) <<< "success" >>>; |
| @@ -0,0 +1,20 @@ | |||
| 1 | // 1.5.0.0 | (ge) | ||
| 2 | // testing random seed with shuffle | ||
| 3 | |||
| 4 | [1,2,3,4,5] @=> int a[]; | ||
| 5 | Math.srandom(11); | ||
| 6 | a.shuffle(); | ||
| 7 | |||
| 8 | [1,2,3,4,5] @=> int b[]; | ||
| 9 | Math.srandom(11); | ||
| 10 | b.shuffle(); | ||
| 11 | |||
| 12 | // compare | ||
| 13 | for( int i; i < a.size(); i++ ) | ||
| 14 | { | ||
| 15 | // if different | ||
| 16 | if( a[i] != b[i] ) me.exit(); | ||
| 17 | } | ||
| 18 | |||
| 19 | // got here, good | ||
| 20 | <<< "success" >>>; | ||