HTML preprocessors can make writing HTML more powerful or convenient. For instance, Markdown is designed to be easier to write and read for text documents and you could write a loop in Pug.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. So you don't have access to higher-up elements like the <html>
tag. If you want to add classes there that can affect the whole document, this is the place to do it.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. If you need things in the <head>
of the document, put that code here.
The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https.
CSS preprocessors help make authoring CSS easier. All of them offer things like variables and mixins to provide convenient abstractions.
It's a common practice to apply CSS to a page that styles elements such that they are consistent across all browsers. We offer two of the most popular choices: normalize.css and a reset. Or, choose Neither and nothing will be applied.
To get the best cross-browser support, it is a common practice to apply vendor prefixes to CSS properties and values that require them to work. For instance -webkit-
or -moz-
.
We offer two popular choices: Autoprefixer (which processes your CSS server-side) and -prefix-free (which applies prefixes via a script, client-side).
Any URLs added here will be added as <link>
s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.
You can apply CSS to your Pen from any stylesheet on the web. Just put a URL to it here and we'll apply it, in the order you have them, before the CSS in the Pen itself.
You can also link to another Pen here (use the .css
URL Extension) and we'll pull the CSS from that Pen and include it. If it's using a matching preprocessor, use the appropriate URL Extension and we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
JavaScript preprocessors can help make authoring JavaScript easier and more convenient.
Babel includes JSX processing.
Any URL's added here will be added as <script>
s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
Search for and use JavaScript packages from npm here. By selecting a package, an import
statement will be added to the top of the JavaScript editor for this package.
Using packages here is powered by esm.sh, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ESM usage.
All packages are different, so refer to their docs for how they work.
If you're using React / ReactDOM, make sure to turn on Babel for the JSX processing.
If active, Pens will autosave every 30 seconds after being saved once.
If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.
If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.
Visit your global Editor Settings.
<canvas></canvas>
<a href="http://rileyjshaw.com" target="_blank" class="info">
<p>Web Audio API</p>
<p>Experiment #1</p>
<p>Shepard-Risset Glissando</p>
<p>✎ rileyjshaw</p>
</a>
<div class="arrows">
<p class="up">▲</p>
<p class="down">▲</p>
</div>
<script>
// relevant resources:
// http://www.sitepoint.com/using-fourier-transforms-web-audio-api/
// https://chromium.googlecode.com/svn/trunk/samples/audio/wave-tables/
// "celeste" from chromium repository:
var celeste = {
'real': [
0.000000,
-0.000000,
-0.500000,
0.000521,
-0.001138,
0.000116,
-0.001202,
0.000081,
-0.000772,
0.000116,
-0.000752,
0.000144,
-0.000122,
0.000027,
-0.000623,
0.000121,
-0.000085,
0.000055,
-0.000175,
0.000053,
-0.000051,
0.000052,
-0.000117,
0.000071,
-0.000070,
0.000033,
-0.000042,
0.000050,
-0.000015,
0.000025,
-0.000040,
0.000082,
-0.000201,
0.000049,
-0.000025,
0.000009,
-0.000111,
0.000081,
-0.000042,
0.000029,
-0.000033,
0.000024,
-0.000033,
0.000023,
-0.000069,
0.000082,
-0.000083,
0.000053,
-0.000127,
0.000045,
-0.000080,
0.000034,
-0.000053,
0.000029,
-0.000060,
0.000036,
-0.000083,
0.000098,
-0.000102,
0.000046,
-0.000067,
0.000071,
-0.000089,
0.000128,
-0.000191,
0.000195,
-0.000266,
0.000291,
-0.000274,
0.000245,
-0.000198,
0.000147,
-0.000104,
0.000079,
-0.000065,
0.000057,
-0.000050,
0.000045,
-0.000041,
0.000038,
-0.000035,
0.000033,
-0.000030,
0.000029,
-0.000027,
0.000026,
-0.000024,
0.000023,
-0.000022,
0.000021,
-0.000020,
0.000019,
-0.000019,
0.000018,
-0.000017,
0.000017,
-0.000016,
0.000016,
-0.000015,
0.000015,
-0.000014,
0.000014,
-0.000013,
0.000013,
-0.000013,
0.000012,
-0.000012,
0.000012,
-0.000011,
0.000011,
-0.000011,
0.000010,
-0.000010,
0.000010,
-0.000010,
0.000009,
-0.000009,
0.000009,
-0.000009,
0.000009,
-0.000009,
0.000008,
-0.000008,
0.000008,
-0.000008,
0.000008,
-0.000007,
0.000007,
-0.000007,
0.000007,
-0.000007,
0.000007,
-0.000007,
0.000007,
-0.000006,
0.000006,
-0.000006,
0.000006,
-0.000006,
0.000006,
-0.000006,
0.000006,
-0.000006,
0.000005,
-0.000005,
0.000005,
-0.000005,
0.000005,
-0.000005,
0.000005,
-0.000005,
0.000005,
-0.000005,
0.000005,
-0.000005,
0.000005,
-0.000005,
0.000004,
-0.000004,
0.000004,
-0.000004,
0.000004,
-0.000004,
0.000004,
-0.000004,
0.000004,
-0.000004,
0.000004,
-0.000004,
0.000004,
-0.000004,
0.000004,
-0.000004,
0.000004,
-0.000003,
0.000003,
-0.000003,
0.000003,
-0.000003,
0.000003,
-0.000003,
0.000003,
-0.000003,
0.000003,
-0.000003,
0.000003,
-0.000003,
0.000003,
-0.000003,
0.000003,
-0.000003,
0.000003,
-0.000003,
0.000003,
-0.000003,
0.000003,
-0.000003,
0.000003,
-0.000003,
0.000003,
-0.000003,
0.000003,
-0.000003,
0.000003,
-0.000003,
0.000002,
-0.000002,
0.000002,
-0.000002,
0.000002,
-0.000002,
0.000002,
-0.000002,
0.000002,
-0.000002,
0.000002,
-0.000002,
0.000002,
-0.000002,
0.000002,
-0.000002,
0.000002,
-0.000002,
0.000002,
-0.000002,
0.000002,
-0.000002,
0.000002,
-0.000002,
0.000002,
-0.000002,
0.000002,
-0.000002,
0.000002,
-0.000002,
0.000002,
-0.000002,
0.000002,
-0.000002,
0.000002,
-0.000002,
0.000002,
-0.000002,
0.000002,
-0.000002,
0.000002,
-0.000002,
0.000002,
-0.000002,
0.000002,
-0.000002,
0.000002,
-0.000002,
0.000002,
-0.000002,
0.000002,
-0.000002,
0.000002,
-0.000002,
0.000002,
-0.000002,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000000,
0.000001,
-0.000001,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
],
'imag': [
0.000000,
0.002302,
-0.000003,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000001,
0.000000,
-0.000000,
0.000000,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000002,
0.000002,
-0.000002,
0.000002,
-0.000001,
0.000001,
-0.000001,
0.000001,
-0.000001,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
0.000000,
-0.000000,
],
}
</script>
$pink: #f48fb1
$teal: #64ffda
body, p, a
margin: 0
color: $teal
body
overflow: hidden
font-family: 'Open Sans', sans-serif
font-weight: bold
background: $pink
.arrows, .info, canvas
position: absolute
.arrows
bottom: 50%
right: 50%
font-size: 96px
color: $teal
transform: translate(50%, 50%)
transition: bottom 0.24s, right 0.24s, transform 0.24s
p
cursor: pointer
transition: font-size 0.24s, text-shadow 0.24s
&:hover
text-shadow: 0 -18px 0px mix($pink, lighten($teal, 12), 18%), 0 -36px 0 mix($pink, lighten($teal, 24), 18%)
.running &
bottom: 8px
right: 12px
font-size: 24px
transform: translate(0, 0)
p:hover
text-shadow: 0 -8px 0 mix($pink, lighten($teal, 24), 18%)
.down
transform: rotate(180deg)
.info
bottom: 6px
left: 6px
height: 48px
width: 48px
box-sizing: border-box
padding: 6px 12px
border: 4px solid $teal
border-radius: 24px
overflow: hidden
text-decoration: none
transition: height 0.24s, width 0.24s
p
margin-top: 60px
transition: margin-top 0.24s
&::before
content: '?'
position: absolute
top: 2px
left: 15px
font-size: 24px
font-weight: bold
transition: left 0.24s 0.24s
&:hover
height: 108px
width: 240px
transition: height 0.24s 0.24s, width 0.24s
p
margin-top: 0
transition: margin-top 0.24s 0.24s
&::before
left: -30px
transition: left 0.24s
canvas
top: 0
left: 0
right: 0
bottom: 0
!function () {
/* ----- *
* AUDIO *
* ----- */
// Demo variables - play around with these
const OCTAVES = 5; // number of concurrent octaves
const FUNDAMENTAL = 87.31; // fundamental frequency, F2
let T = 10; // period of repetition (in seconds)
let direction = 1; // 1 = down, -1 = up
// Web Audio API context
const AUDIO_CTX = new (window.AudioContext || window.webkitAudioContext)();
// Our custom wave table (`celeste` is defined in a script tag)
const REAL = new Float32Array(celeste.real);
const IMAGINARY = new Float32Array(celeste.imag);
const WAVE = AUDIO_CTX.createPeriodicWave(REAL, IMAGINARY);
// AudioParam's exponentialRampToValueAtTime() or setValueCurveAtTime()
// methods would be really useful for this experiment, but it would be
// difficult to define a looping behaviour with precision since they
// don't accept a callback.
//
// It's pretty simple to write our own exponential decay function,
// so we'll just do that:
// n_0 = initial value, t = time, t_half = half-life
const f = (n_0, t, t_half) => n_0 * POW(2, -direction * t / t_half);
// This gives us a bell curve, which we can use to boost the volume of
// frequencies in the middle of our range:
const GAUSSIAN = (x, a, b, c) => a * EXP(-POW(x - b, 2) / 2 * POW(c, 2));
// Alias parts of the Math library
const PI2 = Math.PI * 2;
const POW = Math.pow;
const ABS = Math.abs;
const EXP = Math.exp;
// Another helper function; returns elapsed time in seconds
const now = () => AUDIO_CTX.currentTime;
// Derived values
let f_0;
T *= OCTAVES;
// Empty list to hold our oscillators
let ascenders = new Array(OCTAVES);
// Makes an oscillator that ascends to the max pitch,
// then drops down & starts again
function makeAscender (phase) {
function step (t) {
// phase-shift and normalize t
t = (t + phase) % T;
const FREQUENCY = f(f_0, t, T / OCTAVES);
const AMPLITUDE = GAUSSIAN(t, 0.5, T / 2, 0.2);
OSCILLATOR.frequency.value = FREQUENCY;
GAIN_NODE.gain.value = AMPLITUDE;
circle(t, AMPLITUDE);
}
const OSCILLATOR = AUDIO_CTX.createOscillator(); // create sound source
const GAIN_NODE = AUDIO_CTX.createGain(); // create gain node
OSCILLATOR.setPeriodicWave(WAVE);
OSCILLATOR.connect(GAIN_NODE); // connect sound source to gain node
GAIN_NODE.connect(AUDIO_CTX.destination); // connect gain node to output
GAIN_NODE.gain.value = 2 / OCTAVES;
OSCILLATOR.start(0);
return { step };
}
// main loop
function glissando () {
const NOW = now();
CANVAS_CTX.clearRect(0, 0, width, height);
ascenders.forEach(a => a.step(NOW));
setTimeout(glissando, 20);
}
// Add some pink noise to match the background :)
function pinkify () {
const BUFFER_SIZE = 4096;
const PINK_NOISE = (function() {
let b0, b1, b2, b3, b4, b5, b6;
b0 = b1 = b2 = b3 = b4 = b5 = b6 = 0.0;
const NODE = AUDIO_CTX.createScriptProcessor(BUFFER_SIZE, 1, 1);
NODE.onaudioprocess = function(e) {
const OUTPUT = e.outputBuffer.getChannelData(0);
for (let i = 0; i < BUFFER_SIZE; i++) {
let white = Math.random() * 2 - 1;
b0 = 0.99886 * b0 + white * 0.0555179;
b1 = 0.99332 * b1 + white * 0.0750759;
b2 = 0.96900 * b2 + white * 0.1538520;
b3 = 0.86650 * b3 + white * 0.3104856;
b4 = 0.55000 * b4 + white * 0.5329522;
b5 = -0.7616 * b5 - white * 0.0168980;
OUTPUT[i] = b0 + b1 + b2 + b3 + b4 + b5 + b6 + white * 0.5362;
OUTPUT[i] *= 0.11; // (roughly) compensate for gain
b6 = white * 0.115926;
}
}
return NODE;
})();
let noiseGain = AUDIO_CTX.createGain();
noiseGain.gain.value = 0.05;
PINK_NOISE.connect(noiseGain);
noiseGain.connect(AUDIO_CTX.destination);
}
/* ------- *
* DISPLAY *
* ------- */
let height, width;
const CANVAS = document.querySelector('canvas');
const CANVAS_CTX = CANVAS.getContext('2d');
// Draw a circle from a passed in time and amplitude
function circle (t, A) {
const r = POW(A, 2 / OCTAVES) * 40;
const x = width / 2;
// Calculate y as a percentage, based on `direction`
let y = (1 - direction) / 2 + direction * t / T;
// Pad by 10% to avoid hitting the canvas edge
y = y * 0.8 + 0.1;
// ...and fit it to the canvas's height
y *= height;
CANVAS_CTX.beginPath();
CANVAS_CTX.arc(x, y, r, 0, PI2);
CANVAS_CTX.fill();
CANVAS_CTX.closePath();
};
// Make the canvas fullscreen (called on init and resize)
function setDimensions () {
height = window.innerHeight;
width = document.documentElement.clientWidth;
// reset canvas attributes
CANVAS.height = height;
CANVAS.width = width;
CANVAS_CTX.fillStyle = '#64ffda';
CANVAS_CTX.font = '24px Ariel';
}
// Event listeners
document.querySelector('.up').addEventListener('click', () => init(-1));
document.querySelector('.down').addEventListener('click', () => init(1));
window.addEventListener('resize', setDimensions);
/* ----------- *
* START IT UP *
* ----------- */
let running = false;
function init (dir) {
document.body.focus();
direction = dir;
f_0 = FUNDAMENTAL * POW(2, direction * OCTAVES / 2); // starting pitch
if (!running) {
running = true;
document.body.className = 'running';
// Populate the `ascenders` array
for (let i = 0; i < OCTAVES; i++) {
ascenders.push(makeAscender(T * i / OCTAVES));
}
setDimensions();
pinkify();
glissando();
}
}
}();
Also see: Tab Triggers