OLD | NEW |
1 <!doctype html> | 1 <!doctype html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <title>Test Automation Following setValueCurveAtTime Automations</title> | 4 <title>Test Automation Following setValueCurveAtTime Automations</title> |
5 <script src="../resources/js-test.js"></script> | 5 <script src="../../resources/js-test.js"></script> |
6 <script src="resources/compatibility.js"></script> | 6 <script src="../resources/compatibility.js"></script> |
7 <script src="resources/audit-util.js"></script> | 7 <script src="../resources/audit-util.js"></script> |
8 <script src="resources/audio-testing.js"></script> | 8 <script src="../resources/audio-testing.js"></script> |
9 <script src="resources/audio-param.js"></script> | 9 <script src="../resources/audio-param.js"></script> |
10 </head> | 10 </head> |
11 | 11 |
12 <body> | 12 <body> |
13 <script> | 13 <script> |
14 description("Test Automation Following setValueCurveAtTime Automations"); | 14 description("Test Automation Following setValueCurveAtTime Automations"); |
15 window.jsTestIsAsync = true; | 15 window.jsTestIsAsync = true; |
16 | 16 |
17 var sampleRate = 12800; | 17 var sampleRate = 12800; |
18 // Some short duration because we don't need to run the test for very long
. | 18 // Some short duration because we don't need to run the test for very long
. |
19 var testDurationFrames = 256; | 19 var testDurationFrames = 256; |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 function exponentialRampValue(t, t0, v0, t1, v1) { | 151 function exponentialRampValue(t, t0, v0, t1, v1) { |
152 return v0 * Math.pow(v1 / v0, (t - t0) / (t1 - t0)); | 152 return v0 * Math.pow(v1 / v0, (t - t0) / (t1 - t0)); |
153 } | 153 } |
154 | 154 |
155 function setTargetValue(t, t0, v0, v1, timeConstant) { | 155 function setTargetValue(t, t0, v0, v1, timeConstant) { |
156 return v1 + (v0 - v1) * Math.exp(-(t - t0) / timeConstant) | 156 return v1 + (v0 - v1) * Math.exp(-(t - t0) / timeConstant) |
157 } | 157 } |
158 </script> | 158 </script> |
159 </body> | 159 </body> |
160 </html> | 160 </html> |
OLD | NEW |