From 69a252ab8cd1edcfb6a0ccea45d793c44f59b032 Mon Sep 17 00:00:00 2001 From: Jeevan Date: Fri, 18 Aug 2017 17:30:29 -0700 Subject: [PATCH] updated index, changed example name --- examples/polyphonicSynth-Keyboard/index.html | 9 + examples/polyphonicSynth-Keyboard/sketch.js | 83 + examples/polyphonic_synth/Piano.json | 4102 +++++++++++++++++ examples/polyphonic_synth/Piano_imag.txt | 1903 ++++++++ examples/polyphonic_synth/Piano_real.txt | 2197 +++++++++ examples/polyphonic_synth/Trombone.json | 4102 +++++++++++++++++ examples/polyphonic_synth/Trombone_imag.txt | 2049 ++++++++ examples/polyphonic_synth/Trombone_real.txt | 2049 ++++++++ .../Twelve String Guitar 1.json | 4102 +++++++++++++++++ .../TwelveStringGuitar_imag.txt | 2049 ++++++++ .../TwelveStringGuitar_real.txt | 2049 ++++++++ examples/polyphonic_synth/Wurlitzer_2.json | 2049 ++++++++ .../polyphonic_synth/Wurlitzer_2_imag.txt | 2049 ++++++++ .../polyphonic_synth/Wurlitzer_2_real.txt | 2049 ++++++++ examples/polyphonic_synth/sketch.js | 286 +- examples/polysynth_old/index.html | 20 + examples/polysynth_old/sketch.js | 110 + index.html | 4 +- lib/p5.js | 3257 +++++++------ lib/p5.min.js | 17 +- lib/p5.sound.js | 860 +--- lib/p5.sound.min.js | 12 +- src/monosynth.js | 13 +- 23 files changed, 33264 insertions(+), 2156 deletions(-) create mode 100644 examples/polyphonicSynth-Keyboard/index.html create mode 100644 examples/polyphonicSynth-Keyboard/sketch.js create mode 100644 examples/polyphonic_synth/Piano.json create mode 100644 examples/polyphonic_synth/Piano_imag.txt create mode 100644 examples/polyphonic_synth/Piano_real.txt create mode 100644 examples/polyphonic_synth/Trombone.json create mode 100644 examples/polyphonic_synth/Trombone_imag.txt create mode 100644 examples/polyphonic_synth/Trombone_real.txt create mode 100644 examples/polyphonic_synth/Twelve String Guitar 1.json create mode 100644 examples/polyphonic_synth/TwelveStringGuitar_imag.txt create mode 100644 examples/polyphonic_synth/TwelveStringGuitar_real.txt create mode 100644 examples/polyphonic_synth/Wurlitzer_2.json create mode 100644 examples/polyphonic_synth/Wurlitzer_2_imag.txt create mode 100644 examples/polyphonic_synth/Wurlitzer_2_real.txt create mode 100644 examples/polysynth_old/index.html create mode 100644 examples/polysynth_old/sketch.js diff --git a/examples/polyphonicSynth-Keyboard/index.html b/examples/polyphonicSynth-Keyboard/index.html new file mode 100644 index 00000000..6bb250e1 --- /dev/null +++ b/examples/polyphonicSynth-Keyboard/index.html @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/examples/polyphonicSynth-Keyboard/sketch.js b/examples/polyphonicSynth-Keyboard/sketch.js new file mode 100644 index 00000000..8ed15efe --- /dev/null +++ b/examples/polyphonicSynth-Keyboard/sketch.js @@ -0,0 +1,83 @@ +var polySynth; +var octave; + +var keysDown={}; +var colors = {}; +var keys = {}; +var notes = {}; + +var description; +function setup() { + + polySynth = new p5.PolySynth(p5.MonoSynth, 8); + stroke(0); + for(var i = 0; i<17; i++) { + if(i!==11 && i!==15){ + colors[i] = [color(255),false]; + } + } + + keys = {'A':60, 'W':61, 'S':62, 'E':63, 'D':64, 'F':65, 'T':66,'G':67, + 'Y':68, 'H':69, 'U':70, 'J':71, 'K':72, 'O':73, 'L':74}; + notes = {60:0, 62:1 , 64:2 , 65:3 , 67:4 , 69:5 , 71:6 , 72:7 , 74:8, + 61: 9, 63:10, 66:12, 68:13, 70:14, 73:16}; + octave = 0; + + description = createP('p5.PolySynth is a handler class for monophonic extensions '+ + 'of the p5.AudioVoice class. Use the computer keyboard to play notes on '+ + 'the piano roll. Use UP_ARROW and DOWN_ARROW to change octave'); +} + +function draw() { + background(255); + createCanvas(800,600); + + //draw white keys + for(var i = 0; i<9; i++) { + fill(colors[i][0]); + rect(50*i,0,50,230); + } + //draw black keys + for(var i = 9; i<17; i++) { + if(i!==11 && i!==15){ + fill(colors[i][0]); + rect(50*(i - 8) - 12.5, 0, 25, 150); + } + } + +} + +function keyPressed() { + //OCTAVEf + if (keyCode === UP_ARROW) { + octave +=12; + } else if (keyCode === DOWN_ARROW) { + octave -=12; + } + else if (keyToMidi() && keysDown[key] !== true){ + polySynth.noteAttack(keyToMidi() + octave); + var index = notes[keyToMidi()]; + colors[index][1] = !colors[index][1]; + colors[index][1] ? colors[index][0] = color(random(255),random(255),random(255)) : colors[index][0] = color(255); + if (keysDown[key] === undefined) { + keysDown[key] = true; + } + } +} + +function keyReleased() { + Object.keys(keysDown).forEach(function(key) { + if(!keyIsDown(key)){ + polySynth.noteRelease(keyToMidi(key) + octave); + var index = notes[keyToMidi(key)]; + colors[index][1] = !colors[index][1]; + colors[index][1] ? colors[index][0] = color(random(255),random(255),random(255)) : colors[index][0] = color(255); + delete keysDown[key]; + } + }); +} + +function keyToMidi(keyboard) { + var thisKey = typeof keyboard ==='undefined' ? key : keyboard + return keys[thisKey]; +} \ No newline at end of file diff --git a/examples/polyphonic_synth/Piano.json b/examples/polyphonic_synth/Piano.json new file mode 100644 index 00000000..7406fa6a --- /dev/null +++ b/examples/polyphonic_synth/Piano.json @@ -0,0 +1,4102 @@ +{ +real: [ +0.000000, +-0.000000, +-0.203569, +0.500000, +-0.401676, +0.137128, +-0.104117, +0.115965, +-0.004413, +0.067884, +-0.008880, +0.079300, +-0.038756, +0.011882, +-0.030883, +0.027608, +-0.013429, +0.003930, +-0.014029, +0.009720, +-0.007653, +0.007866, +-0.032029, +0.046127, +-0.024155, +0.023095, +-0.005522, +0.004511, +-0.003593, +0.011248, +-0.004919, +0.008505, +-0.002920, +0.001520, +-0.005641, +0.002615, +-0.001866, +0.001316, +-0.000320, +0.000800, +-0.000957, +0.001989, +-0.001172, +0.001682, +-0.002620, +0.000544, +-0.000734, +0.000186, +-0.000363, +0.000243, +-0.000142, +0.000437, +-0.000860, +0.000117, +-0.000350, +0.000110, +-0.000253, +0.000218, +-0.000061, +0.000015, +-0.000038, +0.000017, +-0.000025, +0.000007, +-0.000081, +0.000017, +-0.000064, +0.000166, +-0.000009, +0.000013, +-0.000024, +0.000001, +-0.000032, +0.000013, +-0.000018, +0.000007, +-0.000013, +0.000010, +-0.000023, +0.000008, +-0.000025, +0.000046, +-0.000035, +0.000006, +-0.000012, +0.000012, +-0.000024, +0.000023, +-0.000024, +0.000027, +-0.000010, +0.000022, +-0.000011, +0.000021, +-0.000007, +0.000011, +-0.000006, +0.000021, +-0.000014, +0.000026, +-0.000013, +0.000003, +-0.000032, +0.000033, +-0.000036, +0.000025, +-0.000020, +0.000026, +-0.000050, +0.000028, +-0.000013, +0.000008, +-0.000018, +0.000020, +-0.000086, +0.000120, +-0.000005, +0.000012, +-0.000016, +0.000028, +-0.000012, +0.000006, +-0.000015, +0.000012, +-0.000022, +0.000012, +-0.000023, +0.000024, +-0.000011, +0.000022, +-0.000009, +0.000018, +-0.000019, +0.000013, +-0.000042, +0.000015, +-0.000019, +0.000014, +-0.000019, +0.000007, +-0.000008, +0.000030, +-0.000011, +0.000011, +-0.000012, +0.000022, +-0.000007, +0.000018, +-0.000028, +0.000025, +-0.000020, +0.000008, +-0.000032, +0.000022, +-0.000010, +0.000013, +-0.000026, +0.000013, +-0.000024, +0.000009, +-0.000107, +0.000109, +-0.000007, +0.000014, +-0.000015, +0.000007, +-0.000029, +0.000045, +-0.000023, +0.000039, +-0.000010, +0.000029, +-0.000008, +0.000036, +-0.000018, +0.000007, +-0.000007, +0.000007, +-0.000025, +0.000010, +-0.000006, +0.000022, +-0.000021, +0.000007, +-0.000018, +0.000011, +-0.000011, +0.000010, +-0.000015, +0.000020, +-0.000012, +0.000004, +-0.000005, +0.000007, +-0.000007, +0.000003, +-0.000001, +0.000006, +-0.000007, +0.000018, +-0.000002, +0.000005, +-0.000008, +0.000006, +-0.000010, +0.000016, +-0.000010, +0.000021, +-0.000011, +0.000013, +-0.000011, +0.000005, +-0.000006, +0.000016, +-0.000014, +0.000014, +-0.000009, +0.000009, +-0.000004, +0.000013, +-0.000015, +0.000004, +-0.000007, +0.000007, +-0.000004, +0.000004, +-0.000009, +0.000010, +-0.000008, +0.000013, +-0.000012, +0.000001, +-0.000003, +0.000012, +-0.000004, +0.000004, +-0.000007, +0.000008, +-0.000010, +0.000013, +-0.000015, +0.000013, +-0.000010, +0.000012, +-0.000008, +0.000011, +-0.000024, +0.000008, +-0.000013, +0.000013, +-0.000018, +0.000005, +-0.000022, +0.000037, +-0.000019, +0.000027, +-0.000022, +0.000026, +-0.000029, +0.000029, +-0.000029, +0.000031, +-0.000034, +0.000032, +-0.000031, +0.000037, +-0.000033, +0.000038, +-0.000038, +0.000039, +-0.000036, +0.000035, +-0.000038, +0.000035, +-0.000034, +0.000033, +-0.000030, +0.000029, +-0.000028, +0.000025, +-0.000023, +0.000022, +-0.000020, +0.000018, +-0.000017, +0.000015, +-0.000014, +0.000013, +-0.000012, +0.000011, +-0.000011, +0.000010, +-0.000009, +0.000009, +-0.000009, +0.000008, +-0.000008, +0.000008, +-0.000008, +0.000007, +-0.000007, +0.000007, +-0.000007, +0.000006, +-0.000006, +0.000006, +-0.000006, +0.000006, +-0.000005, +0.000006, +-0.000006, +0.000005, +-0.000005, +0.000005, +-0.000005, +0.000005, +-0.000005, +0.000005, +-0.000005, +0.000004, +-0.000004, +0.000004, +-0.000005, +0.000004, +-0.000004, +0.000004, +-0.000004, +0.000004, +-0.000004, +0.000004, +-0.000004, +0.000004, +-0.000003, +0.000004, +-0.000004, +0.000003, +-0.000003, +0.000003, +-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.000002, +0.000003, +-0.000003, +0.000003, +-0.000002, +0.000003, +-0.000003, +0.000002, +-0.000002, +0.000002, +-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.000001, +0.000002, +-0.000002, +0.000002, +-0.000001, +0.000002, +-0.000002, +0.000002, +-0.000001, +0.000002, +-0.000002, +0.000001, +-0.000001, +0.000002, +-0.000002, +0.000001, +-0.000001, +0.000001, +-0.000002, +0.000001, +-0.000001, +0.000001, +-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.000000, +0.000001, +-0.000001, +0.000001, +-0.000000, +0.000001, +-0.000001, +0.000001, +-0.000000, +0.000001, +-0.000001, +0.000001, +-0.000000, +0.000001, +-0.000001, +0.000001, +-0.000000, +0.000001, +-0.000001, +0.000001, +-0.000000, +0.000001, +-0.000001, +0.000001, +-0.000000, +0.000001, +-0.000001, +0.000000, +-0.000000, +0.000001, +-0.000001, +0.000000, +-0.000000, +0.000000, +-0.000001, +0.000000, +-0.000000, +0.000000, +-0.000001, +0.000000, +-0.000000, +0.000000, +-0.000001, +0.000000, +-0.000000, +0.000000, +-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, +], +imag: [ +0.000000, +0.147621, +-0.000001, +0.000007, +-0.000010, +0.000005, +-0.000006, +0.000009, +-0.000000, +0.000008, +-0.000001, +0.000014, +-0.000008, +0.000003, +-0.000009, +0.000009, +-0.000005, +0.000002, +-0.000007, +0.000005, +-0.000005, +0.000005, +-0.000023, +0.000037, +-0.000021, +0.000022, +-0.000006, +0.000005, +-0.000004, +0.000014, +-0.000007, +0.000012, +-0.000004, +0.000002, +-0.000010, +0.000005, +-0.000004, +0.000003, +-0.000001, +0.000002, +-0.000002, +0.000005, +-0.000003, +0.000005, +-0.000008, +0.000002, +-0.000002, +0.000001, +-0.000001, +0.000001, +-0.000001, +0.000002, +-0.000003, +0.000000, +-0.000002, +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.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.000001, +-0.000001, +0.000000, +-0.000000, +0.000000, +-0.000001, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000002, +0.000002, +-0.000000, +0.000000, +-0.000000, +0.000001, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000001, +0.000001, +-0.000000, +0.000001, +-0.000000, +0.000000, +-0.000001, +0.000000, +-0.000001, +0.000000, +-0.000001, +0.000000, +-0.000001, +0.000000, +-0.000000, +0.000001, +-0.000000, +0.000000, +-0.000000, +0.000001, +-0.000000, +0.000001, +-0.000001, +0.000001, +-0.000001, +0.000000, +-0.000001, +0.000001, +-0.000000, +0.000000, +-0.000001, +0.000000, +-0.000001, +0.000000, +-0.000004, +0.000004, +-0.000000, +0.000001, +-0.000001, +0.000000, +-0.000001, +0.000002, +-0.000001, +0.000002, +-0.000000, +0.000001, +-0.000000, +0.000002, +-0.000001, +0.000000, +-0.000000, +0.000000, +-0.000001, +0.000000, +-0.000000, +0.000001, +-0.000001, +0.000000, +-0.000001, +0.000001, +-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.000001, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000001, +0.000001, +-0.000001, +0.000001, +-0.000001, +0.000001, +-0.000001, +0.000000, +-0.000000, +0.000001, +-0.000001, +0.000001, +-0.000001, +0.000001, +-0.000000, +0.000001, +-0.000001, +0.000000, +-0.000001, +0.000000, +-0.000000, +0.000000, +-0.000001, +0.000001, +-0.000001, +0.000001, +-0.000001, +0.000000, +-0.000000, +0.000001, +-0.000000, +0.000000, +-0.000001, +0.000001, +-0.000001, +0.000001, +-0.000001, +0.000001, +-0.000001, +0.000001, +-0.000001, +0.000001, +-0.000002, +0.000001, +-0.000001, +0.000001, +-0.000002, +0.000000, +-0.000002, +0.000004, +-0.000002, +0.000003, +-0.000002, +0.000003, +-0.000003, +0.000003, +-0.000003, +0.000003, +-0.000003, +0.000003, +-0.000003, +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.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.000000, +0.000001, +-0.000001, +0.000001, +-0.000000, +0.000001, +-0.000001, +0.000001, +-0.000000, +0.000001, +-0.000001, +0.000001, +-0.000000, +0.000001, +-0.000001, +0.000000, +-0.000000, +0.000001, +-0.000001, +0.000000, +-0.000000, +0.000000, +-0.000001, +0.000000, +-0.000000, +0.000000, +-0.000001, +0.000000, +-0.000000, +0.000000, +-0.000001, +0.000000, +-0.000000, +0.000000, +-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, +], +} diff --git a/examples/polyphonic_synth/Piano_imag.txt b/examples/polyphonic_synth/Piano_imag.txt new file mode 100644 index 00000000..2376b040 --- /dev/null +++ b/examples/polyphonic_synth/Piano_imag.txt @@ -0,0 +1,1903 @@ + +-0.000000, +0.000001, +-0.000001, +0.000001, +-0.000001, +0.000000, +-0.000001, +0.000001, +-0.000000, +0.000000, +-0.000001, +0.000000, +-0.000001, +0.000000, +-0.000004, +0.000004, +-0.000000, +0.000001, +-0.000001, +0.000000, +-0.000001, +0.000002, +-0.000001, +0.000002, +-0.000000, +0.000001, +-0.000000, +0.000002, +-0.000001, +0.000000, +-0.000000, +0.000000, +-0.000001, +0.000000, +-0.000000, +0.000001, +-0.000001, +0.000000, +-0.000001, +0.000001, +-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.000001, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000001, +0.000001, +-0.000001, +0.000001, +-0.000001, +0.000001, +-0.000001, +0.000000, +-0.000000, +0.000001, +-0.000001, +0.000001, +-0.000001, +0.000001, +-0.000000, +0.000001, +-0.000001, +0.000000, +-0.000001, +0.000000, +-0.000000, +0.000000, +-0.000001, +0.000001, +-0.000001, +0.000001, +-0.000001, +0.000000, +-0.000000, +0.000001, +-0.000000, +0.000000, +-0.000001, +0.000001, +-0.000001, +0.000001, +-0.000001, +0.000001, +-0.000001, +0.000001, +-0.000001, +0.000001, +-0.000002, +0.000001, +-0.000001, +0.000001, +-0.000002, +0.000000, +-0.000002, +0.000004, +-0.000002, +0.000003, +-0.000002, +0.000003, +-0.000003, +0.000003, +-0.000003, +0.000003, +-0.000003, +0.000003, +-0.000003, +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.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.000000, +0.000001, +-0.000001, +0.000001, +-0.000000, +0.000001, +-0.000001, +0.000001, +-0.000000, +0.000001, +-0.000001, +0.000001, +-0.000000, +0.000001, +-0.000001, +0.000000, +-0.000000, +0.000001, +-0.000001, +0.000000, +-0.000000, +0.000000, +-0.000001, +0.000000, +-0.000000, +0.000000, +-0.000001, +0.000000, +-0.000000, +0.000000, +-0.000001, +0.000000, +-0.000000, +0.000000, +-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, \ No newline at end of file diff --git a/examples/polyphonic_synth/Piano_real.txt b/examples/polyphonic_synth/Piano_real.txt new file mode 100644 index 00000000..608aaba9 --- /dev/null +++ b/examples/polyphonic_synth/Piano_real.txt @@ -0,0 +1,2197 @@ +0.000000 +-0.000000 +-0.203569 +0.500000 +-0.401676 +0.137128 +-0.104117 +0.115965 +-0.004413 +0.067884 +-0.008880 +0.079300 +-0.038756 +0.011882 +-0.030883 +0.027608 +-0.013429 +0.003930 +-0.014029 +0.009720 +-0.007653 +0.007866 +-0.032029 +0.046127 +-0.024155 +0.023095 +-0.005522 +0.004511 +-0.003593 +0.011248 +-0.004919 +0.008505 +-0.002920 +0.001520 +-0.005641 +0.002615 +-0.001866 +0.001316 +-0.000320 +0.000800 +-0.000957 +0.001989 +-0.001172 +0.001682 +-0.002620 +0.000544 +-0.000734 +0.000186 +-0.000363 +0.000243 +-0.000142 +0.000437 +-0.000860 +0.000117 +-0.000350 +0.000110 +-0.000253 +0.000218 +-0.000061 +0.000015 +-0.000038 +0.000017 +-0.000025 +0.000007 +-0.000081 +0.000017 +-0.000064 +0.000166 +-0.000009 +0.000013 +-0.000024 +0.000001 +-0.000032 +0.000013 +-0.000018 +0.000007 +-0.000013 +0.000010 +-0.000023 +0.000008 +-0.000025 +0.000046 +-0.000035 +0.000006 +-0.000012 +0.000012 +-0.000024 +0.000023 +-0.000024 +0.000027 +-0.000010 +0.000022 +-0.000011 +0.000021 +-0.000007 +0.000011 +-0.000006 +0.000021 +-0.000014 +0.000026 +-0.000013 +0.000003 +-0.000032 +0.000033 +-0.000036 +0.000025 +-0.000020 +0.000026 +-0.000050 +0.000028 +-0.000013 +0.000008 +-0.000018 +0.000020 +-0.000086 +0.000120 +-0.000005 +0.000012 +-0.000016 +0.000028 +-0.000012 +0.000006 +-0.000015 +0.000012 +-0.000022 +0.000012 +-0.000023 +0.000024 +-0.000011 +0.000022 +-0.000009 +0.000018 +-0.000019 +0.000013 +-0.000042 +0.000015 +-0.000019 +0.000014 +-0.000019 +0.000007 +-0.000008 +0.000030 +-0.000011 +0.000011 +-0.000012 +0.000022 +-0.000007 +0.000018 +-0.000028 +0.000025 +-0.000020 +0.000008 +-0.000032 +0.000022 +-0.000010 +0.000013 +-0.000026 +0.000013 +-0.000024 +0.000009 +-0.000107 +0.000109 +-0.000007 +0.000014 +-0.000015 +0.000007 +-0.000029 +0.000045 +-0.000023 +0.000039 +-0.000010 +0.000029 +-0.000008 +0.000036 +-0.000018 +0.000007 +-0.000007 +0.000007 +-0.000025 +0.000010 +-0.000006 +0.000022 +-0.000021 +0.000007 +-0.000018 +0.000011 +-0.000011 +0.000010 +-0.000015 +0.000020 +-0.000012 +0.000004 +-0.000005 +0.000007 +-0.000007 +0.000003 +-0.000001 +0.000006 +-0.000007 +0.000018 +-0.000002 +0.000005 +-0.000008 +0.000006 +-0.000010 +0.000016 +-0.000010 +0.000021 +-0.000011 +0.000013 +-0.000011 +0.000005 +-0.000006 +0.000016 +-0.000014 +0.000014 +-0.000009 +0.000009 +-0.000004 +0.000013 +-0.000015 +0.000004 +-0.000007 +0.000007 +-0.000004 +0.000004 +-0.000009 +0.000010 +-0.000008 +0.000013 +-0.000012 +0.000001 +-0.000003 +0.000012 +-0.000004 +0.000004 +-0.000007 +0.000008 +-0.000010 +0.000013 +-0.000015 +0.000013 +-0.000010 +0.000012 +-0.000008 +0.000011 +-0.000024 +0.000008 +-0.000013 +0.000013 +-0.000018 +0.000005 +-0.000022 +0.000037 +-0.000019 +0.000027 +-0.000022 +0.000026 +-0.000029 +0.000029 +-0.000029 +0.000031 +-0.000034 +0.000032 +-0.000031 +0.000037 +-0.000033 +0.000038 +-0.000038 +0.000039 +-0.000036 +0.000035 +-0.000038 +0.000035 +-0.000034 +0.000033 +-0.000030 +0.000029 +-0.000028 +0.000025 +-0.000023 +0.000022 +-0.000020 +0.000018 +-0.000017 +0.000015 +-0.000014 +0.000013 +-0.000012 +0.000011 +-0.000011 +0.000010 +-0.000009 +0.000009 +-0.000009 +0.000008 +-0.000008 +0.000008 +-0.000008 +0.000007 +-0.000007 +0.000007 +-0.000007 +0.000006 +-0.000006 +0.000006 +-0.000006 +0.000006 +-0.000005 +0.000006 +-0.000006 +0.000005 +-0.000005 +0.000005 +-0.000005 +0.000005 +-0.000005 +0.000005 +-0.000005 +0.000004 +-0.000004 +0.000004 +-0.000005 +0.000004 +-0.000004 +0.000004 +-0.000004 +0.000004 +-0.000004 +0.000004 +-0.000004 +0.000004 +-0.000003 +0.000004 +-0.000004 +0.000003 +-0.000003 +0.000003 +-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.000002 +0.000003 +-0.000003 +0.000003 +-0.000002 +0.000003 +-0.000003 +0.000002 +-0.000002 +0.000002 +-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.000001 +0.000002 +-0.000002 +0.000002 +-0.000001 +0.000002 +-0.000002 +0.000002 +-0.000001 +0.000002 +-0.000002 +0.000001 +-0.000001 +0.000002 +-0.000002 +0.000001 +-0.000001 +0.000001 +-0.000002 +0.000001 +-0.000001 +0.000001 +-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.000000 +0.000001 +-0.000001 +0.000001 +-0.000000 +0.000001 +-0.000001 +0.000001 +-0.000000 +0.000001 +-0.000001 +0.000001 +-0.000000 +0.000001 +-0.000001 +0.000001 +-0.000000 +0.000001 +-0.000001 +0.000001 +-0.000000 +0.000001 +-0.000001 +0.000001 +-0.000000 +0.000001 +-0.000001 +0.000000 +-0.000000 +0.000001 +-0.000001 +0.000000 +-0.000000 +0.000000 +-0.000001 +0.000000 +-0.000000 +0.000000 +-0.000001 +0.000000 +-0.000000 +0.000000 +-0.000001 +0.000000 +-0.000000 +0.000000 +-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.147621 +-0.000001 +0.000007 +-0.000010 +0.000005 +-0.000006 +0.000009 +-0.000000 +0.000008 +-0.000001 +0.000014 +-0.000008 +0.000003 +-0.000009 +0.000009 +-0.000005 +0.000002 +-0.000007 +0.000005 +-0.000005 +0.000005 +-0.000023 +0.000037 +-0.000021 +0.000022 +-0.000006 +0.000005 +-0.000004 +0.000014 +-0.000007 +0.000012 +-0.000004 +0.000002 +-0.000010 +0.000005 +-0.000004 +0.000003 +-0.000001 +0.000002 +-0.000002 +0.000005 +-0.000003 +0.000005 +-0.000008 +0.000002 +-0.000002 +0.000001 +-0.000001 +0.000001 +-0.000001 +0.000002 +-0.000003 +0.000000 +-0.000002 +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.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.000001 +-0.000001 +0.000000 +-0.000000 +0.000000 +-0.000001 +0.000000 +-0.000000 +0.000000 +-0.000000 +0.000000 +-0.000002 +0.000002 +-0.000000 +0.000000 +-0.000000 +0.000001 +-0.000000 +0.000000 +-0.000000 +0.000000 +-0.000000 +0.000000 +-0.000001 +0.000001 +-0.000000 +0.000001 +-0.000000 +0.000000 +-0.000001 +0.000000 +-0.000001 +0.000000 +-0.000001 +0.000000 +-0.000001 +0.000000 +-0.000000 +0.000001 +-0.000000 +0.000000 +-0.000000 +0.000001 + diff --git a/examples/polyphonic_synth/Trombone.json b/examples/polyphonic_synth/Trombone.json new file mode 100644 index 00000000..72a856da --- /dev/null +++ b/examples/polyphonic_synth/Trombone.json @@ -0,0 +1,4102 @@ +{ +'real': [ +0.000000, +0.171738, +0.131907, +-0.194800, +-0.129913, +-0.081043, +0.049213, +0.027828, +-0.008357, +-0.005044, +0.002145, +0.000773, +-0.001392, +-0.000916, +-0.000012, +0.000323, +-0.000003, +0.000127, +-0.000135, +-0.000029, +-0.000031, +0.000087, +-0.000091, +0.000005, +-0.000026, +0.000027, +-0.000062, +-0.000017, +-0.000002, +0.000002, +0.000012, +-0.000024, +0.000011, +-0.000011, +-0.000001, +-0.000000, +0.000003, +0.000006, +-0.000009, +-0.000002, +0.000001, +0.000007, +0.000014, +-0.000008, +-0.000001, +-0.000003, +-0.000011, +-0.000003, +0.000004, +-0.000002, +-0.000004, +0.000001, +-0.000004, +0.000001, +0.000003, +0.000001, +0.000002, +0.000003, +-0.000001, +-0.000005, +0.000000, +0.000001, +-0.000008, +0.000001, +0.000003, +-0.000004, +-0.000004, +-0.000002, +0.000003, +0.000000, +-0.000002, +-0.000009, +0.000009, +0.000024, +0.000011, +-0.000017, +-0.000024, +-0.000002, +-0.000000, +0.000002, +0.000015, +0.000022, +0.000001, +-0.000022, +-0.000016, +0.000001, +0.000002, +-0.000003, +-0.000002, +0.000001, +-0.000001, +0.000005, +0.000001, +-0.000001, +-0.000001, +0.000000, +-0.000001, +-0.000003, +-0.000001, +-0.000002, +0.000001, +-0.000003, +-0.000002, +0.000004, +0.000007, +-0.000002, +-0.000006, +-0.000009, +-0.000003, +-0.000001, +0.000001, +0.000000, +0.000006, +-0.000000, +-0.000009, +-0.000011, +0.000003, +0.000005, +-0.000002, +-0.000002, +-0.000001, +0.000001, +0.000001, +-0.000000, +-0.000001, +-0.000001, +0.000001, +0.000000, +-0.000001, +0.000002, +0.000001, +-0.000000, +-0.000000, +-0.000000, +-0.000001, +0.000000, +0.000000, +-0.000002, +-0.000001, +0.000000, +0.000000, +0.000000, +0.000001, +0.000001, +-0.000001, +-0.000001, +-0.000002, +0.000001, +0.000002, +-0.000001, +-0.000004, +0.000000, +0.000004, +0.000005, +0.000001, +0.000000, +-0.000002, +0.000000, +-0.000004, +0.000001, +0.000004, +0.000007, +-0.000000, +-0.000004, +-0.000000, +0.000002, +0.000001, +-0.000001, +0.000001, +0.000000, +0.000000, +-0.000001, +0.000000, +-0.000002, +0.000001, +0.000004, +-0.000000, +-0.000007, +0.000002, +0.000030, +0.000007, +-0.000035, +0.000007, +0.000111, +0.000036, +-0.000022, +-0.000053, +-0.000000, +0.000001, +-0.000004, +0.000035, +0.000082, +0.000040, +-0.000032, +-0.000062, +-0.000012, +0.000012, +-0.000008, +-0.000006, +0.000004, +0.000006, +0.000003, +0.000001, +0.000000, +0.000001, +-0.000000, +-0.000000, +-0.000001, +-0.000001, +-0.000001, +-0.000001, +-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.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-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.090905, +0.482287, +0.259485, +0.009402, +-0.125271, +-0.046816, +0.007872, +0.001762, +-0.010488, +-0.002305, +0.001791, +0.001101, +-0.000303, +-0.000064, +0.000143, +0.000059, +0.000116, +0.000120, +-0.000011, +-0.000066, +-0.000019, +0.000024, +0.000014, +0.000069, +0.000056, +0.000005, +0.000002, +-0.000026, +-0.000015, +0.000055, +0.000012, +0.000046, +-0.000007, +0.000007, +-0.000003, +-0.000007, +0.000002, +-0.000003, +-0.000010, +-0.000011, +-0.000004, +0.000003, +0.000001, +0.000005, +-0.000001, +-0.000004, +0.000001, +0.000001, +0.000001, +0.000004, +-0.000000, +-0.000001, +0.000001, +0.000004, +-0.000001, +-0.000002, +0.000000, +-0.000003, +-0.000004, +0.000003, +-0.000007, +0.000000, +0.000001, +0.000003, +0.000002, +0.000000, +-0.000001, +0.000000, +0.000001, +0.000006, +-0.000008, +-0.000016, +0.000013, +0.000017, +0.000013, +0.000001, +0.000000, +-0.000002, +-0.000001, +-0.000004, +0.000007, +0.000016, +0.000021, +-0.000008, +-0.000013, +0.000003, +0.000006, +-0.000001, +0.000001, +0.000002, +0.000000, +0.000001, +-0.000001, +0.000001, +-0.000000, +-0.000000, +-0.000004, +0.000002, +-0.000000, +0.000001, +0.000002, +-0.000001, +-0.000005, +0.000004, +0.000014, +0.000005, +-0.000006, +-0.000007, +-0.000001, +-0.000001, +0.000000, +0.000009, +0.000009, +0.000001, +-0.000006, +-0.000008, +0.000001, +0.000002, +-0.000001, +-0.000002, +-0.000000, +0.000001, +0.000001, +-0.000000, +-0.000000, +0.000002, +-0.000002, +-0.000000, +-0.000001, +0.000000, +0.000000, +-0.000001, +-0.000001, +-0.000000, +0.000000, +0.000001, +-0.000000, +-0.000000, +-0.000001, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000001, +0.000001, +-0.000002, +-0.000003, +-0.000001, +0.000002, +-0.000001, +-0.000007, +-0.000002, +0.000002, +0.000004, +0.000000, +0.000001, +0.000001, +-0.000002, +-0.000006, +-0.000002, +0.000003, +0.000006, +0.000001, +0.000000, +0.000000, +0.000002, +-0.000001, +-0.000001, +-0.000001, +0.000001, +-0.000000, +0.000000, +-0.000001, +-0.000000, +0.000003, +0.000008, +0.000001, +-0.000010, +-0.000006, +0.000015, +-0.000026, +-0.000075, +-0.000010, +0.000050, +0.000082, +0.000023, +-0.000004, +-0.000000, +-0.000002, +-0.000045, +-0.000002, +0.000041, +0.000093, +-0.000009, +-0.000034, +0.000008, +0.000020, +-0.000001, +-0.000006, +-0.000001, +0.000000, +-0.000002, +-0.000004, +-0.000003, +-0.000003, +-0.000002, +-0.000003, +-0.000002, +-0.000002, +-0.000002, +-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, +], +} diff --git a/examples/polyphonic_synth/Trombone_imag.txt b/examples/polyphonic_synth/Trombone_imag.txt new file mode 100644 index 00000000..8a0547c6 --- /dev/null +++ b/examples/polyphonic_synth/Trombone_imag.txt @@ -0,0 +1,2049 @@ + +0.000000, +-0.090905, +0.482287, +0.259485, +0.009402, +-0.125271, +-0.046816, +0.007872, +0.001762, +-0.010488, +-0.002305, +0.001791, +0.001101, +-0.000303, +-0.000064, +0.000143, +0.000059, +0.000116, +0.000120, +-0.000011, +-0.000066, +-0.000019, +0.000024, +0.000014, +0.000069, +0.000056, +0.000005, +0.000002, +-0.000026, +-0.000015, +0.000055, +0.000012, +0.000046, +-0.000007, +0.000007, +-0.000003, +-0.000007, +0.000002, +-0.000003, +-0.000010, +-0.000011, +-0.000004, +0.000003, +0.000001, +0.000005, +-0.000001, +-0.000004, +0.000001, +0.000001, +0.000001, +0.000004, +-0.000000, +-0.000001, +0.000001, +0.000004, +-0.000001, +-0.000002, +0.000000, +-0.000003, +-0.000004, +0.000003, +-0.000007, +0.000000, +0.000001, +0.000003, +0.000002, +0.000000, +-0.000001, +0.000000, +0.000001, +0.000006, +-0.000008, +-0.000016, +0.000013, +0.000017, +0.000013, +0.000001, +0.000000, +-0.000002, +-0.000001, +-0.000004, +0.000007, +0.000016, +0.000021, +-0.000008, +-0.000013, +0.000003, +0.000006, +-0.000001, +0.000001, +0.000002, +0.000000, +0.000001, +-0.000001, +0.000001, +-0.000000, +-0.000000, +-0.000004, +0.000002, +-0.000000, +0.000001, +0.000002, +-0.000001, +-0.000005, +0.000004, +0.000014, +0.000005, +-0.000006, +-0.000007, +-0.000001, +-0.000001, +0.000000, +0.000009, +0.000009, +0.000001, +-0.000006, +-0.000008, +0.000001, +0.000002, +-0.000001, +-0.000002, +-0.000000, +0.000001, +0.000001, +-0.000000, +-0.000000, +0.000002, +-0.000002, +-0.000000, +-0.000001, +0.000000, +0.000000, +-0.000001, +-0.000001, +-0.000000, +0.000000, +0.000001, +-0.000000, +-0.000000, +-0.000001, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000001, +0.000001, +-0.000002, +-0.000003, +-0.000001, +0.000002, +-0.000001, +-0.000007, +-0.000002, +0.000002, +0.000004, +0.000000, +0.000001, +0.000001, +-0.000002, +-0.000006, +-0.000002, +0.000003, +0.000006, +0.000001, +0.000000, +0.000000, +0.000002, +-0.000001, +-0.000001, +-0.000001, +0.000001, +-0.000000, +0.000000, +-0.000001, +-0.000000, +0.000003, +0.000008, +0.000001, +-0.000010, +-0.000006, +0.000015, +-0.000026, +-0.000075, +-0.000010, +0.000050, +0.000082, +0.000023, +-0.000004, +-0.000000, +-0.000002, +-0.000045, +-0.000002, +0.000041, +0.000093, +-0.000009, +-0.000034, +0.000008, +0.000020, +-0.000001, +-0.000006, +-0.000001, +0.000000, +-0.000002, +-0.000004, +-0.000003, +-0.000003, +-0.000002, +-0.000003, +-0.000002, +-0.000002, +-0.000002, +-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, diff --git a/examples/polyphonic_synth/Trombone_real.txt b/examples/polyphonic_synth/Trombone_real.txt new file mode 100644 index 00000000..60c31a5d --- /dev/null +++ b/examples/polyphonic_synth/Trombone_real.txt @@ -0,0 +1,2049 @@ +0.000000, +0.171738, +0.131907, +-0.194800, +-0.129913, +-0.081043, +0.049213, +0.027828, +-0.008357, +-0.005044, +0.002145, +0.000773, +-0.001392, +-0.000916, +-0.000012, +0.000323, +-0.000003, +0.000127, +-0.000135, +-0.000029, +-0.000031, +0.000087, +-0.000091, +0.000005, +-0.000026, +0.000027, +-0.000062, +-0.000017, +-0.000002, +0.000002, +0.000012, +-0.000024, +0.000011, +-0.000011, +-0.000001, +-0.000000, +0.000003, +0.000006, +-0.000009, +-0.000002, +0.000001, +0.000007, +0.000014, +-0.000008, +-0.000001, +-0.000003, +-0.000011, +-0.000003, +0.000004, +-0.000002, +-0.000004, +0.000001, +-0.000004, +0.000001, +0.000003, +0.000001, +0.000002, +0.000003, +-0.000001, +-0.000005, +0.000000, +0.000001, +-0.000008, +0.000001, +0.000003, +-0.000004, +-0.000004, +-0.000002, +0.000003, +0.000000, +-0.000002, +-0.000009, +0.000009, +0.000024, +0.000011, +-0.000017, +-0.000024, +-0.000002, +-0.000000, +0.000002, +0.000015, +0.000022, +0.000001, +-0.000022, +-0.000016, +0.000001, +0.000002, +-0.000003, +-0.000002, +0.000001, +-0.000001, +0.000005, +0.000001, +-0.000001, +-0.000001, +0.000000, +-0.000001, +-0.000003, +-0.000001, +-0.000002, +0.000001, +-0.000003, +-0.000002, +0.000004, +0.000007, +-0.000002, +-0.000006, +-0.000009, +-0.000003, +-0.000001, +0.000001, +0.000000, +0.000006, +-0.000000, +-0.000009, +-0.000011, +0.000003, +0.000005, +-0.000002, +-0.000002, +-0.000001, +0.000001, +0.000001, +-0.000000, +-0.000001, +-0.000001, +0.000001, +0.000000, +-0.000001, +0.000002, +0.000001, +-0.000000, +-0.000000, +-0.000000, +-0.000001, +0.000000, +0.000000, +-0.000002, +-0.000001, +0.000000, +0.000000, +0.000000, +0.000001, +0.000001, +-0.000001, +-0.000001, +-0.000002, +0.000001, +0.000002, +-0.000001, +-0.000004, +0.000000, +0.000004, +0.000005, +0.000001, +0.000000, +-0.000002, +0.000000, +-0.000004, +0.000001, +0.000004, +0.000007, +-0.000000, +-0.000004, +-0.000000, +0.000002, +0.000001, +-0.000001, +0.000001, +0.000000, +0.000000, +-0.000001, +0.000000, +-0.000002, +0.000001, +0.000004, +-0.000000, +-0.000007, +0.000002, +0.000030, +0.000007, +-0.000035, +0.000007, +0.000111, +0.000036, +-0.000022, +-0.000053, +-0.000000, +0.000001, +-0.000004, +0.000035, +0.000082, +0.000040, +-0.000032, +-0.000062, +-0.000012, +0.000012, +-0.000008, +-0.000006, +0.000004, +0.000006, +0.000003, +0.000001, +0.000000, +0.000001, +-0.000000, +-0.000000, +-0.000001, +-0.000001, +-0.000001, +-0.000001, +-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.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, +-0.000000, + diff --git a/examples/polyphonic_synth/Twelve String Guitar 1.json b/examples/polyphonic_synth/Twelve String Guitar 1.json new file mode 100644 index 00000000..0fd0a578 --- /dev/null +++ b/examples/polyphonic_synth/Twelve String Guitar 1.json @@ -0,0 +1,4102 @@ +{ +'real': [ +0.000000, +-0.000000, +-0.179748, +0.252497, +-0.212162, +0.069443, +-0.067304, +0.006291, +-0.063344, +0.007604, +-0.069661, +0.004429, +-0.019030, +0.000601, +-0.001895, +0.000841, +-0.009026, +0.001311, +-0.024059, +0.002217, +-0.019063, +0.002118, +-0.048490, +0.000659, +-0.007014, +0.000529, +-0.003632, +0.000157, +-0.000265, +0.000046, +-0.000325, +0.000503, +-0.002858, +0.000919, +-0.000522, +0.000382, +-0.001499, +0.000666, +-0.001448, +0.000540, +-0.000721, +0.000863, +-0.000699, +0.000183, +-0.000186, +0.000576, +-0.000087, +0.000079, +-0.000397, +0.000466, +-0.000188, +0.000093, +-0.000214, +0.000078, +-0.000182, +0.000103, +-0.000197, +0.000124, +-0.000035, +0.000173, +-0.000053, +0.000140, +-0.000139, +0.000021, +-0.000067, +0.000136, +-0.000084, +0.000078, +-0.000033, +0.000022, +-0.000065, +0.000057, +-0.000119, +0.000023, +-0.000061, +0.000069, +-0.000083, +0.000104, +-0.000055, +0.000109, +-0.000191, +0.000026, +-0.000081, +0.000038, +-0.000088, +0.000021, +-0.000050, +0.000043, +-0.000120, +0.000021, +-0.000058, +0.000078, +-0.000026, +0.000033, +-0.000030, +0.000057, +-0.000035, +0.000033, +-0.000042, +0.000027, +-0.000059, +0.000008, +-0.000049, +0.000045, +-0.000020, +0.000020, +-0.000028, +0.000037, +-0.000093, +0.000029, +-0.000042, +0.000031, +-0.000022, +0.000020, +-0.000047, +0.000035, +-0.000044, +0.000027, +-0.000030, +0.000007, +-0.000015, +0.000019, +-0.000030, +0.000008, +-0.000015, +0.000025, +-0.000011, +0.000006, +-0.000003, +0.000019, +-0.000013, +0.000019, +-0.000036, +0.000026, +-0.000022, +0.000018, +-0.000025, +0.000013, +-0.000014, +0.000013, +-0.000039, +0.000039, +-0.000099, +0.000079, +-0.000069, +0.000020, +-0.000051, +0.000017, +-0.000014, +0.000012, +-0.000020, +0.000011, +-0.000020, +0.000041, +-0.000028, +0.000033, +-0.000017, +0.000022, +-0.000018, +0.000007, +-0.000027, +0.000018, +-0.000019, +0.000015, +-0.000009, +0.000019, +-0.000018, +0.000026, +-0.000036, +0.000015, +-0.000007, +0.000004, +-0.000036, +0.000003, +-0.000038, +0.000020, +-0.000013, +0.000014, +-0.000016, +0.000004, +-0.000011, +0.000016, +-0.000030, +0.000034, +-0.000024, +0.000059, +-0.000115, +0.000069, +-0.000016, +0.000029, +-0.000007, +0.000006, +-0.000010, +0.000014, +-0.000005, +0.000014, +-0.000012, +0.000046, +-0.000010, +0.000006, +-0.000012, +0.000009, +-0.000006, +0.000024, +-0.000006, +0.000005, +-0.000008, +0.000010, +-0.000007, +0.000005, +-0.000003, +0.000007, +-0.000007, +0.000012, +-0.000005, +0.000005, +-0.000004, +0.000006, +-0.000010, +0.000007, +-0.000003, +0.000003, +-0.000009, +0.000007, +-0.000006, +0.000007, +-0.000003, +0.000005, +-0.000008, +0.000010, +-0.000006, +0.000007, +-0.000007, +0.000006, +-0.000006, +0.000006, +-0.000005, +0.000004, +-0.000004, +0.000004, +-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.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.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-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.208930, +-0.000001, +0.000004, +-0.000005, +0.000003, +-0.000004, +0.000000, +-0.000006, +0.000001, +-0.000010, +0.000001, +-0.000004, +0.000000, +-0.000001, +0.000000, +-0.000003, +0.000001, +-0.000012, +0.000001, +-0.000011, +0.000001, +-0.000035, +0.000001, +-0.000006, +0.000000, +-0.000004, +0.000000, +0.000000, +0.000000, +0.000000, +0.000001, +-0.000004, +0.000001, +-0.000001, +0.000001, +-0.000003, +0.000001, +-0.000003, +0.000001, +-0.000002, +0.000002, +-0.000002, +0.000001, +-0.000001, +0.000002, +0.000000, +0.000000, +-0.000001, +0.000002, +-0.000001, +0.000000, +-0.000001, +0.000000, +-0.000001, +0.000000, +-0.000001, +0.000001, +0.000000, +0.000001, +0.000000, +0.000001, +-0.000001, +0.000000, +0.000000, +0.000001, +-0.000001, +0.000001, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000001, +0.000000, +-0.000001, +0.000001, +-0.000001, +0.000001, +0.000000, +0.000001, +-0.000002, +0.000000, +-0.000001, +0.000000, +-0.000001, +0.000000, +-0.000001, +0.000000, +-0.000001, +0.000000, +-0.000001, +0.000001, +0.000000, +0.000000, +0.000000, +0.000001, +0.000000, +0.000000, +-0.000001, +0.000000, +-0.000001, +0.000000, +-0.000001, +0.000001, +0.000000, +0.000000, +0.000000, +0.000001, +-0.000002, +0.000001, +-0.000001, +0.000001, +0.000000, +0.000000, +-0.000001, +0.000001, +-0.000001, +0.000001, +-0.000001, +0.000000, +0.000000, +0.000000, +-0.000001, +0.000000, +0.000000, +0.000001, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000001, +-0.000001, +0.000001, +-0.000001, +0.000000, +-0.000001, +0.000000, +0.000000, +0.000000, +-0.000001, +0.000001, +-0.000003, +0.000002, +-0.000002, +0.000001, +-0.000002, +0.000001, +0.000000, +0.000000, +-0.000001, +0.000000, +-0.000001, +0.000001, +-0.000001, +0.000001, +-0.000001, +0.000001, +-0.000001, +0.000000, +-0.000001, +0.000001, +-0.000001, +0.000001, +0.000000, +0.000001, +-0.000001, +0.000001, +-0.000002, +0.000001, +0.000000, +0.000000, +-0.000002, +0.000000, +-0.000002, +0.000001, +-0.000001, +0.000001, +-0.000001, +0.000000, +-0.000001, +0.000001, +-0.000001, +0.000002, +-0.000001, +0.000003, +-0.000006, +0.000004, +-0.000001, +0.000002, +0.000000, +0.000000, +-0.000001, +0.000001, +0.000000, +0.000001, +-0.000001, +0.000003, +-0.000001, +0.000000, +-0.000001, +0.000001, +0.000000, +0.000001, +0.000000, +0.000000, +-0.000001, +0.000001, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000001, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000001, +0.000000, +0.000000, +0.000000, +-0.000001, +0.000001, +0.000000, +0.000001, +0.000000, +0.000000, +-0.000001, +0.000001, +0.000000, +0.000001, +-0.000001, +0.000000, +-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, +], +} diff --git a/examples/polyphonic_synth/TwelveStringGuitar_imag.txt b/examples/polyphonic_synth/TwelveStringGuitar_imag.txt new file mode 100644 index 00000000..c1639fbe --- /dev/null +++ b/examples/polyphonic_synth/TwelveStringGuitar_imag.txt @@ -0,0 +1,2049 @@ + +0.000000, +0.208930, +-0.000001, +0.000004, +-0.000005, +0.000003, +-0.000004, +0.000000, +-0.000006, +0.000001, +-0.000010, +0.000001, +-0.000004, +0.000000, +-0.000001, +0.000000, +-0.000003, +0.000001, +-0.000012, +0.000001, +-0.000011, +0.000001, +-0.000035, +0.000001, +-0.000006, +0.000000, +-0.000004, +0.000000, +0.000000, +0.000000, +0.000000, +0.000001, +-0.000004, +0.000001, +-0.000001, +0.000001, +-0.000003, +0.000001, +-0.000003, +0.000001, +-0.000002, +0.000002, +-0.000002, +0.000001, +-0.000001, +0.000002, +0.000000, +0.000000, +-0.000001, +0.000002, +-0.000001, +0.000000, +-0.000001, +0.000000, +-0.000001, +0.000000, +-0.000001, +0.000001, +0.000000, +0.000001, +0.000000, +0.000001, +-0.000001, +0.000000, +0.000000, +0.000001, +-0.000001, +0.000001, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000001, +0.000000, +-0.000001, +0.000001, +-0.000001, +0.000001, +0.000000, +0.000001, +-0.000002, +0.000000, +-0.000001, +0.000000, +-0.000001, +0.000000, +-0.000001, +0.000000, +-0.000001, +0.000000, +-0.000001, +0.000001, +0.000000, +0.000000, +0.000000, +0.000001, +0.000000, +0.000000, +-0.000001, +0.000000, +-0.000001, +0.000000, +-0.000001, +0.000001, +0.000000, +0.000000, +0.000000, +0.000001, +-0.000002, +0.000001, +-0.000001, +0.000001, +0.000000, +0.000000, +-0.000001, +0.000001, +-0.000001, +0.000001, +-0.000001, +0.000000, +0.000000, +0.000000, +-0.000001, +0.000000, +0.000000, +0.000001, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000001, +-0.000001, +0.000001, +-0.000001, +0.000000, +-0.000001, +0.000000, +0.000000, +0.000000, +-0.000001, +0.000001, +-0.000003, +0.000002, +-0.000002, +0.000001, +-0.000002, +0.000001, +0.000000, +0.000000, +-0.000001, +0.000000, +-0.000001, +0.000001, +-0.000001, +0.000001, +-0.000001, +0.000001, +-0.000001, +0.000000, +-0.000001, +0.000001, +-0.000001, +0.000001, +0.000000, +0.000001, +-0.000001, +0.000001, +-0.000002, +0.000001, +0.000000, +0.000000, +-0.000002, +0.000000, +-0.000002, +0.000001, +-0.000001, +0.000001, +-0.000001, +0.000000, +-0.000001, +0.000001, +-0.000001, +0.000002, +-0.000001, +0.000003, +-0.000006, +0.000004, +-0.000001, +0.000002, +0.000000, +0.000000, +-0.000001, +0.000001, +0.000000, +0.000001, +-0.000001, +0.000003, +-0.000001, +0.000000, +-0.000001, +0.000001, +0.000000, +0.000001, +0.000000, +0.000000, +-0.000001, +0.000001, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000001, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000001, +0.000000, +0.000000, +0.000000, +-0.000001, +0.000001, +0.000000, +0.000001, +0.000000, +0.000000, +-0.000001, +0.000001, +0.000000, +0.000001, +-0.000001, +0.000000, +-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, diff --git a/examples/polyphonic_synth/TwelveStringGuitar_real.txt b/examples/polyphonic_synth/TwelveStringGuitar_real.txt new file mode 100644 index 00000000..4edc944d --- /dev/null +++ b/examples/polyphonic_synth/TwelveStringGuitar_real.txt @@ -0,0 +1,2049 @@ + +0.000000, +-0.000000, +-0.179748, +0.252497, +-0.212162, +0.069443, +-0.067304, +0.006291, +-0.063344, +0.007604, +-0.069661, +0.004429, +-0.019030, +0.000601, +-0.001895, +0.000841, +-0.009026, +0.001311, +-0.024059, +0.002217, +-0.019063, +0.002118, +-0.048490, +0.000659, +-0.007014, +0.000529, +-0.003632, +0.000157, +-0.000265, +0.000046, +-0.000325, +0.000503, +-0.002858, +0.000919, +-0.000522, +0.000382, +-0.001499, +0.000666, +-0.001448, +0.000540, +-0.000721, +0.000863, +-0.000699, +0.000183, +-0.000186, +0.000576, +-0.000087, +0.000079, +-0.000397, +0.000466, +-0.000188, +0.000093, +-0.000214, +0.000078, +-0.000182, +0.000103, +-0.000197, +0.000124, +-0.000035, +0.000173, +-0.000053, +0.000140, +-0.000139, +0.000021, +-0.000067, +0.000136, +-0.000084, +0.000078, +-0.000033, +0.000022, +-0.000065, +0.000057, +-0.000119, +0.000023, +-0.000061, +0.000069, +-0.000083, +0.000104, +-0.000055, +0.000109, +-0.000191, +0.000026, +-0.000081, +0.000038, +-0.000088, +0.000021, +-0.000050, +0.000043, +-0.000120, +0.000021, +-0.000058, +0.000078, +-0.000026, +0.000033, +-0.000030, +0.000057, +-0.000035, +0.000033, +-0.000042, +0.000027, +-0.000059, +0.000008, +-0.000049, +0.000045, +-0.000020, +0.000020, +-0.000028, +0.000037, +-0.000093, +0.000029, +-0.000042, +0.000031, +-0.000022, +0.000020, +-0.000047, +0.000035, +-0.000044, +0.000027, +-0.000030, +0.000007, +-0.000015, +0.000019, +-0.000030, +0.000008, +-0.000015, +0.000025, +-0.000011, +0.000006, +-0.000003, +0.000019, +-0.000013, +0.000019, +-0.000036, +0.000026, +-0.000022, +0.000018, +-0.000025, +0.000013, +-0.000014, +0.000013, +-0.000039, +0.000039, +-0.000099, +0.000079, +-0.000069, +0.000020, +-0.000051, +0.000017, +-0.000014, +0.000012, +-0.000020, +0.000011, +-0.000020, +0.000041, +-0.000028, +0.000033, +-0.000017, +0.000022, +-0.000018, +0.000007, +-0.000027, +0.000018, +-0.000019, +0.000015, +-0.000009, +0.000019, +-0.000018, +0.000026, +-0.000036, +0.000015, +-0.000007, +0.000004, +-0.000036, +0.000003, +-0.000038, +0.000020, +-0.000013, +0.000014, +-0.000016, +0.000004, +-0.000011, +0.000016, +-0.000030, +0.000034, +-0.000024, +0.000059, +-0.000115, +0.000069, +-0.000016, +0.000029, +-0.000007, +0.000006, +-0.000010, +0.000014, +-0.000005, +0.000014, +-0.000012, +0.000046, +-0.000010, +0.000006, +-0.000012, +0.000009, +-0.000006, +0.000024, +-0.000006, +0.000005, +-0.000008, +0.000010, +-0.000007, +0.000005, +-0.000003, +0.000007, +-0.000007, +0.000012, +-0.000005, +0.000005, +-0.000004, +0.000006, +-0.000010, +0.000007, +-0.000003, +0.000003, +-0.000009, +0.000007, +-0.000006, +0.000007, +-0.000003, +0.000005, +-0.000008, +0.000010, +-0.000006, +0.000007, +-0.000007, +0.000006, +-0.000006, +0.000006, +-0.000005, +0.000004, +-0.000004, +0.000004, +-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.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.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, diff --git a/examples/polyphonic_synth/Wurlitzer_2.json b/examples/polyphonic_synth/Wurlitzer_2.json new file mode 100644 index 00000000..065ab4a1 --- /dev/null +++ b/examples/polyphonic_synth/Wurlitzer_2.json @@ -0,0 +1,2049 @@ + +0.000000, +0.256157, +0.287502, +-0.339160, +-0.045240, +0.276038, +-0.076183, +-0.156578, +0.088660, +0.052823, +-0.043895, +-0.008253, +0.007385, +-0.000169, +0.006791, +-0.001930, +-0.004648, +0.001325, +-0.000465, +0.001447, +0.001490, +-0.002043, +-0.000279, +-0.000533, +0.000236, +0.002956, +-0.001489, +-0.003211, +0.001774, +0.002716, +-0.001572, +-0.001386, +0.000224, +0.000647, +0.000789, +-0.000461, +-0.001531, +-0.001118, +0.001330, +0.001274, +-0.000936, +-0.000203, +0.000985, +-0.000564, +0.000788, +0.001126, +-0.001179, +-0.001221, +0.001110, +0.001014, +-0.000723, +-0.000493, +0.000083, +0.000492, +0.000849, +-0.000563, +-0.000956, +0.000291, +0.000357, +-0.000922, +-0.000476, +-0.000995, +-0.000511, +-0.000877, +-0.000000, +-0.000845, +-0.000818, +-0.000578, +-0.000712, +-0.000626, +-0.000806, +-0.000853, +-0.000723, +-0.000469, +-0.000713, +-0.000000, +0.000661, +-0.000628, +0.000549, +0.000694, +-0.000349, +-0.000204, +0.000253, +-0.000653, +-0.000089, +-0.000332, +-0.000399, +-0.000661, +0.000365, +0.000107, +-0.000493, +-0.000358, +0.000333, +0.000400, +-0.000497, +0.000495, +0.000492, +-0.000141, +0.000345, +0.000153, +0.000452, +0.000359, +-0.000000, +0.000468, +-0.000085, +0.000114, +0.000452, +-0.000388, +-0.000306, +0.000392, +-0.000411, +-0.000444, +-0.000000, +-0.000099, +-0.000274, +0.000273, +-0.000198, +-0.000334, +-0.000280, +-0.000293, +-0.000106, +-0.000165, +-0.000252, +-0.000264, +-0.000197, +-0.000320, +-0.000064, +-0.000322, +-0.000324, +0.000063, +-0.000287, +-0.000256, +-0.000255, +-0.000301, +-0.000077, +-0.000114, +-0.000227, +-0.000080, +0.000178, +-0.000079, +-0.000112, +-0.000249, +0.000060, +-0.000000, +0.000246, +-0.000000, +-0.000000, +0.000172, +0.000243, +-0.000000, +-0.000000, +-0.000170, +0.000169, +0.000107, +-0.000168, +0.000237, +0.000106, +-0.000000, +-0.000166, +-0.000105, +-0.000046, +-0.000208, +-0.000145, +-0.000092, +-0.000144, +-0.000182, +-0.000192, +-0.000064, +-0.000143, +-0.000111, +-0.000179, +-0.000173, +0.000141, +0.000140, +-0.000193, +-0.000182, +0.000022, +-0.000139, +-0.000035, +-0.000185, +-0.000160, +-0.000000, +0.000194, +-0.000186, +-0.000183, +-0.000182, +-0.000153, +-0.000000, +-0.000135, +0.000065, +-0.000170, +-0.000179, +0.000189, +0.000181, +-0.000162, +-0.000128, +0.000068, +-0.000045, +-0.000000, +-0.000065, +-0.000084, +0.000027, +-0.000158, +-0.000145, +-0.000145, +-0.000161, +0.000142, +-0.000000, +-0.000135, +0.000055, +0.000037, +-0.000060, +-0.000019, +-0.000094, +-0.000141, +0.000128, +-0.000154, +-0.000157, +-0.000111, +-0.000104, +-0.000142, +-0.000110, +-0.000115, +-0.000095, +-0.000084, +-0.000073, +0.000028, +-0.000020, +-0.000048, +0.000027, +0.000043, +0.000068, +0.000082, +0.000081, +0.000100, +0.000119, +0.000125, +0.000127, +0.000134, +0.000137, +0.000144, +0.000141, +0.000141, +0.000145, +0.000145, +0.000143, +0.000143, +0.000143, +0.000142, +0.000139, +0.000130, +0.000130, +0.000130, +0.000130, +0.000129, +0.000129, +0.000129, +0.000129, +0.000121, +0.000121, +0.000121, +0.000120, +0.000120, +0.000120, +0.000120, +0.000120, +0.000119, +0.000119, +0.000119, +0.000119, +0.000118, +0.000118, +0.000118, +0.000118, +0.000118, +0.000117, +0.000117, +0.000117, +0.000130, +0.000130, +0.000130, +0.000130, +0.000130, +0.000129, +0.000129, +0.000129, +0.000129, +0.000128, +0.000128, +0.000128, +0.000128, +0.000128, +0.000127, +0.000127, +0.000127, +0.000127, +0.000126, +0.000126, +0.000126, +0.000126, +0.000126, +0.000125, +0.000125, +0.000125, +0.000125, +0.000125, +0.000124, +0.000124, +0.000124, +0.000124, +0.000124, +0.000123, +0.000123, +0.000123, +0.000123, +0.000123, +0.000122, +0.000122, +0.000122, +0.000122, +0.000122, +0.000121, +0.000121, +0.000121, +0.000121, +0.000121, +0.000121, +0.000120, +0.000120, +0.000120, +0.000120, +0.000120, +0.000119, +0.000099, +0.000099, +0.000099, +0.000099, +0.000099, +0.000098, +0.000098, +0.000098, +0.000098, +0.000098, +0.000098, +0.000098, +0.000097, +0.000097, +0.000097, +0.000097, +0.000097, +0.000097, +0.000097, +0.000096, +0.000096, +0.000096, +0.000096, +0.000096, +0.000096, +0.000096, +0.000096, +0.000095, +0.000095, +0.000095, +0.000095, +0.000095, +0.000095, +0.000095, +0.000094, +0.000094, +0.000094, +0.000094, +0.000094, +0.000094, +0.000094, +0.000094, +0.000093, +0.000093, +0.000093, +0.000093, +0.000093, +0.000093, +0.000093, +0.000093, +0.000093, +0.000092, +0.000092, +0.000092, +0.000092, +0.000092, +0.000092, +0.000092, +0.000092, +0.000091, +0.000091, +0.000091, +0.000091, +0.000091, +0.000091, +0.000091, +0.000091, +0.000091, +0.000090, +0.000090, +0.000090, +0.000090, +0.000090, +0.000090, +0.000090, +0.000090, +0.000090, +0.000089, +0.000089, +0.000089, +0.000089, +0.000089, +0.000089, +0.000089, +0.000089, +0.000089, +0.000088, +0.000088, +0.000088, +0.000088, +0.000088, +0.000088, +0.000088, +0.000088, +0.000088, +0.000088, +0.000087, +0.000087, +0.000087, +0.000087, +0.000087, +0.000087, +0.000087, +0.000087, +0.000087, +0.000087, +0.000086, +0.000086, +0.000086, +0.000086, +0.000086, +0.000086, +0.000086, +0.000086, +0.000086, +0.000086, +0.000085, +0.000085, +0.000085, +0.000085, +0.000085, +0.000085, +0.000085, +0.000085, +0.000085, +0.000085, +0.000085, +0.000084, +0.000084, +0.000070, +0.000070, +0.000070, +0.000070, +0.000070, +0.000070, +0.000070, +0.000070, +0.000069, +0.000069, +0.000069, +0.000069, +0.000069, +0.000069, +0.000069, +0.000069, +0.000069, +0.000069, +0.000069, +0.000069, +0.000069, +0.000069, +0.000068, +0.000068, +0.000068, +0.000068, +0.000068, +0.000068, +0.000068, +0.000068, +0.000068, +0.000068, +0.000068, +0.000068, +0.000068, +0.000068, +0.000068, +0.000067, +0.000067, +0.000067, +0.000067, +0.000067, +0.000067, +0.000067, +0.000067, +0.000067, +0.000067, +0.000067, +0.000067, +0.000067, +0.000067, +0.000067, +0.000066, +0.000066, +0.000066, +0.000066, +0.000066, +0.000066, +0.000066, +0.000066, +0.000066, +0.000066, +0.000066, +0.000066, +0.000066, +0.000066, +0.000066, +0.000066, +0.000065, +0.000065, +0.000065, +0.000065, +0.000065, +0.000065, +0.000065, +0.000065, +0.000065, +0.000065, +0.000065, +0.000065, +0.000065, +0.000065, +0.000065, +0.000065, +0.000064, +0.000064, +0.000064, +0.000064, +0.000064, +0.000064, +0.000064, +0.000064, +0.000064, +0.000064, +0.000064, +0.000064, +0.000064, +0.000064, +0.000064, +0.000064, +0.000064, +0.000064, +0.000063, +0.000063, +0.000063, +0.000063, +0.000063, +0.000063, +0.000063, +0.000063, +0.000063, +0.000063, +0.000063, +0.000063, +0.000063, +0.000063, +0.000063, +0.000063, +0.000063, +0.000063, +0.000062, +0.000062, +0.000062, +0.000062, +0.000062, +0.000062, +0.000062, +0.000062, +0.000062, +0.000062, +0.000062, +0.000062, +0.000062, +0.000062, +0.000062, +0.000062, +0.000062, +0.000062, +0.000062, +0.000061, +0.000061, +0.000061, +0.000061, +0.000061, +0.000061, +0.000061, +0.000061, +0.000061, +0.000061, +0.000061, +0.000061, +0.000061, +0.000061, +0.000061, +0.000061, +0.000061, +0.000061, +0.000061, +0.000061, +0.000060, +0.000060, +0.000060, +0.000060, +0.000060, +0.000060, +0.000060, +0.000060, +0.000060, +0.000055, +0.000055, +0.000055, +0.000055, +0.000055, +0.000055, +0.000055, +0.000054, +0.000054, +0.000054, +0.000054, +0.000054, +0.000054, +0.000054, +0.000054, +0.000054, +0.000054, +0.000054, +0.000054, +0.000054, +0.000054, +0.000054, +0.000054, +0.000054, +0.000054, +0.000054, +0.000054, +0.000054, +0.000054, +0.000054, +0.000054, +0.000053, +0.000053, +0.000053, +0.000053, +0.000053, +0.000053, +0.000053, +0.000053, +0.000053, +0.000053, +0.000053, +0.000053, +0.000053, +0.000053, +0.000053, +0.000053, +0.000053, +0.000053, +0.000053, +0.000053, +0.000053, +0.000053, +0.000053, +0.000053, +0.000053, +0.000052, +0.000052, +0.000052, +0.000052, +0.000052, +0.000052, +0.000052, +0.000052, +0.000052, +0.000052, +0.000052, +0.000052, +0.000052, +0.000052, +0.000052, +0.000052, +0.000052, +0.000052, +0.000052, +0.000052, +0.000052, +0.000052, +0.000052, +0.000052, +0.000052, +0.000052, +0.000052, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000048, +0.000048, +0.000048, +0.000048, +0.000048, +0.000048, +0.000048, +0.000047, +0.000047, +0.000047, +0.000047, +0.000047, +0.000047, +0.000047, +0.000047, +0.000047, +0.000047, +0.000047, +0.000047, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000045, +0.000045, +0.000045, +0.000045, +0.000044, +0.000044, +0.000044, +0.000044, +0.000044, +0.000044, +0.000044, +0.000044, +0.000044, +0.000044, +0.000044, +0.000044, +0.000044, +0.000044, +0.000044, +0.000044, +0.000044, +0.000044, +0.000044, +0.000044, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000042, +0.000042, +0.000042, +0.000042, +0.000042, +0.000042, +0.000042, +0.000042, +0.000042, +0.000042, +0.000042, +0.000042, +0.000042, +0.000042, +0.000042, +0.000042, +0.000042, +0.000042, +0.000042, +0.000042, +0.000042, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000036, +0.000036, +0.000036, +0.000036, +0.000036, +0.000036, +0.000036, +0.000036, +0.000036, +0.000036, +0.000036, +0.000036, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000036, +0.000036, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000028, +0.000028, +0.000028, +0.000028, +0.000028, +0.000028, +0.000028, +0.000028, +0.000028, +0.000028, +0.000028, +0.000027, +0.000027, +0.000027, +0.000027, +0.000027, +0.000027, +0.000027, +0.000027, +0.000027, +0.000027, +0.000027, +0.000027, +0.000027, +0.000027, +0.000027, +0.000027, +0.000027, +0.000027, +0.000027, +0.000027, +0.000027, +0.000027, +0.000027, +0.000027, +0.000027, +0.000027, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, diff --git a/examples/polyphonic_synth/Wurlitzer_2_imag.txt b/examples/polyphonic_synth/Wurlitzer_2_imag.txt new file mode 100644 index 00000000..6a201bf7 --- /dev/null +++ b/examples/polyphonic_synth/Wurlitzer_2_imag.txt @@ -0,0 +1,2049 @@ + +0.000000, +-0.110487, +-0.278876, +0.367383, +0.036321, +-0.170779, +0.028859, +0.013815, +0.014130, +0.030014, +-0.041771, +-0.014977, +0.036079, +0.000570, +-0.015222, +0.002152, +0.002587, +-0.000112, +0.000035, +0.000451, +0.001269, +-0.003233, +-0.001189, +0.004621, +-0.000412, +-0.002951, +0.000369, +0.000553, +0.000444, +0.001178, +-0.001841, +-0.001937, +0.001820, +0.001686, +-0.001594, +-0.001692, +0.000804, +0.001288, +-0.000273, +0.000415, +-0.000936, +-0.001291, +0.000835, +0.001145, +-0.000986, +-0.000538, +0.000365, +-0.000042, +0.000477, +0.000635, +-0.000847, +-0.000986, +0.001089, +0.000963, +-0.000655, +0.000901, +0.000439, +0.001002, +0.000971, +-0.000448, +0.000899, +0.000166, +0.000860, +0.000225, +-0.000898, +0.000282, +0.000337, +0.000661, +-0.000503, +-0.000597, +0.000297, +-0.000000, +-0.000442, +-0.000548, +0.000075, +0.000712, +-0.000252, +-0.000314, +-0.000431, +0.000000, +-0.000594, +-0.000654, +-0.000632, +-0.000178, +-0.000667, +-0.000581, +0.000532, +-0.000000, +-0.000547, +-0.000645, +-0.000123, +-0.000358, +-0.000377, +-0.000300, +0.000028, +-0.000000, +-0.000000, +-0.000469, +0.000345, +0.000460, +-0.000169, +0.000319, +-0.000478, +-0.000085, +0.000465, +0.000457, +-0.000125, +0.000259, +0.000349, +0.000245, +0.000206, +-0.000111, +0.000346, +0.000330, +-0.000206, +0.000205, +0.000277, +0.000056, +0.000187, +0.000163, +0.000317, +0.000289, +-0.000216, +-0.000198, +0.000263, +-0.000071, +-0.000320, +0.000040, +-0.000000, +-0.000316, +0.000144, +-0.000192, +-0.000191, +0.000100, +-0.000307, +-0.000227, +-0.000113, +-0.000239, +-0.000178, +-0.000238, +-0.000223, +-0.000000, +-0.000240, +-0.000247, +0.000000, +-0.000245, +-0.000244, +0.000172, +0.000000, +-0.000242, +0.000241, +0.000170, +-0.000169, +0.000214, +0.000168, +-0.000000, +0.000212, +0.000236, +-0.000166, +0.000210, +0.000229, +0.000104, +0.000145, +0.000183, +0.000144, +0.000091, +0.000064, +0.000192, +0.000143, +-0.000167, +0.000090, +0.000099, +-0.000141, +0.000140, +-0.000043, +-0.000078, +0.000196, +0.000139, +-0.000193, +0.000062, +0.000112, +-0.000194, +-0.000000, +-0.000053, +-0.000061, +0.000061, +-0.000115, +0.000191, +0.000135, +-0.000179, +-0.000085, +0.000060, +-0.000000, +0.000052, +-0.000094, +-0.000137, +0.000174, +0.000181, +-0.000164, +0.000151, +0.000140, +-0.000161, +0.000039, +-0.000073, +-0.000072, +0.000000, +0.000076, +0.000161, +-0.000086, +0.000150, +0.000155, +-0.000147, +-0.000158, +0.000127, +0.000071, +-0.000093, +0.000034, +0.000007, +0.000111, +0.000117, +0.000065, +0.000110, +0.000104, +0.000122, +0.000130, +0.000136, +0.000151, +0.000152, +0.000145, +0.000150, +0.000146, +0.000136, +0.000128, +0.000128, +0.000113, +0.000093, +0.000083, +0.000080, +0.000067, +0.000059, +0.000041, +0.000047, +0.000047, +0.000029, +0.000029, +0.000036, +0.000036, +0.000036, +0.000036, +0.000046, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000061, +0.000060, +0.000060, +0.000060, +0.000060, +0.000060, +0.000060, +0.000060, +0.000060, +0.000060, +0.000059, +0.000059, +0.000059, +0.000059, +0.000059, +0.000059, +0.000059, +0.000059, +0.000059, +0.000058, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +-0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +-0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +-0.000000, +0.000000, +0.000000, +-0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +-0.000000, +0.000000, +-0.000000, +-0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +-0.000000, +-0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +-0.000000, +0.000000, +0.000000, +-0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +-0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +-0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +-0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +-0.000000, +0.000000, +0.000000, +-0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +-0.000000, +-0.000000, +0.000000, +-0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +-0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +-0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +-0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +-0.000000, +0.000000, +0.000000, +-0.000000, +-0.000000, +-0.000000, +0.000000, +0.000000, +-0.000000, +-0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +-0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +-0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +-0.000000, +0.000000, +0.000000, +-0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +-0.000000, +0.000000, +-0.000000, +-0.000000, +0.000000, +-0.000000, +-0.000000, +-0.000000, +0.000000, +-0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +-0.000000, +-0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +-0.000000, +0.000000, +-0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +-0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +-0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +-0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +-0.000000, +0.000000, +0.000000, +0.000000, +0.000000, +0.000000, diff --git a/examples/polyphonic_synth/Wurlitzer_2_real.txt b/examples/polyphonic_synth/Wurlitzer_2_real.txt new file mode 100644 index 00000000..065ab4a1 --- /dev/null +++ b/examples/polyphonic_synth/Wurlitzer_2_real.txt @@ -0,0 +1,2049 @@ + +0.000000, +0.256157, +0.287502, +-0.339160, +-0.045240, +0.276038, +-0.076183, +-0.156578, +0.088660, +0.052823, +-0.043895, +-0.008253, +0.007385, +-0.000169, +0.006791, +-0.001930, +-0.004648, +0.001325, +-0.000465, +0.001447, +0.001490, +-0.002043, +-0.000279, +-0.000533, +0.000236, +0.002956, +-0.001489, +-0.003211, +0.001774, +0.002716, +-0.001572, +-0.001386, +0.000224, +0.000647, +0.000789, +-0.000461, +-0.001531, +-0.001118, +0.001330, +0.001274, +-0.000936, +-0.000203, +0.000985, +-0.000564, +0.000788, +0.001126, +-0.001179, +-0.001221, +0.001110, +0.001014, +-0.000723, +-0.000493, +0.000083, +0.000492, +0.000849, +-0.000563, +-0.000956, +0.000291, +0.000357, +-0.000922, +-0.000476, +-0.000995, +-0.000511, +-0.000877, +-0.000000, +-0.000845, +-0.000818, +-0.000578, +-0.000712, +-0.000626, +-0.000806, +-0.000853, +-0.000723, +-0.000469, +-0.000713, +-0.000000, +0.000661, +-0.000628, +0.000549, +0.000694, +-0.000349, +-0.000204, +0.000253, +-0.000653, +-0.000089, +-0.000332, +-0.000399, +-0.000661, +0.000365, +0.000107, +-0.000493, +-0.000358, +0.000333, +0.000400, +-0.000497, +0.000495, +0.000492, +-0.000141, +0.000345, +0.000153, +0.000452, +0.000359, +-0.000000, +0.000468, +-0.000085, +0.000114, +0.000452, +-0.000388, +-0.000306, +0.000392, +-0.000411, +-0.000444, +-0.000000, +-0.000099, +-0.000274, +0.000273, +-0.000198, +-0.000334, +-0.000280, +-0.000293, +-0.000106, +-0.000165, +-0.000252, +-0.000264, +-0.000197, +-0.000320, +-0.000064, +-0.000322, +-0.000324, +0.000063, +-0.000287, +-0.000256, +-0.000255, +-0.000301, +-0.000077, +-0.000114, +-0.000227, +-0.000080, +0.000178, +-0.000079, +-0.000112, +-0.000249, +0.000060, +-0.000000, +0.000246, +-0.000000, +-0.000000, +0.000172, +0.000243, +-0.000000, +-0.000000, +-0.000170, +0.000169, +0.000107, +-0.000168, +0.000237, +0.000106, +-0.000000, +-0.000166, +-0.000105, +-0.000046, +-0.000208, +-0.000145, +-0.000092, +-0.000144, +-0.000182, +-0.000192, +-0.000064, +-0.000143, +-0.000111, +-0.000179, +-0.000173, +0.000141, +0.000140, +-0.000193, +-0.000182, +0.000022, +-0.000139, +-0.000035, +-0.000185, +-0.000160, +-0.000000, +0.000194, +-0.000186, +-0.000183, +-0.000182, +-0.000153, +-0.000000, +-0.000135, +0.000065, +-0.000170, +-0.000179, +0.000189, +0.000181, +-0.000162, +-0.000128, +0.000068, +-0.000045, +-0.000000, +-0.000065, +-0.000084, +0.000027, +-0.000158, +-0.000145, +-0.000145, +-0.000161, +0.000142, +-0.000000, +-0.000135, +0.000055, +0.000037, +-0.000060, +-0.000019, +-0.000094, +-0.000141, +0.000128, +-0.000154, +-0.000157, +-0.000111, +-0.000104, +-0.000142, +-0.000110, +-0.000115, +-0.000095, +-0.000084, +-0.000073, +0.000028, +-0.000020, +-0.000048, +0.000027, +0.000043, +0.000068, +0.000082, +0.000081, +0.000100, +0.000119, +0.000125, +0.000127, +0.000134, +0.000137, +0.000144, +0.000141, +0.000141, +0.000145, +0.000145, +0.000143, +0.000143, +0.000143, +0.000142, +0.000139, +0.000130, +0.000130, +0.000130, +0.000130, +0.000129, +0.000129, +0.000129, +0.000129, +0.000121, +0.000121, +0.000121, +0.000120, +0.000120, +0.000120, +0.000120, +0.000120, +0.000119, +0.000119, +0.000119, +0.000119, +0.000118, +0.000118, +0.000118, +0.000118, +0.000118, +0.000117, +0.000117, +0.000117, +0.000130, +0.000130, +0.000130, +0.000130, +0.000130, +0.000129, +0.000129, +0.000129, +0.000129, +0.000128, +0.000128, +0.000128, +0.000128, +0.000128, +0.000127, +0.000127, +0.000127, +0.000127, +0.000126, +0.000126, +0.000126, +0.000126, +0.000126, +0.000125, +0.000125, +0.000125, +0.000125, +0.000125, +0.000124, +0.000124, +0.000124, +0.000124, +0.000124, +0.000123, +0.000123, +0.000123, +0.000123, +0.000123, +0.000122, +0.000122, +0.000122, +0.000122, +0.000122, +0.000121, +0.000121, +0.000121, +0.000121, +0.000121, +0.000121, +0.000120, +0.000120, +0.000120, +0.000120, +0.000120, +0.000119, +0.000099, +0.000099, +0.000099, +0.000099, +0.000099, +0.000098, +0.000098, +0.000098, +0.000098, +0.000098, +0.000098, +0.000098, +0.000097, +0.000097, +0.000097, +0.000097, +0.000097, +0.000097, +0.000097, +0.000096, +0.000096, +0.000096, +0.000096, +0.000096, +0.000096, +0.000096, +0.000096, +0.000095, +0.000095, +0.000095, +0.000095, +0.000095, +0.000095, +0.000095, +0.000094, +0.000094, +0.000094, +0.000094, +0.000094, +0.000094, +0.000094, +0.000094, +0.000093, +0.000093, +0.000093, +0.000093, +0.000093, +0.000093, +0.000093, +0.000093, +0.000093, +0.000092, +0.000092, +0.000092, +0.000092, +0.000092, +0.000092, +0.000092, +0.000092, +0.000091, +0.000091, +0.000091, +0.000091, +0.000091, +0.000091, +0.000091, +0.000091, +0.000091, +0.000090, +0.000090, +0.000090, +0.000090, +0.000090, +0.000090, +0.000090, +0.000090, +0.000090, +0.000089, +0.000089, +0.000089, +0.000089, +0.000089, +0.000089, +0.000089, +0.000089, +0.000089, +0.000088, +0.000088, +0.000088, +0.000088, +0.000088, +0.000088, +0.000088, +0.000088, +0.000088, +0.000088, +0.000087, +0.000087, +0.000087, +0.000087, +0.000087, +0.000087, +0.000087, +0.000087, +0.000087, +0.000087, +0.000086, +0.000086, +0.000086, +0.000086, +0.000086, +0.000086, +0.000086, +0.000086, +0.000086, +0.000086, +0.000085, +0.000085, +0.000085, +0.000085, +0.000085, +0.000085, +0.000085, +0.000085, +0.000085, +0.000085, +0.000085, +0.000084, +0.000084, +0.000070, +0.000070, +0.000070, +0.000070, +0.000070, +0.000070, +0.000070, +0.000070, +0.000069, +0.000069, +0.000069, +0.000069, +0.000069, +0.000069, +0.000069, +0.000069, +0.000069, +0.000069, +0.000069, +0.000069, +0.000069, +0.000069, +0.000068, +0.000068, +0.000068, +0.000068, +0.000068, +0.000068, +0.000068, +0.000068, +0.000068, +0.000068, +0.000068, +0.000068, +0.000068, +0.000068, +0.000068, +0.000067, +0.000067, +0.000067, +0.000067, +0.000067, +0.000067, +0.000067, +0.000067, +0.000067, +0.000067, +0.000067, +0.000067, +0.000067, +0.000067, +0.000067, +0.000066, +0.000066, +0.000066, +0.000066, +0.000066, +0.000066, +0.000066, +0.000066, +0.000066, +0.000066, +0.000066, +0.000066, +0.000066, +0.000066, +0.000066, +0.000066, +0.000065, +0.000065, +0.000065, +0.000065, +0.000065, +0.000065, +0.000065, +0.000065, +0.000065, +0.000065, +0.000065, +0.000065, +0.000065, +0.000065, +0.000065, +0.000065, +0.000064, +0.000064, +0.000064, +0.000064, +0.000064, +0.000064, +0.000064, +0.000064, +0.000064, +0.000064, +0.000064, +0.000064, +0.000064, +0.000064, +0.000064, +0.000064, +0.000064, +0.000064, +0.000063, +0.000063, +0.000063, +0.000063, +0.000063, +0.000063, +0.000063, +0.000063, +0.000063, +0.000063, +0.000063, +0.000063, +0.000063, +0.000063, +0.000063, +0.000063, +0.000063, +0.000063, +0.000062, +0.000062, +0.000062, +0.000062, +0.000062, +0.000062, +0.000062, +0.000062, +0.000062, +0.000062, +0.000062, +0.000062, +0.000062, +0.000062, +0.000062, +0.000062, +0.000062, +0.000062, +0.000062, +0.000061, +0.000061, +0.000061, +0.000061, +0.000061, +0.000061, +0.000061, +0.000061, +0.000061, +0.000061, +0.000061, +0.000061, +0.000061, +0.000061, +0.000061, +0.000061, +0.000061, +0.000061, +0.000061, +0.000061, +0.000060, +0.000060, +0.000060, +0.000060, +0.000060, +0.000060, +0.000060, +0.000060, +0.000060, +0.000055, +0.000055, +0.000055, +0.000055, +0.000055, +0.000055, +0.000055, +0.000054, +0.000054, +0.000054, +0.000054, +0.000054, +0.000054, +0.000054, +0.000054, +0.000054, +0.000054, +0.000054, +0.000054, +0.000054, +0.000054, +0.000054, +0.000054, +0.000054, +0.000054, +0.000054, +0.000054, +0.000054, +0.000054, +0.000054, +0.000054, +0.000053, +0.000053, +0.000053, +0.000053, +0.000053, +0.000053, +0.000053, +0.000053, +0.000053, +0.000053, +0.000053, +0.000053, +0.000053, +0.000053, +0.000053, +0.000053, +0.000053, +0.000053, +0.000053, +0.000053, +0.000053, +0.000053, +0.000053, +0.000053, +0.000053, +0.000052, +0.000052, +0.000052, +0.000052, +0.000052, +0.000052, +0.000052, +0.000052, +0.000052, +0.000052, +0.000052, +0.000052, +0.000052, +0.000052, +0.000052, +0.000052, +0.000052, +0.000052, +0.000052, +0.000052, +0.000052, +0.000052, +0.000052, +0.000052, +0.000052, +0.000052, +0.000052, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000051, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000050, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000049, +0.000048, +0.000048, +0.000048, +0.000048, +0.000048, +0.000048, +0.000048, +0.000047, +0.000047, +0.000047, +0.000047, +0.000047, +0.000047, +0.000047, +0.000047, +0.000047, +0.000047, +0.000047, +0.000047, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000046, +0.000045, +0.000045, +0.000045, +0.000045, +0.000044, +0.000044, +0.000044, +0.000044, +0.000044, +0.000044, +0.000044, +0.000044, +0.000044, +0.000044, +0.000044, +0.000044, +0.000044, +0.000044, +0.000044, +0.000044, +0.000044, +0.000044, +0.000044, +0.000044, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000043, +0.000042, +0.000042, +0.000042, +0.000042, +0.000042, +0.000042, +0.000042, +0.000042, +0.000042, +0.000042, +0.000042, +0.000042, +0.000042, +0.000042, +0.000042, +0.000042, +0.000042, +0.000042, +0.000042, +0.000042, +0.000042, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000037, +0.000036, +0.000036, +0.000036, +0.000036, +0.000036, +0.000036, +0.000036, +0.000036, +0.000036, +0.000036, +0.000036, +0.000036, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000036, +0.000036, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000035, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000034, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000033, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000032, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000031, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000030, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000029, +0.000028, +0.000028, +0.000028, +0.000028, +0.000028, +0.000028, +0.000028, +0.000028, +0.000028, +0.000028, +0.000028, +0.000027, +0.000027, +0.000027, +0.000027, +0.000027, +0.000027, +0.000027, +0.000027, +0.000027, +0.000027, +0.000027, +0.000027, +0.000027, +0.000027, +0.000027, +0.000027, +0.000027, +0.000027, +0.000027, +0.000027, +0.000027, +0.000027, +0.000027, +0.000027, +0.000027, +0.000027, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000026, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000025, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000022, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, +0.000021, diff --git a/examples/polyphonic_synth/sketch.js b/examples/polyphonic_synth/sketch.js index 50e341ce..595cd9c1 100644 --- a/examples/polyphonic_synth/sketch.js +++ b/examples/polyphonic_synth/sketch.js @@ -1,110 +1,250 @@ -var psynth; -var keys = {S:60,E:61,D:62,R:63,F:64,G:65,Y:66,H:67,U:68,J:69,I:70,K:71,L:72} + + + +var psynth; + +var ptable_real,ptable_imag; +var real_wave = []; +var imag_wave = [] + +function preload(){ + ptable_real = loadStrings('Wurlitzer_2_real.txt'); + ptable_imag = loadStrings('Wurlitzer_2_imag.txt' ); +} + + function setup() { + + createCanvas(800, 300); + smooth(); + frameRate(25); - psynth = new p5.PolySynth(Simple); + + + psynth = new PolySynth(15,PeriodicWave); + + for (var i = 0 ; i < 2048 ; i++) { + real_wave[i] = float(ptable_real[i]); + + } + for (var i = 0 ; i < 2048 ; i++) { + imag_wave[i] = float(ptable_imag[i]); + + } + } + + + function draw() { background(0); - fill(255); - textAlign(CENTER,CENTER); - text("Click Me !",width/2,height/2); } function mousePressed(){ - // play a note when mouse is pressed - var note = int(map(mouseX,0,width,60,84)); // a midi note mapped to x-axis - var length = map(mouseY,0,300,0,6); // a note length parameter mapped to y-axis. - // set the enveloppe with the new note length - psynth.noteADSR(note,0.21,1,1,5); - psynth.noteParams(note,{osctype: 'square'}); - // set the note to be played - psynth.play(note,0.05,0,length); // play it ! -} - -function keyPressed(){ - if (keys[key]){ - note = keys[key] - psynth.noteParams(note,{osctype: 'sine'}); - psynth.noteAttack(note,1); - } + + var note = int(map(mouseX,0,width,60,84)); + var length = map(mouseY,0,300,0,5); + + psynth.setAdsr(0.021,0.025,length,0.025); + + // uncomment for SquareVoice detune parameters + //var d = int(random(1,12)); + //psynth.setParams({detune: d }); + + // uncomment for PeriodicWave + psynth.setParams({real: real_wave , imag: imag_wave}); + + psynth.setNote(note); + psynth.play(); + } -function keyReleased(){ - if (keys[key]){ - note = keys[key] - psynth.noteRelease(note); - } + +////////////////////////////////////////////////////////////////////////////// +function PeriodicWave(params){ + AudioVoice.call(this); + + this.real = new Float32Array([0,0]) ; + this.imag = new Float32Array([0,1]); + + this.context = getAudioContext(); + + this.wt = this.context.createPeriodicWave(this.real,this.imag); + + this.oscillator = this.context.createOscillator(); + this.oscillator.setPeriodicWave(this.wt); + + this.oscillator.disconnect(); + this.oscillator.start(); + + this.oscillator.connect(this.filter); + + this.setNote = function(note){ + this.oscillator.frequency.value = midiToFreq(note); + } + + this.setParams = function(params){ + // console.log(params.real); + this.real = new Float32Array(params.real); + this.imag = new Float32Array(params.imag); + this.wt = this.context.createPeriodicWave(this.real, this.imag); + this.oscillator.setPeriodicWave(this. wt); + } + + } +PeriodicWave.prototype = Object.create(AudioVoice.prototype); +PeriodicWave.prototype.constructor = PeriodicWave; -// A typical synth class which inherits from AudioVoice class -function Simple(){ - p5.MonoSynth.call(this); // inherit from AudioVoice class +////////////////////////////////////////////////////////////////////////////////////////////// +// A typical synth class which inherits from AudioVoice class +function SquareVoice(){ - // dispose of default oscillator - this.oscillator.dispose(); + AudioVoice.call(this); - // create a dsp graph - this.osctype = 'sine'; + this.osctype = 'square'; this.oscillator = new p5.Oscillator(this.note,this.osctype); this.oscillator.disconnect(); this.oscillator.start(); - // connect the dsp graph to the filtered output of the audiovoice - this.oscillator.connect(this.synthOut); - this._setNote = function(note){ - this.oscillator.freq( midiToFreq(note) ); + this.oscillator.connect(this.filter); + + this.setNote = function(note){ + this.note = note; + this.oscillator.freq(midiToFreq(note)); + } +} +SquareVoice.prototype = Object.create(AudioVoice.prototype); // browsers support ECMAScript 5 ! warning for compatibility with older browsers +SquareVoice.prototype.constructor = SquareVoice; + +////////////////////////////////////////////////////////////////////////////////////////////// +// A second one +function DetunedOsc(){ + + AudioVoice.call(this); + + this.osctype = 'sine'; + this.detune = 5; + + this.oscOne = new p5.Oscillator(midiToFreq(this.note),this.osctype); + this.oscTwo = new p5.Oscillator(midiToFreq(this.note)-this.detune,this.osctype); + this.oscOne.disconnect(); + this.oscTwo.disconnect(); + this.oscOne.start(); + this.oscTwo.start(); + + this.oscOne.connect(this.filter); + this.oscTwo.connect(this.filter); + + this.setNote = function(note){ + this.oscOne.freq(midiToFreq(note)); + this.oscTwo.freq(midiToFreq(note)-this.detune); } this.setParams = function(params){ - this.osctype = params.osctype; - this.oscillator.setType(this.osctype); + this.detune = params.detune; } - } -// make our new synth available for our sketch -Simple.prototype = Object.create(p5.MonoSynth.prototype); // browsers support ECMAScript 5 ! warning for compatibility with older browsers -Simple.prototype.constructor = Simple; + +DetunedOsc.prototype = Object.create(AudioVoice.prototype); +DetunedOsc.prototype.constructor = DetunedOsc; -///////////////////////////////////////////////////////////////// -function AdditiveSynth(){ - p5.MonoSynth.call(this); - this.osctype = 'triangle'; - this.harmonics = [1,2,4,6,8]; + + + +//////////////////////////////////////////////////////////////////////////////////////////// +// A super AudioVoice class to talk to the PolySynth class +function AudioVoice () { + + this.osctype = 'sine'; + this.volume= 0.33; this.note = 60; - this.oscbank =[]; - for (var i = 0 ; i < this.harmonics.length; i++){ - this.oscbank.push(new p5.Oscillator(midiToFreq(this.note),this.osctype) ); - } + this.attack = 0.25; + this.decay=0.25; + this.sustain=0.95; + this.release=0.25; + this.env = new p5.Env(this.attack,this.volume, this.decay,this.volume, this.sustain, this.volume,this.release); - for (var i = 0 ; i < this.harmonics.length ; i++){ - this.oscbank[i].disconnect(); - this.oscbank[i].start(); - this.oscbank[i].connect(this.synthOut); - } + this.filter = new p5.LowPass(); + this.filter.set(22050, 5); + + this.env.connect(this.filter); - this._setNote = function(note){ - for (var i = 0 ; i < this.harmonics.length ; i++){ - this.oscbank[i].freq(midiToFreq(note+this.harmonics[i]*12)); - } - } +} - this.setParams = function(params){ - if(params.harmonics != null) this.harmonics = params.harmonics; - if (params.osctype != null) { - this.osctype = params.osctype; - for (var i = 0 ; i < this.harmonics.length ; i++){ - this.oscbank[i].setType(params.osctype); - } - } +AudioVoice.prototype.voicePlay = function (){ + this.env.play(this.filter); +} + +AudioVoice.prototype.attackPlay = function (){ + this.env.triggerAttack(this.oscillator); +} + +AudioVoice.prototype.releasePlay = function (){ + this.env.triggerRelease(this.oscillator); +} + +AudioVoice.prototype.setNote = function(){ + +} + +AudioVoice.prototype.setParams = function(params){ + +} + + +AudioVoice.prototype.setAdsr = function (a,d,s,r){ + this.attack = a; + this.decay=d; + this.sustain=s; + this.release=r; + this.env = new p5.Env(this.attack, this.decay, this.sustain, this.release); + this.env.play(this.filter); +} + + + +///////////////////////////////////////////////////////////////////////////// +// a class to deal with voices allocations, of notes, parameters etc. +// should be abastracted from the user +function PolySynth(num,synthVoice){ + this.voices = []; + this.num_voices = num; + this.poly_counter=0; + + this.allocateVoices(synthVoice); +} + +PolySynth.prototype.allocateVoices = function(synthVoice){ + for (var i = 0 ; i < this.num_voices ; i++){ + this.voices.push(new synthVoice()); } } -AdditiveSynth.prototype = Object.create(p5.MonoSynth.prototype); -AdditiveSynth.prototype.constructor = AdditiveSynth; \ No newline at end of file + +PolySynth.prototype.play = function (){ + this.voices[this.poly_counter].voicePlay(); + this.poly_counter += 1; + this.poly_counter = this.poly_counter % this.num_voices; +} + +PolySynth.prototype.setAdsr = function (a,d,s,r){ + this.voices[this.poly_counter].setAdsr(a,d,s,r); +} + +PolySynth.prototype.setNote = function (note){ + this.voices[this.poly_counter].setNote(note); +} + +PolySynth.prototype.setParams = function (params){ + this.voices[this.poly_counter].setParams(params); +} + + + diff --git a/examples/polysynth_old/index.html b/examples/polysynth_old/index.html new file mode 100644 index 00000000..a5418601 --- /dev/null +++ b/examples/polysynth_old/index.html @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/examples/polysynth_old/sketch.js b/examples/polysynth_old/sketch.js new file mode 100644 index 00000000..50e341ce --- /dev/null +++ b/examples/polysynth_old/sketch.js @@ -0,0 +1,110 @@ +var psynth; +var keys = {S:60,E:61,D:62,R:63,F:64,G:65,Y:66,H:67,U:68,J:69,I:70,K:71,L:72} + +function setup() { + frameRate(25); + psynth = new p5.PolySynth(Simple); +} + +function draw() { + background(0); + fill(255); + textAlign(CENTER,CENTER); + text("Click Me !",width/2,height/2); +} + +function mousePressed(){ + // play a note when mouse is pressed + var note = int(map(mouseX,0,width,60,84)); // a midi note mapped to x-axis + var length = map(mouseY,0,300,0,6); // a note length parameter mapped to y-axis. + // set the enveloppe with the new note length + psynth.noteADSR(note,0.21,1,1,5); + psynth.noteParams(note,{osctype: 'square'}); + // set the note to be played + psynth.play(note,0.05,0,length); // play it ! +} + +function keyPressed(){ + if (keys[key]){ + note = keys[key] + psynth.noteParams(note,{osctype: 'sine'}); + psynth.noteAttack(note,1); + } +} + +function keyReleased(){ + if (keys[key]){ + note = keys[key] + psynth.noteRelease(note); + } +} + + +// A typical synth class which inherits from AudioVoice class +function Simple(){ + + p5.MonoSynth.call(this); // inherit from AudioVoice class + + // dispose of default oscillator + this.oscillator.dispose(); + + // create a dsp graph + this.osctype = 'sine'; + this.oscillator = new p5.Oscillator(this.note,this.osctype); + this.oscillator.disconnect(); + this.oscillator.start(); + // connect the dsp graph to the filtered output of the audiovoice + this.oscillator.connect(this.synthOut); + + this._setNote = function(note){ + this.oscillator.freq( midiToFreq(note) ); + } + + this.setParams = function(params){ + this.osctype = params.osctype; + this.oscillator.setType(this.osctype); + } + +} +// make our new synth available for our sketch +Simple.prototype = Object.create(p5.MonoSynth.prototype); // browsers support ECMAScript 5 ! warning for compatibility with older browsers +Simple.prototype.constructor = Simple; + + +///////////////////////////////////////////////////////////////// +function AdditiveSynth(){ + p5.MonoSynth.call(this); + + this.osctype = 'triangle'; + this.harmonics = [1,2,4,6,8]; + this.note = 60; + + this.oscbank =[]; + for (var i = 0 ; i < this.harmonics.length; i++){ + this.oscbank.push(new p5.Oscillator(midiToFreq(this.note),this.osctype) ); + } + + for (var i = 0 ; i < this.harmonics.length ; i++){ + this.oscbank[i].disconnect(); + this.oscbank[i].start(); + this.oscbank[i].connect(this.synthOut); + } + + this._setNote = function(note){ + for (var i = 0 ; i < this.harmonics.length ; i++){ + this.oscbank[i].freq(midiToFreq(note+this.harmonics[i]*12)); + } + } + + this.setParams = function(params){ + if(params.harmonics != null) this.harmonics = params.harmonics; + if (params.osctype != null) { + this.osctype = params.osctype; + for (var i = 0 ; i < this.harmonics.length ; i++){ + this.oscbank[i].setType(params.osctype); + } + } + } +} +AdditiveSynth.prototype = Object.create(p5.MonoSynth.prototype); +AdditiveSynth.prototype.constructor = AdditiveSynth; \ No newline at end of file diff --git a/index.html b/index.html index aed7dee3..62278002 100644 --- a/index.html +++ b/index.html @@ -59,7 +59,9 @@

p5.sound
play_soundfile
playbackRate
playbackRatePart
-
polyphonic_synth
+ + +
polyphonicSynth-Keyboard
pulseWaveform
record
recordLoops
diff --git a/lib/p5.js b/lib/p5.js index 62c8afea..6d343760 100644 --- a/lib/p5.js +++ b/lib/p5.js @@ -1,4 +1,4 @@ -/*! p5.js v0.4.23 March 04, 2016 */ +/*! p5.js v0.4.21 January 18, 2016 */ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.p5 = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o 0, 'No ' + attrName + ' specified.'); + function assertNamePresent(name) { + var englishName = _this.getEnglishName(name); + assert(englishName && englishName.trim().length > 0, + 'No English ' + name + ' specified.'); } // Identification information - assertStringAttribute('familyName'); - assertStringAttribute('weightName'); - assertStringAttribute('manufacturer'); - assertStringAttribute('copyright'); - assertStringAttribute('version'); + assertNamePresent('fontFamily'); + assertNamePresent('weightName'); + assertNamePresent('manufacturer'); + assertNamePresent('copyright'); + assertNamePresent('version'); // Dimension information assert(this.unitsPerEm > 0, 'No unitsPerEm specified.'); @@ -524,7 +531,9 @@ Font.prototype.toBuffer = function() { // Initiate a download of the OpenType font. Font.prototype.download = function() { - var fileName = this.familyName.replace(/\s/g, '') + '-' + this.styleName + '.otf'; + var familyName = this.getEnglishName('fontFamily'); + var styleName = this.getEnglishName('fontSubfamily'); + var fileName = familyName.replace(/\s/g, '') + '-' + styleName + '.otf'; var buffer = this.toBuffer(); window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem; @@ -550,7 +559,7 @@ Font.prototype.download = function() { exports.Font = Font; -},{"./encoding":4,"./glyphset":7,"./path":10,"./tables/sfnt":25}],6:[function(_dereq_,module,exports){ +},{"./encoding":4,"./glyphset":7,"./path":10,"./tables/sfnt":27}],6:[function(_dereq_,module,exports){ // The Glyph object 'use strict'; @@ -924,12 +933,14 @@ var path = _dereq_('./path'); var cmap = _dereq_('./tables/cmap'); var cff = _dereq_('./tables/cff'); +var fvar = _dereq_('./tables/fvar'); var glyf = _dereq_('./tables/glyf'); var gpos = _dereq_('./tables/gpos'); var head = _dereq_('./tables/head'); var hhea = _dereq_('./tables/hhea'); var hmtx = _dereq_('./tables/hmtx'); var kern = _dereq_('./tables/kern'); +var ltag = _dereq_('./tables/ltag'); var loca = _dereq_('./tables/loca'); var maxp = _dereq_('./tables/maxp'); var _name = _dereq_('./tables/name'); @@ -978,16 +989,19 @@ function loadFromUrl(url, callback) { // Public API /////////////////////////////////////////////////////////// // Parse the OpenType file data (as an ArrayBuffer) and return a Font object. -// If the file could not be parsed (most likely because it contains Postscript outlines) -// we return an empty Font object with the `supported` flag set to `false`. +// Throws an error if the font could not be parsed. function parseBuffer(buffer) { var indexToLocFormat; - var hmtxOffset; - var glyfOffset; - var locaOffset; + var ltagTable; + var cffOffset; - var kernOffset; + var fvarOffset; + var glyfOffset; var gposOffset; + var hmtxOffset; + var kernOffset; + var locaOffset; + var nameOffset; // OpenType fonts use big endian byte ordering. // We can't rely on typed array view types, because they operate with the endianness of the host computer. @@ -1019,10 +1033,9 @@ function parseBuffer(buffer) { case 'cmap': font.tables.cmap = cmap.parse(data, offset); font.encoding = new encoding.CmapEncoding(font.tables.cmap); - if (!font.encoding) { - font.supported = false; - } - + break; + case 'fvar': + fvarOffset = offset; break; case 'head': font.tables.head = head.parse(data, offset); @@ -1038,14 +1051,15 @@ function parseBuffer(buffer) { case 'hmtx': hmtxOffset = offset; break; + case 'ltag': + ltagTable = ltag.parse(data, offset); + break; case 'maxp': font.tables.maxp = maxp.parse(data, offset); font.numGlyphs = font.tables.maxp.numGlyphs; break; case 'name': - font.tables.name = _name.parse(data, offset); - font.familyName = font.tables.name.fontFamily; - font.styleName = font.tables.name.fontSubfamily; + nameOffset = offset; break; case 'OS/2': font.tables.os2 = os2.parse(data, offset); @@ -1073,6 +1087,9 @@ function parseBuffer(buffer) { p += 16; } + font.tables.name = _name.parse(data, nameOffset, ltagTable); + font.names = font.tables.name; + if (glyfOffset && locaOffset) { var shortVersion = indexToLocFormat === 0; var locaTable = loca.parse(data, locaOffset, font.numGlyphs, shortVersion); @@ -1083,19 +1100,21 @@ function parseBuffer(buffer) { cff.parse(data, cffOffset, font); encoding.addGlyphNames(font); } else { - font.supported = false; + throw new Error('Font doesn\'t contain TrueType or CFF outlines.'); } - if (font.supported) { - if (kernOffset) { - font.kerningPairs = kern.parse(data, kernOffset); - } else { - font.kerningPairs = {}; - } + if (kernOffset) { + font.kerningPairs = kern.parse(data, kernOffset); + } else { + font.kerningPairs = {}; + } - if (gposOffset) { - gpos.parse(data, gposOffset, font); - } + if (gposOffset) { + gpos.parse(data, gposOffset, font); + } + + if (fvarOffset) { + font.tables.fvar = fvar.parse(data, fvarOffset, font.names); } return font; @@ -1116,22 +1135,27 @@ function load(url, callback) { } var font = parseBuffer(arrayBuffer); - if (!font.supported) { - return callback('Font is not supported (is this a Postscript font?)'); - } - return callback(null, font); }); } +// Syncronously load the font from a URL or file. +// When done, return the font object or throw an error. +function loadSync(url) { + var fs = _dereq_('fs'); + var buffer = fs.readFileSync(url); + return parseBuffer(toArrayBuffer(buffer)); +} + exports._parse = parse; exports.Font = _font.Font; exports.Glyph = glyph.Glyph; exports.Path = path.Path; exports.parse = parseBuffer; exports.load = load; +exports.loadSync = loadSync; -},{"./encoding":4,"./font":5,"./glyph":6,"./parse":9,"./path":10,"./tables/cff":12,"./tables/cmap":13,"./tables/glyf":14,"./tables/gpos":15,"./tables/head":16,"./tables/hhea":17,"./tables/hmtx":18,"./tables/kern":19,"./tables/loca":20,"./tables/maxp":21,"./tables/name":22,"./tables/os2":23,"./tables/post":24,"fs":1}],9:[function(_dereq_,module,exports){ +},{"./encoding":4,"./font":5,"./glyph":6,"./parse":9,"./path":10,"./tables/cff":12,"./tables/cmap":13,"./tables/fvar":14,"./tables/glyf":15,"./tables/gpos":16,"./tables/head":17,"./tables/hhea":18,"./tables/hmtx":19,"./tables/kern":20,"./tables/loca":21,"./tables/ltag":22,"./tables/maxp":23,"./tables/name":24,"./tables/os2":25,"./tables/post":26,"fs":1}],9:[function(_dereq_,module,exports){ // Parsing utility functions 'use strict'; @@ -1350,7 +1374,7 @@ exports.Parser = Parser; 'use strict'; -// A bézier path containing a set of path commands similar to a SVG path. +// A bézier path containing a set of path commands similar to a SVG path. // Paths can be drawn on a context using `draw`. function Path() { this.commands = []; @@ -1572,7 +1596,7 @@ Table.prototype.encode = function() { exports.Table = Table; -},{"./check":2,"./types":26}],12:[function(_dereq_,module,exports){ +},{"./check":2,"./types":28}],12:[function(_dereq_,module,exports){ // The `CFF` table contains the glyph outlines in PostScript format. // https://www.microsoft.com/typography/OTSPEC/cff.htm // http://download.microsoft.com/download/8/0/1/801a191c-029d-4af3-9642-555f6fe514ee/cff.pdf @@ -2530,7 +2554,7 @@ function glyphToOps(glyph) { var dy; var cmd = path.commands[i]; if (cmd.type === 'Q') { - // CFF only supports bézier curves, so convert the quad to a bézier. + // CFF only supports bézier curves, so convert the quad to a bézier. var _13 = 1 / 3; var _23 = 2 / 3; @@ -2883,6 +2907,154 @@ exports.parse = parseCmapTable; exports.make = makeCmapTable; },{"../check":2,"../parse":9,"../table":11}],14:[function(_dereq_,module,exports){ +// The `fvar` table stores font variation axes and instances. +// https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6fvar.html + +'use strict'; + +var check = _dereq_('../check'); +var parse = _dereq_('../parse'); +var table = _dereq_('../table'); + +function addName(name, names) { + var nameString = JSON.stringify(name); + var nameID = 256; + for (var nameKey in names) { + var n = parseInt(nameKey); + if (!n || n < 256) { + continue; + } + + if (JSON.stringify(names[nameKey]) === nameString) { + return n; + } + + if (nameID <= n) { + nameID = n + 1; + } + } + + names[nameID] = name; + return nameID; +} + +function makeFvarAxis(axis, names) { + var nameID = addName(axis.name, names); + return new table.Table('fvarAxis', [ + {name: 'tag', type: 'TAG', value: axis.tag}, + {name: 'minValue', type: 'FIXED', value: axis.minValue << 16}, + {name: 'defaultValue', type: 'FIXED', value: axis.defaultValue << 16}, + {name: 'maxValue', type: 'FIXED', value: axis.maxValue << 16}, + {name: 'flags', type: 'USHORT', value: 0}, + {name: 'nameID', type: 'USHORT', value: nameID} + ]); +} + +function parseFvarAxis(data, start, names) { + var axis = {}; + var p = new parse.Parser(data, start); + axis.tag = p.parseTag(); + axis.minValue = p.parseFixed(); + axis.defaultValue = p.parseFixed(); + axis.maxValue = p.parseFixed(); + p.skip('uShort', 1); // reserved for flags; no values defined + axis.name = names[p.parseUShort()] || {}; + return axis; +} + +function makeFvarInstance(inst, axes, names) { + var nameID = addName(inst.name, names); + var fields = [ + {name: 'nameID', type: 'USHORT', value: nameID}, + {name: 'flags', type: 'USHORT', value: 0} + ]; + + for (var i = 0; i < axes.length; ++i) { + var axisTag = axes[i].tag; + fields.push({ + name: 'axis ' + axisTag, + type: 'FIXED', + value: inst.coordinates[axisTag] << 16 + }); + } + + return new table.Table('fvarInstance', fields); +} + +function parseFvarInstance(data, start, axes, names) { + var inst = {}; + var p = new parse.Parser(data, start); + inst.name = names[p.parseUShort()] || {}; + p.skip('uShort', 1); // reserved for flags; no values defined + + inst.coordinates = {}; + for (var i = 0; i < axes.length; ++i) { + inst.coordinates[axes[i].tag] = p.parseFixed(); + } + + return inst; +} + +function makeFvarTable(fvar, names) { + var result = new table.Table('fvar', [ + {name: 'version', type: 'ULONG', value: 0x10000}, + {name: 'offsetToData', type: 'USHORT', value: 0}, + {name: 'countSizePairs', type: 'USHORT', value: 2}, + {name: 'axisCount', type: 'USHORT', value: fvar.axes.length}, + {name: 'axisSize', type: 'USHORT', value: 20}, + {name: 'instanceCount', type: 'USHORT', value: fvar.instances.length}, + {name: 'instanceSize', type: 'USHORT', value: 4 + fvar.axes.length * 4} + ]); + result.offsetToData = result.sizeOf(); + + for (var i = 0; i < fvar.axes.length; i++) { + result.fields.push({ + name: 'axis ' + i, + type: 'TABLE', + value: makeFvarAxis(fvar.axes[i], names)}); + } + + for (var j = 0; j < fvar.instances.length; j++) { + result.fields.push({ + name: 'instance ' + j, + type: 'TABLE', + value: makeFvarInstance(fvar.instances[j], fvar.axes, names) + }); + } + + return result; +} + +function parseFvarTable(data, start, names) { + var p = new parse.Parser(data, start); + var tableVersion = p.parseULong(); + check.argument(tableVersion === 0x00010000, 'Unsupported fvar table version.'); + var offsetToData = p.parseOffset16(); + // Skip countSizePairs. + p.skip('uShort', 1); + var axisCount = p.parseUShort(); + var axisSize = p.parseUShort(); + var instanceCount = p.parseUShort(); + var instanceSize = p.parseUShort(); + + var axes = []; + for (var i = 0; i < axisCount; i++) { + axes.push(parseFvarAxis(data, start + offsetToData + i * axisSize, names)); + } + + var instances = []; + var instanceStart = start + offsetToData + axisCount * axisSize; + for (var j = 0; j < instanceCount; j++) { + instances.push(parseFvarInstance(data, instanceStart + j * instanceSize, axes, names)); + } + + return {axes:axes, instances:instances}; +} + +exports.make = makeFvarTable; +exports.parse = parseFvarTable; + +},{"../check":2,"../parse":9,"../table":11}],15:[function(_dereq_,module,exports){ // The `glyf` table describes the glyphs in TrueType outline format. // http://www.microsoft.com/typography/otspec/glyf.htm @@ -3183,7 +3355,7 @@ function parseGlyfTable(data, start, loca, font) { exports.parse = parseGlyfTable; -},{"../check":2,"../glyphset":7,"../parse":9,"../path":10}],15:[function(_dereq_,module,exports){ +},{"../check":2,"../glyphset":7,"../parse":9,"../path":10}],16:[function(_dereq_,module,exports){ // The `GPOS` table contains kerning pairs, among other things. // https://www.microsoft.com/typography/OTSPEC/gpos.htm @@ -3424,7 +3596,7 @@ function parseGposTable(data, start, font) { exports.parse = parseGposTable; -},{"../check":2,"../parse":9}],16:[function(_dereq_,module,exports){ +},{"../check":2,"../parse":9}],17:[function(_dereq_,module,exports){ // The `head` table contains global information about the font. // https://www.microsoft.com/typography/OTSPEC/head.htm @@ -3484,7 +3656,7 @@ function makeHeadTable(options) { exports.parse = parseHeadTable; exports.make = makeHeadTable; -},{"../check":2,"../parse":9,"../table":11}],17:[function(_dereq_,module,exports){ +},{"../check":2,"../parse":9,"../table":11}],18:[function(_dereq_,module,exports){ // The `hhea` table contains information for horizontal layout. // https://www.microsoft.com/typography/OTSPEC/hhea.htm @@ -3539,7 +3711,7 @@ function makeHheaTable(options) { exports.parse = parseHheaTable; exports.make = makeHheaTable; -},{"../parse":9,"../table":11}],18:[function(_dereq_,module,exports){ +},{"../parse":9,"../table":11}],19:[function(_dereq_,module,exports){ // The `hmtx` table contains the horizontal metrics for all glyphs. // https://www.microsoft.com/typography/OTSPEC/hmtx.htm @@ -3583,7 +3755,7 @@ function makeHmtxTable(glyphs) { exports.parse = parseHmtxTable; exports.make = makeHmtxTable; -},{"../parse":9,"../table":11}],19:[function(_dereq_,module,exports){ +},{"../parse":9,"../table":11}],20:[function(_dereq_,module,exports){ // The `kern` table contains kerning pairs. // Note that some fonts use the GPOS OpenType layout table to specify kerning. // https://www.microsoft.com/typography/OTSPEC/kern.htm @@ -3620,7 +3792,7 @@ function parseKernTable(data, start) { exports.parse = parseKernTable; -},{"../check":2,"../parse":9}],20:[function(_dereq_,module,exports){ +},{"../check":2,"../parse":9}],21:[function(_dereq_,module,exports){ // The `loca` table stores the offsets to the locations of the glyphs in the font. // https://www.microsoft.com/typography/OTSPEC/loca.htm @@ -3655,7 +3827,70 @@ function parseLocaTable(data, start, numGlyphs, shortVersion) { exports.parse = parseLocaTable; -},{"../parse":9}],21:[function(_dereq_,module,exports){ +},{"../parse":9}],22:[function(_dereq_,module,exports){ +// The `ltag` table stores IETF BCP-47 language tags. It allows supporting +// languages for which TrueType does not assign a numeric code. +// https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6ltag.html +// http://www.w3.org/International/articles/language-tags/ +// http://www.iana.org/assignments/language-subtag-registry/language-subtag-registry + +'use strict'; + +var check = _dereq_('../check'); +var parse = _dereq_('../parse'); +var table = _dereq_('../table'); + +function makeLtagTable(tags) { + var result = new table.Table('ltag', [ + {name: 'version', type: 'ULONG', value: 1}, + {name: 'flags', type: 'ULONG', value: 0}, + {name: 'numTags', type: 'ULONG', value: tags.length} + ]); + + var stringPool = ''; + var stringPoolOffset = 12 + tags.length * 4; + for (var i = 0; i < tags.length; ++i) { + var pos = stringPool.indexOf(tags[i]); + if (pos < 0) { + pos = stringPool.length; + stringPool += tags[i]; + } + + result.fields.push({name: 'offset ' + i, type: 'USHORT', value: stringPoolOffset + pos}); + result.fields.push({name: 'length ' + i, type: 'USHORT', value: tags[i].length}); + } + + result.fields.push({name: 'stringPool', type: 'CHARARRAY', value: stringPool}); + return result; +} + +function parseLtagTable(data, start) { + var p = new parse.Parser(data, start); + var tableVersion = p.parseULong(); + check.argument(tableVersion === 1, 'Unsupported ltag table version.'); + // The 'ltag' specification does not define any flags; skip the field. + p.skip('uLong', 1); + var numTags = p.parseULong(); + + var tags = []; + for (var i = 0; i < numTags; i++) { + var tag = ''; + var offset = start + p.parseUShort(); + var length = p.parseUShort(); + for (var j = offset; j < offset + length; ++j) { + tag += String.fromCharCode(data.getInt8(j)); + } + + tags.push(tag); + } + + return tags; +} + +exports.make = makeLtagTable; +exports.parse = parseLtagTable; + +},{"../check":2,"../parse":9,"../table":11}],23:[function(_dereq_,module,exports){ // The `maxp` table establishes the memory requirements for the font. // We need it just to get the number of glyphs in the font. // https://www.microsoft.com/typography/OTSPEC/maxp.htm @@ -3700,13 +3935,15 @@ function makeMaxpTable(numGlyphs) { exports.parse = parseMaxpTable; exports.make = makeMaxpTable; -},{"../parse":9,"../table":11}],22:[function(_dereq_,module,exports){ +},{"../parse":9,"../table":11}],24:[function(_dereq_,module,exports){ // The `name` naming table. // https://www.microsoft.com/typography/OTSPEC/name.htm 'use strict'; -var encode = _dereq_('../types').encode; +var types = _dereq_('../types'); +var decode = types.decode; +var encode = types.encode; var parse = _dereq_('../parse'); var table = _dereq_('../table'); @@ -3737,53 +3974,655 @@ var nameTableNames = [ 'wwsSubfamily' // 22 ]; -// Parse the naming `name` table -// Only Windows Unicode English names are supported. -// Format 1 additional fields are not supported -function parseNameTable(data, start) { +var macLanguages = { + 0: 'en', + 1: 'fr', + 2: 'de', + 3: 'it', + 4: 'nl', + 5: 'sv', + 6: 'es', + 7: 'da', + 8: 'pt', + 9: 'no', + 10: 'he', + 11: 'ja', + 12: 'ar', + 13: 'fi', + 14: 'el', + 15: 'is', + 16: 'mt', + 17: 'tr', + 18: 'hr', + 19: 'zh-Hant', + 20: 'ur', + 21: 'hi', + 22: 'th', + 23: 'ko', + 24: 'lt', + 25: 'pl', + 26: 'hu', + 27: 'es', + 28: 'lv', + 29: 'se', + 30: 'fo', + 31: 'fa', + 32: 'ru', + 33: 'zh', + 34: 'nl-BE', + 35: 'ga', + 36: 'sq', + 37: 'ro', + 38: 'cz', + 39: 'sk', + 40: 'si', + 41: 'yi', + 42: 'sr', + 43: 'mk', + 44: 'bg', + 45: 'uk', + 46: 'be', + 47: 'uz', + 48: 'kk', + 49: 'az-Cyrl', + 50: 'az-Arab', + 51: 'hy', + 52: 'ka', + 53: 'mo', + 54: 'ky', + 55: 'tg', + 56: 'tk', + 57: 'mn-CN', + 58: 'mn', + 59: 'ps', + 60: 'ks', + 61: 'ku', + 62: 'sd', + 63: 'bo', + 64: 'ne', + 65: 'sa', + 66: 'mr', + 67: 'bn', + 68: 'as', + 69: 'gu', + 70: 'pa', + 71: 'or', + 72: 'ml', + 73: 'kn', + 74: 'ta', + 75: 'te', + 76: 'si', + 77: 'my', + 78: 'km', + 79: 'lo', + 80: 'vi', + 81: 'id', + 82: 'tl', + 83: 'ms', + 84: 'ms-Arab', + 85: 'am', + 86: 'ti', + 87: 'om', + 88: 'so', + 89: 'sw', + 90: 'rw', + 91: 'rn', + 92: 'ny', + 93: 'mg', + 94: 'eo', + 128: 'cy', + 129: 'eu', + 130: 'ca', + 131: 'la', + 132: 'qu', + 133: 'gn', + 134: 'ay', + 135: 'tt', + 136: 'ug', + 137: 'dz', + 138: 'jv', + 139: 'su', + 140: 'gl', + 141: 'af', + 142: 'br', + 143: 'iu', + 144: 'gd', + 145: 'gv', + 146: 'ga', + 147: 'to', + 148: 'el-polyton', + 149: 'kl', + 150: 'az', + 151: 'nn' +}; + +// MacOS language ID → MacOS script ID +// +// Note that the script ID is not sufficient to determine what encoding +// to use in TrueType files. For some languages, MacOS used a modification +// of a mainstream script. For example, an Icelandic name would be stored +// with smRoman in the TrueType naming table, but the actual encoding +// is a special Icelandic version of the normal Macintosh Roman encoding. +// As another example, Inuktitut uses an 8-bit encoding for Canadian Aboriginal +// Syllables but MacOS had run out of available script codes, so this was +// done as a (pretty radical) "modification" of Ethiopic. +// +// http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/Readme.txt +var macLanguageToScript = { + 0: 0, // langEnglish → smRoman + 1: 0, // langFrench → smRoman + 2: 0, // langGerman → smRoman + 3: 0, // langItalian → smRoman + 4: 0, // langDutch → smRoman + 5: 0, // langSwedish → smRoman + 6: 0, // langSpanish → smRoman + 7: 0, // langDanish → smRoman + 8: 0, // langPortuguese → smRoman + 9: 0, // langNorwegian → smRoman + 10: 5, // langHebrew → smHebrew + 11: 1, // langJapanese → smJapanese + 12: 4, // langArabic → smArabic + 13: 0, // langFinnish → smRoman + 14: 6, // langGreek → smGreek + 15: 0, // langIcelandic → smRoman (modified) + 16: 0, // langMaltese → smRoman + 17: 0, // langTurkish → smRoman (modified) + 18: 0, // langCroatian → smRoman (modified) + 19: 2, // langTradChinese → smTradChinese + 20: 4, // langUrdu → smArabic + 21: 9, // langHindi → smDevanagari + 22: 21, // langThai → smThai + 23: 3, // langKorean → smKorean + 24: 29, // langLithuanian → smCentralEuroRoman + 25: 29, // langPolish → smCentralEuroRoman + 26: 29, // langHungarian → smCentralEuroRoman + 27: 29, // langEstonian → smCentralEuroRoman + 28: 29, // langLatvian → smCentralEuroRoman + 29: 0, // langSami → smRoman + 30: 0, // langFaroese → smRoman (modified) + 31: 4, // langFarsi → smArabic (modified) + 32: 7, // langRussian → smCyrillic + 33: 25, // langSimpChinese → smSimpChinese + 34: 0, // langFlemish → smRoman + 35: 0, // langIrishGaelic → smRoman (modified) + 36: 0, // langAlbanian → smRoman + 37: 0, // langRomanian → smRoman (modified) + 38: 29, // langCzech → smCentralEuroRoman + 39: 29, // langSlovak → smCentralEuroRoman + 40: 0, // langSlovenian → smRoman (modified) + 41: 5, // langYiddish → smHebrew + 42: 7, // langSerbian → smCyrillic + 43: 7, // langMacedonian → smCyrillic + 44: 7, // langBulgarian → smCyrillic + 45: 7, // langUkrainian → smCyrillic (modified) + 46: 7, // langByelorussian → smCyrillic + 47: 7, // langUzbek → smCyrillic + 48: 7, // langKazakh → smCyrillic + 49: 7, // langAzerbaijani → smCyrillic + 50: 4, // langAzerbaijanAr → smArabic + 51: 24, // langArmenian → smArmenian + 52: 23, // langGeorgian → smGeorgian + 53: 7, // langMoldavian → smCyrillic + 54: 7, // langKirghiz → smCyrillic + 55: 7, // langTajiki → smCyrillic + 56: 7, // langTurkmen → smCyrillic + 57: 27, // langMongolian → smMongolian + 58: 7, // langMongolianCyr → smCyrillic + 59: 4, // langPashto → smArabic + 60: 4, // langKurdish → smArabic + 61: 4, // langKashmiri → smArabic + 62: 4, // langSindhi → smArabic + 63: 26, // langTibetan → smTibetan + 64: 9, // langNepali → smDevanagari + 65: 9, // langSanskrit → smDevanagari + 66: 9, // langMarathi → smDevanagari + 67: 13, // langBengali → smBengali + 68: 13, // langAssamese → smBengali + 69: 11, // langGujarati → smGujarati + 70: 10, // langPunjabi → smGurmukhi + 71: 12, // langOriya → smOriya + 72: 17, // langMalayalam → smMalayalam + 73: 16, // langKannada → smKannada + 74: 14, // langTamil → smTamil + 75: 15, // langTelugu → smTelugu + 76: 18, // langSinhalese → smSinhalese + 77: 19, // langBurmese → smBurmese + 78: 20, // langKhmer → smKhmer + 79: 22, // langLao → smLao + 80: 30, // langVietnamese → smVietnamese + 81: 0, // langIndonesian → smRoman + 82: 0, // langTagalog → smRoman + 83: 0, // langMalayRoman → smRoman + 84: 4, // langMalayArabic → smArabic + 85: 28, // langAmharic → smEthiopic + 86: 28, // langTigrinya → smEthiopic + 87: 28, // langOromo → smEthiopic + 88: 0, // langSomali → smRoman + 89: 0, // langSwahili → smRoman + 90: 0, // langKinyarwanda → smRoman + 91: 0, // langRundi → smRoman + 92: 0, // langNyanja → smRoman + 93: 0, // langMalagasy → smRoman + 94: 0, // langEsperanto → smRoman + 128: 0, // langWelsh → smRoman (modified) + 129: 0, // langBasque → smRoman + 130: 0, // langCatalan → smRoman + 131: 0, // langLatin → smRoman + 132: 0, // langQuechua → smRoman + 133: 0, // langGuarani → smRoman + 134: 0, // langAymara → smRoman + 135: 7, // langTatar → smCyrillic + 136: 4, // langUighur → smArabic + 137: 26, // langDzongkha → smTibetan + 138: 0, // langJavaneseRom → smRoman + 139: 0, // langSundaneseRom → smRoman + 140: 0, // langGalician → smRoman + 141: 0, // langAfrikaans → smRoman + 142: 0, // langBreton → smRoman (modified) + 143: 28, // langInuktitut → smEthiopic (modified) + 144: 0, // langScottishGaelic → smRoman (modified) + 145: 0, // langManxGaelic → smRoman (modified) + 146: 0, // langIrishGaelicScript → smRoman (modified) + 147: 0, // langTongan → smRoman + 148: 6, // langGreekAncient → smRoman + 149: 0, // langGreenlandic → smRoman + 150: 0, // langAzerbaijanRoman → smRoman + 151: 0 // langNynorsk → smRoman +}; + +// While Microsoft indicates a region/country for all its language +// IDs, we omit the region code if it's equal to the "most likely +// region subtag" according to Unicode CLDR. For scripts, we omit +// the subtag if it is equal to the Suppress-Script entry in the +// IANA language subtag registry for IETF BCP 47. +// +// For example, Microsoft states that its language code 0x041A is +// Croatian in Croatia. We transform this to the BCP 47 language code 'hr' +// and not 'hr-HR' because Croatia is the default country for Croatian, +// according to Unicode CLDR. As another example, Microsoft states +// that 0x101A is Croatian (Latin) in Bosnia-Herzegovina. We transform +// this to 'hr-BA' and not 'hr-Latn-BA' because Latin is the default script +// for the Croatian language, according to IANA. +// +// http://www.unicode.org/cldr/charts/latest/supplemental/likely_subtags.html +// http://www.iana.org/assignments/language-subtag-registry/language-subtag-registry +var windowsLanguages = { + 0x0436: 'af', + 0x041C: 'sq', + 0x0484: 'gsw', + 0x045E: 'am', + 0x1401: 'ar-DZ', + 0x3C01: 'ar-BH', + 0x0C01: 'ar', + 0x0801: 'ar-IQ', + 0x2C01: 'ar-JO', + 0x3401: 'ar-KW', + 0x3001: 'ar-LB', + 0x1001: 'ar-LY', + 0x1801: 'ary', + 0x2001: 'ar-OM', + 0x4001: 'ar-QA', + 0x0401: 'ar-SA', + 0x2801: 'ar-SY', + 0x1C01: 'aeb', + 0x3801: 'ar-AE', + 0x2401: 'ar-YE', + 0x042B: 'hy', + 0x044D: 'as', + 0x082C: 'az-Cyrl', + 0x042C: 'az', + 0x046D: 'ba', + 0x042D: 'eu', + 0x0423: 'be', + 0x0845: 'bn', + 0x0445: 'bn-IN', + 0x201A: 'bs-Cyrl', + 0x141A: 'bs', + 0x047E: 'br', + 0x0402: 'bg', + 0x0403: 'ca', + 0x0C04: 'zh-HK', + 0x1404: 'zh-MO', + 0x0804: 'zh', + 0x1004: 'zh-SG', + 0x0404: 'zh-TW', + 0x0483: 'co', + 0x041A: 'hr', + 0x101A: 'hr-BA', + 0x0405: 'cs', + 0x0406: 'da', + 0x048C: 'prs', + 0x0465: 'dv', + 0x0813: 'nl-BE', + 0x0413: 'nl', + 0x0C09: 'en-AU', + 0x2809: 'en-BZ', + 0x1009: 'en-CA', + 0x2409: 'en-029', + 0x4009: 'en-IN', + 0x1809: 'en-IE', + 0x2009: 'en-JM', + 0x4409: 'en-MY', + 0x1409: 'en-NZ', + 0x3409: 'en-PH', + 0x4809: 'en-SG', + 0x1C09: 'en-ZA', + 0x2C09: 'en-TT', + 0x0809: 'en-GB', + 0x0409: 'en', + 0x3009: 'en-ZW', + 0x0425: 'et', + 0x0438: 'fo', + 0x0464: 'fil', + 0x040B: 'fi', + 0x080C: 'fr-BE', + 0x0C0C: 'fr-CA', + 0x040C: 'fr', + 0x140C: 'fr-LU', + 0x180C: 'fr-MC', + 0x100C: 'fr-CH', + 0x0462: 'fy', + 0x0456: 'gl', + 0x0437: 'ka', + 0x0C07: 'de-AT', + 0x0407: 'de', + 0x1407: 'de-LI', + 0x1007: 'de-LU', + 0x0807: 'de-CH', + 0x0408: 'el', + 0x046F: 'kl', + 0x0447: 'gu', + 0x0468: 'ha', + 0x040D: 'he', + 0x0439: 'hi', + 0x040E: 'hu', + 0x040F: 'is', + 0x0470: 'ig', + 0x0421: 'id', + 0x045D: 'iu', + 0x085D: 'iu-Latn', + 0x083C: 'ga', + 0x0434: 'xh', + 0x0435: 'zu', + 0x0410: 'it', + 0x0810: 'it-CH', + 0x0411: 'ja', + 0x044B: 'kn', + 0x043F: 'kk', + 0x0453: 'km', + 0x0486: 'quc', + 0x0487: 'rw', + 0x0441: 'sw', + 0x0457: 'kok', + 0x0412: 'ko', + 0x0440: 'ky', + 0x0454: 'lo', + 0x0426: 'lv', + 0x0427: 'lt', + 0x082E: 'dsb', + 0x046E: 'lb', + 0x042F: 'mk', + 0x083E: 'ms-BN', + 0x043E: 'ms', + 0x044C: 'ml', + 0x043A: 'mt', + 0x0481: 'mi', + 0x047A: 'arn', + 0x044E: 'mr', + 0x047C: 'moh', + 0x0450: 'mn', + 0x0850: 'mn-CN', + 0x0461: 'ne', + 0x0414: 'nb', + 0x0814: 'nn', + 0x0482: 'oc', + 0x0448: 'or', + 0x0463: 'ps', + 0x0415: 'pl', + 0x0416: 'pt', + 0x0816: 'pt-PT', + 0x0446: 'pa', + 0x046B: 'qu-BO', + 0x086B: 'qu-EC', + 0x0C6B: 'qu', + 0x0418: 'ro', + 0x0417: 'rm', + 0x0419: 'ru', + 0x243B: 'smn', + 0x103B: 'smj-NO', + 0x143B: 'smj', + 0x0C3B: 'se-FI', + 0x043B: 'se', + 0x083B: 'se-SE', + 0x203B: 'sms', + 0x183B: 'sma-NO', + 0x1C3B: 'sms', + 0x044F: 'sa', + 0x1C1A: 'sr-Cyrl-BA', + 0x0C1A: 'sr', + 0x181A: 'sr-Latn-BA', + 0x081A: 'sr-Latn', + 0x046C: 'nso', + 0x0432: 'tn', + 0x045B: 'si', + 0x041B: 'sk', + 0x0424: 'sl', + 0x2C0A: 'es-AR', + 0x400A: 'es-BO', + 0x340A: 'es-CL', + 0x240A: 'es-CO', + 0x140A: 'es-CR', + 0x1C0A: 'es-DO', + 0x300A: 'es-EC', + 0x440A: 'es-SV', + 0x100A: 'es-GT', + 0x480A: 'es-HN', + 0x080A: 'es-MX', + 0x4C0A: 'es-NI', + 0x180A: 'es-PA', + 0x3C0A: 'es-PY', + 0x280A: 'es-PE', + 0x500A: 'es-PR', + + // Microsoft has defined two different language codes for + // “Spanish with modern sorting” and “Spanish with traditional + // sorting”. This makes sense for collation APIs, and it would be + // possible to express this in BCP 47 language tags via Unicode + // extensions (eg., es-u-co-trad is Spanish with traditional + // sorting). However, for storing names in fonts, the distinction + // does not make sense, so we give “es” in both cases. + 0x0C0A: 'es', + 0x040A: 'es', + + 0x540A: 'es-US', + 0x380A: 'es-UY', + 0x200A: 'es-VE', + 0x081D: 'sv-FI', + 0x041D: 'sv', + 0x045A: 'syr', + 0x0428: 'tg', + 0x085F: 'tzm', + 0x0449: 'ta', + 0x0444: 'tt', + 0x044A: 'te', + 0x041E: 'th', + 0x0451: 'bo', + 0x041F: 'tr', + 0x0442: 'tk', + 0x0480: 'ug', + 0x0422: 'uk', + 0x042E: 'hsb', + 0x0420: 'ur', + 0x0843: 'uz-Cyrl', + 0x0443: 'uz', + 0x042A: 'vi', + 0x0452: 'cy', + 0x0488: 'wo', + 0x0485: 'sah', + 0x0478: 'ii', + 0x046A: 'yo' +}; + +// Returns a IETF BCP 47 language code, for example 'zh-Hant' +// for 'Chinese in the traditional script'. +function getLanguageCode(platformID, languageID, ltag) { + switch (platformID) { + case 0: // Unicode + if (languageID === 0xFFFF) { + return 'und'; + } else if (ltag) { + return ltag[languageID]; + } + + break; + + case 1: // Macintosh + return macLanguages[languageID]; + + case 3: // Windows + return windowsLanguages[languageID]; + } + + return undefined; +} + +var utf16 = 'utf-16'; + +// MacOS script ID → encoding. This table stores the default case, +// which can be overridden by macLanguageEncodings. +var macScriptEncodings = { + 0: 'macintosh', // smRoman + 1: 'x-mac-japanese', // smJapanese + 2: 'x-mac-chinesetrad', // smTradChinese + 3: 'x-mac-korean', // smKorean + 6: 'x-mac-greek', // smGreek + 7: 'x-mac-cyrillic', // smCyrillic + 9: 'x-mac-devanagai', // smDevanagari + 10: 'x-mac-gurmukhi', // smGurmukhi + 11: 'x-mac-gujarati', // smGujarati + 12: 'x-mac-oriya', // smOriya + 13: 'x-mac-bengali', // smBengali + 14: 'x-mac-tamil', // smTamil + 15: 'x-mac-telugu', // smTelugu + 16: 'x-mac-kannada', // smKannada + 17: 'x-mac-malayalam', // smMalayalam + 18: 'x-mac-sinhalese', // smSinhalese + 19: 'x-mac-burmese', // smBurmese + 20: 'x-mac-khmer', // smKhmer + 21: 'x-mac-thai', // smThai + 22: 'x-mac-lao', // smLao + 23: 'x-mac-georgian', // smGeorgian + 24: 'x-mac-armenian', // smArmenian + 25: 'x-mac-chinesesimp', // smSimpChinese + 26: 'x-mac-tibetan', // smTibetan + 27: 'x-mac-mongolian', // smMongolian + 28: 'x-mac-ethiopic', // smEthiopic + 29: 'x-mac-ce', // smCentralEuroRoman + 30: 'x-mac-vietnamese', // smVietnamese + 31: 'x-mac-extarabic' // smExtArabic +}; + +// MacOS language ID → encoding. This table stores the exceptional +// cases, which override macScriptEncodings. For writing MacOS naming +// tables, we need to emit a MacOS script ID. Therefore, we cannot +// merge macScriptEncodings into macLanguageEncodings. +// +// http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/Readme.txt +var macLanguageEncodings = { + 15: 'x-mac-icelandic', // langIcelandic + 17: 'x-mac-turkish', // langTurkish + 18: 'x-mac-croatian', // langCroatian + 24: 'x-mac-ce', // langLithuanian + 25: 'x-mac-ce', // langPolish + 26: 'x-mac-ce', // langHungarian + 27: 'x-mac-ce', // langEstonian + 28: 'x-mac-ce', // langLatvian + 30: 'x-mac-icelandic', // langFaroese + 37: 'x-mac-romanian', // langRomanian + 38: 'x-mac-ce', // langCzech + 39: 'x-mac-ce', // langSlovak + 40: 'x-mac-ce', // langSlovenian + 143: 'x-mac-inuit', // langInuktitut + 146: 'x-mac-gaelic' // langIrishGaelicScript +}; + +function getEncoding(platformID, encodingID, languageID) { + switch (platformID) { + case 0: // Unicode + return utf16; + + case 1: // Apple Macintosh + return macLanguageEncodings[languageID] || macScriptEncodings[encodingID]; + + case 3: // Microsoft Windows + if (encodingID === 1 || encodingID === 10) { + return utf16; + } + + break; + } + + return undefined; +} + +// Parse the naming `name` table. +// FIXME: Format 1 additional fields are not supported yet. +// ltag is the content of the `ltag' table, such as ['en', 'zh-Hans', 'de-CH-1904']. +function parseNameTable(data, start, ltag) { var name = {}; var p = new parse.Parser(data, start); - name.format = p.parseUShort(); + var format = p.parseUShort(); var count = p.parseUShort(); var stringOffset = p.offset + p.parseUShort(); - var unknownCount = 0; for (var i = 0; i < count; i++) { var platformID = p.parseUShort(); var encodingID = p.parseUShort(); var languageID = p.parseUShort(); var nameID = p.parseUShort(); - var property = nameTableNames[nameID]; + var property = nameTableNames[nameID] || nameID; var byteLength = p.parseUShort(); var offset = p.parseUShort(); - // platformID - encodingID - languageID standard combinations : - // 1 - 0 - 0 : Macintosh, Roman, English - // 3 - 1 - 0x409 : Windows, Unicode BMP (UCS-2), en-US - if (platformID === 3 && encodingID === 1 && languageID === 0x409) { - var codePoints = []; - var length = byteLength / 2; - for (var j = 0; j < length; j++, offset += 2) { - codePoints[j] = parse.getShort(data, stringOffset + offset); + var language = getLanguageCode(platformID, languageID, ltag); + var encoding = getEncoding(platformID, encodingID, languageID); + if (encoding !== undefined && language !== undefined) { + var text; + if (encoding === utf16) { + text = decode.UTF16(data, stringOffset + offset, byteLength); + } else { + text = decode.MACSTRING(data, stringOffset + offset, byteLength, encoding); } - var str = String.fromCharCode.apply(null, codePoints); - if (property) { - name[property] = str; - } - else { - unknownCount++; - name['unknown' + unknownCount] = str; + if (text) { + var translations = name[property]; + if (translations === undefined) { + translations = name[property] = {}; + } + + translations[language] = text; } } - } - if (name.format === 1) { - name.langTagCount = p.parseUShort(); + var langTagCount = 0; + if (format === 1) { + // FIXME: Also handle Microsoft's 'name' table 1. + langTagCount = p.parseUShort(); } return name; } +// {23: 'foo'} → {'foo': 23} +// ['bar', 'baz'] → {'bar': 0, 'baz': 1} +function reverseDict(dict) { + var result = {}; + for (var key in dict) { + result[dict[key]] = parseInt(key); + } + + return result; +} + function makeNameRecord(platformID, encodingID, languageID, nameID, length, offset) { return new table.Table('NameRecord', [ {name: 'platformID', type: 'USHORT', value: platformID}, @@ -3795,67 +4634,140 @@ function makeNameRecord(platformID, encodingID, languageID, nameID, length, offs ]); } -function addMacintoshNameRecord(t, recordID, s, offset) { - // Macintosh, Roman, English - var stringBytes = encode.STRING(s); - t.records.push(makeNameRecord(1, 0, 0, recordID, stringBytes.length, offset)); - t.strings.push(stringBytes); - offset += stringBytes.length; - return offset; +// Finds the position of needle in haystack, or -1 if not there. +// Like String.indexOf(), but for arrays. +function findSubArray(needle, haystack) { + var needleLength = needle.length; + var limit = haystack.length - needleLength + 1; + + loop: + for (var pos = 0; pos < limit; pos++) { + for (; pos < limit; pos++) { + for (var k = 0; k < needleLength; k++) { + if (haystack[pos + k] !== needle[k]) { + continue loop; + } + } + + return pos; + } + } + + return -1; } -function addWindowsNameRecord(t, recordID, s, offset) { - // Windows, Unicode BMP (UCS-2), US English - var utf16Bytes = encode.UTF16(s); - t.records.push(makeNameRecord(3, 1, 0x0409, recordID, utf16Bytes.length, offset)); - t.strings.push(utf16Bytes); - offset += utf16Bytes.length; +function addStringToPool(s, pool) { + var offset = findSubArray(s, pool); + if (offset < 0) { + offset = pool.length; + for (var i = 0, len = s.length; i < len; ++i) { + pool.push(s[i]); + } + + } + return offset; } -function makeNameTable(options) { - var t = new table.Table('name', [ - {name: 'format', type: 'USHORT', value: 0}, - {name: 'count', type: 'USHORT', value: 0}, - {name: 'stringOffset', type: 'USHORT', value: 0} - ]); - t.records = []; - t.strings = []; - var offset = 0; - var i; - var s; - // Add Macintosh records first - for (i = 0; i < nameTableNames.length; i += 1) { - if (options[nameTableNames[i]] !== undefined) { - s = options[nameTableNames[i]]; - offset = addMacintoshNameRecord(t, i, s, offset); +function makeNameTable(names, ltag) { + var nameID; + var nameIDs = []; + + var namesWithNumericKeys = {}; + var nameTableIds = reverseDict(nameTableNames); + for (var key in names) { + var id = nameTableIds[key]; + if (id === undefined) { + id = key; } - } - // Then add Windows records - for (i = 0; i < nameTableNames.length; i += 1) { - if (options[nameTableNames[i]] !== undefined) { - s = options[nameTableNames[i]]; - offset = addWindowsNameRecord(t, i, s, offset); + + nameID = parseInt(id); + namesWithNumericKeys[nameID] = names[key]; + nameIDs.push(nameID); + } + + var macLanguageIds = reverseDict(macLanguages); + var windowsLanguageIds = reverseDict(windowsLanguages); + + var nameRecords = []; + var stringPool = []; + + for (var i = 0; i < nameIDs.length; i++) { + nameID = nameIDs[i]; + var translations = namesWithNumericKeys[nameID]; + for (var lang in translations) { + var text = translations[lang]; + + // For MacOS, we try to emit the name in the form that was introduced + // in the initial version of the TrueType spec (in the late 1980s). + // However, this can fail for various reasons: the requested BCP 47 + // language code might not have an old-style Mac equivalent; + // we might not have a codec for the needed character encoding; + // or the name might contain characters that cannot be expressed + // in the old-style Macintosh encoding. In case of failure, we emit + // the name in a more modern fashion (Unicode encoding with BCP 47 + // language tags) that is recognized by MacOS 10.5, released in 2009. + // If fonts were only read by operating systems, we could simply + // emit all names in the modern form; this would be much easier. + // However, there are many applications and libraries that read + // 'name' tables directly, and these will usually only recognize + // the ancient form (silently skipping the unrecognized names). + var macPlatform = 1; // Macintosh + var macLanguage = macLanguageIds[lang]; + var macScript = macLanguageToScript[macLanguage]; + var macEncoding = getEncoding(macPlatform, macScript, macLanguage); + var macName = encode.MACSTRING(text, macEncoding); + if (macName === undefined) { + macPlatform = 0; // Unicode + macLanguage = ltag.indexOf(lang); + if (macLanguage < 0) { + macLanguage = ltag.length; + ltag.push(lang); + } + + macScript = 4; // Unicode 2.0 and later + macName = encode.UTF16(text); + } + + var macNameOffset = addStringToPool(macName, stringPool); + nameRecords.push(makeNameRecord(macPlatform, macScript, macLanguage, + nameID, macName.length, macNameOffset)); + + var winLanguage = windowsLanguageIds[lang]; + if (winLanguage !== undefined) { + var winName = encode.UTF16(text); + var winNameOffset = addStringToPool(winName, stringPool); + nameRecords.push(makeNameRecord(3, 1, winLanguage, + nameID, winName.length, winNameOffset)); + } } } - t.count = t.records.length; - t.stringOffset = 6 + t.count * 12; - for (i = 0; i < t.records.length; i += 1) { - t.fields.push({name: 'record_' + i, type: 'TABLE', value: t.records[i]}); - } + nameRecords.sort(function(a, b) { + return ((a.platformID - b.platformID) || + (a.encodingID - b.encodingID) || + (a.languageID - b.languageID) || + (a.nameID - b.nameID)); + }); - for (i = 0; i < t.strings.length; i += 1) { - t.fields.push({name: 'string_' + i, type: 'LITERAL', value: t.strings[i]}); + var t = new table.Table('name', [ + {name: 'format', type: 'USHORT', value: 0}, + {name: 'count', type: 'USHORT', value: nameRecords.length}, + {name: 'stringOffset', type: 'USHORT', value: 6 + nameRecords.length * 12} + ]); + + for (var r = 0; r < nameRecords.length; r++) { + t.fields.push({name: 'record_' + r, type: 'TABLE', value: nameRecords[r]}); } + t.fields.push({name: 'strings', type: 'LITERAL', value: stringPool}); return t; } exports.parse = parseNameTable; exports.make = makeNameTable; -},{"../parse":9,"../table":11,"../types":26}],23:[function(_dereq_,module,exports){ +},{"../parse":9,"../table":11,"../types":28}],25:[function(_dereq_,module,exports){ // The `OS/2` table contains metrics required in OpenType fonts. // https://www.microsoft.com/typography/OTSPEC/os2.htm @@ -4111,7 +5023,7 @@ exports.getUnicodeRange = getUnicodeRange; exports.parse = parseOS2Table; exports.make = makeOS2Table; -},{"../parse":9,"../table":11}],24:[function(_dereq_,module,exports){ +},{"../parse":9,"../table":11}],26:[function(_dereq_,module,exports){ // The `post` table stores additional PostScript information, such as glyph names. // https://www.microsoft.com/typography/OTSPEC/post.htm @@ -4184,7 +5096,7 @@ function makePostTable() { exports.parse = parsePostTable; exports.make = makePostTable; -},{"../encoding":4,"../parse":9,"../table":11}],25:[function(_dereq_,module,exports){ +},{"../encoding":4,"../parse":9,"../table":11}],27:[function(_dereq_,module,exports){ // The `sfnt` wrapper provides organization for the tables in the font. // It is the top-level data structure in a font. // https://www.microsoft.com/typography/OTSPEC/otff.htm @@ -4201,6 +5113,7 @@ var cff = _dereq_('./cff'); var head = _dereq_('./head'); var hhea = _dereq_('./hhea'); var hmtx = _dereq_('./hmtx'); +var ltag = _dereq_('./ltag'); var maxp = _dereq_('./maxp'); var _name = _dereq_('./name'); var os2 = _dereq_('./os2'); @@ -4426,38 +5339,54 @@ function fontToSfntTable(font) { var hmtxTable = hmtx.make(font.glyphs); var cmapTable = cmap.make(font.glyphs); - var fullName = font.familyName + ' ' + font.styleName; - var postScriptName = font.familyName.replace(/\s/g, '') + '-' + font.styleName; - var nameTable = _name.make({ - copyright: font.copyright, - fontFamily: font.familyName, - fontSubfamily: font.styleName, - uniqueID: font.manufacturer + ':' + fullName, - fullName: fullName, - version: font.version, - postScriptName: postScriptName, - trademark: font.trademark, - manufacturer: font.manufacturer, - designer: font.designer, - description: font.description, - manufacturerURL: font.manufacturerURL, - designerURL: font.designerURL, - license: font.license, - licenseURL: font.licenseURL, - preferredFamily: font.familyName, - preferredSubfamily: font.styleName - }); + var englishFamilyName = font.getEnglishName('fontFamily'); + var englishStyleName = font.getEnglishName('fontSubfamily'); + var englishFullName = englishFamilyName + ' ' + englishStyleName; + var postScriptName = font.getEnglishName('postScriptName'); + if (!postScriptName) { + postScriptName = englishFamilyName.replace(/\s/g, '') + '-' + englishStyleName; + } + + var names = {}; + for (var n in font.names) { + names[n] = font.names[n]; + } + + if (!names.uniqueID) { + names.uniqueID = {en: font.getEnglishName('manufacturer') + ':' + englishFullName}; + } + + if (!names.postScriptName) { + names.postScriptName = {en: postScriptName}; + } + + if (!names.preferredFamily) { + names.preferredFamily = font.names.fontFamily; + } + + if (!names.preferredSubfamily) { + names.preferredSubfamily = font.names.fontSubfamily; + } + + var languageTags = []; + var nameTable = _name.make(names, languageTags); + var ltagTable = (languageTags.length > 0 ? ltag.make(languageTags) : undefined); + var postTable = post.make(); var cffTable = cff.make(font.glyphs, { - version: font.version, - fullName: fullName, - familyName: font.familyName, - weightName: font.styleName, + version: font.getEnglishName('version'), + fullName: englishFullName, + familyName: englishFamilyName, + weightName: englishStyleName, postScriptName: postScriptName, unitsPerEm: font.unitsPerEm }); - // Order the tables according to the the OpenType specification 1.4. + + // The order does not matter because makeSfntTable() will sort them. var tables = [headTable, hheaTable, maxpTable, os2Table, nameTable, cmapTable, postTable, cffTable, hmtxTable]; + if (ltagTable) { + tables.push(ltagTable); + } var sfntTable = makeSfntTable(tables); @@ -4485,7 +5414,7 @@ exports.computeCheckSum = computeCheckSum; exports.make = makeSfntTable; exports.fontToTable = fontToSfntTable; -},{"../check":2,"../table":11,"./cff":12,"./cmap":13,"./head":16,"./hhea":17,"./hmtx":18,"./maxp":21,"./name":22,"./os2":23,"./post":24}],26:[function(_dereq_,module,exports){ +},{"../check":2,"../table":11,"./cff":12,"./cmap":13,"./head":17,"./hhea":18,"./hmtx":19,"./ltag":22,"./maxp":23,"./name":24,"./os2":25,"./post":26}],28:[function(_dereq_,module,exports){ // Data types used in the OpenType font file. // All OpenType fonts use Motorola-style byte ordering (Big Endian) @@ -4524,7 +5453,7 @@ encode.CHAR = function(v) { return [v.charCodeAt(0)]; }; -sizeOf.BYTE = constant(1); +sizeOf.CHAR = constant(1); // Convert an ASCII string to a list of bytes. encode.CHARARRAY = function(v) { @@ -4653,16 +5582,16 @@ encode.NUMBER16 = function(v) { return [28, (v >> 8) & 0xFF, v & 0xFF]; }; -sizeOf.NUMBER16 = constant(2); +sizeOf.NUMBER16 = constant(3); -// Convert a signed number between -(2^31) and +(2^31-1) to a four-byte value. +// Convert a signed number between -(2^31) and +(2^31-1) to a five-byte value. // This is useful if you want to be sure you always use four bytes, // at the expense of wasting a few bytes for smaller numbers. encode.NUMBER32 = function(v) { return [29, (v >> 24) & 0xFF, (v >> 16) & 0xFF, (v >> 8) & 0xFF, v & 0xFF]; }; -sizeOf.NUMBER32 = constant(4); +sizeOf.NUMBER32 = constant(5); encode.REAL = function(v) { var value = v.toString(); @@ -4710,12 +5639,23 @@ sizeOf.NAME = sizeOf.CHARARRAY; encode.STRING = encode.CHARARRAY; sizeOf.STRING = sizeOf.CHARARRAY; -// Convert a ASCII string to a list of UTF16 bytes. +decode.UTF16 = function(data, offset, numBytes) { + var codePoints = []; + var numChars = numBytes / 2; + for (var j = 0; j < numChars; j++, offset += 2) { + codePoints[j] = data.getUint16(offset); + } + + return String.fromCharCode.apply(null, codePoints); +}; + +// Convert a JavaScript string to UTF16-BE. encode.UTF16 = function(v) { var b = []; for (var i = 0; i < v.length; i += 1) { - b.push(0); - b.push(v.charCodeAt(i)); + var codepoint = v.charCodeAt(i); + b.push((codepoint >> 8) & 0xFF); + b.push(codepoint & 0xFF); } return b; @@ -4725,6 +5665,167 @@ sizeOf.UTF16 = function(v) { return v.length * 2; }; +// Data for converting old eight-bit Macintosh encodings to Unicode. +// This representation is optimized for decoding; encoding is slower +// and needs more memory. The assumption is that all opentype.js users +// want to open fonts, but saving a font will be comperatively rare +// so it can be more expensive. Keyed by IANA character set name. +// +// Python script for generating these strings: +// +// s = u''.join([chr(c).decode('mac_greek') for c in range(128, 256)]) +// print(s.encode('utf-8')) +var eightBitMacEncodings = { + 'x-mac-croatian': // Python: 'mac_croatian' + 'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø' + + '¿¡¬√ƒ≈Ć«Č… ÀÃÕŒœĐ—“”‘’÷◊©⁄€‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ', + 'x-mac-cyrillic': // Python: 'mac_cyrillic' + 'АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњ' + + 'јЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю', + 'x-mac-gaelic': + // http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/GAELIC.TXT + 'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØḂ±≤≥ḃĊċḊḋḞḟĠġṀæø' + + 'ṁṖṗɼƒſṠ«»… ÀÃÕŒœ–—“”‘’ṡẛÿŸṪ€‹›Ŷŷṫ·Ỳỳ⁊ÂÊÁËÈÍÎÏÌÓÔ♣ÒÚÛÙıÝýŴŵẄẅẀẁẂẃ', + 'x-mac-greek': // Python: 'mac_greek' + 'Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦€ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩ' + + 'άΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ\u00AD', + 'x-mac-icelandic': // Python: 'mac_iceland' + 'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüÝ°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø' + + '¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ', + 'x-mac-inuit': + // http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/INUIT.TXT + 'ᐃᐄᐅᐆᐊᐋᐱᐲᐳᐴᐸᐹᑉᑎᑏᑐᑑᑕᑖᑦᑭᑮᑯᑰᑲᑳᒃᒋᒌᒍᒎᒐᒑ°ᒡᒥᒦ•¶ᒧ®©™ᒨᒪᒫᒻᓂᓃᓄᓅᓇᓈᓐᓯᓰᓱᓲᓴᓵᔅᓕᓖᓗ' + + 'ᓘᓚᓛᓪᔨᔩᔪᔫᔭ… ᔮᔾᕕᕖᕗ–—“”‘’ᕘᕙᕚᕝᕆᕇᕈᕉᕋᕌᕐᕿᖀᖁᖂᖃᖄᖅᖏᖐᖑᖒᖓᖔᖕᙱᙲᙳᙴᙵᙶᖖᖠᖡᖢᖣᖤᖥᖦᕼŁł', + 'x-mac-ce': // Python: 'mac_latin2' + 'ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅ' + + 'ņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ', + macintosh: // Python: 'mac_roman' + 'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø' + + '¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ', + 'x-mac-romanian': // Python: 'mac_romanian' + 'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂȘ∞±≤≥¥µ∂∑∏π∫ªºΩăș' + + '¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›Țț‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ', + 'x-mac-turkish': // Python: 'mac_turkish' + 'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø' + + '¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙˆ˜¯˘˙˚¸˝˛ˇ' +}; + +// Decodes an old-style Macintosh string. Returns either a Unicode JavaScript +// string, or 'undefined' if the encoding is unsupported. For example, we do +// not support Chinese, Japanese or Korean because these would need large +// mapping tables. +decode.MACSTRING = function(dataView, offset, dataLength, encoding) { + var table = eightBitMacEncodings[encoding]; + if (table === undefined) { + return undefined; + } + + var result = ''; + for (var i = 0; i < dataLength; i++) { + var c = dataView.getUint8(offset + i); + // In all eight-bit Mac encodings, the characters 0x00..0x7F are + // mapped to U+0000..U+007F; we only need to look up the others. + if (c <= 0x7F) { + result += String.fromCharCode(c); + } else { + result += table[c & 0x7F]; + } + } + + return result; +}; + +// Helper function for encode.MACSTRING. Returns a dictionary for mapping +// Unicode character codes to their 8-bit MacOS equivalent. This table +// is not exactly a super cheap data structure, but we do not care because +// encoding Macintosh strings is only rarely needed in typical applications. +var macEncodingTableCache = typeof WeakMap === 'function' && new WeakMap(); +var macEncodingCacheKeys; +var getMacEncodingTable = function(encoding) { + // Since we use encoding as a cache key for WeakMap, it has to be + // a String object and not a literal. And at least on NodeJS 2.10.1, + // WeakMap requires that the same String instance is passed for cache hits. + if (!macEncodingCacheKeys) { + macEncodingCacheKeys = {}; + for (var e in eightBitMacEncodings) { + /*jshint -W053 */ // Suppress "Do not use String as a constructor." + macEncodingCacheKeys[e] = new String(e); + } + } + + var cacheKey = macEncodingCacheKeys[encoding]; + if (cacheKey === undefined) { + return undefined; + } + + // We can't do "if (cache.has(key)) {return cache.get(key)}" here: + // since garbage collection may run at any time, it could also kick in + // between the calls to cache.has() and cache.get(). In that case, + // we would return 'undefined' even though we do support the encoding. + if (macEncodingTableCache) { + var cachedTable = macEncodingTableCache.get(cacheKey); + if (cachedTable !== undefined) { + return cachedTable; + } + } + + var decodingTable = eightBitMacEncodings[encoding]; + if (decodingTable === undefined) { + return undefined; + } + + var encodingTable = {}; + for (var i = 0; i < decodingTable.length; i++) { + encodingTable[decodingTable.charCodeAt(i)] = i + 0x80; + } + + if (macEncodingTableCache) { + macEncodingTableCache.set(cacheKey, encodingTable); + } + + return encodingTable; +}; + +// Encodes an old-style Macintosh string. Returns a byte array upon success. +// If the requested encoding is unsupported, or if the input string contains +// a character that cannot be expressed in the encoding, the function returns +// 'undefined'. +encode.MACSTRING = function(str, encoding) { + var table = getMacEncodingTable(encoding); + if (table === undefined) { + return undefined; + } + + var result = []; + for (var i = 0; i < str.length; i++) { + var c = str.charCodeAt(i); + + // In all eight-bit Mac encodings, the characters 0x00..0x7F are + // mapped to U+0000..U+007F; we only need to look up the others. + if (c >= 0x80) { + c = table[c]; + if (c === undefined) { + // str contains a Unicode character that cannot be encoded + // in the requested encoding. + return undefined; + } + } + + result.push(c); + } + + return result; +}; + +sizeOf.MACSTRING = function(str, encoding) { + var b = encode.MACSTRING(str, encoding); + if (b !== undefined) { + return b.length; + } else { + return 0; + } +}; + // Convert a list of values to a CFF INDEX structure. // The values should be objects containing name / type / value. encode.INDEX = function(l) { @@ -4834,8 +5935,12 @@ sizeOf.OP = sizeOf.BYTE; var wmm = typeof WeakMap === 'function' && new WeakMap(); // Convert a list of CharString operations to bytes. encode.CHARSTRING = function(ops) { - if (wmm && wmm.has(ops)) { - return wmm.get(ops); + // See encode.MACSTRING for why we don't do "if (wmm && wmm.has(ops))". + if (wmm) { + var cachedValue = wmm.get(ops); + if (cachedValue !== undefined) { + return cachedValue; + } } var d = []; @@ -4866,6 +5971,12 @@ encode.OBJECT = function(v) { return encodingFunction(v.value); }; +sizeOf.OBJECT = function(v) { + var sizeOfFunction = sizeOf[v.type]; + check.argument(sizeOfFunction !== undefined, 'No sizeOf function for type ' + v.type); + return sizeOfFunction(v.value); +}; + // Convert a table object to bytes. // A table contains a list of fields containing the metadata (name, type and default value). // The table itself has the field values set as attributes. @@ -4889,6 +6000,25 @@ encode.TABLE = function(table) { return d; }; +sizeOf.TABLE = function(table) { + var numBytes = 0; + var length = table.fields.length; + + for (var i = 0; i < length; i += 1) { + var field = table.fields[i]; + var sizeOfFunction = sizeOf[field.type]; + check.argument(sizeOfFunction !== undefined, 'No sizeOf function for field type ' + field.type); + var value = table[field.name]; + if (value === undefined) { + value = field.value; + } + + numBytes += sizeOfFunction(value); + } + + return numBytes; +}; + // Merge in a list of bytes. encode.LITERAL = function(v) { return v; @@ -4902,7 +6032,7 @@ exports.decode = decode; exports.encode = encode; exports.sizeOf = sizeOf; -},{"./check":2}],27:[function(_dereq_,module,exports){ +},{"./check":2}],29:[function(_dereq_,module,exports){ /*! * Reqwest! A general purpose XHR connection manager * license MIT (c) Dustin Diaz 2014 @@ -5519,7 +6649,7 @@ exports.sizeOf = sizeOf; return reqwest }); -},{}],28:[function(_dereq_,module,exports){ +},{}],30:[function(_dereq_,module,exports){ /** * @module Shape * @submodule 3D Primitives @@ -5646,21 +6776,20 @@ p5.prototype.sphere = function(radius, detail){ }; /** - * Draw an ellipsoid with given radius + * Draw an ellipsoid with given raduis * @method ellipsoid * @param {Number} radiusx xradius of circle * @param {Number} radiusy yradius of circle * @param {Number} radiusz zradius of circle - * @param {Number} [detail] Number of segments. - * The more segments, the smoother the - * geometry (default is 24). Avoid detail - * number above 150. It may crash the - * browser. + * @param {Number} [detail] number of segments, + * the more segments the smoother geometry + * default is 24. Avoid detail number above + * 150. It may crash the browser. * @return {p5} the p5 object * @example *
* - * // draw an ellipsoid with radius 200, 300 and 400 + * // draw an ellipsoid with radius 200, 300 and 400 . * function setup(){ * createCanvas(100, 100, WEBGL); * } @@ -5723,7 +6852,7 @@ p5.prototype.ellipsoid = function(radiusx, radiusy, radiusz, detail){ * @example *
* - * //draw a spinning cylinder with radius 200 and height 200 + * //draw a spining sylinder with radius 200 and height 200 * function setup(){ * createCanvas(100, 100, WEBGL); * } @@ -5819,7 +6948,7 @@ p5.prototype.cylinder = function(radius, height, detail){ * @example *
* - * //draw a spinning cone with radius 200 and height 200 + * //draw a spining cone with radius 200 and height 200 * function setup(){ * createCanvas(100, 100, WEBGL); * } @@ -5892,7 +7021,7 @@ p5.prototype.cone = function(radius, height, detail){ * @example *
* - * //draw a spinning torus with radius 200 and tube radius 60 + * //draw a spining torus with radius 200 and tube radius 60 * function setup(){ * createCanvas(100, 100, WEBGL); * } @@ -5951,7 +7080,7 @@ p5.prototype.torus = function(radius, tubeRadius, detail){ * @example *
* - * //draw a spinning box with width, height and depth 200 + * //draw a spining box with width, height and depth 200 * function setup(){ * createCanvas(100, 100, WEBGL); * } @@ -6043,7 +7172,7 @@ p5.prototype.box = function(width, height, depth){ }; module.exports = p5; -},{"../core/core":48,"./p5.Geometry3D":34}],29:[function(_dereq_,module,exports){ +},{"../core/core":50,"./p5.Geometry3D":36}],31:[function(_dereq_,module,exports){ /** * @module Lights, Camera * @submodule Camera @@ -6193,7 +7322,7 @@ p5.prototype.ortho = function(left,right,bottom,top,near,far) { module.exports = p5; -},{"../core/core":48}],30:[function(_dereq_,module,exports){ +},{"../core/core":50}],32:[function(_dereq_,module,exports){ //@TODO: documentation of immediate mode 'use strict'; @@ -6328,7 +7457,7 @@ p5.Renderer3D.prototype.strokeWeight = function() { ////////////////////////////////////////////// p5.Renderer3D.prototype.fill = function(r, g, b, a) { - var color = this._pInst.color.apply(this, arguments); + var color = this._pInst.color.apply(this._pInst, arguments); var colorNormalized = color._array; this.curColor = colorNormalized; this.drawMode = 'fill'; @@ -6336,7 +7465,7 @@ p5.Renderer3D.prototype.fill = function(r, g, b, a) { }; p5.Renderer3D.prototype.stroke = function(r, g, b, a) { - var color = this._pInst.color.apply(this, arguments); + var color = this._pInst.color.apply(this._pInst, arguments); var colorNormalized = color._array; this.curColor = colorNormalized; this.drawMode = 'stroke'; @@ -6363,7 +7492,7 @@ p5.Renderer3D.prototype._getColorVertexShader = function(){ module.exports = p5.Renderer3D; -},{"../core/core":48}],31:[function(_dereq_,module,exports){ +},{"../core/core":50}],33:[function(_dereq_,module,exports){ 'use strict'; var p5 = _dereq_('../core/core'); @@ -6379,7 +7508,7 @@ p5.prototype.orbitControl = function(){ }; module.exports = p5; -},{"../core/core":48}],32:[function(_dereq_,module,exports){ +},{"../core/core":50}],34:[function(_dereq_,module,exports){ /** * @module Lights, Camera * @submodule Lights @@ -6696,7 +7825,7 @@ p5.prototype.pointLight = function(v1, v2, v3, a, x, y, z) { module.exports = p5; -},{"../core/core":48}],33:[function(_dereq_,module,exports){ +},{"../core/core":50}],35:[function(_dereq_,module,exports){ /** * @module Lights, Camera * @submodule Material @@ -6994,7 +8123,7 @@ p5.prototype.specularMaterial = function(v1, v2, v3, a) { module.exports = p5; -},{"../core/core":48}],34:[function(_dereq_,module,exports){ +},{"../core/core":50}],36:[function(_dereq_,module,exports){ //some of the functions are adjusted from Three.js(http://threejs.org) 'use strict'; @@ -7252,7 +8381,7 @@ function turnVectorArrayIntoNumberArray(arr){ } module.exports = p5.Geometry3D; -},{"../core/core":48}],35:[function(_dereq_,module,exports){ +},{"../core/core":50}],37:[function(_dereq_,module,exports){ /** * @requires constants * @todo see methods below needing further implementation. @@ -7858,7 +8987,7 @@ p5.Matrix.prototype.ortho = function(left,right,bottom,top,near,far){ //]; module.exports = p5.Matrix; -},{"../core/constants":47,"../core/core":48,"../math/polargeometry":77}],36:[function(_dereq_,module,exports){ +},{"../core/constants":49,"../core/core":50,"../math/polargeometry":79}],38:[function(_dereq_,module,exports){ 'use strict'; var p5 = _dereq_('../core/core'); @@ -8267,7 +9396,7 @@ p5.Renderer3D.prototype.pop = function() { module.exports = p5.Renderer3D; -},{"../core/core":48,"../core/p5.Renderer":54,"./p5.Matrix":35,"./shader":38}],37:[function(_dereq_,module,exports){ +},{"../core/core":50,"../core/p5.Renderer":56,"./p5.Matrix":37,"./shader":40}],39:[function(_dereq_,module,exports){ //retained mode is used by rendering 3d_primitives 'use strict'; @@ -8383,7 +9512,7 @@ p5.Renderer3D.prototype.drawBuffer = function(gId) { }; module.exports = p5.Renderer3D; -},{"../core/core":48}],38:[function(_dereq_,module,exports){ +},{"../core/core":50}],40:[function(_dereq_,module,exports){ module.exports = { @@ -8402,7 +9531,7 @@ module.exports = { lightTextureFrag: "precision mediump float;\n\nuniform vec4 uMaterialColor;\nuniform sampler2D uSampler;\nuniform bool isTexture;\n\nvarying vec3 vLightWeighting;\nvarying highp vec2 vVertTexCoord;\n\nvoid main(void) {\n if(!isTexture){\n gl_FragColor = vec4(vec3(uMaterialColor.rgb * vLightWeighting), uMaterialColor.a);\n }else{\n vec4 textureColor = texture2D(uSampler, vVertTexCoord);\n if(vLightWeighting == vec3(0., 0., 0.)){\n gl_FragColor = textureColor;\n }else{\n gl_FragColor = vec4(vec3(textureColor.rgb * vLightWeighting), textureColor.a); \n }\n }\n}" }; -},{}],39:[function(_dereq_,module,exports){ +},{}],41:[function(_dereq_,module,exports){ 'use strict'; @@ -8492,7 +9621,7 @@ if (document.readyState === 'complete') { } module.exports = p5; -},{"./3d/3d_primitives":28,"./3d/camera":29,"./3d/immediateMode3D":30,"./3d/interaction":31,"./3d/light":32,"./3d/material":33,"./3d/p5.Geometry3D":34,"./3d/p5.Matrix":35,"./3d/p5.Renderer3D":36,"./3d/retainedMode3D":37,"./3d/shader":38,"./color/creating_reading":41,"./color/p5.Color":42,"./color/setting":43,"./core/2d_primitives":44,"./core/attributes":45,"./core/constants":47,"./core/core":48,"./core/curves":49,"./core/environment":50,"./core/p5.Element":52,"./core/p5.Graphics":53,"./core/p5.Renderer2D":55,"./core/rendering":56,"./core/structure":58,"./core/transform":59,"./core/vertex":60,"./events/acceleration":61,"./events/keyboard":62,"./events/mouse":63,"./events/touch":64,"./image/image":66,"./image/loading_displaying":67,"./image/p5.Image":68,"./image/pixels":69,"./io/files":70,"./io/p5.Table":71,"./io/p5.TableRow":72,"./math/calculation":73,"./math/math":74,"./math/noise":75,"./math/p5.Vector":76,"./math/random":78,"./math/trigonometry":79,"./typography/attributes":80,"./typography/loading_displaying":81,"./typography/p5.Font":82,"./utilities/array_functions":83,"./utilities/conversion":84,"./utilities/string_functions":85,"./utilities/time_date":86}],40:[function(_dereq_,module,exports){ +},{"./3d/3d_primitives":30,"./3d/camera":31,"./3d/immediateMode3D":32,"./3d/interaction":33,"./3d/light":34,"./3d/material":35,"./3d/p5.Geometry3D":36,"./3d/p5.Matrix":37,"./3d/p5.Renderer3D":38,"./3d/retainedMode3D":39,"./3d/shader":40,"./color/creating_reading":43,"./color/p5.Color":44,"./color/setting":45,"./core/2d_primitives":46,"./core/attributes":47,"./core/constants":49,"./core/core":50,"./core/curves":51,"./core/environment":52,"./core/p5.Element":54,"./core/p5.Graphics":55,"./core/p5.Renderer2D":57,"./core/rendering":58,"./core/structure":60,"./core/transform":61,"./core/vertex":62,"./events/acceleration":63,"./events/keyboard":64,"./events/mouse":65,"./events/touch":66,"./image/image":68,"./image/loading_displaying":69,"./image/p5.Image":70,"./image/pixels":71,"./io/files":72,"./io/p5.Table":73,"./io/p5.TableRow":74,"./math/calculation":75,"./math/math":76,"./math/noise":77,"./math/p5.Vector":78,"./math/random":80,"./math/trigonometry":81,"./typography/attributes":82,"./typography/loading_displaying":83,"./typography/p5.Font":84,"./utilities/array_functions":85,"./utilities/conversion":86,"./utilities/string_functions":87,"./utilities/time_date":88}],42:[function(_dereq_,module,exports){ /** * module Conversion * submodule Color Conversion @@ -8745,7 +9874,7 @@ p5.ColorConversion._rgbaToHSLA = function(rgba) { module.exports = p5.ColorConversion; -},{"../core/core":48}],41:[function(_dereq_,module,exports){ +},{"../core/core":50}],43:[function(_dereq_,module,exports){ /** * @module Color * @submodule Creating & Reading @@ -8994,17 +10123,9 @@ p5.prototype.color = function() { if (arguments[0] instanceof p5.Color) { return arguments[0]; // Do nothing if argument is already a color object. } else if (arguments[0] instanceof Array) { - if (this instanceof p5.Renderer) { - return new p5.Color(this, arguments[0]); - } else { - return new p5.Color(this._renderer, arguments[0]); - } + return new p5.Color(this, arguments[0]); } else { - if (this instanceof p5.Renderer) { - return new p5.Color(this, arguments); - } else { - return new p5.Color(this._renderer, arguments); - } + return new p5.Color(this, arguments); } }; @@ -9249,7 +10370,7 @@ p5.prototype.saturation = function(c) { module.exports = p5; -},{"../core/constants":47,"../core/core":48,"./p5.Color":42}],42:[function(_dereq_,module,exports){ +},{"../core/constants":49,"../core/core":50,"./p5.Color":44}],44:[function(_dereq_,module,exports){ /** * @module Color * @submodule Creating & Reading @@ -9280,11 +10401,11 @@ var color_conversion = _dereq_('./color_conversion'); * @class p5.Color * @constructor */ -p5.Color = function(renderer, vals) { +p5.Color = function(pInst, vals) { // Record color mode and maxes at time of construction. - this.mode = renderer._colorMode; - this.maxes = renderer._colorMaxes; + this.mode = pInst._renderer._colorMode; + this.maxes = pInst._renderer._colorMaxes; // Calculate normalized RGBA values. if (this.mode !== constants.RGB && @@ -9292,7 +10413,7 @@ p5.Color = function(renderer, vals) { this.mode !== constants.HSB) { throw new Error(this.mode + ' is an invalid colorMode.'); } else { - this._array = p5.Color._parseInputs.apply(renderer, vals); + this._array = p5.Color._parseInputs.apply(pInst, vals); } // Expose closest screen color. @@ -9677,8 +10798,8 @@ var colorPatterns = { */ p5.Color._parseInputs = function() { var numArgs = arguments.length; - var mode = this._colorMode; - var maxes = this._colorMaxes; + var mode = this._renderer._colorMode; + var maxes = this._renderer._colorMaxes; var results = []; if (numArgs >= 3) { // Argument is a list of component values. @@ -9851,7 +10972,7 @@ p5.Color._parseInputs = function() { module.exports = p5.Color; -},{"../core/constants":47,"../core/core":48,"./color_conversion":40}],43:[function(_dereq_,module,exports){ +},{"../core/constants":49,"../core/core":50,"./color_conversion":42}],45:[function(_dereq_,module,exports){ /** * @module Color * @submodule Setting @@ -10400,7 +11521,7 @@ p5.prototype.stroke = function() { module.exports = p5; -},{"../core/constants":47,"../core/core":48,"./p5.Color":42}],44:[function(_dereq_,module,exports){ +},{"../core/constants":49,"../core/core":50,"./p5.Color":44}],46:[function(_dereq_,module,exports){ /** * @module Shape * @submodule 2D Primitives @@ -10718,14 +11839,14 @@ p5.prototype.point = function() { * clockwise or counter-clockwise around the defined shape. * * @method quad - * @param {Number} x1 the x-coordinate of the first point - * @param {Number} y1 the y-coordinate of the first point - * @param {Number} x2 the x-coordinate of the second point - * @param {Number} y2 the y-coordinate of the second point - * @param {Number} x3 the x-coordinate of the third point - * @param {Number} y3 the y-coordinate of the third point - * @param {Number} x4 the x-coordinate of the fourth point - * @param {Number} y4 the y-coordinate of the fourth point + * @param {type} x1 the x-coordinate of the first point + * @param {type} y1 the y-coordinate of the first point + * @param {type} x2 the x-coordinate of the second point + * @param {type} y2 the y-coordinate of the second point + * @param {type} x3 the x-coordinate of the third point + * @param {type} y3 the y-coordinate of the third point + * @param {type} x4 the x-coordinate of the fourth point + * @param {type} y4 the y-coordinate of the fourth point * @return {p5} the p5 object * @example *
@@ -10929,7 +12050,7 @@ p5.prototype.triangle = function() { module.exports = p5; -},{"./constants":47,"./core":48,"./error_helpers":51}],45:[function(_dereq_,module,exports){ +},{"./constants":49,"./core":50,"./error_helpers":53}],47:[function(_dereq_,module,exports){ /** * @module Shape * @submodule Attributes @@ -11228,7 +12349,7 @@ p5.prototype.strokeWeight = function(w) { module.exports = p5; -},{"./constants":47,"./core":48}],46:[function(_dereq_,module,exports){ +},{"./constants":49,"./core":50}],48:[function(_dereq_,module,exports){ /** * @requires constants */ @@ -11264,7 +12385,7 @@ module.exports = { }; -},{"./constants":47}],47:[function(_dereq_,module,exports){ +},{"./constants":49}],49:[function(_dereq_,module,exports){ /** * @module Constants * @submodule Constants @@ -11467,7 +12588,7 @@ module.exports = { }; -},{}],48:[function(_dereq_,module,exports){ +},{}],50:[function(_dereq_,module,exports){ /** * @module Structure * @submodule Structure @@ -11757,9 +12878,6 @@ var p5 = function(sketch, node, sync) { if (typeof context.preload === 'function') { for (var f in this._preloadMethods) { context[f] = this._preloadMethods[f][f]; - if (context[f] && this) { - context[f] = context[f].bind(this); - } } } @@ -12013,7 +13131,7 @@ p5.prototype.registerMethod = function(name, m) { module.exports = p5; -},{"./constants":47,"./shim":57}],49:[function(_dereq_,module,exports){ +},{"./constants":49,"./shim":59}],51:[function(_dereq_,module,exports){ /** * @module Shape * @submodule Curves @@ -12392,7 +13510,7 @@ p5.prototype.curvePoint = function(a, b, c, d, t) { /** * Evaluates the tangent to the curve at position t for points a, b, c, d. * The parameter t varies between 0 and 1, a and d are points on the curve, - * and b and c are the control points. + * and b and c are the control points * * @method curveTangent * @param {Number} a coordinate of first point on the curve @@ -12432,7 +13550,7 @@ p5.prototype.curveTangent = function(a, b,c, d, t) { module.exports = p5; -},{"./core":48,"./error_helpers":51}],50:[function(_dereq_,module,exports){ +},{"./core":50,"./error_helpers":53}],52:[function(_dereq_,module,exports){ /** * @module Environment * @submodule Environment @@ -12813,9 +13931,8 @@ p5.prototype.height = 0; * be called on user input, for example, on mouse press like the example * below. * - * @method fullscreen - * @param {Boolean} [val] whether the sketch should be in fullscreen mode - * or not + * @method fullScreen + * @param {Boolean} [val] whether the sketch should be fullscreened or not * @return {Boolean} current fullscreen state * @example *
@@ -12826,14 +13943,14 @@ p5.prototype.height = 0; * } * function mousePressed() { * if (mouseX > 0 && mouseX < 100 && mouseY > 0 && mouseY < 100) { - * var fs = fullscreen(); - * fullscreen(!fs); + * var fs = fullScreen(); + * fullScreen(!fs); * } * } * *
*/ -p5.prototype.fullscreen = function(val) { +p5.prototype.fullScreen = function(val) { // no arguments, return fullscreen or not if (typeof val === 'undefined') { return document.fullscreenElement || @@ -13021,7 +14138,7 @@ p5.prototype.getURLParams = function() { module.exports = p5; -},{"./constants":47,"./core":48}],51:[function(_dereq_,module,exports){ +},{"./constants":49,"./core":50}],53:[function(_dereq_,module,exports){ /** * @for p5 * @requires core @@ -13259,7 +14376,7 @@ function friendlyWelcome() { ' \\/|_|\\/ '+ '\n\n%c> p5.js says: Welcome! '+ 'This is your friendly debugger. ' + - 'To turn me off switch to using “p5.min.js”.', + 'To turn me off switch to using “p5.min.js”.', 'background-color:'+astrixBgColor+';color:' + astrixTxtColor +';', 'background-color:'+welcomeBgColor+';color:' + welcomeTextColor +';' ); @@ -13289,111 +14406,28 @@ function friendlyWelcome() { report(str, 'println', '#4DB200'); // auto dark green } */ -// This is a lazily-defined list of p5 symbols that may be -// misused by beginners at top-level code, outside of setup/draw. We'd like -// to detect these errors and help the user by suggesting they move them +// This is a list of p5 functions/variables that are commonly misused +// by beginners at top-level code, outside of setup/draw. We'd like to +// detect these errors and help the user by suggesting they move them // into setup/draw. // // For more details, see https://github.com/processing/p5.js/issues/1121. -var misusedAtTopLevelCode = null; -var FAQ_URL = 'https://github.com/processing/p5.js/wiki/' + - 'Frequently-Asked-Questions' + - '#why-cant-i-assign-variables-using-p5-functions-and-' + - 'variables-before-setup'; - -function defineMisusedAtTopLevelCode() { - var uniqueNamesFound = {}; - - var getSymbols = function(obj) { - return Object.getOwnPropertyNames(obj).filter(function(name) { - if (name[0] === '_') { - return false; - } - if (name in uniqueNamesFound) { - return false; - } - - uniqueNamesFound[name] = true; - - return true; - }).map(function(name) { - var type; - - if (typeof(obj[name]) === 'function') { - type = 'function'; - } else if (name === name.toUpperCase()) { - type = 'constant'; - } else { - type = 'variable'; - } - - return {name: name, type: type}; - }); - }; - - misusedAtTopLevelCode = [].concat( - getSymbols(p5.prototype), - // At present, p5 only adds its constants to p5.prototype during - // construction, which may not have happened at the time a - // ReferenceError is thrown, so we'll manually add them to our list. - getSymbols(_dereq_('./constants')) - ); - - // This will ultimately ensure that we report the most specific error - // possible to the user, e.g. advising them about HALF_PI instead of PI - // when their code misuses the former. - misusedAtTopLevelCode.sort(function(a, b) { - return b.name.length - a.name.length; - }); -} - -function helpForMisusedAtTopLevelCode(e, log) { - if (!log) { - log = console.log.bind(console); - } - - if (!misusedAtTopLevelCode) { - defineMisusedAtTopLevelCode(); - } +var misusedAtTopLevelCode = [ + 'color', + 'random' +]; - // If we find that we're logging lots of false positives, we can - // uncomment the following code to avoid displaying anything if the - // user's code isn't likely to be using p5's global mode. (Note that - // setup/draw are more likely to be defined due to JS function hoisting.) - // - //if (!('setup' in window || 'draw' in window)) { - // return; - //} - - misusedAtTopLevelCode.some(function(symbol) { - // Note that while just checking for the occurrence of the - // symbol name in the error message could result in false positives, - // a more rigorous test is difficult because different browsers - // log different messages, and the format of those messages may - // change over time. - // - // For example, if the user uses 'PI' in their code, it may result - // in any one of the following messages: - // - // * 'PI' is undefined (Microsoft Edge) - // * ReferenceError: PI is undefined (Firefox) - // * Uncaught ReferenceError: PI is not defined (Chrome) - - if (e.message && e.message.indexOf(symbol.name) !== -1) { - log('%cDid you just try to use p5.js\'s ' + symbol.name + - (symbol.type === 'function' ? '() ' : ' ') + symbol.type + - '? If so, you may want to ' + - 'move it into your sketch\'s setup() function.\n\n' + - 'For more details, see: ' + FAQ_URL, - 'color: #B40033' /* Dark magenta */); - return true; +function helpForMisusedAtTopLevelCode(e) { + misusedAtTopLevelCode.forEach(function(name) { + if (e.message && e.message.indexOf(name) !== -1) { + console.log('%c Did you just try to use p5.js\'s \'' + name + '\' ' + + 'function or variable? If so, you may want to ' + + 'move it into your sketch\'s setup() function.', + 'color: #B40033' /* Dark magenta */); } }); } -// Exposing this primarily for unit testing. -p5.prototype._helpForMisusedAtTopLevelCode = helpForMisusedAtTopLevelCode; - if (document.readyState !== 'complete') { window.addEventListener('error', helpForMisusedAtTopLevelCode, false); @@ -13408,7 +14442,7 @@ if (document.readyState !== 'complete') { module.exports = p5; -},{"./constants":47,"./core":48}],52:[function(_dereq_,module,exports){ +},{"./core":50}],54:[function(_dereq_,module,exports){ /** * @module DOM * @submodule DOM @@ -13592,41 +14626,6 @@ p5.Element.prototype.mousePressed = function (fxn) { * @param {Function} fxn function to be fired when mouse wheel is * scrolled over the element. * @return {p5.Element} - * @example - *
- * var cnv; - * var d; - * var g; - * function setup() { - * cnv = createCanvas(100, 100); - * cnv.mouseWheel(changeSize); // attach listener for - * // activity on canvas only - * d = 10; - * g = 100; - * } - * - * function draw() { - * background(g); - * ellipse(width/2, height/2, d, d); - * } - * - * // this function fires with mousewheel movement - * // anywhere on screen - * function mouseWheel() { - * g = g + 10; - * } - * - * // this function fires with mousewheel movement - * // over canvas only - * function changeSize() { - * if (event.wheelDelta > 0) { - * d = d + 10; - * } else { - * d = d - 10; - * } - * } - *
- * */ p5.Element.prototype.mouseWheel = function (fxn) { attachListener('wheel', fxn, this); @@ -13638,41 +14637,10 @@ p5.Element.prototype.mouseWheel = function (fxn) { * mouse button is released over the element. This can be used to * attach element specific event listeners. * - * @method mouseReleased - * @param {Function} fxn function to be fired when mouse is - * released over the element. - * @return {p5.Element} - * @example - *
- * var cnv; - * var d; - * var g; - * function setup() { - * cnv = createCanvas(100, 100); - * cnv.mouseReleased(changeGray); // attach listener for - * // activity on canvas only - * d = 10; - * g = 100; - * } - * - * function draw() { - * background(g); - * ellipse(width/2, height/2, d, d); - * } - * - * // this function fires after the mouse has been - * // released - * function mouseReleased() { - * d = d + 10; - * } - * - * // this function fires after the mouse has been - * // released while on canvas - * function changeGray() { - * g = random(0, 255); - * } - *
- * + * @method mouseReleased + * @param {Function} fxn function to be fired when mouse is + * released over the element. + * @return {p5.Element} */ p5.Element.prototype.mouseReleased = function (fxn) { attachListener('mouseup', fxn, this); @@ -13690,36 +14658,6 @@ p5.Element.prototype.mouseReleased = function (fxn) { * @param {Function} fxn function to be fired when mouse is * clicked over the element. * @return {p5.Element} - * @example - * var cnv; - * var d; - * var g; - * function setup() { - * cnv = createCanvas(100, 100); - * cnv.mouseClicked(changeGray); // attach listener for - * // activity on canvas only - * d = 10; - * g = 100; - * } - * - * function draw() { - * background(g); - * ellipse(width/2, height/2, d, d); - * } - * - * // this function fires after the mouse has been - * // clicked anywhere - * function mouseClicked() { - * d = d + 10; - * } - * - * // this function fires after the mouse has been - * // clicked on canvas - * function changeGray() { - * g = random(0, 255); - * } - *
- * */ p5.Element.prototype.mouseClicked = function (fxn) { attachListener('click', fxn, this); @@ -13735,43 +14673,6 @@ p5.Element.prototype.mouseClicked = function (fxn) { * @param {Function} fxn function to be fired when mouse is * moved over the element. * @return {p5.Element} - * @example - *
- * var cnv; - * var d = 30; - * var g; - * function setup() { - * cnv = createCanvas(100, 100); - * cnv.mouseMoved(changeSize); // attach listener for - * // activity on canvas only - * d = 10; - * g = 100; - * } - * - * function draw() { - * background(g); - * fill(200); - * ellipse(width/2, height/2, d, d); - * } - * - * // this function fires when mouse moves anywhere on - * // page - * function mouseMoved() { - * g = g + 5; - * if (g > 255) { - * g = 0; - * } - * } - * - * // this function fires when mouse moves over canvas - * function changeSize() { - * d = d + 2; - * if (d > 100) { - * d = 0; - * } - * } - *
- * */ p5.Element.prototype.mouseMoved = function (fxn) { attachListener('mousemove', fxn, this); @@ -13788,29 +14689,6 @@ p5.Element.prototype.mouseMoved = function (fxn) { * @param {Function} fxn function to be fired when mouse is * moved over the element. * @return {p5.Element} - * @example - *
- * var cnv; - * var d; - * var g; - * function setup() { - * cnv = createCanvas(100, 100); - * cnv.mouseOver(changeGray); - * d = 10; - * } - * - * function draw() { - * ellipse(width/2, height/2, d, d); - * } - * - * function changeGray() { - * d = d + 10; - * if (d > 100) { - * d = 0; - * } - * } - *
- * */ p5.Element.prototype.mouseOver = function (fxn) { attachListener('mouseover', fxn, this); @@ -13827,52 +14705,6 @@ p5.Element.prototype.mouseOver = function (fxn) { * @param {Function} fxn function to be fired when the value of an * element changes. * @return {p5.Element} - * @example - *
- * var sel; - * - * function setup() { - * textAlign(CENTER); - * background(200); - * sel = createSelect(); - * sel.position(10, 10); - * sel.option('pear'); - * sel.option('kiwi'); - * sel.option('grape'); - * sel.changed(mySelectEvent); - * } - * - * function mySelectEvent() { - * var item = sel.value(); - * background(200); - * text("it's a "+item+"!", 50, 50); - * } - *
- *
- * var checkbox; - * var cnv; - * - * function setup() { - * checkbox = createCheckbox(" fill"); - * checkbox.changed(changeFill); - * cnv = createCanvas(100, 100); - * cnv.position(0, 30); - * noFill(); - * } - * - * function draw() { - * background(200); - * ellipse(50, 50, 50, 50); - * } - * - * function changeFill() { - * if (checkbox.checked()) { - * fill(0); - * } else { - * noFill(); - * } - * } - *
*/ p5.Element.prototype.changed = function (fxn) { attachListener('change', fxn, this); @@ -13889,19 +14721,6 @@ p5.Element.prototype.changed = function (fxn) { * @method input * @param {Function} fxn function to be fired on user input. * @return {p5.Element} - * @example - *
- * // Open your console to see the output - * function setup() { - * var inp = createInput(''); - * inp.input(myInputEvent); - * } - * - * function myInputEvent() { - * console.log('you are typing: ', this.value()); - * } - *
- * */ p5.Element.prototype.input = function (fxn) { attachListener('input', fxn, this); @@ -13917,29 +14736,6 @@ p5.Element.prototype.input = function (fxn) { * @param {Function} fxn function to be fired when mouse is * moved off the element. * @return {p5.Element} - * @example - *
- * var cnv; - * var d; - * var g; - * function setup() { - * cnv = createCanvas(100, 100); - * cnv.mouseOut(changeGray); - * d = 10; - * } - * - * function draw() { - * ellipse(width/2, height/2, d, d); - * } - * - * function changeGray() { - * d = d + 10; - * if (d > 100) { - * d = 0; - * } - * } - *
- * */ p5.Element.prototype.mouseOut = function (fxn) { attachListener('mouseout', fxn, this); @@ -14201,7 +14997,7 @@ p5.Element.prototype._setProperty = function (prop, value) { module.exports = p5.Element; -},{"./core":48}],53:[function(_dereq_,module,exports){ +},{"./core":50}],55:[function(_dereq_,module,exports){ /** * @module Rendering * @submodule Rendering @@ -14268,7 +15064,7 @@ p5.Graphics.prototype = Object.create(p5.Element.prototype); module.exports = p5.Graphics; -},{"./constants":47,"./core":48}],54:[function(_dereq_,module,exports){ +},{"./constants":49,"./core":50}],56:[function(_dereq_,module,exports){ /** * @module Rendering * @submodule Rendering @@ -14486,7 +15282,7 @@ function calculateOffset(object) { module.exports = p5.Renderer; -},{"../core/constants":47,"./core":48}],55:[function(_dereq_,module,exports){ +},{"../core/constants":49,"./core":50}],57:[function(_dereq_,module,exports){ var p5 = _dereq_('./core'); var canvas = _dereq_('./canvas'); @@ -14540,7 +15336,7 @@ p5.Renderer2D.prototype.background = function() { } else { var curFill = this.drawingContext.fillStyle; // create background rect - var color = this._pInst.color.apply(this, arguments); + var color = this._pInst.color.apply(this._pInst, arguments); var newFill = color.toString(); this.drawingContext.fillStyle = newFill; this.drawingContext.fillRect(0, 0, this.width, this.height); @@ -14557,13 +15353,13 @@ p5.Renderer2D.prototype.clear = function() { p5.Renderer2D.prototype.fill = function() { var ctx = this.drawingContext; - var color = this._pInst.color.apply(this, arguments); + var color = this._pInst.color.apply(this._pInst, arguments); ctx.fillStyle = color.toString(); }; p5.Renderer2D.prototype.stroke = function() { var ctx = this.drawingContext; - var color = this._pInst.color.apply(this, arguments); + var color = this._pInst.color.apply(this._pInst, arguments); ctx.strokeStyle = color.toString(); }; @@ -15752,7 +16548,7 @@ p5.Renderer2D.prototype.pop = function() { module.exports = p5.Renderer2D; -},{"../image/filters":65,"./canvas":46,"./constants":47,"./core":48,"./p5.Renderer":54}],56:[function(_dereq_,module,exports){ +},{"../image/filters":67,"./canvas":48,"./constants":49,"./core":50,"./p5.Renderer":56}],58:[function(_dereq_,module,exports){ /** * @module Rendering * @submodule Rendering @@ -15780,7 +16576,7 @@ var defaultId = 'defaultCanvas0'; // this gets set again in createCanvas * @method createCanvas * @param {Number} w width of the canvas * @param {Number} h height of the canvas - * @param {String} [renderer] 'p2d' | 'webgl' + * @param optional:{String} renderer 'p2d' | 'webgl' * @return {Object} canvas generated * @example *
@@ -16034,7 +16830,7 @@ p5.prototype.blendMode = function(mode) { module.exports = p5; -},{"../3d/p5.Renderer3D":36,"./constants":47,"./core":48,"./p5.Graphics":53,"./p5.Renderer2D":55}],57:[function(_dereq_,module,exports){ +},{"../3d/p5.Renderer3D":38,"./constants":49,"./core":50,"./p5.Graphics":55,"./p5.Renderer2D":57}],59:[function(_dereq_,module,exports){ // requestAnim shim layer by Paul Irish window.requestAnimationFrame = (function(){ @@ -16067,7 +16863,7 @@ window.performance.now = (function(){ // http://paulirish.com/2011/requestanimationframe-for-smart-animating/ // http://my.opera.com/emoller/blog/2011/12/20/ // requestanimationframe-for-smart-er-animating -// requestAnimationFrame polyfill by Erik Möller +// requestAnimationFrame polyfill by Erik Möller // fixes from Paul Irish and Tino Zijdel (function() { var lastTime = 0; @@ -16103,21 +16899,18 @@ window.performance.now = (function(){ * shim for Uint8ClampedArray.slice * (allows arrayCopy to work with pixels[]) * with thanks to http://halfpapstudios.com/blog/tag/html5-canvas/ - * Enumerable set to false to protect for...in from - * Uint8ClampedArray.prototype pollution. */ (function () { 'use strict'; - if (typeof Uint8ClampedArray !== 'undefined' && - !Uint8ClampedArray.prototype.slice) { - Object.defineProperty(Uint8ClampedArray.prototype, 'slice', { - value: Array.prototype.slice, - writable: true, configurable: true, enumerable: false - }); + + if (typeof Uint8ClampedArray !== 'undefined') { + //Firefox and Chrome + Uint8ClampedArray.prototype.slice = Array.prototype.slice; } }()); -},{}],58:[function(_dereq_,module,exports){ + +},{}],60:[function(_dereq_,module,exports){ /** * @module Structure * @submodule Structure @@ -16426,7 +17219,7 @@ p5.prototype.size = function() { module.exports = p5; -},{"./core":48}],59:[function(_dereq_,module,exports){ +},{"./core":50}],61:[function(_dereq_,module,exports){ /** * @module Transform * @submodule Transform @@ -16831,7 +17624,7 @@ p5.prototype.translate = function(x, y, z) { module.exports = p5; -},{"./constants":47,"./core":48}],60:[function(_dereq_,module,exports){ +},{"./constants":49,"./core":50}],62:[function(_dereq_,module,exports){ /** * @module Shape * @submodule Vertex @@ -17437,7 +18230,7 @@ p5.prototype.vertex = function(x, y, moveTo) { module.exports = p5; -},{"./constants":47,"./core":48}],61:[function(_dereq_,module,exports){ +},{"./constants":49,"./core":50}],63:[function(_dereq_,module,exports){ /** * @module Events * @submodule Acceleration @@ -17523,27 +18316,6 @@ p5.prototype._updatePAccelerations = function(){ /** * The system variable rotationX always contains the rotation of the * device along the x axis. Value is represented as 0 to +/-180 degrees. - *

- * Note: The order the rotations are called is important, ie. if used - * together, it must be called in the order Z-X-Y or there might be - * unexpected behaviour. - * - * @example - *
- * - * function setup(){ - * createCanvas(100, 100, WEBGL); - * } - * - * function draw(){ - * background(200); - * //rotateZ(radians(rotationZ)); - * rotateX(radians(rotationX)); - * //rotateY(radians(rotationY)); - * box(200, 200, 200); - * } - * - *
* * @property rotationX */ @@ -17551,28 +18323,7 @@ p5.prototype.rotationX = 0; /** * The system variable rotationY always contains the rotation of the - * device along the y axis. Value is represented as 0 to +/-90 degrees. - *

- * Note: The order the rotations are called is important, ie. if used - * together, it must be called in the order Z-X-Y or there might be - * unexpected behaviour. - * - * @example - *
- * - * function setup(){ - * createCanvas(100, 100, WEBGL); - * } - * - * function draw(){ - * background(200); - * //rotateZ(radians(rotationZ)); - * //rotateX(radians(rotationX)); - * rotateY(radians(rotationY)); - * box(200, 200, 200); - * } - * - *
+ * device along the y axis. Value is represented as 0 to +/-180 degrees. * * @property rotationY */ @@ -17584,27 +18335,6 @@ p5.prototype.rotationY = 0; *

* Unlike rotationX and rotationY, this variable is available for devices * with a built-in compass only. - *

- * Note: The order the rotations are called is important, ie. if used - * together, it must be called in the order Z-X-Y or there might be - * unexpected behaviour. - * - * @example - *
- * - * function setup(){ - * createCanvas(100, 100, WEBGL); - * } - * - * function draw(){ - * background(200); - * rotateZ(radians(rotationZ)); - * //rotateX(radians(rotationX)); - * //rotateY(radians(rotationY)); - * box(200, 200, 200); - * } - * - *
* * @property rotationZ */ @@ -17651,7 +18381,7 @@ p5.prototype.pRotationX = 0; /** * The system variable pRotationY always contains the rotation of the * device along the y axis in the frame previous to the current frame. Value - * is represented as 0 to +/-90 degrees. + * is represented as 0 to +/-180 degrees. *

* pRotationY can also be used with rotationY to determine the rotate * direction of the device along the Y-axis. @@ -17995,7 +18725,7 @@ p5.prototype._handleMotion = function() { module.exports = p5; -},{"../core/core":48}],62:[function(_dereq_,module,exports){ +},{"../core/core":50}],64:[function(_dereq_,module,exports){ /** * @module Events * @submodule Keyboard @@ -18151,9 +18881,6 @@ p5.prototype.keyCode = 0; *
*/ p5.prototype._onkeydown = function (e) { - if (downKeys[e.which]) { // prevent multiple firings - return; - } this._setProperty('isKeyPressed', true); this._setProperty('keyIsPressed', true); this._setProperty('keyCode', e.which); @@ -18202,7 +18929,6 @@ p5.prototype._onkeyup = function (e) { var keyReleased = this.keyReleased || window.keyReleased; this._setProperty('isKeyPressed', false); this._setProperty('keyIsPressed', false); - this._setProperty('_lastKeyCodeTyped', null); downKeys[e.which] = false; //delete this._downKeys[e.which]; var key = String.fromCharCode(e.which); @@ -18253,11 +18979,7 @@ p5.prototype._onkeyup = function (e) { *
*/ p5.prototype._onkeypress = function (e) { - if (e.which === this._lastKeyCodeTyped) { // prevent multiple firings - return; - } this._setProperty('keyCode', e.which); - this._setProperty('_lastKeyCodeTyped', e.which); // track last keyCode this._setProperty('key', String.fromCharCode(e.which)); var keyTyped = this.keyTyped || window.keyTyped; if (typeof keyTyped === 'function') { @@ -18322,7 +19044,7 @@ p5.prototype.keyIsDown = function(code) { module.exports = p5; -},{"../core/core":48}],63:[function(_dereq_,module,exports){ +},{"../core/core":50}],65:[function(_dereq_,module,exports){ /** * @module Events * @submodule Mouse @@ -18588,24 +19310,24 @@ p5.prototype.pwinMouseY = 0; * @property mouseButton * * @example - *
- * - * function draw() { - * background(237, 34, 93); - * fill(0); - * - * if (mouseIsPressed) { - * if (mouseButton == LEFT) - * ellipse(50, 50, 50, 50); - * if (mouseButton == RIGHT) - * rect(25, 25, 50, 50); - * if (mouseButton == CENTER) - * triangle(23, 75, 50, 20, 78, 75); - * } - * - * print(mouseButton); - * } - * + *
+ * + * function draw() { + * background(237, 34, 93); + * fill(0); + * + * if (mouseIsPressed) { + * if (mouseButton == LEFT) + * ellipse(50, 50, 50, 50); + * if (mouseButton == RIGHT) + * rect(25, 25, 50, 50); + * if (mouseButton == CENTER) + * triangle(23, 75, 50, 20, 78, 75); + * } + * + * print(mouseButton); + * } + * *
*/ p5.prototype.mouseButton = 0; @@ -18617,21 +19339,21 @@ p5.prototype.mouseButton = 0; * @property mouseIsPressed * * @example - *
- * - * function draw() { - * background(237, 34, 93); - * fill(0); - * - * if (mouseIsPressed) - * ellipse(50, 50, 50, 50); - * else - * rect(25, 25, 50, 50); - * - * print(mouseIsPressed); - * } - * - *
+ *
+ * + * function draw() { + * background(237, 34, 93); + * fill(0); + * + * if (mouseIsPressed) + * ellipse(50, 50, 50, 50); + * else + * rect(25, 25, 50, 50); + * + * print(mouseIsPressed); + * } + * + *
*/ p5.prototype.mouseIsPressed = false; p5.prototype.isMousePressed = false; // both are supported @@ -19012,7 +19734,7 @@ p5.prototype._onwheel = function(e) { module.exports = p5; -},{"../core/constants":47,"../core/core":48}],64:[function(_dereq_,module,exports){ +},{"../core/constants":49,"../core/core":50}],66:[function(_dereq_,module,exports){ /** * @module Events * @submodule Touch @@ -19310,7 +20032,7 @@ p5.prototype._ontouchend = function(e) { module.exports = p5; -},{"../core/core":48}],65:[function(_dereq_,module,exports){ +},{"../core/core":50}],67:[function(_dereq_,module,exports){ /*global ImageData:false */ /** @@ -19913,7 +20635,7 @@ Filters.blur = function(canvas, radius){ module.exports = Filters; -},{}],66:[function(_dereq_,module,exports){ +},{}],68:[function(_dereq_,module,exports){ /** * @module Image * @submodule Image @@ -20136,17 +20858,12 @@ p5.prototype.saveCanvas = function() { * all of the images that have just been created. * * @method saveFrames - * @param {String} filename - * @param {String} extension 'jpg' or 'png' - * @param {Number} duration Duration in seconds to save the frames for. - * @param {Number} framerate Framerate to save the frames in. - * @param {Function} [callback] A callback function that will be executed - to handle the image data. This function - should accept an array as argument. The - array will contain the spcecified number of - frames of objects. Each object have three - properties: imageData - an - image/octet-stream, filename and extension. + * @param {[type]} filename [description] + * @param {[type]} extension [description] + * @param {[type]} _duration [description] + * @param {[type]} _fps [description] + * @param {[Function]} callback [description] + * @return {[type]} [description] */ p5.prototype.saveFrames = function(fName, ext, _duration, _fps, callback) { var duration = _duration || 3; @@ -20219,7 +20936,7 @@ p5.prototype._makeFrame = function(filename, extension, _cnv) { module.exports = p5; -},{"../core/core":48}],67:[function(_dereq_,module,exports){ +},{"../core/core":50}],69:[function(_dereq_,module,exports){ /** * @module Image * @submodule Loading & Displaying @@ -20418,8 +21135,8 @@ p5.prototype.image = if (img.elt && img.elt.videoWidth && !img.canvas) { // video no canvas var actualW = img.elt.videoWidth; var actualH = img.elt.videoHeight; - dWidth = sWidth || img.elt.width; - dHeight = sHeight || img.elt.width*actualH/actualW; + dWidth = sWidth || img.width; + dHeight = sHeight || img.width*actualH/actualW; sWidth = actualW; sHeight = actualH; } else { @@ -20650,7 +21367,7 @@ p5.prototype.imageMode = function(m) { module.exports = p5; -},{"../core/canvas":46,"../core/constants":47,"../core/core":48,"../core/error_helpers":51,"./filters":65}],68:[function(_dereq_,module,exports){ +},{"../core/canvas":48,"../core/constants":49,"../core/core":50,"../core/error_helpers":53,"./filters":67}],70:[function(_dereq_,module,exports){ /** * @module Image * @submodule Image @@ -20823,28 +21540,6 @@ p5.Image.prototype._setProperty = function (prop, value) { * Loads the pixels data for this image into the [pixels] attribute. * * @method loadPixels - * @example - *
- * var myImage; - * var halfImage; - * - * function preload() { - * myImage = loadImage("assets/rockies.jpg"); - * } - * - * function setup() { - * myImage.loadPixels(); - * halfImage = 4 * width * height/2; - * for(var i = 0; i < halfImage; i++){ - * myImage.pixels[i+halfImage] = myImage.pixels[i]; - * } - * myImage.updatePixels(); - * } - * - * function draw() { - * image(myImage, 0, 0); - * } - *
*/ p5.Image.prototype.loadPixels = function(){ p5.Renderer2D.prototype.loadPixels.call(this); @@ -20863,28 +21558,6 @@ p5.Image.prototype.loadPixels = function(){ * underlying canvas * @param {Integer|undefined} h height of the target update area for the * underlying canvas - * @example - *
- * var myImage; - * var halfImage; - * - * function preload() { - * myImage = loadImage("assets/rockies.jpg"); - * } - * - * function setup() { - * myImage.loadPixels(); - * halfImage = 4 * width * height/2; - * for(var i = 0; i < halfImage; i++){ - * myImage.pixels[i+halfImage] = myImage.pixels[i]; - * } - * myImage.updatePixels(); - * } - * - * function draw() { - * image(myImage, 0, 0); - * } - *
*/ p5.Image.prototype.updatePixels = function(x, y, w, h){ p5.Renderer2D.prototype.updatePixels.call(this, x, y, w, h); @@ -20907,25 +21580,6 @@ p5.Image.prototype.updatePixels = function(x, y, w, h){ * @param {Number} [h] height * @return {Array/Color | p5.Image} color of pixel at x,y in array format * [R, G, B, A] or p5.Image - * @example - *
- * var myImage; - * var c; - * - * function preload() { - * myImage = loadImage("assets/rockies.jpg"); - * } - * - * function setup() { - * background(myImage); - * noStroke(); - * c = myImage.get(60, 90); - * fill(c); - * rect(25, 25, 50, 50); - * } - * - * //get() returns color here - *
*/ p5.Image.prototype.get = function(x, y, w, h){ return p5.Renderer2D.prototype.get.call(this, x, y, w, h); @@ -21054,25 +21708,6 @@ p5.Image.prototype.resize = function(width, height){ * @param {Integer} dy Y coordinate of the destination's upper left corner * @param {Integer} dw destination image width * @param {Integer} dh destination image height - * @example - *
- * var photo; - * var bricks; - * var x; - * var y; - * - * function preload() { - * photo = loadImage("assets/rockies.jpg"); - * bricks = loadImage("assets/bricks.jpg"); - * } - * - * function setup() { - * x = bricks.width/2; - * y = bricks.height/2; - * photo.copy(bricks, 0, 0, x, y, 0, 0, x, y); - * image(photo, 0, 0); - * } - *
*/ p5.Image.prototype.copy = function () { p5.prototype.copy.apply(this, arguments); @@ -21144,22 +21779,6 @@ p5.Image.prototype.mask = function(p5Image) { * opaque see Filters.js for docs on each available * filter * @param {Number|undefined} value - * @example - *
- * var photo1; - * var photo2; - * - * function preload() { - * photo1 = loadImage("assets/rockies.jpg"); - * photo2 = loadImage("assets/rockies.jpg"); - * } - * - * function setup() { - * photo2.filter("gray"); - * image(photo1, 0, 0); - * image(photo2, width/2, 0); - * } - *
*/ p5.Image.prototype.filter = function(operation, value) { Filters.apply(this.canvas, Filters[operation.toLowerCase()], value); @@ -21202,24 +21821,6 @@ p5.Image.prototype.blend = function() { * @method save * @param {String} filename give your file a name * @param {String} extension 'png' or 'jpg' - * @example - *
- * var photo; - * - * function preload() { - * photo = loadImage("assets/rockies.jpg"); - * } - * - * function draw() { - * image(photo, 0, 0); - * } - * - * function keyTyped() { - * if (key == 's') { - * photo.save("photo", "png"); - * } - * } - *
*/ p5.Image.prototype.save = function(filename, extension) { var mimeType; @@ -21265,7 +21866,7 @@ p5.Image.prototype.createTexture = function(tex){ module.exports = p5.Image; -},{"../core/core":48,"./filters":65}],69:[function(_dereq_,module,exports){ +},{"../core/core":50,"./filters":67}],71:[function(_dereq_,module,exports){ /** * @module Image * @submodule Pixels @@ -21331,7 +21932,7 @@ _dereq_('../color/p5.Color'); * * var pink = color(255, 102, 204); * loadPixels(); - * var d = pixelDensity(); + * var d = pixelDensity; * var halfImage = 4 * (width * d) * (height/2 * d); * for (var i = 0; i < halfImage; i+=4) { * pixels[i] = red(pink); @@ -21696,7 +22297,7 @@ p5.prototype.get = function(x, y, w, h){ * * function setup() { * image(img, 0, 0); - * var d = pixelDensity(); + * var d = pixelDensity; * var halfImage = 4 * (img.width * d) * (img.height/2 * d); * loadPixels(); @@ -21783,7 +22384,7 @@ p5.prototype.set = function (x, y, imgOrCol) { /** * Updates the display window with the data in the pixels[] array. * Use in conjunction with loadPixels(). If you're only reading pixels from - * the array, there's no need to call updatePixels() — updating is only + * the array, there's no need to call updatePixels() — updating is only * necessary to apply changes. updatePixels() should be called anytime the * pixels array is manipulated or set() is called. * @@ -21804,8 +22405,8 @@ p5.prototype.set = function (x, y, imgOrCol) { * * function setup() { * image(img, 0, 0); - * var halfImage = 4 * (img.width * pixelDensity()) * - * (img.height * pixelDensity()/2); + * var halfImage = 4 * (img.width * pixelDensity) * + * (img.height * pixelDensity/2); * loadPixels(); * for (var i = 0; i < halfImage; i++) { * pixels[i+halfImage] = pixels[i]; @@ -21826,7 +22427,7 @@ p5.prototype.updatePixels = function (x, y, w, h) { module.exports = p5; -},{"../color/p5.Color":42,"../core/core":48,"./filters":65}],70:[function(_dereq_,module,exports){ +},{"../color/p5.Color":44,"../core/core":50,"./filters":67}],72:[function(_dereq_,module,exports){ /** * @module IO * @submodule Input @@ -22430,8 +23031,8 @@ p5.prototype.loadTable = function (path) { if (header) { t.columns = records.shift(); } else { - for (i = 0; i < records[0].length; i++) { - t.columns[i] = 'null'; + for (i = 0; i < records.length; i++) { + t.columns[i] = i.toString(); } } var row; @@ -23041,7 +23642,7 @@ function escapeHelper(content) { * @method saveTable * @param {p5.Table} Table the Table object to save to a file * @param {String} filename the filename to which the Table should be saved - * @param {String} [options] can be one of "tsv", "csv", or "html" + * @param {[String]} options can be one of "tsv", "csv", or "html" * @example *
* var table; @@ -23262,7 +23863,7 @@ function destroyClickedElement(event) { module.exports = p5; -},{"../core/core":48,"../core/error_helpers":51,"opentype.js":8,"reqwest":27}],71:[function(_dereq_,module,exports){ +},{"../core/core":50,"../core/error_helpers":53,"opentype.js":8,"reqwest":29}],73:[function(_dereq_,module,exports){ /** * @module IO * @submodule Table @@ -23335,38 +23936,38 @@ p5.Table = function (rows) { * @param {p5.TableRow} [row] row to be added to the table * * @example - *
- * - * // Given the CSV file "mammals.csv" - * // in the project's "assets" folder: - * // - * // id,species,name - * // 0,Capra hircus,Goat - * // 1,Panthera pardus,Leopard - * // 2,Equus zebra,Zebra - * - * var table; - * - * function preload() { - * //my table is comma separated value "csv" - * //and has a header specifying the columns labels - * table = loadTable("assets/mammals.csv", "csv", "header"); - * } - * - * function setup() { - * //add a row - * var newRow = table.addRow(); - * newRow.setString("id", table.getRowCount() - 1); - * newRow.setString("species", "Canis Lupus"); - * newRow.setString("name", "Wolf"); - * - * //print the results - * for (var r = 0; r < table.getRowCount(); r++) - * for (var c = 0; c < table.getColumnCount(); c++) - * print(table.getString(r, c)); - * } - * - *
+ *
+ * + * // Given the CSV file "mammals.csv" + * // in the project's "assets" folder: + * // + * // id,species,name + * // 0,Capra hircus,Goat + * // 1,Panthera pardus,Leopard + * // 2,Equus zebra,Zebra + * + * var table; + * + * function preload() { + * //my table is comma separated value "csv" + * //and has a header specifying the columns labels + * table = loadTable("assets/mammals.csv", "csv", "header"); + * } + * + * function setup() { + * //add a row + * var newRow = table.addRow(); + * newRow.setString("id", table.getRowCount() - 1); + * newRow.setString("species", "Canis Lupus"); + * newRow.setString("name", "Wolf"); + * + * //print the results + * for (var r = 0; r < table.getRowCount(); r++) + * for (var c = 0; c < table.getColumnCount(); c++) + * print(table.getString(r, c)); + * } + * + *
*/ p5.Table.prototype.addRow = function(row) { // make sure it is a valid TableRow @@ -23388,35 +23989,35 @@ p5.Table.prototype.addRow = function(row) { * @param {Number} id ID number of the row to remove * * @example - *
- * - * // Given the CSV file "mammals.csv" - * // in the project's "assets" folder: - * // - * // id,species,name - * // 0,Capra hircus,Goat - * // 1,Panthera pardus,Leopard - * // 2,Equus zebra,Zebra - * - * var table; - * - * function preload() { - * //my table is comma separated value "csv" - * //and has a header specifying the columns labels - * table = loadTable("assets/mammals.csv", "csv", "header"); - * } - * - * function setup() { - * //remove the first row - * var r = table.removeRow(0); - * - * //print the results - * for (var r = 0; r < table.getRowCount(); r++) - * for (var c = 0; c < table.getColumnCount(); c++) - * print(table.getString(r, c)); - * } - * - *
+ *
+ * + * // Given the CSV file "mammals.csv" + * // in the project's "assets" folder: + * // + * // id,species,name + * // 0,Capra hircus,Goat + * // 1,Panthera pardus,Leopard + * // 2,Equus zebra,Zebra + * + * var table; + * + * function preload() { + * //my table is comma separated value "csv" + * //and has a header specifying the columns labels + * table = loadTable("assets/mammals.csv", "csv", "header"); + * } + * + * function setup() { + * //remove the first row + * var r = table.removeRow(0); + * + * //print the results + * for (var r = 0; r < table.getRowCount(); r++) + * for (var c = 0; c < table.getColumnCount(); c++) + * print(table.getString(r, c)); + * } + * + *
*/ p5.Table.prototype.removeRow = function(id) { this.rows[id].table = null; // remove reference to table @@ -23435,33 +24036,33 @@ p5.Table.prototype.removeRow = function(id) { * @return {TableRow} p5.TableRow object * * @example - *
- * - * // Given the CSV file "mammals.csv" - * // in the project's "assets" folder: - * // - * // id,species,name - * // 0,Capra hircus,Goat - * // 1,Panthera pardus,Leopard - * // 2,Equus zebra,Zebra - * - * var table; - * - * function preload() { - * //my table is comma separated value "csv" - * //and has a header specifying the columns labels - * table = loadTable("assets/mammals.csv", "csv", "header"); - * } - * - * function setup() { - * var row = table.getRow(1); - * //print it column by column - * //note: a row is an object, not an array - * for (var c = 0; c < table.getColumnCount(); c++) - * print(row.getString(c)); - * } - * - *
+ *
+ * + * // Given the CSV file "mammals.csv" + * // in the project's "assets" folder: + * // + * // id,species,name + * // 0,Capra hircus,Goat + * // 1,Panthera pardus,Leopard + * // 2,Equus zebra,Zebra + * + * var table; + * + * function preload() { + * //my table is comma separated value "csv" + * //and has a header specifying the columns labels + * table = loadTable("assets/mammals.csv", "csv", "header"); + * } + * + * function setup() { + * var row = table.getRow(1); + * //print it column by column + * //note: a row is an object, not an array + * for (var c = 0; c < table.getColumnCount(); c++) + * print(row.getString(c)); + * } + * + *
*/ p5.Table.prototype.getRow = function(r) { return this.rows[r]; @@ -23474,38 +24075,38 @@ p5.Table.prototype.getRow = function(r) { * @return {Array} Array of p5.TableRows * * @example - *
- * - * // Given the CSV file "mammals.csv" - * // in the project's "assets" folder: - * // - * // id,species,name - * // 0,Capra hircus,Goat - * // 1,Panthera pardus,Leopard - * // 2,Equus zebra,Zebra - * - * var table; - * - * function preload() { - * //my table is comma separated value "csv" - * //and has a header specifying the columns labels - * table = loadTable("assets/mammals.csv", "csv", "header"); - * } - * - * function setup() { - * var rows = table.getRows(); - * - * //warning: rows is an array of objects - * for (var r = 0; r < rows.length; r++) - * rows[r].set("name", "Unicorn"); - * - * //print the results - * for (var r = 0; r < table.getRowCount(); r++) - * for (var c = 0; c < table.getColumnCount(); c++) - * print(table.getString(r, c)); - * } - * - *
+ *
+ * + * // Given the CSV file "mammals.csv" + * // in the project's "assets" folder: + * // + * // id,species,name + * // 0,Capra hircus,Goat + * // 1,Panthera pardus,Leopard + * // 2,Equus zebra,Zebra + * + * var table; + * + * function preload() { + * //my table is comma separated value "csv" + * //and has a header specifying the columns labels + * table = loadTable("assets/mammals.csv", "csv", "header"); + * } + * + * function setup() { + * var rows = table.getRows(); + * + * //warning: rows is an array of objects + * for (var r = 0; r < rows.length; r++) + * rows[r].set("name", "Unicorn"); + * + * //print the results + * for (var r = 0; r < table.getRowCount(); r++) + * for (var c = 0; c < table.getColumnCount(); c++) + * print(table.getString(r, c)); + * } + * + *
*/ p5.Table.prototype.getRows = function() { return this.rows; @@ -23525,32 +24126,32 @@ p5.Table.prototype.getRows = function() { * @return {TableRow} * * @example - *
- * - * // Given the CSV file "mammals.csv" - * // in the project's "assets" folder: - * // - * // id,species,name - * // 0,Capra hircus,Goat - * // 1,Panthera pardus,Leopard - * // 2,Equus zebra,Zebra - * - * var table; - * - * function preload() { - * //my table is comma separated value "csv" - * //and has a header specifying the columns labels - * table = loadTable("assets/mammals.csv", "csv", "header"); - * } - * - * function setup() { - * //find the animal named zebra - * var row = table.findRow("Zebra", "name"); - * //find the corresponding species - * print(row.getString("species")); - * } - * - *
+ *
+ * + * // Given the CSV file "mammals.csv" + * // in the project's "assets" folder: + * // + * // id,species,name + * // 0,Capra hircus,Goat + * // 1,Panthera pardus,Leopard + * // 2,Equus zebra,Zebra + * + * var table; + * + * function preload() { + * //my table is comma separated value "csv" + * //and has a header specifying the columns labels + * table = loadTable("assets/mammals.csv", "csv", "header"); + * } + * + * function setup() { + * //find the animal named zebra + * var row = table.findRow("Zebra", "name"); + * //find the corresponding species + * print(row.getString("species")); + * } + * + *
*/ p5.Table.prototype.findRow = function(value, column) { // try the Object @@ -23587,37 +24188,37 @@ p5.Table.prototype.findRow = function(value, column) { * @return {Array} An Array of TableRow objects * * @example - *
- * - * // Given the CSV file "mammals.csv" - * // in the project's "assets" folder: - * // - * // id,species,name - * // 0,Capra hircus,Goat - * // 1,Panthera pardus,Leopard - * // 2,Equus zebra,Zebra - * - * var table; - * - * function preload() { - * //my table is comma separated value "csv" - * //and has a header specifying the columns labels - * table = loadTable("assets/mammals.csv", "csv", "header"); - * } - * - * function setup() { - * //add another goat - * var newRow = table.addRow(); - * newRow.setString("id", table.getRowCount() - 1); - * newRow.setString("species", "Scape Goat"); - * newRow.setString("name", "Goat"); - * - * //find the rows containing animals named Goat - * var rows = table.findRows("Goat", "name"); - * print(rows.length + " Goats found"); - * } - * - *
+ *
+ * + * // Given the CSV file "mammals.csv" + * // in the project's "assets" folder: + * // + * // id,species,name + * // 0,Capra hircus,Goat + * // 1,Panthera pardus,Leopard + * // 2,Equus zebra,Zebra + * + * var table; + * + * function preload() { + * //my table is comma separated value "csv" + * //and has a header specifying the columns labels + * table = loadTable("assets/mammals.csv", "csv", "header"); + * } + * + * function setup() { + * //add another goat + * var newRow = table.addRow(); + * newRow.setString("id", table.getRowCount() - 1); + * newRow.setString("species", "Scape Goat"); + * newRow.setString("name", "Goat"); + * + * //find the rows containing animals named Goat + * var rows = table.findRows("Goat", "name"); + * print(rows.length + " Goats found"); + * } + * + *
*/ p5.Table.prototype.findRows = function(value, column) { var ret = []; @@ -23714,31 +24315,31 @@ p5.Table.prototype.matchRows = function(regexp, column) { * @return {Array} Array of column values * * @example - *
- * - * // Given the CSV file "mammals.csv" - * // in the project's "assets" folder: - * // - * // id,species,name - * // 0,Capra hircus,Goat - * // 1,Panthera pardus,Leopard - * // 2,Equus zebra,Zebra - * - * var table; - * - * function preload() { - * //my table is comma separated value "csv" - * //and has a header specifying the columns labels - * table = loadTable("assets/mammals.csv", "csv", "header"); - * } - * - * function setup() { - * //getColumn returns an array that can be printed directly - * print(table.getColumn("species")); - * //outputs ["Capra hircus", "Panthera pardus", "Equus zebra"] - * } - * - *
+ *
+ * + * // Given the CSV file "mammals.csv" + * // in the project's "assets" folder: + * // + * // id,species,name + * // 0,Capra hircus,Goat + * // 1,Panthera pardus,Leopard + * // 2,Equus zebra,Zebra + * + * var table; + * + * function preload() { + * //my table is comma separated value "csv" + * //and has a header specifying the columns labels + * table = loadTable("assets/mammals.csv", "csv", "header"); + * } + * + * function setup() { + * //getColumn returns an array that can be printed directly + * print(table.getColumn("species")); + * //outputs ["Capra hircus", "Panthera pardus", "Equus zebra"] + * } + * + *
*/ p5.Table.prototype.getColumn = function(value) { var ret = []; @@ -23761,31 +24362,31 @@ p5.Table.prototype.getColumn = function(value) { * @method clearRows * * @example - *
- * - * // Given the CSV file "mammals.csv" - * // in the project's "assets" folder: - * // - * // id,species,name - * // 0,Capra hircus,Goat - * // 1,Panthera pardus,Leopard - * // 2,Equus zebra,Zebra - * - * var table; - * - * function preload() { - * //my table is comma separated value "csv" - * //and has a header specifying the columns labels - * table = loadTable("assets/mammals.csv", "csv", "header"); - * } - * - * function setup() { - * table.clearRows(); - * print(table.getRowCount() + " total rows in table"); - * print(table.getColumnCount() + " total columns in table"); - * } - * - *
+ *
+ * + * // Given the CSV file "mammals.csv" + * // in the project's "assets" folder: + * // + * // id,species,name + * // 0,Capra hircus,Goat + * // 1,Panthera pardus,Leopard + * // 2,Equus zebra,Zebra + * + * var table; + * + * function preload() { + * //my table is comma separated value "csv" + * //and has a header specifying the columns labels + * table = loadTable("assets/mammals.csv", "csv", "header"); + * } + * + * function setup() { + * table.clearRows(); + * print(table.getRowCount() + " total rows in table"); + * print(table.getColumnCount() + " total columns in table"); + * } + * + *
*/ p5.Table.prototype.clearRows = function() { delete this.rows; @@ -23802,37 +24403,37 @@ p5.Table.prototype.clearRows = function() { * @param {String} [title] title of the given column * * @example - *
- * - * // Given the CSV file "mammals.csv" - * // in the project's "assets" folder: - * // - * // id,species,name - * // 0,Capra hircus,Goat - * // 1,Panthera pardus,Leopard - * // 2,Equus zebra,Zebra - * - * var table; - * - * function preload() { - * //my table is comma separated value "csv" - * //and has a header specifying the columns labels - * table = loadTable("assets/mammals.csv", "csv", "header"); - * } - * - * function setup() { - * table.addColumn("carnivore"); - * table.set(0, "carnivore", "no"); - * table.set(1, "carnivore", "yes"); - * table.set(2, "carnivore", "no"); - * - * //print the results - * for (var r = 0; r < table.getRowCount(); r++) - * for (var c = 0; c < table.getColumnCount(); c++) - * print(table.getString(r, c)); - * } - * - *
+ *
+ * + * // Given the CSV file "mammals.csv" + * // in the project's "assets" folder: + * // + * // id,species,name + * // 0,Capra hircus,Goat + * // 1,Panthera pardus,Leopard + * // 2,Equus zebra,Zebra + * + * var table; + * + * function preload() { + * //my table is comma separated value "csv" + * //and has a header specifying the columns labels + * table = loadTable("assets/mammals.csv", "csv", "header"); + * } + * + * function setup() { + * table.addColumn("carnivore"); + * table.set(0, "carnivore", "no"); + * table.set(1, "carnivore", "yes"); + * table.set(2, "carnivore", "no"); + * + * //print the results + * for (var r = 0; r < table.getRowCount(); r++) + * for (var c = 0; c < table.getColumnCount(); c++) + * print(table.getString(r, c)); + * } + * + *
*/ p5.Table.prototype.addColumn = function(title) { var t = title || null; @@ -23963,30 +24564,30 @@ p5.Table.prototype.trim = function(column) { * @param {String|Number} column columnName (string) or ID (number) * * @example - *
- * - * // Given the CSV file "mammals.csv" - * // in the project's "assets" folder: - * // - * // id,species,name - * // 0,Capra hircus,Goat - * // 1,Panthera pardus,Leopard - * // 2,Equus zebra,Zebra - * - * var table; - * - * function preload() { - * //my table is comma separated value "csv" - * //and has a header specifying the columns labels - * table = loadTable("assets/mammals.csv", "csv", "header"); - * } - * - * function setup() { - * table.removeColumn("id"); - * print(table.getColumnCount()); - * } - * - *
+ *
+ * + * // Given the CSV file "mammals.csv" + * // in the project's "assets" folder: + * // + * // id,species,name + * // 0,Capra hircus,Goat + * // 1,Panthera pardus,Leopard + * // 2,Equus zebra,Zebra + * + * var table; + * + * function preload() { + * //my table is comma separated value "csv" + * //and has a header specifying the columns labels + * table = loadTable("assets/mammals.csv", "csv", "header"); + * } + * + * function setup() { + * table.removeColumn("id"); + * print(table.getColumnCount()); + * } + * + *
*/ p5.Table.prototype.removeColumn = function(c) { var cString; @@ -24028,35 +24629,35 @@ p5.Table.prototype.removeColumn = function(c) { * @param {String|Number} value value to assign * * @example - *
- * - * // Given the CSV file "mammals.csv" - * // in the project's "assets" folder: - * // - * // id,species,name - * // 0,Capra hircus,Goat - * // 1,Panthera pardus,Leopard - * // 2,Equus zebra,Zebra - * - * var table; - * - * function preload() { - * //my table is comma separated value "csv" - * //and has a header specifying the columns labels - * table = loadTable("assets/mammals.csv", "csv", "header"); - * } - * - * function setup() { - * table.set(0, "species", "Canis Lupus"); - * table.set(0, "name", "Wolf"); - * - * //print the results - * for (var r = 0; r < table.getRowCount(); r++) - * for (var c = 0; c < table.getColumnCount(); c++) - * print(table.getString(r, c)); - * } - * - *
+ *
+ * + * // Given the CSV file "mammals.csv" + * // in the project's "assets" folder: + * // + * // id,species,name + * // 0,Capra hircus,Goat + * // 1,Panthera pardus,Leopard + * // 2,Equus zebra,Zebra + * + * var table; + * + * function preload() { + * //my table is comma separated value "csv" + * //and has a header specifying the columns labels + * table = loadTable("assets/mammals.csv", "csv", "header"); + * } + * + * function setup() { + * table.set(0, "species", "Canis Lupus"); + * table.set(0, "name", "Wolf"); + * + * //print the results + * for (var r = 0; r < table.getRowCount(); r++) + * for (var c = 0; c < table.getColumnCount(); c++) + * print(table.getString(r, c)); + * } + * + *
*/ p5.Table.prototype.set = function(row, column, value) { this.rows[row].set(column, value); @@ -24074,32 +24675,32 @@ p5.Table.prototype.set = function(row, column, value) { * @param {Number} value value to assign * * @example - *
- * - * // Given the CSV file "mammals.csv" - * // in the project's "assets" folder: - * // - * // id,species,name - * // 0,Capra hircus,Goat - * // 1,Panthera pardus,Leopard - * // 2,Equus zebra,Zebra - * - * var table; - * - * function preload() { - * //my table is comma separated value "csv" - * //and has a header specifying the columns labels - * table = loadTable("assets/mammals.csv", "csv", "header"); - * } - * - * function setup() { - * table.setNum(1, "id", 1); - * - * print(table.getColumn(0)); - * //["0", 1, "2"] - * } - * - *
+ *
+ * + * // Given the CSV file "mammals.csv" + * // in the project's "assets" folder: + * // + * // id,species,name + * // 0,Capra hircus,Goat + * // 1,Panthera pardus,Leopard + * // 2,Equus zebra,Zebra + * + * var table; + * + * function preload() { + * //my table is comma separated value "csv" + * //and has a header specifying the columns labels + * table = loadTable("assets/mammals.csv", "csv", "header"); + * } + * + * function setup() { + * table.setNum(1, "id", 1); + * + * print(table.getColumn(0)); + * //["0", 1, "2"] + * } + * + *
*/ p5.Table.prototype.setNum = function(row, column, value){ this.rows[row].setNum(column, value); @@ -24133,32 +24734,32 @@ p5.Table.prototype.setString = function(row, column, value){ * @return {String|Number} * * @example - *
- * - * // Given the CSV file "mammals.csv" - * // in the project's "assets" folder: - * // - * // id,species,name - * // 0,Capra hircus,Goat - * // 1,Panthera pardus,Leopard - * // 2,Equus zebra,Zebra - * - * var table; - * - * function preload() { - * //my table is comma separated value "csv" - * //and has a header specifying the columns labels - * table = loadTable("assets/mammals.csv", "csv", "header"); - * } - * - * function setup() { - * print(table.get(0, 1)); - * //Capra hircus - * print(table.get(0, "species")); - * //Capra hircus - * } - * - *
+ *
+ * + * // Given the CSV file "mammals.csv" + * // in the project's "assets" folder: + * // + * // id,species,name + * // 0,Capra hircus,Goat + * // 1,Panthera pardus,Leopard + * // 2,Equus zebra,Zebra + * + * var table; + * + * function preload() { + * //my table is comma separated value "csv" + * //and has a header specifying the columns labels + * table = loadTable("assets/mammals.csv", "csv", "header"); + * } + * + * function setup() { + * print(table.get(0, 1)); + * //Capra hircus + * print(table.get(0, "species")); + * //Capra hircus + * } + * + *
*/ p5.Table.prototype.get = function(row, column) { return this.rows[row].get(column); @@ -24176,30 +24777,30 @@ p5.Table.prototype.get = function(row, column) { * @return {Number} * * @example - *
- * - * // Given the CSV file "mammals.csv" - * // in the project's "assets" folder: - * // - * // id,species,name - * // 0,Capra hircus,Goat - * // 1,Panthera pardus,Leopard - * // 2,Equus zebra,Zebra - * - * var table; - * - * function preload() { - * //my table is comma separated value "csv" - * //and has a header specifying the columns labels - * table = loadTable("assets/mammals.csv", "csv", "header"); - * } - * - * function setup() { - * print(table.getNum(1, 0) + 100); - * //id 1 + 100 = 101 - * } - * - *
+ *
+ * + * // Given the CSV file "mammals.csv" + * // in the project's "assets" folder: + * // + * // id,species,name + * // 0,Capra hircus,Goat + * // 1,Panthera pardus,Leopard + * // 2,Equus zebra,Zebra + * + * var table; + * + * function preload() { + * //my table is comma separated value "csv" + * //and has a header specifying the columns labels + * table = loadTable("assets/mammals.csv", "csv", "header"); + * } + * + * function setup() { + * print(table.getNum(1, 0) + 100); + * //id 1 + 100 = 101 + * } + * + *
*/ p5.Table.prototype.getNum = function(row, column) { return this.rows[row].getNum(column); @@ -24217,33 +24818,33 @@ p5.Table.prototype.getNum = function(row, column) { * @return {String} * * @example - *
- * - * // Given the CSV file "mammals.csv" - * // in the project's "assets" folder: - * // - * // id,species,name - * // 0,Capra hircus,Goat - * // 1,Panthera pardus,Leopard - * // 2,Equus zebra,Zebra - * - * var table; - * - * function preload() { - * //my table is comma separated value "csv" - * //and has a header specifying the columns labels - * table = loadTable("assets/mammals.csv", "csv", "header"); - * } - * - * function setup() { - * var tableArray = table.getArray(); - * - * //output each row as array - * for (var i = 0; i < tableArray.length; i++) - * print(tableArray[i]); - * } - * - *
+ *
+ * + * // Given the CSV file "mammals.csv" + * // in the project's "assets" folder: + * // + * // id,species,name + * // 0,Capra hircus,Goat + * // 1,Panthera pardus,Leopard + * // 2,Equus zebra,Zebra + * + * var table; + * + * function preload() { + * //my table is comma separated value "csv" + * //and has a header specifying the columns labels + * table = loadTable("assets/mammals.csv", "csv", "header"); + * } + * + * function setup() { + * var tableArray = table.getArray(); + * + * //output each row as array + * for (var i = 0; i < tableArray.length; i++) + * print(tableArray[i]); + * } + * + *
*/ p5.Table.prototype.getString = function(row, column) { return this.rows[row].getString(column); @@ -24260,32 +24861,32 @@ p5.Table.prototype.getString = function(row, column) { * @return {Object} * * @example - *
- * - * // Given the CSV file "mammals.csv" - * // in the project's "assets" folder: - * // - * // id,species,name - * // 0,Capra hircus,Goat - * // 1,Panthera pardus,Leopard - * // 2,Equus zebra,Zebra - * - * var table; - * - * function preload() { - * //my table is comma separated value "csv" - * //and has a header specifying the columns labels - * table = loadTable("assets/mammals.csv", "csv", "header"); - * } - * - * function setup() { - * var tableObject = table.getObject(); - * - * print(tableObject); - * //outputs an object - * } - * - *
+ *
+ * + * // Given the CSV file "mammals.csv" + * // in the project's "assets" folder: + * // + * // id,species,name + * // 0,Capra hircus,Goat + * // 1,Panthera pardus,Leopard + * // 2,Equus zebra,Zebra + * + * var table; + * + * function preload() { + * //my table is comma separated value "csv" + * //and has a header specifying the columns labels + * table = loadTable("assets/mammals.csv", "csv", "header"); + * } + * + * function setup() { + * var tableObject = table.getObject(); + * + * print(tableObject); + * //outputs an object + * } + * + *
*/ p5.Table.prototype.getObject = function (headerColumn) { @@ -24326,7 +24927,7 @@ p5.Table.prototype.getArray = function () { module.exports = p5.Table; -},{"../core/core":48}],72:[function(_dereq_,module,exports){ +},{"../core/core":50}],74:[function(_dereq_,module,exports){ /** * @module IO * @submodule Table @@ -24496,7 +25097,7 @@ p5.TableRow.prototype.getString = function(column) { module.exports = p5.TableRow; -},{"../core/core":48}],73:[function(_dereq_,module,exports){ +},{"../core/core":50}],75:[function(_dereq_,module,exports){ /** * @module Math * @submodule Calculation @@ -25175,7 +25776,7 @@ p5.prototype.sqrt = Math.sqrt; module.exports = p5; -},{"../core/core":48}],74:[function(_dereq_,module,exports){ +},{"../core/core":50}],76:[function(_dereq_,module,exports){ /** * @module Math * @submodule Math @@ -25209,7 +25810,7 @@ p5.prototype.createVector = function (x, y, z) { module.exports = p5; -},{"../core/core":48}],75:[function(_dereq_,module,exports){ +},{"../core/core":50}],77:[function(_dereq_,module,exports){ ////////////////////////////////////////////////////////////// // http://mrl.nyu.edu/~perlin/noise/ @@ -25498,7 +26099,7 @@ p5.prototype.noiseSeed = function(seed) { module.exports = p5; -},{"../core/core":48}],76:[function(_dereq_,module,exports){ +},{"../core/core":50}],78:[function(_dereq_,module,exports){ /** * @module Math * @submodule Math @@ -26538,7 +27139,7 @@ p5.Vector.angleBetween = function (v1, v2) { module.exports = p5.Vector; -},{"../core/constants":47,"../core/core":48,"./polargeometry":77}],77:[function(_dereq_,module,exports){ +},{"../core/constants":49,"../core/core":50,"./polargeometry":79}],79:[function(_dereq_,module,exports){ module.exports = { @@ -26552,7 +27153,7 @@ module.exports = { }; -},{}],78:[function(_dereq_,module,exports){ +},{}],80:[function(_dereq_,module,exports){ /** * @module Math * @submodule Random @@ -26768,7 +27369,7 @@ p5.prototype.randomGaussian = function(mean, sd) { module.exports = p5; -},{"../core/core":48}],79:[function(_dereq_,module,exports){ +},{"../core/core":50}],81:[function(_dereq_,module,exports){ /** * @module Math * @submodule Trigonometry @@ -26796,7 +27397,7 @@ p5.prototype._angleMode = constants.RADIANS; * @return {Number} the arc cosine of the given value * * @example - *
+ *
* * var a = PI; * var c = cos(a); @@ -26806,7 +27407,7 @@ p5.prototype._angleMode = constants.RADIANS; * *
* - *
+ *
* * var a = PI + PI/4.0; * var c = cos(a); @@ -26834,7 +27435,7 @@ p5.prototype.acos = function(ratio) { * @return {Number} the arc sine of the given value * * @example - *
+ *
* * var a = PI + PI/3; * var s = sin(a); @@ -26844,7 +27445,7 @@ p5.prototype.acos = function(ratio) { * *
* - *
+ *
* * var a = PI + PI/3.0; * var s = sin(a); @@ -26873,7 +27474,7 @@ p5.prototype.asin = function(ratio) { * @return {Number} the arc tangent of the given value * * @example - *
+ *
* * var a = PI + PI/3; * var t = tan(a); @@ -26883,7 +27484,7 @@ p5.prototype.asin = function(ratio) { * *
* - *
+ *
* * var a = PI + PI/3.0; * var t = tan(a); @@ -27028,7 +27629,7 @@ p5.prototype.tan = function(angle) { * Converts a radian measurement to its corresponding value in degrees. * Radians and degrees are two ways of measuring the same thing. There are * 360 degrees in a circle and 2*PI radians in a circle. For example, - * 90° = PI/2 = 1.5707964. + * 90° = PI/2 = 1.5707964. * * @method degrees * @param {Number} radians the radians value to convert to degrees @@ -27036,7 +27637,7 @@ p5.prototype.tan = function(angle) { * * * @example - *
+ *
* * var rad = PI/4; * var deg = degrees(rad); @@ -27054,14 +27655,14 @@ p5.prototype.degrees = function(angle) { * Converts a degree measurement to its corresponding value in radians. * Radians and degrees are two ways of measuring the same thing. There are * 360 degrees in a circle and 2*PI radians in a circle. For example, - * 90° = PI/2 = 1.5707964. + * 90° = PI/2 = 1.5707964. * * @method radians * @param {Number} degrees the degree value to convert to radians * @return {Number} the converted angle * * @example - *
+ *
* * var deg = 45.0; * var rad = radians(deg); @@ -27108,7 +27709,7 @@ p5.prototype.angleMode = function(mode) { module.exports = p5; -},{"../core/constants":47,"../core/core":48,"./polargeometry":77}],80:[function(_dereq_,module,exports){ +},{"../core/constants":49,"../core/core":50,"./polargeometry":79}],82:[function(_dereq_,module,exports){ /** * @module Typography * @submodule Attributes @@ -27320,7 +27921,7 @@ p5.prototype._updateTextMetrics = function() { module.exports = p5; -},{"../core/core":48}],81:[function(_dereq_,module,exports){ +},{"../core/core":50}],83:[function(_dereq_,module,exports){ /** * @module Typography * @submodule Loading & Displaying @@ -27465,7 +28066,7 @@ p5.prototype.textFont = function(theFont, theSize) { module.exports = p5; -},{"../core/constants":47,"../core/core":48,"../core/error_helpers":51}],82:[function(_dereq_,module,exports){ +},{"../core/constants":49,"../core/core":50,"../core/error_helpers":53}],84:[function(_dereq_,module,exports){ /** * This module defines the p5.Font class and functions for * drawing text to the display canvas. @@ -28508,7 +29109,7 @@ function cacheKey() { module.exports = p5.Font; -},{"../core/constants":47,"../core/core":48}],83:[function(_dereq_,module,exports){ +},{"../core/constants":49,"../core/core":50}],85:[function(_dereq_,module,exports){ /** * @module Data * @submodule Array Functions @@ -28565,7 +29166,7 @@ p5.prototype.append = function(array, value) { * @param {Number} [srcPosition] starting position in the source Array * @param {Array} dst the destination Array * @param {Number} [dstPosition] starting position in the destination Array - * @param {Number} [length] number of Array elements to be copied + * @param {Nimber} [length] number of Array elements to be copied * * @example *
@@ -28856,7 +29457,7 @@ p5.prototype.subset = function(list, start, count) { module.exports = p5; -},{"../core/core":48}],84:[function(_dereq_,module,exports){ +},{"../core/core":50}],86:[function(_dereq_,module,exports){ /** * @module Data * @submodule Conversion @@ -29117,7 +29718,7 @@ p5.prototype.unhex = function(n) { module.exports = p5; -},{"../core/core":48}],85:[function(_dereq_,module,exports){ +},{"../core/core":50}],87:[function(_dereq_,module,exports){ /** * @module Data * @submodule String Functions @@ -29620,7 +30221,7 @@ p5.prototype.trim = function(str) { module.exports = p5; -},{"../core/core":48}],86:[function(_dereq_,module,exports){ +},{"../core/core":50}],88:[function(_dereq_,module,exports){ /** * @module Input * @submodule Time & Date @@ -29761,5 +30362,5 @@ p5.prototype.year = function() { module.exports = p5; -},{"../core/core":48}]},{},[39])(39) +},{"../core/core":50}]},{},[41])(41) }); \ No newline at end of file diff --git a/lib/p5.min.js b/lib/p5.min.js index 88da014f..768cdc4e 100644 --- a/lib/p5.min.js +++ b/lib/p5.min.js @@ -1,8 +1,9 @@ -/*! p5.js v0.4.23 March 04, 2016 */ !function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.p5=a()}}(function(){var define,module,exports;return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g0,"No "+b+" specified.")}var c=[],d=this;b("familyName"),b("weightName"),b("manufacturer"),b("copyright"),b("version"),a(this.unitsPerEm>0,"No unitsPerEm specified.")},d.prototype.toTables=function(){return f.fontToTable(this)},d.prototype.toBuffer=function(){for(var a=this.toTables(),b=a.encode(),c=new ArrayBuffer(b.length),d=new Uint8Array(c),e=0;eD;D+=1){var E=l.getTag(m,C),F=l.getULong(m,C+8);switch(E){case"cmap":k.tables.cmap=n.parse(m,F),k.encoding=new i.CmapEncoding(k.tables.cmap),k.encoding||(k.supported=!1);break;case"head":k.tables.head=r.parse(m,F),k.unitsPerEm=k.tables.head.unitsPerEm,b=k.tables.head.indexToLocFormat;break;case"hhea":k.tables.hhea=s.parse(m,F),k.ascender=k.tables.hhea.ascender,k.descender=k.tables.hhea.descender,k.numberOfHMetrics=k.tables.hhea.numberOfHMetrics;break;case"hmtx":c=F;break;case"maxp":k.tables.maxp=w.parse(m,F),k.numGlyphs=k.tables.maxp.numGlyphs;break;case"name":k.tables.name=x.parse(m,F),k.familyName=k.tables.name.fontFamily,k.styleName=k.tables.name.fontSubfamily;break;case"OS/2":k.tables.os2=y.parse(m,F);break;case"post":k.tables.post=z.parse(m,F),k.glyphNames=new i.GlyphNames(k.tables.post);break;case"glyf":d=F;break;case"loca":e=F;break;case"CFF ":f=F;break;case"kern":g=F;break;case"GPOS":h=F}C+=16}if(d&&e){var G=0===b,H=v.parse(m,e,k.numGlyphs,G);k.glyphs=p.parse(m,d,H,k),t.parse(m,c,k.numberOfHMetrics,k.numGlyphs,k.glyphs),i.addGlyphNames(k)}else f?(o.parse(m,f,k),i.addGlyphNames(k)):k.supported=!1;return k.supported&&(g?k.kerningPairs=u.parse(m,g):k.kerningPairs={},h&&q.parse(m,h,k)),k}function h(a,b){var c="undefined"==typeof window,d=c?e:f;d(a,function(a,c){if(a)return b(a);var d=g(c);return d.supported?b(null,d):b("Font is not supported (is this a Postscript font?)")})}var i=a("./encoding"),j=a("./font"),k=a("./glyph"),l=a("./parse"),m=a("./path"),n=a("./tables/cmap"),o=a("./tables/cff"),p=a("./tables/glyf"),q=a("./tables/gpos"),r=a("./tables/head"),s=a("./tables/hhea"),t=a("./tables/hmtx"),u=a("./tables/kern"),v=a("./tables/loca"),w=a("./tables/maxp"),x=a("./tables/name"),y=a("./tables/os2"),z=a("./tables/post");c._parse=l,c.Font=j.Font,c.Glyph=k.Glyph,c.Path=m.Path,c.parse=g,c.load=h},{"./encoding":4,"./font":5,"./glyph":6,"./parse":9,"./path":10,"./tables/cff":12,"./tables/cmap":13,"./tables/glyf":14,"./tables/gpos":15,"./tables/head":16,"./tables/hhea":17,"./tables/hmtx":18,"./tables/kern":19,"./tables/loca":20,"./tables/maxp":21,"./tables/name":22,"./tables/os2":23,"./tables/post":24,fs:1}],9:[function(a,b,c){"use strict";function d(a,b){this.data=a,this.offset=b,this.relativeOffset=0}c.getByte=function(a,b){return a.getUint8(b)},c.getCard8=c.getByte,c.getUShort=function(a,b){return a.getUint16(b,!1)},c.getCard16=c.getUShort,c.getShort=function(a,b){return a.getInt16(b,!1)},c.getULong=function(a,b){return a.getUint32(b,!1)},c.getFixed=function(a,b){var c=a.getInt16(b,!1),d=a.getUint16(b+2,!1);return c+d/65535},c.getTag=function(a,b){for(var c="",d=b;b+4>d;d+=1)c+=String.fromCharCode(a.getInt8(d));return c},c.getOffset=function(a,b,c){for(var d=0,e=0;c>e;e+=1)d<<=8,d+=a.getUint8(b+e);return d},c.getBytes=function(a,b,c){for(var d=[],e=b;c>e;e+=1)d.push(a.getUint8(e));return d},c.bytesToString=function(a){for(var b="",c=0;cf;f++)b[f]=c.getUShort(d,e),e+=2;return this.relativeOffset+=2*a,b},d.prototype.parseString=function(a){var b=this.data,c=this.offset+this.relativeOffset,d="";this.relativeOffset+=a;for(var e=0;a>e;e++)d+=String.fromCharCode(b.getUint8(c+e));return d},d.prototype.parseTag=function(){return this.parseString(4)},d.prototype.parseLongDateTime=function(){var a=c.getULong(this.data,this.offset+this.relativeOffset+4);return this.relativeOffset+=8,a},d.prototype.parseFixed=function(){var a=c.getULong(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,a/65536},d.prototype.parseVersion=function(){var a=c.getUShort(this.data,this.offset+this.relativeOffset),b=c.getUShort(this.data,this.offset+this.relativeOffset+2);return this.relativeOffset+=4,a+b/4096/10},d.prototype.skip=function(a,b){void 0===b&&(b=1),this.relativeOffset+=e[a]*b},c.Parser=d},{}],10:[function(a,b,c){"use strict";function d(){this.commands=[],this.fill="black",this.stroke=null,this.strokeWidth=1}d.prototype.moveTo=function(a,b){this.commands.push({type:"M",x:a,y:b})},d.prototype.lineTo=function(a,b){this.commands.push({type:"L",x:a,y:b})},d.prototype.curveTo=d.prototype.bezierCurveTo=function(a,b,c,d,e,f){this.commands.push({type:"C",x1:a,y1:b,x2:c,y2:d,x:e,y:f})},d.prototype.quadTo=d.prototype.quadraticCurveTo=function(a,b,c,d){this.commands.push({type:"Q",x1:a,y1:b,x:c,y:d})},d.prototype.close=d.prototype.closePath=function(){this.commands.push({type:"Z"})},d.prototype.extend=function(a){a.commands&&(a=a.commands),Array.prototype.push.apply(this.commands,a)},d.prototype.draw=function(a){a.beginPath();for(var b=0;b=0&&c>0&&(a+=" "),a+=b(d)}return a}a=void 0!==a?a:2;for(var d="",e=0;ed;d+=1)g.push(J.getOffset(a,k,j)),k+=j;f=e+g[i]}else f=b+2;for(d=0;d>4,g=15&e;if(f===c)break;if(b+=d[f],g===c)break;b+=d[g]}return parseFloat(b)}function g(a,b){var c,d,e,g;if(28===b)return c=a.parseByte(),d=a.parseByte(),c<<8|d;if(29===b)return c=a.parseByte(),d=a.parseByte(),e=a.parseByte(),g=a.parseByte(),c<<24|d<<16|e<<8|g;if(30===b)return f(a);if(b>=32&&246>=b)return b-139;if(b>=247&&250>=b)return c=a.parseByte(),256*(b-247)+c+108;if(b>=251&&254>=b)return c=a.parseByte(),256*-(b-251)-c-108;throw new Error("Invalid b0 "+b)}function h(a){for(var b={},c=0;c=i?(12===i&&(i=1200+d.parseByte()),e.push([i,f]),f=[]):f.push(g(d,i))}return h(e)}function j(a,b){return b=390>=b?H.cffStandardStrings[b]:a[b-391]}function k(a,b,c){for(var d={},e=0;ee;e+=1)f=h.parseSID(),i.push(j(d,f));else if(1===k)for(;i.length<=c;)for(f=h.parseSID(),g=h.parseCard8(),e=0;g>=e;e+=1)i.push(j(d,f)),f+=1;else{if(2!==k)throw new Error("Unknown charset format "+k);for(;i.length<=c;)for(f=h.parseSID(),g=h.parseCard16(),e=0;g>=e;e+=1)i.push(j(d,f)),f+=1}return i}function p(a,b,c){var d,e,f={},g=new J.Parser(a,b),h=g.parseCard8();if(0===h){var i=g.parseCard8();for(d=0;i>d;d+=1)e=g.parseCard8(),f[e]=d}else{if(1!==h)throw new Error("Unknown encoding format "+h);var j=g.parseCard8();for(e=1,d=0;j>d;d+=1)for(var k=g.parseCard8(),l=g.parseCard8(),m=k;k+l>=m;m+=1)f[m]=e,e+=1}return new H.CffEncoding(f,c)}function q(a,b,c){function d(a,b){p&&k.closePath(),k.moveTo(a,b),p=!0}function e(){ -var b;b=l.length%2!==0,b&&!n&&(o=l.shift()+a.nominalWidthX),m+=l.length>>1,l.length=0,n=!0}function f(c){for(var s,t,u,v,w,x,y,z,A,B,C,D,E=0;E1&&!n&&(o=l.shift()+a.nominalWidthX,n=!0),r+=l.pop(),d(q,r);break;case 5:for(;l.length>0;)q+=l.shift(),r+=l.shift(),k.lineTo(q,r);break;case 6:for(;l.length>0&&(q+=l.shift(),k.lineTo(q,r),0!==l.length);)r+=l.shift(),k.lineTo(q,r);break;case 7:for(;l.length>0&&(r+=l.shift(),k.lineTo(q,r),0!==l.length);)q+=l.shift(),k.lineTo(q,r);break;case 8:for(;l.length>0;)g=q+l.shift(),h=r+l.shift(),i=g+l.shift(),j=h+l.shift(),q=i+l.shift(),r=j+l.shift(),k.curveTo(g,h,i,j,q,r);break;case 10:w=l.pop()+a.subrsBias,x=a.subrs[w],x&&f(x);break;case 11:return;case 12:switch(F=c[E],E+=1,F){case 35:g=q+l.shift(),h=r+l.shift(),i=g+l.shift(),j=h+l.shift(),y=i+l.shift(),z=j+l.shift(),A=y+l.shift(),B=z+l.shift(),C=A+l.shift(),D=B+l.shift(),q=C+l.shift(),r=D+l.shift(),l.shift(),k.curveTo(g,h,i,j,y,z),k.curveTo(A,B,C,D,q,r);break;case 34:g=q+l.shift(),h=r,i=g+l.shift(),j=h+l.shift(),y=i+l.shift(),z=j,A=y+l.shift(),B=j,C=A+l.shift(),D=r,q=C+l.shift(),k.curveTo(g,h,i,j,y,z),k.curveTo(A,B,C,D,q,r);break;case 36:g=q+l.shift(),h=r+l.shift(),i=g+l.shift(),j=h+l.shift(),y=i+l.shift(),z=j,A=y+l.shift(),B=j,C=A+l.shift(),D=B+l.shift(),q=C+l.shift(),k.curveTo(g,h,i,j,y,z),k.curveTo(A,B,C,D,q,r);break;case 37:g=q+l.shift(),h=r+l.shift(),i=g+l.shift(),j=h+l.shift(),y=i+l.shift(),z=j+l.shift(),A=y+l.shift(),B=z+l.shift(),C=A+l.shift(),D=B+l.shift(),Math.abs(C-q)>Math.abs(D-r)?q=C+l.shift():r=D+l.shift(),k.curveTo(g,h,i,j,y,z),k.curveTo(A,B,C,D,q,r);break;default:console.log("Glyph "+b.index+": unknown operator 1200"+F),l.length=0}break;case 14:l.length>0&&!n&&(o=l.shift()+a.nominalWidthX,n=!0),p&&(k.closePath(),p=!1);break;case 18:e();break;case 19:case 20:e(),E+=m+7>>3;break;case 21:l.length>2&&!n&&(o=l.shift()+a.nominalWidthX,n=!0),r+=l.pop(),q+=l.pop(),d(q,r);break;case 22:l.length>1&&!n&&(o=l.shift()+a.nominalWidthX,n=!0),q+=l.pop(),d(q,r);break;case 23:e();break;case 24:for(;l.length>2;)g=q+l.shift(),h=r+l.shift(),i=g+l.shift(),j=h+l.shift(),q=i+l.shift(),r=j+l.shift(),k.curveTo(g,h,i,j,q,r);q+=l.shift(),r+=l.shift(),k.lineTo(q,r);break;case 25:for(;l.length>6;)q+=l.shift(),r+=l.shift(),k.lineTo(q,r);g=q+l.shift(),h=r+l.shift(),i=g+l.shift(),j=h+l.shift(),q=i+l.shift(),r=j+l.shift(),k.curveTo(g,h,i,j,q,r);break;case 26:for(l.length%2&&(q+=l.shift());l.length>0;)g=q,h=r+l.shift(),i=g+l.shift(),j=h+l.shift(),q=i,r=j+l.shift(),k.curveTo(g,h,i,j,q,r);break;case 27:for(l.length%2&&(r+=l.shift());l.length>0;)g=q+l.shift(),h=r,i=g+l.shift(),j=h+l.shift(),q=i+l.shift(),r=j,k.curveTo(g,h,i,j,q,r);break;case 28:s=c[E],t=c[E+1],l.push((s<<24|t<<16)>>16),E+=2;break;case 29:w=l.pop()+a.gsubrsBias,x=a.gsubrs[w],x&&f(x);break;case 30:for(;l.length>0&&(g=q,h=r+l.shift(),i=g+l.shift(),j=h+l.shift(),q=i+l.shift(),r=j+(1===l.length?l.shift():0),k.curveTo(g,h,i,j,q,r),0!==l.length);)g=q+l.shift(),h=r,i=g+l.shift(),j=h+l.shift(),r=j+l.shift(),q=i+(1===l.length?l.shift():0),k.curveTo(g,h,i,j,q,r);break;case 31:for(;l.length>0&&(g=q+l.shift(),h=r,i=g+l.shift(),j=h+l.shift(),r=j+l.shift(),q=i+(1===l.length?l.shift():0),k.curveTo(g,h,i,j,q,r),0!==l.length);)g=q,h=r+l.shift(),i=g+l.shift(),j=h+l.shift(),q=i+l.shift(),r=j+(1===l.length?l.shift():0),k.curveTo(g,h,i,j,q,r);break;default:32>F?console.log("Glyph "+b.index+": unknown operator "+F):247>F?l.push(F-139):251>F?(s=c[E],E+=1,l.push(256*(F-247)+s+108)):255>F?(s=c[E],E+=1,l.push(256*-(F-251)-s-108)):(s=c[E],t=c[E+1],u=c[E+2],v=c[E+3],E+=4,l.push((s<<24|t<<16|u<<8|v)/65536))}}}var g,h,i,j,k=new K.Path,l=[],m=0,n=!1,o=a.defaultWidthX,p=!1,q=0,r=0;return f(c),b.advanceWidth=o,k}function r(a){var b;return b=a.length<1240?107:a.length<33900?1131:32768}function s(a,b,c){c.tables.cff={};var d=l(a,b),f=e(a,d.endOffset,J.bytesToString),g=e(a,f.endOffset),h=e(a,g.endOffset,J.bytesToString),i=e(a,h.endOffset);c.gsubrs=i.objects,c.gsubrsBias=r(c.gsubrs);var j=new DataView(new Uint8Array(g.objects[0]).buffer),k=m(j,h.objects);c.tables.cff.topDict=k;var s=b+k["private"][1],t=n(a,s,k["private"][0],h.objects);if(c.defaultWidthX=t.defaultWidthX,c.nominalWidthX=t.nominalWidthX,0!==t.subrs){var u=s+t.subrs,v=e(a,u);c.subrs=v.objects,c.subrsBias=r(c.subrs)}else c.subrs=[],c.subrsBias=0;var w=e(a,b+k.charStrings);c.nGlyphs=w.objects.length;var x=o(a,b+k.charset,c.nGlyphs,h.objects);0===k.encoding?c.cffEncoding=new H.CffEncoding(H.cffStandardEncoding,x):1===k.encoding?c.cffEncoding=new H.CffEncoding(H.cffExpertEncoding,x):c.cffEncoding=p(a,b+k.encoding,x),c.encoding=c.encoding||c.cffEncoding,c.glyphs=new I.GlyphSet(c);for(var y=0;y=0&&(c=d),d=b.indexOf(a),d>=0?c=d+H.cffStandardStrings.length:(c=H.cffStandardStrings.length+b.length,b.push(a)),c}function u(){return new L.Table("Header",[{name:"major",type:"Card8",value:1},{name:"minor",type:"Card8",value:0},{name:"hdrSize",type:"Card8",value:4},{name:"major",type:"Card8",value:1}])}function v(a){var b=new L.Table("Name INDEX",[{name:"names",type:"INDEX",value:[]}]);b.names=[];for(var c=0;c>1,j.skip("uShort",3),d.glyphIndexMap={};var l=new i.Parser(a,b+e+14),m=new i.Parser(a,b+e+16+2*k),n=new i.Parser(a,b+e+16+4*k),o=new i.Parser(a,b+e+16+6*k),p=b+e+16+8*k;for(c=0;k-1>c;c+=1)for(var q,r=l.parseUShort(),s=m.parseUShort(),t=n.parseShort(),u=o.parseUShort(),v=s;r>=v;v+=1)0!==u?(p=o.offset+o.relativeOffset-2,p+=u,p+=2*(v-s),q=i.getUShort(a,p),0!==q&&(q=q+t&65535)):q=v+t&65535,d.glyphIndexMap[v]=q;return d}function e(a,b,c){a.segments.push({end:b,start:b,delta:-(b-c),offset:0})}function f(a){a.segments.push({end:65535,start:65535,delta:1,offset:0})}function g(a){var b,c=new j.Table("cmap",[{name:"version",type:"USHORT",value:0},{name:"numTables",type:"USHORT",value:1},{name:"platformID",type:"USHORT",value:3},{name:"encodingID",type:"USHORT",value:1},{name:"offset",type:"ULONG",value:12},{name:"format",type:"USHORT",value:4},{name:"length",type:"USHORT",value:0},{name:"language",type:"USHORT",value:0},{name:"segCountX2",type:"USHORT",value:0},{name:"searchRange",type:"USHORT",value:0},{name:"entrySelector",type:"USHORT",value:0},{name:"rangeShift",type:"USHORT",value:0}]);for(c.segments=[],b=0;bb;b+=1){var o=c.segments[b];i=i.concat({name:"end_"+b,type:"USHORT",value:o.end}),k=k.concat({name:"start_"+b,type:"USHORT",value:o.start}),l=l.concat({name:"idDelta_"+b,type:"SHORT",value:o.delta}),m=m.concat({name:"idRangeOffset_"+b,type:"USHORT",value:o.offset}),void 0!==o.glyphId&&(n=n.concat({name:"glyph_"+b,type:"USHORT",value:o.glyphId}))}return c.fields=c.fields.concat(i),c.fields.push({name:"reservedPad",type:"USHORT",value:0}),c.fields=c.fields.concat(k),c.fields=c.fields.concat(l),c.fields=c.fields.concat(m),c.fields=c.fields.concat(n),c.length=14+2*i.length+2+2*k.length+2*l.length+2*m.length+2*n.length,c}var h=a("../check"),i=a("../parse"),j=a("../table");c.parse=d,c.make=g},{"../check":2,"../parse":9,"../table":11}],14:[function(a,b,c){"use strict";function d(a,b,c,d,e){var f;return(b&d)>0?(f=a.parseByte(),0===(b&e)&&(f=-f),f=c+f):f=(b&e)>0?c:c+a.parseShort(),f}function e(a,b,c){var e=new m.Parser(b,c);a.numberOfContours=e.parseShort(),a.xMin=e.parseShort(),a.yMin=e.parseShort(),a.xMax=e.parseShort(),a.yMax=e.parseShort();var f,g;if(a.numberOfContours>0){var h,i=a.endPointIndices=[];for(h=0;hh;h+=1)if(g=e.parseByte(),f.push(g),(8&g)>0)for(var l=e.parseByte(),n=0;l>n;n+=1)f.push(g),h+=1;if(k.argument(f.length===j,"Bad flags."),i.length>0){var o,p=[];if(j>0){for(h=0;j>h;h+=1)g=f[h],o={},o.onCurve=!!(1&g),o.lastPointOfContour=i.indexOf(h)>=0,p.push(o);var q=0;for(h=0;j>h;h+=1)g=f[h],o=p[h],o.x=d(e,g,q,2,16),q=o.x;var r=0;for(h=0;j>h;h+=1)g=f[h],o=p[h],o.y=d(e,g,r,4,32),r=o.y}a.points=p}else a.points=[]}else if(0===a.numberOfContours)a.points=[];else{a.isComposite=!0,a.points=[],a.components=[];for(var s=!0;s;){f=e.parseUShort();var t={glyphIndex:e.parseUShort(),xScale:1,scale01:0,scale10:0,yScale:1,dx:0,dy:0};(1&f)>0?(t.dx=e.parseShort(),t.dy=e.parseShort()):(t.dx=e.parseChar(),t.dy=e.parseChar()),(8&f)>0?t.xScale=t.yScale=e.parseF2Dot14():(64&f)>0?(t.xScale=e.parseF2Dot14(),t.yScale=e.parseF2Dot14()):(128&f)>0&&(t.xScale=e.parseF2Dot14(),t.scale01=e.parseF2Dot14(),t.scale10=e.parseF2Dot14(),t.yScale=e.parseF2Dot14()),a.components.push(t),s=!!(32&f)}}}function f(a,b){for(var c=[],d=0;df;f++)e[c.parseTag()]={offset:c.parseUShort()};return e}function e(a,b){var c=new k.Parser(a,b),d=c.parseUShort(),e=c.parseUShort();if(1===d)return c.parseUShortList(e);if(2===d){for(var f=[];e--;)for(var g=c.parseUShort(),h=c.parseUShort(),i=c.parseUShort(),j=g;h>=j;j++)f[i++]=j;return f}}function f(a,b){var c=new k.Parser(a,b),d=c.parseUShort();if(1===d){var e=c.parseUShort(),f=c.parseUShort(),g=c.parseUShortList(f);return function(a){return g[a-e]||0}}if(2===d){for(var h=c.parseUShort(),i=[],j=[],l=[],m=0;h>m;m++)i[m]=c.parseUShort(),j[m]=c.parseUShort(),l[m]=c.parseUShort();return function(a){for(var b=0,c=i.length-1;c>b;){var d=b+c+1>>1;ar;r++){var s=q[r],t=n[s];if(!t){t={},g.relativeOffset=s;for(var u=g.parseUShort();u--;){var v=g.parseUShort();l&&(c=g.parseShort()),m&&(d=g.parseShort()),t[v]=c}}p[j[r]]=t}return function(a,b){var c=p[a];return c?c[b]:void 0}}if(2===h){for(var w=g.parseUShort(),x=g.parseUShort(),y=g.parseUShort(),z=g.parseUShort(),A=f(a,b+w),B=f(a,b+x),C=[],D=0;y>D;D++)for(var E=C[D]=[],F=0;z>F;F++)l&&(c=g.parseShort()),m&&(d=g.parseShort()),E[F]=c;var G={};for(D=0;Dm;m++)l.push(g(a,b+i[m]));j.getKerningValue=function(a,b){for(var c=l.length;c--;){var d=l[c](a,b);if(void 0!==d)return d}return 0}}return j}function i(a,b,c){var e=new k.Parser(a,b),f=e.parseFixed();j.argument(1===f,"Unsupported GPOS table version."),d(a,b+e.parseUShort()),d(a,b+e.parseUShort());var g=e.parseUShort();e.relativeOffset=g;for(var i=e.parseUShort(),l=e.parseOffset16List(i),m=b+g,n=0;i>n;n++){var o=h(a,m+l[n]);2!==o.lookupType||c.getGposKerningValue||(c.getGposKerningValue=o.getKerningValue)}}var j=a("../check"),k=a("../parse");c.parse=i},{"../check":2,"../parse":9}],16:[function(a,b,c){"use strict";function d(a,b){var c={},d=new g.Parser(a,b);return c.version=d.parseVersion(),c.fontRevision=Math.round(1e3*d.parseFixed())/1e3,c.checkSumAdjustment=d.parseULong(),c.magicNumber=d.parseULong(),f.argument(1594834165===c.magicNumber,"Font header has wrong magic number."),c.flags=d.parseUShort(),c.unitsPerEm=d.parseUShort(),c.created=d.parseLongDateTime(),c.modified=d.parseLongDateTime(),c.xMin=d.parseShort(),c.yMin=d.parseShort(),c.xMax=d.parseShort(),c.yMax=d.parseShort(),c.macStyle=d.parseUShort(),c.lowestRecPPEM=d.parseUShort(),c.fontDirectionHint=d.parseShort(),c.indexToLocFormat=d.parseShort(),c.glyphDataFormat=d.parseShort(),c}function e(a){return new h.Table("head",[{name:"version",type:"FIXED",value:65536},{name:"fontRevision",type:"FIXED",value:65536},{name:"checkSumAdjustment",type:"ULONG",value:0},{name:"magicNumber",type:"ULONG",value:1594834165},{name:"flags",type:"USHORT",value:0},{name:"unitsPerEm",type:"USHORT",value:1e3},{name:"created",type:"LONGDATETIME",value:0},{name:"modified",type:"LONGDATETIME",value:0},{name:"xMin",type:"SHORT",value:0},{name:"yMin",type:"SHORT",value:0},{name:"xMax",type:"SHORT",value:0},{name:"yMax",type:"SHORT",value:0},{name:"macStyle",type:"USHORT",value:0},{name:"lowestRecPPEM",type:"USHORT",value:0},{name:"fontDirectionHint",type:"SHORT",value:2},{name:"indexToLocFormat",type:"SHORT",value:0},{name:"glyphDataFormat",type:"SHORT",value:0}],a)}var f=a("../check"),g=a("../parse"),h=a("../table");c.parse=d,c.make=e},{"../check":2,"../parse":9,"../table":11}],17:[function(a,b,c){"use strict";function d(a,b){var c={},d=new f.Parser(a,b);return c.version=d.parseVersion(),c.ascender=d.parseShort(),c.descender=d.parseShort(),c.lineGap=d.parseShort(),c.advanceWidthMax=d.parseUShort(),c.minLeftSideBearing=d.parseShort(),c.minRightSideBearing=d.parseShort(),c.xMaxExtent=d.parseShort(),c.caretSlopeRise=d.parseShort(),c.caretSlopeRun=d.parseShort(),c.caretOffset=d.parseShort(),d.relativeOffset+=8,c.metricDataFormat=d.parseShort(),c.numberOfHMetrics=d.parseUShort(),c}function e(a){return new g.Table("hhea",[{name:"version",type:"FIXED",value:65536},{name:"ascender",type:"FWORD",value:0},{name:"descender",type:"FWORD",value:0},{name:"lineGap",type:"FWORD",value:0},{name:"advanceWidthMax",type:"UFWORD",value:0},{name:"minLeftSideBearing",type:"FWORD",value:0},{name:"minRightSideBearing",type:"FWORD",value:0},{name:"xMaxExtent",type:"FWORD",value:0},{name:"caretSlopeRise",type:"SHORT",value:1},{name:"caretSlopeRun",type:"SHORT",value:0},{name:"caretOffset",type:"SHORT",value:0},{name:"reserved1",type:"SHORT",value:0},{name:"reserved2",type:"SHORT",value:0},{name:"reserved3",type:"SHORT",value:0},{name:"reserved4",type:"SHORT",value:0},{name:"metricDataFormat",type:"SHORT",value:0},{name:"numberOfHMetrics",type:"USHORT",value:0}],a)}var f=a("../parse"),g=a("../table");c.parse=d,c.make=e},{"../parse":9,"../table":11}],18:[function(a,b,c){"use strict";function d(a,b,c,d,e){for(var g,h,i=new f.Parser(a,b),j=0;d>j;j+=1){c>j&&(g=i.parseUShort(),h=i.parseShort());var k=e.get(j);k.advanceWidth=g,k.leftSideBearing=h}}function e(a){for(var b=new g.Table("hmtx",[]),c=0;cj;j+=1){var k=d.parseUShort(),l=d.parseUShort(),m=d.parseShort();c[k+","+l]=m}return c}var e=a("../check"),f=a("../parse");c.parse=d},{"../check":2,"../parse":9}],20:[function(a,b,c){"use strict";function d(a,b,c,d){for(var f=new e.Parser(a,b),g=d?f.parseUShort:f.parseULong,h=[],i=0;c+1>i;i+=1){var j=g.call(f);d&&(j*=2),h.push(j)}return h}var e=a("../parse");c.parse=d},{"../parse":9}],21:[function(a,b,c){"use strict";function d(a,b){var c={},d=new f.Parser(a,b);return c.version=d.parseVersion(),c.numGlyphs=d.parseUShort(),1===c.version&&(c.maxPoints=d.parseUShort(),c.maxContours=d.parseUShort(),c.maxCompositePoints=d.parseUShort(),c.maxCompositeContours=d.parseUShort(),c.maxZones=d.parseUShort(),c.maxTwilightPoints=d.parseUShort(),c.maxStorage=d.parseUShort(),c.maxFunctionDefs=d.parseUShort(),c.maxInstructionDefs=d.parseUShort(),c.maxStackElements=d.parseUShort(),c.maxSizeOfInstructions=d.parseUShort(),c.maxComponentElements=d.parseUShort(),c.maxComponentDepth=d.parseUShort()),c}function e(a){return new g.Table("maxp",[{name:"version",type:"FIXED",value:20480},{name:"numGlyphs",type:"USHORT",value:a}])}var f=a("../parse"),g=a("../table");c.parse=d,c.make=e},{"../parse":9,"../table":11}],22:[function(a,b,c){"use strict";function d(a,b){var c={},d=new j.Parser(a,b);c.format=d.parseUShort();for(var e=d.parseUShort(),f=d.offset+d.parseUShort(),g=0,h=0;e>h;h++){var i=d.parseUShort(),k=d.parseUShort(),m=d.parseUShort(),n=d.parseUShort(),o=l[n],p=d.parseUShort(),q=d.parseUShort();if(3===i&&1===k&&1033===m){for(var r=[],s=p/2,t=0;s>t;t++,q+=2)r[t]=j.getShort(a,f+q);var u=String.fromCharCode.apply(null,r);o?c[o]=u:(g++,c["unknown"+g]=u)}}return 1===c.format&&(c.langTagCount=d.parseUShort()),c}function e(a,b,c,d,e,f){return new k.Table("NameRecord",[{name:"platformID",type:"USHORT",value:a},{name:"encodingID",type:"USHORT",value:b},{name:"languageID",type:"USHORT",value:c},{name:"nameID",type:"USHORT",value:d},{name:"length",type:"USHORT",value:e},{name:"offset",type:"USHORT",value:f}])}function f(a,b,c,d){var f=i.STRING(c);return a.records.push(e(1,0,0,b,f.length,d)),a.strings.push(f),d+=f.length}function g(a,b,c,d){var f=i.UTF16(c);return a.records.push(e(3,1,1033,b,f.length,d)),a.strings.push(f),d+=f.length}function h(a){var b=new k.Table("name",[{name:"format",type:"USHORT",value:0},{name:"count",type:"USHORT",value:0},{name:"stringOffset",type:"USHORT",value:0}]);b.records=[],b.strings=[];var c,d,e=0;for(c=0;c=c.begin&&ae;e++)c.panose[e]=d.parseByte();return c.ulUnicodeRange1=d.parseULong(),c.ulUnicodeRange2=d.parseULong(),c.ulUnicodeRange3=d.parseULong(),c.ulUnicodeRange4=d.parseULong(),c.achVendID=String.fromCharCode(d.parseByte(),d.parseByte(),d.parseByte(),d.parseByte()),c.fsSelection=d.parseUShort(),c.usFirstCharIndex=d.parseUShort(),c.usLastCharIndex=d.parseUShort(),c.sTypoAscender=d.parseShort(),c.sTypoDescender=d.parseShort(),c.sTypoLineGap=d.parseShort(),c.usWinAscent=d.parseUShort(),c.usWinDescent=d.parseUShort(),c.version>=1&&(c.ulCodePageRange1=d.parseULong(),c.ulCodePageRange2=d.parseULong()),c.version>=2&&(c.sxHeight=d.parseShort(),c.sCapHeight=d.parseShort(),c.usDefaultChar=d.parseUShort(),c.usBreakChar=d.parseUShort(),c.usMaxContent=d.parseUShort()),c}function f(a){return new h.Table("OS/2",[{name:"version",type:"USHORT",value:3},{name:"xAvgCharWidth",type:"SHORT",value:0},{name:"usWeightClass",type:"USHORT",value:0},{name:"usWidthClass",type:"USHORT",value:0},{name:"fsType",type:"USHORT",value:0},{name:"ySubscriptXSize",type:"SHORT",value:650},{name:"ySubscriptYSize",type:"SHORT",value:699},{name:"ySubscriptXOffset",type:"SHORT",value:0},{name:"ySubscriptYOffset",type:"SHORT",value:140},{name:"ySuperscriptXSize",type:"SHORT",value:650},{name:"ySuperscriptYSize",type:"SHORT",value:699},{name:"ySuperscriptXOffset",type:"SHORT",value:0},{name:"ySuperscriptYOffset",type:"SHORT",value:479},{name:"yStrikeoutSize",type:"SHORT",value:49},{name:"yStrikeoutPosition",type:"SHORT",value:258},{name:"sFamilyClass",type:"SHORT",value:0},{name:"bFamilyType",type:"BYTE",value:0},{name:"bSerifStyle",type:"BYTE",value:0},{name:"bWeight",type:"BYTE",value:0},{name:"bProportion",type:"BYTE",value:0},{name:"bContrast",type:"BYTE",value:0},{name:"bStrokeVariation",type:"BYTE",value:0},{name:"bArmStyle",type:"BYTE",value:0},{name:"bLetterform",type:"BYTE",value:0},{name:"bMidline",type:"BYTE",value:0},{name:"bXHeight",type:"BYTE",value:0},{name:"ulUnicodeRange1",type:"ULONG",value:0},{name:"ulUnicodeRange2",type:"ULONG",value:0},{name:"ulUnicodeRange3",type:"ULONG",value:0},{name:"ulUnicodeRange4",type:"ULONG",value:0},{name:"achVendID",type:"CHARARRAY",value:"XXXX"},{name:"fsSelection",type:"USHORT",value:0},{name:"usFirstCharIndex",type:"USHORT",value:0},{name:"usLastCharIndex",type:"USHORT",value:0},{name:"sTypoAscender",type:"SHORT",value:0},{name:"sTypoDescender",type:"SHORT",value:0},{name:"sTypoLineGap",type:"SHORT",value:0},{name:"usWinAscent",type:"USHORT",value:0},{name:"usWinDescent",type:"USHORT",value:0},{name:"ulCodePageRange1",type:"ULONG",value:0},{name:"ulCodePageRange2",type:"ULONG",value:0},{name:"sxHeight",type:"SHORT",value:0},{name:"sCapHeight",type:"SHORT",value:0},{name:"usDefaultChar",type:"USHORT",value:0},{name:"usBreakChar",type:"USHORT",value:0},{name:"usMaxContext",type:"USHORT",value:0}],a)}var g=a("../parse"),h=a("../table"),i=[{begin:0,end:127},{begin:128,end:255},{begin:256,end:383},{begin:384,end:591},{begin:592,end:687},{begin:688,end:767},{begin:768,end:879},{begin:880,end:1023},{begin:11392,end:11519},{begin:1024,end:1279},{begin:1328,end:1423},{begin:1424,end:1535},{begin:42240,end:42559},{begin:1536,end:1791},{begin:1984,end:2047},{begin:2304,end:2431},{begin:2432,end:2559},{begin:2560,end:2687},{begin:2688,end:2815},{begin:2816,end:2943},{begin:2944,end:3071},{begin:3072,end:3199},{begin:3200,end:3327},{begin:3328,end:3455},{begin:3584,end:3711},{begin:3712,end:3839},{begin:4256,end:4351},{begin:6912,end:7039},{begin:4352,end:4607},{begin:7680,end:7935},{begin:7936,end:8191},{begin:8192,end:8303},{begin:8304,end:8351},{begin:8352,end:8399},{begin:8400,end:8447},{begin:8448,end:8527},{begin:8528,end:8591},{begin:8592,end:8703},{begin:8704,end:8959},{begin:8960,end:9215},{begin:9216,end:9279},{begin:9280,end:9311},{begin:9312,end:9471},{begin:9472,end:9599},{begin:9600,end:9631},{begin:9632,end:9727},{begin:9728,end:9983},{begin:9984,end:10175},{begin:12288,end:12351},{begin:12352,end:12447},{begin:12448,end:12543},{begin:12544,end:12591},{begin:12592,end:12687},{begin:43072,end:43135},{begin:12800,end:13055},{begin:13056,end:13311},{begin:44032,end:55215},{begin:55296,end:57343},{begin:67840,end:67871},{begin:19968,end:40959},{begin:57344,end:63743},{begin:12736,end:12783},{begin:64256,end:64335},{begin:64336,end:65023},{begin:65056,end:65071},{begin:65040,end:65055},{begin:65104,end:65135},{begin:65136,end:65279},{begin:65280,end:65519},{begin:65520,end:65535},{begin:3840,end:4095},{begin:1792,end:1871},{begin:1920,end:1983},{begin:3456,end:3583},{begin:4096,end:4255},{begin:4608,end:4991},{begin:5024,end:5119},{begin:5120,end:5759},{begin:5760,end:5791},{begin:5792,end:5887},{begin:6016,end:6143},{begin:6144,end:6319},{begin:10240,end:10495},{begin:40960,end:42127},{begin:5888,end:5919},{begin:66304,end:66351},{begin:66352,end:66383},{begin:66560,end:66639},{begin:118784,end:119039},{begin:119808,end:120831},{begin:1044480,end:1048573},{begin:65024,end:65039},{begin:917504,end:917631},{begin:6400,end:6479},{begin:6480,end:6527},{begin:6528,end:6623},{begin:6656,end:6687},{begin:11264,end:11359},{begin:11568,end:11647},{begin:19904,end:19967},{begin:43008,end:43055},{begin:65536,end:65663},{begin:65856,end:65935},{begin:66432,end:66463},{begin:66464,end:66527},{begin:66640,end:66687},{begin:66688,end:66735},{begin:67584, -end:67647},{begin:68096,end:68191},{begin:119552,end:119647},{begin:73728,end:74751},{begin:119648,end:119679},{begin:7040,end:7103},{begin:7168,end:7247},{begin:7248,end:7295},{begin:43136,end:43231},{begin:43264,end:43311},{begin:43312,end:43359},{begin:43520,end:43615},{begin:65936,end:65999},{begin:66e3,end:66047},{begin:66208,end:66271},{begin:127024,end:127135}];c.unicodeRanges=i,c.getUnicodeRange=d,c.parse=e,c.make=f},{"../parse":9,"../table":11}],24:[function(a,b,c){"use strict";function d(a,b){var c,d={},e=new g.Parser(a,b);switch(d.version=e.parseVersion(),d.italicAngle=e.parseFixed(),d.underlinePosition=e.parseShort(),d.underlineThickness=e.parseShort(),d.isFixedPitch=e.parseULong(),d.minMemType42=e.parseULong(),d.maxMemType42=e.parseULong(),d.minMemType1=e.parseULong(),d.maxMemType1=e.parseULong(),d.version){case 1:d.names=f.standardNames.slice();break;case 2:for(d.numberOfGlyphs=e.parseUShort(),d.glyphNameIndex=new Array(d.numberOfGlyphs),c=0;c=f.standardNames.length){var h=e.parseChar();d.names.push(e.parseString(h))}break;case 2.5:for(d.numberOfGlyphs=e.parseUShort(),d.offset=new Array(d.numberOfGlyphs),c=0;cb.value.tag?1:-1}),b.fields=b.fields.concat(g),b.fields=b.fields.concat(h),b}function h(a,b,c){for(var d=0;d0){var f=a.glyphs.get(e);return f.getMetrics()}}return c}function i(a){for(var b=0,c=0;cD||null===b)&&(b=D),D>w&&(w=D);var E=t.getUnicodeRange(D);if(32>E)x|=1<E)y|=1<E)z|=1<E))throw new Error("Unicode ranges bits > 123 are reserved for internal usage");A|=1<=0&&255>=a,"Byte value should be between 0 and 255."),[a]},j.BYTE=d(1),i.CHAR=function(a){return[a.charCodeAt(0)]},j.BYTE=d(1),i.CHARARRAY=function(a){for(var b=[],c=0;c>8&255,255&a]},j.USHORT=d(2),i.SHORT=function(a){return a>=f&&(a=-(2*f-a)),[a>>8&255,255&a]},j.SHORT=d(2),i.UINT24=function(a){return[a>>16&255,a>>8&255,255&a]},j.UINT24=d(3),i.ULONG=function(a){return[a>>24&255,a>>16&255,a>>8&255,255&a]},j.ULONG=d(4),i.LONG=function(a){return a>=g&&(a=-(2*g-a)),[a>>24&255,a>>16&255,a>>8&255,255&a]},j.LONG=d(4),i.FIXED=i.ULONG,j.FIXED=j.ULONG,i.FWORD=i.SHORT,j.FWORD=j.SHORT,i.UFWORD=i.USHORT,j.UFWORD=j.USHORT,i.LONGDATETIME=function(){return[0,0,0,0,0,0,0,0]},j.LONGDATETIME=d(8),i.TAG=function(a){return e.argument(4===a.length,"Tag should be exactly 4 ASCII characters."),[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)]},j.TAG=d(4),i.Card8=i.BYTE,j.Card8=j.BYTE,i.Card16=i.USHORT,j.Card16=j.USHORT,i.OffSize=i.BYTE,j.OffSize=j.BYTE,i.SID=i.USHORT,j.SID=j.USHORT,i.NUMBER=function(a){return a>=-107&&107>=a?[a+139]:a>=108&&1131>=a?(a-=108,[(a>>8)+247,255&a]):a>=-1131&&-108>=a?(a=-a-108,[(a>>8)+251,255&a]):a>=-32768&&32767>=a?i.NUMBER16(a):i.NUMBER32(a)},j.NUMBER=function(a){return i.NUMBER(a).length},i.NUMBER16=function(a){return[28,a>>8&255,255&a]},j.NUMBER16=d(2),i.NUMBER32=function(a){return[29,a>>24&255,a>>16&255,a>>8&255,255&a]},j.NUMBER32=d(4),i.REAL=function(a){var b=a.toString(),c=/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(b);if(c){var d=parseFloat("1e"+((c[2]?+c[2]:0)+c[1].length));b=(Math.round(a*d)/d).toString()}var e,f,g="";for(e=0,f=b.length;f>e;e+=1){var h=b[e];g+="e"===h?"-"===b[++e]?"c":"b":"."===h?"a":"-"===h?"e":h}g+=1&g.length?"f":"ff";var i=[30];for(e=0,f=g.length;f>e;e+=2)i.push(parseInt(g.substr(e,2),16));return i},j.REAL=function(a){return i.REAL(a).length},i.NAME=i.CHARARRAY,j.NAME=j.CHARARRAY,i.STRING=i.CHARARRAY,j.STRING=j.CHARARRAY,i.UTF16=function(a){for(var b=[],c=0;ce;e+=1){var f=parseInt(c[e],0),g=a[f];b=b.concat(i.OPERAND(g.value,g.type)),b=b.concat(i.OPERATOR(f))}return b},j.DICT=function(a){return i.DICT(a).length},i.OPERATOR=function(a){return 1200>a?[a]:[12,a-1200]},i.OPERAND=function(a,b){var c=[];if(Array.isArray(b))for(var d=0;dd;d+=1){var e=a[d];b=b.concat(i[e.type](e.value))}return k&&k.set(a,b),b},j.CHARSTRING=function(a){return i.CHARSTRING(a).length},i.OBJECT=function(a){var b=i[a.type];return e.argument(void 0!==b,"No encoding function for type "+a.type),b(a.value)},i.TABLE=function(a){for(var b=[],c=a.fields.length,d=0;c>d;d+=1){var f=a.fields[d],g=i[f.type];e.argument(void 0!==g,"No encoding function for field type "+f.type);var h=a[f.name];void 0===h&&(h=f.value);var j=g(h);b=b.concat(j)}return b},i.LITERAL=function(a){return a},j.LITERAL=function(a){return a.length},c.decode=h,c.encode=i,c.sizeOf=j},{"./check":2}],27:[function(_dereq_,module,exports){!function(a,b,c){"undefined"!=typeof module&&module.exports?module.exports=c():"function"==typeof define&&define.amd?define(c):b[a]=c()}("reqwest",this,function(){function succeed(a){var b=protocolRe.exec(a.url);return b=b&&b[1]||window.location.protocol,httpsRe.test(b)?twoHundo.test(a.request.status):!!a.request.response}function handleReadyState(a,b,c){return function(){return a._aborted?c(a.request):a._timedOut?c(a.request,"Request is aborted: timeout"):void(a.request&&4==a.request[readyState]&&(a.request.onreadystatechange=noop,succeed(a)?b(a.request):c(a.request)))}}function setHeaders(a,b){var c,d=b.headers||{};d.Accept=d.Accept||defaultHeaders.accept[b.type]||defaultHeaders.accept["*"];var e="function"==typeof FormData&&b.data instanceof FormData;b.crossOrigin||d[requestedWith]||(d[requestedWith]=defaultHeaders.requestedWith),d[contentType]||e||(d[contentType]=b.contentType||defaultHeaders.contentType);for(c in d)d.hasOwnProperty(c)&&"setRequestHeader"in a&&a.setRequestHeader(c,d[c])}function setCredentials(a,b){"undefined"!=typeof b.withCredentials&&"undefined"!=typeof a.withCredentials&&(a.withCredentials=!!b.withCredentials)}function generalCallback(a){lastValue=a}function urlappend(a,b){return a+(/\?/.test(a)?"&":"?")+b}function handleJsonp(a,b,c,d){var e=uniqid++,f=a.jsonpCallback||"callback",g=a.jsonpCallbackName||reqwest.getcallbackPrefix(e),h=new RegExp("((^|\\?|&)"+f+")=([^&]+)"),i=d.match(h),j=doc.createElement("script"),k=0,l=-1!==navigator.userAgent.indexOf("MSIE 10.0");return i?"?"===i[3]?d=d.replace(h,"$1="+g):g=i[3]:d=urlappend(d,f+"="+g),win[g]=generalCallback,j.type="text/javascript",j.src=d,j.async=!0,"undefined"==typeof j.onreadystatechange||l||(j.htmlFor=j.id="_reqwest_"+e),j.onload=j.onreadystatechange=function(){return j[readyState]&&"complete"!==j[readyState]&&"loaded"!==j[readyState]||k?!1:(j.onload=j.onreadystatechange=null,j.onclick&&j.onclick(),b(lastValue),lastValue=void 0,head.removeChild(j),void(k=1))},head.appendChild(j),{abort:function(){j.onload=j.onreadystatechange=null,c({},"Request is aborted: timeout",{}),lastValue=void 0,head.removeChild(j),k=1}}}function getRequest(a,b){var c,d=this.o,e=(d.method||"GET").toUpperCase(),f="string"==typeof d?d:d.url,g=d.processData!==!1&&d.data&&"string"!=typeof d.data?reqwest.toQueryString(d.data):d.data||null,h=!1;return"jsonp"!=d.type&&"GET"!=e||!g||(f=urlappend(f,g),g=null),"jsonp"==d.type?handleJsonp(d,a,b,f):(c=d.xhr&&d.xhr(d)||xhr(d),c.open(e,f,d.async===!1?!1:!0),setHeaders(c,d),setCredentials(c,d),win[xDomainRequest]&&c instanceof win[xDomainRequest]?(c.onload=a,c.onerror=b,c.onprogress=function(){},h=!0):c.onreadystatechange=handleReadyState(this,a,b),d.before&&d.before(c),h?setTimeout(function(){c.send(g)},200):c.send(g),c)}function Reqwest(a,b){this.o=a,this.fn=b,init.apply(this,arguments)}function setType(a){return a.match("json")?"json":a.match("javascript")?"js":a.match("text")?"html":a.match("xml")?"xml":void 0}function init(o,fn){function complete(a){for(o.timeout&&clearTimeout(self.timeout),self.timeout=null;self._completeHandlers.length>0;)self._completeHandlers.shift()(a)}function success(resp){var type=o.type||resp&&setType(resp.getResponseHeader("Content-Type"));resp="jsonp"!==type?self.request:resp;var filteredResponse=globalSetupOptions.dataFilter(resp.responseText,type),r=filteredResponse;try{resp.responseText=r}catch(e){}if(r)switch(type){case"json":try{resp=win.JSON?win.JSON.parse(r):eval("("+r+")")}catch(err){return error(resp,"Could not parse JSON in response",err)}break;case"js":resp=eval(r);break;case"html":resp=r;break;case"xml":resp=resp.responseXML&&resp.responseXML.parseError&&resp.responseXML.parseError.errorCode&&resp.responseXML.parseError.reason?null:resp.responseXML}for(self._responseArgs.resp=resp,self._fulfilled=!0,fn(resp),self._successHandler(resp);self._fulfillmentHandlers.length>0;)resp=self._fulfillmentHandlers.shift()(resp);complete(resp)}function timedOut(){self._timedOut=!0,self.request.abort()}function error(a,b,c){for(a=self.request,self._responseArgs.resp=a,self._responseArgs.msg=b,self._responseArgs.t=c,self._erred=!0;self._errorHandlers.length>0;)self._errorHandlers.shift()(a,b,c);complete(a)}this.url="string"==typeof o?o:o.url,this.timeout=null,this._fulfilled=!1,this._successHandler=function(){},this._fulfillmentHandlers=[],this._errorHandlers=[],this._completeHandlers=[],this._erred=!1,this._responseArgs={};var self=this;fn=fn||function(){},o.timeout&&(this.timeout=setTimeout(function(){timedOut()},o.timeout)),o.success&&(this._successHandler=function(){o.success.apply(o,arguments)}),o.error&&this._errorHandlers.push(function(){o.error.apply(o,arguments)}),o.complete&&this._completeHandlers.push(function(){o.complete.apply(o,arguments)}),this.request=getRequest.call(this,success,error)}function reqwest(a,b){return new Reqwest(a,b)}function normalize(a){return a?a.replace(/\r?\n/g,"\r\n"):""}function serial(a,b){var c,d,e,f,g=a.name,h=a.tagName.toLowerCase(),i=function(a){a&&!a.disabled&&b(g,normalize(a.attributes.value&&a.attributes.value.specified?a.value:a.text))};if(!a.disabled&&g)switch(h){case"input":/reset|button|image|file/i.test(a.type)||(c=/checkbox/i.test(a.type),d=/radio/i.test(a.type),e=a.value,(!(c||d)||a.checked)&&b(g,normalize(c&&""===e?"on":e)));break;case"textarea":b(g,normalize(a.value));break;case"select":if("select-one"===a.type.toLowerCase())i(a.selectedIndex>=0?a.options[a.selectedIndex]:null);else for(f=0;a.length&&f=e;e++)for(i=e/c,f=0;b>=f;f++)h=f/b,g=a(h,i),this.vertices.push(g);var k,l,m,n,o,p,q,r;for(e=0;c>e;e++)for(f=0;b>f;f++)k=e*j+f+d,l=e*j+f+1+d,m=(e+1)*j+f+1+d,n=(e+1)*j+f+d,o=[f/b,e/c],p=[(f+1)/b,e/c],q=[(f+1)/b,(e+1)/c],r=[f/b,(e+1)/c],this.faces.push([k,l,n]),this.uvs.push([o,p,r]),this.faces.push([l,m,n]),this.uvs.push([p,q,r])},f.Geometry3D.prototype.computeFaceNormals=function(){for(var a=new f.Vector,b=new f.Vector,c=0;cthis.vertices.length-1-this.detailX;b--)a.add(this.vertexNormals[b]);for(a=f.Vector.div(a,this.detailX),b=this.vertices.length-1;b>this.vertices.length-1-this.detailX;b--)this.vertexNormals[b]=a},f.Geometry3D.prototype.generateUV=function(a,b){a=d(a),b=d(b);var c=[];return a.forEach(function(a,d){c[a]=b[d]}),d(c)},f.Geometry3D.prototype.generateObj=function(a,b){this.computeFaceNormals(),this.computeVertexNormals(),a&&this.averageNormals(),b&&this.averagePoleNormals();var c={vertices:e(this.vertices),vertexNormals:e(this.vertexNormals),uvs:this.generateUV(this.faces,this.uvs),faces:d(this.faces),len:3*this.faces.length};return c},b.exports=f.Geometry3D},{"../core/core":48}],35:[function(a,b,c){"use strict";var d=a("../core/core"),e=a("../math/polargeometry"),f=a("../core/constants"),g="undefined"!=typeof Float32Array?Float32Array:Array;d.Matrix=function(){return arguments[0]instanceof d?(this.p5=arguments[0],this.mat4=arguments[1]||new g([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])):this.mat4=arguments[0]||new g([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this},d.Matrix.prototype.set=function(a){return a instanceof d.Matrix?(this.mat4=a.mat4,this):a instanceof g?(this.mat4=a,this):this},d.Matrix.prototype.get=function(){return new d.Matrix(this.mat4)},d.Matrix.prototype.copy=function(){var a=new d.Matrix;return a.mat4[0]=this.mat4[0],a.mat4[1]=this.mat4[1],a.mat4[2]=this.mat4[2],a.mat4[3]=this.mat4[3],a.mat4[4]=this.mat4[4],a.mat4[5]=this.mat4[5],a.mat4[6]=this.mat4[6],a.mat4[7]=this.mat4[7],a.mat4[8]=this.mat4[8],a.mat4[9]=this.mat4[9],a.mat4[10]=this.mat4[10],a.mat4[11]=this.mat4[11],a.mat4[12]=this.mat4[12],a.mat4[13]=this.mat4[13],a.mat4[14]=this.mat4[14],a.mat4[15]=this.mat4[15],a},d.Matrix.identity=function(){return new d.Matrix},d.Matrix.prototype.transpose=function(a){var b,c,e,f,h,i;return a instanceof d.Matrix?(b=a.mat4[1],c=a.mat4[2],e=a.mat4[3],f=a.mat4[6],h=a.mat4[7],i=a.mat4[11],this.mat4[0]=a.mat4[0],this.mat4[1]=a.mat4[4],this.mat4[2]=a.mat4[8],this.mat4[3]=a.mat4[12],this.mat4[4]=b,this.mat4[5]=a.mat4[5],this.mat4[6]=a.mat4[9],this.mat4[7]=a.mat4[13],this.mat4[8]=c,this.mat4[9]=f,this.mat4[10]=a.mat4[10],this.mat4[11]=a.mat4[14],this.mat4[12]=e,this.mat4[13]=h,this.mat4[14]=i,this.mat4[15]=a.mat4[15]):a instanceof g&&(b=a[1],c=a[2],e=a[3],f=a[6],h=a[7],i=a[11],this.mat4[0]=a[0],this.mat4[1]=a[4],this.mat4[2]=a[8],this.mat4[3]=a[12],this.mat4[4]=b,this.mat4[5]=a[5],this.mat4[6]=a[9],this.mat4[7]=a[13],this.mat4[8]=c,this.mat4[9]=f,this.mat4[10]=a[10],this.mat4[11]=a[14],this.mat4[12]=e,this.mat4[13]=h,this.mat4[14]=i,this.mat4[15]=a[15]),this},d.Matrix.prototype.invert=function(a){var b,c,e,f,h,i,j,k,l,m,n,o,p,q,r,s;a instanceof d.Matrix?(b=a.mat4[0],c=a.mat4[1],e=a.mat4[2],f=a.mat4[3],h=a.mat4[4],i=a.mat4[5],j=a.mat4[6],k=a.mat4[7],l=a.mat4[8],m=a.mat4[9],n=a.mat4[10],o=a.mat4[11],p=a.mat4[12],q=a.mat4[13],r=a.mat4[14],s=a.mat4[15]):a instanceof g&&(b=a[0],c=a[1],e=a[2],f=a[3],h=a[4],i=a[5],j=a[6],k=a[7],l=a[8],m=a[9],n=a[10],o=a[11],p=a[12],q=a[13],r=a[14],s=a[15]);var t=b*i-c*h,u=b*j-e*h,v=b*k-f*h,w=c*j-e*i,x=c*k-f*i,y=e*k-f*j,z=l*q-m*p,A=l*r-n*p,B=l*s-o*p,C=m*r-n*q,D=m*s-o*q,E=n*s-o*r,F=t*E-u*D+v*C+w*B-x*A+y*z;return F?(F=1/F,this.mat4[0]=(i*E-j*D+k*C)*F,this.mat4[1]=(e*D-c*E-f*C)*F,this.mat4[2]=(q*y-r*x+s*w)*F,this.mat4[3]=(n*x-m*y-o*w)*F,this.mat4[4]=(j*B-h*E-k*A)*F,this.mat4[5]=(b*E-e*B+f*A)*F,this.mat4[6]=(r*v-p*y-s*u)*F,this.mat4[7]=(l*y-n*v+o*u)*F,this.mat4[8]=(h*D-i*B+k*z)*F,this.mat4[9]=(c*B-b*D-f*z)*F,this.mat4[10]=(p*x-q*v+s*t)*F,this.mat4[11]=(m*v-l*x-o*t)*F,this.mat4[12]=(i*A-h*C-j*z)*F,this.mat4[13]=(b*C-c*A+e*z)*F,this.mat4[14]=(q*u-p*w-r*t)*F,this.mat4[15]=(l*w-m*u+n*t)*F,this):null},d.Matrix.prototype.determinant=function(){var a=this.mat4[0]*this.mat4[5]-this.mat4[1]*this.mat4[4],b=this.mat4[0]*this.mat4[6]-this.mat4[2]*this.mat4[4],c=this.mat4[0]*this.mat4[7]-this.mat4[3]*this.mat4[4],d=this.mat4[1]*this.mat4[6]-this.mat4[2]*this.mat4[5],e=this.mat4[1]*this.mat4[7]-this.mat4[3]*this.mat4[5],f=this.mat4[2]*this.mat4[7]-this.mat4[3]*this.mat4[6],g=this.mat4[8]*this.mat4[13]-this.mat4[9]*this.mat4[12],h=this.mat4[8]*this.mat4[14]-this.mat4[10]*this.mat4[12],i=this.mat4[8]*this.mat4[15]-this.mat4[11]*this.mat4[12],j=this.mat4[9]*this.mat4[14]-this.mat4[10]*this.mat4[13],k=this.mat4[9]*this.mat4[15]-this.mat4[11]*this.mat4[13],l=this.mat4[10]*this.mat4[15]-this.mat4[11]*this.mat4[14];return a*l-b*k+c*j+d*i-e*h+f*g},d.Matrix.prototype.mult=function(a){var b=new g(16),c=new g(16);a instanceof d.Matrix?c=a.mat4:a instanceof g&&(c=a);var e=this.mat4[0],f=this.mat4[1],h=this.mat4[2],i=this.mat4[3];return b[0]=e*c[0]+f*c[4]+h*c[8]+i*c[12],b[1]=e*c[1]+f*c[5]+h*c[9]+i*c[13],b[2]=e*c[2]+f*c[6]+h*c[10]+i*c[14],b[3]=e*c[3]+f*c[7]+h*c[11]+i*c[15],e=this.mat4[4],f=this.mat4[5],h=this.mat4[6],i=this.mat4[7],b[4]=e*c[0]+f*c[4]+h*c[8]+i*c[12],b[5]=e*c[1]+f*c[5]+h*c[9]+i*c[13],b[6]=e*c[2]+f*c[6]+h*c[10]+i*c[14],b[7]=e*c[3]+f*c[7]+h*c[11]+i*c[15],e=this.mat4[8],f=this.mat4[9],h=this.mat4[10],i=this.mat4[11],b[8]=e*c[0]+f*c[4]+h*c[8]+i*c[12],b[9]=e*c[1]+f*c[5]+h*c[9]+i*c[13],b[10]=e*c[2]+f*c[6]+h*c[10]+i*c[14],b[11]=e*c[3]+f*c[7]+h*c[11]+i*c[15],e=this.mat4[12],f=this.mat4[13],h=this.mat4[14],i=this.mat4[15],b[12]=e*c[0]+f*c[4]+h*c[8]+i*c[12],b[13]=e*c[1]+f*c[5]+h*c[9]+i*c[13],b[14]=e*c[2]+f*c[6]+h*c[10]+i*c[14],b[15]=e*c[3]+f*c[7]+h*c[11]+i*c[15],this.mat4=b,this},d.Matrix.prototype.scale=function(){for(var a,b,c,e=new Array(arguments.length),f=0;f1e3){var c=Object.keys(this.gHash)[0];delete this.gHash[c],e--}var d=this.GL;this.gHash[a]={},this.gHash[a].len=[],this.gHash[a].vertexBuffer=[],this.gHash[a].normalBuffer=[],this.gHash[a].uvBuffer=[],this.gHash[a].indexBuffer=[],b.forEach(function(b){this.gHash[a].len.push(b.len),this.gHash[a].vertexBuffer.push(d.createBuffer()),this.gHash[a].normalBuffer.push(d.createBuffer()),this.gHash[a].uvBuffer.push(d.createBuffer()),this.gHash[a].indexBuffer.push(d.createBuffer())}.bind(this))},d.Renderer3D.prototype.initBuffer=function(a,b){this._setDefaultCamera();var c=this.GL;this.createBuffer(a,b);var d=this.mHash[this._getCurShaderId()];b.forEach(function(b,e){c.bindBuffer(c.ARRAY_BUFFER,this.gHash[a].vertexBuffer[e]),c.bufferData(c.ARRAY_BUFFER,new Float32Array(b.vertices),c.STATIC_DRAW),c.vertexAttribPointer(d.vertexPositionAttribute,3,c.FLOAT,!1,0,0),c.bindBuffer(c.ARRAY_BUFFER,this.gHash[a].normalBuffer[e]),c.bufferData(c.ARRAY_BUFFER,new Float32Array(b.vertexNormals),c.STATIC_DRAW),c.vertexAttribPointer(d.vertexNormalAttribute,3,c.FLOAT,!1,0,0),c.bindBuffer(c.ARRAY_BUFFER,this.gHash[a].uvBuffer[e]),c.bufferData(c.ARRAY_BUFFER,new Float32Array(b.uvs),c.STATIC_DRAW),c.vertexAttribPointer(d.textureCoordAttribute,2,c.FLOAT,!1,0,0),c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,this.gHash[a].indexBuffer[e]),c.bufferData(c.ELEMENT_ARRAY_BUFFER,new Uint16Array(b.faces),c.STATIC_DRAW)}.bind(this))},d.Renderer3D.prototype.drawBuffer=function(a){this._setDefaultCamera();var b=this.GL,c=this._getCurShaderId(),d=this.mHash[c];this.gHash[a].len.forEach(function(e,f){b.bindBuffer(b.ARRAY_BUFFER,this.gHash[a].vertexBuffer[f]),b.vertexAttribPointer(d.vertexPositionAttribute,3,b.FLOAT,!1,0,0),b.bindBuffer(b.ARRAY_BUFFER,this.gHash[a].normalBuffer[f]),b.vertexAttribPointer(d.vertexNormalAttribute,3,b.FLOAT,!1,0,0),b.bindBuffer(b.ARRAY_BUFFER,this.gHash[a].uvBuffer[f]),b.vertexAttribPointer(d.textureCoordAttribute,2,b.FLOAT,!1,0,0),b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,this.gHash[a].indexBuffer[f]),this.setMatrixUniforms(c),b.drawElements(b.TRIANGLES,this.gHash[a].len[f],b.UNSIGNED_SHORT,0)}.bind(this))},b.exports=d.Renderer3D},{"../core/core":48}],38:[function(a,b,c){b.exports={vertexColorVert:"attribute vec3 aPosition;\nattribute vec4 aVertexColor;\n\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nuniform float uResolution;\n\nvarying vec4 vColor;\n\nvoid main(void) {\n vec4 positionVec4 = vec4(aPosition / uResolution * vec3(1.0, -1.0, 1.0), 1.0);\n gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\n vColor = aVertexColor;\n}",vertexColorFrag:"precision mediump float;\nvarying vec4 vColor;\nvoid main(void) {\n gl_FragColor = vColor;\n}",normalVert:"attribute vec3 aPosition;\nattribute vec3 aNormal;\nattribute vec2 aTexCoord;\n\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nuniform mat4 uNormalMatrix;\nuniform float uResolution;\n\nvarying vec3 vVertexNormal;\nvarying highp vec2 vVertTexCoord;\n\nvoid main(void) {\n vec4 positionVec4 = vec4(aPosition / uResolution, 1.0);\n gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\n vVertexNormal = vec3( uNormalMatrix * vec4( aNormal, 1.0 ) );\n vVertTexCoord = aTexCoord;\n}",normalFrag:"precision mediump float;\nvarying vec3 vVertexNormal;\nvoid main(void) {\n gl_FragColor = vec4(vVertexNormal, 1.0);\n}",basicFrag:"precision mediump float;\nvarying vec3 vVertexNormal;\nuniform vec4 uMaterialColor;\nvoid main(void) {\n gl_FragColor = uMaterialColor;\n}",lightVert:"attribute vec3 aPosition;\nattribute vec3 aNormal;\nattribute vec2 aTexCoord;\n\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nuniform mat4 uNormalMatrix;\nuniform float uResolution;\nuniform int uAmbientLightCount;\nuniform int uDirectionalLightCount;\nuniform int uPointLightCount;\n\nuniform vec3 uAmbientColor[8];\nuniform vec3 uLightingDirection[8];\nuniform vec3 uDirectionalColor[8];\nuniform vec3 uPointLightLocation[8];\nuniform vec3 uPointLightColor[8];\nuniform bool uSpecular;\n\nvarying vec3 vVertexNormal;\nvarying vec2 vVertTexCoord;\nvarying vec3 vLightWeighting;\n\nvec3 ambientLightFactor = vec3(0.0, 0.0, 0.0);\nvec3 directionalLightFactor = vec3(0.0, 0.0, 0.0);\nvec3 pointLightFactor = vec3(0.0, 0.0, 0.0);\nvec3 pointLightFactor2 = vec3(0.0, 0.0, 0.0);\n\nvoid main(void){\n\n vec4 positionVec4 = vec4(aPosition / uResolution, 1.0);\n gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\n\n vec3 vertexNormal = vec3( uNormalMatrix * vec4( aNormal, 1.0 ) );\n vVertexNormal = vertexNormal;\n vVertTexCoord = aTexCoord;\n\n vec4 mvPosition = uModelViewMatrix * vec4(aPosition / uResolution, 1.0);\n vec3 eyeDirection = normalize(-mvPosition.xyz);\n\n float shininess = 32.0;\n float specularFactor = 2.0;\n float diffuseFactor = 0.3;\n\n for(int i = 0; i < 8; i++){\n if(uAmbientLightCount == i) break;\n ambientLightFactor += uAmbientColor[i];\n }\n\n for(int j = 0; j < 8; j++){\n if(uDirectionalLightCount == j) break;\n vec3 dir = uLightingDirection[j];\n float directionalLightWeighting = max(dot(vertexNormal, dir), 0.0);\n directionalLightFactor += uDirectionalColor[j] * directionalLightWeighting;\n }\n\n for(int k = 0; k < 8; k++){\n if(uPointLightCount == k) break;\n vec3 loc = uPointLightLocation[k];\n //loc = loc / uResolution;\n vec3 lightDirection = normalize(loc - mvPosition.xyz);\n\n float directionalLightWeighting = max(dot(vertexNormal, lightDirection), 0.0);\n pointLightFactor += uPointLightColor[k] * directionalLightWeighting;\n\n //factor2 for specular\n vec3 reflectionDirection = reflect(-lightDirection, vertexNormal);\n float specularLightWeighting = pow(max(dot(reflectionDirection, eyeDirection), 0.0), shininess);\n\n pointLightFactor2 += uPointLightColor[k] * (specularFactor * specularLightWeighting\n + directionalLightWeighting * diffuseFactor);\n }\n \n if(!uSpecular){\n vLightWeighting = ambientLightFactor + directionalLightFactor + pointLightFactor;\n }else{\n vLightWeighting = ambientLightFactor + directionalLightFactor + pointLightFactor2;\n }\n\n}",lightTextureFrag:"precision mediump float;\n\nuniform vec4 uMaterialColor;\nuniform sampler2D uSampler;\nuniform bool isTexture;\n\nvarying vec3 vLightWeighting;\nvarying highp vec2 vVertTexCoord;\n\nvoid main(void) {\n if(!isTexture){\n gl_FragColor = vec4(vec3(uMaterialColor.rgb * vLightWeighting), uMaterialColor.a);\n }else{\n vec4 textureColor = texture2D(uSampler, vVertTexCoord);\n if(vLightWeighting == vec3(0., 0., 0.)){\n gl_FragColor = textureColor;\n }else{\n gl_FragColor = vec4(vec3(textureColor.rgb * vLightWeighting), textureColor.a); \n }\n }\n}"}},{}],39:[function(a,b,c){"use strict";var d=a("./core/core");a("./color/p5.Color"),a("./core/p5.Element"),a("./typography/p5.Font"),a("./core/p5.Graphics"),a("./core/p5.Renderer2D"),a("./image/p5.Image"),a("./math/p5.Vector"),a("./io/p5.TableRow"),a("./io/p5.Table"),a("./color/creating_reading"),a("./color/setting"),a("./core/constants"),a("./utilities/conversion"),a("./utilities/array_functions"),a("./utilities/string_functions"),a("./core/environment"),a("./image/image"),a("./image/loading_displaying"),a("./image/pixels"),a("./io/files"),a("./events/keyboard"),a("./events/acceleration"),a("./events/mouse"),a("./utilities/time_date"),a("./events/touch"),a("./math/math"),a("./math/calculation"),a("./math/random"),a("./math/noise"),a("./math/trigonometry"),a("./core/rendering"),a("./core/2d_primitives"),a("./core/attributes"),a("./core/curves"),a("./core/vertex"),a("./core/structure"),a("./core/transform"),a("./typography/attributes"),a("./typography/loading_displaying"),a("./3d/p5.Renderer3D"),a("./3d/p5.Geometry3D"),a("./3d/retainedMode3D"),a("./3d/immediateMode3D"),a("./3d/3d_primitives"),a("./3d/p5.Matrix"),a("./3d/material"),a("./3d/light"),a("./3d/shader"),a("./3d/camera"),a("./3d/interaction");var e=function(){window.PHANTOMJS||window.mocha||(window.setup&&"function"==typeof window.setup||window.draw&&"function"==typeof window.draw)&&new d};"complete"===document.readyState?e():window.addEventListener("load",e,!1),b.exports=d},{"./3d/3d_primitives":28,"./3d/camera":29,"./3d/immediateMode3D":30,"./3d/interaction":31,"./3d/light":32,"./3d/material":33,"./3d/p5.Geometry3D":34,"./3d/p5.Matrix":35,"./3d/p5.Renderer3D":36,"./3d/retainedMode3D":37,"./3d/shader":38,"./color/creating_reading":41,"./color/p5.Color":42,"./color/setting":43,"./core/2d_primitives":44,"./core/attributes":45,"./core/constants":47,"./core/core":48,"./core/curves":49,"./core/environment":50,"./core/p5.Element":52,"./core/p5.Graphics":53,"./core/p5.Renderer2D":55,"./core/rendering":56,"./core/structure":58,"./core/transform":59,"./core/vertex":60,"./events/acceleration":61,"./events/keyboard":62,"./events/mouse":63,"./events/touch":64,"./image/image":66,"./image/loading_displaying":67,"./image/p5.Image":68,"./image/pixels":69,"./io/files":70,"./io/p5.Table":71,"./io/p5.TableRow":72,"./math/calculation":73,"./math/math":74,"./math/noise":75,"./math/p5.Vector":76,"./math/random":78,"./math/trigonometry":79,"./typography/attributes":80,"./typography/loading_displaying":81,"./typography/p5.Font":82,"./utilities/array_functions":83,"./utilities/conversion":84,"./utilities/string_functions":85,"./utilities/time_date":86}],40:[function(a,b,c){"use strict";var d=a("../core/core");d.ColorConversion={},d.ColorConversion._hsbaToHSLA=function(a){var b=a[0],c=a[1],d=a[2],e=(2-c)*d/2;return 0!==e&&(1===e?c=0:.5>e?c/=2-c:c=c*d/(2-2*e)),[b,c,e,a[3]]},d.ColorConversion._hsbaToRGBA=function(a){var b=6*a[0],c=a[1],d=a[2],e=[];if(0===c)e=[d,d,d,a[3]];else{var f,g,h,i=Math.floor(b),j=d*(1-c),k=d*(1-c*(b-i)),l=d*(1-c*(1+i-b));0===i?(f=d,g=l,h=j):1===i?(f=k,g=d,h=j):2===i?(f=j,g=d,h=l):3===i?(f=j,g=k,h=d):4===i?(f=l,g=j,h=d):(f=d,g=j,h=k),e=[f,g,h,a[3]]}return e},d.ColorConversion._hslaToHSBA=function(a){var b,c=a[0],d=a[1],e=a[2];return b=.5>e?(1+d)*e:e+d-e*d,d=2*(b-e)/b,[c,d,b,a[3]]},d.ColorConversion._hslaToRGBA=function(a){var b=6*a[0],c=a[1],d=a[2],e=[];if(0===c)e=[d,d,d,a[3]];else{var f;f=.5>d?(1+c)*d:d+c-d*c;var g=2*d-f,h=function(a,b,c){return 0>a?a+=6:a>=6&&(a-=6),1>a?b+(c-b)*a:3>a?c:4>a?b+(c-b)*(4-a):b};e=[h(b+2,g,f),h(b,g,f),h(b-2,g,f),a[3]]}return e},d.ColorConversion._rgbaToHSBA=function(a){var b,c,d=a[0],e=a[1],f=a[2],g=Math.max(d,e,f),h=g-Math.min(d,e,f);return 0===h?(b=0,c=0):(c=h/g,d===g?b=(e-f)/h:e===g?b=2+(f-d)/h:f===g&&(b=4+(d-e)/h),0>b?b+=6:b>=6&&(b-=6)),[b/6,c,g,a[3]]},d.ColorConversion._rgbaToHSLA=function(a){var b,c,d=a[0],e=a[1],f=a[2],g=Math.max(d,e,f),h=Math.min(d,e,f),i=g+h,j=g-h;return 0===j?(b=0,c=0):(c=1>i?j/i:j/(2-j),d===g?b=(e-f)/j:e===g?b=2+(f-d)/j:f===g&&(b=4+(d-e)/j),0>b?b+=6:b>=6&&(b-=6)),[b/6,c,i/2,a[3]]},b.exports=d.ColorConversion},{"../core/core":48}],41:[function(a,b,c){"use strict";var d=a("../core/core"),e=a("../core/constants");a("./p5.Color"),d.prototype.alpha=function(a){if(a instanceof d.Color||a instanceof Array)return this.color(a)._getAlpha();throw new Error("Needs p5.Color or pixel array as argument.")},d.prototype.blue=function(a){if(a instanceof d.Color||a instanceof Array)return this.color(a)._getBlue();throw new Error("Needs p5.Color or pixel array as argument.")},d.prototype.brightness=function(a){if(a instanceof d.Color||a instanceof Array)return this.color(a)._getBrightness();throw new Error("Needs p5.Color or pixel array as argument.")},d.prototype.color=function(){return arguments[0]instanceof d.Color?arguments[0]:arguments[0]instanceof Array?this instanceof d.Renderer?new d.Color(this,arguments[0]):new d.Color(this._renderer,arguments[0]):this instanceof d.Renderer?new d.Color(this,arguments):new d.Color(this._renderer,arguments)},d.prototype.green=function(a){if(a instanceof d.Color||a instanceof Array)return this.color(a)._getGreen();throw new Error("Needs p5.Color or pixel array as argument.")},d.prototype.hue=function(a){if(a instanceof d.Color||a instanceof Array)return this.color(a)._getHue();throw new Error("Needs p5.Color or pixel array as argument.")},d.prototype.lerpColor=function(a,b,c){var d,f,g,h,i,j,k=this._renderer._colorMode,l=this._renderer._colorMaxes;if(k===e.RGB)i=a.levels.map(function(a){return a/255}),j=b.levels.map(function(a){return a/255});else if(k===e.HSB)a._getBrightness(),b._getBrightness(),i=a.hsba,j=b.hsba;else{if(k!==e.HSL)throw new Error(k+"cannot be used for interpolation.");a._getLightness(),b._getLightness(),i=a.hsla,j=b.hsla}return c=Math.max(Math.min(c,1),0),d=this.lerp(i[0],j[0],c),f=this.lerp(i[1],j[1],c),g=this.lerp(i[2],j[2],c),h=this.lerp(i[3],j[3],c),d*=l[k][0],f*=l[k][1],g*=l[k][2],h*=l[k][3],this.color(d,f,g,h)},d.prototype.lightness=function(a){if(a instanceof d.Color||a instanceof Array)return this.color(a)._getLightness();throw new Error("Needs p5.Color or pixel array as argument.")},d.prototype.red=function(a){if(a instanceof d.Color||a instanceof Array)return this.color(a)._getRed();throw new Error("Needs p5.Color or pixel array as argument.")},d.prototype.saturation=function(a){if(a instanceof d.Color||a instanceof Array)return this.color(a)._getSaturation();throw new Error("Needs p5.Color or pixel array as argument.")},b.exports=d},{"../core/constants":47,"../core/core":48,"./p5.Color":42}],42:[function(a,b,c){var d=a("../core/core"),e=a("../core/constants"),f=a("./color_conversion");d.Color=function(a,b){if(this.mode=a._colorMode,this.maxes=a._colorMaxes,this.mode!==e.RGB&&this.mode!==e.HSL&&this.mode!==e.HSB)throw new Error(this.mode+" is an invalid colorMode."); -return this._array=d.Color._parseInputs.apply(a,b),this.levels=this._array.map(function(a){return Math.round(255*a)}),this},d.Color.prototype.toString=function(){var a=this.levels;return a[3]=this._array[3],"rgba("+a[0]+","+a[1]+","+a[2]+","+a[3]+")"},d.Color.prototype._getAlpha=function(){return this._array[3]*this.maxes[this.mode][3]},d.Color.prototype._getBlue=function(){return this._array[2]*this.maxes[e.RGB][2]},d.Color.prototype._getBrightness=function(){return this.hsba||(this.hsba=f._rgbaToHSBA(this._array)),this.hsba[2]*this.maxes[e.HSB][2]},d.Color.prototype._getGreen=function(){return this._array[1]*this.maxes[e.RGB][1]},d.Color.prototype._getHue=function(){return this.mode===e.HSB?(this.hsba||(this.hsba=f._rgbaToHSBA(this._array)),this.hsba[0]*this.maxes[e.HSB][0]):(this.hsla||(this.hsla=f._rgbaToHSLA(this._array)),this.hsla[0]*this.maxes[e.HSL][0])},d.Color.prototype._getLightness=function(){return this.hsla||(this.hsla=f._rgbaToHSLA(this._array)),this.hsla[2]*this.maxes[e.HSL][2]},d.Color.prototype._getRed=function(){return this._array[0]*this.maxes[e.RGB][0]},d.Color.prototype._getSaturation=function(){return this.mode===e.HSB?(this.hsba||(this.hsba=f._rgbaToHSBA(this._array)),this.hsba[1]*this.maxes[e.HSB][1]):(this.hsla||(this.hsla=f._rgbaToHSLA(this._array)),this.hsla[1]*this.maxes[e.HSL][1])};var g={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},h=/\s*/,i=/(\d{1,3})/,j=/((?:\d+(?:\.\d+)?)|(?:\.\d+))/,k=new RegExp(j.source+"%"),l={HEX3:/^#([a-f0-9])([a-f0-9])([a-f0-9])$/i,HEX6:/^#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})$/i,RGB:new RegExp(["^rgb\\(",i.source,",",i.source,",",i.source,"\\)$"].join(h.source),"i"),RGB_PERCENT:new RegExp(["^rgb\\(",k.source,",",k.source,",",k.source,"\\)$"].join(h.source),"i"),RGBA:new RegExp(["^rgba\\(",i.source,",",i.source,",",i.source,",",j.source,"\\)$"].join(h.source),"i"),RGBA_PERCENT:new RegExp(["^rgba\\(",k.source,",",k.source,",",k.source,",",j.source,"\\)$"].join(h.source),"i"),HSL:new RegExp(["^hsl\\(",i.source,",",k.source,",",k.source,"\\)$"].join(h.source),"i"),HSLA:new RegExp(["^hsla\\(",i.source,",",k.source,",",k.source,",",j.source,"\\)$"].join(h.source),"i"),HSB:new RegExp(["^hsb\\(",i.source,",",k.source,",",k.source,"\\)$"].join(h.source),"i"),HSBA:new RegExp(["^hsba\\(",i.source,",",k.source,",",k.source,",",j.source,"\\)$"].join(h.source),"i")};d.Color._parseInputs=function(){var a=arguments.length,b=this._colorMode,c=this._colorMaxes,h=[];if(a>=3)return h[0]=arguments[0]/c[b][0],h[1]=arguments[1]/c[b][1],h[2]=arguments[2]/c[b][2],"number"==typeof arguments[3]?h[3]=arguments[3]/c[b][3]:h[3]=1,h=h.map(function(a){return Math.max(Math.min(a,1),0)}),b===e.HSL?f._hslaToRGBA(h):b===e.HSB?f._hsbaToRGBA(h):h;if(1===a&&"string"==typeof arguments[0]){var i=arguments[0].trim().toLowerCase();if(g[i])return d.Color._parseInputs.apply(this,[g[i]]);if(l.HEX3.test(i))return h=l.HEX3.exec(i).slice(1).map(function(a){return parseInt(a+a,16)/255}),h[3]=1,h;if(l.HEX6.test(i))return h=l.HEX6.exec(i).slice(1).map(function(a){return parseInt(a,16)/255}),h[3]=1,h;if(l.RGB.test(i))return h=l.RGB.exec(i).slice(1).map(function(a){return a/255}),h[3]=1,h;if(l.RGB_PERCENT.test(i))return h=l.RGB_PERCENT.exec(i).slice(1).map(function(a){return parseFloat(a)/100}),h[3]=1,h;if(l.RGBA.test(i))return h=l.RGBA.exec(i).slice(1).map(function(a,b){return 3===b?parseFloat(a):a/255});if(l.RGBA_PERCENT.test(i))return h=l.RGBA_PERCENT.exec(i).slice(1).map(function(a,b){return 3===b?parseFloat(a):parseFloat(a)/100});if(l.HSL.test(i)?(h=l.HSL.exec(i).slice(1).map(function(a,b){return 0===b?parseInt(a,10)/360:parseInt(a,10)/100}),h[3]=1):l.HSLA.test(i)&&(h=l.HSLA.exec(i).slice(1).map(function(a,b){return 0===b?parseInt(a,10)/360:3===b?parseFloat(a):parseInt(a,10)/100})),h.length)return f._hslaToRGBA(h);if(l.HSB.test(i)?(h=l.HSB.exec(i).slice(1).map(function(a,b){return 0===b?parseInt(a,10)/360:parseInt(a,10)/100}),h[3]=1):l.HSBA.test(i)&&(h=l.HSBA.exec(i).slice(1).map(function(a,b){return 0===b?parseInt(a,10)/360:3===b?parseFloat(a):parseInt(a,10)/100})),h.length)return f._hsbaToRGBA(h);h=[1,1,1,1]}else{if(1!==a&&2!==a||"number"!=typeof arguments[0])throw new Error(arguments+"is not a valid color representation.");h[0]=arguments[0]/c[b][2],h[1]=arguments[0]/c[b][2],h[2]=arguments[0]/c[b][2],"number"==typeof arguments[1]?h[3]=arguments[1]/c[b][3]:h[3]=1,h=h.map(function(a){return Math.max(Math.min(a,1),0)})}return h},b.exports=d.Color},{"../core/constants":47,"../core/core":48,"./color_conversion":40}],43:[function(a,b,c){"use strict";var d=a("../core/core"),e=a("../core/constants");a("./p5.Color"),d.prototype.background=function(){return arguments[0]instanceof d.Image?this.image(arguments[0],0,0,this.width,this.height):this._renderer.background.apply(this._renderer,arguments),this},d.prototype.clear=function(){return this._renderer.clear(),this},d.prototype.colorMode=function(){if(arguments[0]===e.RGB||arguments[0]===e.HSB||arguments[0]===e.HSL){this._renderer._colorMode=arguments[0];var a=this._renderer._colorMaxes[this._renderer._colorMode];2===arguments.length?(a[0]=arguments[1],a[1]=arguments[1],a[2]=arguments[1],a[3]=arguments[1]):4===arguments.length?(a[0]=arguments[1],a[1]=arguments[2],a[2]=arguments[3]):5===arguments.length&&(a[0]=arguments[1],a[1]=arguments[2],a[2]=arguments[3],a[3]=arguments[4])}return this},d.prototype.fill=function(){return this._renderer._setProperty("_fillSet",!0),this._renderer._setProperty("_doFill",!0),this._renderer.fill.apply(this._renderer,arguments),this},d.prototype.noFill=function(){return this._renderer._setProperty("_doFill",!1),this},d.prototype.noStroke=function(){return this._renderer._setProperty("_doStroke",!1),this},d.prototype.stroke=function(){return this._renderer._setProperty("_strokeSet",!0),this._renderer._setProperty("_doStroke",!0),this._renderer.stroke.apply(this._renderer,arguments),this},b.exports=d},{"../core/constants":47,"../core/core":48,"./p5.Color":42}],44:[function(a,b,c){"use strict";var d=a("./core"),e=a("./constants");a("./error_helpers"),d.prototype.arc=function(a,b,c,d,f,g,h){for(var i=new Array(arguments.length),j=0;jf;)f+=e.TWO_PI;for(;0>g;)g+=e.TWO_PI;return f%=e.TWO_PI,g%=e.TWO_PI,f=f<=e.HALF_PI?Math.atan(c/d*Math.tan(f)):f>e.HALF_PI&&f<=3*e.HALF_PI?Math.atan(c/d*Math.tan(f))+e.PI:Math.atan(c/d*Math.tan(f))+e.TWO_PI,g=g<=e.HALF_PI?Math.atan(c/d*Math.tan(g)):g>e.HALF_PI&&g<=3*e.HALF_PI?Math.atan(c/d*Math.tan(g))+e.PI:Math.atan(c/d*Math.tan(g))+e.TWO_PI,f>g&&(g+=e.TWO_PI),c=Math.abs(c),d=Math.abs(d),this._renderer.arc(a,b,c,d,f,g,h),this},d.prototype.ellipse=function(a,b,c,d){for(var e=new Array(arguments.length),f=0;f=c-d)&&(this._renderer.isP3D&&this._renderer._update(),this._setProperty("frameCount",this.frameCount+1),this._updateMouseCoords(),this._updateTouchCoords(),this.redraw(),this._frameRate=1e3/(a-this._lastFrameTime),this._lastFrameTime=a),this._loop&&(this._requestAnimId=window.requestAnimationFrame(this._draw))}.bind(this),this._runFrames=function(){this._updateInterval&&clearInterval(this._updateInterval)}.bind(this),this._setProperty=function(a,b){this[a]=b,this._isGlobal&&(window[a]=b)}.bind(this),this.remove=function(){if(this._curElement){this._loop=!1,this._requestAnimId&&window.cancelAnimationFrame(this._requestAnimId);for(var a in this._events)window.removeEventListener(a,this._events[a]);for(var b=0;b-1)d=a;else if("string"==typeof a){var f="";b&&c&&"number"==typeof b&&"number"==typeof c&&(f=b+" "+c),d="http://"!==a.substring(0,6)?"url("+a+") "+f+", auto":/\.(cur|jpg|jpeg|gif|png|CUR|JPG|JPEG|GIF|PNG)$/.test(a)?"url("+a+") "+f+", auto":a}e.style.cursor=d},f.prototype.frameRate=function(a){return"number"!=typeof a||0>=a?this._frameRate:(this._setProperty("_targetFrameRate",a),this._runFrames(),this)},f.prototype.getFrameRate=function(){return this.frameRate()},f.prototype.setFrameRate=function(a){return this.frameRate(a)},f.prototype.noCursor=function(){this._curElement.elt.style.cursor="none"},f.prototype.displayWidth=screen.width,f.prototype.displayHeight=screen.height,f.prototype.windowWidth=window.innerWidth,f.prototype.windowHeight=window.innerHeight,f.prototype._onresize=function(a){this._setProperty("windowWidth",window.innerWidth),this._setProperty("windowHeight",window.innerHeight);var b,c=this._isGlobal?window:this;"function"==typeof c.windowResized&&(b=c.windowResized(a),void 0===b||b||a.preventDefault())},f.prototype.width=0,f.prototype.height=0,f.prototype.fullscreen=function(a){return"undefined"==typeof a?document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement:void(a?d(document.documentElement):e())},f.prototype.pixelDensity=function(a){return"number"!=typeof a?this._pixelDensity:(this._pixelDensity=a,void this.resizeCanvas(this.width,this.height,!0))},f.prototype.displayDensity=function(){return window.devicePixelRatio},f.prototype.getURL=function(){return location.href},f.prototype.getURLPath=function(){return location.pathname.split("/").filter(function(a){return""!==a})},f.prototype.getURLParams=function(){for(var a,b=/[?&]([^&=]+)(?:[&=])([^&=]+)/gim,c={};null!=(a=b.exec(location.search));)a.index===b.lastIndex&&b.lastIndex++,c[a[1]]=a[2];return c},b.exports=f},{"./constants":47,"./core":48}],51:[function(a,b,c){"use strict";function d(a,b,c){if(a.match(/^p5\./)){var d=a.split(".");return c instanceof i[d[1]]}return"Boolean"===a||a.toLowerCase()===b||r.indexOf(a)>-1&&q(c)}function e(a,b,c){j&&(f(),j=!1),"undefined"===o(c)?c="#B40033":"number"===o(c)&&(c=w[c])}function f(){var a="transparent",b="#ED225D",c="#ED225D",d="white";console.log("%c _ \n /\\| |/\\ \n \\ ` ' / \n / , . \\ \n \\/|_|\\/ \n\n%c> p5.js says: Welcome! This is your friendly debugger. To turn me off switch to using “p5.min.js”.","background-color:"+a+";color:"+b+";","background-color:"+c+";color:"+d+";")}function g(){var b={},c=function(a){return Object.getOwnPropertyNames(a).filter(function(a){return"_"===a[0]?!1:a in b?!1:(b[a]=!0,!0)}).map(function(b){var c;return c="function"==typeof a[b]?"function":b===b.toUpperCase()?"constant":"variable",{name:b,type:c}})};y=[].concat(c(i.prototype),c(a("./constants"))),y.sort(function(a,b){return b.name.length-a.name.length})}function h(a,b){b||(b=console.log.bind(console)),y||g(),y.some(function(c){return a.message&&-1!==a.message.indexOf(c.name)?(b("%cDid you just try to use p5.js's "+c.name+("function"===c.type?"() ":" ")+c.type+"? If so, you may want to move it into your sketch's setup() function.\n\nFor more details, see: "+z,"color: #B40033"),!0):void 0})}for(var i=a("./core"),j=!1,k={},l=k.toString,m=["Boolean","Number","String","Function","Array","Date","RegExp","Object","Error"],n=0;n=0},r=["Number","Integer","Number/Constant"],s=0,t=1,u=2,v=3,w=["#2D7BB6","#EE9900","#4DB200","#C83C00"];i.prototype._validateParameters=function(a,b,c){p(c[0])||(c=[c]);for(var f,g=Math.abs(b.length-c[0].length),h=0,i=1,j=c.length;j>i;i++){var k=Math.abs(b.length-c[i].length);g>=k&&(h=i,g=k)}var l="X";g>0&&(f="You wrote "+a+"(",b.length>0&&(f+=l+Array(b.length).join(","+l)),f+="). "+a+" was expecting "+c[h].length+" parameters. Try "+a+"(",c[h].length>0&&(f+=l+Array(c[h].length).join(","+l)),f+=").",c.length>1&&(f+=" "+a+" takes different numbers of parameters depending on what you want to do. Click this link to learn more: "),e(f,a,s));for(var m=0;m1&&(f+=" "+a+" takes different numbers of parameters depending on what you want to do. Click this link to learn more:"),e(f,a,u))}},i.prototype._validateParameters=function(){return!0};var x={0:{fileType:"image",method:"loadImage",message:" hosting the image online,"},1:{fileType:"XML file",method:"loadXML"},2:{fileType:"table file",method:"loadTable"},3:{fileType:"text file",method:"loadStrings"}};i._friendlyFileLoadError=function(a,b){var c=x[a],d="It looks like there was a problem loading your "+c.fileType+". Try checking if the file path%c ["+b+"] %cis correct,"+(c.message||"")+" or running a local server.";e(d,c.method,v)};var y=null,z="https://github.com/processing/p5.js/wiki/Frequently-Asked-Questions#why-cant-i-assign-variables-using-p5-functions-and-variables-before-setup";i.prototype._helpForMisusedAtTopLevelCode=h,"complete"!==document.readyState&&(window.addEventListener("error",h,!1),window.addEventListener("load",function(){window.removeEventListener("error",h,!1)})),b.exports=i},{"./constants":47,"./core":48}],52:[function(a,b,c){function d(a,b,c){var d=b.bind(c);c.elt.addEventListener(a,d,!1),c._events[a]=d}var e=a("./core");e.Element=function(a,b){this.elt=a,this._pInst=b,this._events={},this.width=this.elt.offsetWidth,this.height=this.elt.offsetHeight},e.Element.prototype.parent=function(a){return 0===arguments.length?this.elt.parentNode:("string"==typeof a?("#"===a[0]&&(a=a.substring(1)),a=document.getElementById(a)):a instanceof e.Element&&(a=a.elt),a.appendChild(this.elt),this)},e.Element.prototype.id=function(a){return 0===arguments.length?this.elt.id:(this.elt.id=a,this.width=this.elt.offsetWidth,this.height=this.elt.offsetHeight,this)},e.Element.prototype["class"]=function(a){return 0===arguments.length?this.elt.className:(this.elt.className=a,this.width=this.elt.offsetWidth,this.height=this.elt.offsetHeight,this)},e.Element.prototype.mousePressed=function(a){return d("mousedown",a,this),d("touchstart",a,this),this},e.Element.prototype.mouseWheel=function(a){return d("wheel",a,this),this},e.Element.prototype.mouseReleased=function(a){return d("mouseup",a,this),d("touchend",a,this),this},e.Element.prototype.mouseClicked=function(a){return d("click",a,this),this},e.Element.prototype.mouseMoved=function(a){return d("mousemove",a,this),d("touchmove",a,this),this},e.Element.prototype.mouseOver=function(a){return d("mouseover",a,this),this},e.Element.prototype.changed=function(a){return d("change",a,this),this},e.Element.prototype.input=function(a){return d("input",a,this),this},e.Element.prototype.mouseOut=function(a){return d("mouseout",a,this),this},e.Element.prototype.touchStarted=function(a){return d("touchstart",a,this),d("mousedown",a,this),this},e.Element.prototype.touchMoved=function(a){return d("touchmove",a,this),d("mousemove",a,this),this},e.Element.prototype.touchEnded=function(a){return d("touchend",a,this),d("mouseup",a,this),this},e.Element.prototype.dragOver=function(a){return d("dragover",a,this),this},e.Element.prototype.dragLeave=function(a){return d("dragleave",a,this),this},e.Element.prototype.drop=function(a,b){function c(b){var c=new e.File(b);return function(b){c.data=b.target.result,a(c)}}return window.File&&window.FileReader&&window.FileList&&window.Blob?(d("dragover",function(a){a.stopPropagation(),a.preventDefault()},this),d("dragleave",function(a){a.stopPropagation(),a.preventDefault()},this),arguments.length>1&&d("drop",b,this),d("drop",function(a){a.stopPropagation(),a.preventDefault();for(var b=a.dataTransfer.files,d=0;d-1?f.readAsText(e):f.readAsDataURL(e); -}},this)):console.log("The File APIs are not fully supported in this browser."),this},e.Element.prototype._setProperty=function(a,b){this[a]=b},b.exports=e.Element},{"./core":48}],53:[function(a,b,c){var d=a("./core"),e=a("./constants");d.Graphics=function(a,b,c,f){var g=c||e.P2D,h=document.createElement("canvas"),i=this._userNode||document.body;i.appendChild(h),d.Element.call(this,h,f,!1),this._styles=[],this.width=a,this.height=b,this._pixelDensity=f._pixelDensity,g===e.WEBGL?this._renderer=new d.Renderer3D(h,f,!1):this._renderer=new d.Renderer2D(h,f,!1),this._renderer.resize(a,b),this._renderer._applyDefaults(),f._elements.push(this);for(var j in d.prototype)this[j]||("function"==typeof d.prototype[j]?this[j]=d.prototype[j].bind(this):this[j]=d.prototype[j]);return this},d.Graphics.prototype=Object.create(d.Element.prototype),b.exports=d.Graphics},{"./constants":47,"./core":48}],54:[function(a,b,c){function d(a){var b=0,c=0;if(a.offsetParent){do b+=a.offsetLeft,c+=a.offsetTop;while(a=a.offsetParent)}else b+=a.offsetLeft,c+=a.offsetTop;return[b,c]}var e=a("./core"),f=a("../core/constants");e.Renderer=function(a,b,c){e.Element.call(this,a,b),this.canvas=a,this._pInst=b,c?(this._isMainCanvas=!0,this._pInst._setProperty("_curElement",this),this._pInst._setProperty("canvas",this.canvas),this._pInst._setProperty("width",this.width),this._pInst._setProperty("height",this.height)):(this.canvas.style.display="none",this._styles=[]),this._textSize=12,this._textLeading=15,this._textFont="sans-serif",this._textStyle=f.NORMAL,this._textAscent=null,this._textDescent=null,this._rectMode=f.CORNER,this._ellipseMode=f.CENTER,this._curveTightness=0,this._imageMode=f.CORNER,this._tint=null,this._doStroke=!0,this._doFill=!0,this._strokeSet=!1,this._fillSet=!1,this._colorMode=f.RGB,this._colorMaxes={rgb:[255,255,255,255],hsb:[360,100,100,1],hsl:[360,100,100,1]}},e.Renderer.prototype=Object.create(e.Element.prototype),e.Renderer.prototype.resize=function(a,b){this.width=a,this.height=b,this.elt.width=a*this._pInst._pixelDensity,this.elt.height=b*this._pInst._pixelDensity,this.elt.style.width=a+"px",this.elt.style.height=b+"px",this._isMainCanvas&&(this._pInst._setProperty("width",this.width),this._pInst._setProperty("height",this.height))},e.Renderer.prototype.textLeading=function(a){return arguments.length&&arguments[0]?(this._setProperty("_textLeading",a),this):this._textLeading},e.Renderer.prototype.textSize=function(a){return arguments.length&&arguments[0]?(this._setProperty("_textSize",a),this._setProperty("_textLeading",a*f._DEFAULT_LEADMULT),this._applyTextProperties()):this._textSize},e.Renderer.prototype.textStyle=function(a){return arguments.length&&arguments[0]?((a===f.NORMAL||a===f.ITALIC||a===f.BOLD)&&this._setProperty("_textStyle",a),this._applyTextProperties()):this._textStyle},e.Renderer.prototype.textAscent=function(){return null===this._textAscent&&this._updateTextMetrics(),this._textAscent},e.Renderer.prototype.textDescent=function(){return null===this._textDescent&&this._updateTextMetrics(),this._textDescent},e.Renderer.prototype._isOpenType=function(a){return a=a||this._textFont,"object"==typeof a&&a.font&&a.font.supported},e.Renderer.prototype._updateTextMetrics=function(){if(this._isOpenType())return this._setProperty("_textAscent",this._textFont._textAscent()),this._setProperty("_textDescent",this._textFont._textDescent()),this;var a=document.createElement("span");a.style.fontFamily=this._textFont,a.style.fontSize=this._textSize+"px",a.innerHTML="ABCjgq|";var b=document.createElement("div");b.style.display="inline-block",b.style.width="1px",b.style.height="0px";var c=document.createElement("div");c.appendChild(a),c.appendChild(b),c.style.height="0px",c.style.overflow="hidden",document.body.appendChild(c),b.style.verticalAlign="baseline";var e=d(b),f=d(a),g=e[1]-f[1];b.style.verticalAlign="bottom",e=d(b),f=d(a);var h=e[1]-f[1],i=h-g;return document.body.removeChild(c),this._setProperty("_textAscent",g),this._setProperty("_textDescent",i),this},b.exports=e.Renderer},{"../core/constants":47,"./core":48}],55:[function(a,b,c){var d=a("./core"),e=a("./canvas"),f=a("./constants"),g=a("../image/filters");a("./p5.Renderer");var h="rgba(0,0,0,0)";d.Renderer2D=function(a,b,c){return d.Renderer.call(this,a,b,c),this.drawingContext=this.canvas.getContext("2d"),this._pInst._setProperty("drawingContext",this.drawingContext),this},d.Renderer2D.prototype=Object.create(d.Renderer.prototype),d.Renderer2D.prototype._applyDefaults=function(){this.drawingContext.fillStyle=f._DEFAULT_FILL,this.drawingContext.strokeStyle=f._DEFAULT_STROKE,this.drawingContext.lineCap=f.ROUND,this.drawingContext.font="normal 12px sans-serif"},d.Renderer2D.prototype.resize=function(a,b){d.Renderer.prototype.resize.call(this,a,b),this.drawingContext.scale(this._pInst._pixelDensity,this._pInst._pixelDensity)},d.Renderer2D.prototype.background=function(){if(this.drawingContext.save(),this.drawingContext.setTransform(1,0,0,1,0,0),this.drawingContext.scale(this._pInst._pixelDensity,this._pInst._pixelDensity),arguments[0]instanceof d.Image)this._pInst.image(arguments[0],0,0,this.width,this.height);else{var a=this.drawingContext.fillStyle,b=this._pInst.color.apply(this,arguments),c=b.toString();this.drawingContext.fillStyle=c,this.drawingContext.fillRect(0,0,this.width,this.height),this.drawingContext.fillStyle=a}this.drawingContext.restore()},d.Renderer2D.prototype.clear=function(){this.drawingContext.clearRect(0,0,this.width,this.height)},d.Renderer2D.prototype.fill=function(){var a=this.drawingContext,b=this._pInst.color.apply(this,arguments);a.fillStyle=b.toString()},d.Renderer2D.prototype.stroke=function(){var a=this.drawingContext,b=this._pInst.color.apply(this,arguments);a.strokeStyle=b.toString()},d.Renderer2D.prototype.image=function(a,b,c,e,f,g,h,i,j){var k;try{this._tint&&(d.MediaElement&&a instanceof d.MediaElement&&a.loadPixels(),a.canvas&&(k=this._getTintedImageCanvas(a))),k||(k=a.canvas||a.elt),this.drawingContext.drawImage(k,b,c,e,f,g,h,i,j)}catch(l){if("NS_ERROR_NOT_AVAILABLE"!==l.name)throw l}},d.Renderer2D.prototype._getTintedImageCanvas=function(a){if(!a.canvas)return a;var b=g._toPixels(a.canvas),c=document.createElement("canvas");c.width=a.canvas.width,c.height=a.canvas.height;for(var d=c.getContext("2d"),e=d.createImageData(a.canvas.width,a.canvas.height),f=e.data,h=0;ha+c||0>b+e||a>this.width||b>this.height)return[0,0,0,255];var f=this._pInst||this,g=f._pixelDensity;if(this.loadPixels.call(f),a=Math.floor(a),b=Math.floor(b),1===c&&1===e)return[f.pixels[4*g*(b*this.width+a)],f.pixels[g*(4*(b*this.width+a)+1)],f.pixels[g*(4*(b*this.width+a)+2)],f.pixels[g*(4*(b*this.width+a)+3)]];var h=a*g,i=b*g,j=Math.min(c,f.width),k=Math.min(e,f.height),l=j*g,m=k*g,n=new d.Image(j,k);return n.canvas.getContext("2d").drawImage(this.canvas,h,i,l,m,0,0,j,k),n},d.Renderer2D.prototype.loadPixels=function(){var a=this._pixelDensity||this._pInst._pixelDensity,b=this.width*a,c=this.height*a,d=this.drawingContext.getImageData(0,0,b,c);this._pInst?(this._pInst._setProperty("imageData",d),this._pInst._setProperty("pixels",d.data)):(this._setProperty("imageData",d),this._setProperty("pixels",d.data))},d.Renderer2D.prototype.set=function(a,b,c){if(a=Math.floor(a),b=Math.floor(b),c instanceof d.Image)this.drawingContext.save(),this.drawingContext.setTransform(1,0,0,1,0,0),this.drawingContext.scale(this._pInst._pixelDensity,this._pInst._pixelDensity),this.drawingContext.drawImage(c.canvas,a,b),this.loadPixels.call(this._pInst),this.drawingContext.restore();else{var e=this._pInst||this,f=0,g=0,h=0,i=0,j=4*(b*e._pixelDensity*this.width*e._pixelDensity+a*e._pixelDensity);if(e.imageData||e.loadPixels.call(e),"number"==typeof c)jn;)o=Math.min(h-g,f.HALF_PI),p.push(this._acuteArcToBezier(g,o)),g+=o;return this._doFill&&(j.beginPath(),p.forEach(function(a,b){0===b&&j.moveTo(k.x+a.ax*l,k.y+a.ay*m),j.bezierCurveTo(k.x+a.bx*l,k.y+a.by*m,k.x+a.cx*l,k.y+a.cy*m,k.x+a.dx*l,k.y+a.dy*m)}),(i===f.PIE||null==i)&&j.lineTo(k.x,k.y),j.closePath(),j.fill()),this._doStroke&&(j.beginPath(),p.forEach(function(a,b){0===b&&j.moveTo(k.x+a.ax*l,k.y+a.ay*m),j.bezierCurveTo(k.x+a.bx*l,k.y+a.by*m,k.x+a.cx*l,k.y+a.cy*m,k.x+a.dx*l,k.y+a.dy*m)}),i===f.PIE?(j.lineTo(k.x,k.y),j.closePath()):i===f.CHORD&&j.closePath(),j.stroke()),this},d.Renderer2D.prototype.ellipse=function(a,b,c,d){var f=this.drawingContext,g=this._doFill,i=this._doStroke;if(g&&!i){if(f.fillStyle===h)return this}else if(!g&&i&&f.strokeStyle===h)return this;var j=e.modeAdjust(a,b,c,d,this._ellipseMode),k=.5522847498,l=j.w/2*k,m=j.h/2*k,n=j.x+j.w,o=j.y+j.h,p=j.x+j.w/2,q=j.y+j.h/2;f.beginPath(),f.moveTo(j.x,q),f.bezierCurveTo(j.x,q-m,p-l,j.y,p,j.y),f.bezierCurveTo(p+l,j.y,n,q-m,n,q),f.bezierCurveTo(n,q+m,p+l,o,p,o),f.bezierCurveTo(p-l,o,j.x,q+m,j.x,q),f.closePath(),g&&f.fill(),i&&f.stroke()},d.Renderer2D.prototype.line=function(a,b,c,d){var e=this.drawingContext;return this._doStroke?e.strokeStyle===h?this:(e.lineWidth%2===1&&e.translate(.5,.5),e.beginPath(),e.moveTo(a,b),e.lineTo(c,d),e.stroke(),e.lineWidth%2===1&&e.translate(-.5,-.5),this):this},d.Renderer2D.prototype.point=function(a,b){var c=this.drawingContext,d=c.strokeStyle,e=c.fillStyle;return this._doStroke?c.strokeStyle===h?this:(a=Math.round(a),b=Math.round(b),c.fillStyle=d,c.lineWidth>1?(c.beginPath(),c.arc(a,b,c.lineWidth/2,0,f.TWO_PI,!1),c.fill()):c.fillRect(a,b,1,1),void(c.fillStyle=e)):this},d.Renderer2D.prototype.quad=function(a,b,c,d,e,f,g,i){var j=this.drawingContext,k=this._doFill,l=this._doStroke;if(k&&!l){if(j.fillStyle===h)return this}else if(!k&&l&&j.strokeStyle===h)return this;return j.beginPath(),j.moveTo(a,b),j.lineTo(c,d),j.lineTo(e,f),j.lineTo(g,i),j.closePath(),k&&j.fill(),l&&j.stroke(),this},d.Renderer2D.prototype.rect=function(a,b,c,d,f,g,i,j){var k=this.drawingContext,l=this._doFill,m=this._doStroke;if(l&&!m){if(k.fillStyle===h)return this}else if(!l&&m&&k.strokeStyle===h)return this;var n=e.modeAdjust(a,b,c,d,this._rectMode);if(this._doStroke&&k.lineWidth%2===1&&k.translate(.5,.5),k.beginPath(),"undefined"==typeof f)k.rect(n.x,n.y,n.w,n.h);else{"undefined"==typeof g&&(g=f),"undefined"==typeof i&&(i=g),"undefined"==typeof j&&(j=i);var o=n.x,p=n.y,q=n.w,r=n.h,s=q/2,t=r/2;2*f>q&&(f=s),2*f>r&&(f=t),2*g>q&&(g=s),2*g>r&&(g=t),2*i>q&&(i=s),2*i>r&&(i=t),2*j>q&&(j=s),2*j>r&&(j=t),k.beginPath(),k.moveTo(o+f,p),k.arcTo(o+q,p,o+q,p+r,g),k.arcTo(o+q,p+r,o,p+r,i),k.arcTo(o,p+r,o,p,j),k.arcTo(o,p,o+q,p,f),k.closePath()}return this._doFill&&k.fill(),this._doStroke&&k.stroke(),this._doStroke&&k.lineWidth%2===1&&k.translate(-.5,-.5),this},d.Renderer2D.prototype.triangle=function(a,b,c,d,e,f){var g=this.drawingContext,i=this._doFill,j=this._doStroke;if(i&&!j){if(g.fillStyle===h)return this}else if(!i&&j&&g.strokeStyle===h)return this;g.beginPath(),g.moveTo(a,b),g.lineTo(c,d),g.lineTo(e,f),g.closePath(),i&&g.fill(),j&&g.stroke()},d.Renderer2D.prototype.endShape=function(a,b,c,d,e,g,h){if(0===b.length)return this;if(!this._doStroke&&!this._doFill)return this;var i,j=a===f.CLOSE;j&&!g&&b.push(b[0]);var k,l,m=b.length;if(!c||h!==f.POLYGON&&null!==h)if(!d||h!==f.POLYGON&&null!==h)if(!e||h!==f.POLYGON&&null!==h)if(h===f.POINTS)for(k=0;m>k;k++)i=b[k],this._doStroke&&this._pInst.stroke(i[6]),this._pInst.point(i[0],i[1]);else if(h===f.LINES)for(k=0;m>k+1;k+=2)i=b[k],this._doStroke&&this._pInst.stroke(b[k+1][6]),this._pInst.line(i[0],i[1],b[k+1][0],b[k+1][1]);else if(h===f.TRIANGLES)for(k=0;m>k+2;k+=3)i=b[k],this.drawingContext.beginPath(),this.drawingContext.moveTo(i[0],i[1]),this.drawingContext.lineTo(b[k+1][0],b[k+1][1]),this.drawingContext.lineTo(b[k+2][0],b[k+2][1]),this.drawingContext.lineTo(i[0],i[1]),this._doFill&&(this._pInst.fill(b[k+2][5]),this.drawingContext.fill()),this._doStroke&&(this._pInst.stroke(b[k+2][6]),this.drawingContext.stroke()),this.drawingContext.closePath();else if(h===f.TRIANGLE_STRIP)for(k=0;m>k+1;k++)i=b[k],this.drawingContext.beginPath(),this.drawingContext.moveTo(b[k+1][0],b[k+1][1]),this.drawingContext.lineTo(i[0],i[1]),this._doStroke&&this._pInst.stroke(b[k+1][6]),this._doFill&&this._pInst.fill(b[k+1][5]),m>k+2&&(this.drawingContext.lineTo(b[k+2][0],b[k+2][1]),this._doStroke&&this._pInst.stroke(b[k+2][6]),this._doFill&&this._pInst.fill(b[k+2][5])),this._doFillStrokeClose();else if(h===f.TRIANGLE_FAN){if(m>2)for(this.drawingContext.beginPath(),this.drawingContext.moveTo(b[0][0],b[0][1]),this.drawingContext.lineTo(b[1][0],b[1][1]),this.drawingContext.lineTo(b[2][0],b[2][1]),this._doFill&&this._pInst.fill(b[2][5]),this._doStroke&&this._pInst.stroke(b[2][6]),this._doFillStrokeClose(),k=3;m>k;k++)i=b[k],this.drawingContext.beginPath(),this.drawingContext.moveTo(b[0][0],b[0][1]),this.drawingContext.lineTo(b[k-1][0],b[k-1][1]),this.drawingContext.lineTo(i[0],i[1]),this._doFill&&this._pInst.fill(i[5]),this._doStroke&&this._pInst.stroke(i[6]),this._doFillStrokeClose()}else if(h===f.QUADS)for(k=0;m>k+3;k+=4){for(i=b[k],this.drawingContext.beginPath(),this.drawingContext.moveTo(i[0],i[1]),l=1;4>l;l++)this.drawingContext.lineTo(b[k+l][0],b[k+l][1]);this.drawingContext.lineTo(i[0],i[1]),this._doFill&&this._pInst.fill(b[k+3][5]),this._doStroke&&this._pInst.stroke(b[k+3][6]),this._doFillStrokeClose()}else if(h===f.QUAD_STRIP){if(m>3)for(k=0;m>k+1;k+=2)i=b[k],this.drawingContext.beginPath(),m>k+3?(this.drawingContext.moveTo(b[k+2][0],b[k+2][1]),this.drawingContext.lineTo(i[0],i[1]),this.drawingContext.lineTo(b[k+1][0],b[k+1][1]),this.drawingContext.lineTo(b[k+3][0],b[k+3][1]),this._doFill&&this._pInst.fill(b[k+3][5]),this._doStroke&&this._pInst.stroke(b[k+3][6])):(this.drawingContext.moveTo(i[0],i[1]),this.drawingContext.lineTo(b[k+1][0],b[k+1][1])),this._doFillStrokeClose()}else{for(this.drawingContext.beginPath(),this.drawingContext.moveTo(b[0][0],b[0][1]),k=1;m>k;k++)i=b[k],i.isVert&&(i.moveTo?this.drawingContext.moveTo(i[0],i[1]):this.drawingContext.lineTo(i[0],i[1]));this._doFillStrokeClose()}else{for(this.drawingContext.beginPath(),k=0;m>k;k++)b[k].isVert?b[k].moveTo?this.drawingContext.moveTo([0],b[k][1]):this.drawingContext.lineTo(b[k][0],b[k][1]):this.drawingContext.quadraticCurveTo(b[k][0],b[k][1],b[k][2],b[k][3]);this._doFillStrokeClose()}else{for(this.drawingContext.beginPath(),k=0;m>k;k++)b[k].isVert?b[k].moveTo?this.drawingContext.moveTo(b[k][0],b[k][1]):this.drawingContext.lineTo(b[k][0],b[k][1]):this.drawingContext.bezierCurveTo(b[k][0],b[k][1],b[k][2],b[k][3],b[k][4],b[k][5]);this._doFillStrokeClose()}else if(m>3){var n=[],o=1-this._curveTightness;for(this.drawingContext.beginPath(),this.drawingContext.moveTo(b[1][0],b[1][1]),k=1;m>k+2;k++)i=b[k],n[0]=[i[0],i[1]],n[1]=[i[0]+(o*b[k+1][0]-o*b[k-1][0])/6,i[1]+(o*b[k+1][1]-o*b[k-1][1])/6],n[2]=[b[k+1][0]+(o*b[k][0]-o*b[k+2][0])/6,b[k+1][1]+(o*b[k][1]-o*b[k+2][1])/6],n[3]=[b[k+1][0],b[k+1][1]],this.drawingContext.bezierCurveTo(n[1][0],n[1][1],n[2][0],n[2][1],n[3][0],n[3][1]);j&&this.drawingContext.lineTo(b[k+1][0],b[k+1][1]),this._doFillStrokeClose()}return c=!1,d=!1,e=!1,g=!1,j&&b.pop(),this},d.Renderer2D.prototype.noSmooth=function(){return"imageSmoothingEnabled"in this.drawingContext?this.drawingContext.imageSmoothingEnabled=!1:"mozImageSmoothingEnabled"in this.drawingContext?this.drawingContext.mozImageSmoothingEnabled=!1:"webkitImageSmoothingEnabled"in this.drawingContext?this.drawingContext.webkitImageSmoothingEnabled=!1:"msImageSmoothingEnabled"in this.drawingContext&&(this.drawingContext.msImageSmoothingEnabled=!1),this},d.Renderer2D.prototype.smooth=function(){return"imageSmoothingEnabled"in this.drawingContext?this.drawingContext.imageSmoothingEnabled=!0:"mozImageSmoothingEnabled"in this.drawingContext?this.drawingContext.mozImageSmoothingEnabled=!0:"webkitImageSmoothingEnabled"in this.drawingContext?this.drawingContext.webkitImageSmoothingEnabled=!0:"msImageSmoothingEnabled"in this.drawingContext&&(this.drawingContext.msImageSmoothingEnabled=!0),this},d.Renderer2D.prototype.strokeCap=function(a){return(a===f.ROUND||a===f.SQUARE||a===f.PROJECT)&&(this.drawingContext.lineCap=a),this},d.Renderer2D.prototype.strokeJoin=function(a){return(a===f.ROUND||a===f.BEVEL||a===f.MITER)&&(this.drawingContext.lineJoin=a),this},d.Renderer2D.prototype.strokeWeight=function(a){return"undefined"==typeof a||0===a?this.drawingContext.lineWidth=1e-4:this.drawingContext.lineWidth=a,this},d.Renderer2D.prototype._getFill=function(){return this.drawingContext.fillStyle},d.Renderer2D.prototype._getStroke=function(){return this.drawingContext.strokeStyle},d.Renderer2D.prototype.bezier=function(a,b,c,d,e,f,g,h){return this._pInst.beginShape(),this._pInst.vertex(a,b),this._pInst.bezierVertex(c,d,e,f,g,h),this._pInst.endShape(),this},d.Renderer2D.prototype.curve=function(a,b,c,d,e,f,g,h){return this._pInst.beginShape(),this._pInst.curveVertex(a,b),this._pInst.curveVertex(c,d),this._pInst.curveVertex(e,f),this._pInst.curveVertex(g,h),this._pInst.endShape(),this},d.Renderer2D.prototype._doFillStrokeClose=function(){this._doFill&&this.drawingContext.fill(),this._doStroke&&this.drawingContext.stroke(),this.drawingContext.closePath()},d.Renderer2D.prototype.applyMatrix=function(a,b,c,d,e,f){this.drawingContext.transform(a,b,c,d,e,f)},d.Renderer2D.prototype.resetMatrix=function(){return this.drawingContext.setTransform(1,0,0,1,0,0),this.drawingContext.scale(this._pInst._pixelDensity,this._pInst._pixelDensity),this},d.Renderer2D.prototype.rotate=function(a){this.drawingContext.rotate(a)},d.Renderer2D.prototype.scale=function(a,b){return this.drawingContext.scale(a,b),this},d.Renderer2D.prototype.shearX=function(a){return this._pInst._angleMode===f.DEGREES&&(a=this._pInst.radians(a)),this.drawingContext.transform(1,0,this._pInst.tan(a),1,0,0),this},d.Renderer2D.prototype.shearY=function(a){return this._pInst._angleMode===f.DEGREES&&(a=this._pInst.radians(a)),this.drawingContext.transform(1,this._pInst.tan(a),0,1,0,0),this},d.Renderer2D.prototype.translate=function(a,b){return this.drawingContext.translate(a,b),this},d.Renderer2D.prototype.text=function(a,b,c,d,e){var g,h,i,j,k,l,m,n,o,p,q=this._pInst,r=Number.MAX_VALUE;if(this._doFill||this._doStroke){if("string"!=typeof a&&(a=a.toString()),a=a.replace(/(\t)/g," "),g=a.split("\n"),"undefined"!=typeof d){for(o=0,i=0;id?(k=n[h]+" ",o+=q.textLeading()):k=l;switch(this._rectMode===f.CENTER&&(b-=d/2,c-=e/2),this.drawingContext.textAlign){case f.CENTER:b+=d/2;break;case f.RIGHT:b+=d}if("undefined"!=typeof e){switch(this.drawingContext.textBaseline){case f.BOTTOM:c+=e-o;break;case f._CTX_MIDDLE:c+=(e-o)/2;break;case f.BASELINE:p=!0,this.drawingContext.textBaseline=f.TOP}r=c+e-q.textAscent()}for(i=0;id&&k.length>0?(this._renderText(q,k,b,c,r),k=n[h]+" ",c+=q.textLeading()):k=l;this._renderText(q,k,b,c,r),c+=q.textLeading()}}else for(j=0;j=e?void 0:(a.push(),this._isOpenType()?this._textFont._renderPath(b,c,d,{renderer:this}):(this._doStroke&&this._strokeSet&&this.drawingContext.strokeText(b,c,d),this._doFill&&(this.drawingContext.fillStyle=this._fillSet?this.drawingContext.fillStyle:f._DEFAULT_TEXT_FILL,this.drawingContext.fillText(b,c,d))),a.pop(),a)},d.Renderer2D.prototype.textWidth=function(a){return this._isOpenType()?this._textFont._textWidth(a):this.drawingContext.measureText(a).width},d.Renderer2D.prototype.textAlign=function(a,b){if(arguments.length)return(a===f.LEFT||a===f.RIGHT||a===f.CENTER)&&(this.drawingContext.textAlign=a),(b===f.TOP||b===f.BOTTOM||b===f.CENTER||b===f.BASELINE)&&(b===f.CENTER?this.drawingContext.textBaseline=f._CTX_MIDDLE:this.drawingContext.textBaseline=b),this._pInst;var c=this.drawingContext.textBaseline;return c===f._CTX_MIDDLE&&(c=f.CENTER),{horizontal:this.drawingContext.textAlign,vertical:c}},d.Renderer2D.prototype._applyTextProperties=function(){var a,b=this._pInst;return this._setProperty("_textAscent",null),this._setProperty("_textDescent",null),a=this._textFont,this._isOpenType()&&(a=this._textFont.font.familyName,this._setProperty("_textStyle",this._textFont.font.styleName)),this.drawingContext.font=this._textStyle+" "+this._textSize+"px "+a,b},d.Renderer2D.prototype.push=function(){this.drawingContext.save()},d.Renderer2D.prototype.pop=function(){this.drawingContext.restore()},b.exports=d.Renderer2D},{"../image/filters":65,"./canvas":46,"./constants":47,"./core":48,"./p5.Renderer":54}],56:[function(a,b,c){var d=a("./core"),e=a("./constants");a("./p5.Graphics"),a("./p5.Renderer2D"),a("../3d/p5.Renderer3D");var f="defaultCanvas0";d.prototype.createCanvas=function(a,b,c){var g,h,i=c||e.P2D;if(arguments[3]&&(g="boolean"==typeof arguments[3]?arguments[3]:!1),i===e.WEBGL)h=document.getElementById(f),h&&h.parentNode.removeChild(h),h=document.createElement("canvas"),h.id=f;else if(g){h=document.createElement("canvas");for(var j=0;document.getElementById("defaultCanvas"+j);)j++;f="defaultCanvas"+j,h.id=f}else h=this.canvas;return this._setupDone||(h.className+=" p5_hidden",h.style.visibility="hidden"),this._userNode?this._userNode.appendChild(h):document.body.appendChild(h),i===e.WEBGL?(this._setProperty("_renderer",new d.Renderer3D(h,this,!0)),this._isdefaultGraphics=!0):this._isdefaultGraphics||(this._setProperty("_renderer",new d.Renderer2D(h,this,!0)),this._isdefaultGraphics=!0),this._renderer.resize(a,b),this._renderer._applyDefaults(),g&&this._elements.push(this._renderer),this._renderer},d.prototype.resizeCanvas=function(a,b,c){if(this._renderer){var d={};for(var e in this.drawingContext){var f=this.drawingContext[e];"object"!=typeof f&&"function"!=typeof f&&(d[e]=f)}this._renderer.resize(a,b);for(var g in d)this.drawingContext[g]=d[g];c||this.redraw()}},d.prototype.noCanvas=function(){this.canvas&&this.canvas.parentNode.removeChild(this.canvas)},d.prototype.createGraphics=function(a,b,c){return new d.Graphics(a,b,c,this)},d.prototype.blendMode=function(a){if(a!==e.BLEND&&a!==e.DARKEST&&a!==e.LIGHTEST&&a!==e.DIFFERENCE&&a!==e.MULTIPLY&&a!==e.EXCLUSION&&a!==e.SCREEN&&a!==e.REPLACE&&a!==e.OVERLAY&&a!==e.HARD_LIGHT&&a!==e.SOFT_LIGHT&&a!==e.DODGE&&a!==e.BURN&&a!==e.ADD&&a!==e.NORMAL)throw new Error("Mode "+a+" not recognized.");this._renderer.blendMode(a)},b.exports=d},{"../3d/p5.Renderer3D":36,"./constants":47,"./core":48,"./p5.Graphics":53,"./p5.Renderer2D":55}],57:[function(a,b,c){window.requestAnimationFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a,b){window.setTimeout(a,1e3/60)}}(),window.performance=window.performance||{},window.performance.now=function(){var a=Date.now();return window.performance.now||window.performance.mozNow||window.performance.msNow||window.performance.oNow||window.performance.webkitNow||function(){return Date.now()-a}}(),function(){"use strict";"undefined"==typeof Uint8ClampedArray||Uint8ClampedArray.prototype.slice||Object.defineProperty(Uint8ClampedArray.prototype,"slice",{value:Array.prototype.slice,writable:!0,configurable:!0,enumerable:!1})}()},{}],58:[function(a,b,c){"use strict";var d=a("./core");d.prototype.exit=function(){throw"exit() not implemented, see remove()"},d.prototype.noLoop=function(){this._loop=!1},d.prototype.loop=function(){this._loop=!0,this._draw()},d.prototype.push=function(){this._renderer.push(),this._styles.push({_doStroke:this._renderer._doStroke,_doFill:this._renderer._doFill,_tint:this._renderer._tint,_imageMode:this._renderer._imageMode,_rectMode:this._renderer._rectMode,_ellipseMode:this._renderer._ellipseMode,_colorMode:this._renderer._colorMode,_textFont:this._renderer._textFont,_textLeading:this._renderer._textLeading,_textSize:this._renderer._textSize,_textStyle:this._renderer._textStyle})},d.prototype.pop=function(){this._renderer.pop();var a=this._styles.pop();for(var b in a)this._renderer[b]=a[b]},d.prototype.pushStyle=function(){throw new Error("pushStyle() not used, see push()")},d.prototype.popStyle=function(){throw new Error("popStyle() not used, see pop()")},d.prototype.redraw=function(){var a=this.setup||window.setup,b=this.draw||window.draw;if("function"==typeof b){this.push(),"undefined"==typeof a&&this.scale(this._pixelDensity,this._pixelDensity);var c=this;this._registeredMethods.pre.forEach(function(a){a.call(c)}),b(),this._registeredMethods.post.forEach(function(a){a.call(c)}),this.pop()}},d.prototype.size=function(){var a="size() is not a valid p5 function, to set the size of the ";throw a+="drawing canvas, please use createCanvas() instead"},b.exports=d},{"./core":48}],59:[function(a,b,c){"use strict";var d=a("./core"),e=a("./constants");d.prototype.applyMatrix=function(a,b,c,d,e,f){return this._renderer.applyMatrix(a,b,c,d,e,f),this},d.prototype.popMatrix=function(){throw new Error("popMatrix() not used, see pop()")},d.prototype.printMatrix=function(){throw new Error("printMatrix() not implemented")},d.prototype.pushMatrix=function(){throw new Error("pushMatrix() not used, see push()")},d.prototype.resetMatrix=function(){return this._renderer.resetMatrix(),this},d.prototype.rotate=function(){var a=arguments[0];return this._angleMode===e.DEGREES&&(a=this.radians(a)),arguments.length>1?this._renderer.rotate(a,arguments[1]):this._renderer.rotate(a),this},d.prototype.rotateX=function(a){for(var b=new Array(arguments.length),c=0;c0))throw"vertex() must be used once before calling quadraticVertex()";k=!0;for(var i=[],j=0;jn||Math.abs(this.accelerationY-this.pAccelerationY)>n||Math.abs(this.accelerationZ-this.pAccelerationZ)>n)&&a();var b=this.deviceTurned||window.deviceTurned;if("function"==typeof b){var c=this.rotationX+180,d=this.pRotationX+180,p=h+180;c-d>0&&270>c-d||-270>c-d?k="clockwise":(0>c-d||c-d>270)&&(k="counter-clockwise"),k!==e&&(p=c),Math.abs(c-p)>90&&Math.abs(c-p)<270&&(p=c,this._setProperty("turnAxis","X"),b()),e=k,h=p-180;var q=this.rotationY+180,r=this.pRotationY+180,s=i+180;q-r>0&&270>q-r||-270>q-r?l="clockwise":(0>q-r||q-this.pRotationY>270)&&(l="counter-clockwise"),l!==f&&(s=q),Math.abs(q-s)>90&&Math.abs(q-s)<270&&(s=q,this._setProperty("turnAxis","Y"),b()),f=l,i=s-180,this.rotationZ-this.pRotationZ>0&&this.rotationZ-this.pRotationZ<270||this.rotationZ-this.pRotationZ<-270?m="clockwise":(this.rotationZ-this.pRotationZ<0||this.rotationZ-this.pRotationZ>270)&&(m="counter-clockwise"),m!==g&&(j=this.rotationZ),Math.abs(this.rotationZ-j)>90&&Math.abs(this.rotationZ-j)<270&&(j=this.rotationZ,this._setProperty("turnAxis","Z"),b()),g=m,this._setProperty("turnAxis",void 0)}var t=this.deviceShaken||window.deviceShaken;if("function"==typeof t){var u,v;null!==this.pAccelerationX&&(u=Math.abs(this.accelerationX-this.pAccelerationX),v=Math.abs(this.accelerationY-this.pAccelerationY)),u+v>o&&t()}},b.exports=d},{"../core/core":48}],62:[function(a,b,c){"use strict";var d=a("../core/core"),e={};d.prototype.isKeyPressed=!1,d.prototype.keyIsPressed=!1,d.prototype.key="",d.prototype.keyCode=0,d.prototype._onkeydown=function(a){if(!e[a.which]){this._setProperty("isKeyPressed",!0),this._setProperty("keyIsPressed",!0),this._setProperty("keyCode",a.which),e[a.which]=!0;var b=String.fromCharCode(a.which);b||(b=a.which),this._setProperty("key",b);var c=this.keyPressed||window.keyPressed;if("function"==typeof c&&!a.charCode){var d=c(a);d===!1&&a.preventDefault()}}},d.prototype._onkeyup=function(a){var b=this.keyReleased||window.keyReleased;this._setProperty("isKeyPressed",!1),this._setProperty("keyIsPressed",!1),this._setProperty("_lastKeyCodeTyped",null),e[a.which]=!1;var c=String.fromCharCode(a.which);if(c||(c=a.which),this._setProperty("key",c),this._setProperty("keyCode",a.which),"function"==typeof b){var d=b(a);d===!1&&a.preventDefault()}},d.prototype._onkeypress=function(a){if(a.which!==this._lastKeyCodeTyped){this._setProperty("keyCode",a.which),this._setProperty("_lastKeyCodeTyped",a.which),this._setProperty("key",String.fromCharCode(a.which));var b=this.keyTyped||window.keyTyped;if("function"==typeof b){var c=b(a);c===!1&&a.preventDefault()}}},d.prototype._onblur=function(a){e={}},d.prototype.keyIsDown=function(a){return e[a]},b.exports=d},{"../core/core":48}],63:[function(a,b,c){"use strict";function d(a,b){var c=a.getBoundingClientRect();return{x:b.clientX-c.left,y:b.clientY-c.top}}var e=a("../core/core"),f=a("../core/constants");e.prototype._nextMouseX=0,e.prototype._nextMouseY=0,e.prototype.mouseX=0,e.prototype.mouseY=0,e.prototype.pmouseX=0,e.prototype.pmouseY=0,e.prototype.winMouseX=0,e.prototype.winMouseY=0,e.prototype.pwinMouseX=0,e.prototype.pwinMouseY=0,e.prototype.mouseButton=0,e.prototype.mouseIsPressed=!1,e.prototype.isMousePressed=!1,e.prototype._updateNextMouseCoords=function(a){if("touchstart"===a.type||"touchmove"===a.type||"touchend"===a.type)this._setProperty("_nextMouseX",this._nextTouchX),this._setProperty("_nextMouseY",this._nextTouchY);else if(null!==this._curElement){var b=d(this._curElement.elt,a);this._setProperty("_nextMouseX",b.x),this._setProperty("_nextMouseY",b.y)}this._setProperty("winMouseX",a.pageX),this._setProperty("winMouseY",a.pageY)},e.prototype._updateMouseCoords=function(){this._setProperty("pmouseX",this.mouseX),this._setProperty("pmouseY",this.mouseY),this._setProperty("mouseX",this._nextMouseX),this._setProperty("mouseY",this._nextMouseY),this._setProperty("pwinMouseX",this.winMouseX),this._setProperty("pwinMouseY",this.winMouseY)},e.prototype._setMouseButton=function(a){1===a.button?this._setProperty("mouseButton",f.CENTER):2===a.button?this._setProperty("mouseButton",f.RIGHT):this._setProperty("mouseButton",f.LEFT)},e.prototype._onmousemove=function(a){var b,c=this._isGlobal?window:this;this._updateNextMouseCoords(a),this._updateNextTouchCoords(a),this.isMousePressed?"function"==typeof c.mouseDragged?(b=c.mouseDragged(a),b===!1&&a.preventDefault()):"function"==typeof c.touchMoved&&(b=c.touchMoved(a),b===!1&&a.preventDefault()):"function"==typeof c.mouseMoved&&(b=c.mouseMoved(a),b===!1&&a.preventDefault())},e.prototype._onmousedown=function(a){var b,c=this._isGlobal?window:this;this._setProperty("isMousePressed",!0),this._setProperty("mouseIsPressed",!0),this._setMouseButton(a),this._updateNextMouseCoords(a),this._updateNextTouchCoords(a),"function"==typeof c.mousePressed?(b=c.mousePressed(a),b===!1&&a.preventDefault()):"function"==typeof c.touchStarted&&(b=c.touchStarted(a),b===!1&&a.preventDefault())},e.prototype._onmouseup=function(a){var b,c=this._isGlobal?window:this;this._setProperty("isMousePressed",!1),this._setProperty("mouseIsPressed",!1),"function"==typeof c.mouseReleased?(b=c.mouseReleased(a),b===!1&&a.preventDefault()):"function"==typeof c.touchEnded&&(b=c.touchEnded(a),b===!1&&a.preventDefault())},e.prototype._ondragend=e.prototype._onmouseup,e.prototype._ondragover=e.prototype._onmousemove,e.prototype._onclick=function(a){var b=this._isGlobal?window:this;if("function"==typeof b.mouseClicked){var c=b.mouseClicked(a);c===!1&&a.preventDefault()}},e.prototype._onwheel=function(a){var b=this._isGlobal?window:this;if("function"==typeof b.mouseWheel){a.delta=a.deltaY;var c=b.mouseWheel(a);c===!1&&a.preventDefault()}},b.exports=e},{"../core/constants":47,"../core/core":48}],64:[function(a,b,c){"use strict";function d(a,b,c){c=c||0;var d=a.getBoundingClientRect(),e=b.touches[c]||b.changedTouches[c];return{x:e.clientX-d.left,y:e.clientY-d.top,id:e.identifier}}var e=a("../core/core");e.prototype._nextTouchX=0,e.prototype._nextTouchY=0,e.prototype.touchX=0,e.prototype.touchY=0,e.prototype.ptouchX=0,e.prototype.ptouchY=0,e.prototype.touches=[],e.prototype.touchIsDown=!1,e.prototype._updateNextTouchCoords=function(a){if("mousedown"===a.type||"mousemove"===a.type||"mouseup"===a.type)this._setProperty("_nextTouchX",this._nextMouseX),this._setProperty("_nextTouchY",this._nextMouseY);else if(null!==this._curElement){var b=d(this._curElement.elt,a,0);this._setProperty("_nextTouchX",b.x),this._setProperty("_nextTouchY",b.y);for(var c=[],e=0;eb?1:248>b?b:248,g!==b){g=b,h=1+g<<1,i=new Int32Array(h),j=new Array(h);for(var c=0;h>c;c++)j[c]=new Int32Array(256);for(var d,e,f,k,l=1,m=b-1;b>l;l++){i[b+l]=i[m]=e=m*m,f=j[b+l],k=j[m--];for(var n=0;256>n;n++)f[n]=k[n]=e*n}d=i[b]=b*b,f=j[b];for(var o=0;256>o;o++)f[o]=d*o}}function e(a,b){for(var c=f._toPixels(a),e=a.width,k=a.height,l=e*k,m=new Int32Array(l),n=0;l>n;n++)m[n]=f._getARGB(c,n);var o,p,q,r,s,t,u,v,w,x,y=new Int32Array(l),z=new Int32Array(l),A=new Int32Array(l),B=new Int32Array(l),C=0;d(b);var D,E,F,G;for(E=0;k>E;E++){for(D=0;e>D;D++){if(r=q=p=s=o=0,t=D-g,0>t)x=-t,t=0;else{if(t>=e)break;x=0}for(F=x;h>F&&!(t>=e);F++){var H=m[t+C];G=j[F],s+=G[(-16777216&H)>>>24],p+=G[(16711680&H)>>16],q+=G[(65280&H)>>8],r+=G[255&H],o+=i[F],t++}u=C+D,y[u]=s/o,z[u]=p/o,A[u]=q/o,B[u]=r/o}C+=e}for(C=0,v=-g,w=v*e,E=0;k>E;E++){for(D=0;e>D;D++){if(r=q=p=s=o=0,0>v)x=u=-v,t=D;else{if(v>=k)break;x=0,u=v,t=D+w}for(F=x;h>F&&!(u>=k);F++)G=j[F],s+=G[y[t]],p+=G[z[t]],q+=G[A[t]],r+=G[B[t]],o+=i[F],u++,t+=e;m[D+C]=s/o<<24|p/o<<16|q/o<<8|r/o}C+=e,w+=e,v++}f._setPixels(c,m)}var f={};f._toPixels=function(a){return a instanceof ImageData?a.data:a.getContext("2d").getImageData(0,0,a.width,a.height).data},f._getARGB=function(a,b){var c=4*b;return a[c+3]<<24&4278190080|a[c]<<16&16711680|a[c+1]<<8&65280|255&a[c+2]},f._setPixels=function(a,b){for(var c=0,d=0,e=a.length;e>d;d++)c=4*d,a[c+0]=(16711680&b[d])>>>16,a[c+1]=(65280&b[d])>>>8,a[c+2]=255&b[d],a[c+3]=(4278190080&b[d])>>>24},f._toImageData=function(a){return a instanceof ImageData?a:a.getContext("2d").getImageData(0,0,a.width,a.height)},f._createImageData=function(a,b){return f._tmpCanvas=document.createElement("canvas"),f._tmpCtx=f._tmpCanvas.getContext("2d"),this._tmpCtx.createImageData(a,b)},f.apply=function(a,b,c){var d=a.getContext("2d"),e=d.getImageData(0,0,a.width,a.height),f=b(e,c);f instanceof ImageData?d.putImageData(f,0,0,0,0,a.width,a.height):d.putImageData(e,0,0,0,0,a.width,a.height)},f.threshold=function(a,b){var c=f._toPixels(a);void 0===b&&(b=.5);for(var d=Math.floor(255*b),e=0;e=d?255:0,c[e]=c[e+1]=c[e+2]=g}},f.gray=function(a){for(var b=f._toPixels(a),c=0;cb||b>255)throw new Error("Level must be greater than 2 and less than 255 for posterize");for(var d=b-1,e=0;e>8)/d,c[e+1]=255*(h*b>>8)/d,c[e+2]=255*(i*b>>8)/d}},f.dilate=function(a){for(var b,c,d,e,g,h,i,j,k,l,m,n,o,p,q,r,s,t=f._toPixels(a),u=0,v=t.length?t.length/4:0,w=new Int32Array(v);v>u;)for(b=u,c=u+a.width;c>u;)d=e=f._getARGB(t,u),i=u-1,h=u+1,j=u-a.width,k=u+a.width,b>i&&(i=u),h>=c&&(h=u),0>j&&(j=0),k>=v&&(k=u),n=f._getARGB(t,j),m=f._getARGB(t,i),o=f._getARGB(t,k),l=f._getARGB(t,h),g=77*(d>>16&255)+151*(d>>8&255)+28*(255&d),q=77*(m>>16&255)+151*(m>>8&255)+28*(255&m),p=77*(l>>16&255)+151*(l>>8&255)+28*(255&l),r=77*(n>>16&255)+151*(n>>8&255)+28*(255&n),s=77*(o>>16&255)+151*(o>>8&255)+28*(255&o),q>g&&(e=m,g=q),p>g&&(e=l,g=p),r>g&&(e=n,g=r),s>g&&(e=o,g=s),w[u++]=e;f._setPixels(t,w)},f.erode=function(a){for(var b,c,d,e,g,h,i,j,k,l,m,n,o,p,q,r,s,t=f._toPixels(a),u=0,v=t.length?t.length/4:0,w=new Int32Array(v);v>u;)for(b=u,c=u+a.width;c>u;)d=e=f._getARGB(t,u),i=u-1,h=u+1,j=u-a.width,k=u+a.width,b>i&&(i=u),h>=c&&(h=u),0>j&&(j=0),k>=v&&(k=u),n=f._getARGB(t,j),m=f._getARGB(t,i),o=f._getARGB(t,k),l=f._getARGB(t,h),g=77*(d>>16&255)+151*(d>>8&255)+28*(255&d),q=77*(m>>16&255)+151*(m>>8&255)+28*(255&m),p=77*(l>>16&255)+151*(l>>8&255)+28*(255&l),r=77*(n>>16&255)+151*(n>>8&255)+28*(255&n),s=77*(o>>16&255)+151*(o>>8&255)+28*(255&o),g>q&&(e=m,g=q),g>p&&(e=l,g=p),g>r&&(e=n,g=r),g>s&&(e=o,g=s),w[u++]=e;f._setPixels(t,w)};var g,h,i,j;f.blur=function(a,b){e(a,b)},b.exports=f},{}],66:[function(a,b,c){"use strict";var d=a("../core/core"),e=[];d.prototype.createImage=function(a,b){return new d.Image(a,b)},d.prototype.saveCanvas=function(){var a,b,c;if(3===arguments.length?(a=arguments[0],b=arguments[1],c=arguments[2]):2===arguments.length?"object"==typeof arguments[0]?(a=arguments[0],b=arguments[1]):(b=arguments[0],c=arguments[1]):1===arguments.length&&("object"==typeof arguments[0]?a=arguments[0]:b=arguments[0]),a instanceof d.Element&&(a=a.elt),a instanceof HTMLCanvasElement||(a=null),c||(c=d.prototype._checkFileExtension(b,c)[1],""===c&&(c="png")),a||this._curElement&&this._curElement.elt&&(a=this._curElement.elt),d.prototype._isSafari()){var e="Hello, Safari user!\n";e+="Now capturing a screenshot...\n",e+="To save this image,\n",e+="go to File --> Save As.\n",alert(e),window.location.href=a.toDataURL()}else{var f;if("undefined"==typeof c)c="png",f="image/png";else switch(c){case"png":f="image/png";break;case"jpeg":f="image/jpeg";break;case"jpg":f="image/jpeg";break;default:f="image/png"}var g="image/octet-stream",h=a.toDataURL(f);h=h.replace(f,g),d.prototype.downloadFile(h,b,c)}},d.prototype.saveFrames=function(a,b,c,f,g){var h=c||3;h=d.prototype.constrain(h,0,15),h=1e3*h;var i=f||15;i=d.prototype.constrain(i,0,22);var j=0,k=d.prototype._makeFrame,l=this._curElement.elt,m=setInterval(function(){k(a+j,b,l),j++},1e3/i);setTimeout(function(){if(clearInterval(m),g)g(e);else for(var a=0;a0&&b>a?a:b}var e=a("../core/core"),f=a("./filters"),g=a("../core/canvas"),h=a("../core/constants");a("../core/error_helpers"),e.prototype.loadImage=function(a,b,c){var d=new Image,f=new e.Image(1,1,this),g=e._getDecrementPreload.apply(this,arguments);return d.onload=function(){f.width=f.canvas.width=d.width,f.height=f.canvas.height=d.height,f.drawingContext.drawImage(d,0,0),"function"==typeof b&&b(f),g&&b!==g&&g()},d.onerror=function(a){e._friendlyFileLoadError(0,d.src),"function"==typeof c&&c!==g&&c(a)},0!==a.indexOf("data:image/")&&(d.crossOrigin="Anonymous"),d.src=a,f},e.prototype.image=function(a,b,c,e,f,h,i,j,k){if(arguments.length<=5)if(h=b||0,i=c||0,b=0,c=0,a.elt&&a.elt.videoWidth&&!a.canvas){var l=a.elt.videoWidth,m=a.elt.videoHeight;j=e||a.elt.width,k=f||a.elt.width*m/l,e=l,f=m}else j=e||a.width,k=f||a.height,e=a.width,f=a.height;else{if(9!==arguments.length)throw"Wrong number of arguments to image()";b=b||0,c=c||0,e=d(e,a.width),f=d(f,a.height),h=h||0,i=i||0,j=j||a.width,k=k||a.height}var n=g.modeAdjust(h,i,j,k,this._renderer._imageMode);this._renderer.image(a,b,c,e,f,n.x,n.y,n.w,n.h)},e.prototype.tint=function(){var a=this.color.apply(this,arguments);this._renderer._tint=a.levels},e.prototype.noTint=function(){this._renderer._tint=null},e.prototype._getTintedImageCanvas=function(a){if(!a.canvas)return a;var b=f._toPixels(a.canvas),c=document.createElement("canvas");c.width=a.canvas.width,c.height=a.canvas.height;for(var d=c.getContext("2d"),e=d.createImageData(a.canvas.width,a.canvas.height),g=e.data,h=0;h0&&this.loadPixels()},d.Image.prototype.copy=function(){d.prototype.copy.apply(this,arguments)},d.Image.prototype.mask=function(a){void 0===a&&(a=this);var b=this.drawingContext.globalCompositeOperation,c=1;a instanceof d.Renderer&&(c=a._pInst._pixelDensity);var e=[a,0,0,c*a.width,c*a.height,0,0,this.width,this.height];this.drawingContext.globalCompositeOperation="destination-in",this.copy.apply(this,e),this.drawingContext.globalCompositeOperation=b},d.Image.prototype.filter=function(a,b){e.apply(this.canvas,e[a.toLowerCase()],b)},d.Image.prototype.blend=function(){d.prototype.blend.apply(this,arguments)},d.Image.prototype.save=function(a,b){var c;if(b)switch(b.toLowerCase()){case"png":c="image/png";break;case"jpeg":c="image/jpeg";break;case"jpg":c="image/jpeg";break;default:c="image/png"}else b="png",c="image/png";var e="image/octet-stream",f=this.canvas.toDataURL(c);f=f.replace(c,e),d.prototype.downloadFile(f,a,b)},d.Image.prototype.createTexture=function(a){return this},b.exports=d.Image},{"../core/core":48,"./filters":65}],69:[function(a,b,c){"use strict";var d=a("../core/core"),e=a("./filters");a("../color/p5.Color"),d.prototype.pixels=[],d.prototype.blend=function(){this._renderer.blend.apply(this._renderer,arguments)},d.prototype.copy=function(){d.Renderer2D._copyHelper.apply(this,arguments)},d.prototype.filter=function(a,b){e.apply(this.canvas,e[a.toLowerCase()],b)},d.prototype.get=function(a,b,c,d){return this._renderer.get(a,b,c,d)},d.prototype.loadPixels=function(){this._renderer.loadPixels()},d.prototype.set=function(a,b,c){this._renderer.set(a,b,c)},d.prototype.updatePixels=function(a,b,c,d){0!==this.pixels.length&&this._renderer.updatePixels(a,b,c,d)},b.exports=d},{"../color/p5.Color":42,"../core/core":48,"./filters":65}],70:[function(a,b,c){"use strict";function d(a,b){var c={};if(b=b||[],"undefined"==typeof b)for(var d=0;d/g,">").replace(/"/g,""").replace(/'/g,"'")}function f(a,b){b&&b!==!0&&"true"!==b||(b=""),a||(a="untitled");var c="";return a&&a.indexOf(".")>-1&&(c=a.split(".").pop()),b&&c!==b&&(c=b,a=a+"."+c),[a,c]}function g(a){document.body.removeChild(a.target)}var h=a("../core/core"),i=a("reqwest"),j=a("opentype.js");a("../core/error_helpers"),h._getDecrementPreload=function(){var a=arguments[arguments.length-1];return(window.preload||this&&this.preload)&&"function"==typeof a?a:null},h.prototype.loadFont=function(a,b,c){var d=new h.Font(this),e=h._getDecrementPreload.apply(this,arguments);return j.load(a,function(f,g){if(f){if("undefined"!=typeof c&&c!==e)return c(f);throw f}d.font=g,"undefined"!=typeof b&&b(d),e&&b!==e&&e();var h,i,j=["ttf","otf","woff","woff2"],k=a.split("\\").pop().split("/").pop(),l=k.lastIndexOf("."),m=1>l?null:k.substr(l+1);j.indexOf(m)>-1&&(h=k.substr(0,l),i=document.createElement("style"),i.appendChild(document.createTextNode("\n@font-face {\nfont-family: "+h+";\nsrc: url("+a+");\n}\n")),document.head.appendChild(i))}),d},h.prototype.createInput=function(){throw"not yet implemented"},h.prototype.createReader=function(){throw"not yet implemented"},h.prototype.loadBytes=function(){throw"not yet implemented"},h.prototype.loadJSON=function(){for(var a,b=arguments[0],c=arguments[1],d=h._getDecrementPreload.apply(this,arguments),e=[],f="json",g=2;g"),d.println("");var k=' "),d.println(""),d.println(" "),"0"!==f[0]){d.println(" ");for(var l=0;l"+m),d.println(" ")}d.println(" ")}for(var n=0;n");for(var o=0;o"+q),d.println(" ")}d.println(" ")}d.println("
"),d.println(""),d.print("")}d.close(),d.flush()},h.prototype.writeFile=function(a,b,c){var d="application/octet-stream";h.prototype._isSafari()&&(d="text/plain");var e=new Blob(a,{type:d}),f=window.URL.createObjectURL(e);h.prototype.downloadFile(f,b,c)},h.prototype.downloadFile=function(a,b,c){var d=f(b,c),e=d[0],i=d[1],j=document.createElement("a");if(j.href=a,j.download=e,j.onclick=g,j.style.display="none",document.body.appendChild(j),h.prototype._isSafari()){var k="Hello, Safari user! To download this file...\n";k+="1. Go to File --> Save As.\n",k+='2. Choose "Page Source" as the Format.\n',k+='3. Name it with this extension: ."'+i+'"',alert(k)}j.click(),a=null},h.prototype._checkFileExtension=f,h.prototype._isSafari=function(){var a=Object.prototype.toString.call(window.HTMLElement);return a.indexOf("Constructor")>0},b.exports=h},{"../core/core":48,"../core/error_helpers":51,"opentype.js":8,reqwest:27}],71:[function(a,b,c){"use strict";var d=a("../core/core");d.Table=function(a){this.columns=[],this.rows=[]},d.Table.prototype.addRow=function(a){var b=a||new d.TableRow;if("undefined"==typeof b.arr||"undefined"==typeof b.obj)throw"invalid TableRow: "+b;return b.table=this,this.rows.push(b),b},d.Table.prototype.removeRow=function(a){this.rows[a].table=null;var b=this.rows.splice(a+1,this.rows.length);this.rows.pop(),this.rows=this.rows.concat(b)},d.Table.prototype.getRow=function(a){return this.rows[a]},d.Table.prototype.getRows=function(){return this.rows},d.Table.prototype.findRow=function(a,b){if("string"==typeof b){for(var c=0;c=0))throw'This table has no column named "'+a+'"';d=b[a],e[d]=b}else e[f]=this.rows[f].obj;return e},d.Table.prototype.getArray=function(){for(var a=[],b=0;b=0))throw'This table has no column named "'+a+'"';this.obj[a]=b,this.arr[c]=b}else{if(!(ae;e++)d[e]=Math.random()}0>a&&(a=-a),0>b&&(b=-b),0>c&&(c=-c);for(var n,o,p,q,r,s=Math.floor(a),t=Math.floor(b),u=Math.floor(c),v=a-s,w=b-t,x=c-u,y=0,z=.5,A=0;k>A;A++){var B=s+(t<=1&&(s++,v--),w>=1&&(t++,w--),x>=1&&(u++,x--)}return y},e.prototype.noiseDetail=function(a,b){a>0&&(k=a),b>0&&(l=b)},e.prototype.noiseSeed=function(a){var b=function(){var a,b,c=4294967296,d=1664525,e=1013904223;return{setSeed:function(d){b=a=(null==d?Math.random()*c:d)>>>0},getSeed:function(){return a},rand:function(){return b=(d*b+e)%c,b/c}}}();b.setSeed(a),d=new Array(j+1);for(var c=0;j+1>c;c++)d[c]=b.rand()},b.exports=e},{"../core/core":48}],76:[function(a,b,c){"use strict";var d=a("../core/core"),e=a("./polargeometry"),f=a("../core/constants");d.Vector=function(){var a,b,c;arguments[0]instanceof d?(this.p5=arguments[0],a=arguments[1][0]||0,b=arguments[1][1]||0,c=arguments[1][2]||0):(a=arguments[0]||0,b=arguments[1]||0,c=arguments[2]||0),this.x=a,this.y=b,this.z=c},d.Vector.prototype.toString=function(){return"p5.Vector Object : ["+this.x+", "+this.y+", "+this.z+"]"},d.Vector.prototype.set=function(a,b,c){return a instanceof d.Vector?(this.x=a.x||0,this.y=a.y||0,this.z=a.z||0,this):a instanceof Array?(this.x=a[0]||0,this.y=a[1]||0,this.z=a[2]||0,this):(this.x=a||0,this.y=b||0,this.z=c||0,this)},d.Vector.prototype.copy=function(){return this.p5?new d.Vector(this.p5,[this.x,this.y,this.z]):new d.Vector(this.x,this.y,this.z)},d.Vector.prototype.add=function(a,b,c){return a instanceof d.Vector?(this.x+=a.x||0,this.y+=a.y||0,this.z+=a.z||0,this):a instanceof Array?(this.x+=a[0]||0,this.y+=a[1]||0,this.z+=a[2]||0,this):(this.x+=a||0,this.y+=b||0,this.z+=c||0,this)},d.Vector.prototype.sub=function(a,b,c){return a instanceof d.Vector?(this.x-=a.x||0,this.y-=a.y||0,this.z-=a.z||0,this):a instanceof Array?(this.x-=a[0]||0,this.y-=a[1]||0,this.z-=a[2]||0,this):(this.x-=a||0,this.y-=b||0,this.z-=c||0,this)},d.Vector.prototype.mult=function(a){return this.x*=a||0,this.y*=a||0,this.z*=a||0,this},d.Vector.prototype.div=function(a){return this.x/=a,this.y/=a,this.z/=a,this},d.Vector.prototype.mag=function(){return Math.sqrt(this.magSq())},d.Vector.prototype.magSq=function(){var a=this.x,b=this.y,c=this.z;return a*a+b*b+c*c},d.Vector.prototype.dot=function(a,b,c){return a instanceof d.Vector?this.dot(a.x,a.y,a.z):this.x*(a||0)+this.y*(b||0)+this.z*(c||0)},d.Vector.prototype.cross=function(a){var b=this.y*a.z-this.z*a.y,c=this.z*a.x-this.x*a.z,e=this.x*a.y-this.y*a.x;return this.p5?new d.Vector(this.p5,[b,c,e]):new d.Vector(b,c,e)},d.Vector.prototype.dist=function(a){var b=a.copy().sub(this);return b.mag()},d.Vector.prototype.normalize=function(){return this.div(this.mag())},d.Vector.prototype.limit=function(a){var b=this.magSq();return b>a*a&&(this.div(Math.sqrt(b)),this.mult(a)),this},d.Vector.prototype.setMag=function(a){return this.normalize().mult(a)},d.Vector.prototype.heading=function(){var a=Math.atan2(this.y,this.x);return this.p5?this.p5._angleMode===f.RADIANS?a:e.radiansToDegrees(a):a},d.Vector.prototype.rotate=function(a){this.p5&&this.p5._angleMode===f.DEGREES&&(a=e.degreesToRadians(a));var b=this.heading()+a,c=this.mag();return this.x=Math.cos(b)*c,this.y=Math.sin(b)*c,this},d.Vector.prototype.lerp=function(a,b,c,e){return a instanceof d.Vector?this.lerp(a.x,a.y,a.z,b):(this.x+=(a-this.x)*e||0,this.y+=(b-this.y)*e||0,this.z+=(c-this.z)*e||0,this)},d.Vector.prototype.array=function(){return[this.x||0,this.y||0,this.z||0]},d.Vector.prototype.equals=function(a,b,c){var e,f,g;return a instanceof d.Vector?(e=a.x||0,f=a.y||0,g=a.z||0):a instanceof Array?(e=a[0]||0,f=a[1]||0,g=a[2]||0):(e=a||0,f=b||0,g=c||0),this.x===e&&this.y===f&&this.z===g},d.Vector.fromAngle=function(a){return this.p5&&this.p5._angleMode===f.DEGREES&&(a=e.degreesToRadians(a)),this.p5?new d.Vector(this.p5,[Math.cos(a),Math.sin(a),0]):new d.Vector(Math.cos(a),Math.sin(a),0)},d.Vector.random2D=function(){var a;return a=this.p5?this.p5._angleMode===f.DEGREES?this.p5.random(360):this.p5.random(f.TWO_PI):Math.random()*Math.PI*2,this.fromAngle(a)},d.Vector.random3D=function(){var a,b;this.p5?(a=this.p5.random(0,f.TWO_PI),b=this.p5.random(-1,1)):(a=Math.random()*Math.PI*2,b=2*Math.random()-1);var c=Math.sqrt(1-b*b)*Math.cos(a),e=Math.sqrt(1-b*b)*Math.sin(a);return this.p5?new d.Vector(this.p5,[c,e,b]):new d.Vector(c,e,b)},d.Vector.add=function(a,b,c){return c?c.set(a):c=a.copy(),c.add(b),c},d.Vector.sub=function(a,b,c){return c?c.set(a):c=a.copy(),c.sub(b),c},d.Vector.mult=function(a,b,c){return c?c.set(a):c=a.copy(),c.mult(b),c},d.Vector.div=function(a,b,c){return c?c.set(a):c=a.copy(),c.div(b),c},d.Vector.dot=function(a,b){return a.dot(b)},d.Vector.cross=function(a,b){return a.cross(b)},d.Vector.dist=function(a,b){return a.dist(b)},d.Vector.lerp=function(a,b,c,d){return d?d.set(a):d=a.copy(),d.lerp(b,c),d},d.Vector.angleBetween=function(a,b){var c=Math.acos(a.dot(b)/(a.mag()*b.mag()));return this.p5&&this.p5._angleMode===f.DEGREES&&(c=e.radiansToDegrees(c)),c},b.exports=d.Vector},{"../core/constants":47,"../core/core":48,"./polargeometry":77}],77:[function(a,b,c){b.exports={degreesToRadians:function(a){return 2*Math.PI*a/360},radiansToDegrees:function(a){return 360*a/(2*Math.PI)}}},{}],78:[function(a,b,c){"use strict";var d=a("../core/core"),e=!1,f=function(){var a,b,c=4294967296,d=1664525,e=1013904223;return{setSeed:function(d){b=a=(null==d?Math.random()*c:d)>>>0},getSeed:function(){return a},rand:function(){return b=(d*b+e)%c,b/c}}}();d.prototype.randomSeed=function(a){f.setSeed(a),e=!0},d.prototype.random=function(a,b){var c;if(c=e?f.rand():Math.random(),0===arguments.length)return c;if(1===arguments.length)return c*a;if(a>b){var d=a;a=b,b=d}return c*(b-a)+a};var g,h=!1;d.prototype.randomGaussian=function(a,b){var c,d,e,f;if(h)c=g,h=!1;else{do d=this.random(2)-1,e=this.random(2)-1,f=d*d+e*e;while(f>=1);f=Math.sqrt(-2*Math.log(f)/f),c=d*f,g=e*f,h=!0}var i=a||0,j=b||1;return c*j+i},b.exports=d},{"../core/core":48}],79:[function(a,b,c){"use strict";var d=a("../core/core"),e=a("./polargeometry"),f=a("../core/constants");d.prototype._angleMode=f.RADIANS,d.prototype.acos=function(a){return this._angleMode===f.RADIANS?Math.acos(a):e.radiansToDegrees(Math.acos(a))},d.prototype.asin=function(a){return this._angleMode===f.RADIANS?Math.asin(a):e.radiansToDegrees(Math.asin(a))},d.prototype.atan=function(a){return this._angleMode===f.RADIANS?Math.atan(a):e.radiansToDegrees(Math.atan(a))},d.prototype.atan2=function(a,b){return this._angleMode===f.RADIANS?Math.atan2(a,b):e.radiansToDegrees(Math.atan2(a,b))},d.prototype.cos=function(a){return this._angleMode===f.RADIANS?Math.cos(a):Math.cos(this.radians(a))},d.prototype.sin=function(a){return this._angleMode===f.RADIANS?Math.sin(a):Math.sin(this.radians(a))},d.prototype.tan=function(a){return this._angleMode===f.RADIANS?Math.tan(a):Math.tan(this.radians(a))},d.prototype.degrees=function(a){return e.radiansToDegrees(a)},d.prototype.radians=function(a){return e.degreesToRadians(a)},d.prototype.angleMode=function(a){(a===f.DEGREES||a===f.RADIANS)&&(this._angleMode=a)},b.exports=d},{"../core/constants":47,"../core/core":48,"./polargeometry":77}],80:[function(a,b,c){"use strict";var d=a("../core/core");d.prototype.textAlign=function(a,b){return this._renderer.textAlign.apply(this._renderer,arguments)},d.prototype.textLeading=function(a){return this._renderer.textLeading.apply(this._renderer,arguments)},d.prototype.textSize=function(a){return this._renderer.textSize.apply(this._renderer,arguments)},d.prototype.textStyle=function(a){return this._renderer.textStyle.apply(this._renderer,arguments)},d.prototype.textWidth=function(a){return this._renderer.textWidth.apply(this._renderer,arguments)},d.prototype.textAscent=function(){return this._renderer.textAscent()},d.prototype.textDescent=function(){return this._renderer.textDescent()},d.prototype._updateTextMetrics=function(){return this._renderer._updateTextMetrics()},b.exports=d},{"../core/core":48}],81:[function(a,b,c){"use strict";var d=a("../core/core"),e=a("../core/constants");a("../core/error_helpers"),d.prototype.text=function(a,b,c,d,e){for(var f=new Array(arguments.length),g=0;gi;i+=f)g.push(n(a,i));return c.simplifyThreshold&&e(g,c.simplifyThreshold),g}function e(a,b){b="undefined"==typeof b?0:b;for(var c=0,d=a.length-1;a.length>3&&d>=0;--d)j(i(a,d-1),i(a,d),i(a,d+1),b)&&(a.splice(d%a.length,1),c++);return c}function f(a){for(var b,c=[],d=0;db?b%c+c:b%c]}function j(a,b,c,d){if(!d)return 0===k(a,b,c);"undefined"==typeof j.tmpPoint1&&(j.tmpPoint1=[],j.tmpPoint2=[]);var e=j.tmpPoint1,f=j.tmpPoint2;e.x=b.x-a.x,e.y=b.y-a.y,f.x=c.x-b.x,f.y=c.y-b.y;var g=e.x*f.x+e.y*f.y,h=Math.sqrt(e.x*e.x+e.y*e.y),i=Math.sqrt(f.x*f.x+f.y*f.y),l=Math.acos(g/(h*i));return d>l}function k(a,b,c){return(b[0]-a[0])*(c[1]-a[1])-(c[0]-a[0])*(b[1]-a[1])}function l(a,b,c,d,e,f,g,h,i){var j=1-i,k=Math.pow(j,3),l=Math.pow(j,2),m=i*i,n=m*i,o=k*a+3*l*i*c+3*j*i*i*e+n*g,p=k*b+3*l*i*d+3*j*i*i*f+n*h,q=a+2*i*(c-a)+m*(e-2*c+a),r=b+2*i*(d-b)+m*(f-2*d+b),s=c+2*i*(e-c)+m*(g-2*e+c),t=d+2*i*(f-d)+m*(h-2*f+d),u=j*a+i*c,v=j*b+i*d,w=j*e+i*g,x=j*f+i*h,y=90-180*Math.atan2(q-s,r-t)/Math.PI;return(q>s||t>r)&&(y+=180),{x:o,y:p,m:{x:q,y:r},n:{x:s,y:t},start:{x:u,y:v},end:{x:w,y:x},alpha:y}}function m(a,b,c,d,e,f,g,h,i){return null==i?u(a,b,c,d,e,f,g,h):l(a,b,c,d,e,f,g,h,v(a,b,c,d,e,f,g,h,i))}function n(a,b,c){a=p(a);for(var d,e,f,g,h,i="",j={},k=0,n=0,o=a.length;o>n;n++){if(f=a[n],"M"===f[0])d=+f[1],e=+f[2];else{if(g=m(d,e,f[1],f[2],f[3],f[4],f[5],f[6]),k+g>b&&!c)return h=m(d,e,f[1],f[2],f[3],f[4],f[5],f[6],b-k),{x:h.x,y:h.y,alpha:h.alpha};k+=g,d=+f[5],e=+f[6]}i+=f.shift()+f}return j.end=i,h=c?k:l(d,e,f[0],f[1],f[2],f[3],f[4],f[5],1),h.alpha&&(h={x:h.x,y:h.y,alpha:h.alpha}),h}function o(a){var b=[],c=0,d=0,e=0,f=0,g=0;"M"===a[0][0]&&(c=+a[0][1],d=+a[0][2],e=c,f=d,g++,b[0]=["M",c,d]);for(var h,i,j,k=3===a.length&&"M"===a[0][0]&&"R"===a[1][0].toUpperCase()&&"Z"===a[2][0].toUpperCase(),l=g,m=a.length;m>l;l++){if(b.push(i=[]),j=a[l],j[0]!==String.prototype.toUpperCase.call(j[0]))switch(i[0]=String.prototype.toUpperCase.call(j[0]),i[0]){case"A":i[1]=j[1],i[2]=j[2],i[3]=j[3],i[4]=j[4],i[5]=j[5],i[6]=+(j[6]+c),i[7]=+(j[7]+d);break;case"V":i[1]=+j[1]+d;break;case"H":i[1]=+j[1]+c;break;case"R":h=[c,d].concat(j.slice(1));for(var n=2,o=h.length;o>n;n++)h[n]=+h[n]+c,h[++n]=+h[n]+d;b.pop(),b=b.concat(r(h,k));break;case"M":e=+j[1]+c,f=+j[2]+d;break;default:for(n=1,o=j.length;o>n;n++)i[n]=+j[n]+(n%2?c:d)}else if("R"===j[0])h=[c,d].concat(j.slice(1)),b.pop(),b=b.concat(r(h,k)),i=["R"].concat(j.slice(-2));else for(var p=0,q=j.length;q>p;p++)i[p]=j[p];switch(i[0]){case"Z":c=e,d=f;break;case"H":c=i[1];break;case"V":d=i[1];break;case"M":e=i[i.length-2],f=i[i.length-1];break;default:c=i[i.length-2],d=i[i.length-1]}}return b}function p(a,b){for(var c=o(a),d=b&&o(b),e={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},f={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},g=(function(a,b,c){var d,e,f={T:1,Q:1};if(!a)return["C",b.x,b.y,b.x,b.y,b.x,b.y];switch(a[0]in f||(b.qx=b.qy=null),a[0]){case"M":b.X=a[1],b.Y=a[2];break;case"A":a=["C"].concat(q.apply(0,[b.x,b.y].concat(a.slice(1))));break;case"S":"C"===c||"S"===c?(d=2*b.x-b.bx,e=2*b.y-b.by):(d=b.x,e=b.y),a=["C",d,e].concat(a.slice(1));break;case"T":"Q"===c||"T"===c?(b.qx=2*b.x-b.qx,b.qy=2*b.y-b.qy):(b.qx=b.x,b.qy=b.y),a=["C"].concat(t(b.x,b.y,b.qx,b.qy,a[1],a[2]));break;case"Q":b.qx=a[1],b.qy=a[2],a=["C"].concat(t(b.x,b.y,a[1],a[2],a[3],a[4]));break;case"L":a=["C"].concat(s(b.x,b.y,a[1],a[2]));break;case"H":a=["C"].concat(s(b.x,b.y,a[1],b.y));break;case"V":a=["C"].concat(s(b.x,b.y,b.x,a[1]));break;case"Z":a=["C"].concat(s(b.x,b.y,b.X,b.Y))}return a}),h=function(a,b){if(a[b].length>7){a[b].shift();for(var e=a[b];e.length;)j[b]="A",d&&(k[b]="A"),a.splice(b++,0,["C"].concat(e.splice(0,6)));a.splice(b,1),p=Math.max(c.length,d&&d.length||0)}},i=function(a,b,e,f,g){a&&b&&"M"===a[g][0]&&"M"!==b[g][0]&&(b.splice(g,0,["M",f.x,f.y]),e.bx=0,e.by=0,e.x=a[g][1],e.y=a[g][2],p=Math.max(c.length,d&&d.length||0))},j=[],k=[],l="",m="",n=0,p=Math.max(c.length,d&&d.length||0);p>n;n++){c[n]&&(l=c[n][0]),"C"!==l&&(j[n]=l,n&&(m=j[n-1])),c[n]=g(c[n],e,m),"A"!==j[n]&&"C"===l&&(j[n]="C"),h(c,n),d&&(d[n]&&(l=d[n][0]),"C"!==l&&(k[n]=l,n&&(m=k[n-1])),d[n]=g(d[n],f,m),"A"!==k[n]&&"C"===l&&(k[n]="C"),h(d,n)),i(c,d,e,f,n),i(d,c,f,e,n);var r=c[n],u=d&&d[n],v=r.length,w=d&&u.length;e.x=r[v-2],e.y=r[v-1],e.bx=parseFloat(r[v-4])||e.x,e.by=parseFloat(r[v-3])||e.y,f.bx=d&&(parseFloat(u[w-4])||f.x),f.by=d&&(parseFloat(u[w-3])||f.y),f.x=d&&u[w-2],f.y=d&&u[w-1]}return d?[c,d]:c}function q(a,b,c,d,e,f,g,h,i,j){var k,l,m,n,o,p=Math.PI,r=120*p/180,s=p/180*(+e||0),t=[],u=function(a,b,c){var d=a*Math.cos(c)-b*Math.sin(c),e=a*Math.sin(c)+b*Math.cos(c);return{x:d,y:e}};if(j)k=j[0],l=j[1],m=j[2],n=j[3];else{o=u(a,b,-s),a=o.x,b=o.y,o=u(h,i,-s),h=o.x,i=o.y;var v=(a-h)/2,w=(b-i)/2,x=v*v/(c*c)+w*w/(d*d);x>1&&(x=Math.sqrt(x),c=x*c,d=x*d);var y=c*c,z=d*d,A=(f===g?-1:1)*Math.sqrt(Math.abs((y*z-y*w*w-z*v*v)/(y*w*w+z*v*v)));m=A*c*w/d+(a+h)/2,n=A*-d*v/c+(b+i)/2,k=Math.asin(((b-n)/d).toFixed(9)),l=Math.asin(((i-n)/d).toFixed(9)),k=m>a?p-k:k,l=m>h?p-l:l,0>k&&(k=2*p+k),0>l&&(l=2*p+l),g&&k>l&&(k-=2*p),!g&&l>k&&(l-=2*p)}var B=l-k;if(Math.abs(B)>r){var C=l,D=h,E=i;l=k+r*(g&&l>k?1:-1),h=m+c*Math.cos(l),i=n+d*Math.sin(l),t=q(h,i,c,d,e,0,g,D,E,[l,C,m,n])}B=l-k;var F=Math.cos(k),G=Math.sin(k),H=Math.cos(l),I=Math.sin(l),J=Math.tan(B/4),K=4/3*c*J,L=4/3*d*J,M=[a,b],N=[a+K*G,b-L*F],O=[h+K*I,i-L*H],P=[h,i];if(N[0]=2*M[0]-N[0],N[1]=2*M[1]-N[1],j)return[N,O,P].concat(t);t=[N,O,P].concat(t).join().split(",");for(var Q=[],R=0,S=t.length;S>R;R++)Q[R]=R%2?u(t[R-1],t[R],s).y:u(t[R],t[R+1],s).x;return Q}function r(a,b){for(var c=[],d=0,e=a.length;e-2*!b>d;d+=2){var f=[{x:+a[d-2],y:+a[d-1]},{x:+a[d],y:+a[d+1]},{x:+a[d+2],y:+a[d+3]},{x:+a[d+4],y:+a[d+5]}];b?d?e-4===d?f[3]={x:+a[0],y:+a[1]}:e-2===d&&(f[2]={x:+a[0],y:+a[1]},f[3]={x:+a[2],y:+a[3]}):f[0]={x:+a[e-2],y:+a[e-1]}:e-4===d?f[3]=f[2]:d||(f[0]={x:+a[d],y:+a[d+1]}),c.push(["C",(-f[0].x+6*f[1].x+f[2].x)/6,(-f[0].y+6*f[1].y+f[2].y)/6,(f[1].x+6*f[2].x-f[3].x)/6,(f[1].y+6*f[2].y-f[3].y)/6,f[2].x,f[2].y])}return c}function s(a,b,c,d){return[a,b,c,d,c,d]}function t(a,b,c,d,e,f){var g=1/3,h=2/3;return[g*a+h*c,g*b+h*d,g*e+h*c,g*f+h*d,e,f]}function u(a,b,c,d,e,f,g,h,i){null==i&&(i=1),i=i>1?1:0>i?0:i;for(var j=i/2,k=12,l=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],m=0,n=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],o=0;k>o;o++){var p=j*l[o]+j,q=w(p,a,c,e,g),r=w(p,b,d,f,h),s=q*q+r*r;m+=n[o]*Math.sqrt(s)}return j*m}function v(a,b,c,d,e,f,g,h,i){if(!(0>i||u(a,b,c,d,e,f,g,h)n;)l/=2,m+=(i>j?1:-1)*l,j=u(a,b,c,d,e,f,g,h,m);return m}}function w(a,b,c,d,e){var f=-3*b+9*c-9*d+3*e,g=a*f+6*b-12*c+6*d;return a*g-3*b+3*c}function x(){for(var a=new Array(arguments.length),b=0;b2?a=this._getPath(a,b,c,d):"object"==typeof b&&(d=b),d&&"number"==typeof d.decimals&&(e=d.decimals),a.toPathData(e)},y.Font.prototype._getSVG=function(a,b,c,d){var e=3;return"string"==typeof a&&arguments.length>2?a=this._getPath(a,b,c,d):"object"==typeof b&&(d=b),d&&("number"==typeof d.decimals&&(e=d.decimals),"number"==typeof d.strokeWidth&&(a.strokeWidth=d.strokeWidth),"undefined"!=typeof d.fill&&(a.fill=d.fill),"undefined"!=typeof d.stroke&&(a.stroke=d.stroke)),a.toSVG(e)},y.Font.prototype._renderPath=function(a,b,c,d){var e,f=d&&d.renderer||this.parent._renderer,g=f.drawingContext;e="object"==typeof a&&a.commands?a.commands:this._getPath(a,b,c,f._textSize,d).commands,g.beginPath();for(var h=0;h1;)d=Math.random()*f|0,e=a[--f],a[f]=a[d],a[d]=e;return a},d.prototype.sort=function(a,b){var c=b?a.slice(0,Math.min(b,a.length)):a,d=b?a.slice(Math.min(b,a.length)):[];return c="string"==typeof c[0]?c.sort():c.sort(function(a,b){return a-b}),c.concat(d)},d.prototype.splice=function(a,b,c){return Array.prototype.splice.apply(a,[c,0].concat(b)),a},d.prototype.subset=function(a,b,c){return"undefined"!=typeof c?a.slice(b,b+c):a.slice(b,a.length)},b.exports=d},{"../core/core":48}],84:[function(a,b,c){"use strict";var d=a("../core/core");d.prototype["float"]=function(a){return parseFloat(a)},d.prototype["int"]=function(a,b){return"string"==typeof a?(b=b||10,parseInt(a,b)):"number"==typeof a?0|a:"boolean"==typeof a?a?1:0:a instanceof Array?a.map(function(a){return d.prototype["int"](a,b)}):void 0},d.prototype.str=function(a){return a instanceof Array?a.map(d.prototype.str):String(a)},d.prototype["boolean"]=function(a){return"number"==typeof a?0!==a:"string"==typeof a?"true"===a.toLowerCase():"boolean"==typeof a?a:a instanceof Array?a.map(d.prototype["boolean"]):void 0},d.prototype["byte"]=function(a){var b=d.prototype["int"](a,10);return"number"==typeof b?(b+128)%256-128:b instanceof Array?b.map(d.prototype["byte"]):void 0},d.prototype["char"]=function(a){return"number"!=typeof a||isNaN(a)?a instanceof Array?a.map(d.prototype["char"]):"string"==typeof a?d.prototype["char"](parseInt(a,10)):void 0:String.fromCharCode(a)},d.prototype.unchar=function(a){return"string"==typeof a&&1===a.length?a.charCodeAt(0):a instanceof Array?a.map(d.prototype.unchar):void 0},d.prototype.hex=function(a,b){if(b=void 0===b||null===b?b=8:b,a instanceof Array)return a.map(function(a){return d.prototype.hex(a,b)});if("number"==typeof a){0>a&&(a=4294967295+a+1);for(var c=Number(a).toString(16).toUpperCase();c.length=b&&(c=c.substring(c.length-b,c.length)),c}},d.prototype.unhex=function(a){return a instanceof Array?a.map(d.prototype.unhex):parseInt("0x"+a,16)},b.exports=d},{"../core/core":48}],85:[function(a,b,c){"use strict";function d(){var a=arguments[0],b=0>a,c=b?a.toString().substring(1):a.toString(),d=c.indexOf("."),e=-1!==d?c.substring(0,d):c,f=-1!==d?c.substring(d+1):"",g=b?"-":"";if(3===arguments.length){var h="";(-1!==d||arguments[2]-f.length>0)&&(h="."),f.length>arguments[2]&&(f=f.substring(0,arguments[2]));for(var i=0;ic.length){c+=-1===b?".":"";for(var e=arguments[1]-c.length+1,f=0;e>f;f++)c+="0"}else c=c.substring(0,arguments[1]+1);return d+c}function f(){return parseFloat(arguments[0])>0?"+"+arguments[0].toString():arguments[0].toString()}function g(){return parseFloat(arguments[0])>0?" "+arguments[0].toString():arguments[0].toString()}var h=a("../core/core");h.prototype.join=function(a,b){return a.join(b)},h.prototype.match=function(a,b){return a.match(b)},h.prototype.matchAll=function(a,b){for(var c=new RegExp(b,"g"),d=c.exec(a),e=[];null!==d;)e.push(d),d=c.exec(a);return e},h.prototype.nf=function(){if(arguments[0]instanceof Array){var a=arguments[1],b=arguments[2];return arguments[0].map(function(c){return d(c,a,b)})}var c=Object.prototype.toString.call(arguments[0]);return"[object Arguments]"===c?3===arguments[0].length?this.nf(arguments[0][0],arguments[0][1],arguments[0][2]):2===arguments[0].length?this.nf(arguments[0][0],arguments[0][1]):this.nf(arguments[0][0]):d.apply(this,arguments)},h.prototype.nfc=function(){if(arguments[0]instanceof Array){var a=arguments[1];return arguments[0].map(function(b){return e(b,a)})}return e.apply(this,arguments)},h.prototype.nfp=function(){var a=this.nf.apply(this,arguments);return a instanceof Array?a.map(f):f(a)},h.prototype.nfs=function(){var a=this.nf.apply(this,arguments);return a instanceof Array?a.map(g):g(a)},h.prototype.split=function(a,b){return a.split(b)},h.prototype.splitTokens=function(){var a,b,c,d;return d=arguments[1],arguments.length>1?(c=/\]/g.exec(d),b=/\[/g.exec(d),b&&c?(d=d.slice(0,c.index)+d.slice(c.index+1),b=/\[/g.exec(d),d=d.slice(0,b.index)+d.slice(b.index+1),a=new RegExp("[\\["+d+"\\]]","g")):c?(d=d.slice(0,c.index)+d.slice(c.index+1),a=new RegExp("["+d+"\\]]","g")):b?(d=d.slice(0,b.index)+d.slice(b.index+1),a=new RegExp("["+d+"\\[]","g")):a=new RegExp("["+d+"]","g")):a=/\s/g,arguments[0].split(a).filter(function(a){return a})},h.prototype.trim=function(a){return a instanceof Array?a.map(this.trim):a.trim()},b.exports=h},{"../core/core":48}],86:[function(a,b,c){"use strict";var d=a("../core/core");d.prototype.day=function(){return(new Date).getDate()},d.prototype.hour=function(){return(new Date).getHours()},d.prototype.minute=function(){return(new Date).getMinutes()},d.prototype.millis=function(){return window.performance.now()},d.prototype.month=function(){return(new Date).getMonth()+1},d.prototype.second=function(){return(new Date).getSeconds()},d.prototype.year=function(){return(new Date).getFullYear()},b.exports=d},{"../core/core":48}]},{},[39])(39)});p5.prototype._validateParameters = function() {};p5.prototype._friendlyFileLoadError = function() {}; \ No newline at end of file +/*! p5.js v0.4.21 January 18, 2016 */ !function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.p5=a()}}(function(){var define,module,exports;return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g0,"No English "+b+" specified.")}var c=[],d=this;b("fontFamily"),b("weightName"),b("manufacturer"),b("copyright"),b("version"),a(this.unitsPerEm>0,"No unitsPerEm specified.")},d.prototype.toTables=function(){return f.fontToTable(this)},d.prototype.toBuffer=function(){for(var a=this.toTables(),b=a.encode(),c=new ArrayBuffer(b.length),d=new Uint8Array(c),e=0;eI;I+=1){var J=m.getTag(E,H),K=m.getULong(E,H+8);switch(J){case"cmap":D.tables.cmap=o.parse(E,K),D.encoding=new j.CmapEncoding(D.tables.cmap);break;case"fvar":e=K;break;case"head":D.tables.head=t.parse(E,K),D.unitsPerEm=D.tables.head.unitsPerEm,b=D.tables.head.indexToLocFormat;break;case"hhea":D.tables.hhea=u.parse(E,K),D.ascender=D.tables.hhea.ascender,D.descender=D.tables.hhea.descender,D.numberOfHMetrics=D.tables.hhea.numberOfHMetrics;break;case"hmtx":h=K;break;case"ltag":c=x.parse(E,K);break;case"maxp":D.tables.maxp=z.parse(E,K),D.numGlyphs=D.tables.maxp.numGlyphs;break;case"name":n=K;break;case"OS/2":D.tables.os2=B.parse(E,K);break;case"post":D.tables.post=C.parse(E,K),D.glyphNames=new j.GlyphNames(D.tables.post);break;case"glyf":f=K;break;case"loca":l=K;break;case"CFF ":d=K;break;case"kern":i=K;break;case"GPOS":g=K}H+=16}if(D.tables.name=A.parse(E,n,c),D.names=D.tables.name,f&&l){var L=0===b,M=y.parse(E,l,D.numGlyphs,L);D.glyphs=r.parse(E,f,M,D),v.parse(E,h,D.numberOfHMetrics,D.numGlyphs,D.glyphs),j.addGlyphNames(D)}else{if(!d)throw new Error("Font doesn't contain TrueType or CFF outlines.");p.parse(E,d,D),j.addGlyphNames(D)}return i?D.kerningPairs=w.parse(E,i):D.kerningPairs={},g&&s.parse(E,g,D),e&&(D.tables.fvar=q.parse(E,e,D.names)),D}function h(a,b){var c="undefined"==typeof window,d=c?e:f;d(a,function(a,c){if(a)return b(a);var d=g(c);return b(null,d)})}function i(b){var c=a("fs"),e=c.readFileSync(b);return g(d(e))}var j=a("./encoding"),k=a("./font"),l=a("./glyph"),m=a("./parse"),n=a("./path"),o=a("./tables/cmap"),p=a("./tables/cff"),q=a("./tables/fvar"),r=a("./tables/glyf"),s=a("./tables/gpos"),t=a("./tables/head"),u=a("./tables/hhea"),v=a("./tables/hmtx"),w=a("./tables/kern"),x=a("./tables/ltag"),y=a("./tables/loca"),z=a("./tables/maxp"),A=a("./tables/name"),B=a("./tables/os2"),C=a("./tables/post");c._parse=m,c.Font=k.Font,c.Glyph=l.Glyph,c.Path=n.Path,c.parse=g,c.load=h,c.loadSync=i},{"./encoding":4,"./font":5,"./glyph":6,"./parse":9,"./path":10,"./tables/cff":12,"./tables/cmap":13,"./tables/fvar":14,"./tables/glyf":15,"./tables/gpos":16,"./tables/head":17,"./tables/hhea":18,"./tables/hmtx":19,"./tables/kern":20,"./tables/loca":21,"./tables/ltag":22,"./tables/maxp":23,"./tables/name":24,"./tables/os2":25,"./tables/post":26,fs:1}],9:[function(a,b,c){"use strict";function d(a,b){this.data=a,this.offset=b,this.relativeOffset=0}c.getByte=function(a,b){return a.getUint8(b)},c.getCard8=c.getByte,c.getUShort=function(a,b){return a.getUint16(b,!1)},c.getCard16=c.getUShort,c.getShort=function(a,b){return a.getInt16(b,!1)},c.getULong=function(a,b){return a.getUint32(b,!1)},c.getFixed=function(a,b){var c=a.getInt16(b,!1),d=a.getUint16(b+2,!1);return c+d/65535},c.getTag=function(a,b){for(var c="",d=b;b+4>d;d+=1)c+=String.fromCharCode(a.getInt8(d));return c},c.getOffset=function(a,b,c){for(var d=0,e=0;c>e;e+=1)d<<=8,d+=a.getUint8(b+e);return d},c.getBytes=function(a,b,c){for(var d=[],e=b;c>e;e+=1)d.push(a.getUint8(e));return d},c.bytesToString=function(a){for(var b="",c=0;cf;f++)b[f]=c.getUShort(d,e),e+=2;return this.relativeOffset+=2*a,b},d.prototype.parseString=function(a){var b=this.data,c=this.offset+this.relativeOffset,d="";this.relativeOffset+=a;for(var e=0;a>e;e++)d+=String.fromCharCode(b.getUint8(c+e));return d},d.prototype.parseTag=function(){return this.parseString(4)},d.prototype.parseLongDateTime=function(){var a=c.getULong(this.data,this.offset+this.relativeOffset+4);return this.relativeOffset+=8,a},d.prototype.parseFixed=function(){var a=c.getULong(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,a/65536},d.prototype.parseVersion=function(){var a=c.getUShort(this.data,this.offset+this.relativeOffset),b=c.getUShort(this.data,this.offset+this.relativeOffset+2);return this.relativeOffset+=4,a+b/4096/10},d.prototype.skip=function(a,b){void 0===b&&(b=1),this.relativeOffset+=e[a]*b},c.Parser=d},{}],10:[function(a,b,c){"use strict";function d(){this.commands=[],this.fill="black",this.stroke=null,this.strokeWidth=1}d.prototype.moveTo=function(a,b){this.commands.push({type:"M",x:a,y:b})},d.prototype.lineTo=function(a,b){this.commands.push({type:"L",x:a,y:b})},d.prototype.curveTo=d.prototype.bezierCurveTo=function(a,b,c,d,e,f){this.commands.push({type:"C",x1:a,y1:b,x2:c,y2:d,x:e,y:f})},d.prototype.quadTo=d.prototype.quadraticCurveTo=function(a,b,c,d){this.commands.push({type:"Q",x1:a,y1:b,x:c,y:d})},d.prototype.close=d.prototype.closePath=function(){this.commands.push({type:"Z"})},d.prototype.extend=function(a){a.commands&&(a=a.commands),Array.prototype.push.apply(this.commands,a)},d.prototype.draw=function(a){a.beginPath();for(var b=0;b=0&&c>0&&(a+=" "),a+=b(d)}return a}a=void 0!==a?a:2;for(var d="",e=0;ed;d+=1)g.push(J.getOffset(a,k,j)),k+=j;f=e+g[i]}else f=b+2;for(d=0;d>4,g=15&e;if(f===c)break;if(b+=d[f],g===c)break;b+=d[g]}return parseFloat(b)}function g(a,b){var c,d,e,g;if(28===b)return c=a.parseByte(),d=a.parseByte(),c<<8|d;if(29===b)return c=a.parseByte(),d=a.parseByte(),e=a.parseByte(),g=a.parseByte(),c<<24|d<<16|e<<8|g;if(30===b)return f(a);if(b>=32&&246>=b)return b-139;if(b>=247&&250>=b)return c=a.parseByte(),256*(b-247)+c+108;if(b>=251&&254>=b)return c=a.parseByte(),256*-(b-251)-c-108;throw new Error("Invalid b0 "+b)}function h(a){for(var b={},c=0;c=i?(12===i&&(i=1200+d.parseByte()),e.push([i,f]),f=[]):f.push(g(d,i))}return h(e)}function j(a,b){return b=390>=b?H.cffStandardStrings[b]:a[b-391]}function k(a,b,c){for(var d={},e=0;ee;e+=1)f=h.parseSID(),i.push(j(d,f));else if(1===k)for(;i.length<=c;)for(f=h.parseSID(),g=h.parseCard8(),e=0;g>=e;e+=1)i.push(j(d,f)),f+=1;else{if(2!==k)throw new Error("Unknown charset format "+k);for(;i.length<=c;)for(f=h.parseSID(),g=h.parseCard16(),e=0;g>=e;e+=1)i.push(j(d,f)),f+=1}return i}function p(a,b,c){var d,e,f={},g=new J.Parser(a,b),h=g.parseCard8();if(0===h){var i=g.parseCard8();for(d=0;i>d;d+=1)e=g.parseCard8(), +f[e]=d}else{if(1!==h)throw new Error("Unknown encoding format "+h);var j=g.parseCard8();for(e=1,d=0;j>d;d+=1)for(var k=g.parseCard8(),l=g.parseCard8(),m=k;k+l>=m;m+=1)f[m]=e,e+=1}return new H.CffEncoding(f,c)}function q(a,b,c){function d(a,b){p&&k.closePath(),k.moveTo(a,b),p=!0}function e(){var b;b=l.length%2!==0,b&&!n&&(o=l.shift()+a.nominalWidthX),m+=l.length>>1,l.length=0,n=!0}function f(c){for(var s,t,u,v,w,x,y,z,A,B,C,D,E=0;E1&&!n&&(o=l.shift()+a.nominalWidthX,n=!0),r+=l.pop(),d(q,r);break;case 5:for(;l.length>0;)q+=l.shift(),r+=l.shift(),k.lineTo(q,r);break;case 6:for(;l.length>0&&(q+=l.shift(),k.lineTo(q,r),0!==l.length);)r+=l.shift(),k.lineTo(q,r);break;case 7:for(;l.length>0&&(r+=l.shift(),k.lineTo(q,r),0!==l.length);)q+=l.shift(),k.lineTo(q,r);break;case 8:for(;l.length>0;)g=q+l.shift(),h=r+l.shift(),i=g+l.shift(),j=h+l.shift(),q=i+l.shift(),r=j+l.shift(),k.curveTo(g,h,i,j,q,r);break;case 10:w=l.pop()+a.subrsBias,x=a.subrs[w],x&&f(x);break;case 11:return;case 12:switch(F=c[E],E+=1,F){case 35:g=q+l.shift(),h=r+l.shift(),i=g+l.shift(),j=h+l.shift(),y=i+l.shift(),z=j+l.shift(),A=y+l.shift(),B=z+l.shift(),C=A+l.shift(),D=B+l.shift(),q=C+l.shift(),r=D+l.shift(),l.shift(),k.curveTo(g,h,i,j,y,z),k.curveTo(A,B,C,D,q,r);break;case 34:g=q+l.shift(),h=r,i=g+l.shift(),j=h+l.shift(),y=i+l.shift(),z=j,A=y+l.shift(),B=j,C=A+l.shift(),D=r,q=C+l.shift(),k.curveTo(g,h,i,j,y,z),k.curveTo(A,B,C,D,q,r);break;case 36:g=q+l.shift(),h=r+l.shift(),i=g+l.shift(),j=h+l.shift(),y=i+l.shift(),z=j,A=y+l.shift(),B=j,C=A+l.shift(),D=B+l.shift(),q=C+l.shift(),k.curveTo(g,h,i,j,y,z),k.curveTo(A,B,C,D,q,r);break;case 37:g=q+l.shift(),h=r+l.shift(),i=g+l.shift(),j=h+l.shift(),y=i+l.shift(),z=j+l.shift(),A=y+l.shift(),B=z+l.shift(),C=A+l.shift(),D=B+l.shift(),Math.abs(C-q)>Math.abs(D-r)?q=C+l.shift():r=D+l.shift(),k.curveTo(g,h,i,j,y,z),k.curveTo(A,B,C,D,q,r);break;default:console.log("Glyph "+b.index+": unknown operator 1200"+F),l.length=0}break;case 14:l.length>0&&!n&&(o=l.shift()+a.nominalWidthX,n=!0),p&&(k.closePath(),p=!1);break;case 18:e();break;case 19:case 20:e(),E+=m+7>>3;break;case 21:l.length>2&&!n&&(o=l.shift()+a.nominalWidthX,n=!0),r+=l.pop(),q+=l.pop(),d(q,r);break;case 22:l.length>1&&!n&&(o=l.shift()+a.nominalWidthX,n=!0),q+=l.pop(),d(q,r);break;case 23:e();break;case 24:for(;l.length>2;)g=q+l.shift(),h=r+l.shift(),i=g+l.shift(),j=h+l.shift(),q=i+l.shift(),r=j+l.shift(),k.curveTo(g,h,i,j,q,r);q+=l.shift(),r+=l.shift(),k.lineTo(q,r);break;case 25:for(;l.length>6;)q+=l.shift(),r+=l.shift(),k.lineTo(q,r);g=q+l.shift(),h=r+l.shift(),i=g+l.shift(),j=h+l.shift(),q=i+l.shift(),r=j+l.shift(),k.curveTo(g,h,i,j,q,r);break;case 26:for(l.length%2&&(q+=l.shift());l.length>0;)g=q,h=r+l.shift(),i=g+l.shift(),j=h+l.shift(),q=i,r=j+l.shift(),k.curveTo(g,h,i,j,q,r);break;case 27:for(l.length%2&&(r+=l.shift());l.length>0;)g=q+l.shift(),h=r,i=g+l.shift(),j=h+l.shift(),q=i+l.shift(),r=j,k.curveTo(g,h,i,j,q,r);break;case 28:s=c[E],t=c[E+1],l.push((s<<24|t<<16)>>16),E+=2;break;case 29:w=l.pop()+a.gsubrsBias,x=a.gsubrs[w],x&&f(x);break;case 30:for(;l.length>0&&(g=q,h=r+l.shift(),i=g+l.shift(),j=h+l.shift(),q=i+l.shift(),r=j+(1===l.length?l.shift():0),k.curveTo(g,h,i,j,q,r),0!==l.length);)g=q+l.shift(),h=r,i=g+l.shift(),j=h+l.shift(),r=j+l.shift(),q=i+(1===l.length?l.shift():0),k.curveTo(g,h,i,j,q,r);break;case 31:for(;l.length>0&&(g=q+l.shift(),h=r,i=g+l.shift(),j=h+l.shift(),r=j+l.shift(),q=i+(1===l.length?l.shift():0),k.curveTo(g,h,i,j,q,r),0!==l.length);)g=q,h=r+l.shift(),i=g+l.shift(),j=h+l.shift(),q=i+l.shift(),r=j+(1===l.length?l.shift():0),k.curveTo(g,h,i,j,q,r);break;default:32>F?console.log("Glyph "+b.index+": unknown operator "+F):247>F?l.push(F-139):251>F?(s=c[E],E+=1,l.push(256*(F-247)+s+108)):255>F?(s=c[E],E+=1,l.push(256*-(F-251)-s-108)):(s=c[E],t=c[E+1],u=c[E+2],v=c[E+3],E+=4,l.push((s<<24|t<<16|u<<8|v)/65536))}}}var g,h,i,j,k=new K.Path,l=[],m=0,n=!1,o=a.defaultWidthX,p=!1,q=0,r=0;return f(c),b.advanceWidth=o,k}function r(a){var b;return b=a.length<1240?107:a.length<33900?1131:32768}function s(a,b,c){c.tables.cff={};var d=l(a,b),f=e(a,d.endOffset,J.bytesToString),g=e(a,f.endOffset),h=e(a,g.endOffset,J.bytesToString),i=e(a,h.endOffset);c.gsubrs=i.objects,c.gsubrsBias=r(c.gsubrs);var j=new DataView(new Uint8Array(g.objects[0]).buffer),k=m(j,h.objects);c.tables.cff.topDict=k;var s=b+k["private"][1],t=n(a,s,k["private"][0],h.objects);if(c.defaultWidthX=t.defaultWidthX,c.nominalWidthX=t.nominalWidthX,0!==t.subrs){var u=s+t.subrs,v=e(a,u);c.subrs=v.objects,c.subrsBias=r(c.subrs)}else c.subrs=[],c.subrsBias=0;var w=e(a,b+k.charStrings);c.nGlyphs=w.objects.length;var x=o(a,b+k.charset,c.nGlyphs,h.objects);0===k.encoding?c.cffEncoding=new H.CffEncoding(H.cffStandardEncoding,x):1===k.encoding?c.cffEncoding=new H.CffEncoding(H.cffExpertEncoding,x):c.cffEncoding=p(a,b+k.encoding,x),c.encoding=c.encoding||c.cffEncoding,c.glyphs=new I.GlyphSet(c);for(var y=0;y=0&&(c=d),d=b.indexOf(a),d>=0?c=d+H.cffStandardStrings.length:(c=H.cffStandardStrings.length+b.length,b.push(a)),c}function u(){return new L.Table("Header",[{name:"major",type:"Card8",value:1},{name:"minor",type:"Card8",value:0},{name:"hdrSize",type:"Card8",value:4},{name:"major",type:"Card8",value:1}])}function v(a){var b=new L.Table("Name INDEX",[{name:"names",type:"INDEX",value:[]}]);b.names=[];for(var c=0;c>1,j.skip("uShort",3),d.glyphIndexMap={};var l=new i.Parser(a,b+e+14),m=new i.Parser(a,b+e+16+2*k),n=new i.Parser(a,b+e+16+4*k),o=new i.Parser(a,b+e+16+6*k),p=b+e+16+8*k;for(c=0;k-1>c;c+=1)for(var q,r=l.parseUShort(),s=m.parseUShort(),t=n.parseShort(),u=o.parseUShort(),v=s;r>=v;v+=1)0!==u?(p=o.offset+o.relativeOffset-2,p+=u,p+=2*(v-s),q=i.getUShort(a,p),0!==q&&(q=q+t&65535)):q=v+t&65535,d.glyphIndexMap[v]=q;return d}function e(a,b,c){a.segments.push({end:b,start:b,delta:-(b-c),offset:0})}function f(a){a.segments.push({end:65535,start:65535,delta:1,offset:0})}function g(a){var b,c=new j.Table("cmap",[{name:"version",type:"USHORT",value:0},{name:"numTables",type:"USHORT",value:1},{name:"platformID",type:"USHORT",value:3},{name:"encodingID",type:"USHORT",value:1},{name:"offset",type:"ULONG",value:12},{name:"format",type:"USHORT",value:4},{name:"length",type:"USHORT",value:0},{name:"language",type:"USHORT",value:0},{name:"segCountX2",type:"USHORT",value:0},{name:"searchRange",type:"USHORT",value:0},{name:"entrySelector",type:"USHORT",value:0},{name:"rangeShift",type:"USHORT",value:0}]);for(c.segments=[],b=0;bb;b+=1){var o=c.segments[b];i=i.concat({name:"end_"+b,type:"USHORT",value:o.end}),k=k.concat({name:"start_"+b,type:"USHORT",value:o.start}),l=l.concat({name:"idDelta_"+b,type:"SHORT",value:o.delta}),m=m.concat({name:"idRangeOffset_"+b,type:"USHORT",value:o.offset}),void 0!==o.glyphId&&(n=n.concat({name:"glyph_"+b,type:"USHORT",value:o.glyphId}))}return c.fields=c.fields.concat(i),c.fields.push({name:"reservedPad",type:"USHORT",value:0}),c.fields=c.fields.concat(k),c.fields=c.fields.concat(l),c.fields=c.fields.concat(m),c.fields=c.fields.concat(n),c.length=14+2*i.length+2+2*k.length+2*l.length+2*m.length+2*n.length,c}var h=a("../check"),i=a("../parse"),j=a("../table");c.parse=d,c.make=g},{"../check":2,"../parse":9,"../table":11}],14:[function(a,b,c){"use strict";function d(a,b){var c=JSON.stringify(a),d=256;for(var e in b){var f=parseInt(e);if(f&&!(256>f)){if(JSON.stringify(b[e])===c)return f;f>=d&&(d=f+1)}}return b[d]=a,d}function e(a,b){var c=d(a.name,b);return new m.Table("fvarAxis",[{name:"tag",type:"TAG",value:a.tag},{name:"minValue",type:"FIXED",value:a.minValue<<16},{name:"defaultValue",type:"FIXED",value:a.defaultValue<<16},{name:"maxValue",type:"FIXED",value:a.maxValue<<16},{name:"flags",type:"USHORT",value:0},{name:"nameID",type:"USHORT",value:c}])}function f(a,b,c){var d={},e=new l.Parser(a,b);return d.tag=e.parseTag(),d.minValue=e.parseFixed(),d.defaultValue=e.parseFixed(),d.maxValue=e.parseFixed(),e.skip("uShort",1),d.name=c[e.parseUShort()]||{},d}function g(a,b,c){for(var e=d(a.name,c),f=[{name:"nameID",type:"USHORT",value:e},{name:"flags",type:"USHORT",value:0}],g=0;gp;p++)o.push(f(a,b+g+p*j,c));for(var q=[],r=b+g+i*j,s=0;m>s;s++)q.push(h(a,r+s*n,o,c));return{axes:o,instances:q}}var k=a("../check"),l=a("../parse"),m=a("../table");c.make=i,c.parse=j},{"../check":2,"../parse":9,"../table":11}],15:[function(a,b,c){"use strict";function d(a,b,c,d,e){var f;return(b&d)>0?(f=a.parseByte(),0===(b&e)&&(f=-f),f=c+f):f=(b&e)>0?c:c+a.parseShort(),f}function e(a,b,c){var e=new m.Parser(b,c);a.numberOfContours=e.parseShort(),a.xMin=e.parseShort(),a.yMin=e.parseShort(),a.xMax=e.parseShort(),a.yMax=e.parseShort();var f,g;if(a.numberOfContours>0){var h,i=a.endPointIndices=[];for(h=0;hh;h+=1)if(g=e.parseByte(),f.push(g),(8&g)>0)for(var l=e.parseByte(),n=0;l>n;n+=1)f.push(g),h+=1;if(k.argument(f.length===j,"Bad flags."),i.length>0){var o,p=[];if(j>0){for(h=0;j>h;h+=1)g=f[h],o={},o.onCurve=!!(1&g),o.lastPointOfContour=i.indexOf(h)>=0,p.push(o);var q=0;for(h=0;j>h;h+=1)g=f[h],o=p[h],o.x=d(e,g,q,2,16),q=o.x;var r=0;for(h=0;j>h;h+=1)g=f[h],o=p[h],o.y=d(e,g,r,4,32),r=o.y}a.points=p}else a.points=[]}else if(0===a.numberOfContours)a.points=[];else{a.isComposite=!0,a.points=[],a.components=[];for(var s=!0;s;){f=e.parseUShort();var t={glyphIndex:e.parseUShort(),xScale:1,scale01:0,scale10:0,yScale:1,dx:0,dy:0};(1&f)>0?(t.dx=e.parseShort(),t.dy=e.parseShort()):(t.dx=e.parseChar(),t.dy=e.parseChar()),(8&f)>0?t.xScale=t.yScale=e.parseF2Dot14():(64&f)>0?(t.xScale=e.parseF2Dot14(),t.yScale=e.parseF2Dot14()):(128&f)>0&&(t.xScale=e.parseF2Dot14(),t.scale01=e.parseF2Dot14(),t.scale10=e.parseF2Dot14(),t.yScale=e.parseF2Dot14()),a.components.push(t),s=!!(32&f)}}}function f(a,b){for(var c=[],d=0;df;f++)e[c.parseTag()]={offset:c.parseUShort()};return e}function e(a,b){var c=new k.Parser(a,b),d=c.parseUShort(),e=c.parseUShort();if(1===d)return c.parseUShortList(e);if(2===d){for(var f=[];e--;)for(var g=c.parseUShort(),h=c.parseUShort(),i=c.parseUShort(),j=g;h>=j;j++)f[i++]=j;return f}}function f(a,b){var c=new k.Parser(a,b),d=c.parseUShort();if(1===d){var e=c.parseUShort(),f=c.parseUShort(),g=c.parseUShortList(f);return function(a){return g[a-e]||0}}if(2===d){for(var h=c.parseUShort(),i=[],j=[],l=[],m=0;h>m;m++)i[m]=c.parseUShort(),j[m]=c.parseUShort(),l[m]=c.parseUShort();return function(a){for(var b=0,c=i.length-1;c>b;){var d=b+c+1>>1;ar;r++){var s=q[r],t=n[s];if(!t){t={},g.relativeOffset=s;for(var u=g.parseUShort();u--;){var v=g.parseUShort();l&&(c=g.parseShort()),m&&(d=g.parseShort()),t[v]=c}}p[j[r]]=t}return function(a,b){var c=p[a];return c?c[b]:void 0}}if(2===h){for(var w=g.parseUShort(),x=g.parseUShort(),y=g.parseUShort(),z=g.parseUShort(),A=f(a,b+w),B=f(a,b+x),C=[],D=0;y>D;D++)for(var E=C[D]=[],F=0;z>F;F++)l&&(c=g.parseShort()),m&&(d=g.parseShort()),E[F]=c;var G={};for(D=0;Dm;m++)l.push(g(a,b+i[m]));j.getKerningValue=function(a,b){for(var c=l.length;c--;){var d=l[c](a,b);if(void 0!==d)return d}return 0}}return j}function i(a,b,c){var e=new k.Parser(a,b),f=e.parseFixed();j.argument(1===f,"Unsupported GPOS table version."),d(a,b+e.parseUShort()),d(a,b+e.parseUShort());var g=e.parseUShort();e.relativeOffset=g;for(var i=e.parseUShort(),l=e.parseOffset16List(i),m=b+g,n=0;i>n;n++){var o=h(a,m+l[n]);2!==o.lookupType||c.getGposKerningValue||(c.getGposKerningValue=o.getKerningValue)}}var j=a("../check"),k=a("../parse");c.parse=i},{"../check":2,"../parse":9}],17:[function(a,b,c){"use strict";function d(a,b){var c={},d=new g.Parser(a,b);return c.version=d.parseVersion(),c.fontRevision=Math.round(1e3*d.parseFixed())/1e3,c.checkSumAdjustment=d.parseULong(),c.magicNumber=d.parseULong(),f.argument(1594834165===c.magicNumber,"Font header has wrong magic number."),c.flags=d.parseUShort(),c.unitsPerEm=d.parseUShort(),c.created=d.parseLongDateTime(),c.modified=d.parseLongDateTime(),c.xMin=d.parseShort(),c.yMin=d.parseShort(),c.xMax=d.parseShort(),c.yMax=d.parseShort(),c.macStyle=d.parseUShort(),c.lowestRecPPEM=d.parseUShort(),c.fontDirectionHint=d.parseShort(),c.indexToLocFormat=d.parseShort(),c.glyphDataFormat=d.parseShort(),c}function e(a){return new h.Table("head",[{name:"version",type:"FIXED",value:65536},{name:"fontRevision",type:"FIXED",value:65536},{name:"checkSumAdjustment",type:"ULONG",value:0},{name:"magicNumber",type:"ULONG",value:1594834165},{name:"flags",type:"USHORT",value:0},{name:"unitsPerEm",type:"USHORT",value:1e3},{name:"created",type:"LONGDATETIME",value:0},{name:"modified",type:"LONGDATETIME",value:0},{name:"xMin",type:"SHORT",value:0},{name:"yMin",type:"SHORT",value:0},{name:"xMax",type:"SHORT",value:0},{name:"yMax",type:"SHORT",value:0},{name:"macStyle",type:"USHORT",value:0},{name:"lowestRecPPEM",type:"USHORT",value:0},{name:"fontDirectionHint",type:"SHORT",value:2},{name:"indexToLocFormat",type:"SHORT",value:0},{name:"glyphDataFormat",type:"SHORT",value:0}],a)}var f=a("../check"),g=a("../parse"),h=a("../table");c.parse=d,c.make=e},{"../check":2,"../parse":9,"../table":11}],18:[function(a,b,c){"use strict";function d(a,b){var c={},d=new f.Parser(a,b);return c.version=d.parseVersion(),c.ascender=d.parseShort(),c.descender=d.parseShort(),c.lineGap=d.parseShort(),c.advanceWidthMax=d.parseUShort(),c.minLeftSideBearing=d.parseShort(),c.minRightSideBearing=d.parseShort(),c.xMaxExtent=d.parseShort(),c.caretSlopeRise=d.parseShort(),c.caretSlopeRun=d.parseShort(),c.caretOffset=d.parseShort(),d.relativeOffset+=8,c.metricDataFormat=d.parseShort(),c.numberOfHMetrics=d.parseUShort(),c}function e(a){return new g.Table("hhea",[{name:"version",type:"FIXED",value:65536},{name:"ascender",type:"FWORD",value:0},{name:"descender",type:"FWORD",value:0},{name:"lineGap",type:"FWORD",value:0},{name:"advanceWidthMax",type:"UFWORD",value:0},{name:"minLeftSideBearing",type:"FWORD",value:0},{name:"minRightSideBearing",type:"FWORD",value:0},{name:"xMaxExtent",type:"FWORD",value:0},{name:"caretSlopeRise",type:"SHORT",value:1},{name:"caretSlopeRun",type:"SHORT",value:0},{name:"caretOffset",type:"SHORT",value:0},{name:"reserved1",type:"SHORT",value:0},{name:"reserved2",type:"SHORT",value:0},{name:"reserved3",type:"SHORT",value:0},{name:"reserved4",type:"SHORT",value:0},{name:"metricDataFormat",type:"SHORT",value:0},{name:"numberOfHMetrics",type:"USHORT",value:0}],a)}var f=a("../parse"),g=a("../table");c.parse=d,c.make=e},{"../parse":9,"../table":11}],19:[function(a,b,c){"use strict";function d(a,b,c,d,e){for(var g,h,i=new f.Parser(a,b),j=0;d>j;j+=1){c>j&&(g=i.parseUShort(),h=i.parseShort());var k=e.get(j);k.advanceWidth=g,k.leftSideBearing=h}}function e(a){for(var b=new g.Table("hmtx",[]),c=0;cj;j+=1){var k=d.parseUShort(),l=d.parseUShort(),m=d.parseShort();c[k+","+l]=m}return c}var e=a("../check"),f=a("../parse");c.parse=d},{"../check":2,"../parse":9}],21:[function(a,b,c){"use strict";function d(a,b,c,d){for(var f=new e.Parser(a,b),g=d?f.parseUShort:f.parseULong,h=[],i=0;c+1>i;i+=1){var j=g.call(f);d&&(j*=2),h.push(j)}return h}var e=a("../parse");c.parse=d},{"../parse":9}],22:[function(a,b,c){"use strict";function d(a){for(var b=new h.Table("ltag",[{name:"version",type:"ULONG",value:1},{name:"flags",type:"ULONG",value:0},{name:"numTags",type:"ULONG",value:a.length}]),c="",d=12+4*a.length,e=0;ef&&(f=c.length,c+=a[e]),b.fields.push({name:"offset "+e,type:"USHORT",value:d+f}),b.fields.push({name:"length "+e,type:"USHORT",value:a[e].length})}return b.fields.push({name:"stringPool",type:"CHARARRAY",value:c}),b}function e(a,b){var c=new g.Parser(a,b),d=c.parseULong();f.argument(1===d,"Unsupported ltag table version."),c.skip("uLong",1);for(var e=c.parseULong(),h=[],i=0;e>i;i++){for(var j="",k=b+c.parseUShort(),l=c.parseUShort(),m=k;k+l>m;++m)j+=String.fromCharCode(a.getInt8(m));h.push(j)}return h}var f=a("../check"),g=a("../parse"),h=a("../table");c.make=d,c.parse=e},{"../check":2,"../parse":9,"../table":11}],23:[function(a,b,c){"use strict";function d(a,b){var c={},d=new f.Parser(a,b);return c.version=d.parseVersion(),c.numGlyphs=d.parseUShort(),1===c.version&&(c.maxPoints=d.parseUShort(),c.maxContours=d.parseUShort(),c.maxCompositePoints=d.parseUShort(),c.maxCompositeContours=d.parseUShort(),c.maxZones=d.parseUShort(),c.maxTwilightPoints=d.parseUShort(),c.maxStorage=d.parseUShort(),c.maxFunctionDefs=d.parseUShort(),c.maxInstructionDefs=d.parseUShort(),c.maxStackElements=d.parseUShort(),c.maxSizeOfInstructions=d.parseUShort(),c.maxComponentElements=d.parseUShort(),c.maxComponentDepth=d.parseUShort()),c}function e(a){return new g.Table("maxp",[{name:"version",type:"FIXED",value:20480},{name:"numGlyphs",type:"USHORT",value:a}])}var f=a("../parse"),g=a("../table");c.parse=d,c.make=e},{"../parse":9,"../table":11}],24:[function(a,b,c){"use strict";function d(a,b,c){switch(a){case 0:if(65535===b)return"und";if(c)return c[b];break;case 1:return r[b];case 3:return t[b]}return void 0}function e(a,b,c){switch(a){case 0:return u;case 1:return w[c]||v[b];case 3:if(1===b||10===b)return u}return void 0}function f(a,b,c){for(var f={},g=new o.Parser(a,b),h=g.parseUShort(),i=g.parseUShort(),j=g.offset+g.parseUShort(),k=0;i>k;k++){var l=g.parseUShort(),n=g.parseUShort(),p=g.parseUShort(),r=g.parseUShort(),s=q[r]||r,t=g.parseUShort(),v=g.parseUShort(),w=d(l,p,c),x=e(l,n,p);if(void 0!==x&&void 0!==w){var y;if(y=x===u?m.UTF16(a,j+v,t):m.MACSTRING(a,j+v,t,x)){var z=f[s];void 0===z&&(z=f[s]={}),z[w]=y}}}var A=0;return 1===h&&(A=g.parseUShort()),f}function g(a){var b={};for(var c in a)b[a[c]]=parseInt(c);return b}function h(a,b,c,d,e,f){return new p.Table("NameRecord",[{name:"platformID",type:"USHORT",value:a},{name:"encodingID",type:"USHORT",value:b},{name:"languageID",type:"USHORT",value:c},{name:"nameID",type:"USHORT",value:d},{name:"length",type:"USHORT",value:e},{name:"offset",type:"USHORT",value:f}])}function i(a,b){var c=a.length,d=b.length-c+1;a:for(var e=0;d>e;e++)for(;d>e;e++){for(var f=0;c>f;f++)if(b[e+f]!==a[f])continue a;return e}return-1}function j(a,b){var c=i(a,b);if(0>c){c=b.length;for(var d=0,e=a.length;e>d;++d)b.push(a[d])}return c}function k(a,b){var c,d=[],f={},i=g(q);for(var k in a){var l=i[k];void 0===l&&(l=k),c=parseInt(l),f[c]=a[k],d.push(c)}for(var m=g(r),o=g(t),u=[],v=[],w=0;wB&&(B=b.length,b.push(y)),C=4,E=n.UTF16(z));var F=j(E,v);u.push(h(A,C,B,c,E.length,F));var G=o[y];if(void 0!==G){var H=n.UTF16(z),I=j(H,v);u.push(h(3,1,G,c,H.length,I))}}}u.sort(function(a,b){return a.platformID-b.platformID||a.encodingID-b.encodingID||a.languageID-b.languageID||a.nameID-b.nameID});for(var J=new p.Table("name",[{name:"format",type:"USHORT",value:0},{name:"count",type:"USHORT",value:u.length},{name:"stringOffset",type:"USHORT",value:6+12*u.length}]),K=0;K=c.begin&&ae;e++)c.panose[e]=d.parseByte();return c.ulUnicodeRange1=d.parseULong(),c.ulUnicodeRange2=d.parseULong(),c.ulUnicodeRange3=d.parseULong(),c.ulUnicodeRange4=d.parseULong(),c.achVendID=String.fromCharCode(d.parseByte(),d.parseByte(),d.parseByte(),d.parseByte()),c.fsSelection=d.parseUShort(),c.usFirstCharIndex=d.parseUShort(),c.usLastCharIndex=d.parseUShort(),c.sTypoAscender=d.parseShort(),c.sTypoDescender=d.parseShort(),c.sTypoLineGap=d.parseShort(),c.usWinAscent=d.parseUShort(),c.usWinDescent=d.parseUShort(),c.version>=1&&(c.ulCodePageRange1=d.parseULong(),c.ulCodePageRange2=d.parseULong()),c.version>=2&&(c.sxHeight=d.parseShort(),c.sCapHeight=d.parseShort(),c.usDefaultChar=d.parseUShort(),c.usBreakChar=d.parseUShort(),c.usMaxContent=d.parseUShort()),c}function f(a){return new h.Table("OS/2",[{name:"version",type:"USHORT",value:3},{name:"xAvgCharWidth",type:"SHORT",value:0},{name:"usWeightClass",type:"USHORT",value:0},{name:"usWidthClass",type:"USHORT",value:0},{name:"fsType",type:"USHORT",value:0},{name:"ySubscriptXSize",type:"SHORT",value:650},{name:"ySubscriptYSize",type:"SHORT",value:699},{name:"ySubscriptXOffset",type:"SHORT",value:0},{name:"ySubscriptYOffset",type:"SHORT",value:140},{name:"ySuperscriptXSize",type:"SHORT",value:650},{name:"ySuperscriptYSize",type:"SHORT",value:699},{name:"ySuperscriptXOffset",type:"SHORT",value:0},{name:"ySuperscriptYOffset",type:"SHORT",value:479},{name:"yStrikeoutSize",type:"SHORT",value:49},{name:"yStrikeoutPosition",type:"SHORT",value:258},{name:"sFamilyClass",type:"SHORT",value:0},{name:"bFamilyType",type:"BYTE",value:0},{name:"bSerifStyle",type:"BYTE",value:0},{name:"bWeight",type:"BYTE",value:0},{name:"bProportion",type:"BYTE",value:0},{name:"bContrast",type:"BYTE",value:0},{name:"bStrokeVariation",type:"BYTE",value:0},{name:"bArmStyle",type:"BYTE",value:0},{name:"bLetterform",type:"BYTE",value:0},{name:"bMidline",type:"BYTE",value:0},{name:"bXHeight",type:"BYTE",value:0},{name:"ulUnicodeRange1",type:"ULONG",value:0},{name:"ulUnicodeRange2",type:"ULONG",value:0},{name:"ulUnicodeRange3",type:"ULONG",value:0},{name:"ulUnicodeRange4",type:"ULONG",value:0},{name:"achVendID",type:"CHARARRAY",value:"XXXX"},{name:"fsSelection",type:"USHORT",value:0},{name:"usFirstCharIndex",type:"USHORT",value:0},{name:"usLastCharIndex",type:"USHORT",value:0},{name:"sTypoAscender",type:"SHORT",value:0},{name:"sTypoDescender",type:"SHORT",value:0},{name:"sTypoLineGap",type:"SHORT",value:0},{name:"usWinAscent",type:"USHORT",value:0},{name:"usWinDescent",type:"USHORT",value:0},{name:"ulCodePageRange1",type:"ULONG",value:0},{name:"ulCodePageRange2",type:"ULONG",value:0},{name:"sxHeight",type:"SHORT",value:0},{name:"sCapHeight",type:"SHORT",value:0},{name:"usDefaultChar",type:"USHORT",value:0},{name:"usBreakChar",type:"USHORT",value:0},{name:"usMaxContext",type:"USHORT",value:0}],a)}var g=a("../parse"),h=a("../table"),i=[{begin:0,end:127},{begin:128,end:255},{begin:256,end:383},{begin:384,end:591},{begin:592,end:687},{begin:688,end:767},{begin:768,end:879},{begin:880,end:1023},{begin:11392,end:11519},{begin:1024,end:1279},{begin:1328,end:1423},{begin:1424,end:1535},{begin:42240,end:42559},{begin:1536,end:1791},{begin:1984,end:2047},{begin:2304,end:2431},{begin:2432,end:2559},{begin:2560,end:2687},{begin:2688,end:2815},{begin:2816,end:2943},{begin:2944,end:3071},{begin:3072,end:3199},{begin:3200,end:3327},{begin:3328,end:3455},{begin:3584,end:3711},{begin:3712,end:3839},{begin:4256,end:4351},{begin:6912,end:7039},{begin:4352,end:4607},{begin:7680,end:7935},{begin:7936,end:8191},{begin:8192,end:8303},{begin:8304,end:8351},{begin:8352,end:8399},{begin:8400,end:8447},{begin:8448,end:8527},{begin:8528,end:8591},{begin:8592,end:8703},{begin:8704,end:8959},{begin:8960,end:9215},{begin:9216,end:9279},{begin:9280,end:9311},{begin:9312,end:9471},{begin:9472,end:9599},{begin:9600,end:9631},{begin:9632,end:9727},{begin:9728,end:9983},{begin:9984,end:10175},{begin:12288,end:12351},{begin:12352,end:12447},{begin:12448,end:12543},{begin:12544,end:12591},{begin:12592,end:12687},{begin:43072,end:43135},{begin:12800,end:13055},{begin:13056,end:13311},{begin:44032,end:55215},{begin:55296,end:57343},{begin:67840,end:67871},{begin:19968,end:40959},{begin:57344,end:63743},{begin:12736,end:12783},{begin:64256,end:64335},{begin:64336,end:65023},{begin:65056,end:65071},{begin:65040,end:65055},{begin:65104,end:65135},{begin:65136,end:65279},{begin:65280,end:65519},{begin:65520,end:65535},{begin:3840,end:4095},{begin:1792,end:1871},{begin:1920,end:1983},{begin:3456,end:3583},{begin:4096,end:4255},{begin:4608,end:4991},{begin:5024,end:5119},{begin:5120,end:5759},{begin:5760,end:5791},{begin:5792,end:5887},{begin:6016,end:6143},{begin:6144,end:6319},{begin:10240,end:10495},{begin:40960,end:42127},{begin:5888,end:5919},{begin:66304,end:66351},{begin:66352,end:66383},{begin:66560,end:66639},{begin:118784,end:119039},{begin:119808,end:120831},{begin:1044480,end:1048573},{begin:65024,end:65039},{begin:917504,end:917631},{begin:6400,end:6479},{begin:6480,end:6527},{begin:6528,end:6623},{begin:6656,end:6687},{begin:11264,end:11359},{begin:11568,end:11647},{begin:19904,end:19967},{begin:43008,end:43055},{begin:65536,end:65663},{begin:65856,end:65935},{begin:66432,end:66463},{begin:66464,end:66527},{begin:66640,end:66687},{begin:66688,end:66735},{begin:67584,end:67647},{begin:68096,end:68191},{begin:119552,end:119647},{begin:73728,end:74751},{begin:119648,end:119679},{begin:7040,end:7103},{begin:7168,end:7247},{begin:7248,end:7295},{begin:43136,end:43231},{begin:43264,end:43311},{begin:43312,end:43359},{begin:43520,end:43615},{begin:65936,end:65999},{begin:66e3,end:66047},{begin:66208,end:66271},{begin:127024,end:127135}];c.unicodeRanges=i,c.getUnicodeRange=d,c.parse=e,c.make=f},{"../parse":9,"../table":11}],26:[function(a,b,c){"use strict";function d(a,b){var c,d={},e=new g.Parser(a,b);switch(d.version=e.parseVersion(),d.italicAngle=e.parseFixed(),d.underlinePosition=e.parseShort(),d.underlineThickness=e.parseShort(),d.isFixedPitch=e.parseULong(),d.minMemType42=e.parseULong(),d.maxMemType42=e.parseULong(),d.minMemType1=e.parseULong(),d.maxMemType1=e.parseULong(),d.version){case 1:d.names=f.standardNames.slice();break;case 2:for(d.numberOfGlyphs=e.parseUShort(),d.glyphNameIndex=new Array(d.numberOfGlyphs),c=0;c=f.standardNames.length){var h=e.parseChar();d.names.push(e.parseString(h))}break;case 2.5:for(d.numberOfGlyphs=e.parseUShort(),d.offset=new Array(d.numberOfGlyphs),c=0;cb.value.tag?1:-1}),b.fields=b.fields.concat(g),b.fields=b.fields.concat(h),b}function h(a,b,c){for(var d=0;d0){var f=a.glyphs.get(e);return f.getMetrics()}}return c}function i(a){for(var b=0,c=0;cE||null===b)&&(b=E),E>x&&(x=E);var F=u.getUnicodeRange(E);if(32>F)y|=1<F)z|=1<F)A|=1<F))throw new Error("Unicode ranges bits > 123 are reserved for internal usage");B|=1<0?r.make(U):void 0,X=v.make(),Y=n.make(a.glyphs,{version:a.getEnglishName("version"),fullName:Q,familyName:O,weightName:P,postScriptName:R,unitsPerEm:a.unitsPerEm}),Z=[I,J,K,L,V,N,X,Y,M];W&&Z.push(W);var $=g(Z),_=$.encode(),aa=e(_),ba=$.fields,ca=!1;for(C=0;C=0&&255>=a,"Byte value should be between 0 and 255."),[a]},j.BYTE=d(1),i.CHAR=function(a){return[a.charCodeAt(0)]},j.CHAR=d(1),i.CHARARRAY=function(a){for(var b=[],c=0;c>8&255,255&a]},j.USHORT=d(2),i.SHORT=function(a){return a>=f&&(a=-(2*f-a)),[a>>8&255,255&a]},j.SHORT=d(2),i.UINT24=function(a){return[a>>16&255,a>>8&255,255&a]},j.UINT24=d(3),i.ULONG=function(a){return[a>>24&255,a>>16&255,a>>8&255,255&a]},j.ULONG=d(4),i.LONG=function(a){return a>=g&&(a=-(2*g-a)),[a>>24&255,a>>16&255,a>>8&255,255&a]},j.LONG=d(4),i.FIXED=i.ULONG,j.FIXED=j.ULONG,i.FWORD=i.SHORT,j.FWORD=j.SHORT,i.UFWORD=i.USHORT,j.UFWORD=j.USHORT,i.LONGDATETIME=function(){return[0,0,0,0,0,0,0,0]},j.LONGDATETIME=d(8),i.TAG=function(a){return e.argument(4===a.length,"Tag should be exactly 4 ASCII characters."),[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)]},j.TAG=d(4),i.Card8=i.BYTE,j.Card8=j.BYTE,i.Card16=i.USHORT,j.Card16=j.USHORT,i.OffSize=i.BYTE,j.OffSize=j.BYTE,i.SID=i.USHORT,j.SID=j.USHORT,i.NUMBER=function(a){return a>=-107&&107>=a?[a+139]:a>=108&&1131>=a?(a-=108,[(a>>8)+247,255&a]):a>=-1131&&-108>=a?(a=-a-108,[(a>>8)+251,255&a]):a>=-32768&&32767>=a?i.NUMBER16(a):i.NUMBER32(a)},j.NUMBER=function(a){return i.NUMBER(a).length},i.NUMBER16=function(a){return[28,a>>8&255,255&a]},j.NUMBER16=d(3),i.NUMBER32=function(a){return[29,a>>24&255,a>>16&255,a>>8&255,255&a]},j.NUMBER32=d(5),i.REAL=function(a){var b=a.toString(),c=/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(b);if(c){var d=parseFloat("1e"+((c[2]?+c[2]:0)+c[1].length));b=(Math.round(a*d)/d).toString()}var e,f,g="";for(e=0,f=b.length;f>e;e+=1){var h=b[e];g+="e"===h?"-"===b[++e]?"c":"b":"."===h?"a":"-"===h?"e":h}g+=1&g.length?"f":"ff";var i=[30];for(e=0,f=g.length;f>e;e+=2)i.push(parseInt(g.substr(e,2),16));return i},j.REAL=function(a){return i.REAL(a).length},i.NAME=i.CHARARRAY,j.NAME=j.CHARARRAY,i.STRING=i.CHARARRAY,j.STRING=j.CHARARRAY,h.UTF16=function(a,b,c){for(var d=[],e=c/2,f=0;e>f;f++,b+=2)d[f]=a.getUint16(b);return String.fromCharCode.apply(null,d)},i.UTF16=function(a){for(var b=[],c=0;c>8&255),b.push(255&d)}return b},j.UTF16=function(a){return 2*a.length};var k={"x-mac-croatian":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈Ć«Č… ÀÃÕŒœĐ—“”‘’÷◊©⁄€‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ","x-mac-cyrillic":"АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю","x-mac-gaelic":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØḂ±≤≥ḃĊċḊḋḞḟĠġṀæøṁṖṗɼƒſṠ«»… ÀÃÕŒœ–—“”‘’ṡẛÿŸṪ€‹›Ŷŷṫ·Ỳỳ⁊ÂÊÁËÈÍÎÏÌÓÔ♣ÒÚÛÙıÝýŴŵẄẅẀẁẂẃ","x-mac-greek":"Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦€ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ­","x-mac-icelandic":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüÝ°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-inuit":"ᐃᐄᐅᐆᐊᐋᐱᐲᐳᐴᐸᐹᑉᑎᑏᑐᑑᑕᑖᑦᑭᑮᑯᑰᑲᑳᒃᒋᒌᒍᒎᒐᒑ°ᒡᒥᒦ•¶ᒧ®©™ᒨᒪᒫᒻᓂᓃᓄᓅᓇᓈᓐᓯᓰᓱᓲᓴᓵᔅᓕᓖᓗᓘᓚᓛᓪᔨᔩᔪᔫᔭ… ᔮᔾᕕᕖᕗ–—“”‘’ᕘᕙᕚᕝᕆᕇᕈᕉᕋᕌᕐᕿᖀᖁᖂᖃᖄᖅᖏᖐᖑᖒᖓᖔᖕᙱᙲᙳᙴᙵᙶᖖᖠᖡᖢᖣᖤᖥᖦᕼŁł","x-mac-ce":"ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ",macintosh:"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-romanian":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂȘ∞±≤≥¥µ∂∑∏π∫ªºΩăș¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›Țț‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-turkish":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙˆ˜¯˘˙˚¸˝˛ˇ"};h.MACSTRING=function(a,b,c,d){var e=k[d];if(void 0===e)return void 0;for(var f="",g=0;c>g;g++){var h=a.getUint8(b+g);f+=127>=h?String.fromCharCode(h):e[127&h]}return f};var l,m="function"==typeof WeakMap&&new WeakMap,n=function(a){if(!l){l={};for(var b in k)l[b]=new String(b)}var c=l[a];if(void 0===c)return void 0;if(m){var d=m.get(c);if(void 0!==d)return d}var e=k[a];if(void 0===e)return void 0;for(var f={},g=0;g=128&&(f=c[f],void 0===f))return void 0;d.push(f)}return d},j.MACSTRING=function(a,b){var c=i.MACSTRING(a,b);return void 0!==c?c.length:0},i.INDEX=function(a){var b,c=1,d=[c],e=[],f=0;for(b=0;be;e+=1){var f=parseInt(c[e],0),g=a[f];b=b.concat(i.OPERAND(g.value,g.type)),b=b.concat(i.OPERATOR(f))}return b},j.DICT=function(a){return i.DICT(a).length},i.OPERATOR=function(a){return 1200>a?[a]:[12,a-1200]},i.OPERAND=function(a,b){var c=[];if(Array.isArray(b))for(var d=0;de;e+=1){var f=a[e];c=c.concat(i[f.type](f.value))}return o&&o.set(a,c),c},j.CHARSTRING=function(a){return i.CHARSTRING(a).length},i.OBJECT=function(a){var b=i[a.type];return e.argument(void 0!==b,"No encoding function for type "+a.type),b(a.value)},j.OBJECT=function(a){var b=j[a.type];return e.argument(void 0!==b,"No sizeOf function for type "+a.type),b(a.value)},i.TABLE=function(a){for(var b=[],c=a.fields.length,d=0;c>d;d+=1){var f=a.fields[d],g=i[f.type];e.argument(void 0!==g,"No encoding function for field type "+f.type);var h=a[f.name];void 0===h&&(h=f.value);var j=g(h);b=b.concat(j)}return b},j.TABLE=function(a){for(var b=0,c=a.fields.length,d=0;c>d;d+=1){var f=a.fields[d],g=j[f.type];e.argument(void 0!==g,"No sizeOf function for field type "+f.type);var h=a[f.name];void 0===h&&(h=f.value),b+=g(h)}return b},i.LITERAL=function(a){return a},j.LITERAL=function(a){return a.length},c.decode=h,c.encode=i,c.sizeOf=j},{"./check":2}],29:[function(_dereq_,module,exports){!function(a,b,c){"undefined"!=typeof module&&module.exports?module.exports=c():"function"==typeof define&&define.amd?define(c):b[a]=c()}("reqwest",this,function(){function succeed(a){var b=protocolRe.exec(a.url);return b=b&&b[1]||window.location.protocol,httpsRe.test(b)?twoHundo.test(a.request.status):!!a.request.response}function handleReadyState(a,b,c){return function(){return a._aborted?c(a.request):a._timedOut?c(a.request,"Request is aborted: timeout"):void(a.request&&4==a.request[readyState]&&(a.request.onreadystatechange=noop,succeed(a)?b(a.request):c(a.request)))}}function setHeaders(a,b){var c,d=b.headers||{};d.Accept=d.Accept||defaultHeaders.accept[b.type]||defaultHeaders.accept["*"];var e="function"==typeof FormData&&b.data instanceof FormData;b.crossOrigin||d[requestedWith]||(d[requestedWith]=defaultHeaders.requestedWith),d[contentType]||e||(d[contentType]=b.contentType||defaultHeaders.contentType);for(c in d)d.hasOwnProperty(c)&&"setRequestHeader"in a&&a.setRequestHeader(c,d[c])}function setCredentials(a,b){"undefined"!=typeof b.withCredentials&&"undefined"!=typeof a.withCredentials&&(a.withCredentials=!!b.withCredentials)}function generalCallback(a){lastValue=a}function urlappend(a,b){return a+(/\?/.test(a)?"&":"?")+b}function handleJsonp(a,b,c,d){var e=uniqid++,f=a.jsonpCallback||"callback",g=a.jsonpCallbackName||reqwest.getcallbackPrefix(e),h=new RegExp("((^|\\?|&)"+f+")=([^&]+)"),i=d.match(h),j=doc.createElement("script"),k=0,l=-1!==navigator.userAgent.indexOf("MSIE 10.0");return i?"?"===i[3]?d=d.replace(h,"$1="+g):g=i[3]:d=urlappend(d,f+"="+g),win[g]=generalCallback,j.type="text/javascript",j.src=d,j.async=!0,"undefined"==typeof j.onreadystatechange||l||(j.htmlFor=j.id="_reqwest_"+e),j.onload=j.onreadystatechange=function(){return j[readyState]&&"complete"!==j[readyState]&&"loaded"!==j[readyState]||k?!1:(j.onload=j.onreadystatechange=null,j.onclick&&j.onclick(),b(lastValue),lastValue=void 0,head.removeChild(j),void(k=1))},head.appendChild(j),{abort:function(){j.onload=j.onreadystatechange=null,c({},"Request is aborted: timeout",{}),lastValue=void 0,head.removeChild(j),k=1}}}function getRequest(a,b){var c,d=this.o,e=(d.method||"GET").toUpperCase(),f="string"==typeof d?d:d.url,g=d.processData!==!1&&d.data&&"string"!=typeof d.data?reqwest.toQueryString(d.data):d.data||null,h=!1;return"jsonp"!=d.type&&"GET"!=e||!g||(f=urlappend(f,g),g=null),"jsonp"==d.type?handleJsonp(d,a,b,f):(c=d.xhr&&d.xhr(d)||xhr(d),c.open(e,f,d.async===!1?!1:!0),setHeaders(c,d),setCredentials(c,d),win[xDomainRequest]&&c instanceof win[xDomainRequest]?(c.onload=a,c.onerror=b,c.onprogress=function(){},h=!0):c.onreadystatechange=handleReadyState(this,a,b),d.before&&d.before(c),h?setTimeout(function(){c.send(g)},200):c.send(g),c)}function Reqwest(a,b){this.o=a,this.fn=b,init.apply(this,arguments)}function setType(a){return a.match("json")?"json":a.match("javascript")?"js":a.match("text")?"html":a.match("xml")?"xml":void 0}function init(o,fn){function complete(a){for(o.timeout&&clearTimeout(self.timeout),self.timeout=null;self._completeHandlers.length>0;)self._completeHandlers.shift()(a)}function success(resp){var type=o.type||resp&&setType(resp.getResponseHeader("Content-Type"));resp="jsonp"!==type?self.request:resp;var filteredResponse=globalSetupOptions.dataFilter(resp.responseText,type),r=filteredResponse;try{resp.responseText=r}catch(e){}if(r)switch(type){case"json":try{resp=win.JSON?win.JSON.parse(r):eval("("+r+")")}catch(err){return error(resp,"Could not parse JSON in response",err)}break;case"js":resp=eval(r);break;case"html":resp=r;break;case"xml":resp=resp.responseXML&&resp.responseXML.parseError&&resp.responseXML.parseError.errorCode&&resp.responseXML.parseError.reason?null:resp.responseXML}for(self._responseArgs.resp=resp,self._fulfilled=!0,fn(resp),self._successHandler(resp);self._fulfillmentHandlers.length>0;)resp=self._fulfillmentHandlers.shift()(resp);complete(resp)}function timedOut(){self._timedOut=!0,self.request.abort()}function error(a,b,c){for(a=self.request,self._responseArgs.resp=a,self._responseArgs.msg=b,self._responseArgs.t=c,self._erred=!0;self._errorHandlers.length>0;)self._errorHandlers.shift()(a,b,c);complete(a)}this.url="string"==typeof o?o:o.url,this.timeout=null,this._fulfilled=!1,this._successHandler=function(){},this._fulfillmentHandlers=[],this._errorHandlers=[],this._completeHandlers=[],this._erred=!1,this._responseArgs={};var self=this;fn=fn||function(){},o.timeout&&(this.timeout=setTimeout(function(){timedOut()},o.timeout)),o.success&&(this._successHandler=function(){o.success.apply(o,arguments)}),o.error&&this._errorHandlers.push(function(){o.error.apply(o,arguments)}),o.complete&&this._completeHandlers.push(function(){o.complete.apply(o,arguments)}),this.request=getRequest.call(this,success,error)}function reqwest(a,b){return new Reqwest(a,b)}function normalize(a){return a?a.replace(/\r?\n/g,"\r\n"):""}function serial(a,b){var c,d,e,f,g=a.name,h=a.tagName.toLowerCase(),i=function(a){a&&!a.disabled&&b(g,normalize(a.attributes.value&&a.attributes.value.specified?a.value:a.text))};if(!a.disabled&&g)switch(h){case"input":/reset|button|image|file/i.test(a.type)||(c=/checkbox/i.test(a.type),d=/radio/i.test(a.type),e=a.value,(!(c||d)||a.checked)&&b(g,normalize(c&&""===e?"on":e)));break;case"textarea":b(g,normalize(a.value));break;case"select":if("select-one"===a.type.toLowerCase())i(a.selectedIndex>=0?a.options[a.selectedIndex]:null);else for(f=0;a.length&&f=e;e++)for(i=e/c,f=0;b>=f;f++)h=f/b,g=a(h,i),this.vertices.push(g);var k,l,m,n,o,p,q,r;for(e=0;c>e;e++)for(f=0;b>f;f++)k=e*j+f+d,l=e*j+f+1+d,m=(e+1)*j+f+1+d,n=(e+1)*j+f+d,o=[f/b,e/c],p=[(f+1)/b,e/c],q=[(f+1)/b,(e+1)/c],r=[f/b,(e+1)/c],this.faces.push([k,l,n]),this.uvs.push([o,p,r]),this.faces.push([l,m,n]),this.uvs.push([p,q,r])},f.Geometry3D.prototype.computeFaceNormals=function(){for(var a=new f.Vector,b=new f.Vector,c=0;cthis.vertices.length-1-this.detailX;b--)a.add(this.vertexNormals[b]);for(a=f.Vector.div(a,this.detailX),b=this.vertices.length-1;b>this.vertices.length-1-this.detailX;b--)this.vertexNormals[b]=a},f.Geometry3D.prototype.generateUV=function(a,b){a=d(a),b=d(b);var c=[];return a.forEach(function(a,d){c[a]=b[d]}),d(c)},f.Geometry3D.prototype.generateObj=function(a,b){this.computeFaceNormals(),this.computeVertexNormals(),a&&this.averageNormals(),b&&this.averagePoleNormals();var c={vertices:e(this.vertices),vertexNormals:e(this.vertexNormals),uvs:this.generateUV(this.faces,this.uvs),faces:d(this.faces),len:3*this.faces.length};return c},b.exports=f.Geometry3D},{"../core/core":50}],37:[function(a,b,c){"use strict";var d=a("../core/core"),e=a("../math/polargeometry"),f=a("../core/constants"),g="undefined"!=typeof Float32Array?Float32Array:Array;d.Matrix=function(){return arguments[0]instanceof d?(this.p5=arguments[0],this.mat4=arguments[1]||new g([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])):this.mat4=arguments[0]||new g([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this},d.Matrix.prototype.set=function(a){return a instanceof d.Matrix?(this.mat4=a.mat4,this):a instanceof g?(this.mat4=a,this):this},d.Matrix.prototype.get=function(){return new d.Matrix(this.mat4)},d.Matrix.prototype.copy=function(){var a=new d.Matrix;return a.mat4[0]=this.mat4[0],a.mat4[1]=this.mat4[1],a.mat4[2]=this.mat4[2],a.mat4[3]=this.mat4[3],a.mat4[4]=this.mat4[4],a.mat4[5]=this.mat4[5],a.mat4[6]=this.mat4[6],a.mat4[7]=this.mat4[7],a.mat4[8]=this.mat4[8],a.mat4[9]=this.mat4[9],a.mat4[10]=this.mat4[10],a.mat4[11]=this.mat4[11],a.mat4[12]=this.mat4[12],a.mat4[13]=this.mat4[13],a.mat4[14]=this.mat4[14],a.mat4[15]=this.mat4[15],a},d.Matrix.identity=function(){return new d.Matrix},d.Matrix.prototype.transpose=function(a){var b,c,e,f,h,i;return a instanceof d.Matrix?(b=a.mat4[1],c=a.mat4[2],e=a.mat4[3],f=a.mat4[6],h=a.mat4[7],i=a.mat4[11],this.mat4[0]=a.mat4[0],this.mat4[1]=a.mat4[4],this.mat4[2]=a.mat4[8],this.mat4[3]=a.mat4[12],this.mat4[4]=b,this.mat4[5]=a.mat4[5],this.mat4[6]=a.mat4[9],this.mat4[7]=a.mat4[13],this.mat4[8]=c,this.mat4[9]=f,this.mat4[10]=a.mat4[10],this.mat4[11]=a.mat4[14],this.mat4[12]=e,this.mat4[13]=h,this.mat4[14]=i,this.mat4[15]=a.mat4[15]):a instanceof g&&(b=a[1],c=a[2],e=a[3],f=a[6],h=a[7],i=a[11],this.mat4[0]=a[0],this.mat4[1]=a[4],this.mat4[2]=a[8],this.mat4[3]=a[12],this.mat4[4]=b,this.mat4[5]=a[5],this.mat4[6]=a[9],this.mat4[7]=a[13],this.mat4[8]=c,this.mat4[9]=f,this.mat4[10]=a[10],this.mat4[11]=a[14],this.mat4[12]=e,this.mat4[13]=h,this.mat4[14]=i,this.mat4[15]=a[15]),this},d.Matrix.prototype.invert=function(a){var b,c,e,f,h,i,j,k,l,m,n,o,p,q,r,s;a instanceof d.Matrix?(b=a.mat4[0],c=a.mat4[1],e=a.mat4[2],f=a.mat4[3],h=a.mat4[4],i=a.mat4[5],j=a.mat4[6],k=a.mat4[7],l=a.mat4[8],m=a.mat4[9],n=a.mat4[10],o=a.mat4[11],p=a.mat4[12],q=a.mat4[13],r=a.mat4[14],s=a.mat4[15]):a instanceof g&&(b=a[0],c=a[1],e=a[2],f=a[3],h=a[4],i=a[5],j=a[6],k=a[7],l=a[8],m=a[9],n=a[10],o=a[11],p=a[12],q=a[13],r=a[14],s=a[15]);var t=b*i-c*h,u=b*j-e*h,v=b*k-f*h,w=c*j-e*i,x=c*k-f*i,y=e*k-f*j,z=l*q-m*p,A=l*r-n*p,B=l*s-o*p,C=m*r-n*q,D=m*s-o*q,E=n*s-o*r,F=t*E-u*D+v*C+w*B-x*A+y*z;return F?(F=1/F,this.mat4[0]=(i*E-j*D+k*C)*F,this.mat4[1]=(e*D-c*E-f*C)*F,this.mat4[2]=(q*y-r*x+s*w)*F,this.mat4[3]=(n*x-m*y-o*w)*F,this.mat4[4]=(j*B-h*E-k*A)*F,this.mat4[5]=(b*E-e*B+f*A)*F,this.mat4[6]=(r*v-p*y-s*u)*F,this.mat4[7]=(l*y-n*v+o*u)*F,this.mat4[8]=(h*D-i*B+k*z)*F,this.mat4[9]=(c*B-b*D-f*z)*F,this.mat4[10]=(p*x-q*v+s*t)*F,this.mat4[11]=(m*v-l*x-o*t)*F,this.mat4[12]=(i*A-h*C-j*z)*F,this.mat4[13]=(b*C-c*A+e*z)*F,this.mat4[14]=(q*u-p*w-r*t)*F,this.mat4[15]=(l*w-m*u+n*t)*F,this):null},d.Matrix.prototype.determinant=function(){var a=this.mat4[0]*this.mat4[5]-this.mat4[1]*this.mat4[4],b=this.mat4[0]*this.mat4[6]-this.mat4[2]*this.mat4[4],c=this.mat4[0]*this.mat4[7]-this.mat4[3]*this.mat4[4],d=this.mat4[1]*this.mat4[6]-this.mat4[2]*this.mat4[5],e=this.mat4[1]*this.mat4[7]-this.mat4[3]*this.mat4[5],f=this.mat4[2]*this.mat4[7]-this.mat4[3]*this.mat4[6],g=this.mat4[8]*this.mat4[13]-this.mat4[9]*this.mat4[12],h=this.mat4[8]*this.mat4[14]-this.mat4[10]*this.mat4[12],i=this.mat4[8]*this.mat4[15]-this.mat4[11]*this.mat4[12],j=this.mat4[9]*this.mat4[14]-this.mat4[10]*this.mat4[13],k=this.mat4[9]*this.mat4[15]-this.mat4[11]*this.mat4[13],l=this.mat4[10]*this.mat4[15]-this.mat4[11]*this.mat4[14];return a*l-b*k+c*j+d*i-e*h+f*g},d.Matrix.prototype.mult=function(a){var b=new g(16),c=new g(16);a instanceof d.Matrix?c=a.mat4:a instanceof g&&(c=a);var e=this.mat4[0],f=this.mat4[1],h=this.mat4[2],i=this.mat4[3];return b[0]=e*c[0]+f*c[4]+h*c[8]+i*c[12],b[1]=e*c[1]+f*c[5]+h*c[9]+i*c[13],b[2]=e*c[2]+f*c[6]+h*c[10]+i*c[14],b[3]=e*c[3]+f*c[7]+h*c[11]+i*c[15],e=this.mat4[4],f=this.mat4[5],h=this.mat4[6],i=this.mat4[7],b[4]=e*c[0]+f*c[4]+h*c[8]+i*c[12],b[5]=e*c[1]+f*c[5]+h*c[9]+i*c[13],b[6]=e*c[2]+f*c[6]+h*c[10]+i*c[14],b[7]=e*c[3]+f*c[7]+h*c[11]+i*c[15],e=this.mat4[8],f=this.mat4[9],h=this.mat4[10],i=this.mat4[11],b[8]=e*c[0]+f*c[4]+h*c[8]+i*c[12],b[9]=e*c[1]+f*c[5]+h*c[9]+i*c[13],b[10]=e*c[2]+f*c[6]+h*c[10]+i*c[14],b[11]=e*c[3]+f*c[7]+h*c[11]+i*c[15],e=this.mat4[12],f=this.mat4[13],h=this.mat4[14],i=this.mat4[15],b[12]=e*c[0]+f*c[4]+h*c[8]+i*c[12],b[13]=e*c[1]+f*c[5]+h*c[9]+i*c[13],b[14]=e*c[2]+f*c[6]+h*c[10]+i*c[14],b[15]=e*c[3]+f*c[7]+h*c[11]+i*c[15],this.mat4=b,this},d.Matrix.prototype.scale=function(){for(var a,b,c,e=new Array(arguments.length),f=0;f1e3){var c=Object.keys(this.gHash)[0];delete this.gHash[c],e--}var d=this.GL;this.gHash[a]={},this.gHash[a].len=[],this.gHash[a].vertexBuffer=[],this.gHash[a].normalBuffer=[],this.gHash[a].uvBuffer=[],this.gHash[a].indexBuffer=[],b.forEach(function(b){this.gHash[a].len.push(b.len),this.gHash[a].vertexBuffer.push(d.createBuffer()),this.gHash[a].normalBuffer.push(d.createBuffer()),this.gHash[a].uvBuffer.push(d.createBuffer()),this.gHash[a].indexBuffer.push(d.createBuffer())}.bind(this))},d.Renderer3D.prototype.initBuffer=function(a,b){this._setDefaultCamera();var c=this.GL;this.createBuffer(a,b);var d=this.mHash[this._getCurShaderId()];b.forEach(function(b,e){c.bindBuffer(c.ARRAY_BUFFER,this.gHash[a].vertexBuffer[e]),c.bufferData(c.ARRAY_BUFFER,new Float32Array(b.vertices),c.STATIC_DRAW),c.vertexAttribPointer(d.vertexPositionAttribute,3,c.FLOAT,!1,0,0),c.bindBuffer(c.ARRAY_BUFFER,this.gHash[a].normalBuffer[e]),c.bufferData(c.ARRAY_BUFFER,new Float32Array(b.vertexNormals),c.STATIC_DRAW),c.vertexAttribPointer(d.vertexNormalAttribute,3,c.FLOAT,!1,0,0),c.bindBuffer(c.ARRAY_BUFFER,this.gHash[a].uvBuffer[e]),c.bufferData(c.ARRAY_BUFFER,new Float32Array(b.uvs),c.STATIC_DRAW),c.vertexAttribPointer(d.textureCoordAttribute,2,c.FLOAT,!1,0,0),c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,this.gHash[a].indexBuffer[e]),c.bufferData(c.ELEMENT_ARRAY_BUFFER,new Uint16Array(b.faces),c.STATIC_DRAW)}.bind(this))},d.Renderer3D.prototype.drawBuffer=function(a){this._setDefaultCamera();var b=this.GL,c=this._getCurShaderId(),d=this.mHash[c];this.gHash[a].len.forEach(function(e,f){b.bindBuffer(b.ARRAY_BUFFER,this.gHash[a].vertexBuffer[f]),b.vertexAttribPointer(d.vertexPositionAttribute,3,b.FLOAT,!1,0,0),b.bindBuffer(b.ARRAY_BUFFER,this.gHash[a].normalBuffer[f]),b.vertexAttribPointer(d.vertexNormalAttribute,3,b.FLOAT,!1,0,0), +b.bindBuffer(b.ARRAY_BUFFER,this.gHash[a].uvBuffer[f]),b.vertexAttribPointer(d.textureCoordAttribute,2,b.FLOAT,!1,0,0),b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,this.gHash[a].indexBuffer[f]),this.setMatrixUniforms(c),b.drawElements(b.TRIANGLES,this.gHash[a].len[f],b.UNSIGNED_SHORT,0)}.bind(this))},b.exports=d.Renderer3D},{"../core/core":50}],40:[function(a,b,c){b.exports={vertexColorVert:"attribute vec3 aPosition;\nattribute vec4 aVertexColor;\n\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nuniform float uResolution;\n\nvarying vec4 vColor;\n\nvoid main(void) {\n vec4 positionVec4 = vec4(aPosition / uResolution * vec3(1.0, -1.0, 1.0), 1.0);\n gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\n vColor = aVertexColor;\n}",vertexColorFrag:"precision mediump float;\nvarying vec4 vColor;\nvoid main(void) {\n gl_FragColor = vColor;\n}",normalVert:"attribute vec3 aPosition;\nattribute vec3 aNormal;\nattribute vec2 aTexCoord;\n\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nuniform mat4 uNormalMatrix;\nuniform float uResolution;\n\nvarying vec3 vVertexNormal;\nvarying highp vec2 vVertTexCoord;\n\nvoid main(void) {\n vec4 positionVec4 = vec4(aPosition / uResolution, 1.0);\n gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\n vVertexNormal = vec3( uNormalMatrix * vec4( aNormal, 1.0 ) );\n vVertTexCoord = aTexCoord;\n}",normalFrag:"precision mediump float;\nvarying vec3 vVertexNormal;\nvoid main(void) {\n gl_FragColor = vec4(vVertexNormal, 1.0);\n}",basicFrag:"precision mediump float;\nvarying vec3 vVertexNormal;\nuniform vec4 uMaterialColor;\nvoid main(void) {\n gl_FragColor = uMaterialColor;\n}",lightVert:"attribute vec3 aPosition;\nattribute vec3 aNormal;\nattribute vec2 aTexCoord;\n\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nuniform mat4 uNormalMatrix;\nuniform float uResolution;\nuniform int uAmbientLightCount;\nuniform int uDirectionalLightCount;\nuniform int uPointLightCount;\n\nuniform vec3 uAmbientColor[8];\nuniform vec3 uLightingDirection[8];\nuniform vec3 uDirectionalColor[8];\nuniform vec3 uPointLightLocation[8];\nuniform vec3 uPointLightColor[8];\nuniform bool uSpecular;\n\nvarying vec3 vVertexNormal;\nvarying vec2 vVertTexCoord;\nvarying vec3 vLightWeighting;\n\nvec3 ambientLightFactor = vec3(0.0, 0.0, 0.0);\nvec3 directionalLightFactor = vec3(0.0, 0.0, 0.0);\nvec3 pointLightFactor = vec3(0.0, 0.0, 0.0);\nvec3 pointLightFactor2 = vec3(0.0, 0.0, 0.0);\n\nvoid main(void){\n\n vec4 positionVec4 = vec4(aPosition / uResolution, 1.0);\n gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\n\n vec3 vertexNormal = vec3( uNormalMatrix * vec4( aNormal, 1.0 ) );\n vVertexNormal = vertexNormal;\n vVertTexCoord = aTexCoord;\n\n vec4 mvPosition = uModelViewMatrix * vec4(aPosition / uResolution, 1.0);\n vec3 eyeDirection = normalize(-mvPosition.xyz);\n\n float shininess = 32.0;\n float specularFactor = 2.0;\n float diffuseFactor = 0.3;\n\n for(int i = 0; i < 8; i++){\n if(uAmbientLightCount == i) break;\n ambientLightFactor += uAmbientColor[i];\n }\n\n for(int j = 0; j < 8; j++){\n if(uDirectionalLightCount == j) break;\n vec3 dir = uLightingDirection[j];\n float directionalLightWeighting = max(dot(vertexNormal, dir), 0.0);\n directionalLightFactor += uDirectionalColor[j] * directionalLightWeighting;\n }\n\n for(int k = 0; k < 8; k++){\n if(uPointLightCount == k) break;\n vec3 loc = uPointLightLocation[k];\n //loc = loc / uResolution;\n vec3 lightDirection = normalize(loc - mvPosition.xyz);\n\n float directionalLightWeighting = max(dot(vertexNormal, lightDirection), 0.0);\n pointLightFactor += uPointLightColor[k] * directionalLightWeighting;\n\n //factor2 for specular\n vec3 reflectionDirection = reflect(-lightDirection, vertexNormal);\n float specularLightWeighting = pow(max(dot(reflectionDirection, eyeDirection), 0.0), shininess);\n\n pointLightFactor2 += uPointLightColor[k] * (specularFactor * specularLightWeighting\n + directionalLightWeighting * diffuseFactor);\n }\n \n if(!uSpecular){\n vLightWeighting = ambientLightFactor + directionalLightFactor + pointLightFactor;\n }else{\n vLightWeighting = ambientLightFactor + directionalLightFactor + pointLightFactor2;\n }\n\n}",lightTextureFrag:"precision mediump float;\n\nuniform vec4 uMaterialColor;\nuniform sampler2D uSampler;\nuniform bool isTexture;\n\nvarying vec3 vLightWeighting;\nvarying highp vec2 vVertTexCoord;\n\nvoid main(void) {\n if(!isTexture){\n gl_FragColor = vec4(vec3(uMaterialColor.rgb * vLightWeighting), uMaterialColor.a);\n }else{\n vec4 textureColor = texture2D(uSampler, vVertTexCoord);\n if(vLightWeighting == vec3(0., 0., 0.)){\n gl_FragColor = textureColor;\n }else{\n gl_FragColor = vec4(vec3(textureColor.rgb * vLightWeighting), textureColor.a); \n }\n }\n}"}},{}],41:[function(a,b,c){"use strict";var d=a("./core/core");a("./color/p5.Color"),a("./core/p5.Element"),a("./typography/p5.Font"),a("./core/p5.Graphics"),a("./core/p5.Renderer2D"),a("./image/p5.Image"),a("./math/p5.Vector"),a("./io/p5.TableRow"),a("./io/p5.Table"),a("./color/creating_reading"),a("./color/setting"),a("./core/constants"),a("./utilities/conversion"),a("./utilities/array_functions"),a("./utilities/string_functions"),a("./core/environment"),a("./image/image"),a("./image/loading_displaying"),a("./image/pixels"),a("./io/files"),a("./events/keyboard"),a("./events/acceleration"),a("./events/mouse"),a("./utilities/time_date"),a("./events/touch"),a("./math/math"),a("./math/calculation"),a("./math/random"),a("./math/noise"),a("./math/trigonometry"),a("./core/rendering"),a("./core/2d_primitives"),a("./core/attributes"),a("./core/curves"),a("./core/vertex"),a("./core/structure"),a("./core/transform"),a("./typography/attributes"),a("./typography/loading_displaying"),a("./3d/p5.Renderer3D"),a("./3d/p5.Geometry3D"),a("./3d/retainedMode3D"),a("./3d/immediateMode3D"),a("./3d/3d_primitives"),a("./3d/p5.Matrix"),a("./3d/material"),a("./3d/light"),a("./3d/shader"),a("./3d/camera"),a("./3d/interaction");var e=function(){window.PHANTOMJS||window.mocha||(window.setup&&"function"==typeof window.setup||window.draw&&"function"==typeof window.draw)&&new d};"complete"===document.readyState?e():window.addEventListener("load",e,!1),b.exports=d},{"./3d/3d_primitives":30,"./3d/camera":31,"./3d/immediateMode3D":32,"./3d/interaction":33,"./3d/light":34,"./3d/material":35,"./3d/p5.Geometry3D":36,"./3d/p5.Matrix":37,"./3d/p5.Renderer3D":38,"./3d/retainedMode3D":39,"./3d/shader":40,"./color/creating_reading":43,"./color/p5.Color":44,"./color/setting":45,"./core/2d_primitives":46,"./core/attributes":47,"./core/constants":49,"./core/core":50,"./core/curves":51,"./core/environment":52,"./core/p5.Element":54,"./core/p5.Graphics":55,"./core/p5.Renderer2D":57,"./core/rendering":58,"./core/structure":60,"./core/transform":61,"./core/vertex":62,"./events/acceleration":63,"./events/keyboard":64,"./events/mouse":65,"./events/touch":66,"./image/image":68,"./image/loading_displaying":69,"./image/p5.Image":70,"./image/pixels":71,"./io/files":72,"./io/p5.Table":73,"./io/p5.TableRow":74,"./math/calculation":75,"./math/math":76,"./math/noise":77,"./math/p5.Vector":78,"./math/random":80,"./math/trigonometry":81,"./typography/attributes":82,"./typography/loading_displaying":83,"./typography/p5.Font":84,"./utilities/array_functions":85,"./utilities/conversion":86,"./utilities/string_functions":87,"./utilities/time_date":88}],42:[function(a,b,c){"use strict";var d=a("../core/core");d.ColorConversion={},d.ColorConversion._hsbaToHSLA=function(a){var b=a[0],c=a[1],d=a[2],e=(2-c)*d/2;return 0!==e&&(1===e?c=0:.5>e?c/=2-c:c=c*d/(2-2*e)),[b,c,e,a[3]]},d.ColorConversion._hsbaToRGBA=function(a){var b=6*a[0],c=a[1],d=a[2],e=[];if(0===c)e=[d,d,d,a[3]];else{var f,g,h,i=Math.floor(b),j=d*(1-c),k=d*(1-c*(b-i)),l=d*(1-c*(1+i-b));0===i?(f=d,g=l,h=j):1===i?(f=k,g=d,h=j):2===i?(f=j,g=d,h=l):3===i?(f=j,g=k,h=d):4===i?(f=l,g=j,h=d):(f=d,g=j,h=k),e=[f,g,h,a[3]]}return e},d.ColorConversion._hslaToHSBA=function(a){var b,c=a[0],d=a[1],e=a[2];return b=.5>e?(1+d)*e:e+d-e*d,d=2*(b-e)/b,[c,d,b,a[3]]},d.ColorConversion._hslaToRGBA=function(a){var b=6*a[0],c=a[1],d=a[2],e=[];if(0===c)e=[d,d,d,a[3]];else{var f;f=.5>d?(1+c)*d:d+c-d*c;var g=2*d-f,h=function(a,b,c){return 0>a?a+=6:a>=6&&(a-=6),1>a?b+(c-b)*a:3>a?c:4>a?b+(c-b)*(4-a):b};e=[h(b+2,g,f),h(b,g,f),h(b-2,g,f),a[3]]}return e},d.ColorConversion._rgbaToHSBA=function(a){var b,c,d=a[0],e=a[1],f=a[2],g=Math.max(d,e,f),h=g-Math.min(d,e,f);return 0===h?(b=0,c=0):(c=h/g,d===g?b=(e-f)/h:e===g?b=2+(f-d)/h:f===g&&(b=4+(d-e)/h),0>b?b+=6:b>=6&&(b-=6)),[b/6,c,g,a[3]]},d.ColorConversion._rgbaToHSLA=function(a){var b,c,d=a[0],e=a[1],f=a[2],g=Math.max(d,e,f),h=Math.min(d,e,f),i=g+h,j=g-h;return 0===j?(b=0,c=0):(c=1>i?j/i:j/(2-j),d===g?b=(e-f)/j:e===g?b=2+(f-d)/j:f===g&&(b=4+(d-e)/j),0>b?b+=6:b>=6&&(b-=6)),[b/6,c,i/2,a[3]]},b.exports=d.ColorConversion},{"../core/core":50}],43:[function(a,b,c){"use strict";var d=a("../core/core"),e=a("../core/constants");a("./p5.Color"),d.prototype.alpha=function(a){if(a instanceof d.Color||a instanceof Array)return this.color(a)._getAlpha();throw new Error("Needs p5.Color or pixel array as argument.")},d.prototype.blue=function(a){if(a instanceof d.Color||a instanceof Array)return this.color(a)._getBlue();throw new Error("Needs p5.Color or pixel array as argument.")},d.prototype.brightness=function(a){if(a instanceof d.Color||a instanceof Array)return this.color(a)._getBrightness();throw new Error("Needs p5.Color or pixel array as argument.")},d.prototype.color=function(){return arguments[0]instanceof d.Color?arguments[0]:arguments[0]instanceof Array?new d.Color(this,arguments[0]):new d.Color(this,arguments)},d.prototype.green=function(a){if(a instanceof d.Color||a instanceof Array)return this.color(a)._getGreen();throw new Error("Needs p5.Color or pixel array as argument.")},d.prototype.hue=function(a){if(a instanceof d.Color||a instanceof Array)return this.color(a)._getHue();throw new Error("Needs p5.Color or pixel array as argument.")},d.prototype.lerpColor=function(a,b,c){var d,f,g,h,i,j,k=this._renderer._colorMode,l=this._renderer._colorMaxes;if(k===e.RGB)i=a.levels.map(function(a){return a/255}),j=b.levels.map(function(a){return a/255});else if(k===e.HSB)a._getBrightness(),b._getBrightness(),i=a.hsba,j=b.hsba;else{if(k!==e.HSL)throw new Error(k+"cannot be used for interpolation.");a._getLightness(),b._getLightness(),i=a.hsla,j=b.hsla}return c=Math.max(Math.min(c,1),0),d=this.lerp(i[0],j[0],c),f=this.lerp(i[1],j[1],c),g=this.lerp(i[2],j[2],c),h=this.lerp(i[3],j[3],c),d*=l[k][0],f*=l[k][1],g*=l[k][2],h*=l[k][3],this.color(d,f,g,h)},d.prototype.lightness=function(a){if(a instanceof d.Color||a instanceof Array)return this.color(a)._getLightness();throw new Error("Needs p5.Color or pixel array as argument.")},d.prototype.red=function(a){if(a instanceof d.Color||a instanceof Array)return this.color(a)._getRed();throw new Error("Needs p5.Color or pixel array as argument.")},d.prototype.saturation=function(a){if(a instanceof d.Color||a instanceof Array)return this.color(a)._getSaturation();throw new Error("Needs p5.Color or pixel array as argument.")},b.exports=d},{"../core/constants":49,"../core/core":50,"./p5.Color":44}],44:[function(a,b,c){var d=a("../core/core"),e=a("../core/constants"),f=a("./color_conversion");d.Color=function(a,b){if(this.mode=a._renderer._colorMode,this.maxes=a._renderer._colorMaxes,this.mode!==e.RGB&&this.mode!==e.HSL&&this.mode!==e.HSB)throw new Error(this.mode+" is an invalid colorMode.");return this._array=d.Color._parseInputs.apply(a,b),this.levels=this._array.map(function(a){return Math.round(255*a)}),this},d.Color.prototype.toString=function(){var a=this.levels;return a[3]=this._array[3],"rgba("+a[0]+","+a[1]+","+a[2]+","+a[3]+")"},d.Color.prototype._getAlpha=function(){return this._array[3]*this.maxes[this.mode][3]},d.Color.prototype._getBlue=function(){return this._array[2]*this.maxes[e.RGB][2]},d.Color.prototype._getBrightness=function(){return this.hsba||(this.hsba=f._rgbaToHSBA(this._array)),this.hsba[2]*this.maxes[e.HSB][2]},d.Color.prototype._getGreen=function(){return this._array[1]*this.maxes[e.RGB][1]},d.Color.prototype._getHue=function(){return this.mode===e.HSB?(this.hsba||(this.hsba=f._rgbaToHSBA(this._array)),this.hsba[0]*this.maxes[e.HSB][0]):(this.hsla||(this.hsla=f._rgbaToHSLA(this._array)),this.hsla[0]*this.maxes[e.HSL][0])},d.Color.prototype._getLightness=function(){return this.hsla||(this.hsla=f._rgbaToHSLA(this._array)),this.hsla[2]*this.maxes[e.HSL][2]},d.Color.prototype._getRed=function(){return this._array[0]*this.maxes[e.RGB][0]},d.Color.prototype._getSaturation=function(){return this.mode===e.HSB?(this.hsba||(this.hsba=f._rgbaToHSBA(this._array)),this.hsba[1]*this.maxes[e.HSB][1]):(this.hsla||(this.hsla=f._rgbaToHSLA(this._array)),this.hsla[1]*this.maxes[e.HSL][1])};var g={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},h=/\s*/,i=/(\d{1,3})/,j=/((?:\d+(?:\.\d+)?)|(?:\.\d+))/,k=new RegExp(j.source+"%"),l={HEX3:/^#([a-f0-9])([a-f0-9])([a-f0-9])$/i,HEX6:/^#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})$/i,RGB:new RegExp(["^rgb\\(",i.source,",",i.source,",",i.source,"\\)$"].join(h.source),"i"),RGB_PERCENT:new RegExp(["^rgb\\(",k.source,",",k.source,",",k.source,"\\)$"].join(h.source),"i"),RGBA:new RegExp(["^rgba\\(",i.source,",",i.source,",",i.source,",",j.source,"\\)$"].join(h.source),"i"),RGBA_PERCENT:new RegExp(["^rgba\\(",k.source,",",k.source,",",k.source,",",j.source,"\\)$"].join(h.source),"i"),HSL:new RegExp(["^hsl\\(",i.source,",",k.source,",",k.source,"\\)$"].join(h.source),"i"),HSLA:new RegExp(["^hsla\\(",i.source,",",k.source,",",k.source,",",j.source,"\\)$"].join(h.source),"i"),HSB:new RegExp(["^hsb\\(",i.source,",",k.source,",",k.source,"\\)$"].join(h.source),"i"),HSBA:new RegExp(["^hsba\\(",i.source,",",k.source,",",k.source,",",j.source,"\\)$"].join(h.source),"i")};d.Color._parseInputs=function(){var a=arguments.length,b=this._renderer._colorMode,c=this._renderer._colorMaxes,h=[];if(a>=3)return h[0]=arguments[0]/c[b][0],h[1]=arguments[1]/c[b][1],h[2]=arguments[2]/c[b][2],"number"==typeof arguments[3]?h[3]=arguments[3]/c[b][3]:h[3]=1,h=h.map(function(a){return Math.max(Math.min(a,1),0)}),b===e.HSL?f._hslaToRGBA(h):b===e.HSB?f._hsbaToRGBA(h):h;if(1===a&&"string"==typeof arguments[0]){var i=arguments[0].trim().toLowerCase();if(g[i])return d.Color._parseInputs.apply(this,[g[i]]);if(l.HEX3.test(i))return h=l.HEX3.exec(i).slice(1).map(function(a){return parseInt(a+a,16)/255}),h[3]=1,h;if(l.HEX6.test(i))return h=l.HEX6.exec(i).slice(1).map(function(a){return parseInt(a,16)/255}),h[3]=1,h;if(l.RGB.test(i))return h=l.RGB.exec(i).slice(1).map(function(a){return a/255}),h[3]=1,h;if(l.RGB_PERCENT.test(i))return h=l.RGB_PERCENT.exec(i).slice(1).map(function(a){return parseFloat(a)/100}),h[3]=1,h;if(l.RGBA.test(i))return h=l.RGBA.exec(i).slice(1).map(function(a,b){return 3===b?parseFloat(a):a/255});if(l.RGBA_PERCENT.test(i))return h=l.RGBA_PERCENT.exec(i).slice(1).map(function(a,b){return 3===b?parseFloat(a):parseFloat(a)/100});if(l.HSL.test(i)?(h=l.HSL.exec(i).slice(1).map(function(a,b){return 0===b?parseInt(a,10)/360:parseInt(a,10)/100}),h[3]=1):l.HSLA.test(i)&&(h=l.HSLA.exec(i).slice(1).map(function(a,b){return 0===b?parseInt(a,10)/360:3===b?parseFloat(a):parseInt(a,10)/100})),h.length)return f._hslaToRGBA(h);if(l.HSB.test(i)?(h=l.HSB.exec(i).slice(1).map(function(a,b){return 0===b?parseInt(a,10)/360:parseInt(a,10)/100}),h[3]=1):l.HSBA.test(i)&&(h=l.HSBA.exec(i).slice(1).map(function(a,b){return 0===b?parseInt(a,10)/360:3===b?parseFloat(a):parseInt(a,10)/100})),h.length)return f._hsbaToRGBA(h);h=[1,1,1,1]}else{if(1!==a&&2!==a||"number"!=typeof arguments[0])throw new Error(arguments+"is not a valid color representation.");h[0]=arguments[0]/c[b][2],h[1]=arguments[0]/c[b][2],h[2]=arguments[0]/c[b][2],"number"==typeof arguments[1]?h[3]=arguments[1]/c[b][3]:h[3]=1,h=h.map(function(a){return Math.max(Math.min(a,1),0)})}return h},b.exports=d.Color},{"../core/constants":49,"../core/core":50,"./color_conversion":42}],45:[function(a,b,c){"use strict";var d=a("../core/core"),e=a("../core/constants");a("./p5.Color"),d.prototype.background=function(){return arguments[0]instanceof d.Image?this.image(arguments[0],0,0,this.width,this.height):this._renderer.background.apply(this._renderer,arguments),this},d.prototype.clear=function(){return this._renderer.clear(),this},d.prototype.colorMode=function(){if(arguments[0]===e.RGB||arguments[0]===e.HSB||arguments[0]===e.HSL){this._renderer._colorMode=arguments[0];var a=this._renderer._colorMaxes[this._renderer._colorMode];2===arguments.length?(a[0]=arguments[1],a[1]=arguments[1],a[2]=arguments[1],a[3]=arguments[1]):4===arguments.length?(a[0]=arguments[1],a[1]=arguments[2],a[2]=arguments[3]):5===arguments.length&&(a[0]=arguments[1],a[1]=arguments[2],a[2]=arguments[3],a[3]=arguments[4])}return this},d.prototype.fill=function(){return this._renderer._setProperty("_fillSet",!0),this._renderer._setProperty("_doFill",!0),this._renderer.fill.apply(this._renderer,arguments),this},d.prototype.noFill=function(){return this._renderer._setProperty("_doFill",!1),this},d.prototype.noStroke=function(){return this._renderer._setProperty("_doStroke",!1),this},d.prototype.stroke=function(){return this._renderer._setProperty("_strokeSet",!0),this._renderer._setProperty("_doStroke",!0),this._renderer.stroke.apply(this._renderer,arguments),this},b.exports=d},{"../core/constants":49,"../core/core":50,"./p5.Color":44}],46:[function(a,b,c){"use strict";var d=a("./core"),e=a("./constants");a("./error_helpers"),d.prototype.arc=function(a,b,c,d,f,g,h){for(var i=new Array(arguments.length),j=0;jf;)f+=e.TWO_PI;for(;0>g;)g+=e.TWO_PI;return f%=e.TWO_PI,g%=e.TWO_PI,f=f<=e.HALF_PI?Math.atan(c/d*Math.tan(f)):f>e.HALF_PI&&f<=3*e.HALF_PI?Math.atan(c/d*Math.tan(f))+e.PI:Math.atan(c/d*Math.tan(f))+e.TWO_PI,g=g<=e.HALF_PI?Math.atan(c/d*Math.tan(g)):g>e.HALF_PI&&g<=3*e.HALF_PI?Math.atan(c/d*Math.tan(g))+e.PI:Math.atan(c/d*Math.tan(g))+e.TWO_PI,f>g&&(g+=e.TWO_PI),c=Math.abs(c),d=Math.abs(d),this._renderer.arc(a,b,c,d,f,g,h),this},d.prototype.ellipse=function(a,b,c,d){for(var e=new Array(arguments.length),f=0;f=c-d)&&(this._renderer.isP3D&&this._renderer._update(),this._setProperty("frameCount",this.frameCount+1),this._updateMouseCoords(),this._updateTouchCoords(),this.redraw(),this._frameRate=1e3/(a-this._lastFrameTime),this._lastFrameTime=a),this._loop&&(this._requestAnimId=window.requestAnimationFrame(this._draw))}.bind(this),this._runFrames=function(){this._updateInterval&&clearInterval(this._updateInterval)}.bind(this),this._setProperty=function(a,b){this[a]=b,this._isGlobal&&(window[a]=b)}.bind(this),this.remove=function(){if(this._curElement){this._loop=!1,this._requestAnimId&&window.cancelAnimationFrame(this._requestAnimId);for(var a in this._events)window.removeEventListener(a,this._events[a]);for(var b=0;b-1)d=a;else if("string"==typeof a){var f="";b&&c&&"number"==typeof b&&"number"==typeof c&&(f=b+" "+c),d="http://"!==a.substring(0,6)?"url("+a+") "+f+", auto":/\.(cur|jpg|jpeg|gif|png|CUR|JPG|JPEG|GIF|PNG)$/.test(a)?"url("+a+") "+f+", auto":a}e.style.cursor=d},f.prototype.frameRate=function(a){return"number"!=typeof a||0>=a?this._frameRate:(this._setProperty("_targetFrameRate",a),this._runFrames(),this)},f.prototype.getFrameRate=function(){return this.frameRate()},f.prototype.setFrameRate=function(a){return this.frameRate(a)},f.prototype.noCursor=function(){this._curElement.elt.style.cursor="none"},f.prototype.displayWidth=screen.width,f.prototype.displayHeight=screen.height,f.prototype.windowWidth=window.innerWidth,f.prototype.windowHeight=window.innerHeight,f.prototype._onresize=function(a){this._setProperty("windowWidth",window.innerWidth),this._setProperty("windowHeight",window.innerHeight);var b,c=this._isGlobal?window:this;"function"==typeof c.windowResized&&(b=c.windowResized(a),void 0===b||b||a.preventDefault())},f.prototype.width=0,f.prototype.height=0,f.prototype.fullScreen=function(a){return"undefined"==typeof a?document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement:void(a?d(document.documentElement):e())},f.prototype.pixelDensity=function(a){return"number"!=typeof a?this._pixelDensity:(this._pixelDensity=a,void this.resizeCanvas(this.width,this.height,!0))},f.prototype.displayDensity=function(){return window.devicePixelRatio},f.prototype.getURL=function(){return location.href},f.prototype.getURLPath=function(){return location.pathname.split("/").filter(function(a){return""!==a})},f.prototype.getURLParams=function(){for(var a,b=/[?&]([^&=]+)(?:[&=])([^&=]+)/gim,c={};null!=(a=b.exec(location.search));)a.index===b.lastIndex&&b.lastIndex++,c[a[1]]=a[2];return c},b.exports=f},{"./constants":49,"./core":50}],53:[function(a,b,c){"use strict";function d(a,b,c){if(a.match(/^p5\./)){var d=a.split(".");return c instanceof h[d[1]]}return"Boolean"===a||a.toLowerCase()===b||q.indexOf(a)>-1&&p(c)}function e(a,b,c){i&&(f(),i=!1),"undefined"===n(c)?c="#B40033":"number"===n(c)&&(c=v[c])}function f(){var a="transparent",b="#ED225D",c="#ED225D",d="white";console.log("%c _ \n /\\| |/\\ \n \\ ` ' / \n / , . \\ \n \\/|_|\\/ \n\n%c> p5.js says: Welcome! This is your friendly debugger. To turn me off switch to using “p5.min.js”.","background-color:"+a+";color:"+b+";","background-color:"+c+";color:"+d+";")}function g(a){x.forEach(function(b){a.message&&-1!==a.message.indexOf(b)&&console.log("%c Did you just try to use p5.js's '"+b+"' function or variable? If so, you may want to move it into your sketch's setup() function.","color: #B40033")})}for(var h=a("./core"),i=!1,j={},k=j.toString,l=["Boolean","Number","String","Function","Array","Date","RegExp","Object","Error"],m=0;m=0},q=["Number","Integer","Number/Constant"],r=0,s=1,t=2,u=3,v=["#2D7BB6","#EE9900","#4DB200","#C83C00"];h.prototype._validateParameters=function(a,b,c){o(c[0])||(c=[c]);for(var f,g=Math.abs(b.length-c[0].length),h=0,i=1,j=c.length;j>i;i++){var k=Math.abs(b.length-c[i].length);g>=k&&(h=i,g=k)}var l="X";g>0&&(f="You wrote "+a+"(",b.length>0&&(f+=l+Array(b.length).join(","+l)),f+="). "+a+" was expecting "+c[h].length+" parameters. Try "+a+"(",c[h].length>0&&(f+=l+Array(c[h].length).join(","+l)),f+=").",c.length>1&&(f+=" "+a+" takes different numbers of parameters depending on what you want to do. Click this link to learn more: "),e(f,a,r));for(var m=0;m1&&(f+=" "+a+" takes different numbers of parameters depending on what you want to do. Click this link to learn more:"),e(f,a,t))}},h.prototype._validateParameters=function(){return!0};var w={0:{fileType:"image",method:"loadImage",message:" hosting the image online,"},1:{fileType:"XML file",method:"loadXML"},2:{fileType:"table file",method:"loadTable"},3:{fileType:"text file",method:"loadStrings"}};h._friendlyFileLoadError=function(a,b){var c=w[a],d="It looks like there was a problem loading your "+c.fileType+". Try checking if the file path%c ["+b+"] %cis correct,"+(c.message||"")+" or running a local server.";e(d,c.method,u)};var x=["color","random"];"complete"!==document.readyState&&(window.addEventListener("error",g,!1),window.addEventListener("load",function(){window.removeEventListener("error",g,!1)})),b.exports=h},{"./core":50}],54:[function(a,b,c){function d(a,b,c){var d=b.bind(c);c.elt.addEventListener(a,d,!1),c._events[a]=d}var e=a("./core");e.Element=function(a,b){this.elt=a,this._pInst=b,this._events={},this.width=this.elt.offsetWidth,this.height=this.elt.offsetHeight},e.Element.prototype.parent=function(a){return 0===arguments.length?this.elt.parentNode:("string"==typeof a?("#"===a[0]&&(a=a.substring(1)),a=document.getElementById(a)):a instanceof e.Element&&(a=a.elt),a.appendChild(this.elt),this)},e.Element.prototype.id=function(a){return 0===arguments.length?this.elt.id:(this.elt.id=a,this.width=this.elt.offsetWidth,this.height=this.elt.offsetHeight,this)},e.Element.prototype["class"]=function(a){return 0===arguments.length?this.elt.className:(this.elt.className=a,this.width=this.elt.offsetWidth,this.height=this.elt.offsetHeight,this)},e.Element.prototype.mousePressed=function(a){return d("mousedown",a,this),d("touchstart",a,this),this},e.Element.prototype.mouseWheel=function(a){return d("wheel",a,this),this},e.Element.prototype.mouseReleased=function(a){return d("mouseup",a,this),d("touchend",a,this),this},e.Element.prototype.mouseClicked=function(a){return d("click",a,this),this},e.Element.prototype.mouseMoved=function(a){return d("mousemove",a,this),d("touchmove",a,this),this},e.Element.prototype.mouseOver=function(a){return d("mouseover",a,this),this},e.Element.prototype.changed=function(a){return d("change",a,this),this},e.Element.prototype.input=function(a){return d("input",a,this),this},e.Element.prototype.mouseOut=function(a){return d("mouseout",a,this),this},e.Element.prototype.touchStarted=function(a){return d("touchstart",a,this),d("mousedown",a,this),this},e.Element.prototype.touchMoved=function(a){return d("touchmove",a,this),d("mousemove",a,this),this},e.Element.prototype.touchEnded=function(a){return d("touchend",a,this),d("mouseup",a,this),this},e.Element.prototype.dragOver=function(a){return d("dragover",a,this),this},e.Element.prototype.dragLeave=function(a){return d("dragleave",a,this),this},e.Element.prototype.drop=function(a,b){function c(b){var c=new e.File(b);return function(b){c.data=b.target.result,a(c)}}return window.File&&window.FileReader&&window.FileList&&window.Blob?(d("dragover",function(a){a.stopPropagation(),a.preventDefault()},this),d("dragleave",function(a){a.stopPropagation(),a.preventDefault()},this),arguments.length>1&&d("drop",b,this),d("drop",function(a){a.stopPropagation(),a.preventDefault();for(var b=a.dataTransfer.files,d=0;d-1?f.readAsText(e):f.readAsDataURL(e)}},this)):console.log("The File APIs are not fully supported in this browser."),this},e.Element.prototype._setProperty=function(a,b){this[a]=b},b.exports=e.Element},{"./core":50}],55:[function(a,b,c){var d=a("./core"),e=a("./constants");d.Graphics=function(a,b,c,f){var g=c||e.P2D,h=document.createElement("canvas"),i=this._userNode||document.body;i.appendChild(h),d.Element.call(this,h,f,!1),this._styles=[],this.width=a,this.height=b,this._pixelDensity=f._pixelDensity,g===e.WEBGL?this._renderer=new d.Renderer3D(h,f,!1):this._renderer=new d.Renderer2D(h,f,!1),this._renderer.resize(a,b),this._renderer._applyDefaults(),f._elements.push(this);for(var j in d.prototype)this[j]||("function"==typeof d.prototype[j]?this[j]=d.prototype[j].bind(this):this[j]=d.prototype[j]);return this},d.Graphics.prototype=Object.create(d.Element.prototype),b.exports=d.Graphics},{"./constants":49,"./core":50}],56:[function(a,b,c){function d(a){var b=0,c=0;if(a.offsetParent){do b+=a.offsetLeft,c+=a.offsetTop;while(a=a.offsetParent)}else b+=a.offsetLeft,c+=a.offsetTop;return[b,c]}var e=a("./core"),f=a("../core/constants");e.Renderer=function(a,b,c){e.Element.call(this,a,b),this.canvas=a,this._pInst=b,c?(this._isMainCanvas=!0,this._pInst._setProperty("_curElement",this),this._pInst._setProperty("canvas",this.canvas),this._pInst._setProperty("width",this.width),this._pInst._setProperty("height",this.height)):(this.canvas.style.display="none",this._styles=[]),this._textSize=12,this._textLeading=15,this._textFont="sans-serif",this._textStyle=f.NORMAL,this._textAscent=null,this._textDescent=null,this._rectMode=f.CORNER,this._ellipseMode=f.CENTER,this._curveTightness=0,this._imageMode=f.CORNER,this._tint=null,this._doStroke=!0,this._doFill=!0,this._strokeSet=!1,this._fillSet=!1,this._colorMode=f.RGB,this._colorMaxes={rgb:[255,255,255,255],hsb:[360,100,100,1],hsl:[360,100,100,1]}},e.Renderer.prototype=Object.create(e.Element.prototype),e.Renderer.prototype.resize=function(a,b){this.width=a,this.height=b,this.elt.width=a*this._pInst._pixelDensity,this.elt.height=b*this._pInst._pixelDensity,this.elt.style.width=a+"px",this.elt.style.height=b+"px",this._isMainCanvas&&(this._pInst._setProperty("width",this.width),this._pInst._setProperty("height",this.height))},e.Renderer.prototype.textLeading=function(a){return arguments.length&&arguments[0]?(this._setProperty("_textLeading",a),this):this._textLeading},e.Renderer.prototype.textSize=function(a){return arguments.length&&arguments[0]?(this._setProperty("_textSize",a),this._setProperty("_textLeading",a*f._DEFAULT_LEADMULT),this._applyTextProperties()):this._textSize},e.Renderer.prototype.textStyle=function(a){return arguments.length&&arguments[0]?((a===f.NORMAL||a===f.ITALIC||a===f.BOLD)&&this._setProperty("_textStyle",a),this._applyTextProperties()):this._textStyle},e.Renderer.prototype.textAscent=function(){return null===this._textAscent&&this._updateTextMetrics(),this._textAscent},e.Renderer.prototype.textDescent=function(){return null===this._textDescent&&this._updateTextMetrics(),this._textDescent},e.Renderer.prototype._isOpenType=function(a){return a=a||this._textFont,"object"==typeof a&&a.font&&a.font.supported},e.Renderer.prototype._updateTextMetrics=function(){if(this._isOpenType())return this._setProperty("_textAscent",this._textFont._textAscent()),this._setProperty("_textDescent",this._textFont._textDescent()),this;var a=document.createElement("span");a.style.fontFamily=this._textFont,a.style.fontSize=this._textSize+"px",a.innerHTML="ABCjgq|";var b=document.createElement("div");b.style.display="inline-block",b.style.width="1px",b.style.height="0px";var c=document.createElement("div");c.appendChild(a),c.appendChild(b),c.style.height="0px",c.style.overflow="hidden",document.body.appendChild(c),b.style.verticalAlign="baseline";var e=d(b),f=d(a),g=e[1]-f[1];b.style.verticalAlign="bottom",e=d(b),f=d(a);var h=e[1]-f[1],i=h-g;return document.body.removeChild(c),this._setProperty("_textAscent",g),this._setProperty("_textDescent",i),this},b.exports=e.Renderer},{"../core/constants":49,"./core":50}],57:[function(a,b,c){var d=a("./core"),e=a("./canvas"),f=a("./constants"),g=a("../image/filters");a("./p5.Renderer");var h="rgba(0,0,0,0)";d.Renderer2D=function(a,b,c){return d.Renderer.call(this,a,b,c),this.drawingContext=this.canvas.getContext("2d"),this._pInst._setProperty("drawingContext",this.drawingContext),this},d.Renderer2D.prototype=Object.create(d.Renderer.prototype),d.Renderer2D.prototype._applyDefaults=function(){this.drawingContext.fillStyle=f._DEFAULT_FILL,this.drawingContext.strokeStyle=f._DEFAULT_STROKE,this.drawingContext.lineCap=f.ROUND,this.drawingContext.font="normal 12px sans-serif"},d.Renderer2D.prototype.resize=function(a,b){d.Renderer.prototype.resize.call(this,a,b),this.drawingContext.scale(this._pInst._pixelDensity,this._pInst._pixelDensity)},d.Renderer2D.prototype.background=function(){if(this.drawingContext.save(),this.drawingContext.setTransform(1,0,0,1,0,0),this.drawingContext.scale(this._pInst._pixelDensity,this._pInst._pixelDensity),arguments[0]instanceof d.Image)this._pInst.image(arguments[0],0,0,this.width,this.height);else{var a=this.drawingContext.fillStyle,b=this._pInst.color.apply(this._pInst,arguments),c=b.toString();this.drawingContext.fillStyle=c,this.drawingContext.fillRect(0,0,this.width,this.height),this.drawingContext.fillStyle=a}this.drawingContext.restore()},d.Renderer2D.prototype.clear=function(){this.drawingContext.clearRect(0,0,this.width,this.height)},d.Renderer2D.prototype.fill=function(){var a=this.drawingContext,b=this._pInst.color.apply(this._pInst,arguments);a.fillStyle=b.toString()},d.Renderer2D.prototype.stroke=function(){var a=this.drawingContext,b=this._pInst.color.apply(this._pInst,arguments);a.strokeStyle=b.toString()},d.Renderer2D.prototype.image=function(a,b,c,e,f,g,h,i,j){var k;try{this._tint&&(d.MediaElement&&a instanceof d.MediaElement&&a.loadPixels(),a.canvas&&(k=this._getTintedImageCanvas(a))),k||(k=a.canvas||a.elt),this.drawingContext.drawImage(k,b,c,e,f,g,h,i,j)}catch(l){if("NS_ERROR_NOT_AVAILABLE"!==l.name)throw l}},d.Renderer2D.prototype._getTintedImageCanvas=function(a){if(!a.canvas)return a;var b=g._toPixels(a.canvas),c=document.createElement("canvas");c.width=a.canvas.width,c.height=a.canvas.height;for(var d=c.getContext("2d"),e=d.createImageData(a.canvas.width,a.canvas.height),f=e.data,h=0;ha+c||0>b+e||a>this.width||b>this.height)return[0,0,0,255];var f=this._pInst||this,g=f._pixelDensity;if(this.loadPixels.call(f),a=Math.floor(a),b=Math.floor(b),1===c&&1===e)return[f.pixels[4*g*(b*this.width+a)],f.pixels[g*(4*(b*this.width+a)+1)],f.pixels[g*(4*(b*this.width+a)+2)],f.pixels[g*(4*(b*this.width+a)+3)]];var h=a*g,i=b*g,j=Math.min(c,f.width),k=Math.min(e,f.height),l=j*g,m=k*g,n=new d.Image(j,k);return n.canvas.getContext("2d").drawImage(this.canvas,h,i,l,m,0,0,j,k),n},d.Renderer2D.prototype.loadPixels=function(){var a=this._pixelDensity||this._pInst._pixelDensity,b=this.width*a,c=this.height*a,d=this.drawingContext.getImageData(0,0,b,c);this._pInst?(this._pInst._setProperty("imageData",d),this._pInst._setProperty("pixels",d.data)):(this._setProperty("imageData",d),this._setProperty("pixels",d.data))},d.Renderer2D.prototype.set=function(a,b,c){if(a=Math.floor(a),b=Math.floor(b),c instanceof d.Image)this.drawingContext.save(),this.drawingContext.setTransform(1,0,0,1,0,0),this.drawingContext.scale(this._pInst._pixelDensity,this._pInst._pixelDensity),this.drawingContext.drawImage(c.canvas,a,b),this.loadPixels.call(this._pInst),this.drawingContext.restore();else{var e=this._pInst||this,f=0,g=0,h=0,i=0,j=4*(b*e._pixelDensity*this.width*e._pixelDensity+a*e._pixelDensity);if(e.imageData||e.loadPixels.call(e),"number"==typeof c)jn;)o=Math.min(h-g,f.HALF_PI),p.push(this._acuteArcToBezier(g,o)),g+=o;return this._doFill&&(j.beginPath(),p.forEach(function(a,b){0===b&&j.moveTo(k.x+a.ax*l,k.y+a.ay*m),j.bezierCurveTo(k.x+a.bx*l,k.y+a.by*m,k.x+a.cx*l,k.y+a.cy*m,k.x+a.dx*l,k.y+a.dy*m)}),(i===f.PIE||null==i)&&j.lineTo(k.x,k.y),j.closePath(),j.fill()),this._doStroke&&(j.beginPath(),p.forEach(function(a,b){0===b&&j.moveTo(k.x+a.ax*l,k.y+a.ay*m),j.bezierCurveTo(k.x+a.bx*l,k.y+a.by*m,k.x+a.cx*l,k.y+a.cy*m,k.x+a.dx*l,k.y+a.dy*m)}),i===f.PIE?(j.lineTo(k.x,k.y),j.closePath()):i===f.CHORD&&j.closePath(),j.stroke()),this},d.Renderer2D.prototype.ellipse=function(a,b,c,d){var f=this.drawingContext,g=this._doFill,i=this._doStroke;if(g&&!i){if(f.fillStyle===h)return this}else if(!g&&i&&f.strokeStyle===h)return this;var j=e.modeAdjust(a,b,c,d,this._ellipseMode),k=.5522847498,l=j.w/2*k,m=j.h/2*k,n=j.x+j.w,o=j.y+j.h,p=j.x+j.w/2,q=j.y+j.h/2;f.beginPath(),f.moveTo(j.x,q),f.bezierCurveTo(j.x,q-m,p-l,j.y,p,j.y),f.bezierCurveTo(p+l,j.y,n,q-m,n,q),f.bezierCurveTo(n,q+m,p+l,o,p,o),f.bezierCurveTo(p-l,o,j.x,q+m,j.x,q),f.closePath(),g&&f.fill(),i&&f.stroke()},d.Renderer2D.prototype.line=function(a,b,c,d){var e=this.drawingContext;return this._doStroke?e.strokeStyle===h?this:(e.lineWidth%2===1&&e.translate(.5,.5),e.beginPath(),e.moveTo(a,b),e.lineTo(c,d),e.stroke(),e.lineWidth%2===1&&e.translate(-.5,-.5),this):this},d.Renderer2D.prototype.point=function(a,b){var c=this.drawingContext,d=c.strokeStyle,e=c.fillStyle;return this._doStroke?c.strokeStyle===h?this:(a=Math.round(a),b=Math.round(b),c.fillStyle=d,c.lineWidth>1?(c.beginPath(),c.arc(a,b,c.lineWidth/2,0,f.TWO_PI,!1),c.fill()):c.fillRect(a,b,1,1),void(c.fillStyle=e)):this},d.Renderer2D.prototype.quad=function(a,b,c,d,e,f,g,i){var j=this.drawingContext,k=this._doFill,l=this._doStroke;if(k&&!l){if(j.fillStyle===h)return this}else if(!k&&l&&j.strokeStyle===h)return this;return j.beginPath(),j.moveTo(a,b),j.lineTo(c,d),j.lineTo(e,f),j.lineTo(g,i),j.closePath(),k&&j.fill(),l&&j.stroke(),this},d.Renderer2D.prototype.rect=function(a,b,c,d,f,g,i,j){var k=this.drawingContext,l=this._doFill,m=this._doStroke;if(l&&!m){if(k.fillStyle===h)return this}else if(!l&&m&&k.strokeStyle===h)return this;var n=e.modeAdjust(a,b,c,d,this._rectMode);if(this._doStroke&&k.lineWidth%2===1&&k.translate(.5,.5),k.beginPath(),"undefined"==typeof f)k.rect(n.x,n.y,n.w,n.h);else{"undefined"==typeof g&&(g=f),"undefined"==typeof i&&(i=g),"undefined"==typeof j&&(j=i);var o=n.x,p=n.y,q=n.w,r=n.h,s=q/2,t=r/2;2*f>q&&(f=s),2*f>r&&(f=t),2*g>q&&(g=s),2*g>r&&(g=t),2*i>q&&(i=s),2*i>r&&(i=t),2*j>q&&(j=s),2*j>r&&(j=t),k.beginPath(),k.moveTo(o+f,p),k.arcTo(o+q,p,o+q,p+r,g),k.arcTo(o+q,p+r,o,p+r,i),k.arcTo(o,p+r,o,p,j),k.arcTo(o,p,o+q,p,f),k.closePath()}return this._doFill&&k.fill(),this._doStroke&&k.stroke(),this._doStroke&&k.lineWidth%2===1&&k.translate(-.5,-.5),this},d.Renderer2D.prototype.triangle=function(a,b,c,d,e,f){var g=this.drawingContext,i=this._doFill,j=this._doStroke;if(i&&!j){if(g.fillStyle===h)return this}else if(!i&&j&&g.strokeStyle===h)return this;g.beginPath(),g.moveTo(a,b),g.lineTo(c,d),g.lineTo(e,f),g.closePath(),i&&g.fill(),j&&g.stroke()},d.Renderer2D.prototype.endShape=function(a,b,c,d,e,g,h){if(0===b.length)return this;if(!this._doStroke&&!this._doFill)return this;var i,j=a===f.CLOSE;j&&!g&&b.push(b[0]);var k,l,m=b.length;if(!c||h!==f.POLYGON&&null!==h)if(!d||h!==f.POLYGON&&null!==h)if(!e||h!==f.POLYGON&&null!==h)if(h===f.POINTS)for(k=0;m>k;k++)i=b[k],this._doStroke&&this._pInst.stroke(i[6]),this._pInst.point(i[0],i[1]);else if(h===f.LINES)for(k=0;m>k+1;k+=2)i=b[k],this._doStroke&&this._pInst.stroke(b[k+1][6]),this._pInst.line(i[0],i[1],b[k+1][0],b[k+1][1]);else if(h===f.TRIANGLES)for(k=0;m>k+2;k+=3)i=b[k],this.drawingContext.beginPath(),this.drawingContext.moveTo(i[0],i[1]),this.drawingContext.lineTo(b[k+1][0],b[k+1][1]),this.drawingContext.lineTo(b[k+2][0],b[k+2][1]),this.drawingContext.lineTo(i[0],i[1]),this._doFill&&(this._pInst.fill(b[k+2][5]),this.drawingContext.fill()),this._doStroke&&(this._pInst.stroke(b[k+2][6]),this.drawingContext.stroke()),this.drawingContext.closePath();else if(h===f.TRIANGLE_STRIP)for(k=0;m>k+1;k++)i=b[k],this.drawingContext.beginPath(),this.drawingContext.moveTo(b[k+1][0],b[k+1][1]),this.drawingContext.lineTo(i[0],i[1]),this._doStroke&&this._pInst.stroke(b[k+1][6]),this._doFill&&this._pInst.fill(b[k+1][5]),m>k+2&&(this.drawingContext.lineTo(b[k+2][0],b[k+2][1]),this._doStroke&&this._pInst.stroke(b[k+2][6]),this._doFill&&this._pInst.fill(b[k+2][5])),this._doFillStrokeClose();else if(h===f.TRIANGLE_FAN){if(m>2)for(this.drawingContext.beginPath(),this.drawingContext.moveTo(b[0][0],b[0][1]),this.drawingContext.lineTo(b[1][0],b[1][1]),this.drawingContext.lineTo(b[2][0],b[2][1]),this._doFill&&this._pInst.fill(b[2][5]),this._doStroke&&this._pInst.stroke(b[2][6]),this._doFillStrokeClose(),k=3;m>k;k++)i=b[k],this.drawingContext.beginPath(),this.drawingContext.moveTo(b[0][0],b[0][1]),this.drawingContext.lineTo(b[k-1][0],b[k-1][1]),this.drawingContext.lineTo(i[0],i[1]),this._doFill&&this._pInst.fill(i[5]),this._doStroke&&this._pInst.stroke(i[6]),this._doFillStrokeClose()}else if(h===f.QUADS)for(k=0;m>k+3;k+=4){for(i=b[k],this.drawingContext.beginPath(),this.drawingContext.moveTo(i[0],i[1]),l=1;4>l;l++)this.drawingContext.lineTo(b[k+l][0],b[k+l][1]);this.drawingContext.lineTo(i[0],i[1]),this._doFill&&this._pInst.fill(b[k+3][5]),this._doStroke&&this._pInst.stroke(b[k+3][6]),this._doFillStrokeClose()}else if(h===f.QUAD_STRIP){if(m>3)for(k=0;m>k+1;k+=2)i=b[k],this.drawingContext.beginPath(),m>k+3?(this.drawingContext.moveTo(b[k+2][0],b[k+2][1]),this.drawingContext.lineTo(i[0],i[1]),this.drawingContext.lineTo(b[k+1][0],b[k+1][1]),this.drawingContext.lineTo(b[k+3][0],b[k+3][1]),this._doFill&&this._pInst.fill(b[k+3][5]),this._doStroke&&this._pInst.stroke(b[k+3][6])):(this.drawingContext.moveTo(i[0],i[1]),this.drawingContext.lineTo(b[k+1][0],b[k+1][1])),this._doFillStrokeClose()}else{for(this.drawingContext.beginPath(),this.drawingContext.moveTo(b[0][0],b[0][1]),k=1;m>k;k++)i=b[k],i.isVert&&(i.moveTo?this.drawingContext.moveTo(i[0],i[1]):this.drawingContext.lineTo(i[0],i[1]));this._doFillStrokeClose()}else{for(this.drawingContext.beginPath(),k=0;m>k;k++)b[k].isVert?b[k].moveTo?this.drawingContext.moveTo([0],b[k][1]):this.drawingContext.lineTo(b[k][0],b[k][1]):this.drawingContext.quadraticCurveTo(b[k][0],b[k][1],b[k][2],b[k][3]);this._doFillStrokeClose()}else{for(this.drawingContext.beginPath(),k=0;m>k;k++)b[k].isVert?b[k].moveTo?this.drawingContext.moveTo(b[k][0],b[k][1]):this.drawingContext.lineTo(b[k][0],b[k][1]):this.drawingContext.bezierCurveTo(b[k][0],b[k][1],b[k][2],b[k][3],b[k][4],b[k][5]);this._doFillStrokeClose()}else if(m>3){var n=[],o=1-this._curveTightness;for(this.drawingContext.beginPath(),this.drawingContext.moveTo(b[1][0],b[1][1]),k=1;m>k+2;k++)i=b[k],n[0]=[i[0],i[1]],n[1]=[i[0]+(o*b[k+1][0]-o*b[k-1][0])/6,i[1]+(o*b[k+1][1]-o*b[k-1][1])/6],n[2]=[b[k+1][0]+(o*b[k][0]-o*b[k+2][0])/6,b[k+1][1]+(o*b[k][1]-o*b[k+2][1])/6],n[3]=[b[k+1][0],b[k+1][1]],this.drawingContext.bezierCurveTo(n[1][0],n[1][1],n[2][0],n[2][1],n[3][0],n[3][1]);j&&this.drawingContext.lineTo(b[k+1][0],b[k+1][1]),this._doFillStrokeClose()}return c=!1,d=!1,e=!1,g=!1,j&&b.pop(),this},d.Renderer2D.prototype.noSmooth=function(){return"imageSmoothingEnabled"in this.drawingContext?this.drawingContext.imageSmoothingEnabled=!1:"mozImageSmoothingEnabled"in this.drawingContext?this.drawingContext.mozImageSmoothingEnabled=!1:"webkitImageSmoothingEnabled"in this.drawingContext?this.drawingContext.webkitImageSmoothingEnabled=!1:"msImageSmoothingEnabled"in this.drawingContext&&(this.drawingContext.msImageSmoothingEnabled=!1),this},d.Renderer2D.prototype.smooth=function(){return"imageSmoothingEnabled"in this.drawingContext?this.drawingContext.imageSmoothingEnabled=!0:"mozImageSmoothingEnabled"in this.drawingContext?this.drawingContext.mozImageSmoothingEnabled=!0:"webkitImageSmoothingEnabled"in this.drawingContext?this.drawingContext.webkitImageSmoothingEnabled=!0:"msImageSmoothingEnabled"in this.drawingContext&&(this.drawingContext.msImageSmoothingEnabled=!0),this},d.Renderer2D.prototype.strokeCap=function(a){return(a===f.ROUND||a===f.SQUARE||a===f.PROJECT)&&(this.drawingContext.lineCap=a),this},d.Renderer2D.prototype.strokeJoin=function(a){return(a===f.ROUND||a===f.BEVEL||a===f.MITER)&&(this.drawingContext.lineJoin=a),this},d.Renderer2D.prototype.strokeWeight=function(a){return"undefined"==typeof a||0===a?this.drawingContext.lineWidth=1e-4:this.drawingContext.lineWidth=a,this},d.Renderer2D.prototype._getFill=function(){return this.drawingContext.fillStyle},d.Renderer2D.prototype._getStroke=function(){return this.drawingContext.strokeStyle},d.Renderer2D.prototype.bezier=function(a,b,c,d,e,f,g,h){return this._pInst.beginShape(),this._pInst.vertex(a,b),this._pInst.bezierVertex(c,d,e,f,g,h),this._pInst.endShape(),this},d.Renderer2D.prototype.curve=function(a,b,c,d,e,f,g,h){return this._pInst.beginShape(),this._pInst.curveVertex(a,b),this._pInst.curveVertex(c,d),this._pInst.curveVertex(e,f),this._pInst.curveVertex(g,h),this._pInst.endShape(),this},d.Renderer2D.prototype._doFillStrokeClose=function(){this._doFill&&this.drawingContext.fill(),this._doStroke&&this.drawingContext.stroke(),this.drawingContext.closePath()},d.Renderer2D.prototype.applyMatrix=function(a,b,c,d,e,f){this.drawingContext.transform(a,b,c,d,e,f)},d.Renderer2D.prototype.resetMatrix=function(){return this.drawingContext.setTransform(1,0,0,1,0,0),this.drawingContext.scale(this._pInst._pixelDensity,this._pInst._pixelDensity),this},d.Renderer2D.prototype.rotate=function(a){this.drawingContext.rotate(a)},d.Renderer2D.prototype.scale=function(a,b){return this.drawingContext.scale(a,b),this},d.Renderer2D.prototype.shearX=function(a){return this._pInst._angleMode===f.DEGREES&&(a=this._pInst.radians(a)),this.drawingContext.transform(1,0,this._pInst.tan(a),1,0,0),this},d.Renderer2D.prototype.shearY=function(a){return this._pInst._angleMode===f.DEGREES&&(a=this._pInst.radians(a)),this.drawingContext.transform(1,this._pInst.tan(a),0,1,0,0),this},d.Renderer2D.prototype.translate=function(a,b){return this.drawingContext.translate(a,b),this},d.Renderer2D.prototype.text=function(a,b,c,d,e){var g,h,i,j,k,l,m,n,o,p,q=this._pInst,r=Number.MAX_VALUE;if(this._doFill||this._doStroke){if("string"!=typeof a&&(a=a.toString()),a=a.replace(/(\t)/g," "),g=a.split("\n"),"undefined"!=typeof d){for(o=0,i=0;id?(k=n[h]+" ",o+=q.textLeading()):k=l;switch(this._rectMode===f.CENTER&&(b-=d/2,c-=e/2),this.drawingContext.textAlign){case f.CENTER:b+=d/2;break;case f.RIGHT:b+=d}if("undefined"!=typeof e){switch(this.drawingContext.textBaseline){case f.BOTTOM:c+=e-o;break;case f._CTX_MIDDLE:c+=(e-o)/2;break;case f.BASELINE:p=!0,this.drawingContext.textBaseline=f.TOP}r=c+e-q.textAscent()}for(i=0;id&&k.length>0?(this._renderText(q,k,b,c,r),k=n[h]+" ",c+=q.textLeading()):k=l;this._renderText(q,k,b,c,r),c+=q.textLeading()}}else for(j=0;j=e?void 0:(a.push(),this._isOpenType()?this._textFont._renderPath(b,c,d,{renderer:this}):(this._doStroke&&this._strokeSet&&this.drawingContext.strokeText(b,c,d),this._doFill&&(this.drawingContext.fillStyle=this._fillSet?this.drawingContext.fillStyle:f._DEFAULT_TEXT_FILL,this.drawingContext.fillText(b,c,d))),a.pop(),a)},d.Renderer2D.prototype.textWidth=function(a){return this._isOpenType()?this._textFont._textWidth(a):this.drawingContext.measureText(a).width},d.Renderer2D.prototype.textAlign=function(a,b){if(arguments.length)return(a===f.LEFT||a===f.RIGHT||a===f.CENTER)&&(this.drawingContext.textAlign=a),(b===f.TOP||b===f.BOTTOM||b===f.CENTER||b===f.BASELINE)&&(b===f.CENTER?this.drawingContext.textBaseline=f._CTX_MIDDLE:this.drawingContext.textBaseline=b),this._pInst;var c=this.drawingContext.textBaseline;return c===f._CTX_MIDDLE&&(c=f.CENTER),{horizontal:this.drawingContext.textAlign,vertical:c}},d.Renderer2D.prototype._applyTextProperties=function(){var a,b=this._pInst;return this._setProperty("_textAscent",null),this._setProperty("_textDescent",null),a=this._textFont,this._isOpenType()&&(a=this._textFont.font.familyName,this._setProperty("_textStyle",this._textFont.font.styleName)),this.drawingContext.font=this._textStyle+" "+this._textSize+"px "+a,b},d.Renderer2D.prototype.push=function(){this.drawingContext.save()},d.Renderer2D.prototype.pop=function(){this.drawingContext.restore()},b.exports=d.Renderer2D},{"../image/filters":67,"./canvas":48,"./constants":49,"./core":50,"./p5.Renderer":56}],58:[function(a,b,c){var d=a("./core"),e=a("./constants");a("./p5.Graphics"),a("./p5.Renderer2D"),a("../3d/p5.Renderer3D");var f="defaultCanvas0";d.prototype.createCanvas=function(a,b,c){var g,h,i=c||e.P2D;if(arguments[3]&&(g="boolean"==typeof arguments[3]?arguments[3]:!1),i===e.WEBGL)h=document.getElementById(f),h&&h.parentNode.removeChild(h),h=document.createElement("canvas"),h.id=f;else if(g){h=document.createElement("canvas");for(var j=0;document.getElementById("defaultCanvas"+j);)j++;f="defaultCanvas"+j,h.id=f}else h=this.canvas;return this._setupDone||(h.className+=" p5_hidden",h.style.visibility="hidden"),this._userNode?this._userNode.appendChild(h):document.body.appendChild(h),i===e.WEBGL?(this._setProperty("_renderer",new d.Renderer3D(h,this,!0)),this._isdefaultGraphics=!0):this._isdefaultGraphics||(this._setProperty("_renderer",new d.Renderer2D(h,this,!0)),this._isdefaultGraphics=!0),this._renderer.resize(a,b),this._renderer._applyDefaults(),g&&this._elements.push(this._renderer),this._renderer},d.prototype.resizeCanvas=function(a,b,c){if(this._renderer){var d={};for(var e in this.drawingContext){var f=this.drawingContext[e];"object"!=typeof f&&"function"!=typeof f&&(d[e]=f)}this._renderer.resize(a,b);for(var g in d)this.drawingContext[g]=d[g];c||this.redraw()}},d.prototype.noCanvas=function(){this.canvas&&this.canvas.parentNode.removeChild(this.canvas)},d.prototype.createGraphics=function(a,b,c){return new d.Graphics(a,b,c,this)},d.prototype.blendMode=function(a){if(a!==e.BLEND&&a!==e.DARKEST&&a!==e.LIGHTEST&&a!==e.DIFFERENCE&&a!==e.MULTIPLY&&a!==e.EXCLUSION&&a!==e.SCREEN&&a!==e.REPLACE&&a!==e.OVERLAY&&a!==e.HARD_LIGHT&&a!==e.SOFT_LIGHT&&a!==e.DODGE&&a!==e.BURN&&a!==e.ADD&&a!==e.NORMAL)throw new Error("Mode "+a+" not recognized.");this._renderer.blendMode(a)},b.exports=d},{"../3d/p5.Renderer3D":38,"./constants":49,"./core":50,"./p5.Graphics":55,"./p5.Renderer2D":57}],59:[function(a,b,c){window.requestAnimationFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a,b){window.setTimeout(a,1e3/60)}}(),window.performance=window.performance||{},window.performance.now=function(){var a=Date.now();return window.performance.now||window.performance.mozNow||window.performance.msNow||window.performance.oNow||window.performance.webkitNow||function(){return Date.now()-a}}(),function(){"use strict";"undefined"!=typeof Uint8ClampedArray&&(Uint8ClampedArray.prototype.slice=Array.prototype.slice)}()},{}],60:[function(a,b,c){"use strict";var d=a("./core");d.prototype.exit=function(){throw"exit() not implemented, see remove()"},d.prototype.noLoop=function(){this._loop=!1},d.prototype.loop=function(){this._loop=!0,this._draw()},d.prototype.push=function(){this._renderer.push(),this._styles.push({_doStroke:this._renderer._doStroke,_doFill:this._renderer._doFill,_tint:this._renderer._tint,_imageMode:this._renderer._imageMode,_rectMode:this._renderer._rectMode,_ellipseMode:this._renderer._ellipseMode,_colorMode:this._renderer._colorMode,_textFont:this._renderer._textFont,_textLeading:this._renderer._textLeading,_textSize:this._renderer._textSize,_textStyle:this._renderer._textStyle})},d.prototype.pop=function(){this._renderer.pop();var a=this._styles.pop();for(var b in a)this._renderer[b]=a[b]},d.prototype.pushStyle=function(){throw new Error("pushStyle() not used, see push()")},d.prototype.popStyle=function(){throw new Error("popStyle() not used, see pop()")},d.prototype.redraw=function(){var a=this.setup||window.setup,b=this.draw||window.draw;if("function"==typeof b){this.push(),"undefined"==typeof a&&this.scale(this._pixelDensity,this._pixelDensity);var c=this;this._registeredMethods.pre.forEach(function(a){a.call(c)}),b(),this._registeredMethods.post.forEach(function(a){a.call(c)}),this.pop()}},d.prototype.size=function(){var a="size() is not a valid p5 function, to set the size of the ";throw a+="drawing canvas, please use createCanvas() instead"},b.exports=d},{"./core":50}],61:[function(a,b,c){"use strict";var d=a("./core"),e=a("./constants");d.prototype.applyMatrix=function(a,b,c,d,e,f){return this._renderer.applyMatrix(a,b,c,d,e,f),this},d.prototype.popMatrix=function(){throw new Error("popMatrix() not used, see pop()")},d.prototype.printMatrix=function(){throw new Error("printMatrix() not implemented")},d.prototype.pushMatrix=function(){throw new Error("pushMatrix() not used, see push()")},d.prototype.resetMatrix=function(){return this._renderer.resetMatrix(),this},d.prototype.rotate=function(){var a=arguments[0];return this._angleMode===e.DEGREES&&(a=this.radians(a)),arguments.length>1?this._renderer.rotate(a,arguments[1]):this._renderer.rotate(a),this},d.prototype.rotateX=function(a){for(var b=new Array(arguments.length),c=0;c0))throw"vertex() must be used once before calling quadraticVertex()";k=!0;for(var i=[],j=0;jn||Math.abs(this.accelerationY-this.pAccelerationY)>n||Math.abs(this.accelerationZ-this.pAccelerationZ)>n)&&a();var b=this.deviceTurned||window.deviceTurned;if("function"==typeof b){var c=this.rotationX+180,d=this.pRotationX+180,p=h+180;c-d>0&&270>c-d||-270>c-d?k="clockwise":(0>c-d||c-d>270)&&(k="counter-clockwise"),k!==e&&(p=c),Math.abs(c-p)>90&&Math.abs(c-p)<270&&(p=c,this._setProperty("turnAxis","X"),b()),e=k,h=p-180;var q=this.rotationY+180,r=this.pRotationY+180,s=i+180;q-r>0&&270>q-r||-270>q-r?l="clockwise":(0>q-r||q-this.pRotationY>270)&&(l="counter-clockwise"),l!==f&&(s=q),Math.abs(q-s)>90&&Math.abs(q-s)<270&&(s=q,this._setProperty("turnAxis","Y"),b()),f=l,i=s-180,this.rotationZ-this.pRotationZ>0&&this.rotationZ-this.pRotationZ<270||this.rotationZ-this.pRotationZ<-270?m="clockwise":(this.rotationZ-this.pRotationZ<0||this.rotationZ-this.pRotationZ>270)&&(m="counter-clockwise"),m!==g&&(j=this.rotationZ),Math.abs(this.rotationZ-j)>90&&Math.abs(this.rotationZ-j)<270&&(j=this.rotationZ,this._setProperty("turnAxis","Z"),b()),g=m,this._setProperty("turnAxis",void 0)}var t=this.deviceShaken||window.deviceShaken;if("function"==typeof t){var u,v;null!==this.pAccelerationX&&(u=Math.abs(this.accelerationX-this.pAccelerationX),v=Math.abs(this.accelerationY-this.pAccelerationY)),u+v>o&&t()}},b.exports=d},{"../core/core":50}],64:[function(a,b,c){"use strict";var d=a("../core/core"),e={};d.prototype.isKeyPressed=!1,d.prototype.keyIsPressed=!1,d.prototype.key="",d.prototype.keyCode=0,d.prototype._onkeydown=function(a){this._setProperty("isKeyPressed",!0),this._setProperty("keyIsPressed",!0),this._setProperty("keyCode",a.which),e[a.which]=!0;var b=String.fromCharCode(a.which);b||(b=a.which),this._setProperty("key",b);var c=this.keyPressed||window.keyPressed;if("function"==typeof c&&!a.charCode){var d=c(a);d===!1&&a.preventDefault()}},d.prototype._onkeyup=function(a){var b=this.keyReleased||window.keyReleased;this._setProperty("isKeyPressed",!1),this._setProperty("keyIsPressed",!1),e[a.which]=!1;var c=String.fromCharCode(a.which);if(c||(c=a.which),this._setProperty("key",c),this._setProperty("keyCode",a.which),"function"==typeof b){var d=b(a);d===!1&&a.preventDefault()}},d.prototype._onkeypress=function(a){this._setProperty("keyCode",a.which),this._setProperty("key",String.fromCharCode(a.which));var b=this.keyTyped||window.keyTyped;if("function"==typeof b){var c=b(a);c===!1&&a.preventDefault()}},d.prototype._onblur=function(a){e={}},d.prototype.keyIsDown=function(a){return e[a]},b.exports=d},{"../core/core":50}],65:[function(a,b,c){"use strict";function d(a,b){var c=a.getBoundingClientRect();return{x:b.clientX-c.left,y:b.clientY-c.top}}var e=a("../core/core"),f=a("../core/constants");e.prototype._nextMouseX=0,e.prototype._nextMouseY=0,e.prototype.mouseX=0,e.prototype.mouseY=0,e.prototype.pmouseX=0,e.prototype.pmouseY=0,e.prototype.winMouseX=0,e.prototype.winMouseY=0,e.prototype.pwinMouseX=0,e.prototype.pwinMouseY=0,e.prototype.mouseButton=0,e.prototype.mouseIsPressed=!1,e.prototype.isMousePressed=!1,e.prototype._updateNextMouseCoords=function(a){if("touchstart"===a.type||"touchmove"===a.type||"touchend"===a.type)this._setProperty("_nextMouseX",this._nextTouchX),this._setProperty("_nextMouseY",this._nextTouchY);else if(null!==this._curElement){var b=d(this._curElement.elt,a);this._setProperty("_nextMouseX",b.x),this._setProperty("_nextMouseY",b.y)}this._setProperty("winMouseX",a.pageX),this._setProperty("winMouseY",a.pageY)},e.prototype._updateMouseCoords=function(){this._setProperty("pmouseX",this.mouseX),this._setProperty("pmouseY",this.mouseY),this._setProperty("mouseX",this._nextMouseX),this._setProperty("mouseY",this._nextMouseY),this._setProperty("pwinMouseX",this.winMouseX),this._setProperty("pwinMouseY",this.winMouseY)},e.prototype._setMouseButton=function(a){1===a.button?this._setProperty("mouseButton",f.CENTER):2===a.button?this._setProperty("mouseButton",f.RIGHT):this._setProperty("mouseButton",f.LEFT)},e.prototype._onmousemove=function(a){var b,c=this._isGlobal?window:this;this._updateNextMouseCoords(a),this._updateNextTouchCoords(a),this.isMousePressed?"function"==typeof c.mouseDragged?(b=c.mouseDragged(a),b===!1&&a.preventDefault()):"function"==typeof c.touchMoved&&(b=c.touchMoved(a),b===!1&&a.preventDefault()):"function"==typeof c.mouseMoved&&(b=c.mouseMoved(a),b===!1&&a.preventDefault())},e.prototype._onmousedown=function(a){var b,c=this._isGlobal?window:this;this._setProperty("isMousePressed",!0),this._setProperty("mouseIsPressed",!0),this._setMouseButton(a),this._updateNextMouseCoords(a),this._updateNextTouchCoords(a),"function"==typeof c.mousePressed?(b=c.mousePressed(a),b===!1&&a.preventDefault()):"function"==typeof c.touchStarted&&(b=c.touchStarted(a),b===!1&&a.preventDefault())},e.prototype._onmouseup=function(a){var b,c=this._isGlobal?window:this;this._setProperty("isMousePressed",!1),this._setProperty("mouseIsPressed",!1),"function"==typeof c.mouseReleased?(b=c.mouseReleased(a),b===!1&&a.preventDefault()):"function"==typeof c.touchEnded&&(b=c.touchEnded(a),b===!1&&a.preventDefault())},e.prototype._ondragend=e.prototype._onmouseup,e.prototype._ondragover=e.prototype._onmousemove,e.prototype._onclick=function(a){var b=this._isGlobal?window:this;if("function"==typeof b.mouseClicked){var c=b.mouseClicked(a);c===!1&&a.preventDefault()}},e.prototype._onwheel=function(a){var b=this._isGlobal?window:this;if("function"==typeof b.mouseWheel){a.delta=a.deltaY;var c=b.mouseWheel(a);c===!1&&a.preventDefault()}},b.exports=e},{"../core/constants":49,"../core/core":50}],66:[function(a,b,c){"use strict";function d(a,b,c){c=c||0;var d=a.getBoundingClientRect(),e=b.touches[c]||b.changedTouches[c];return{x:e.clientX-d.left,y:e.clientY-d.top,id:e.identifier}}var e=a("../core/core");e.prototype._nextTouchX=0,e.prototype._nextTouchY=0,e.prototype.touchX=0,e.prototype.touchY=0,e.prototype.ptouchX=0,e.prototype.ptouchY=0,e.prototype.touches=[],e.prototype.touchIsDown=!1,e.prototype._updateNextTouchCoords=function(a){if("mousedown"===a.type||"mousemove"===a.type||"mouseup"===a.type)this._setProperty("_nextTouchX",this._nextMouseX),this._setProperty("_nextTouchY",this._nextMouseY);else if(null!==this._curElement){var b=d(this._curElement.elt,a,0);this._setProperty("_nextTouchX",b.x),this._setProperty("_nextTouchY",b.y);for(var c=[],e=0;eb?1:248>b?b:248,g!==b){g=b,h=1+g<<1,i=new Int32Array(h),j=new Array(h);for(var c=0;h>c;c++)j[c]=new Int32Array(256);for(var d,e,f,k,l=1,m=b-1;b>l;l++){i[b+l]=i[m]=e=m*m,f=j[b+l],k=j[m--];for(var n=0;256>n;n++)f[n]=k[n]=e*n}d=i[b]=b*b,f=j[b];for(var o=0;256>o;o++)f[o]=d*o}}function e(a,b){for(var c=f._toPixels(a),e=a.width,k=a.height,l=e*k,m=new Int32Array(l),n=0;l>n;n++)m[n]=f._getARGB(c,n);var o,p,q,r,s,t,u,v,w,x,y=new Int32Array(l),z=new Int32Array(l),A=new Int32Array(l),B=new Int32Array(l),C=0;d(b);var D,E,F,G;for(E=0;k>E;E++){for(D=0;e>D;D++){if(r=q=p=s=o=0,t=D-g,0>t)x=-t,t=0;else{if(t>=e)break;x=0}for(F=x;h>F&&!(t>=e);F++){var H=m[t+C];G=j[F],s+=G[(-16777216&H)>>>24],p+=G[(16711680&H)>>16],q+=G[(65280&H)>>8],r+=G[255&H],o+=i[F],t++}u=C+D,y[u]=s/o,z[u]=p/o,A[u]=q/o,B[u]=r/o}C+=e}for(C=0,v=-g,w=v*e,E=0;k>E;E++){for(D=0;e>D;D++){if(r=q=p=s=o=0,0>v)x=u=-v,t=D;else{if(v>=k)break;x=0,u=v,t=D+w}for(F=x;h>F&&!(u>=k);F++)G=j[F],s+=G[y[t]],p+=G[z[t]],q+=G[A[t]],r+=G[B[t]],o+=i[F],u++,t+=e;m[D+C]=s/o<<24|p/o<<16|q/o<<8|r/o}C+=e,w+=e,v++}f._setPixels(c,m)}var f={};f._toPixels=function(a){return a instanceof ImageData?a.data:a.getContext("2d").getImageData(0,0,a.width,a.height).data},f._getARGB=function(a,b){var c=4*b;return a[c+3]<<24&4278190080|a[c]<<16&16711680|a[c+1]<<8&65280|255&a[c+2]},f._setPixels=function(a,b){for(var c=0,d=0,e=a.length;e>d;d++)c=4*d,a[c+0]=(16711680&b[d])>>>16,a[c+1]=(65280&b[d])>>>8,a[c+2]=255&b[d],a[c+3]=(4278190080&b[d])>>>24},f._toImageData=function(a){return a instanceof ImageData?a:a.getContext("2d").getImageData(0,0,a.width,a.height)},f._createImageData=function(a,b){return f._tmpCanvas=document.createElement("canvas"),f._tmpCtx=f._tmpCanvas.getContext("2d"),this._tmpCtx.createImageData(a,b)},f.apply=function(a,b,c){var d=a.getContext("2d"),e=d.getImageData(0,0,a.width,a.height),f=b(e,c);f instanceof ImageData?d.putImageData(f,0,0,0,0,a.width,a.height):d.putImageData(e,0,0,0,0,a.width,a.height)},f.threshold=function(a,b){var c=f._toPixels(a);void 0===b&&(b=.5);for(var d=Math.floor(255*b),e=0;e=d?255:0,c[e]=c[e+1]=c[e+2]=g}},f.gray=function(a){for(var b=f._toPixels(a),c=0;cb||b>255)throw new Error("Level must be greater than 2 and less than 255 for posterize");for(var d=b-1,e=0;e>8)/d,c[e+1]=255*(h*b>>8)/d,c[e+2]=255*(i*b>>8)/d}},f.dilate=function(a){for(var b,c,d,e,g,h,i,j,k,l,m,n,o,p,q,r,s,t=f._toPixels(a),u=0,v=t.length?t.length/4:0,w=new Int32Array(v);v>u;)for(b=u,c=u+a.width;c>u;)d=e=f._getARGB(t,u),i=u-1,h=u+1,j=u-a.width,k=u+a.width,b>i&&(i=u),h>=c&&(h=u),0>j&&(j=0),k>=v&&(k=u),n=f._getARGB(t,j),m=f._getARGB(t,i),o=f._getARGB(t,k),l=f._getARGB(t,h),g=77*(d>>16&255)+151*(d>>8&255)+28*(255&d),q=77*(m>>16&255)+151*(m>>8&255)+28*(255&m),p=77*(l>>16&255)+151*(l>>8&255)+28*(255&l),r=77*(n>>16&255)+151*(n>>8&255)+28*(255&n),s=77*(o>>16&255)+151*(o>>8&255)+28*(255&o),q>g&&(e=m,g=q),p>g&&(e=l,g=p),r>g&&(e=n,g=r),s>g&&(e=o,g=s),w[u++]=e;f._setPixels(t,w)},f.erode=function(a){for(var b,c,d,e,g,h,i,j,k,l,m,n,o,p,q,r,s,t=f._toPixels(a),u=0,v=t.length?t.length/4:0,w=new Int32Array(v);v>u;)for(b=u,c=u+a.width;c>u;)d=e=f._getARGB(t,u),i=u-1,h=u+1,j=u-a.width,k=u+a.width,b>i&&(i=u),h>=c&&(h=u),0>j&&(j=0),k>=v&&(k=u),n=f._getARGB(t,j),m=f._getARGB(t,i),o=f._getARGB(t,k),l=f._getARGB(t,h),g=77*(d>>16&255)+151*(d>>8&255)+28*(255&d),q=77*(m>>16&255)+151*(m>>8&255)+28*(255&m),p=77*(l>>16&255)+151*(l>>8&255)+28*(255&l),r=77*(n>>16&255)+151*(n>>8&255)+28*(255&n),s=77*(o>>16&255)+151*(o>>8&255)+28*(255&o),g>q&&(e=m,g=q),g>p&&(e=l,g=p),g>r&&(e=n,g=r),g>s&&(e=o,g=s),w[u++]=e;f._setPixels(t,w)};var g,h,i,j;f.blur=function(a,b){e(a,b)},b.exports=f},{}],68:[function(a,b,c){"use strict";var d=a("../core/core"),e=[];d.prototype.createImage=function(a,b){return new d.Image(a,b)},d.prototype.saveCanvas=function(){var a,b,c;if(3===arguments.length?(a=arguments[0],b=arguments[1],c=arguments[2]):2===arguments.length?"object"==typeof arguments[0]?(a=arguments[0],b=arguments[1]):(b=arguments[0],c=arguments[1]):1===arguments.length&&("object"==typeof arguments[0]?a=arguments[0]:b=arguments[0]),a instanceof d.Element&&(a=a.elt),a instanceof HTMLCanvasElement||(a=null),c||(c=d.prototype._checkFileExtension(b,c)[1],""===c&&(c="png")),a||this._curElement&&this._curElement.elt&&(a=this._curElement.elt),d.prototype._isSafari()){var e="Hello, Safari user!\n";e+="Now capturing a screenshot...\n",e+="To save this image,\n",e+="go to File --> Save As.\n",alert(e),window.location.href=a.toDataURL()}else{var f;if("undefined"==typeof c)c="png",f="image/png";else switch(c){case"png":f="image/png";break;case"jpeg":f="image/jpeg";break;case"jpg":f="image/jpeg";break;default:f="image/png"}var g="image/octet-stream",h=a.toDataURL(f);h=h.replace(f,g),d.prototype.downloadFile(h,b,c)}},d.prototype.saveFrames=function(a,b,c,f,g){var h=c||3;h=d.prototype.constrain(h,0,15),h=1e3*h;var i=f||15;i=d.prototype.constrain(i,0,22);var j=0,k=d.prototype._makeFrame,l=this._curElement.elt,m=setInterval(function(){k(a+j,b,l),j++},1e3/i);setTimeout(function(){if(clearInterval(m),g)g(e);else for(var a=0;a0&&b>a?a:b}var e=a("../core/core"),f=a("./filters"),g=a("../core/canvas"),h=a("../core/constants");a("../core/error_helpers"),e.prototype.loadImage=function(a,b,c){var d=new Image,f=new e.Image(1,1,this),g=e._getDecrementPreload.apply(this,arguments);return d.onload=function(){f.width=f.canvas.width=d.width,f.height=f.canvas.height=d.height,f.drawingContext.drawImage(d,0,0),"function"==typeof b&&b(f),g&&b!==g&&g()},d.onerror=function(a){e._friendlyFileLoadError(0,d.src),"function"==typeof c&&c!==g&&c(a)},0!==a.indexOf("data:image/")&&(d.crossOrigin="Anonymous"),d.src=a,f},e.prototype.image=function(a,b,c,e,f,h,i,j,k){if(arguments.length<=5)if(h=b||0,i=c||0,b=0,c=0,a.elt&&a.elt.videoWidth&&!a.canvas){var l=a.elt.videoWidth,m=a.elt.videoHeight;j=e||a.width,k=f||a.width*m/l,e=l,f=m}else j=e||a.width,k=f||a.height,e=a.width,f=a.height;else{if(9!==arguments.length)throw"Wrong number of arguments to image()";b=b||0,c=c||0,e=d(e,a.width),f=d(f,a.height),h=h||0,i=i||0,j=j||a.width,k=k||a.height}var n=g.modeAdjust(h,i,j,k,this._renderer._imageMode);this._renderer.image(a,b,c,e,f,n.x,n.y,n.w,n.h)},e.prototype.tint=function(){var a=this.color.apply(this,arguments);this._renderer._tint=a.levels},e.prototype.noTint=function(){this._renderer._tint=null},e.prototype._getTintedImageCanvas=function(a){if(!a.canvas)return a;var b=f._toPixels(a.canvas),c=document.createElement("canvas");c.width=a.canvas.width,c.height=a.canvas.height;for(var d=c.getContext("2d"),e=d.createImageData(a.canvas.width,a.canvas.height),g=e.data,h=0;h0&&this.loadPixels()},d.Image.prototype.copy=function(){d.prototype.copy.apply(this,arguments)},d.Image.prototype.mask=function(a){void 0===a&&(a=this);var b=this.drawingContext.globalCompositeOperation,c=1;a instanceof d.Renderer&&(c=a._pInst._pixelDensity);var e=[a,0,0,c*a.width,c*a.height,0,0,this.width,this.height];this.drawingContext.globalCompositeOperation="destination-in",this.copy.apply(this,e),this.drawingContext.globalCompositeOperation=b},d.Image.prototype.filter=function(a,b){e.apply(this.canvas,e[a.toLowerCase()],b)},d.Image.prototype.blend=function(){d.prototype.blend.apply(this,arguments)},d.Image.prototype.save=function(a,b){var c;if(b)switch(b.toLowerCase()){case"png":c="image/png";break;case"jpeg":c="image/jpeg";break;case"jpg":c="image/jpeg";break;default:c="image/png"}else b="png",c="image/png";var e="image/octet-stream",f=this.canvas.toDataURL(c);f=f.replace(c,e),d.prototype.downloadFile(f,a,b)},d.Image.prototype.createTexture=function(a){return this},b.exports=d.Image},{"../core/core":50,"./filters":67}],71:[function(a,b,c){"use strict";var d=a("../core/core"),e=a("./filters");a("../color/p5.Color"),d.prototype.pixels=[],d.prototype.blend=function(){this._renderer.blend.apply(this._renderer,arguments)},d.prototype.copy=function(){d.Renderer2D._copyHelper.apply(this,arguments)},d.prototype.filter=function(a,b){e.apply(this.canvas,e[a.toLowerCase()],b)},d.prototype.get=function(a,b,c,d){return this._renderer.get(a,b,c,d)},d.prototype.loadPixels=function(){this._renderer.loadPixels()},d.prototype.set=function(a,b,c){this._renderer.set(a,b,c)},d.prototype.updatePixels=function(a,b,c,d){0!==this.pixels.length&&this._renderer.updatePixels(a,b,c,d)},b.exports=d},{"../color/p5.Color":44,"../core/core":50,"./filters":67}],72:[function(a,b,c){"use strict";function d(a,b){var c={};if(b=b||[],"undefined"==typeof b)for(var d=0;d/g,">").replace(/"/g,""").replace(/'/g,"'")}function f(a,b){b&&b!==!0&&"true"!==b||(b=""),a||(a="untitled");var c="";return a&&a.indexOf(".")>-1&&(c=a.split(".").pop()),b&&c!==b&&(c=b,a=a+"."+c),[a,c]}function g(a){document.body.removeChild(a.target)}var h=a("../core/core"),i=a("reqwest"),j=a("opentype.js");a("../core/error_helpers"),h._getDecrementPreload=function(){var a=arguments[arguments.length-1];return(window.preload||this&&this.preload)&&"function"==typeof a?a:null},h.prototype.loadFont=function(a,b,c){var d=new h.Font(this),e=h._getDecrementPreload.apply(this,arguments);return j.load(a,function(f,g){if(f){if("undefined"!=typeof c&&c!==e)return c(f);throw f}d.font=g,"undefined"!=typeof b&&b(d),e&&b!==e&&e();var h,i,j=["ttf","otf","woff","woff2"],k=a.split("\\").pop().split("/").pop(),l=k.lastIndexOf("."),m=1>l?null:k.substr(l+1);j.indexOf(m)>-1&&(h=k.substr(0,l),i=document.createElement("style"),i.appendChild(document.createTextNode("\n@font-face {\nfont-family: "+h+";\nsrc: url("+a+");\n}\n")),document.head.appendChild(i))}),d},h.prototype.createInput=function(){throw"not yet implemented"},h.prototype.createReader=function(){throw"not yet implemented"},h.prototype.loadBytes=function(){throw"not yet implemented"},h.prototype.loadJSON=function(){for(var a,b=arguments[0],c=arguments[1],d=h._getDecrementPreload.apply(this,arguments),e=[],f="json",g=2;g"),d.println("");var k=' "),d.println(""),d.println(" "),"0"!==f[0]){d.println(" ");for(var l=0;l"+m),d.println(" ")}d.println(" ")}for(var n=0;n");for(var o=0;o"+q),d.println(" ")}d.println(" ")}d.println("
"),d.println(""),d.print("")}d.close(),d.flush()},h.prototype.writeFile=function(a,b,c){var d="application/octet-stream";h.prototype._isSafari()&&(d="text/plain");var e=new Blob(a,{type:d}),f=window.URL.createObjectURL(e);h.prototype.downloadFile(f,b,c)},h.prototype.downloadFile=function(a,b,c){var d=f(b,c),e=d[0],i=d[1],j=document.createElement("a");if(j.href=a,j.download=e,j.onclick=g,j.style.display="none",document.body.appendChild(j),h.prototype._isSafari()){var k="Hello, Safari user! To download this file...\n";k+="1. Go to File --> Save As.\n",k+='2. Choose "Page Source" as the Format.\n',k+='3. Name it with this extension: ."'+i+'"',alert(k)}j.click(),a=null},h.prototype._checkFileExtension=f,h.prototype._isSafari=function(){var a=Object.prototype.toString.call(window.HTMLElement);return a.indexOf("Constructor")>0},b.exports=h},{"../core/core":50,"../core/error_helpers":53,"opentype.js":8,reqwest:29}],73:[function(a,b,c){"use strict";var d=a("../core/core");d.Table=function(a){this.columns=[],this.rows=[]},d.Table.prototype.addRow=function(a){var b=a||new d.TableRow;if("undefined"==typeof b.arr||"undefined"==typeof b.obj)throw"invalid TableRow: "+b;return b.table=this,this.rows.push(b),b},d.Table.prototype.removeRow=function(a){this.rows[a].table=null;var b=this.rows.splice(a+1,this.rows.length);this.rows.pop(),this.rows=this.rows.concat(b)},d.Table.prototype.getRow=function(a){return this.rows[a]},d.Table.prototype.getRows=function(){return this.rows},d.Table.prototype.findRow=function(a,b){if("string"==typeof b){for(var c=0;c=0))throw'This table has no column named "'+a+'"';d=b[a],e[d]=b}else e[f]=this.rows[f].obj;return e},d.Table.prototype.getArray=function(){for(var a=[],b=0;b=0))throw'This table has no column named "'+a+'"';this.obj[a]=b,this.arr[c]=b}else{if(!(ae;e++)d[e]=Math.random()}0>a&&(a=-a),0>b&&(b=-b),0>c&&(c=-c);for(var n,o,p,q,r,s=Math.floor(a),t=Math.floor(b),u=Math.floor(c),v=a-s,w=b-t,x=c-u,y=0,z=.5,A=0;k>A;A++){var B=s+(t<=1&&(s++,v--),w>=1&&(t++,w--),x>=1&&(u++,x--)}return y},e.prototype.noiseDetail=function(a,b){a>0&&(k=a),b>0&&(l=b)},e.prototype.noiseSeed=function(a){var b=function(){var a,b,c=4294967296,d=1664525,e=1013904223;return{setSeed:function(d){b=a=(null==d?Math.random()*c:d)>>>0},getSeed:function(){return a},rand:function(){return b=(d*b+e)%c,b/c}}}();b.setSeed(a),d=new Array(j+1);for(var c=0;j+1>c;c++)d[c]=b.rand()},b.exports=e},{"../core/core":50}],78:[function(a,b,c){"use strict";var d=a("../core/core"),e=a("./polargeometry"),f=a("../core/constants");d.Vector=function(){var a,b,c;arguments[0]instanceof d?(this.p5=arguments[0],a=arguments[1][0]||0,b=arguments[1][1]||0,c=arguments[1][2]||0):(a=arguments[0]||0,b=arguments[1]||0,c=arguments[2]||0),this.x=a,this.y=b,this.z=c},d.Vector.prototype.toString=function(){return"p5.Vector Object : ["+this.x+", "+this.y+", "+this.z+"]"},d.Vector.prototype.set=function(a,b,c){return a instanceof d.Vector?(this.x=a.x||0,this.y=a.y||0,this.z=a.z||0,this):a instanceof Array?(this.x=a[0]||0,this.y=a[1]||0,this.z=a[2]||0,this):(this.x=a||0,this.y=b||0,this.z=c||0,this)},d.Vector.prototype.copy=function(){return this.p5?new d.Vector(this.p5,[this.x,this.y,this.z]):new d.Vector(this.x,this.y,this.z)},d.Vector.prototype.add=function(a,b,c){return a instanceof d.Vector?(this.x+=a.x||0,this.y+=a.y||0,this.z+=a.z||0,this):a instanceof Array?(this.x+=a[0]||0,this.y+=a[1]||0,this.z+=a[2]||0,this):(this.x+=a||0,this.y+=b||0,this.z+=c||0,this)},d.Vector.prototype.sub=function(a,b,c){return a instanceof d.Vector?(this.x-=a.x||0,this.y-=a.y||0,this.z-=a.z||0,this):a instanceof Array?(this.x-=a[0]||0,this.y-=a[1]||0,this.z-=a[2]||0,this):(this.x-=a||0,this.y-=b||0,this.z-=c||0,this)},d.Vector.prototype.mult=function(a){return this.x*=a||0,this.y*=a||0,this.z*=a||0,this},d.Vector.prototype.div=function(a){return this.x/=a,this.y/=a,this.z/=a,this},d.Vector.prototype.mag=function(){return Math.sqrt(this.magSq())},d.Vector.prototype.magSq=function(){var a=this.x,b=this.y,c=this.z;return a*a+b*b+c*c},d.Vector.prototype.dot=function(a,b,c){return a instanceof d.Vector?this.dot(a.x,a.y,a.z):this.x*(a||0)+this.y*(b||0)+this.z*(c||0)},d.Vector.prototype.cross=function(a){var b=this.y*a.z-this.z*a.y,c=this.z*a.x-this.x*a.z,e=this.x*a.y-this.y*a.x;return this.p5?new d.Vector(this.p5,[b,c,e]):new d.Vector(b,c,e)},d.Vector.prototype.dist=function(a){var b=a.copy().sub(this);return b.mag()},d.Vector.prototype.normalize=function(){return this.div(this.mag())},d.Vector.prototype.limit=function(a){var b=this.magSq();return b>a*a&&(this.div(Math.sqrt(b)),this.mult(a)),this},d.Vector.prototype.setMag=function(a){return this.normalize().mult(a)},d.Vector.prototype.heading=function(){var a=Math.atan2(this.y,this.x);return this.p5?this.p5._angleMode===f.RADIANS?a:e.radiansToDegrees(a):a},d.Vector.prototype.rotate=function(a){this.p5&&this.p5._angleMode===f.DEGREES&&(a=e.degreesToRadians(a));var b=this.heading()+a,c=this.mag();return this.x=Math.cos(b)*c,this.y=Math.sin(b)*c,this},d.Vector.prototype.lerp=function(a,b,c,e){return a instanceof d.Vector?this.lerp(a.x,a.y,a.z,b):(this.x+=(a-this.x)*e||0,this.y+=(b-this.y)*e||0,this.z+=(c-this.z)*e||0,this)},d.Vector.prototype.array=function(){return[this.x||0,this.y||0,this.z||0]},d.Vector.prototype.equals=function(a,b,c){var e,f,g;return a instanceof d.Vector?(e=a.x||0,f=a.y||0,g=a.z||0):a instanceof Array?(e=a[0]||0,f=a[1]||0,g=a[2]||0):(e=a||0,f=b||0,g=c||0),this.x===e&&this.y===f&&this.z===g},d.Vector.fromAngle=function(a){return this.p5&&this.p5._angleMode===f.DEGREES&&(a=e.degreesToRadians(a)),this.p5?new d.Vector(this.p5,[Math.cos(a),Math.sin(a),0]):new d.Vector(Math.cos(a),Math.sin(a),0)},d.Vector.random2D=function(){var a;return a=this.p5?this.p5._angleMode===f.DEGREES?this.p5.random(360):this.p5.random(f.TWO_PI):Math.random()*Math.PI*2,this.fromAngle(a)},d.Vector.random3D=function(){var a,b;this.p5?(a=this.p5.random(0,f.TWO_PI),b=this.p5.random(-1,1)):(a=Math.random()*Math.PI*2,b=2*Math.random()-1);var c=Math.sqrt(1-b*b)*Math.cos(a),e=Math.sqrt(1-b*b)*Math.sin(a);return this.p5?new d.Vector(this.p5,[c,e,b]):new d.Vector(c,e,b)},d.Vector.add=function(a,b,c){return c?c.set(a):c=a.copy(),c.add(b),c},d.Vector.sub=function(a,b,c){return c?c.set(a):c=a.copy(),c.sub(b),c},d.Vector.mult=function(a,b,c){return c?c.set(a):c=a.copy(),c.mult(b),c},d.Vector.div=function(a,b,c){return c?c.set(a):c=a.copy(),c.div(b),c},d.Vector.dot=function(a,b){return a.dot(b)},d.Vector.cross=function(a,b){return a.cross(b)},d.Vector.dist=function(a,b){return a.dist(b)},d.Vector.lerp=function(a,b,c,d){return d?d.set(a):d=a.copy(),d.lerp(b,c),d},d.Vector.angleBetween=function(a,b){var c=Math.acos(a.dot(b)/(a.mag()*b.mag()));return this.p5&&this.p5._angleMode===f.DEGREES&&(c=e.radiansToDegrees(c)),c},b.exports=d.Vector},{"../core/constants":49,"../core/core":50,"./polargeometry":79}],79:[function(a,b,c){b.exports={degreesToRadians:function(a){return 2*Math.PI*a/360},radiansToDegrees:function(a){return 360*a/(2*Math.PI)}}},{}],80:[function(a,b,c){"use strict";var d=a("../core/core"),e=!1,f=function(){var a,b,c=4294967296,d=1664525,e=1013904223;return{setSeed:function(d){b=a=(null==d?Math.random()*c:d)>>>0},getSeed:function(){return a},rand:function(){return b=(d*b+e)%c,b/c}}}();d.prototype.randomSeed=function(a){f.setSeed(a),e=!0},d.prototype.random=function(a,b){var c;if(c=e?f.rand():Math.random(),0===arguments.length)return c;if(1===arguments.length)return c*a;if(a>b){var d=a;a=b,b=d}return c*(b-a)+a};var g,h=!1;d.prototype.randomGaussian=function(a,b){var c,d,e,f;if(h)c=g,h=!1;else{do d=this.random(2)-1,e=this.random(2)-1,f=d*d+e*e;while(f>=1);f=Math.sqrt(-2*Math.log(f)/f),c=d*f,g=e*f,h=!0}var i=a||0,j=b||1;return c*j+i},b.exports=d},{"../core/core":50}],81:[function(a,b,c){"use strict";var d=a("../core/core"),e=a("./polargeometry"),f=a("../core/constants");d.prototype._angleMode=f.RADIANS,d.prototype.acos=function(a){return this._angleMode===f.RADIANS?Math.acos(a):e.radiansToDegrees(Math.acos(a))},d.prototype.asin=function(a){return this._angleMode===f.RADIANS?Math.asin(a):e.radiansToDegrees(Math.asin(a))},d.prototype.atan=function(a){return this._angleMode===f.RADIANS?Math.atan(a):e.radiansToDegrees(Math.atan(a))},d.prototype.atan2=function(a,b){return this._angleMode===f.RADIANS?Math.atan2(a,b):e.radiansToDegrees(Math.atan2(a,b))},d.prototype.cos=function(a){return this._angleMode===f.RADIANS?Math.cos(a):Math.cos(this.radians(a))},d.prototype.sin=function(a){return this._angleMode===f.RADIANS?Math.sin(a):Math.sin(this.radians(a))},d.prototype.tan=function(a){return this._angleMode===f.RADIANS?Math.tan(a):Math.tan(this.radians(a))},d.prototype.degrees=function(a){return e.radiansToDegrees(a)},d.prototype.radians=function(a){return e.degreesToRadians(a)},d.prototype.angleMode=function(a){(a===f.DEGREES||a===f.RADIANS)&&(this._angleMode=a)},b.exports=d},{"../core/constants":49,"../core/core":50,"./polargeometry":79}],82:[function(a,b,c){"use strict";var d=a("../core/core");d.prototype.textAlign=function(a,b){return this._renderer.textAlign.apply(this._renderer,arguments)},d.prototype.textLeading=function(a){return this._renderer.textLeading.apply(this._renderer,arguments)},d.prototype.textSize=function(a){return this._renderer.textSize.apply(this._renderer,arguments)},d.prototype.textStyle=function(a){return this._renderer.textStyle.apply(this._renderer,arguments)},d.prototype.textWidth=function(a){return this._renderer.textWidth.apply(this._renderer,arguments)},d.prototype.textAscent=function(){return this._renderer.textAscent()},d.prototype.textDescent=function(){return this._renderer.textDescent()},d.prototype._updateTextMetrics=function(){return this._renderer._updateTextMetrics()},b.exports=d},{"../core/core":50}],83:[function(a,b,c){"use strict";var d=a("../core/core"),e=a("../core/constants");a("../core/error_helpers"),d.prototype.text=function(a,b,c,d,e){for(var f=new Array(arguments.length),g=0;gi;i+=f)g.push(n(a,i));return c.simplifyThreshold&&e(g,c.simplifyThreshold),g}function e(a,b){b="undefined"==typeof b?0:b;for(var c=0,d=a.length-1;a.length>3&&d>=0;--d)j(i(a,d-1),i(a,d),i(a,d+1),b)&&(a.splice(d%a.length,1),c++);return c}function f(a){for(var b,c=[],d=0;db?b%c+c:b%c]}function j(a,b,c,d){if(!d)return 0===k(a,b,c);"undefined"==typeof j.tmpPoint1&&(j.tmpPoint1=[],j.tmpPoint2=[]);var e=j.tmpPoint1,f=j.tmpPoint2;e.x=b.x-a.x,e.y=b.y-a.y,f.x=c.x-b.x,f.y=c.y-b.y;var g=e.x*f.x+e.y*f.y,h=Math.sqrt(e.x*e.x+e.y*e.y),i=Math.sqrt(f.x*f.x+f.y*f.y),l=Math.acos(g/(h*i));return d>l}function k(a,b,c){return(b[0]-a[0])*(c[1]-a[1])-(c[0]-a[0])*(b[1]-a[1])}function l(a,b,c,d,e,f,g,h,i){var j=1-i,k=Math.pow(j,3),l=Math.pow(j,2),m=i*i,n=m*i,o=k*a+3*l*i*c+3*j*i*i*e+n*g,p=k*b+3*l*i*d+3*j*i*i*f+n*h,q=a+2*i*(c-a)+m*(e-2*c+a),r=b+2*i*(d-b)+m*(f-2*d+b),s=c+2*i*(e-c)+m*(g-2*e+c),t=d+2*i*(f-d)+m*(h-2*f+d),u=j*a+i*c,v=j*b+i*d,w=j*e+i*g,x=j*f+i*h,y=90-180*Math.atan2(q-s,r-t)/Math.PI;return(q>s||t>r)&&(y+=180),{x:o,y:p,m:{x:q,y:r},n:{x:s,y:t},start:{x:u,y:v},end:{x:w,y:x},alpha:y}}function m(a,b,c,d,e,f,g,h,i){return null==i?u(a,b,c,d,e,f,g,h):l(a,b,c,d,e,f,g,h,v(a,b,c,d,e,f,g,h,i))}function n(a,b,c){a=p(a);for(var d,e,f,g,h,i="",j={},k=0,n=0,o=a.length;o>n;n++){if(f=a[n],"M"===f[0])d=+f[1],e=+f[2];else{if(g=m(d,e,f[1],f[2],f[3],f[4],f[5],f[6]),k+g>b&&!c)return h=m(d,e,f[1],f[2],f[3],f[4],f[5],f[6],b-k),{x:h.x,y:h.y,alpha:h.alpha};k+=g,d=+f[5],e=+f[6]}i+=f.shift()+f}return j.end=i,h=c?k:l(d,e,f[0],f[1],f[2],f[3],f[4],f[5],1),h.alpha&&(h={x:h.x,y:h.y,alpha:h.alpha}),h}function o(a){var b=[],c=0,d=0,e=0,f=0,g=0;"M"===a[0][0]&&(c=+a[0][1],d=+a[0][2],e=c,f=d,g++,b[0]=["M",c,d]);for(var h,i,j,k=3===a.length&&"M"===a[0][0]&&"R"===a[1][0].toUpperCase()&&"Z"===a[2][0].toUpperCase(),l=g,m=a.length;m>l;l++){if(b.push(i=[]),j=a[l],j[0]!==String.prototype.toUpperCase.call(j[0]))switch(i[0]=String.prototype.toUpperCase.call(j[0]),i[0]){case"A":i[1]=j[1],i[2]=j[2],i[3]=j[3],i[4]=j[4],i[5]=j[5],i[6]=+(j[6]+c),i[7]=+(j[7]+d);break;case"V":i[1]=+j[1]+d;break;case"H":i[1]=+j[1]+c;break;case"R":h=[c,d].concat(j.slice(1));for(var n=2,o=h.length;o>n;n++)h[n]=+h[n]+c,h[++n]=+h[n]+d;b.pop(),b=b.concat(r(h,k));break;case"M":e=+j[1]+c,f=+j[2]+d;break;default:for(n=1,o=j.length;o>n;n++)i[n]=+j[n]+(n%2?c:d)}else if("R"===j[0])h=[c,d].concat(j.slice(1)),b.pop(),b=b.concat(r(h,k)),i=["R"].concat(j.slice(-2));else for(var p=0,q=j.length;q>p;p++)i[p]=j[p];switch(i[0]){case"Z":c=e,d=f;break;case"H":c=i[1];break;case"V":d=i[1];break;case"M":e=i[i.length-2],f=i[i.length-1];break;default:c=i[i.length-2],d=i[i.length-1]}}return b}function p(a,b){for(var c=o(a),d=b&&o(b),e={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},f={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},g=(function(a,b,c){var d,e,f={T:1,Q:1};if(!a)return["C",b.x,b.y,b.x,b.y,b.x,b.y];switch(a[0]in f||(b.qx=b.qy=null),a[0]){case"M":b.X=a[1],b.Y=a[2];break;case"A":a=["C"].concat(q.apply(0,[b.x,b.y].concat(a.slice(1))));break;case"S":"C"===c||"S"===c?(d=2*b.x-b.bx,e=2*b.y-b.by):(d=b.x,e=b.y),a=["C",d,e].concat(a.slice(1));break;case"T":"Q"===c||"T"===c?(b.qx=2*b.x-b.qx,b.qy=2*b.y-b.qy):(b.qx=b.x,b.qy=b.y),a=["C"].concat(t(b.x,b.y,b.qx,b.qy,a[1],a[2]));break;case"Q":b.qx=a[1],b.qy=a[2],a=["C"].concat(t(b.x,b.y,a[1],a[2],a[3],a[4]));break;case"L":a=["C"].concat(s(b.x,b.y,a[1],a[2]));break;case"H":a=["C"].concat(s(b.x,b.y,a[1],b.y));break;case"V":a=["C"].concat(s(b.x,b.y,b.x,a[1]));break;case"Z":a=["C"].concat(s(b.x,b.y,b.X,b.Y))}return a}),h=function(a,b){if(a[b].length>7){a[b].shift();for(var e=a[b];e.length;)j[b]="A",d&&(k[b]="A"),a.splice(b++,0,["C"].concat(e.splice(0,6)));a.splice(b,1),p=Math.max(c.length,d&&d.length||0)}},i=function(a,b,e,f,g){a&&b&&"M"===a[g][0]&&"M"!==b[g][0]&&(b.splice(g,0,["M",f.x,f.y]),e.bx=0,e.by=0,e.x=a[g][1],e.y=a[g][2],p=Math.max(c.length,d&&d.length||0))},j=[],k=[],l="",m="",n=0,p=Math.max(c.length,d&&d.length||0);p>n;n++){c[n]&&(l=c[n][0]),"C"!==l&&(j[n]=l,n&&(m=j[n-1])),c[n]=g(c[n],e,m),"A"!==j[n]&&"C"===l&&(j[n]="C"),h(c,n),d&&(d[n]&&(l=d[n][0]),"C"!==l&&(k[n]=l,n&&(m=k[n-1])),d[n]=g(d[n],f,m),"A"!==k[n]&&"C"===l&&(k[n]="C"),h(d,n)),i(c,d,e,f,n),i(d,c,f,e,n);var r=c[n],u=d&&d[n],v=r.length,w=d&&u.length;e.x=r[v-2],e.y=r[v-1],e.bx=parseFloat(r[v-4])||e.x,e.by=parseFloat(r[v-3])||e.y,f.bx=d&&(parseFloat(u[w-4])||f.x),f.by=d&&(parseFloat(u[w-3])||f.y),f.x=d&&u[w-2],f.y=d&&u[w-1]}return d?[c,d]:c}function q(a,b,c,d,e,f,g,h,i,j){var k,l,m,n,o,p=Math.PI,r=120*p/180,s=p/180*(+e||0),t=[],u=function(a,b,c){var d=a*Math.cos(c)-b*Math.sin(c),e=a*Math.sin(c)+b*Math.cos(c);return{x:d,y:e}};if(j)k=j[0],l=j[1],m=j[2],n=j[3];else{o=u(a,b,-s),a=o.x,b=o.y,o=u(h,i,-s),h=o.x,i=o.y;var v=(a-h)/2,w=(b-i)/2,x=v*v/(c*c)+w*w/(d*d);x>1&&(x=Math.sqrt(x),c=x*c,d=x*d);var y=c*c,z=d*d,A=(f===g?-1:1)*Math.sqrt(Math.abs((y*z-y*w*w-z*v*v)/(y*w*w+z*v*v)));m=A*c*w/d+(a+h)/2,n=A*-d*v/c+(b+i)/2,k=Math.asin(((b-n)/d).toFixed(9)),l=Math.asin(((i-n)/d).toFixed(9)),k=m>a?p-k:k,l=m>h?p-l:l,0>k&&(k=2*p+k),0>l&&(l=2*p+l),g&&k>l&&(k-=2*p),!g&&l>k&&(l-=2*p)}var B=l-k;if(Math.abs(B)>r){var C=l,D=h,E=i;l=k+r*(g&&l>k?1:-1),h=m+c*Math.cos(l),i=n+d*Math.sin(l),t=q(h,i,c,d,e,0,g,D,E,[l,C,m,n])}B=l-k;var F=Math.cos(k),G=Math.sin(k),H=Math.cos(l),I=Math.sin(l),J=Math.tan(B/4),K=4/3*c*J,L=4/3*d*J,M=[a,b],N=[a+K*G,b-L*F],O=[h+K*I,i-L*H],P=[h,i];if(N[0]=2*M[0]-N[0],N[1]=2*M[1]-N[1],j)return[N,O,P].concat(t);t=[N,O,P].concat(t).join().split(",");for(var Q=[],R=0,S=t.length;S>R;R++)Q[R]=R%2?u(t[R-1],t[R],s).y:u(t[R],t[R+1],s).x;return Q}function r(a,b){for(var c=[],d=0,e=a.length;e-2*!b>d;d+=2){var f=[{x:+a[d-2],y:+a[d-1]},{x:+a[d], +y:+a[d+1]},{x:+a[d+2],y:+a[d+3]},{x:+a[d+4],y:+a[d+5]}];b?d?e-4===d?f[3]={x:+a[0],y:+a[1]}:e-2===d&&(f[2]={x:+a[0],y:+a[1]},f[3]={x:+a[2],y:+a[3]}):f[0]={x:+a[e-2],y:+a[e-1]}:e-4===d?f[3]=f[2]:d||(f[0]={x:+a[d],y:+a[d+1]}),c.push(["C",(-f[0].x+6*f[1].x+f[2].x)/6,(-f[0].y+6*f[1].y+f[2].y)/6,(f[1].x+6*f[2].x-f[3].x)/6,(f[1].y+6*f[2].y-f[3].y)/6,f[2].x,f[2].y])}return c}function s(a,b,c,d){return[a,b,c,d,c,d]}function t(a,b,c,d,e,f){var g=1/3,h=2/3;return[g*a+h*c,g*b+h*d,g*e+h*c,g*f+h*d,e,f]}function u(a,b,c,d,e,f,g,h,i){null==i&&(i=1),i=i>1?1:0>i?0:i;for(var j=i/2,k=12,l=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],m=0,n=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],o=0;k>o;o++){var p=j*l[o]+j,q=w(p,a,c,e,g),r=w(p,b,d,f,h),s=q*q+r*r;m+=n[o]*Math.sqrt(s)}return j*m}function v(a,b,c,d,e,f,g,h,i){if(!(0>i||u(a,b,c,d,e,f,g,h)n;)l/=2,m+=(i>j?1:-1)*l,j=u(a,b,c,d,e,f,g,h,m);return m}}function w(a,b,c,d,e){var f=-3*b+9*c-9*d+3*e,g=a*f+6*b-12*c+6*d;return a*g-3*b+3*c}function x(){for(var a=new Array(arguments.length),b=0;b2?a=this._getPath(a,b,c,d):"object"==typeof b&&(d=b),d&&"number"==typeof d.decimals&&(e=d.decimals),a.toPathData(e)},y.Font.prototype._getSVG=function(a,b,c,d){var e=3;return"string"==typeof a&&arguments.length>2?a=this._getPath(a,b,c,d):"object"==typeof b&&(d=b),d&&("number"==typeof d.decimals&&(e=d.decimals),"number"==typeof d.strokeWidth&&(a.strokeWidth=d.strokeWidth),"undefined"!=typeof d.fill&&(a.fill=d.fill),"undefined"!=typeof d.stroke&&(a.stroke=d.stroke)),a.toSVG(e)},y.Font.prototype._renderPath=function(a,b,c,d){var e,f=d&&d.renderer||this.parent._renderer,g=f.drawingContext;e="object"==typeof a&&a.commands?a.commands:this._getPath(a,b,c,f._textSize,d).commands,g.beginPath();for(var h=0;h1;)d=Math.random()*f|0,e=a[--f],a[f]=a[d],a[d]=e;return a},d.prototype.sort=function(a,b){var c=b?a.slice(0,Math.min(b,a.length)):a,d=b?a.slice(Math.min(b,a.length)):[];return c="string"==typeof c[0]?c.sort():c.sort(function(a,b){return a-b}),c.concat(d)},d.prototype.splice=function(a,b,c){return Array.prototype.splice.apply(a,[c,0].concat(b)),a},d.prototype.subset=function(a,b,c){return"undefined"!=typeof c?a.slice(b,b+c):a.slice(b,a.length)},b.exports=d},{"../core/core":50}],86:[function(a,b,c){"use strict";var d=a("../core/core");d.prototype["float"]=function(a){return parseFloat(a)},d.prototype["int"]=function(a,b){return"string"==typeof a?(b=b||10,parseInt(a,b)):"number"==typeof a?0|a:"boolean"==typeof a?a?1:0:a instanceof Array?a.map(function(a){return d.prototype["int"](a,b)}):void 0},d.prototype.str=function(a){return a instanceof Array?a.map(d.prototype.str):String(a)},d.prototype["boolean"]=function(a){return"number"==typeof a?0!==a:"string"==typeof a?"true"===a.toLowerCase():"boolean"==typeof a?a:a instanceof Array?a.map(d.prototype["boolean"]):void 0},d.prototype["byte"]=function(a){var b=d.prototype["int"](a,10);return"number"==typeof b?(b+128)%256-128:b instanceof Array?b.map(d.prototype["byte"]):void 0},d.prototype["char"]=function(a){return"number"!=typeof a||isNaN(a)?a instanceof Array?a.map(d.prototype["char"]):"string"==typeof a?d.prototype["char"](parseInt(a,10)):void 0:String.fromCharCode(a)},d.prototype.unchar=function(a){return"string"==typeof a&&1===a.length?a.charCodeAt(0):a instanceof Array?a.map(d.prototype.unchar):void 0},d.prototype.hex=function(a,b){if(b=void 0===b||null===b?b=8:b,a instanceof Array)return a.map(function(a){return d.prototype.hex(a,b)});if("number"==typeof a){0>a&&(a=4294967295+a+1);for(var c=Number(a).toString(16).toUpperCase();c.length=b&&(c=c.substring(c.length-b,c.length)),c}},d.prototype.unhex=function(a){return a instanceof Array?a.map(d.prototype.unhex):parseInt("0x"+a,16)},b.exports=d},{"../core/core":50}],87:[function(a,b,c){"use strict";function d(){var a=arguments[0],b=0>a,c=b?a.toString().substring(1):a.toString(),d=c.indexOf("."),e=-1!==d?c.substring(0,d):c,f=-1!==d?c.substring(d+1):"",g=b?"-":"";if(3===arguments.length){var h="";(-1!==d||arguments[2]-f.length>0)&&(h="."),f.length>arguments[2]&&(f=f.substring(0,arguments[2]));for(var i=0;ic.length){c+=-1===b?".":"";for(var e=arguments[1]-c.length+1,f=0;e>f;f++)c+="0"}else c=c.substring(0,arguments[1]+1);return d+c}function f(){return parseFloat(arguments[0])>0?"+"+arguments[0].toString():arguments[0].toString()}function g(){return parseFloat(arguments[0])>0?" "+arguments[0].toString():arguments[0].toString()}var h=a("../core/core");h.prototype.join=function(a,b){return a.join(b)},h.prototype.match=function(a,b){return a.match(b)},h.prototype.matchAll=function(a,b){for(var c=new RegExp(b,"g"),d=c.exec(a),e=[];null!==d;)e.push(d),d=c.exec(a);return e},h.prototype.nf=function(){if(arguments[0]instanceof Array){var a=arguments[1],b=arguments[2];return arguments[0].map(function(c){return d(c,a,b)})}var c=Object.prototype.toString.call(arguments[0]);return"[object Arguments]"===c?3===arguments[0].length?this.nf(arguments[0][0],arguments[0][1],arguments[0][2]):2===arguments[0].length?this.nf(arguments[0][0],arguments[0][1]):this.nf(arguments[0][0]):d.apply(this,arguments)},h.prototype.nfc=function(){if(arguments[0]instanceof Array){var a=arguments[1];return arguments[0].map(function(b){return e(b,a)})}return e.apply(this,arguments)},h.prototype.nfp=function(){var a=this.nf.apply(this,arguments);return a instanceof Array?a.map(f):f(a)},h.prototype.nfs=function(){var a=this.nf.apply(this,arguments);return a instanceof Array?a.map(g):g(a)},h.prototype.split=function(a,b){return a.split(b)},h.prototype.splitTokens=function(){var a,b,c,d;return d=arguments[1],arguments.length>1?(c=/\]/g.exec(d),b=/\[/g.exec(d),b&&c?(d=d.slice(0,c.index)+d.slice(c.index+1),b=/\[/g.exec(d),d=d.slice(0,b.index)+d.slice(b.index+1),a=new RegExp("[\\["+d+"\\]]","g")):c?(d=d.slice(0,c.index)+d.slice(c.index+1),a=new RegExp("["+d+"\\]]","g")):b?(d=d.slice(0,b.index)+d.slice(b.index+1),a=new RegExp("["+d+"\\[]","g")):a=new RegExp("["+d+"]","g")):a=/\s/g,arguments[0].split(a).filter(function(a){return a})},h.prototype.trim=function(a){return a instanceof Array?a.map(this.trim):a.trim()},b.exports=h},{"../core/core":50}],88:[function(a,b,c){"use strict";var d=a("../core/core");d.prototype.day=function(){return(new Date).getDate()},d.prototype.hour=function(){return(new Date).getHours()},d.prototype.minute=function(){return(new Date).getMinutes()},d.prototype.millis=function(){return window.performance.now()},d.prototype.month=function(){return(new Date).getMonth()+1},d.prototype.second=function(){return(new Date).getSeconds()},d.prototype.year=function(){return(new Date).getFullYear()},b.exports=d},{"../core/core":50}]},{},[41])(41)});p5.prototype._validateParameters = function() {};p5.prototype._friendlyFileLoadError = function() {}; \ No newline at end of file diff --git a/lib/p5.sound.js b/lib/p5.sound.js index 7411b171..5f9e6b16 100644 --- a/lib/p5.sound.js +++ b/lib/p5.sound.js @@ -1,4 +1,4 @@ -/*! p5.sound.js v0.3.5 2017-08-18 */ +/*! p5.sound.js v0.3.5 2017-08-14 */ /** * p5.sound extends p5 with Web Audio functionality including audio input, @@ -8656,11 +8656,12 @@ panner3d = function () { * @constructor * @return {Object} p5.Panner3D Object * - * @property {Web Audio Node} spatializer Web Audio Spatial Panning Node - * @property {AudioParam} spatializer.panningModel "equal power" or "HRTF" - * @pproperty {AudioParam} spatializer.distanceModel "linear", "inverse", or "exponential" + * @param {Web Audio Node} spatializer Web Audio Spatial Panning Node + * @param {AudioParam} spatializer.panningModel "equal power" or "HRTF" + * @param {AudioParam} spatializer.distanceModel "linear", "inverse", or "exponential" + * @param {String} [type] [Specify construction of a spatial panner or listener] */ - p5.Panner3D = function () { + p5.Panner3D = function (type) { Effect.call(this); this.panner = this.ac.createPanner(); this.panner.panningModel = 'HRTF'; @@ -8678,13 +8679,13 @@ panner3d = function () { }; /** * Set the X,Y,Z position of the Panner - * @param {Number} xVal - * @param {Number} yVal - * @param {Number} zVal - * @param {Number} time - * @return {Array} Updated x, y, z values as an array + * @param {[Number]} xVal + * @param {[Number]} yVal + * @param {[Number]} zVal + * @param {[Number]} time + * @return {[Array]} [Updated x, y, z values as an array] */ - p5.Panner3D.prototype.set = function (xVal, yVal, zVal, time) { + p5.Panner3D.prototype.position = function (xVal, yVal, zVal, time) { this.positionX(xVal, time); this.positionY(yVal, time); this.positionZ(zVal, time); @@ -8696,10 +8697,7 @@ panner3d = function () { }; /** * Getter and setter methods for position coordinates - * @method positionX - * @method positionY - * @method positionZ - * @return {Number} updated coordinate value + * @return {Number} [updated coordinate value] */ p5.Panner3D.prototype.positionX = function (xVal, time) { var t = time || 0; @@ -8734,15 +8732,6 @@ panner3d = function () { } return this.panner.positionZ.value; }; - /** - * Set the X,Y,Z position of the Panner - * @method orient - * @param {Number} xVal - * @param {Number} yVal - * @param {Number} zVal - * @param {Number} time - * @return {Array} Updated x, y, z values as an array - */ p5.Panner3D.prototype.orient = function (xVal, yVal, zVal, time) { this.orientX(xVal, time); this.orientY(yVal, time); @@ -8755,9 +8744,6 @@ panner3d = function () { }; /** * Getter and setter methods for orient coordinates - * @method positionX - * @method positionY - * @method positionZ * @return {Number} [updated coordinate value] */ p5.Panner3D.prototype.orientX = function (xVal, time) { @@ -8789,49 +8775,10 @@ panner3d = function () { this.panner.orientationZ.cancelScheduledValues(this.ac.currentTime + 0.01 + t); this.panner.orientationZ.linearRampToValueAtTime(zVal, this.ac.currentTime + 0.02 + t); } else if (zVal) { - zVal.connect(this.panner.orientationZ); + zVal.connect(this.panner.orientationY); } return this.panner.orientationZ.value; }; - /** - * Set the rolloff factor and max distance - * @method setFalloff - * @param {Number} [maxDistance] - * @param {Number} [rolloffFactor] - */ - p5.Panner3D.prototype.setFalloff = function (maxDistance, rolloffFactor) { - this.maxDist(maxDistance); - this.rolloff(rolloffFactor); - }; - /** - * Maxium distance between the source and the listener - * @method maxDist - * @param {Number} maxDistance - * @return {Number} updated value - */ - p5.Panner3D.prototype.maxDist = function (maxDistance) { - if (typeof maxDistance === 'number') { - this.panner.maxDistance = maxDistance; - } - return this.panner.maxDistance; - }; - /** - * How quickly the volume is reduced as the source moves away from the listener - * @method rollof - * @param {Number} rolloffFactor - * @return {Number} updated value - */ - p5.Panner3D.prototype.rolloff = function (rolloffFactor) { - if (typeof rolloffFactor === 'number') { - this.panner.rolloffFactor = rolloffFactor; - } - return this.panner.rolloffFactor; - }; - p5.Panner3D.dispose = function () { - Effect.prototype.dispose.apply(this); - this.panner.disconnect(); - delete this.panner; - }; return p5.Panner3D; }(master, effect); var listener3d; @@ -8839,108 +8786,109 @@ var listener3d; listener3d = function () { var p5sound = master; var Effect = effect; - // /** - // * listener is a class that can construct both a Spatial Panner - // * and a Spatial Listener. The panner is based on the - // * Web Audio Spatial Panner Node - // * https://www.w3.org/TR/webaudio/#the-listenernode-interface - // * This panner is a spatial processing node that allows audio to be positioned - // * and oriented in 3D space. - // * - // * The Listener modifies the properties of the Audio Context Listener. - // * Both objects types use the same methods. The default is a spatial panner. - // * - // * p5.Panner3D - Constructs a Spatial Panner
- // * p5.Listener3D - Constructs a Spatial Listener
- // * - // * @class listener - // * @constructor - // * @return {Object} p5.Listener3D Object - // * - // * @param {Web Audio Node} listener Web Audio Spatial Panning Node - // * @param {AudioParam} listener.panningModel "equal power" or "HRTF" - // * @param {AudioParam} listener.distanceModel "linear", "inverse", or "exponential" - // * @param {String} [type] [Specify construction of a spatial panner or listener] - // */ + /** + * Spatializer is a class that can construct both a Spatial Panner + * and a Spatial Listener. The panner is based on the + * Web Audio Spatial Panner Node + * https://www.w3.org/TR/webaudio/#the-spatializernode-interface + * This panner is a spatial processing node that allows audio to be positioned + * and oriented in 3D space. + * + * The Listener modifies the properties of the Audio Context Listener. + * Both objects types use the same methods. The default is a spatial panner. + * + * p5.Panner3D - Constructs a Spatial Panner
+ * p5.Listener3D - Constructs a Spatial Listener
+ * + * @class Spatializer + * @constructor + * @return {Object} p5.Listener3D Object + * + * @param {Web Audio Node} spatializer Web Audio Spatial Panning Node + * @param {AudioParam} spatializer.panningModel "equal power" or "HRTF" + * @param {AudioParam} spatializer.distanceModel "linear", "inverse", or "exponential" + * @param {String} [type] [Specify construction of a spatial panner or listener] + */ p5.Listener3D = function (type) { + // if (type==="listener") { this.ac = p5sound.audiocontext; this.listener = this.ac.listener; }; - // /** - // * Connect an audio sorce - // * @param {Object} src Input source - // */ + /** + * Connect an audio sorce + * @param {Object} src Input source + */ p5.Listener3D.prototype.process = function (src) { src.connect(this.input); }; - // /** - // * Set the X,Y,Z position of the Panner - // * @param {[Number]} xVal - // * @param {[Number]} yVal - // * @param {[Number]} zVal - // * @param {[Number]} time - // * @return {[Array]} [Updated x, y, z values as an array] - // */ + /** + * Set the X,Y,Z position of the Panner + * @param {[Number]} xVal + * @param {[Number]} yVal + * @param {[Number]} zVal + * @param {[Number]} time + * @return {[Array]} [Updated x, y, z values as an array] + */ p5.Listener3D.prototype.position = function (xVal, yVal, zVal, time) { this.positionX(xVal, time); this.positionY(yVal, time); this.positionZ(zVal, time); return [ - this.listener.positionX.value, - this.listener.positionY.value, - this.listener.positionZ.value + this.spatializer.positionX.value, + this.spatializer.positionY.value, + this.spatializer.positionZ.value ]; }; - // /** - // * Getter and setter methods for position coordinates - // * @return {Number} [updated coordinate value] - // */ + /** + * Getter and setter methods for position coordinates + * @return {Number} [updated coordinate value] + */ p5.Listener3D.prototype.positionX = function (xVal, time) { var t = time || 0; if (typeof xVal === 'number') { - this.listener.positionX.value = xVal; - this.listener.positionX.cancelScheduledValues(this.ac.currentTime + 0.01 + t); - this.listener.positionX.linearRampToValueAtTime(xVal, this.ac.currentTime + 0.02 + t); + this.spatializer.positionX.value = xVal; + this.spatializer.positionX.cancelScheduledValues(this.ac.currentTime + 0.01 + t); + this.spatializer.positionX.linearRampToValueAtTime(xVal, this.ac.currentTime + 0.02 + t); } else if (xVal) { - xVal.connect(this.listener.positionX); + xVal.connect(this.spatializer.positionX); } - return this.listener.positionX.value; + return this.spatializer.positionX.value; }; p5.Listener3D.prototype.positionY = function (yVal, time) { var t = time || 0; if (typeof yVal === 'number') { - this.listener.positionY.value = yVal; - this.listener.positionY.cancelScheduledValues(this.ac.currentTime + 0.01 + t); - this.listener.positionY.linearRampToValueAtTime(yVal, this.ac.currentTime + 0.02 + t); + this.spatializer.positionY.value = yVal; + this.spatializer.positionY.cancelScheduledValues(this.ac.currentTime + 0.01 + t); + this.spatializer.positionY.linearRampToValueAtTime(yVal, this.ac.currentTime + 0.02 + t); } else if (yVal) { - yVal.connect(this.listener.positionY); + yVal.connect(this.spatializer.positionY); } - return this.listener.positionY.value; + return this.spatializer.positionY.value; }; p5.Listener3D.prototype.positionZ = function (zVal, time) { var t = time || 0; if (typeof zVal === 'number') { - this.listener.positionZ.value = zVal; - this.listener.positionZ.cancelScheduledValues(this.ac.currentTime + 0.01 + t); - this.listener.positionZ.linearRampToValueAtTime(zVal, this.ac.currentTime + 0.02 + t); + this.spatializer.positionZ.value = zVal; + this.spatializer.positionZ.cancelScheduledValues(this.ac.currentTime + 0.01 + t); + this.spatializer.positionZ.linearRampToValueAtTime(zVal, this.ac.currentTime + 0.02 + t); } else if (zVal) { - zVal.connect(this.listener.positionZ); + zVal.connect(this.spatializer.positionZ); } - return this.listener.positionZ.value; + return this.spatializer.positionZ.value; }; /** - * Overrides the listener orient() method because Listener has slightly + * [Overrides the Spatializer orient() method because Listener has slightly * different params. In human terms, Forward vectors are the direction the * nose is pointing. Up vectors are the direction of the top of the head. * - * @param {Number} xValF Forward vector X direction - * @param {Number} yValF Forward vector Y direction - * @param {Number} zValF Forward vector Z direction - * @param {Number} xValU Up vector X direction - * @param {Number} yValU Up vector Y direction - * @param {Number} zValU Up vector Z direction - * @param {Number} time - * @return {Array} All orienation params + * @param {[Number]} xValF [Forward vector X direction] + * @param {[Number]} yValF [Forward vector Y direction] + * @param {[Number]} zValF [Forward vector Z direction] + * @param {[Number]} xValU [Up vector X direction] + * @param {[Number]} yValU [Up vector Y direction] + * @param {[Number]} zValU [Up vector Z direction] + * @param {[Number]} time + * @return {[Array]} [All orienation params] */ p5.Listener3D.prototype.orient = function (xValF, yValF, zValF, xValU, yValU, zValU, time) { if (arguments.length === 3 || arguments.length === 4) { @@ -8951,12 +8899,12 @@ listener3d = function () { this.orientUp(xValU, yValU, zValU, time); } return [ - this.listener.forwardX.value, - this.listener.forwardY.value, - this.listener.forwardZ.value, - this.listener.upX.value, - this.listener.upY.value, - this.listener.upZ.value + this.spatializer.forwardX.value, + this.spatializer.forwardY.value, + this.spatializer.forwardZ.value, + this.spatializer.upX.value, + this.spatializer.upY.value, + this.spatializer.upZ.value ]; }; p5.Listener3D.prototype.orientForward = function (xValF, yValF, zValF, time) { @@ -8964,9 +8912,9 @@ listener3d = function () { this.forwardY(yValF, time); this.forwardZ(zValF, time); return [ - this.listener.forwardX, - this.listener.forwardY, - this.listener.forwardZ + this.spatializer.forwardX, + this.spatializer.forwardY, + this.spatializer.forwardZ ]; }; p5.Listener3D.prototype.orientUp = function (xValU, yValU, zValU, time) { @@ -8974,80 +8922,80 @@ listener3d = function () { this.upY(yValU, time); this.upZ(zValU, time); return [ - this.listener.upX, - this.listener.upY, - this.listener.upZ + this.spatializer.upX, + this.spatializer.upY, + this.spatializer.upZ ]; }; - // /** - // * Getter and setter methods for orient coordinates - // * @return {Number} [updated coordinate value] - // */ + /** + * Getter and setter methods for orient coordinates + * @return {Number} [updated coordinate value] + */ p5.Listener3D.prototype.forwardX = function (xVal, time) { var t = time || 0; if (typeof xVal === 'number') { - this.listener.forwardX.value = xVal; - this.listener.forwardX.cancelScheduledValues(this.ac.currentTime + 0.01 + t); - this.listener.forwardX.linearRampToValueAtTime(xVal, this.ac.currentTime + 0.02 + t); + this.spatializer.forwardX.value = xVal; + this.spatializer.forwardX.cancelScheduledValues(this.ac.currentTime + 0.01 + t); + this.spatializer.forwardX.linearRampToValueAtTime(xVal, this.ac.currentTime + 0.02 + t); } else if (xVal) { - xVal.connect(this.listener.forwardX); + xVal.connect(this.spatializer.forwardX); } - return this.listener.forwardX.value; + return this.spatializer.forwardX.value; }; p5.Listener3D.prototype.forwardY = function (yVal, time) { var t = time || 0; if (typeof yVal === 'number') { - this.listener.forwardY.value = yVal; - this.listener.forwardY.cancelScheduledValues(this.ac.currentTime + 0.01 + t); - this.listener.forwardY.linearRampToValueAtTime(yVal, this.ac.currentTime + 0.02 + t); + this.spatializer.forwardY.value = yVal; + this.spatializer.forwardY.cancelScheduledValues(this.ac.currentTime + 0.01 + t); + this.spatializer.forwardY.linearRampToValueAtTime(yVal, this.ac.currentTime + 0.02 + t); } else if (yVal) { - yVal.connect(this.listener.forwardY); + yVal.connect(this.spatializer.forwardY); } - return this.listener.forwardY.value; + return this.spatializer.forwardY.value; }; p5.Listener3D.prototype.forwardZ = function (zVal, time) { var t = time || 0; if (typeof zVal === 'number') { - this.listener.forwardZ.value = zVal; - this.listener.forwardZ.cancelScheduledValues(this.ac.currentTime + 0.01 + t); - this.listener.forwardZ.linearRampToValueAtTime(zVal, this.ac.currentTime + 0.02 + t); + this.spatializer.forwardZ.value = zVal; + this.spatializer.forwardZ.cancelScheduledValues(this.ac.currentTime + 0.01 + t); + this.spatializer.forwardZ.linearRampToValueAtTime(zVal, this.ac.currentTime + 0.02 + t); } else if (zVal) { - zVal.connect(this.listener.forwardZ); + zVal.connect(this.spatializer.forwardZ); } - return this.listener.forwardZ.value; + return this.spatializer.forwardZ.value; }; p5.Listener3D.prototype.upX = function (xVal, time) { var t = time || 0; if (typeof xVal === 'number') { - this.listener.upX.value = xVal; - this.listener.upX.cancelScheduledValues(this.ac.currentTime + 0.01 + t); - this.listener.upX.linearRampToValueAtTime(xVal, this.ac.currentTime + 0.02 + t); + this.spatializer.upX.value = xVal; + this.spatializer.upX.cancelScheduledValues(this.ac.currentTime + 0.01 + t); + this.spatializer.upX.linearRampToValueAtTime(xVal, this.ac.currentTime + 0.02 + t); } else if (xVal) { - xVal.connect(this.listener.upX); + xVal.connect(this.spatializer.upX); } - return this.listener.upX.value; + return this.spatializer.upX.value; }; p5.Listener3D.prototype.upY = function (yVal, time) { var t = time || 0; if (typeof yVal === 'number') { - this.listener.upY.value = yVal; - this.listener.upY.cancelScheduledValues(this.ac.currentTime + 0.01 + t); - this.listener.upY.linearRampToValueAtTime(yVal, this.ac.currentTime + 0.02 + t); + this.spatializer.upY.value = yVal; + this.spatializer.upY.cancelScheduledValues(this.ac.currentTime + 0.01 + t); + this.spatializer.upY.linearRampToValueAtTime(yVal, this.ac.currentTime + 0.02 + t); } else if (yVal) { - yVal.connect(this.listener.upY); + yVal.connect(this.spatializer.upY); } - return this.listener.upY.value; + return this.spatializer.upY.value; }; p5.Listener3D.prototype.upZ = function (zVal, time) { var t = time || 0; if (typeof zVal === 'number') { - this.listener.upZ.value = zVal; - this.listener.upZ.cancelScheduledValues(this.ac.currentTime + 0.01 + t); - this.listener.upZ.linearRampToValueAtTime(zVal, this.ac.currentTime + 0.02 + t); + this.spatializer.upZ.value = zVal; + this.spatializer.upZ.cancelScheduledValues(this.ac.currentTime + 0.01 + t); + this.spatializer.upZ.linearRampToValueAtTime(zVal, this.ac.currentTime + 0.02 + t); } else if (zVal) { - zVal.connect(this.listener.upZ); + zVal.connect(this.spatializer.upZ); } - return this.listener.upZ.value; + return this.spatializer.upZ.value; }; return p5.Listener3D; }(master, effect); @@ -10508,254 +10456,6 @@ looper = function () { } } }(master); -var soundloop; -'use strict'; -soundloop = function () { - var p5sound = master; - var Clock = Tone_core_Clock; - /** - * SoundLoop - * - * @class p5.SoundLoop - * @constructor - * - * @param {Function} callback this function will be called on each iteration of theloop - * @param {Number or String} [interval] amount of time or beats for each iteration of the loop - * defaults to 1 - * - * @example - *
- * var click; - * var looper1; - * - * function preload() { - * click = loadSound('assets/drum.mp3' - * } - * - * function setup() { - * //the looper's callback is passed the timeFromNow - * //this value should be used as a reference point from - * //which to schedule sounds - * looper1 = new p5.SoundLoop(function(timeFromNow){ - * click.play(timeFromNow); - * background(255 * (looper1.iterations % 2)); - * }, 2); - * - * //stop after 10 iteratios; - * looper1.maxIterations = 10; - * //start the loop - * looper1.start(); - * } - *
- */ - p5.SoundLoop = function (callback, interval) { - this.callback = callback; - /** - * musicalTimeMode uses Tone.Time convention - * @property {Boolean} musicalTimeMode true if string, false if number - */ - this.musicalTimeMode = typeof this._interval === 'number' ? false : true; - this._interval = interval || 1; - /** - * musicalTimeMode variables - * modify these only when the interval is specified in musicalTime format as a string - * @property {Number} [BPM] beats per minute (defaults to 60) - * @property {Number} [timeSignature] number of quarter notes in a measure (defaults to 4) - */ - this._timeSignature = 4; - this._bpm = 60; - this.isPlaying = false; - /** - * Set a limit to the number of loops to play - * @property {Number} [maxIterations] defaults to Infinity - */ - this.maxIterations = Infinity; - var self = this; - this.clock = new Clock({ - 'callback': function (time) { - var timeFromNow = time - p5sound.audiocontext.currentTime; - /** - * Do not initiate the callback if timeFromNow is < 0 - * This ususually occurs for a few milliseconds when the page - * is not fully loaded - * - * The callback should only be called until maxIterations is reached - */ - if (timeFromNow > 0 && self.iterations <= self.maxIterations) { - self.callback(timeFromNow); - } - }, - 'frequency': this._calcFreq() - }); - }; - /** - * Start the loop - * @method start - * @param {Number} [timeFromNow] schedule a starting time - */ - p5.SoundLoop.prototype.start = function (timeFromNow) { - var t = timeFromNow || 0; - var now = p5sound.audiocontext.currentTime; - if (!this.isPlaying) { - this.clock.start(now + t); - this.isPlaying = true; - } - }; - /** - * Stop the loop - * @method stop - * @param {Number} [timeFromNow] schedule a stopping time - */ - p5.SoundLoop.prototype.stop = function (timeFromNow) { - var t = timeFromNow || 0; - var now = p5sound.audiocontext.currentTime; - if (this.isPlaying) { - this.clock.stop(now + t); - this.isPlaying = false; - } - }; - /** - * Pause the loop - * @method pause - * @param {Number} [timeFromNow] schedule a pausing time - */ - p5.SoundLoop.prototype.pause = function (timeFromNow) { - var t = timeFromNow || 0; - if (this.isPlaying) { - this.clock.pause(t); - this.isPlaying = false; - } - }; - /** - * Synchronize loops. Use this method to start two more more loops in synchronization - * or to start a loop in synchronization with a loop that is already playing - * This method will schedule the implicit loop in sync with the explicit master loop - * i.e. loopToStart.syncedStart(loopToSyncWith) - * - * @method syncedStart - * @param {Object} otherLoop a p5.SoundLoop to sync with - * @param {Number} [timeFromNow] Start the loops in sync after timeFromNow seconds - */ - p5.SoundLoop.prototype.syncedStart = function (otherLoop, timeFromNow) { - var t = timeFromNow || 0; - var now = p5sound.audiocontext.currentTime; - if (!otherLoop.isPlaying) { - otherLoop.clock.start(now + t); - otherLoop.isPlaying = true; - this.clock.start(now + t); - this.isPlaying = true; - } else if (otherLoop.isPlaying) { - var time = otherLoop.clock._nextTick - p5sound.audiocontext.currentTime; - this.clock.start(now + time); - this.isPlaying = true; - } - }; - /** - * Updates frequency value, reflected in next callback - * @private - * @method _update - */ - p5.SoundLoop.prototype._update = function () { - this.clock.frequency.value = this._calcFreq(); - }; - /** - * Calculate the frequency of the clock's callback based on bpm, interval, and timesignature - * @private - * @method _calcFreq - * @return {Number} new clock frequency value - */ - p5.SoundLoop.prototype._calcFreq = function () { - //Seconds mode, bpm / timesignature has no effect - if (typeof this._interval === 'number') { - this.musicalTimeMode = false; - return 1 / this._interval; - } else if (typeof this._interval === 'string') { - this.musicalTimeMode = true; - return this._bpm / 60 / this._convertNotation(this._interval) * (this._timeSignature / 4); - } - }; - /** - * Convert notation from musical time format to seconds - * Uses Tone.Time convention - * @private - * @method _convertNotation - * @param {String} value value to be converted - * @return {Number} converted value in seconds - */ - p5.SoundLoop.prototype._convertNotation = function (value) { - var type = value.slice(-1); - value = Number(value.slice(0, -1)); - switch (type) { - case 'm': - return this._measure(value); - case 'n': - return this._note(value); - default: - console.warn('Specified interval is not formatted correctly. See Tone.js ' + 'timing reference for more info: https://github.com/Tonejs/Tone.js/wiki/Time'); - } - }; - /** - * Helper conversion methods of measure and note - * @private - * @method _measure - * @method _note - */ - p5.SoundLoop.prototype._measure = function (value) { - return value * this._timeSignature; - }; - p5.SoundLoop.prototype._note = function (value) { - return this._timeSignature / value; - }; - /** - * Getters and Setters, setting any paramter will result in a change in the clock's - * frequency, that will be reflected after the next callback - * @param {Number} bpm - * @param {Number} timeSignature - * @param {Number/String} interval length of the loops interval - * @param @readOnly {Number} iteations how many times the callback has been called so far - * - */ - Object.defineProperty(p5.SoundLoop.prototype, 'bpm', { - get: function () { - return this._bpm; - }, - set: function (bpm) { - if (!this.musicalTimeMode) { - console.warn('Changing the BPM in "seconds" mode has no effect. ' + 'BPM is only relevant in musicalTimeMode ' + 'when the interval is specified as a string ' + '("2n", "4n", "1m"...etc)'); - } - this._bpm = bpm; - this._update(); - } - }); - Object.defineProperty(p5.SoundLoop.prototype, 'timeSignature', { - get: function () { - return this._timeSignature; - }, - set: function (timeSig) { - if (!this.musicalTimeMode) { - console.warn('Changing the timeSignature in "seconds" mode has no effect. ' + 'BPM is only relevant in musicalTimeMode ' + 'when the interval is specified as a string ' + '("2n", "4n", "1m"...etc)'); - } - this._timeSignature = timeSig; - this._update(); - } - }); - Object.defineProperty(p5.SoundLoop.prototype, 'interval', { - get: function () { - return this._interval; - }, - set: function (interval) { - this.musicalTimeMode = typeof interval === 'Number' ? false : true; - this._interval = interval; - this._update(); - } - }); - Object.defineProperty(p5.SoundLoop.prototype, 'iterations', { - get: function () { - return this.clock.ticks; - } - }); - return p5.SoundLoop; -}(master, Tone_core_Clock); var compressor; compressor = function () { 'use strict'; @@ -11608,310 +11308,6 @@ gain = function () { this.input = undefined; }; }(master, sndcore); -var monosynth; -monosynth = function () { - 'use strict'; - var p5sound = master; - /** - * An MonoSynth is used as a single voice for sound synthesis. - * This is a class to be used in conjonction with the PolySynth - * class. Custom synthetisers should be built inheriting from - * this class. - * - * @class p5.MonoSynth - * @constructor - * - **/ - p5.MonoSynth = function () { - this.context = p5sound.audiocontext; - this.output = this.context.createGain(); - this.attack = 0.02; - this.decay = 0.25; - this.sustain = 0.05; - this.release = 0.35; - // default voice - this.oscillator = new p5.Oscillator(); - this.oscillator.start(); - // envelope - this.env = new p5.Env(); - this.env.setADSR(this.attack, this.decay, this.sustain, this.release); - this.env.setRange(1, 0); - this.env.setExp(true); - // filter - this.filter = new p5.HighPass(); - this.filter.set(5, 1); - // oscillator --> env --> filter --> this.output (gain) --> p5.soundOut - this.env.setInput(this.oscillator); - this.env.connect(this.filter.input); - this.filter.connect(this.output); - // connect to master output by default - this.output.connect(p5sound.input); - p5sound.soundArray.push(this); - }; - /** - * Used internally by play() and triggerAttack() - * to set the note of this.oscillator to a MIDI value. - * - * Synth creators with more complex setups may have overridden - * the oscillator chain with more than one oscillator, - * and should override this method accordingly. - * - * @param {Number} note midi value of a note, where - * middle c is 60 - * @param {Number} [secondsFromNow] (optional) a time (in seconds - * from now) at which - * to set the note - * @private - */ - p5.MonoSynth.prototype._setNote = function (note, secondsFromNow) { - var freqVal = p5.prototype.midiToFreq(note); - var t = secondsFromNow || 0; - this.oscillator.freq(freqVal, 0, t); - }; - /** - * Play tells the MonoSynth to start playing a note - * - * @method playNote - * @param {Number} [note] midi note to play (ranging from 0 to 127 - 60 being a middle C) - * @param {Number} [velocity] velocity of the note to play (ranging from 0 to 1) - * @param {Number} [secondsFromNow] time from now (in seconds) at which to play - * @param {Number} [sustainTime] time to sustain before releasing the envelope - * - */ - p5.MonoSynth.prototype.play = function (note, velocity, secondsFromNow, susTime) { - this._setNote(note, secondsFromNow); - // set range of env (TO DO: allow this to be scheduled in advance) - var vel = velocity || 1; - this.env.setRange(vel, 0); - this.env.play(this.output, secondsFromNow, susTime); - }; - /** - * Trigger the Attack, and Decay portion of the Envelope. - * Similar to holding down a key on a piano, but it will - * hold the sustain level until you let go. - * - * @param {Number} secondsFromNow time from now (in seconds) - * @param {Number} [velocity] velocity of the note to play (ranging from 0 to 1) - * @param {Number} [secondsFromNow] time from now (in seconds) at which to play - * @method triggerAttack - */ - p5.MonoSynth.prototype.triggerAttack = function (note, velocity, secondsFromNow) { - this._setNote(note, secondsFromNow); - this.env.ramp(this.output, secondsFromNow, vel); - }; - /** - * Trigger the Release of the Envelope. This is similar to releasing - * the key on a piano and letting the sound fade according to the - * release level and release time. - * - * @param {Number} secondsFromNow time to trigger the release - * @method triggerRelease - */ - p5.MonoSynth.prototype.triggerRelease = function (secondsFromNow) { - this.env.ramp(this.output, secondsFromNow, 0); - }; - /** - * Set cutoms parameters to a specific synth implementation. - * This method does nothing by default unless you implement - * something for it. - * For instance if you want to build a complex synthesizer - * with one or more filters, effects etc. this is where you - * will want to set their values. - * - * @method setParams - * @param - * - */ - p5.MonoSynth.prototype.setParams = function (params) { - }; - /** - * Set values like a traditional - * - * ADSR envelope - * . - * - * @method setADSR - * @param {Number} attackTime Time (in seconds before envelope - * reaches Attack Level - * @param {Number} [decayTime] Time (in seconds) before envelope - * reaches Decay/Sustain Level - * @param {Number} [susRatio] Ratio between attackLevel and releaseLevel, on a scale from 0 to 1, - * where 1.0 = attackLevel, 0.0 = releaseLevel. - * The susRatio determines the decayLevel and the level at which the - * sustain portion of the envelope will sustain. - * For example, if attackLevel is 0.4, releaseLevel is 0, - * and susAmt is 0.5, the decayLevel would be 0.2. If attackLevel is - * increased to 1.0 (using setRange), - * then decayLevel would increase proportionally, to become 0.5. - * @param {Number} [releaseTime] Time in seconds from now (defaults to 0) - **/ - p5.MonoSynth.prototype.setADSR = function (a, d, s, r) { - this.attack = a; - this.decay = d; - this.sustain = s; - this.release = r; - this.env.setADSR(this.attack, this.decay, this.sustain, this.release); - }; - /** - * Connect to a p5.sound / Web Audio object. - * - * @method connect - * @param {Object} unit A p5.sound or Web Audio object - */ - p5.MonoSynth.prototype.connect = function (unit) { - var u = unit || p5sound.input; - this.output.connect(u.input ? u.input : u); - }; - /** - * Disconnect all outputs - * - * @method disconnect - */ - p5.MonoSynth.prototype.disconnect = function () { - this.output.disconnect(); - }; - /** - * Get rid of the MonoSynth and free up its resources / memory. - * - * @method dispose - */ - p5.MonoSynth.prototype.dispose = function () { - this.filter.dispose(); - this.env.dispose(); - try { - this.oscillator.dispose(); - } catch (e) { - console.error('mono synth default oscillator already disposed'); - } - this.output.disconnect(); - this.output = undefined; - }; -}(master, sndcore); -var polysynth; -polysynth = function () { - 'use strict'; - var p5sound = master; - /** - * An AudioVoice is used as a single voice for sound synthesis. - * The PolySynth class holds an array of AudioVoice, and deals - * with voices allocations, with setting notes to be played, and - * parameters to be set. - * - * @class p5.PolySynth - * @constructor - * - * @param {Number} [synthVoice] A monophonic synth voice inheriting - * the AudioVoice class. - * - **/ - p5.PolySynth = function (synthVoice) { - this.voices = {}; - this.synthVoice = synthVoice; - p5sound.soundArray.push(this); - }; - /** - * Play a note. - * - * @method play - * @param {Number} [note] midi note to play (ranging from 0 to 127 - 60 being a middle C) - * @param {Number} [velocity] velocity of the note to play (ranging from 0 to 1) - * @param {Number} [secondsFromNow] time from now (in seconds) at which to play - * @param {Number} [sustainTime] time to sustain before releasing the envelope - */ - p5.PolySynth.prototype.play = function (note, velocity, secondsFromNow, susTime) { - if (this.voices[note] == null) { - this.voices[note] = new this.synthVoice(); - } - this.voices[note].env.setRange(velocity, 0); - this.voices[note]._setNote(note); - this.voices[note].play(note, velocity, secondsFromNow, susTime); - }; - /** - * Set values like a traditional - * - * ADSR envelope - * . - * - * It works like other implementation of setADSR in p5.sound but it needs a note parameter - * to know which monoSynth should be affected. - * - * @method noteADSR - * @param {Number} [note] Midi note on which ADSR should be set. - * @param {Number} [attackTime] Time (in seconds before envelope - * reaches Attack Level - * @param {Number} [decayTime] Time (in seconds) before envelope - * reaches Decay/Sustain Level - * @param {Number} [susRatio] Ratio between attackLevel and releaseLevel, on a scale from 0 to 1, - * where 1.0 = attackLevel, 0.0 = releaseLevel. - * The susRatio determines the decayLevel and the level at which the - * sustain portion of the envelope will sustain. - * For example, if attackLevel is 0.4, releaseLevel is 0, - * and susAmt is 0.5, the decayLevel would be 0.2. If attackLevel is - * increased to 1.0 (using setRange), - * then decayLevel would increase proportionally, to become 0.5. - * @param {Number} [releaseTime] Time in seconds from now (defaults to 0) - **/ - p5.PolySynth.prototype.noteADSR = function (note, a, d, s, r) { - if (this.voices[note] == null) { - this.voices[note] = new this.synthVoice(); - } - this.voices[note]._setNote(note); - this.voices[note].setADSR(a, d, s, r); - }; - /** - * Trigger the Attack, and Decay portion of a MonoSynth. - * Similar to holding down a key on a piano, but it will - * hold the sustain level until you let go. - * - * @method noteAttack - * @param {Number} [note] midi note on which attack should be triggered. - * @param {Number} [velocity] velocity of the note to play (ranging from 0 to 1)/ - * @param {Number} [secondsFromNow] time from now (in seconds) - * - */ - p5.PolySynth.prototype.noteAttack = function (note, velocity, secondsFromNow) { - if (this.voices[note] == null) { - this.voices[note] = new this.synthVoice(); - } - this.voices[note]._setNote(note); - this.voices[note].env.setRange(velocity, 0); - this.voices[note].triggerAttack(secondsFromNow); - }; - /** - * Trigger the Release of a MonoSynth. This is similar to releasing - * the key on a piano and letting the sound fade according to the - * release level and release time. - * - * @method noteRelease - * @param {Number} [note] midi note on which attack should be triggered. - * @param {Number} [secondsFromNow] time to trigger the release - * - */ - p5.PolySynth.prototype.noteRelease = function (note, secondsFromNow) { - if (this.voices[note] != null) { - this.voices[note]._setNote(note); - this.voices[note].triggerRelease(secondsFromNow); - delete this.voices[note]; - } - }; - /** - * Set cutoms parameters to a specific synth implementation - * with the help of JavaScript Object Notation (JSON). - * - * @method setParams - * @param JSON object - * - * For instance to set the detune parameter of a synth, call : - * setParams({detune: 15 }); - * - */ - p5.PolySynth.prototype.noteParams = function (note, params) { - if (this.voices[note] == null) { - this.voices[note] = new this.synthVoice(); - } - this.voices[note].setParams(params); - }; -}(master, sndcore); var distortion; 'use strict'; distortion = function () { @@ -12041,5 +11437,5 @@ var src_app; src_app = function () { var p5SOUND = sndcore; return p5SOUND; -}(sndcore, master, helpers, errorHandler, panner, soundfile, amplitude, fft, signal, oscillator, env, pulse, noise, audioin, filter, eq, panner3d, listener3d, delay, reverb, metro, looper, soundloop, compressor, soundRecorder, peakdetect, gain, monosynth, polysynth, distortion); +}(sndcore, master, helpers, errorHandler, panner, soundfile, amplitude, fft, signal, oscillator, env, pulse, noise, audioin, filter, eq, panner3d, listener3d, delay, reverb, metro, looper, compressor, soundRecorder, peakdetect, gain, distortion); })); \ No newline at end of file diff --git a/lib/p5.sound.min.js b/lib/p5.sound.min.js index 27658f61..daaa34c0 100644 --- a/lib/p5.sound.min.js +++ b/lib/p5.sound.min.js @@ -1,4 +1,4 @@ -/*! p5.sound.min.js v0.3.5 2017-08-18 */ +/*! p5.sound.min.js v0.3.5 2017-08-14 */ /** * p5.sound @@ -21,8 +21,8 @@ * Web Audio API: http://w3.org/TR/webaudio/ */ -!function(t,e){"function"==typeof define&&define.amd?define("p5.sound",["p5"],function(t){e(t)}):e("object"==typeof exports?require("../p5"):t.p5)}(this,function(t){var e;e=function(){!function(){function t(t){t&&(t.setTargetAtTime||(t.setTargetAtTime=t.setTargetValueAtTime))}window.hasOwnProperty("webkitAudioContext")&&!window.hasOwnProperty("AudioContext")&&(window.AudioContext=window.webkitAudioContext,"function"!=typeof AudioContext.prototype.createGain&&(AudioContext.prototype.createGain=AudioContext.prototype.createGainNode),"function"!=typeof AudioContext.prototype.createDelay&&(AudioContext.prototype.createDelay=AudioContext.prototype.createDelayNode),"function"!=typeof AudioContext.prototype.createScriptProcessor&&(AudioContext.prototype.createScriptProcessor=AudioContext.prototype.createJavaScriptNode),"function"!=typeof AudioContext.prototype.createPeriodicWave&&(AudioContext.prototype.createPeriodicWave=AudioContext.prototype.createWaveTable),AudioContext.prototype.internal_createGain=AudioContext.prototype.createGain,AudioContext.prototype.createGain=function(){var e=this.internal_createGain();return t(e.gain),e},AudioContext.prototype.internal_createDelay=AudioContext.prototype.createDelay,AudioContext.prototype.createDelay=function(e){var i=e?this.internal_createDelay(e):this.internal_createDelay();return t(i.delayTime),i},AudioContext.prototype.internal_createBufferSource=AudioContext.prototype.createBufferSource,AudioContext.prototype.createBufferSource=function(){var e=this.internal_createBufferSource();return e.start?(e.internal_start=e.start,e.start=function(t,i,n){"undefined"!=typeof n?e.internal_start(t||0,i,n):e.internal_start(t||0,i||0)}):e.start=function(t,e,i){e||i?this.noteGrainOn(t||0,e,i):this.noteOn(t||0)},e.stop?(e.internal_stop=e.stop,e.stop=function(t){e.internal_stop(t||0)}):e.stop=function(t){this.noteOff(t||0)},t(e.playbackRate),e},AudioContext.prototype.internal_createDynamicsCompressor=AudioContext.prototype.createDynamicsCompressor,AudioContext.prototype.createDynamicsCompressor=function(){var e=this.internal_createDynamicsCompressor();return t(e.threshold),t(e.knee),t(e.ratio),t(e.reduction),t(e.attack),t(e.release),e},AudioContext.prototype.internal_createBiquadFilter=AudioContext.prototype.createBiquadFilter,AudioContext.prototype.createBiquadFilter=function(){var e=this.internal_createBiquadFilter();return t(e.frequency),t(e.detune),t(e.Q),t(e.gain),e},"function"!=typeof AudioContext.prototype.createOscillator&&(AudioContext.prototype.internal_createOscillator=AudioContext.prototype.createOscillator,AudioContext.prototype.createOscillator=function(){var e=this.internal_createOscillator();return e.start?(e.internal_start=e.start,e.start=function(t){e.internal_start(t||0)}):e.start=function(t){this.noteOn(t||0)},e.stop?(e.internal_stop=e.stop,e.stop=function(t){e.internal_stop(t||0)}):e.stop=function(t){this.noteOff(t||0)},e.setPeriodicWave||(e.setPeriodicWave=e.setWaveTable),t(e.frequency),t(e.detune),e})),window.hasOwnProperty("webkitOfflineAudioContext")&&!window.hasOwnProperty("OfflineAudioContext")&&(window.OfflineAudioContext=window.webkitOfflineAudioContext)}(window);var e=new window.AudioContext;t.prototype.getAudioContext=function(){return e},navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;var i=document.createElement("audio");t.prototype.isSupported=function(){return!!i.canPlayType};var n=function(){return!!i.canPlayType&&i.canPlayType('audio/ogg; codecs="vorbis"')},o=function(){return!!i.canPlayType&&i.canPlayType("audio/mpeg;")},r=function(){return!!i.canPlayType&&i.canPlayType('audio/wav; codecs="1"')},s=function(){return!!i.canPlayType&&(i.canPlayType("audio/x-m4a;")||i.canPlayType("audio/aac;"))},a=function(){return!!i.canPlayType&&i.canPlayType("audio/x-aiff;")};t.prototype.isFileSupported=function(t){switch(t.toLowerCase()){case"mp3":return o();case"wav":return r();case"ogg":return n();case"aac":case"m4a":case"mp4":return s();case"aif":case"aiff":return a();default:return!1}};var u=navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1;if(u){var c=!1,p=function(){if(!c){var t=e.createBuffer(1,1,22050),i=e.createBufferSource();i.buffer=t,i.connect(e.destination),i.start(0),console.log("start ios!"),"running"===e.state&&(c=!0)}};document.addEventListener("touchend",p,!1),document.addEventListener("touchstart",p,!1)}}();var i;i=function(){var e=function(){var e=t.prototype.getAudioContext();this.input=e.createGain(),this.output=e.createGain(),this.limiter=e.createDynamicsCompressor(),this.limiter.threshold.value=0,this.limiter.ratio.value=20,this.audiocontext=e,this.output.disconnect(),this.inputSources=[],this.input.connect(this.limiter),this.limiter.connect(this.output),this.meter=e.createGain(),this.fftMeter=e.createGain(),this.output.connect(this.meter),this.output.connect(this.fftMeter),this.output.connect(this.audiocontext.destination),this.soundArray=[],this.parts=[],this.extensions=[]},i=new e;return t.prototype.getMasterVolume=function(){return i.output.gain.value},t.prototype.masterVolume=function(t,e,n){if("number"==typeof t){var e=e||0,n=n||0,o=i.audiocontext.currentTime,r=i.output.gain.value;i.output.gain.cancelScheduledValues(o+n),i.output.gain.linearRampToValueAtTime(r,o+n),i.output.gain.linearRampToValueAtTime(t,o+n+e)}else{if(!t)return i.output.gain;t.connect(i.output.gain)}},t.prototype.soundOut=t.soundOut=i,t.soundOut._silentNode=i.audiocontext.createGain(),t.soundOut._silentNode.gain.value=0,t.soundOut._silentNode.connect(i.audiocontext.destination),i}();var n;n=function(){var e=i;return t.prototype.sampleRate=function(){return e.audiocontext.sampleRate},t.prototype.freqToMidi=function(t){var e=Math.log(t/440)/Math.log(2),i=Math.round(12*e)+69;return i},t.prototype.midiToFreq=function(t){return 440*Math.pow(2,(t-69)/12)},t.prototype.soundFormats=function(){e.extensions=[];for(var t=0;t-1))throw arguments[t]+" is not a valid sound format!";e.extensions.push(arguments[t])}},t.prototype.disposeSound=function(){for(var t=0;t-1)if(t.prototype.isFileSupported(o))n=n;else for(var r=n.split("."),s=r[r.length-1],a=0;a1?(this.splitter=n.createChannelSplitter(2),this.input.connect(this.splitter),this.splitter.connect(this.left,1),this.splitter.connect(this.right,0)):(this.input.connect(this.left),this.input.connect(this.right)),this.output=n.createChannelMerger(2),this.left.connect(this.output,0,1),this.right.connect(this.output,0,0),this.output.connect(e)},t.Panner.prototype.pan=function(t,e){var i=e||0,o=n.currentTime+i,r=(t+1)/2,s=Math.cos(r*Math.PI/2),a=Math.sin(r*Math.PI/2);this.left.gain.linearRampToValueAtTime(a,o),this.right.gain.linearRampToValueAtTime(s,o)},t.Panner.prototype.inputChannels=function(t){1===t?(this.input.disconnect(),this.input.connect(this.left),this.input.connect(this.right)):2===t&&(this.splitter=n.createChannelSplitter(2),this.input.disconnect(),this.input.connect(this.splitter),this.splitter.connect(this.left,1),this.splitter.connect(this.right,0))},t.Panner.prototype.connect=function(t){this.output.connect(t)},t.Panner.prototype.disconnect=function(){this.output.disconnect()})}(i);var s;s=function(){function e(t,e){for(var i={},n=t.length,o=0;n>o;o++){if(t[o]>e){var r=t[o],s=new d(r,o);i[o]=s,o+=6e3}o++}return i}function r(t){for(var e=[],i=Object.keys(t).sort(),n=0;no;o++){var r=t[i[n]],s=t[i[n+o]];if(r&&s){var a=r.sampleIndex,u=s.sampleIndex,c=u-a;c>0&&r.intervals.push(c);var p=e.some(function(t){return t.interval===c?(t.count++,t):void 0});p||e.push({interval:c,count:1})}}return e}function s(t,e){var i=[];return t.forEach(function(t){try{var n=Math.abs(60/(t.interval/e));n=u(n);var o=i.some(function(e){return e.tempo===n?e.count+=t.count:void 0});if(!o){if(isNaN(n))return;i.push({tempo:Math.round(n),count:t.count})}}catch(r){throw r}}),i}function a(t,e,i,n){for(var o=[],r=Object.keys(t).sort(),s=0;s.01?!0:void 0})}function u(t){if(isFinite(t)&&0!==t){for(;90>t;)t*=2;for(;t>180&&t>90;)t/=2;return t}}var c=o,p=i,h=p.audiocontext,l=n.midiToFreq;t.SoundFile=function(e,i,n,o){if("undefined"!=typeof e){if("string"==typeof e||"string"==typeof e[0]){var r=t.prototype._checkFileFormats(e);this.url=r}else if("object"==typeof e&&!(window.File&&window.FileReader&&window.FileList&&window.Blob))throw"Unable to load file because the File API is not supported";e.file&&(e=e.file),this.file=e}this._onended=function(){},this._looping=!1,this._playing=!1,this._paused=!1,this._pauseTime=0,this._cues=[],this._lastPos=0,this._counterNode=null,this._scopeNode=null,this.bufferSourceNodes=[],this.bufferSourceNode=null,this.buffer=null,this.playbackRate=1,this.input=p.audiocontext.createGain(),this.output=p.audiocontext.createGain(),this.reversed=!1,this.startTime=0,this.endTime=null,this.pauseTime=0,this.mode="sustain",this.startMillis=null,this.panPosition=0,this.panner=new t.Panner(this.output,p.input,2),(this.url||this.file)&&this.load(i,n),p.soundArray.push(this),"function"==typeof o?this._whileLoading=o:this._whileLoading=function(){}},t.prototype.registerPreloadMethod("loadSound",t.prototype),t.prototype.loadSound=function(e,i,n,o){window.location.origin.indexOf("file://")>-1&&"undefined"===window.cordova&&window.alert("This sketch may require a server to load external files. Please see http://bit.ly/1qcInwS");var r=this,s=new t.SoundFile(e,function(){"function"==typeof i&&i.apply(r,arguments),r._decrementPreload()},n,o);return s},t.SoundFile.prototype.load=function(t,e){var i=this,n=(new Error).stack;if(void 0!==this.url&&""!==this.url){var o=new XMLHttpRequest;o.addEventListener("progress",function(t){i._updateProgress(t)},!1),o.open("GET",this.url,!0),o.responseType="arraybuffer",o.onload=function(){if(200===o.status)h.decodeAudioData(o.response,function(e){i.buffer=e,i.panner.inputChannels(e.numberOfChannels),t&&t(i)},function(){var t=new c("decodeAudioData",n,i.url),o="AudioContext error at decodeAudioData for "+i.url;e?(t.msg=o,e(t)):console.error(o+"\n The error stack trace includes: \n"+t.stack)});else{var r=new c("loadSound",n,i.url),s="Unable to load "+i.url+". The request status was: "+o.status+" ("+o.statusText+")";e?(r.message=s,e(r)):console.error(s+"\n The error stack trace includes: \n"+r.stack)}},o.onerror=function(){var t=new c("loadSound",n,i.url),o="There was no response from the server at "+i.url+". Check the url and internet connectivity.";e?(t.message=o,e(t)):console.error(o+"\n The error stack trace includes: \n"+t.stack)},o.send()}else if(void 0!==this.file){var r=new FileReader;r.onload=function(){h.decodeAudioData(r.result,function(e){i.buffer=e,i.panner.inputChannels(e.numberOfChannels),t&&t(i)})},r.onerror=function(t){onerror&&onerror(t)},r.readAsArrayBuffer(this.file)}},t.SoundFile.prototype._updateProgress=function(t){if(t.lengthComputable){var e=t.loaded/t.total*.99;this._whileLoading(e,t)}else this._whileLoading("size unknown")},t.SoundFile.prototype.isLoaded=function(){return this.buffer?!0:!1},t.SoundFile.prototype.play=function(t,e,i,n,o){var r,s,a=this,u=p.audiocontext.currentTime,c=t||0;if(0>c&&(c=0),c+=u,this.rate(e),this.setVolume(i),!this.buffer)throw"not ready to play file, buffer has yet to load. Try preload()";if(this._pauseTime=0,"restart"===this.mode&&this.buffer&&this.bufferSourceNode&&(this.bufferSourceNode.stop(c),this._counterNode.stop(c)),this.bufferSourceNode=this._initSourceNode(),this._counterNode&&(this._counterNode=void 0),this._counterNode=this._initCounterNode(),n){if(!(n>=0&&nt&&!this.reversed){var e=this.currentTime(),i=(e-this.duration())/t;this.pauseTime=i,this.reverseBuffer(),t=Math.abs(t)}else t>0&&this.reversed&&this.reverseBuffer();if(this.bufferSourceNode){var n=p.audiocontext.currentTime;this.bufferSourceNode.playbackRate.cancelScheduledValues(n),this.bufferSourceNode.playbackRate.linearRampToValueAtTime(Math.abs(t),n),this._counterNode.playbackRate.cancelScheduledValues(n),this._counterNode.playbackRate.linearRampToValueAtTime(Math.abs(t),n)}return this.playbackRate=t,this.playbackRate},t.SoundFile.prototype.setPitch=function(t){var e=l(t)/l(60);this.rate(e)},t.SoundFile.prototype.getPlaybackRate=function(){return this.playbackRate},t.SoundFile.prototype.duration=function(){return this.buffer?this.buffer.duration:0},t.SoundFile.prototype.currentTime=function(){return this._pauseTime>0?this._pauseTime:this._lastPos/h.sampleRate},t.SoundFile.prototype.jump=function(t,e){if(0>t||t>this.buffer.duration)throw"jump time out of range";if(e>this.buffer.duration-t)throw"end time out of range";var i=t||0,n=e||this.buffer.duration-t;this.isPlaying()&&this.stop(),this.play(0,this.playbackRate,this.output.gain.value,i,n)},t.SoundFile.prototype.channels=function(){return this.buffer.numberOfChannels},t.SoundFile.prototype.sampleRate=function(){return this.buffer.sampleRate},t.SoundFile.prototype.frames=function(){return this.buffer.length},t.SoundFile.prototype.getPeaks=function(t){if(!this.buffer)throw"Cannot load peaks yet, buffer is not loaded";if(t||(t=5*window.width),this.buffer){for(var e=this.buffer,i=e.length/t,n=~~(i/10)||1,o=e.numberOfChannels,r=new Float32Array(Math.round(t)),s=0;o>s;s++)for(var a=e.getChannelData(s),u=0;t>u;u++){for(var c=~~(u*i),p=~~(c+i),h=0,l=c;p>l;l+=n){var f=a[l];f>h?h=f:-f>h&&(h=f)}(0===s||Math.abs(h)>r[u])&&(r[u]=h)}return r}},t.SoundFile.prototype.reverseBuffer=function(){var t=this.getVolume();if(this.setVolume(0,.01,0),!this.buffer)throw"SoundFile is not done loading";for(var e=0;eo;o++){var r=n.getChannelData(o);r.set(t[o])}this.buffer=n,this.panner.inputChannels(e)};var f=function(t){for(var e=new Float32Array(t.length),i=h.createBuffer(1,t.length,44100),n=0;n=d);var u=r(h),c=s(u,n.sampleRate),p=c.sort(function(t,e){return e.count-t.count}).splice(0,5);this.tempo=p[0].tempo;var l=5,y=a(h,p[0].tempo,n.sampleRate,l);t(y)}};var d=function(t,e){this.sampleIndex=e,this.amplitude=t,this.tempos=[],this.intervals=[]},m=function(t,e,i,n){this.callback=t,this.time=e,this.id=i,this.val=n};t.SoundFile.prototype.addCue=function(t,e,i){var n=this._cueIDCounter++,o=new m(e,t,n,i);return this._cues.push(o),n},t.SoundFile.prototype.removeCue=function(t){for(var e=this._cues.length,i=0;e>i;i++){var n=this._cues[i];n.id===t&&this.cues.splice(i,1)}0===this._cues.length},t.SoundFile.prototype.clearCues=function(){this._cues=[]},t.SoundFile.prototype._onTimeUpdate=function(t){for(var e=t/this.buffer.sampleRate,i=this._cues.length,n=0;i>n;n++){var o=this._cues[n],r=o.time,s=o.val;this._prevTime=r&&o.callback(s)}this._prevTime=e}}(e,o,i,n);var a;a=function(){var e=i;t.Amplitude=function(t){this.bufferSize=2048,this.audiocontext=e.audiocontext,this.processor=this.audiocontext.createScriptProcessor(this.bufferSize,2,1),this.input=this.processor,this.output=this.audiocontext.createGain(),this.smoothing=t||0,this.volume=0,this.average=0,this.stereoVol=[0,0],this.stereoAvg=[0,0],this.stereoVolNorm=[0,0],this.volMax=.001,this.normalize=!1,this.processor.onaudioprocess=this._audioProcess.bind(this),this.processor.connect(this.output),this.output.gain.value=0,this.output.connect(this.audiocontext.destination),e.meter.connect(this.processor),e.soundArray.push(this)},t.Amplitude.prototype.setInput=function(i,n){e.meter.disconnect(),n&&(this.smoothing=n),null==i?(console.log("Amplitude input source is not ready! Connecting to master output instead"),e.meter.connect(this.processor)):i instanceof t.Signal?i.output.connect(this.processor):i?(i.connect(this.processor),this.processor.disconnect(),this.processor.connect(this.output)):e.meter.connect(this.processor)},t.Amplitude.prototype.connect=function(t){t?t.hasOwnProperty("input")?this.output.connect(t.input):this.output.connect(t):this.output.connect(this.panner.connect(e.input))},t.Amplitude.prototype.disconnect=function(){this.output.disconnect()},t.Amplitude.prototype._audioProcess=function(t){for(var e=0;ea;a++)i=n[a],this.normalize?(r+=Math.max(Math.min(i/this.volMax,1),-1),s+=Math.max(Math.min(i/this.volMax,1),-1)*Math.max(Math.min(i/this.volMax,1),-1)):(r+=i,s+=i*i);var u=r/o,c=Math.sqrt(s/o);this.stereoVol[e]=Math.max(c,this.stereoVol[e]*this.smoothing),this.stereoAvg[e]=Math.max(u,this.stereoVol[e]*this.smoothing),this.volMax=Math.max(this.stereoVol[e],this.volMax)}var p=this,h=this.stereoVol.reduce(function(t,e,i){return p.stereoVolNorm[i-1]=Math.max(Math.min(p.stereoVol[i-1]/p.volMax,1),0),p.stereoVolNorm[i]=Math.max(Math.min(p.stereoVol[i]/p.volMax,1),0),t+e});this.volume=h/this.stereoVol.length,this.volNorm=Math.max(Math.min(this.volume/this.volMax,1),0)},t.Amplitude.prototype.getLevel=function(t){return"undefined"!=typeof t?this.normalize?this.stereoVolNorm[t]:this.stereoVol[t]:this.normalize?this.volNorm:this.volume},t.Amplitude.prototype.toggleNormalize=function(t){"boolean"==typeof t?this.normalize=t:this.normalize=!this.normalize},t.Amplitude.prototype.smooth=function(t){t>=0&&1>t?this.smoothing=t:console.log("Error: smoothing must be between 0 and 1")},t.Amplitude.prototype.dispose=function(){var t=e.soundArray.indexOf(this);e.soundArray.splice(t,1),this.input.disconnect(),this.output.disconnect(),this.input=this.processor=void 0,this.output=void 0}}(i);var u;u=function(){var e=i;t.FFT=function(t,i){this.input=this.analyser=e.audiocontext.createAnalyser(),Object.defineProperties(this,{bins:{get:function(){return this.analyser.fftSize/2},set:function(t){this.analyser.fftSize=2*t},configurable:!0,enumerable:!0},smoothing:{get:function(){return this.analyser.smoothingTimeConstant},set:function(t){this.analyser.smoothingTimeConstant=t},configurable:!0,enumerable:!0}}),this.smooth(t),this.bins=i||1024,e.fftMeter.connect(this.analyser),this.freqDomain=new Uint8Array(this.analyser.frequencyBinCount),this.timeDomain=new Uint8Array(this.analyser.frequencyBinCount),this.bass=[20,140],this.lowMid=[140,400],this.mid=[400,2600],this.highMid=[2600,5200],this.treble=[5200,14e3],e.soundArray.push(this)},t.FFT.prototype.setInput=function(t){t?(t.output?t.output.connect(this.analyser):t.connect&&t.connect(this.analyser),e.fftMeter.disconnect()):e.fftMeter.connect(this.analyser)},t.FFT.prototype.waveform=function(){for(var e,i,n,o=0;oi){var o=i;i=t,t=o}for(var r=Math.round(t/n*this.freqDomain.length),s=Math.round(i/n*this.freqDomain.length),a=0,u=0,c=r;s>=c;c++)a+=this.freqDomain[c],u+=1;var p=a/u;return p}throw"invalid input for getEnergy()"}var h=Math.round(t/n*this.freqDomain.length);return this.freqDomain[h]},t.FFT.prototype.getFreq=function(t,e){console.log("getFreq() is deprecated. Please use getEnergy() instead.");var i=this.getEnergy(t,e);return i},t.FFT.prototype.getCentroid=function(){for(var t=e.audiocontext.sampleRate/2,i=0,n=0,o=0;os;s++)o[r]=void 0!==o[r]?(o[r]+e[s])/2:e[s],s%n===n-1&&r++;return o},t.FFT.prototype.logAverages=function(t){for(var i=e.audiocontext.sampleRate/2,n=this.freqDomain,o=n.length,r=new Array(t.length),s=0,a=0;o>a;a++){var u=Math.round(a*i/this.freqDomain.length);u>t[s].hi&&s++,r[s]=void 0!==r[s]?(r[s]+n[a])/2:n[a]}return r},t.FFT.prototype.getOctaveBands=function(t,i){var t=t||3,i=i||15.625,n=[],o={lo:i/Math.pow(2,1/(2*t)),ctr:i,hi:i*Math.pow(2,1/(2*t))};n.push(o);for(var r=e.audiocontext.sampleRate/2;o.hi1&&(this.input=new Array(t)),this.isUndef(e)||1===e?this.output=this.context.createGain():e>1&&(this.output=new Array(t))};t.prototype.set=function(e,i,n){if(this.isObject(e))n=i;else if(this.isString(e)){var o={};o[e]=i,e=o}t:for(var r in e){i=e[r];var s=this;if(-1!==r.indexOf(".")){for(var a=r.split("."),u=0;u1)for(var t=arguments[0],e=1;e0)for(var t=this,e=0;e0)for(var t=0;te;e++){var n=e/(i-1)*2-1;this._curve[e]=t(n,e)}return this._shaper.curve=this._curve,this},Object.defineProperty(t.WaveShaper.prototype,"curve",{get:function(){return this._shaper.curve},set:function(t){this._curve=new Float32Array(t),this._shaper.curve=this._curve}}),Object.defineProperty(t.WaveShaper.prototype,"oversample",{get:function(){return this._shaper.oversample},set:function(t){if(-1===["none","2x","4x"].indexOf(t))throw new RangeError("Tone.WaveShaper: oversampling must be either 'none', '2x', or '4x'");this._shaper.oversample=t}}),t.WaveShaper.prototype.dispose=function(){return t.prototype.dispose.call(this),this._shaper.disconnect(),this._shaper=null,this._curve=null,this},t.WaveShaper}(c);var l;l=function(t){return t.TimeBase=function(e,i){if(!(this instanceof t.TimeBase))return new t.TimeBase(e,i);if(this._expr=this._noOp,e instanceof t.TimeBase)this.copy(e);else if(!this.isUndef(i)||this.isNumber(e)){i=this.defaultArg(i,this._defaultUnits);var n=this._primaryExpressions[i].method;this._expr=n.bind(this,e)}else this.isString(e)?this.set(e):this.isUndef(e)&&(this._expr=this._defaultExpr())},t.extend(t.TimeBase),t.TimeBase.prototype.set=function(t){return this._expr=this._parseExprString(t),this},t.TimeBase.prototype.clone=function(){var t=new this.constructor;return t.copy(this),t},t.TimeBase.prototype.copy=function(t){var e=t._expr();return this.set(e)},t.TimeBase.prototype._primaryExpressions={n:{regexp:/^(\d+)n/i,method:function(t){return t=parseInt(t),1===t?this._beatsToUnits(this._timeSignature()):this._beatsToUnits(4/t)}},t:{regexp:/^(\d+)t/i,method:function(t){return t=parseInt(t),this._beatsToUnits(8/(3*parseInt(t)))}},m:{regexp:/^(\d+)m/i,method:function(t){return this._beatsToUnits(parseInt(t)*this._timeSignature())}},i:{regexp:/^(\d+)i/i,method:function(t){return this._ticksToUnits(parseInt(t))}},hz:{regexp:/^(\d+(?:\.\d+)?)hz/i,method:function(t){return this._frequencyToUnits(parseFloat(t))}},tr:{regexp:/^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?):?(\d+(?:\.\d+)?)?/,method:function(t,e,i){var n=0;return t&&"0"!==t&&(n+=this._beatsToUnits(this._timeSignature()*parseFloat(t))),e&&"0"!==e&&(n+=this._beatsToUnits(parseFloat(e))),i&&"0"!==i&&(n+=this._beatsToUnits(parseFloat(i)/4)),n}},s:{regexp:/^(\d+(?:\.\d+)?s)/,method:function(t){return this._secondsToUnits(parseFloat(t))}},samples:{regexp:/^(\d+)samples/,method:function(t){return parseInt(t)/this.context.sampleRate}},"default":{regexp:/^(\d+(?:\.\d+)?)/,method:function(t){return this._primaryExpressions[this._defaultUnits].method.call(this,t)}}},t.TimeBase.prototype._binaryExpressions={"+":{regexp:/^\+/,precedence:2,method:function(t,e){return t()+e()}},"-":{regexp:/^\-/,precedence:2,method:function(t,e){return t()-e()}},"*":{regexp:/^\*/,precedence:1,method:function(t,e){return t()*e()}},"/":{regexp:/^\//,precedence:1,method:function(t,e){return t()/e()}}},t.TimeBase.prototype._unaryExpressions={neg:{regexp:/^\-/,method:function(t){return-t()}}},t.TimeBase.prototype._syntaxGlue={"(":{regexp:/^\(/},")":{regexp:/^\)/}},t.TimeBase.prototype._tokenize=function(t){function e(t,e){for(var i=["_binaryExpressions","_unaryExpressions","_primaryExpressions","_syntaxGlue"],n=0;n0;){t=t.trim();var o=e(t,this);n.push(o),t=t.substr(o.value.length)}return{next:function(){return n[++i]},peek:function(){return n[i+1]}}},t.TimeBase.prototype._matchGroup=function(t,e,i){var n=!1;if(!this.isUndef(t))for(var o in e){var r=e[o];if(r.regexp.test(t.value)){if(this.isUndef(i))return r;if(r.precedence===i)return r}}return n},t.TimeBase.prototype._parseBinary=function(t,e){this.isUndef(e)&&(e=2);var i;i=0>e?this._parseUnary(t):this._parseBinary(t,e-1);for(var n=t.peek();n&&this._matchGroup(n,this._binaryExpressions,e);)n=t.next(),i=n.method.bind(this,i,this._parseBinary(t,e-1)),n=t.peek();return i},t.TimeBase.prototype._parseUnary=function(t){var e,i;e=t.peek();var n=this._matchGroup(e,this._unaryExpressions);return n?(e=t.next(),i=this._parseUnary(t),n.method.bind(this,i)):this._parsePrimary(t)},t.TimeBase.prototype._parsePrimary=function(t){var e,i;if(e=t.peek(),this.isUndef(e))throw new SyntaxError("Tone.TimeBase: Unexpected end of expression");if(this._matchGroup(e,this._primaryExpressions)){e=t.next();var n=e.value.match(e.regexp);return e.method.bind(this,n[1],n[2],n[3])}if(e&&"("===e.value){if(t.next(),i=this._parseBinary(t),e=t.next(),!e||")"!==e.value)throw new SyntaxError("Expected )");return i}throw new SyntaxError("Tone.TimeBase: Cannot process token "+e.value)},t.TimeBase.prototype._parseExprString=function(t){this.isString(t)||(t=t.toString());var e=this._tokenize(t),i=this._parseBinary(e);return i},t.TimeBase.prototype._noOp=function(){return 0},t.TimeBase.prototype._defaultExpr=function(){return this._noOp},t.TimeBase.prototype._defaultUnits="s",t.TimeBase.prototype._frequencyToUnits=function(t){return 1/t},t.TimeBase.prototype._beatsToUnits=function(e){return 60/t.Transport.bpm.value*e},t.TimeBase.prototype._secondsToUnits=function(t){return t},t.TimeBase.prototype._ticksToUnits=function(e){return e*(this._beatsToUnits(1)/t.Transport.PPQ)},t.TimeBase.prototype._timeSignature=function(){return t.Transport.timeSignature},t.TimeBase.prototype._pushExpr=function(e,i,n){return e instanceof t.TimeBase||(e=new this.constructor(e,n)),this._expr=this._binaryExpressions[i].method.bind(this,this._expr,e._expr),this},t.TimeBase.prototype.add=function(t,e){return this._pushExpr(t,"+",e)},t.TimeBase.prototype.sub=function(t,e){return this._pushExpr(t,"-",e)},t.TimeBase.prototype.mult=function(t,e){return this._pushExpr(t,"*",e)},t.TimeBase.prototype.div=function(t,e){return this._pushExpr(t,"/",e)},t.TimeBase.prototype.valueOf=function(){return this._expr()},t.TimeBase.prototype.dispose=function(){this._expr=null},t.TimeBase}(c);var f;f=function(t){return t.Time=function(e,i){return this instanceof t.Time?(this._plusNow=!1,void t.TimeBase.call(this,e,i)):new t.Time(e,i)},t.extend(t.Time,t.TimeBase),t.Time.prototype._unaryExpressions=Object.create(t.TimeBase.prototype._unaryExpressions),t.Time.prototype._unaryExpressions.quantize={regexp:/^@/,method:function(e){return t.Transport.nextSubdivision(e())}},t.Time.prototype._unaryExpressions.now={regexp:/^\+/,method:function(t){return this._plusNow=!0,t()}},t.Time.prototype.quantize=function(t,e){return e=this.defaultArg(e,1),this._expr=function(t,e,i){t=t(),e=e.toSeconds();var n=Math.round(t/e),o=n*e,r=o-t;return t+r*i}.bind(this,this._expr,new this.constructor(t),e),this},t.Time.prototype.addNow=function(){return this._plusNow=!0,this},t.Time.prototype._defaultExpr=function(){return this._plusNow=!0,this._noOp},t.Time.prototype.copy=function(e){return t.TimeBase.prototype.copy.call(this,e),this._plusNow=e._plusNow,this},t.Time.prototype.toNotation=function(){var t=this.toSeconds(),e=["1m","2n","4n","8n","16n","32n","64n","128n"],i=this._toNotationHelper(t,e),n=["1m","2n","2t","4n","4t","8n","8t","16n","16t","32n","32t","64n","64t","128n"],o=this._toNotationHelper(t,n);return o.split("+").length1-s%1&&(s+=a),s=Math.floor(s),s>0){if(n+=1===s?e[o]:s.toString()+"*"+e[o],t-=s*r,i>t)break;n+=" + "}}return""===n&&(n="0"),n},t.Time.prototype._notationToUnits=function(t){for(var e=this._primaryExpressions,i=[e.n,e.t,e.m],n=0;n3&&(n=parseFloat(n).toFixed(3));var o=[i,e,n];return o.join(":")},t.Time.prototype.toTicks=function(){var e=this._beatsToUnits(1),i=this.valueOf()/e;return Math.floor(i*t.Transport.PPQ)},t.Time.prototype.toSamples=function(){return this.toSeconds()*this.context.sampleRate},t.Time.prototype.toFrequency=function(){return 1/this.toSeconds()},t.Time.prototype.toSeconds=function(){return this.valueOf()},t.Time.prototype.toMilliseconds=function(){return 1e3*this.toSeconds()},t.Time.prototype.valueOf=function(){var t=this._expr();return t+(this._plusNow?this.now():0)},t.Time}(c);var d;d=function(t){t.Frequency=function(e,i){return this instanceof t.Frequency?void t.TimeBase.call(this,e,i):new t.Frequency(e,i)},t.extend(t.Frequency,t.TimeBase),t.Frequency.prototype._primaryExpressions=Object.create(t.TimeBase.prototype._primaryExpressions),t.Frequency.prototype._primaryExpressions.midi={regexp:/^(\d+(?:\.\d+)?midi)/,method:function(t){return this.midiToFrequency(t)}},t.Frequency.prototype._primaryExpressions.note={regexp:/^([a-g]{1}(?:b|#|x|bb)?)(-?[0-9]+)/i,method:function(t,i){var n=e[t.toLowerCase()],o=n+12*(parseInt(i)+1);return this.midiToFrequency(o)}},t.Frequency.prototype._primaryExpressions.tr={regexp:/^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?):?(\d+(?:\.\d+)?)?/,method:function(t,e,i){var n=1;return t&&"0"!==t&&(n*=this._beatsToUnits(this._timeSignature()*parseFloat(t))),e&&"0"!==e&&(n*=this._beatsToUnits(parseFloat(e))),i&&"0"!==i&&(n*=this._beatsToUnits(parseFloat(i)/4)),n}},t.Frequency.prototype.transpose=function(t){return this._expr=function(t,e){var i=t();return i*this.intervalToFrequencyRatio(e)}.bind(this,this._expr,t),this},t.Frequency.prototype.harmonize=function(t){return this._expr=function(t,e){for(var i=t(),n=[],o=0;or&&(o+=-12*r);var s=i[o%12];return s+r.toString()},t.Frequency.prototype.toSeconds=function(){return 1/this.valueOf()},t.Frequency.prototype.toFrequency=function(){return this.valueOf()},t.Frequency.prototype.toTicks=function(){var e=this._beatsToUnits(1),i=this.valueOf()/e;return Math.floor(i*t.Transport.PPQ)},t.Frequency.prototype._frequencyToUnits=function(t){return t},t.Frequency.prototype._ticksToUnits=function(e){return 1/(60*e/(t.Transport.bpm.value*t.Transport.PPQ))},t.Frequency.prototype._beatsToUnits=function(e){return 1/t.TimeBase.prototype._beatsToUnits.call(this,e)},t.Frequency.prototype._secondsToUnits=function(t){return 1/t},t.Frequency.prototype._defaultUnits="hz";var e={cbb:-2,cb:-1,c:0,"c#":1,cx:2,dbb:0,db:1,d:2,"d#":3,dx:4,ebb:2,eb:3,e:4,"e#":5,ex:6,fbb:3,fb:4,f:5,"f#":6,fx:7,gbb:5,gb:6,g:7,"g#":8,gx:9,abb:7,ab:8,a:9,"a#":10,ax:11,bbb:9,bb:10,b:11,"b#":12,bx:13},i=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"];return t.Frequency.A4=440,t.Frequency.prototype.midiToFrequency=function(e){return t.Frequency.A4*Math.pow(2,(e-69)/12)},t.Frequency.prototype.frequencyToMidi=function(e){return 69+12*Math.log(e/t.Frequency.A4)/Math.LN2},t.Frequency}(c);var m;m=function(t){return t.TransportTime=function(e,i){return this instanceof t.TransportTime?void t.Time.call(this,e,i):new t.TransportTime(e,i)},t.extend(t.TransportTime,t.Time),t.TransportTime.prototype._unaryExpressions=Object.create(t.Time.prototype._unaryExpressions),t.TransportTime.prototype._unaryExpressions.quantize={regexp:/^@/,method:function(e){var i=this._secondsToTicks(e()),n=Math.ceil(t.Transport.ticks/i);return this._ticksToUnits(n*i)}},t.TransportTime.prototype._secondsToTicks=function(e){var i=this._beatsToUnits(1),n=e/i;return Math.round(n*t.Transport.PPQ)},t.TransportTime.prototype.valueOf=function(){var e=this._secondsToTicks(this._expr());return e+(this._plusNow?t.Transport.ticks:0)},t.TransportTime.prototype.toTicks=function(){return this.valueOf()},t.TransportTime.prototype.toSeconds=function(){var e=this._expr();return e+(this._plusNow?t.Transport.seconds:0)},t.TransportTime.prototype.toFrequency=function(){return 1/this.toSeconds()},t.TransportTime}(c);var y;y=function(t){"use strict";return t.Emitter=function(){this._events={}},t.extend(t.Emitter),t.Emitter.prototype.on=function(t,e){for(var i=t.split(/\W+/),n=0;nn;n++)i[n].apply(this,e)}return this},t.Emitter.mixin=function(e){var i=["on","off","emit"];e._events={};for(var n=0;n1&&(this.input=new Array(e)),1===i?this.output=new t.Gain:i>1&&(this.output=new Array(e))},t.Gain}(c,_);var b;b=function(t){"use strict";return t.Signal=function(){var e=this.optionsObject(arguments,["value","units"],t.Signal.defaults);this.output=this._gain=this.context.createGain(),e.param=this._gain.gain,t.Param.call(this,e),this.input=this._param=this._gain.gain,this.context.getConstant(1).chain(this._gain)},t.extend(t.Signal,t.Param),t.Signal.defaults={value:0,units:t.Type.Default,convert:!0},t.Signal.prototype.connect=t.SignalBase.prototype.connect,t.Signal.prototype.dispose=function(){return t.Param.prototype.dispose.call(this),this._param=null,this._gain.disconnect(),this._gain=null,this},t.Signal}(c,h,g,_);var S;S=function(t){"use strict";return t.Add=function(e){this.createInsOuts(2,0),this._sum=this.input[0]=this.input[1]=this.output=new t.Gain,this._param=this.input[1]=new t.Signal(e),this._param.connect(this._sum)},t.extend(t.Add,t.Signal),t.Add.prototype.dispose=function(){return t.prototype.dispose.call(this),this._sum.dispose(),this._sum=null,this._param.dispose(),this._param=null,this},t.Add}(c,b);var x;x=function(t){"use strict";return t.Multiply=function(e){this.createInsOuts(2,0),this._mult=this.input[0]=this.output=new t.Gain,this._param=this.input[1]=this.output.gain,this._param.value=this.defaultArg(e,0)},t.extend(t.Multiply,t.Signal),t.Multiply.prototype.dispose=function(){return t.prototype.dispose.call(this),this._mult.dispose(),this._mult=null,this._param=null,this},t.Multiply}(c,b);var w;w=function(t){"use strict";return t.Scale=function(e,i){this._outputMin=this.defaultArg(e,0),this._outputMax=this.defaultArg(i,1),this._scale=this.input=new t.Multiply(1),this._add=this.output=new t.Add(0),this._scale.connect(this._add),this._setRange()},t.extend(t.Scale,t.SignalBase),Object.defineProperty(t.Scale.prototype,"min",{get:function(){return this._outputMin},set:function(t){this._outputMin=t,this._setRange()}}),Object.defineProperty(t.Scale.prototype,"max",{get:function(){return this._outputMax},set:function(t){this._outputMax=t,this._setRange()}}),t.Scale.prototype._setRange=function(){this._add.value=this._outputMin,this._scale.value=this._outputMax-this._outputMin},t.Scale.prototype.dispose=function(){return t.prototype.dispose.call(this),this._add.dispose(),this._add=null,this._scale.dispose(),this._scale=null,this},t.Scale}(c,S,x);var A;A=function(){var e=b,n=S,o=x,r=w,s=c,a=i;s.setContext(a.audiocontext),t.Signal=function(t){var i=new e(t);return i},e.prototype.fade=e.prototype.linearRampToValueAtTime,o.prototype.fade=e.prototype.fade,n.prototype.fade=e.prototype.fade,r.prototype.fade=e.prototype.fade,e.prototype.setInput=function(t){t.connect(this)},o.prototype.setInput=e.prototype.setInput,n.prototype.setInput=e.prototype.setInput,r.prototype.setInput=e.prototype.setInput,e.prototype.add=function(t){var e=new n(t);return this.connect(e),e},o.prototype.add=e.prototype.add,n.prototype.add=e.prototype.add,r.prototype.add=e.prototype.add,e.prototype.mult=function(t){var e=new o(t);return this.connect(e),e},o.prototype.mult=e.prototype.mult,n.prototype.mult=e.prototype.mult,r.prototype.mult=e.prototype.mult,e.prototype.scale=function(e,i,n,o){var s,a;4===arguments.length?(s=t.prototype.map(n,e,i,0,1)-.5,a=t.prototype.map(o,e,i,0,1)-.5):(s=arguments[0],a=arguments[1]);var u=new r(s,a);return this.connect(u),u},o.prototype.scale=e.prototype.scale,n.prototype.scale=e.prototype.scale,r.prototype.scale=e.prototype.scale}(b,S,x,w,c,i);var P;P=function(){var e=i,n=S,o=x,r=w;t.Oscillator=function(i,n){if("string"==typeof i){var o=n;n=i,i=o}if("number"==typeof n){var o=n;n=i,i=o}this.started=!1,this.phaseAmount=void 0,this.oscillator=e.audiocontext.createOscillator(),this.f=i||440,this.oscillator.type=n||"sine",this.oscillator.frequency.setValueAtTime(this.f,e.audiocontext.currentTime),this.output=e.audiocontext.createGain(),this._freqMods=[],this.output.gain.value=.5,this.output.gain.setValueAtTime(.5,e.audiocontext.currentTime),this.oscillator.connect(this.output),this.panPosition=0,this.connection=e.input,this.panner=new t.Panner(this.output,this.connection,1),this.mathOps=[this.output],e.soundArray.push(this)},t.Oscillator.prototype.start=function(t,i){if(this.started){var n=e.audiocontext.currentTime;this.stop(n)}if(!this.started){var o=i||this.f,r=this.oscillator.type;this.oscillator&&(this.oscillator.disconnect(),this.oscillator=void 0),this.oscillator=e.audiocontext.createOscillator(),this.oscillator.frequency.value=Math.abs(o),this.oscillator.type=r,this.oscillator.connect(this.output),t=t||0,this.oscillator.start(t+e.audiocontext.currentTime),this.freqNode=this.oscillator.frequency;for(var s in this._freqMods)"undefined"!=typeof this._freqMods[s].connect&&this._freqMods[s].connect(this.oscillator.frequency); -this.started=!0}},t.Oscillator.prototype.stop=function(t){if(this.started){var i=t||0,n=e.audiocontext.currentTime;this.oscillator.stop(i+n),this.started=!1}},t.Oscillator.prototype.amp=function(t,i,n){var o=this;if("number"==typeof t){var i=i||0,n=n||0,r=e.audiocontext.currentTime;this.output.gain.linearRampToValueAtTime(t,r+n+i)}else{if(!t)return this.output.gain;t.connect(o.output.gain)}},t.Oscillator.prototype.fade=t.Oscillator.prototype.amp,t.Oscillator.prototype.getAmp=function(){return this.output.gain.value},t.Oscillator.prototype.freq=function(t,i,n){if("number"!=typeof t||isNaN(t)){if(!t)return this.oscillator.frequency;t.output&&(t=t.output),t.connect(this.oscillator.frequency),this._freqMods.push(t)}else{this.f=t;var o=e.audiocontext.currentTime,i=i||0,n=n||0;0===i?(this.oscillator.frequency.cancelScheduledValues(o),this.oscillator.frequency.setValueAtTime(t,n+o)):t>0?this.oscillator.frequency.exponentialRampToValueAtTime(t,n+i+o):this.oscillator.frequency.linearRampToValueAtTime(t,n+i+o),this.phaseAmount&&this.phase(this.phaseAmount)}},t.Oscillator.prototype.getFreq=function(){return this.oscillator.frequency.value},t.Oscillator.prototype.setType=function(t){this.oscillator.type=t},t.Oscillator.prototype.getType=function(){return this.oscillator.type},t.Oscillator.prototype.connect=function(t){t?t.hasOwnProperty("input")?(this.panner.connect(t.input),this.connection=t.input):(this.panner.connect(t),this.connection=t):this.panner.connect(e.input)},t.Oscillator.prototype.disconnect=function(){this.output.disconnect(),this.panner.disconnect(),this.output.connect(this.panner),this.oscMods=[]},t.Oscillator.prototype.pan=function(t,e){this.panPosition=t,this.panner.pan(t,e)},t.Oscillator.prototype.getPan=function(){return this.panPosition},t.Oscillator.prototype.dispose=function(){var t=e.soundArray.indexOf(this);if(e.soundArray.splice(t,1),this.oscillator){var i=e.audiocontext.currentTime;this.stop(i),this.disconnect(),this.panner=null,this.oscillator=null}this.osc2&&this.osc2.dispose()},t.Oscillator.prototype.phase=function(i){var n=t.prototype.map(i,0,1,0,1/this.f),o=e.audiocontext.currentTime;this.phaseAmount=i,this.dNode||(this.dNode=e.audiocontext.createDelay(),this.oscillator.disconnect(),this.oscillator.connect(this.dNode),this.dNode.connect(this.output)),this.dNode.delayTime.setValueAtTime(n,o)};var s=function(t,e,i,n,o){var r=t.oscillator;for(var s in t.mathOps)t.mathOps[s]instanceof o&&(r.disconnect(),t.mathOps[s].dispose(),i=s,i0&&(r=t.mathOps[s-1]),r.disconnect(),r.connect(e),e.connect(n),t.mathOps[i]=e,t};t.Oscillator.prototype.add=function(t){var e=new n(t),i=this.mathOps.length-1,o=this.output;return s(this,e,i,o,n)},t.Oscillator.prototype.mult=function(t){var e=new o(t),i=this.mathOps.length-1,n=this.output;return s(this,e,i,n,o)},t.Oscillator.prototype.scale=function(e,i,n,o){var a,u;4===arguments.length?(a=t.prototype.map(n,e,i,0,1)-.5,u=t.prototype.map(o,e,i,0,1)-.5):(a=arguments[0],u=arguments[1]);var c=new r(a,u),p=this.mathOps.length-1,h=this.output;return s(this,c,p,h,r)},t.SinOsc=function(e){t.Oscillator.call(this,e,"sine")},t.SinOsc.prototype=Object.create(t.Oscillator.prototype),t.TriOsc=function(e){t.Oscillator.call(this,e,"triangle")},t.TriOsc.prototype=Object.create(t.Oscillator.prototype),t.SawOsc=function(e){t.Oscillator.call(this,e,"sawtooth")},t.SawOsc.prototype=Object.create(t.Oscillator.prototype),t.SqrOsc=function(e){t.Oscillator.call(this,e,"square")},t.SqrOsc.prototype=Object.create(t.Oscillator.prototype)}(i,S,x,w);var k;k=function(t){"use strict";return t.Timeline=function(){var e=this.optionsObject(arguments,["memory"],t.Timeline.defaults);this._timeline=[],this._toRemove=[],this._iterating=!1,this.memory=e.memory},t.extend(t.Timeline),t.Timeline.defaults={memory:1/0},Object.defineProperty(t.Timeline.prototype,"length",{get:function(){return this._timeline.length}}),t.Timeline.prototype.add=function(t){if(this.isUndef(t.time))throw new Error("Tone.Timeline: events must have a time attribute");if(this._timeline.length){var e=this._search(t.time);this._timeline.splice(e+1,0,t)}else this._timeline.push(t);if(this.length>this.memory){var i=this.length-this.memory;this._timeline.splice(0,i)}return this},t.Timeline.prototype.remove=function(t){if(this._iterating)this._toRemove.push(t);else{var e=this._timeline.indexOf(t);-1!==e&&this._timeline.splice(e,1)}return this},t.Timeline.prototype.get=function(t){var e=this._search(t);return-1!==e?this._timeline[e]:null},t.Timeline.prototype.peek=function(){return this._timeline[0]},t.Timeline.prototype.shift=function(){return this._timeline.shift()},t.Timeline.prototype.getAfter=function(t){var e=this._search(t);return e+10&&this._timeline[e-1].time=0?this._timeline[i-1]:null},t.Timeline.prototype.cancel=function(t){if(this._timeline.length>1){var e=this._search(t);if(e>=0)if(this._timeline[e].time===t){for(var i=e;i>=0&&this._timeline[i].time===t;i--)e=i;this._timeline=this._timeline.slice(0,e)}else this._timeline=this._timeline.slice(0,e+1);else this._timeline=[]}else 1===this._timeline.length&&this._timeline[0].time>=t&&(this._timeline=[]);return this},t.Timeline.prototype.cancelBefore=function(t){if(this._timeline.length){var e=this._search(t);e>=0&&(this._timeline=this._timeline.slice(e+1))}return this},t.Timeline.prototype._search=function(t){var e=0,i=this._timeline.length,n=i;if(i>0&&this._timeline[i-1].time<=t)return i-1;for(;n>e;){var o=Math.floor(e+(n-e)/2),r=this._timeline[o],s=this._timeline[o+1];if(r.time===t){for(var a=o;at)return o;r.time>t?n=o:r.time=n;n++)t(this._timeline[n]);if(this._iterating=!1,this._toRemove.length>0){for(var o=0;o=0&&this._timeline[i].time>=t;)i--;return this._iterate(e,i+1),this},t.Timeline.prototype.forEachAtTime=function(t,e){var i=this._search(t);return-1!==i&&this._iterate(function(i){i.time===t&&e(i)},0,i),this},t.Timeline.prototype.dispose=function(){t.prototype.dispose.call(this),this._timeline=null,this._toRemove=null},t.Timeline}(c);var O;O=function(t){"use strict";return t.TimelineSignal=function(){var e=this.optionsObject(arguments,["value","units"],t.Signal.defaults);this._events=new t.Timeline(10),t.Signal.apply(this,e),e.param=this._param,t.Param.call(this,e),this._initial=this._fromUnits(this._param.value)},t.extend(t.TimelineSignal,t.Param),t.TimelineSignal.Type={Linear:"linear",Exponential:"exponential",Target:"target",Curve:"curve",Set:"set"},Object.defineProperty(t.TimelineSignal.prototype,"value",{get:function(){var t=this.now(),e=this.getValueAtTime(t);return this._toUnits(e)},set:function(t){var e=this._fromUnits(t);this._initial=e,this.cancelScheduledValues(),this._param.value=e}}),t.TimelineSignal.prototype.setValueAtTime=function(e,i){return e=this._fromUnits(e),i=this.toSeconds(i),this._events.add({type:t.TimelineSignal.Type.Set,value:e,time:i}),this._param.setValueAtTime(e,i),this},t.TimelineSignal.prototype.linearRampToValueAtTime=function(e,i){return e=this._fromUnits(e),i=this.toSeconds(i),this._events.add({type:t.TimelineSignal.Type.Linear,value:e,time:i}),this._param.linearRampToValueAtTime(e,i),this},t.TimelineSignal.prototype.exponentialRampToValueAtTime=function(e,i){i=this.toSeconds(i);var n=this._searchBefore(i);n&&0===n.value&&this.setValueAtTime(this._minOutput,n.time),e=this._fromUnits(e);var o=Math.max(e,this._minOutput);return this._events.add({type:t.TimelineSignal.Type.Exponential,value:o,time:i}),ee)this.cancelScheduledValues(e),this.linearRampToValueAtTime(i,e);else{var o=this._searchAfter(e);o&&(this.cancelScheduledValues(e),o.type===t.TimelineSignal.Type.Linear?this.linearRampToValueAtTime(i,e):o.type===t.TimelineSignal.Type.Exponential&&this.exponentialRampToValueAtTime(i,e)),this.setValueAtTime(i,e)}return this},t.TimelineSignal.prototype.linearRampToValueBetween=function(t,e,i){return this.setRampPoint(e),this.linearRampToValueAtTime(t,i),this},t.TimelineSignal.prototype.exponentialRampToValueBetween=function(t,e,i){return this.setRampPoint(e),this.exponentialRampToValueAtTime(t,i),this},t.TimelineSignal.prototype._searchBefore=function(t){return this._events.get(t)},t.TimelineSignal.prototype._searchAfter=function(t){return this._events.getAfter(t)},t.TimelineSignal.prototype.getValueAtTime=function(e){e=this.toSeconds(e);var i=this._searchAfter(e),n=this._searchBefore(e),o=this._initial;if(null===n)o=this._initial;else if(n.type===t.TimelineSignal.Type.Target){var r,s=this._events.getBefore(n.time);r=null===s?this._initial:s.value,o=this._exponentialApproach(n.time,r,n.value,n.constant,e)}else o=n.type===t.TimelineSignal.Type.Curve?this._curveInterpolate(n.time,n.value,n.duration,e):null===i?n.value:i.type===t.TimelineSignal.Type.Linear?this._linearInterpolate(n.time,n.value,i.time,i.value,e):i.type===t.TimelineSignal.Type.Exponential?this._exponentialInterpolate(n.time,n.value,i.time,i.value,e):n.value;return o},t.TimelineSignal.prototype.connect=t.SignalBase.prototype.connect,t.TimelineSignal.prototype._exponentialApproach=function(t,e,i,n,o){return i+(e-i)*Math.exp(-(o-t)/n)},t.TimelineSignal.prototype._linearInterpolate=function(t,e,i,n,o){return e+(n-e)*((o-t)/(i-t))},t.TimelineSignal.prototype._exponentialInterpolate=function(t,e,i,n,o){return e=Math.max(this._minOutput,e),e*Math.pow(n/e,(o-t)/(i-t))},t.TimelineSignal.prototype._curveInterpolate=function(t,e,i,n){var o=e.length;if(n>=t+i)return e[o-1];if(t>=n)return e[0];var r=(n-t)/i,s=Math.floor((o-1)*r),a=Math.ceil((o-1)*r),u=e[s],c=e[a];return a===s?u:this._linearInterpolate(s,u,a,c,r*(o-1))},t.TimelineSignal.prototype.dispose=function(){t.Signal.prototype.dispose.call(this),t.Param.prototype.dispose.call(this),this._events.dispose(),this._events=null},t.TimelineSignal}(c,b);var F;F=function(){var e=i,n=S,o=x,r=w,s=O,a=c;a.setContext(e.audiocontext),t.Env=function(t,i,n,o,r,a){this.aTime=t||.1,this.aLevel=i||1,this.dTime=n||.5,this.dLevel=o||0,this.rTime=r||0,this.rLevel=a||0,this._rampHighPercentage=.98,this._rampLowPercentage=.02,this.output=e.audiocontext.createGain(),this.control=new s,this._init(),this.control.connect(this.output),this.connection=null,this.mathOps=[this.control],this.isExponential=!1,this.sourceToClear=null,this.wasTriggered=!1,e.soundArray.push(this)},t.Env.prototype._init=function(){var t=e.audiocontext.currentTime,i=t;this.control.setTargetAtTime(1e-5,i,.001),this._setRampAD(this.aTime,this.dTime)},t.Env.prototype.set=function(t,e,i,n,o,r){this.aTime=t,this.aLevel=e,this.dTime=i||0,this.dLevel=n||0,this.rTime=o||0,this.rLevel=r||0,this._setRampAD(t,i)},t.Env.prototype.setADSR=function(t,e,i,n){this.aTime=t,this.dTime=e||0,this.sPercent=i||0,this.dLevel="undefined"!=typeof i?i*(this.aLevel-this.rLevel)+this.rLevel:0,this.rTime=n||0,this._setRampAD(t,e)},t.Env.prototype.setRange=function(t,e){this.aLevel=t||1,this.rLevel=e||0},t.Env.prototype._setRampAD=function(t,e){this._rampAttackTime=this.checkExpInput(t),this._rampDecayTime=this.checkExpInput(e);var i=1;i=Math.log(1/this.checkExpInput(1-this._rampHighPercentage)),this._rampAttackTC=t/this.checkExpInput(i),i=Math.log(1/this._rampLowPercentage),this._rampDecayTC=e/this.checkExpInput(i)},t.Env.prototype.setRampPercentages=function(t,e){this._rampHighPercentage=this.checkExpInput(t),this._rampLowPercentage=this.checkExpInput(e);var i=1;i=Math.log(1/this.checkExpInput(1-this._rampHighPercentage)),this._rampAttackTC=this._rampAttackTime/this.checkExpInput(i),i=Math.log(1/this._rampLowPercentage),this._rampDecayTC=this._rampDecayTime/this.checkExpInput(i)},t.Env.prototype.setInput=function(){for(var t=0;t=t&&(t=1e-8),t},t.Env.prototype.play=function(t,e,i){var n=e||0,i=i||0;t&&this.connection!==t&&this.connect(t),this.triggerAttack(t,n),this.triggerRelease(t,n+this.aTime+this.dTime+i)},t.Env.prototype.triggerAttack=function(t,i){var n=e.audiocontext.currentTime,o=i||0,r=n+o;this.lastAttack=r,this.wasTriggered=!0,t&&this.connection!==t&&this.connect(t);var s=this.control.getValueAtTime(r);this.control.cancelScheduledValues(r),this.isExponential===!0?this.control.exponentialRampToValueAtTime(this.checkExpInput(s),r):this.control.linearRampToValueAtTime(s,r),r+=this.aTime,this.isExponential===!0?(this.control.exponentialRampToValueAtTime(this.checkExpInput(this.aLevel),r),s=this.checkExpInput(this.control.getValueAtTime(r)),this.control.cancelScheduledValues(r),this.control.exponentialRampToValueAtTime(s,r)):(this.control.linearRampToValueAtTime(this.aLevel,r),s=this.control.getValueAtTime(r),this.control.cancelScheduledValues(r),this.control.linearRampToValueAtTime(s,r)),r+=this.dTime,this.isExponential===!0?(this.control.exponentialRampToValueAtTime(this.checkExpInput(this.dLevel),r),s=this.checkExpInput(this.control.getValueAtTime(r)),this.control.cancelScheduledValues(r),this.control.exponentialRampToValueAtTime(s,r)):(this.control.linearRampToValueAtTime(this.dLevel,r),s=this.control.getValueAtTime(r),this.control.cancelScheduledValues(r),this.control.linearRampToValueAtTime(s,r))},t.Env.prototype.triggerRelease=function(t,i){if(this.wasTriggered){var n=e.audiocontext.currentTime,o=i||0,r=n+o;t&&this.connection!==t&&this.connect(t);var s=this.control.getValueAtTime(r);this.control.cancelScheduledValues(r),this.isExponential===!0?this.control.exponentialRampToValueAtTime(this.checkExpInput(s),r):this.control.linearRampToValueAtTime(s,r),r+=this.rTime,this.isExponential===!0?(this.control.exponentialRampToValueAtTime(this.checkExpInput(this.rLevel),r),s=this.checkExpInput(this.control.getValueAtTime(r)),this.control.cancelScheduledValues(r),this.control.exponentialRampToValueAtTime(s,r)):(this.control.linearRampToValueAtTime(this.rLevel,r),s=this.control.getValueAtTime(r),this.control.cancelScheduledValues(r),this.control.linearRampToValueAtTime(s,r)),this.wasTriggered=!1}},t.Env.prototype.ramp=function(t,i,n,o){var r=e.audiocontext.currentTime,s=i||0,a=r+s,u=this.checkExpInput(n),c="undefined"!=typeof o?this.checkExpInput(o):void 0;t&&this.connection!==t&&this.connect(t);var p=this.checkExpInput(this.control.getValueAtTime(a));this.control.cancelScheduledValues(a),u>p?(this.control.setTargetAtTime(u,a,this._rampAttackTC),a+=this._rampAttackTime):p>u&&(this.control.setTargetAtTime(u,a,this._rampDecayTC),a+=this._rampDecayTime),void 0!==c&&(c>u?this.control.setTargetAtTime(c,a,this._rampAttackTC):u>c&&this.control.setTargetAtTime(c,a,this._rampDecayTC))},t.Env.prototype.connect=function(i){this.connection=i,(i instanceof t.Oscillator||i instanceof t.SoundFile||i instanceof t.AudioIn||i instanceof t.Reverb||i instanceof t.Noise||i instanceof t.Filter||i instanceof t.Delay)&&(i=i.output.gain),i instanceof AudioParam&&i.setValueAtTime(0,e.audiocontext.currentTime),i instanceof t.Signal&&i.setValue(0),this.output.connect(i)},t.Env.prototype.disconnect=function(){this.output.disconnect()},t.Env.prototype.add=function(e){var i=new n(e),o=this.mathOps.length,r=this.output;return t.prototype._mathChain(this,i,o,r,n)},t.Env.prototype.mult=function(e){var i=new o(e),n=this.mathOps.length,r=this.output;return t.prototype._mathChain(this,i,n,r,o)},t.Env.prototype.scale=function(e,i,n,o){var s=new r(e,i,n,o),a=this.mathOps.length,u=this.output;return t.prototype._mathChain(this,s,a,u,r)},t.Env.prototype.dispose=function(){var t=e.soundArray.indexOf(this);e.soundArray.splice(t,1),this.disconnect();try{this.control.dispose(),this.control=null}catch(i){console.warn(i,"already disposed p5.Env")}for(var n=1;no;o++)i[o]=1;var r=t.createBufferSource();return r.buffer=e,r.loop=!0,r}var n=i;t.Pulse=function(i,o){t.Oscillator.call(this,i,"sawtooth"),this.w=o||0,this.osc2=new t.SawOsc(i),this.dNode=n.audiocontext.createDelay(),this.dcOffset=e(),this.dcGain=n.audiocontext.createGain(),this.dcOffset.connect(this.dcGain),this.dcGain.connect(this.output),this.f=i||440;var r=this.w/this.oscillator.frequency.value;this.dNode.delayTime.value=r,this.dcGain.gain.value=1.7*(.5-this.w),this.osc2.disconnect(),this.osc2.panner.disconnect(),this.osc2.amp(-1),this.osc2.output.connect(this.dNode),this.dNode.connect(this.output),this.output.gain.value=1,this.output.connect(this.panner)},t.Pulse.prototype=Object.create(t.Oscillator.prototype),t.Pulse.prototype.width=function(e){if("number"==typeof e){if(1>=e&&e>=0){this.w=e;var i=this.w/this.oscillator.frequency.value;this.dNode.delayTime.value=i}this.dcGain.gain.value=1.7*(.5-this.w)}else{e.connect(this.dNode.delayTime);var n=new t.SignalAdd(-.5);n.setInput(e),n=n.mult(-1),n=n.mult(1.7),n.connect(this.dcGain.gain)}},t.Pulse.prototype.start=function(t,i){var o=n.audiocontext.currentTime,r=i||0;if(!this.started){var s=t||this.f,a=this.oscillator.type;this.oscillator=n.audiocontext.createOscillator(),this.oscillator.frequency.setValueAtTime(s,o),this.oscillator.type=a,this.oscillator.connect(this.output),this.oscillator.start(r+o),this.osc2.oscillator=n.audiocontext.createOscillator(),this.osc2.oscillator.frequency.setValueAtTime(s,r+o),this.osc2.oscillator.type=a,this.osc2.oscillator.connect(this.osc2.output),this.osc2.start(r+o),this.freqNode=[this.oscillator.frequency,this.osc2.oscillator.frequency],this.dcOffset=e(),this.dcOffset.connect(this.dcGain),this.dcOffset.start(r+o),void 0!==this.mods&&void 0!==this.mods.frequency&&(this.mods.frequency.connect(this.freqNode[0]),this.mods.frequency.connect(this.freqNode[1])),this.started=!0,this.osc2.started=!0}},t.Pulse.prototype.stop=function(t){if(this.started){var e=t||0,i=n.audiocontext.currentTime;this.oscillator.stop(e+i),this.osc2.oscillator.stop(e+i),this.dcOffset.stop(e+i),this.started=!1,this.osc2.started=!1}},t.Pulse.prototype.freq=function(t,e,i){if("number"==typeof t){this.f=t;var o=n.audiocontext.currentTime,e=e||0,i=i||0,r=this.oscillator.frequency.value;this.oscillator.frequency.cancelScheduledValues(o),this.oscillator.frequency.setValueAtTime(r,o+i),this.oscillator.frequency.exponentialRampToValueAtTime(t,i+e+o),this.osc2.oscillator.frequency.cancelScheduledValues(o),this.osc2.oscillator.frequency.setValueAtTime(r,o+i),this.osc2.oscillator.frequency.exponentialRampToValueAtTime(t,i+e+o),this.freqMod&&(this.freqMod.output.disconnect(),this.freqMod=null)}else t.output&&(t.output.disconnect(),t.output.connect(this.oscillator.frequency),t.output.connect(this.osc2.oscillator.frequency),this.freqMod=t)}}(i,P);var M;M=function(){var e=i;t.Noise=function(e){var i;t.Oscillator.call(this),delete this.f,delete this.freq,delete this.oscillator,i="brown"===e?r:"pink"===e?o:n,this.buffer=i},t.Noise.prototype=Object.create(t.Oscillator.prototype);var n=function(){for(var t=2*e.audiocontext.sampleRate,i=e.audiocontext.createBuffer(1,t,e.audiocontext.sampleRate),n=i.getChannelData(0),o=0;t>o;o++)n[o]=2*Math.random()-1;return i.type="white",i}(),o=function(){var t,i,n,o,r,s,a,u=2*e.audiocontext.sampleRate,c=e.audiocontext.createBuffer(1,u,e.audiocontext.sampleRate),p=c.getChannelData(0);t=i=n=o=r=s=a=0;for(var h=0;u>h;h++){var l=2*Math.random()-1;t=.99886*t+.0555179*l,i=.99332*i+.0750759*l,n=.969*n+.153852*l,o=.8665*o+.3104856*l,r=.55*r+.5329522*l,s=-.7616*s-.016898*l,p[h]=t+i+n+o+r+s+a+.5362*l,p[h]*=.11,a=.115926*l}return c.type="pink",c}(),r=function(){for(var t=2*e.audiocontext.sampleRate,i=e.audiocontext.createBuffer(1,t,e.audiocontext.sampleRate),n=i.getChannelData(0),o=0,r=0;t>r;r++){var s=2*Math.random()-1;n[r]=(o+.02*s)/1.02,o=n[r],n[r]*=3.5}return i.type="brown",i}();t.Noise.prototype.setType=function(t){switch(t){case"white":this.buffer=n;break;case"pink":this.buffer=o;break;case"brown":this.buffer=r;break;default:this.buffer=n}if(this.started){var i=e.audiocontext.currentTime;this.stop(i),this.start(i+.01)}},t.Noise.prototype.getType=function(){return this.buffer.type},t.Noise.prototype.start=function(){this.started&&this.stop(),this.noise=e.audiocontext.createBufferSource(),this.noise.buffer=this.buffer,this.noise.loop=!0,this.noise.connect(this.output);var t=e.audiocontext.currentTime;this.noise.start(t),this.started=!0},t.Noise.prototype.stop=function(){var t=e.audiocontext.currentTime;this.noise&&(this.noise.stop(t),this.started=!1)},t.Noise.prototype.dispose=function(){var t=e.audiocontext.currentTime,i=e.soundArray.indexOf(this);e.soundArray.splice(i,1),this.noise&&(this.noise.disconnect(),this.stop(t)),this.output&&this.output.disconnect(),this.panner&&this.panner.disconnect(),this.output=null,this.panner=null,this.buffer=null,this.noise=null}}(i);var V;V=function(){var e=i;t.AudioIn=function(i){this.input=e.audiocontext.createGain(),this.output=e.audiocontext.createGain(),this.stream=null,this.mediaStream=null,this.currentSource=0,this.enabled=!1,this.amplitude=new t.Amplitude,this.output.connect(this.amplitude.input),"undefined"==typeof window.MediaStreamTrack?i?i():window.alert("This browser does not support AudioIn"):"function"==typeof window.MediaDevices.enumerateDevices&&window.MediaDevices.enumerateDevices(this._gotSources),e.soundArray.push(this)},t.AudioIn.prototype.start=function(t,i){var n=this;if(e.inputSources[n.currentSource]){var o=e.inputSources[n.currentSource].id,r={audio:{optional:[{sourceId:o}]}};window.navigator.getUserMedia(r,this._onStream=function(i){n.stream=i,n.enabled=!0,n.mediaStream=e.audiocontext.createMediaStreamSource(i),n.mediaStream.connect(n.output),t&&t(),n.amplitude.setInput(n.output)},this._onStreamError=function(t){i?i(t):console.error(t)})}else window.navigator.getUserMedia({audio:!0},this._onStream=function(i){n.stream=i,n.enabled=!0,n.mediaStream=e.audiocontext.createMediaStreamSource(i),n.mediaStream.connect(n.output),n.amplitude.setInput(n.output),t&&t()},this._onStreamError=function(t){i?i(t):console.error(t)})},t.AudioIn.prototype.stop=function(){this.stream&&this.stream.getTracks()[0].stop()},t.AudioIn.prototype.connect=function(t){t?t.hasOwnProperty("input")?this.output.connect(t.input):t.hasOwnProperty("analyser")?this.output.connect(t.analyser):this.output.connect(t):this.output.connect(e.input)},t.AudioIn.prototype.disconnect=function(){this.output.disconnect(),this.output.connect(this.amplitude.input)},t.AudioIn.prototype.getLevel=function(t){return t&&(this.amplitude.smoothing=t),this.amplitude.getLevel()},t.AudioIn.prototype._gotSources=function(t){for(var e=0;e0?e.inputSources:"This browser does not support MediaStreamTrack.getSources()"},t.AudioIn.prototype.getSources=function(t){"function"==typeof window.MediaStreamTrack.getSources?window.MediaStreamTrack.getSources(function(i){for(var n=0,o=i.length;o>n;n++){var r=i[n];"audio"===r.kind&&e.inputSources.push(r)}t(e.inputSources)}):console.log("This browser does not support MediaStreamTrack.getSources()")},t.AudioIn.prototype.setSource=function(t){var i=this;e.inputSources.length>0&&t=t?0:1},127),this._scale=this.input=new t.Multiply(1e4),this._scale.connect(this._thresh)},t.extend(t.GreaterThanZero,t.SignalBase),t.GreaterThanZero.prototype.dispose=function(){return t.prototype.dispose.call(this),this._scale.dispose(),this._scale=null,this._thresh.dispose(),this._thresh=null,this},t.GreaterThanZero}(c,b,x);var R;R=function(t){"use strict";return t.GreaterThan=function(e){this.createInsOuts(2,0),this._param=this.input[0]=new t.Subtract(e),this.input[1]=this._param.input[1],this._gtz=this.output=new t.GreaterThanZero,this._param.connect(this._gtz)},t.extend(t.GreaterThan,t.Signal),t.GreaterThan.prototype.dispose=function(){return t.prototype.dispose.call(this),this._param.dispose(),this._param=null,this._gtz.dispose(),this._gtz=null,this},t.GreaterThan}(c,N,E);var D;D=function(t){"use strict";return t.Abs=function(){this._abs=this.input=this.output=new t.WaveShaper(function(t){return 0===t?0:Math.abs(t)},127)},t.extend(t.Abs,t.SignalBase),t.Abs.prototype.dispose=function(){return t.prototype.dispose.call(this),this._abs.dispose(),this._abs=null,this},t.Abs}(c,h);var B;B=function(t){"use strict";return t.Modulo=function(e){this.createInsOuts(1,0),this._shaper=new t.WaveShaper(Math.pow(2,16)),this._multiply=new t.Multiply,this._subtract=this.output=new t.Subtract,this._modSignal=new t.Signal(e),this.input.fan(this._shaper,this._subtract),this._modSignal.connect(this._multiply,0,0),this._shaper.connect(this._multiply,0,1),this._multiply.connect(this._subtract,0,1),this._setWaveShaper(e)},t.extend(t.Modulo,t.SignalBase),t.Modulo.prototype._setWaveShaper=function(t){this._shaper.setMap(function(e){var i=Math.floor((e+1e-4)/t);return i})},Object.defineProperty(t.Modulo.prototype,"value",{get:function(){return this._modSignal.value},set:function(t){this._modSignal.value=t,this._setWaveShaper(t)}}),t.Modulo.prototype.dispose=function(){return t.prototype.dispose.call(this),this._shaper.dispose(),this._shaper=null,this._multiply.dispose(),this._multiply=null,this._subtract.dispose(),this._subtract=null,this._modSignal.dispose(),this._modSignal=null,this},t.Modulo}(c,h,x);var U;U=function(t){"use strict";return t.Pow=function(e){this._exp=this.defaultArg(e,1),this._expScaler=this.input=this.output=new t.WaveShaper(this._expFunc(this._exp),8192)},t.extend(t.Pow,t.SignalBase),Object.defineProperty(t.Pow.prototype,"value",{get:function(){return this._exp},set:function(t){this._exp=t,this._expScaler.setMap(this._expFunc(this._exp))}}),t.Pow.prototype._expFunc=function(t){return function(e){return Math.pow(Math.abs(e),t)}},t.Pow.prototype.dispose=function(){return t.prototype.dispose.call(this),this._expScaler.dispose(),this._expScaler=null,this},t.Pow}(c);var I;I=function(t){"use strict";return t.AudioToGain=function(){this._norm=this.input=this.output=new t.WaveShaper(function(t){return(t+1)/2})},t.extend(t.AudioToGain,t.SignalBase),t.AudioToGain.prototype.dispose=function(){return t.prototype.dispose.call(this),this._norm.dispose(),this._norm=null,this},t.AudioToGain}(c,h);var G;G=function(t){"use strict";function e(t,e,i){var n=new t;return i._eval(e[0]).connect(n,0,0),i._eval(e[1]).connect(n,0,1),n}function i(t,e,i){var n=new t;return i._eval(e[0]).connect(n,0,0),n}function n(t){return t?parseFloat(t):void 0}function o(t){return t&&t.args?parseFloat(t.args):void 0}return t.Expr=function(){var t=this._replacements(Array.prototype.slice.call(arguments)),e=this._parseInputs(t);this._nodes=[],this.input=new Array(e);for(var i=0;e>i;i++)this.input[i]=this.context.createGain();var n,o=this._parseTree(t);try{n=this._eval(o)}catch(r){throw this._disposeNodes(),new Error("Tone.Expr: Could evaluate expression: "+t)}this.output=n},t.extend(t.Expr,t.SignalBase),t.Expr._Expressions={value:{signal:{regexp:/^\d+\.\d+|^\d+/,method:function(e){var i=new t.Signal(n(e));return i}},input:{regexp:/^\$\d/,method:function(t,e){return e.input[n(t.substr(1))]}}},glue:{"(":{regexp:/^\(/},")":{regexp:/^\)/},",":{regexp:/^,/}},func:{abs:{regexp:/^abs/,method:i.bind(this,t.Abs)},mod:{regexp:/^mod/,method:function(e,i){var n=o(e[1]),r=new t.Modulo(n);return i._eval(e[0]).connect(r),r}},pow:{regexp:/^pow/,method:function(e,i){var n=o(e[1]),r=new t.Pow(n);return i._eval(e[0]).connect(r),r}},a2g:{regexp:/^a2g/,method:function(e,i){var n=new t.AudioToGain;return i._eval(e[0]).connect(n),n}}},binary:{"+":{regexp:/^\+/,precedence:1,method:e.bind(this,t.Add)},"-":{regexp:/^\-/,precedence:1,method:function(n,o){return 1===n.length?i(t.Negate,n,o):e(t.Subtract,n,o)}},"*":{regexp:/^\*/,precedence:0,method:e.bind(this,t.Multiply)}},unary:{"-":{regexp:/^\-/,method:i.bind(this,t.Negate)},"!":{regexp:/^\!/,method:i.bind(this,t.NOT)}}},t.Expr.prototype._parseInputs=function(t){var e=t.match(/\$\d/g),i=0; -if(null!==e)for(var n=0;n0;){e=e.trim();var r=i(e);o.push(r),e=e.substr(r.value.length)}return{next:function(){return o[++n]},peek:function(){return o[n+1]}}},t.Expr.prototype._parseTree=function(e){function i(t,e){return!p(t)&&"glue"===t.type&&t.value===e}function n(e,i,n){var o=!1,r=t.Expr._Expressions[i];if(!p(e))for(var s in r){var a=r[s];if(a.regexp.test(e.value)){if(p(n))return!0;if(a.precedence===n)return!0}}return o}function o(t){p(t)&&(t=5);var e;e=0>t?r():o(t-1);for(var i=c.peek();n(i,"binary",t);)i=c.next(),e={operator:i.value,method:i.method,args:[e,o(t-1)]},i=c.peek();return e}function r(){var t,e;return t=c.peek(),n(t,"unary")?(t=c.next(),e=r(),{operator:t.value,method:t.method,args:[e]}):s()}function s(){var t,e;if(t=c.peek(),p(t))throw new SyntaxError("Tone.Expr: Unexpected termination of expression");if("func"===t.type)return t=c.next(),a(t);if("value"===t.type)return t=c.next(),{method:t.method,args:t.value};if(i(t,"(")){if(c.next(),e=o(),t=c.next(),!i(t,")"))throw new SyntaxError("Expected )");return e}throw new SyntaxError("Tone.Expr: Parse error, cannot process token "+t.value)}function a(t){var e,n=[];if(e=c.next(),!i(e,"("))throw new SyntaxError('Tone.Expr: Expected ( in a function call "'+t.value+'"');if(e=c.peek(),i(e,")")||(n=u()),e=c.next(),!i(e,")"))throw new SyntaxError('Tone.Expr: Expected ) in a function call "'+t.value+'"');return{method:t.method,args:n,name:name}}function u(){for(var t,e,n=[];;){if(e=o(),p(e))break;if(n.push(e),t=c.peek(),!i(t,","))break;c.next()}return n}var c=this._tokenize(e),p=this.isUndef.bind(this);return o()},t.Expr.prototype._eval=function(t){if(!this.isUndef(t)){var e=t.method(t.args,this);return this._nodes.push(e),e}},t.Expr.prototype._disposeNodes=function(){for(var t=0;t0){this.connect(arguments[0]);for(var t=1;t=t&&(t=1),"number"==typeof t?(this.biquad.frequency.value=t,this.biquad.frequency.cancelScheduledValues(this.ac.currentTime+.01+i),this.biquad.frequency.exponentialRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.biquad.frequency),this.biquad.frequency.value},t.Filter.prototype.res=function(t,e){var i=e||0;return"number"==typeof t?(this.biquad.Q.value=t,this.biquad.Q.cancelScheduledValues(this.ac.currentTime+.01+i),this.biquad.Q.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.biquad.Q),this.biquad.Q.value},t.Filter.prototype.gain=function(t,e){var i=e||0;return"number"==typeof t?(this.biquad.gain.value=t,this.biquad.gain.cancelScheduledValues(this.ac.currentTime+.01+i),this.biquad.gain.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.biquad.gain),this.biquad.gain.value},t.Filter.prototype.toggle=function(){return this._on=!this._on,this._on===!0?this.biquad.type=this._untoggledType:this._on===!1&&(this.biquad.type="allpass"),this._on},t.Filter.prototype.setType=function(t){this.biquad.type=t,this._untoggledType=this.biquad.type},t.Filter.prototype.dispose=function(){e.prototype.dispose.apply(this),this.biquad.disconnect(),this.biquad=void 0},t.LowPass=function(){t.Filter.call(this,"lowpass")},t.LowPass.prototype=Object.create(t.Filter.prototype),t.HighPass=function(){t.Filter.call(this,"highpass")},t.HighPass.prototype=Object.create(t.Filter.prototype),t.BandPass=function(){t.Filter.call(this,"bandpass")},t.BandPass.prototype=Object.create(t.Filter.prototype),t.Filter}(i,Z);var Y;Y=function(){var e=X,n=i,o=function(t,i){e.call(this,"peaking"),this.disconnect(),this.set(t,i),this.biquad.gain.value=0,delete this.input,delete this.output,delete this._drywet,delete this.wet};return o.prototype=Object.create(e.prototype),o.prototype.amp=function(){console.warn("`amp()` is not available for p5.EQ bands. Use `.gain()`")},o.prototype.drywet=function(){console.warn("`drywet()` is not available for p5.EQ bands.")},o.prototype.connect=function(e){var i=e||t.soundOut.input;this.biquad?this.biquad.connect(i.input?i.input:i):this.output.connect(i.input?i.input:i)},o.prototype.disconnect=function(){this.biquad.disconnect()},o.prototype.dispose=function(){var t=n.soundArray.indexOf(this);n.soundArray.splice(t,1),this.disconnect(),delete this.biquad},o}(X,i);var z;z=function(){var e=Z,i=Y;return t.EQ=function(t){e.call(this),t=3===t||8===t?t:3;var i;i=3===t?Math.pow(2,3):2,this.bands=[];for(var n,o,r=0;t>r;r++)r===t-1?(n=21e3,o=.01):0===r?(n=100,o=.1):1===r?(n=3===t?360*i:360,o=1):(n=this.bands[r-1].freq()*i,o=1),this.bands[r]=this._newBand(n,o),r>0?this.bands[r-1].connect(this.bands[r].biquad):this.input.connect(this.bands[r].biquad);this.bands[t-1].connect(this.output)},t.EQ.prototype=Object.create(e.prototype),t.EQ.prototype.process=function(t){t.connect(this.input)},t.EQ.prototype.set=function(){if(arguments.length===2*this.bands.length)for(var t=0;t0;)delete this.bands.pop().dispose();delete this.bands},t.EQ}(Z,Y);var W;W=function(){var e=Z;return t.Panner3D=function(){e.call(this),this.panner=this.ac.createPanner(),this.panner.panningModel="HRTF",this.panner.distanceModel="linear",this.panner.connect(this.output),this.input.connect(this.panner)},t.Panner3D.prototype=Object.create(e.prototype),t.Panner3D.prototype.process=function(t){t.connect(this.input)},t.Panner3D.prototype.set=function(t,e,i,n){return this.positionX(t,n),this.positionY(e,n),this.positionZ(i,n),[this.panner.positionX.value,this.panner.positionY.value,this.panner.positionZ.value]},t.Panner3D.prototype.positionX=function(t,e){var i=e||0;return"number"==typeof t?(this.panner.positionX.value=t,this.panner.positionX.cancelScheduledValues(this.ac.currentTime+.01+i),this.panner.positionX.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.panner.positionX),this.panner.positionX.value},t.Panner3D.prototype.positionY=function(t,e){var i=e||0;return"number"==typeof t?(this.panner.positionY.value=t,this.panner.positionY.cancelScheduledValues(this.ac.currentTime+.01+i),this.panner.positionY.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.panner.positionY),this.panner.positionY.value},t.Panner3D.prototype.positionZ=function(t,e){var i=e||0;return"number"==typeof t?(this.panner.positionZ.value=t,this.panner.positionZ.cancelScheduledValues(this.ac.currentTime+.01+i),this.panner.positionZ.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.panner.positionZ),this.panner.positionZ.value},t.Panner3D.prototype.orient=function(t,e,i,n){return this.orientX(t,n),this.orientY(e,n),this.orientZ(i,n),[this.panner.orientationX.value,this.panner.orientationY.value,this.panner.orientationZ.value]},t.Panner3D.prototype.orientX=function(t,e){var i=e||0;return"number"==typeof t?(this.panner.orientationX.value=t,this.panner.orientationX.cancelScheduledValues(this.ac.currentTime+.01+i),this.panner.orientationX.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.panner.orientationX),this.panner.orientationX.value},t.Panner3D.prototype.orientY=function(t,e){var i=e||0;return"number"==typeof t?(this.panner.orientationY.value=t,this.panner.orientationY.cancelScheduledValues(this.ac.currentTime+.01+i),this.panner.orientationY.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.panner.orientationY),this.panner.orientationY.value},t.Panner3D.prototype.orientZ=function(t,e){var i=e||0;return"number"==typeof t?(this.panner.orientationZ.value=t,this.panner.orientationZ.cancelScheduledValues(this.ac.currentTime+.01+i),this.panner.orientationZ.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.panner.orientationZ),this.panner.orientationZ.value},t.Panner3D.prototype.setFalloff=function(t,e){this.maxDist(t),this.rolloff(e)},t.Panner3D.prototype.maxDist=function(t){return"number"==typeof t&&(this.panner.maxDistance=t),this.panner.maxDistance},t.Panner3D.prototype.rolloff=function(t){return"number"==typeof t&&(this.panner.rolloffFactor=t),this.panner.rolloffFactor},t.Panner3D.dispose=function(){e.prototype.dispose.apply(this),this.panner.disconnect(),delete this.panner},t.Panner3D}(i,Z);var Q;Q=function(){var e=i;return t.Listener3D=function(t){this.ac=e.audiocontext,this.listener=this.ac.listener},t.Listener3D.prototype.process=function(t){t.connect(this.input)},t.Listener3D.prototype.position=function(t,e,i,n){return this.positionX(t,n),this.positionY(e,n),this.positionZ(i,n),[this.listener.positionX.value,this.listener.positionY.value,this.listener.positionZ.value]},t.Listener3D.prototype.positionX=function(t,e){var i=e||0;return"number"==typeof t?(this.listener.positionX.value=t,this.listener.positionX.cancelScheduledValues(this.ac.currentTime+.01+i),this.listener.positionX.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.listener.positionX),this.listener.positionX.value},t.Listener3D.prototype.positionY=function(t,e){var i=e||0;return"number"==typeof t?(this.listener.positionY.value=t,this.listener.positionY.cancelScheduledValues(this.ac.currentTime+.01+i),this.listener.positionY.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.listener.positionY),this.listener.positionY.value},t.Listener3D.prototype.positionZ=function(t,e){var i=e||0;return"number"==typeof t?(this.listener.positionZ.value=t,this.listener.positionZ.cancelScheduledValues(this.ac.currentTime+.01+i),this.listener.positionZ.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.listener.positionZ),this.listener.positionZ.value},t.Listener3D.prototype.orient=function(t,e,i,n,o,r,s){return 3===arguments.length||4===arguments.length?(s=arguments[3],this.orientForward(t,e,i,s)):(6===arguments.length||7===arguments)&&(this.orientForward(t,e,i),this.orientUp(n,o,r,s)),[this.listener.forwardX.value,this.listener.forwardY.value,this.listener.forwardZ.value,this.listener.upX.value,this.listener.upY.value,this.listener.upZ.value]},t.Listener3D.prototype.orientForward=function(t,e,i,n){return this.forwardX(t,n),this.forwardY(e,n),this.forwardZ(i,n),[this.listener.forwardX,this.listener.forwardY,this.listener.forwardZ]},t.Listener3D.prototype.orientUp=function(t,e,i,n){return this.upX(t,n),this.upY(e,n),this.upZ(i,n),[this.listener.upX,this.listener.upY,this.listener.upZ]},t.Listener3D.prototype.forwardX=function(t,e){var i=e||0;return"number"==typeof t?(this.listener.forwardX.value=t,this.listener.forwardX.cancelScheduledValues(this.ac.currentTime+.01+i),this.listener.forwardX.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.listener.forwardX),this.listener.forwardX.value},t.Listener3D.prototype.forwardY=function(t,e){var i=e||0;return"number"==typeof t?(this.listener.forwardY.value=t,this.listener.forwardY.cancelScheduledValues(this.ac.currentTime+.01+i),this.listener.forwardY.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.listener.forwardY),this.listener.forwardY.value},t.Listener3D.prototype.forwardZ=function(t,e){var i=e||0;return"number"==typeof t?(this.listener.forwardZ.value=t,this.listener.forwardZ.cancelScheduledValues(this.ac.currentTime+.01+i),this.listener.forwardZ.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.listener.forwardZ),this.listener.forwardZ.value},t.Listener3D.prototype.upX=function(t,e){var i=e||0;return"number"==typeof t?(this.listener.upX.value=t,this.listener.upX.cancelScheduledValues(this.ac.currentTime+.01+i),this.listener.upX.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.listener.upX),this.listener.upX.value},t.Listener3D.prototype.upY=function(t,e){var i=e||0;return"number"==typeof t?(this.listener.upY.value=t,this.listener.upY.cancelScheduledValues(this.ac.currentTime+.01+i),this.listener.upY.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.listener.upY),this.listener.upY.value},t.Listener3D.prototype.upZ=function(t,e){var i=e||0;return"number"==typeof t?(this.listener.upZ.value=t,this.listener.upZ.cancelScheduledValues(this.ac.currentTime+.01+i),this.listener.upZ.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.listener.upZ),this.listener.upZ.value},t.Listener3D}(i,Z);var H;H=function(){var e=X,i=Z;t.Delay=function(){i.call(this),this._split=this.ac.createChannelSplitter(2),this._merge=this.ac.createChannelMerger(2),this._leftGain=this.ac.createGain(),this._rightGain=this.ac.createGain(),this.leftDelay=this.ac.createDelay(),this.rightDelay=this.ac.createDelay(),this._leftFilter=new e,this._rightFilter=new e,this._leftFilter.disconnect(),this._rightFilter.disconnect(),this._leftFilter.biquad.frequency.setValueAtTime(1200,this.ac.currentTime),this._rightFilter.biquad.frequency.setValueAtTime(1200,this.ac.currentTime),this._leftFilter.biquad.Q.setValueAtTime(.3,this.ac.currentTime),this._rightFilter.biquad.Q.setValueAtTime(.3,this.ac.currentTime),this.input.connect(this._split),this.leftDelay.connect(this._leftGain),this.rightDelay.connect(this._rightGain),this._leftGain.connect(this._leftFilter.input),this._rightGain.connect(this._rightFilter.input),this._merge.connect(this.wet),this._leftFilter.biquad.gain.setValueAtTime(1,this.ac.currentTime),this._rightFilter.biquad.gain.setValueAtTime(1,this.ac.currentTime),this.setType(0),this._maxDelay=this.leftDelay.delayTime.maxValue,this.feedback(.5)},t.Delay.prototype=Object.create(i.prototype),t.Delay.prototype.process=function(t,e,i,n){var o=i||0,r=e||0;if(o>=1)throw new Error("Feedback value will force a positive feedback loop.");if(r>=this._maxDelay)throw new Error("Delay Time exceeds maximum delay time of "+this._maxDelay+" second.");t.connect(this.input),this.leftDelay.delayTime.setValueAtTime(r,this.ac.currentTime),this.rightDelay.delayTime.setValueAtTime(r,this.ac.currentTime),this._leftGain.gain.value=o,this._rightGain.gain.value=o,n&&(this._leftFilter.freq(n),this._rightFilter.freq(n))},t.Delay.prototype.delayTime=function(t){"number"!=typeof t?(t.connect(this.leftDelay.delayTime),t.connect(this.rightDelay.delayTime)):(this.leftDelay.delayTime.cancelScheduledValues(this.ac.currentTime),this.rightDelay.delayTime.cancelScheduledValues(this.ac.currentTime),this.leftDelay.delayTime.linearRampToValueAtTime(t,this.ac.currentTime),this.rightDelay.delayTime.linearRampToValueAtTime(t,this.ac.currentTime))},t.Delay.prototype.feedback=function(t){if(t&&"number"!=typeof t)t.connect(this._leftGain.gain),t.connect(this._rightGain.gain);else{if(t>=1)throw new Error("Feedback value will force a positive feedback loop.");"number"==typeof t&&(this._leftGain.gain.value=t,this._rightGain.gain.value=t)}return this._leftGain.gain.value},t.Delay.prototype.filter=function(t,e){this._leftFilter.set(t,e),this._rightFilter.set(t,e)},t.Delay.prototype.setType=function(t){switch(1===t&&(t="pingPong"),this._split.disconnect(),this._leftFilter.disconnect(),this._rightFilter.disconnect(),this._split.connect(this.leftDelay,0),this._split.connect(this.rightDelay,1),t){case"pingPong":this._rightFilter.setType(this._leftFilter.biquad.type),this._leftFilter.output.connect(this._merge,0,0),this._rightFilter.output.connect(this._merge,0,1),this._leftFilter.output.connect(this.rightDelay),this._rightFilter.output.connect(this.leftDelay);break;default:this._leftFilter.output.connect(this._merge,0,0),this._rightFilter.output.connect(this._merge,0,1),this._leftFilter.output.connect(this.leftDelay),this._rightFilter.output.connect(this.rightDelay)}},t.Delay.prototype.dispose=function(){i.prototype.dispose.apply(this),this._split.disconnect(),this._leftFilter.dispose(),this._rightFilter.dispose(),this._merge.disconnect(),this._leftGain.disconnect(),this._rightGain.disconnect(),this.leftDelay.disconnect(),this.rightDelay.disconnect(),this._split=void 0,this._leftFilter=void 0,this._rightFilter=void 0,this._merge=void 0,this._leftGain=void 0,this._rightGain=void 0,this.leftDelay=void 0,this.rightDelay=void 0}}(X,Z);var $;$=function(){var e=o,i=Z;t.Reverb=function(){i.call(this),this.convolverNode=this.ac.createConvolver(),this.input.gain.value=.5,this.input.connect(this.convolverNode),this.convolverNode.connect(this.wet),this._seconds=3,this._decay=2,this._reverse=!1,this._buildImpulse()},t.Reverb.prototype=Object.create(i.prototype),t.Reverb.prototype.process=function(t,e,i,n){t.connect(this.input);var o=!1;e&&(this._seconds=e,o=!0),i&&(this._decay=i),n&&(this._reverse=n),o&&this._buildImpulse()},t.Reverb.prototype.set=function(t,e,i){var n=!1;t&&(this._seconds=t,n=!0),e&&(this._decay=e),i&&(this._reverse=i),n&&this._buildImpulse()},t.Reverb.prototype._buildImpulse=function(){var t,e,i=this.ac.sampleRate,n=i*this._seconds,o=this._decay,r=this.ac.createBuffer(2,n,i),s=r.getChannelData(0),a=r.getChannelData(1);for(e=0;n>e;e++)t=this._reverse?n-e:e,s[e]=(2*Math.random()-1)*Math.pow(1-t/n,o),a[e]=(2*Math.random()-1)*Math.pow(1-t/n,o);this.convolverNode.buffer=r},t.Reverb.prototype.dispose=function(){i.prototype.dispose.apply(this),this.convolverNode&&(this.convolverNode.buffer=null,this.convolverNode=null)},t.Convolver=function(t,e,n){i.call(this),this.convolverNode=this.ac.createConvolver(),this.input.gain.value=.5,this.input.connect(this.convolverNode),this.convolverNode.connect(this.wet),t?(this.impulses=[],this._loadBuffer(t,e,n)):(this._seconds=3,this._decay=2,this._reverse=!1,this._buildImpulse())},t.Convolver.prototype=Object.create(t.Reverb.prototype),t.prototype.registerPreloadMethod("createConvolver",t.prototype),t.prototype.createConvolver=function(e,i,n){window.location.origin.indexOf("file://")>-1&&"undefined"===window.cordova&&alert("This sketch may require a server to load external files. Please see http://bit.ly/1qcInwS");var o=new t.Convolver(e,i,n);return o.impulses=[],o},t.Convolver.prototype._loadBuffer=function(i,n,o){var i=t.prototype._checkFileFormats(i),r=this,s=(new Error).stack,a=t.prototype.getAudioContext(),u=new XMLHttpRequest;u.open("GET",i,!0),u.responseType="arraybuffer",u.onload=function(){if(200===u.status)a.decodeAudioData(u.response,function(t){var e={},o=i.split("/");e.name=o[o.length-1],e.audioBuffer=t,r.impulses.push(e),r.convolverNode.buffer=e.audioBuffer,n&&n(e)},function(){var t=new e("decodeAudioData",s,r.url),i="AudioContext error at decodeAudioData for "+r.url;o?(t.msg=i,o(t)):console.error(i+"\n The error stack trace includes: \n"+t.stack)});else{var t=new e("loadConvolver",s,r.url),c="Unable to load "+r.url+". The request status was: "+u.status+" ("+u.statusText+")";o?(t.message=c,o(t)):console.error(c+"\n The error stack trace includes: \n"+t.stack)}},u.onerror=function(){var t=new e("loadConvolver",s,r.url),i="There was no response from the server at "+r.url+". Check the url and internet connectivity.";o?(t.message=i,o(t)):console.error(i+"\n The error stack trace includes: \n"+t.stack)},u.send()},t.Convolver.prototype.set=null,t.Convolver.prototype.process=function(t){t.connect(this.input)},t.Convolver.prototype.impulses=[],t.Convolver.prototype.addImpulse=function(t,e,i){window.location.origin.indexOf("file://")>-1&&"undefined"===window.cordova&&alert("This sketch may require a server to load external files. Please see http://bit.ly/1qcInwS"),this._loadBuffer(t,e,i)},t.Convolver.prototype.resetImpulse=function(t,e,i){window.location.origin.indexOf("file://")>-1&&"undefined"===window.cordova&&alert("This sketch may require a server to load external files. Please see http://bit.ly/1qcInwS"),this.impulses=[],this._loadBuffer(t,e,i)},t.Convolver.prototype.toggleImpulse=function(t){if("number"==typeof t&&tthis._nextTick&&this._state;){var s=this._state.getValueAtTime(this._nextTick);if(s!==this._lastState){this._lastState=s;var a=this._state.get(this._nextTick);s===t.State.Started?(this._nextTick=a.time,this.isUndef(a.offset)||(this.ticks=a.offset),this.emit("start",a.time,this.ticks)):s===t.State.Stopped?(this.ticks=0,this.emit("stop",a.time)):s===t.State.Paused&&this.emit("pause",a.time)}var u=this._nextTick;this.frequency&&(this._nextTick+=1/this.frequency.getValueAtTime(this._nextTick),s===t.State.Started&&(this.callback(u),this.ticks++))}},t.Clock.prototype.getStateAtTime=function(t){return t=this.toSeconds(t),this._state.getValueAtTime(t)},t.Clock.prototype.dispose=function(){t.Emitter.prototype.dispose.call(this),this.context.off("tick",this._boundLoop),this._writable("frequency"),this.frequency.dispose(),this.frequency=null,this._boundLoop=null,this._nextTick=1/0,this.callback=null,this._state.dispose(),this._state=null},t.Clock}(c,O,J,y);var tt;tt=function(){var e=i,n=K;t.Metro=function(){this.clock=new n({callback:this.ontick.bind(this)}),this.syncedParts=[],this.bpm=120,this._init(),this.prevTick=0,this.tatumTime=0,this.tickCallback=function(){}},t.Metro.prototype.ontick=function(t){var i=t-this.prevTick,n=t-e.audiocontext.currentTime;if(!(i-this.tatumTime<=-.02)){this.prevTick=t;var o=this;this.syncedParts.forEach(function(t){t.isPlaying&&(t.incrementStep(n),t.phrases.forEach(function(t){var e=t.sequence,i=o.metroTicks%e.length;0!==e[i]&&(o.metroTicks=t.parts.length?(t.scoreStep=0,t.onended()):(t.scoreStep=0,t.parts[t.currentPart-1].stop(),t.parts[t.currentPart].start())}var n=i,o=120;t.prototype.setBPM=function(t,e){o=t;for(var i in n.parts)n.parts[i]&&n.parts[i].setBPM(t,e)},t.Phrase=function(t,e,i){this.phraseStep=0,this.name=t,this.callback=e,this.sequence=i},t.Part=function(e,i){this.length=e||0,this.partStep=0,this.phrases=[],this.isPlaying=!1,this.noLoop(),this.tatums=i||.0625,this.metro=new t.Metro,this.metro._init(),this.metro.beatLength(this.tatums),this.metro.setBPM(o),n.parts.push(this),this.callback=function(){}},t.Part.prototype.setBPM=function(t,e){this.metro.setBPM(t,e)},t.Part.prototype.getBPM=function(){return this.metro.getBPM()},t.Part.prototype.start=function(t){if(!this.isPlaying){this.isPlaying=!0,this.metro.resetSync(this);var e=t||0;this.metro.start(e)}},t.Part.prototype.loop=function(t){this.looping=!0,this.onended=function(){this.partStep=0};var e=t||0;this.start(e)},t.Part.prototype.noLoop=function(){this.looping=!1,this.onended=function(){this.stop()}},t.Part.prototype.stop=function(t){this.partStep=0,this.pause(t)},t.Part.prototype.pause=function(t){this.isPlaying=!1;var e=t||0;this.metro.stop(e)},t.Part.prototype.addPhrase=function(e,i,n){var o;if(3===arguments.length)o=new t.Phrase(e,i,n);else{if(!(arguments[0]instanceof t.Phrase))throw"invalid input. addPhrase accepts name, callback, array or a p5.Phrase";o=arguments[0]}this.phrases.push(o),o.sequence.length>this.length&&(this.length=o.sequence.length)},t.Part.prototype.removePhrase=function(t){for(var e in this.phrases)this.phrases[e].name===t&&this.phrases.splice(e,1)},t.Part.prototype.getPhrase=function(t){for(var e in this.phrases)if(this.phrases[e].name===t)return this.phrases[e]},t.Part.prototype.replaceSequence=function(t,e){for(var i in this.phrases)this.phrases[i].name===t&&(this.phrases[i].sequence=e)},t.Part.prototype.incrementStep=function(t){this.partStep0&&o.iterations<=o.maxIterations&&o.callback(i)},frequency:this._calcFreq()})},t.SoundLoop.prototype.start=function(t){var i=t||0,n=e.audiocontext.currentTime; -this.isPlaying||(this.clock.start(n+i),this.isPlaying=!0)},t.SoundLoop.prototype.stop=function(t){var i=t||0,n=e.audiocontext.currentTime;this.isPlaying&&(this.clock.stop(n+i),this.isPlaying=!1)},t.SoundLoop.prototype.pause=function(t){var e=t||0;this.isPlaying&&(this.clock.pause(e),this.isPlaying=!1)},t.SoundLoop.prototype.syncedStart=function(t,i){var n=i||0,o=e.audiocontext.currentTime;if(t.isPlaying){if(t.isPlaying){var r=t.clock._nextTick-e.audiocontext.currentTime;this.clock.start(o+r),this.isPlaying=!0}}else t.clock.start(o+n),t.isPlaying=!0,this.clock.start(o+n),this.isPlaying=!0},t.SoundLoop.prototype._update=function(){this.clock.frequency.value=this._calcFreq()},t.SoundLoop.prototype._calcFreq=function(){return"number"==typeof this._interval?(this.musicalTimeMode=!1,1/this._interval):"string"==typeof this._interval?(this.musicalTimeMode=!0,this._bpm/60/this._convertNotation(this._interval)*(this._timeSignature/4)):void 0},t.SoundLoop.prototype._convertNotation=function(t){var e=t.slice(-1);switch(t=Number(t.slice(0,-1)),e){case"m":return this._measure(t);case"n":return this._note(t);default:console.warn("Specified interval is not formatted correctly. See Tone.js timing reference for more info: https://github.com/Tonejs/Tone.js/wiki/Time")}},t.SoundLoop.prototype._measure=function(t){return t*this._timeSignature},t.SoundLoop.prototype._note=function(t){return this._timeSignature/t},Object.defineProperty(t.SoundLoop.prototype,"bpm",{get:function(){return this._bpm},set:function(t){this.musicalTimeMode||console.warn('Changing the BPM in "seconds" mode has no effect. BPM is only relevant in musicalTimeMode when the interval is specified as a string ("2n", "4n", "1m"...etc)'),this._bpm=t,this._update()}}),Object.defineProperty(t.SoundLoop.prototype,"timeSignature",{get:function(){return this._timeSignature},set:function(t){this.musicalTimeMode||console.warn('Changing the timeSignature in "seconds" mode has no effect. BPM is only relevant in musicalTimeMode when the interval is specified as a string ("2n", "4n", "1m"...etc)'),this._timeSignature=t,this._update()}}),Object.defineProperty(t.SoundLoop.prototype,"interval",{get:function(){return this._interval},set:function(t){this.musicalTimeMode="Number"==typeof t?!1:!0,this._interval=t,this._update()}}),Object.defineProperty(t.SoundLoop.prototype,"iterations",{get:function(){return this.clock.ticks}}),t.SoundLoop}(i,K);var nt;nt=function(){"use strict";var e=Z;return t.Compressor=function(){e.call(this),this.compressor=this.ac.createDynamicsCompressor(),this.input.connect(this.compressor),this.compressor.connect(this.wet)},t.Compressor.prototype=Object.create(e.prototype),t.Compressor.prototype.process=function(t,e,i,n,o,r){t.connect(this.input),this.set(e,i,n,o,r)},t.Compressor.prototype.set=function(t,e,i,n,o){"undefined"!=typeof t&&this.attack(t),"undefined"!=typeof e&&this.knee(e),"undefined"!=typeof i&&this.ratio(i),"undefined"!=typeof n&&this.threshold(n),"undefined"!=typeof o&&this.release(o)},t.Compressor.prototype.attack=function(t,e){var i=e||0;return"number"==typeof t?(this.compressor.attack.value=t,this.compressor.attack.cancelScheduledValues(this.ac.currentTime+.01+i),this.compressor.attack.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):"undefined"!=typeof t&&t.connect(this.compressor.attack),this.compressor.attack.value},t.Compressor.prototype.knee=function(t,e){var i=e||0;return"number"==typeof t?(this.compressor.knee.value=t,this.compressor.knee.cancelScheduledValues(this.ac.currentTime+.01+i),this.compressor.knee.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):"undefined"!=typeof t&&t.connect(this.compressor.knee),this.compressor.knee.value},t.Compressor.prototype.ratio=function(t,e){var i=e||0;return"number"==typeof t?(this.compressor.ratio.value=t,this.compressor.ratio.cancelScheduledValues(this.ac.currentTime+.01+i),this.compressor.ratio.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):"undefined"!=typeof t&&t.connect(this.compressor.ratio),this.compressor.ratio.value},t.Compressor.prototype.threshold=function(t,e){var i=e||0;return"number"==typeof t?(this.compressor.threshold.value=t,this.compressor.threshold.cancelScheduledValues(this.ac.currentTime+.01+i),this.compressor.threshold.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):"undefined"!=typeof t&&t.connect(this.compressor.threshold),this.compressor.threshold.value},t.Compressor.prototype.release=function(t,e){var i=e||0;return"number"==typeof t?(this.compressor.release.value=t,this.compressor.release.cancelScheduledValues(this.ac.currentTime+.01+i),this.compressor.release.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):"undefined"!=typeof number&&t.connect(this.compressor.release),this.compressor.release.value},t.Compressor.prototype.reduction=function(){return this.compressor.reduction.value},t.Compressor.prototype.dispose=function(){e.prototype.dispose.apply(this),this.compressor.disconnect(),this.compressor=void 0},t.Compressor}(i,Z,o);var ot;ot=function(){function e(t,e){for(var i=t.length+e.length,n=new Float32Array(i),o=0,r=0;i>r;)n[r++]=t[o],n[r++]=e[o],o++;return n}function n(t,e,i){for(var n=i.length,o=0;n>o;o++)t.setUint8(e+o,i.charCodeAt(o))}var o=i,r=o.audiocontext;t.SoundRecorder=function(){this.input=r.createGain(),this.output=r.createGain(),this.recording=!1,this.bufferSize=1024,this._channels=2,this._clear(),this._jsNode=r.createScriptProcessor(this.bufferSize,this._channels,2),this._jsNode.onaudioprocess=this._audioprocess.bind(this),this._callback=function(){},this._jsNode.connect(t.soundOut._silentNode),this.setInput(),o.soundArray.push(this)},t.SoundRecorder.prototype.setInput=function(e){this.input.disconnect(),this.input=null,this.input=r.createGain(),this.input.connect(this._jsNode),this.input.connect(this.output),e?e.connect(this.input):t.soundOut.output.connect(this.input)},t.SoundRecorder.prototype.record=function(t,e,i){this.recording=!0,e&&(this.sampleLimit=Math.round(e*r.sampleRate)),t&&i?this._callback=function(){this.buffer=this._getBuffer(),t.setBuffer(this.buffer),i()}:t&&(this._callback=function(){this.buffer=this._getBuffer(),t.setBuffer(this.buffer)})},t.SoundRecorder.prototype.stop=function(){this.recording=!1,this._callback(),this._clear()},t.SoundRecorder.prototype._clear=function(){this._leftBuffers=[],this._rightBuffers=[],this.recordedSamples=0,this.sampleLimit=null},t.SoundRecorder.prototype._audioprocess=function(t){if(this.recording!==!1&&this.recording===!0)if(this.sampleLimit&&this.recordedSamples>=this.sampleLimit)this.stop();else{var e=t.inputBuffer.getChannelData(0),i=t.inputBuffer.getChannelData(1);this._leftBuffers.push(new Float32Array(e)),this._rightBuffers.push(new Float32Array(i)),this.recordedSamples+=this.bufferSize}},t.SoundRecorder.prototype._getBuffer=function(){var t=[];return t.push(this._mergeBuffers(this._leftBuffers)),t.push(this._mergeBuffers(this._rightBuffers)),t},t.SoundRecorder.prototype._mergeBuffers=function(t){for(var e=new Float32Array(this.recordedSamples),i=0,n=t.length,o=0;n>o;o++){var r=t[o];e.set(r,i),i+=r.length}return e},t.SoundRecorder.prototype.dispose=function(){this._clear();var t=o.soundArray.indexOf(this);o.soundArray.splice(t,1),this._callback=function(){},this.input&&this.input.disconnect(),this.input=null,this._jsNode=null},t.prototype.saveSound=function(i,o){var r,s;r=i.buffer.getChannelData(0),s=i.buffer.numberOfChannels>1?i.buffer.getChannelData(1):r;var a=e(r,s),u=new window.ArrayBuffer(44+2*a.length),c=new window.DataView(u);n(c,0,"RIFF"),c.setUint32(4,36+2*a.length,!0),n(c,8,"WAVE"),n(c,12,"fmt "),c.setUint32(16,16,!0),c.setUint16(20,1,!0),c.setUint16(22,2,!0),c.setUint32(24,44100,!0),c.setUint32(28,176400,!0),c.setUint16(32,4,!0),c.setUint16(34,16,!0),n(c,36,"data"),c.setUint32(40,2*a.length,!0);for(var p=a.length,h=44,l=1,f=0;p>f;f++)c.setInt16(h,a[f]*(32767*l),!0),h+=2;t.prototype.writeFile([c],o,"wav")}}(e,i);var rt;rt=function(){t.PeakDetect=function(t,e,i,n){this.framesPerPeak=n||20,this.framesSinceLastPeak=0,this.decayRate=.95,this.threshold=i||.35,this.cutoff=0,this.cutoffMult=1.5,this.energy=0,this.penergy=0,this.currentValue=0,this.isDetected=!1,this.f1=t||40,this.f2=e||2e4,this._onPeak=function(){}},t.PeakDetect.prototype.update=function(t){var e=this.energy=t.getEnergy(this.f1,this.f2)/255;e>this.cutoff&&e>this.threshold&&e-this.penergy>0?(this._onPeak(),this.isDetected=!0,this.cutoff=e*this.cutoffMult,this.framesSinceLastPeak=0):(this.isDetected=!1,this.framesSinceLastPeak<=this.framesPerPeak?this.framesSinceLastPeak++:(this.cutoff*=this.decayRate,this.cutoff=Math.max(this.cutoff,this.threshold))),this.currentValue=e,this.penergy=e},t.PeakDetect.prototype.onPeak=function(t,e){var i=this;i._onPeak=function(){t(i.energy,e)}}}();var st;st=function(){var e=i;t.Gain=function(){this.ac=e.audiocontext,this.input=this.ac.createGain(),this.output=this.ac.createGain(),this.input.gain.value=.5,this.input.connect(this.output),e.soundArray.push(this)},t.Gain.prototype.setInput=function(t){t.connect(this.input)},t.Gain.prototype.connect=function(e){var i=e||t.soundOut.input;this.output.connect(i.input?i.input:i)},t.Gain.prototype.disconnect=function(){this.output.disconnect()},t.Gain.prototype.amp=function(t,i,n){var i=i||0,n=n||0,o=e.audiocontext.currentTime,r=this.output.gain.value;this.output.gain.cancelScheduledValues(o),this.output.gain.linearRampToValueAtTime(r,o+n),this.output.gain.linearRampToValueAtTime(t,o+n+i)},t.Gain.prototype.dispose=function(){var t=e.soundArray.indexOf(this);e.soundArray.splice(t,1),this.output.disconnect(),this.input.disconnect(),this.output=void 0,this.input=void 0}}(i,e);var at;at=function(){"use strict";var e=i;t.MonoSynth=function(){this.context=e.audiocontext,this.output=this.context.createGain(),this.attack=.02,this.decay=.25,this.sustain=.05,this.release=.35,this.oscillator=new t.Oscillator,this.oscillator.start(),this.env=new t.Env,this.env.setADSR(this.attack,this.decay,this.sustain,this.release),this.env.setRange(1,0),this.env.setExp(!0),this.filter=new t.HighPass,this.filter.set(5,1),this.env.setInput(this.oscillator),this.env.connect(this.filter.input),this.filter.connect(this.output),this.output.connect(e.input),e.soundArray.push(this)},t.MonoSynth.prototype._setNote=function(e,i){var n=t.prototype.midiToFreq(e),o=i||0;this.oscillator.freq(n,0,o)},t.MonoSynth.prototype.play=function(t,e,i,n){this._setNote(t,i);var o=e||1;this.env.setRange(o,0),this.env.play(this.output,i,n)},t.MonoSynth.prototype.triggerAttack=function(t,e,i){this._setNote(t,i),this.env.ramp(this.output,i,vel)},t.MonoSynth.prototype.triggerRelease=function(t){this.env.ramp(this.output,t,0)},t.MonoSynth.prototype.setParams=function(t){},t.MonoSynth.prototype.setADSR=function(t,e,i,n){this.attack=t,this.decay=e,this.sustain=i,this.release=n,this.env.setADSR(this.attack,this.decay,this.sustain,this.release)},t.MonoSynth.prototype.connect=function(t){var i=t||e.input;this.output.connect(i.input?i.input:i)},t.MonoSynth.prototype.disconnect=function(){this.output.disconnect()},t.MonoSynth.prototype.dispose=function(){this.filter.dispose(),this.env.dispose();try{this.oscillator.dispose()}catch(t){console.error("mono synth default oscillator already disposed")}this.output.disconnect(),this.output=void 0}}(i,e);var ut;ut=function(){"use strict";var e=i;t.PolySynth=function(t){this.voices={},this.synthVoice=t,e.soundArray.push(this)},t.PolySynth.prototype.play=function(t,e,i,n){null==this.voices[t]&&(this.voices[t]=new this.synthVoice),this.voices[t].env.setRange(e,0),this.voices[t]._setNote(t),this.voices[t].play(t,e,i,n)},t.PolySynth.prototype.noteADSR=function(t,e,i,n,o){null==this.voices[t]&&(this.voices[t]=new this.synthVoice),this.voices[t]._setNote(t),this.voices[t].setADSR(e,i,n,o)},t.PolySynth.prototype.noteAttack=function(t,e,i){null==this.voices[t]&&(this.voices[t]=new this.synthVoice),this.voices[t]._setNote(t),this.voices[t].env.setRange(e,0),this.voices[t].triggerAttack(i)},t.PolySynth.prototype.noteRelease=function(t,e){null!=this.voices[t]&&(this.voices[t]._setNote(t),this.voices[t].triggerRelease(e),delete this.voices[t])},t.PolySynth.prototype.noteParams=function(t,e){null==this.voices[t]&&(this.voices[t]=new this.synthVoice),this.voices[t].setParams(e)}}(i,e);var ct;ct=function(){function e(t){for(var e,i="number"==typeof t?t:50,n=44100,o=new Float32Array(n),r=Math.PI/180,s=0;n>s;++s)e=2*s/n-1,o[s]=(3+i)*e*20*r/(Math.PI+i*Math.abs(e));return o}var i=Z;t.Distortion=function(n,o){if(i.call(this),"undefined"==typeof n&&(n=.25),"number"!=typeof n)throw new Error("amount must be a number");if("undefined"==typeof o&&(o="2x"),"string"!=typeof o)throw new Error("oversample must be a String");var r=t.prototype.map(n,0,1,0,2e3);this.waveShaperNode=this.ac.createWaveShaper(),this.amount=r,this.waveShaperNode.curve=e(r),this.waveShaperNode.oversample=o,this.input.connect(this.waveShaperNode),this.waveShaperNode.connect(this.wet)},t.Distortion.prototype=Object.create(i.prototype),t.Distortion.prototype.process=function(t,e,i){t.connect(this.input),this.set(e,i)},t.Distortion.prototype.set=function(i,n){if(i){var o=t.prototype.map(i,0,1,0,2e3);this.amount=o,this.waveShaperNode.curve=e(o)}n&&(this.waveShaperNode.oversample=n)},t.Distortion.prototype.getAmount=function(){return this.amount},t.Distortion.prototype.getOversample=function(){return this.waveShaperNode.oversample},t.Distortion.prototype.dispose=function(){i.prototype.dispose.apply(this),this.waveShaperNode.disconnect(),this.waveShaperNode=null}}(Z);var pt;pt=function(){var t=e;return t}(e,i,n,o,r,s,a,u,A,P,F,q,M,V,X,z,W,Q,H,$,tt,et,it,nt,ot,rt,st,at,ut,ct)}); \ No newline at end of file +!function(t,e){"function"==typeof define&&define.amd?define("p5.sound",["p5"],function(t){e(t)}):e("object"==typeof exports?require("../p5"):t.p5)}(this,function(t){var e;e=function(){!function(){function t(t){t&&(t.setTargetAtTime||(t.setTargetAtTime=t.setTargetValueAtTime))}window.hasOwnProperty("webkitAudioContext")&&!window.hasOwnProperty("AudioContext")&&(window.AudioContext=window.webkitAudioContext,"function"!=typeof AudioContext.prototype.createGain&&(AudioContext.prototype.createGain=AudioContext.prototype.createGainNode),"function"!=typeof AudioContext.prototype.createDelay&&(AudioContext.prototype.createDelay=AudioContext.prototype.createDelayNode),"function"!=typeof AudioContext.prototype.createScriptProcessor&&(AudioContext.prototype.createScriptProcessor=AudioContext.prototype.createJavaScriptNode),"function"!=typeof AudioContext.prototype.createPeriodicWave&&(AudioContext.prototype.createPeriodicWave=AudioContext.prototype.createWaveTable),AudioContext.prototype.internal_createGain=AudioContext.prototype.createGain,AudioContext.prototype.createGain=function(){var e=this.internal_createGain();return t(e.gain),e},AudioContext.prototype.internal_createDelay=AudioContext.prototype.createDelay,AudioContext.prototype.createDelay=function(e){var i=e?this.internal_createDelay(e):this.internal_createDelay();return t(i.delayTime),i},AudioContext.prototype.internal_createBufferSource=AudioContext.prototype.createBufferSource,AudioContext.prototype.createBufferSource=function(){var e=this.internal_createBufferSource();return e.start?(e.internal_start=e.start,e.start=function(t,i,n){"undefined"!=typeof n?e.internal_start(t||0,i,n):e.internal_start(t||0,i||0)}):e.start=function(t,e,i){e||i?this.noteGrainOn(t||0,e,i):this.noteOn(t||0)},e.stop?(e.internal_stop=e.stop,e.stop=function(t){e.internal_stop(t||0)}):e.stop=function(t){this.noteOff(t||0)},t(e.playbackRate),e},AudioContext.prototype.internal_createDynamicsCompressor=AudioContext.prototype.createDynamicsCompressor,AudioContext.prototype.createDynamicsCompressor=function(){var e=this.internal_createDynamicsCompressor();return t(e.threshold),t(e.knee),t(e.ratio),t(e.reduction),t(e.attack),t(e.release),e},AudioContext.prototype.internal_createBiquadFilter=AudioContext.prototype.createBiquadFilter,AudioContext.prototype.createBiquadFilter=function(){var e=this.internal_createBiquadFilter();return t(e.frequency),t(e.detune),t(e.Q),t(e.gain),e},"function"!=typeof AudioContext.prototype.createOscillator&&(AudioContext.prototype.internal_createOscillator=AudioContext.prototype.createOscillator,AudioContext.prototype.createOscillator=function(){var e=this.internal_createOscillator();return e.start?(e.internal_start=e.start,e.start=function(t){e.internal_start(t||0)}):e.start=function(t){this.noteOn(t||0)},e.stop?(e.internal_stop=e.stop,e.stop=function(t){e.internal_stop(t||0)}):e.stop=function(t){this.noteOff(t||0)},e.setPeriodicWave||(e.setPeriodicWave=e.setWaveTable),t(e.frequency),t(e.detune),e})),window.hasOwnProperty("webkitOfflineAudioContext")&&!window.hasOwnProperty("OfflineAudioContext")&&(window.OfflineAudioContext=window.webkitOfflineAudioContext)}(window);var e=new window.AudioContext;t.prototype.getAudioContext=function(){return e},navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;var i=document.createElement("audio");t.prototype.isSupported=function(){return!!i.canPlayType};var n=function(){return!!i.canPlayType&&i.canPlayType('audio/ogg; codecs="vorbis"')},o=function(){return!!i.canPlayType&&i.canPlayType("audio/mpeg;")},r=function(){return!!i.canPlayType&&i.canPlayType('audio/wav; codecs="1"')},s=function(){return!!i.canPlayType&&(i.canPlayType("audio/x-m4a;")||i.canPlayType("audio/aac;"))},a=function(){return!!i.canPlayType&&i.canPlayType("audio/x-aiff;")};t.prototype.isFileSupported=function(t){switch(t.toLowerCase()){case"mp3":return o();case"wav":return r();case"ogg":return n();case"aac":case"m4a":case"mp4":return s();case"aif":case"aiff":return a();default:return!1}};var u=navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1;if(u){var p=!1,c=function(){if(!p){var t=e.createBuffer(1,1,22050),i=e.createBufferSource();i.buffer=t,i.connect(e.destination),i.start(0),console.log("start ios!"),"running"===e.state&&(p=!0)}};document.addEventListener("touchend",c,!1),document.addEventListener("touchstart",c,!1)}}();var i;i=function(){var e=function(){var e=t.prototype.getAudioContext();this.input=e.createGain(),this.output=e.createGain(),this.limiter=e.createDynamicsCompressor(),this.limiter.threshold.value=0,this.limiter.ratio.value=20,this.audiocontext=e,this.output.disconnect(),this.inputSources=[],this.input.connect(this.limiter),this.limiter.connect(this.output),this.meter=e.createGain(),this.fftMeter=e.createGain(),this.output.connect(this.meter),this.output.connect(this.fftMeter),this.output.connect(this.audiocontext.destination),this.soundArray=[],this.parts=[],this.extensions=[]},i=new e;return t.prototype.getMasterVolume=function(){return i.output.gain.value},t.prototype.masterVolume=function(t,e,n){if("number"==typeof t){var e=e||0,n=n||0,o=i.audiocontext.currentTime,r=i.output.gain.value;i.output.gain.cancelScheduledValues(o+n),i.output.gain.linearRampToValueAtTime(r,o+n),i.output.gain.linearRampToValueAtTime(t,o+n+e)}else{if(!t)return i.output.gain;t.connect(i.output.gain)}},t.prototype.soundOut=t.soundOut=i,t.soundOut._silentNode=i.audiocontext.createGain(),t.soundOut._silentNode.gain.value=0,t.soundOut._silentNode.connect(i.audiocontext.destination),i}();var n;n=function(){var e=i;return t.prototype.sampleRate=function(){return e.audiocontext.sampleRate},t.prototype.freqToMidi=function(t){var e=Math.log(t/440)/Math.log(2),i=Math.round(12*e)+69;return i},t.prototype.midiToFreq=function(t){return 440*Math.pow(2,(t-69)/12)},t.prototype.soundFormats=function(){e.extensions=[];for(var t=0;t-1))throw arguments[t]+" is not a valid sound format!";e.extensions.push(arguments[t])}},t.prototype.disposeSound=function(){for(var t=0;t-1)if(t.prototype.isFileSupported(o))n=n;else for(var r=n.split("."),s=r[r.length-1],a=0;a1?(this.splitter=n.createChannelSplitter(2),this.input.connect(this.splitter),this.splitter.connect(this.left,1),this.splitter.connect(this.right,0)):(this.input.connect(this.left),this.input.connect(this.right)),this.output=n.createChannelMerger(2),this.left.connect(this.output,0,1),this.right.connect(this.output,0,0),this.output.connect(e)},t.Panner.prototype.pan=function(t,e){var i=e||0,o=n.currentTime+i,r=(t+1)/2,s=Math.cos(r*Math.PI/2),a=Math.sin(r*Math.PI/2);this.left.gain.linearRampToValueAtTime(a,o),this.right.gain.linearRampToValueAtTime(s,o)},t.Panner.prototype.inputChannels=function(t){1===t?(this.input.disconnect(),this.input.connect(this.left),this.input.connect(this.right)):2===t&&(this.splitter=n.createChannelSplitter(2),this.input.disconnect(),this.input.connect(this.splitter),this.splitter.connect(this.left,1),this.splitter.connect(this.right,0))},t.Panner.prototype.connect=function(t){this.output.connect(t)},t.Panner.prototype.disconnect=function(){this.output.disconnect()})}(i);var s;s=function(){function e(t,e){for(var i={},n=t.length,o=0;n>o;o++){if(t[o]>e){var r=t[o],s=new d(r,o);i[o]=s,o+=6e3}o++}return i}function r(t){for(var e=[],i=Object.keys(t).sort(),n=0;no;o++){var r=t[i[n]],s=t[i[n+o]];if(r&&s){var a=r.sampleIndex,u=s.sampleIndex,p=u-a;p>0&&r.intervals.push(p);var c=e.some(function(t){return t.interval===p?(t.count++,t):void 0});c||e.push({interval:p,count:1})}}return e}function s(t,e){var i=[];return t.forEach(function(t){try{var n=Math.abs(60/(t.interval/e));n=u(n);var o=i.some(function(e){return e.tempo===n?e.count+=t.count:void 0});if(!o){if(isNaN(n))return;i.push({tempo:Math.round(n),count:t.count})}}catch(r){throw r}}),i}function a(t,e,i,n){for(var o=[],r=Object.keys(t).sort(),s=0;s.01?!0:void 0})}function u(t){if(isFinite(t)&&0!==t){for(;90>t;)t*=2;for(;t>180&&t>90;)t/=2;return t}}var p=o,c=i,h=c.audiocontext,l=n.midiToFreq;t.SoundFile=function(e,i,n,o){if("undefined"!=typeof e){if("string"==typeof e||"string"==typeof e[0]){var r=t.prototype._checkFileFormats(e);this.url=r}else if("object"==typeof e&&!(window.File&&window.FileReader&&window.FileList&&window.Blob))throw"Unable to load file because the File API is not supported";e.file&&(e=e.file),this.file=e}this._onended=function(){},this._looping=!1,this._playing=!1,this._paused=!1,this._pauseTime=0,this._cues=[],this._lastPos=0,this._counterNode=null,this._scopeNode=null,this.bufferSourceNodes=[],this.bufferSourceNode=null,this.buffer=null,this.playbackRate=1,this.input=c.audiocontext.createGain(),this.output=c.audiocontext.createGain(),this.reversed=!1,this.startTime=0,this.endTime=null,this.pauseTime=0,this.mode="sustain",this.startMillis=null,this.panPosition=0,this.panner=new t.Panner(this.output,c.input,2),(this.url||this.file)&&this.load(i,n),c.soundArray.push(this),"function"==typeof o?this._whileLoading=o:this._whileLoading=function(){}},t.prototype.registerPreloadMethod("loadSound",t.prototype),t.prototype.loadSound=function(e,i,n,o){window.location.origin.indexOf("file://")>-1&&"undefined"===window.cordova&&window.alert("This sketch may require a server to load external files. Please see http://bit.ly/1qcInwS");var r=this,s=new t.SoundFile(e,function(){"function"==typeof i&&i.apply(r,arguments),r._decrementPreload()},n,o);return s},t.SoundFile.prototype.load=function(t,e){var i=this,n=(new Error).stack;if(void 0!==this.url&&""!==this.url){var o=new XMLHttpRequest;o.addEventListener("progress",function(t){i._updateProgress(t)},!1),o.open("GET",this.url,!0),o.responseType="arraybuffer",o.onload=function(){if(200===o.status)h.decodeAudioData(o.response,function(e){i.buffer=e,i.panner.inputChannels(e.numberOfChannels),t&&t(i)},function(){var t=new p("decodeAudioData",n,i.url),o="AudioContext error at decodeAudioData for "+i.url;e?(t.msg=o,e(t)):console.error(o+"\n The error stack trace includes: \n"+t.stack)});else{var r=new p("loadSound",n,i.url),s="Unable to load "+i.url+". The request status was: "+o.status+" ("+o.statusText+")";e?(r.message=s,e(r)):console.error(s+"\n The error stack trace includes: \n"+r.stack)}},o.onerror=function(){var t=new p("loadSound",n,i.url),o="There was no response from the server at "+i.url+". Check the url and internet connectivity.";e?(t.message=o,e(t)):console.error(o+"\n The error stack trace includes: \n"+t.stack)},o.send()}else if(void 0!==this.file){var r=new FileReader;r.onload=function(){h.decodeAudioData(r.result,function(e){i.buffer=e,i.panner.inputChannels(e.numberOfChannels),t&&t(i)})},r.onerror=function(t){onerror&&onerror(t)},r.readAsArrayBuffer(this.file)}},t.SoundFile.prototype._updateProgress=function(t){if(t.lengthComputable){var e=t.loaded/t.total*.99;this._whileLoading(e,t)}else this._whileLoading("size unknown")},t.SoundFile.prototype.isLoaded=function(){return this.buffer?!0:!1},t.SoundFile.prototype.play=function(t,e,i,n,o){var r,s,a=this,u=c.audiocontext.currentTime,p=t||0;if(0>p&&(p=0),p+=u,this.rate(e),this.setVolume(i),!this.buffer)throw"not ready to play file, buffer has yet to load. Try preload()";if(this._pauseTime=0,"restart"===this.mode&&this.buffer&&this.bufferSourceNode&&(this.bufferSourceNode.stop(p),this._counterNode.stop(p)),this.bufferSourceNode=this._initSourceNode(),this._counterNode&&(this._counterNode=void 0),this._counterNode=this._initCounterNode(),n){if(!(n>=0&&nt&&!this.reversed){var e=this.currentTime(),i=(e-this.duration())/t;this.pauseTime=i,this.reverseBuffer(),t=Math.abs(t)}else t>0&&this.reversed&&this.reverseBuffer();if(this.bufferSourceNode){var n=c.audiocontext.currentTime;this.bufferSourceNode.playbackRate.cancelScheduledValues(n),this.bufferSourceNode.playbackRate.linearRampToValueAtTime(Math.abs(t),n),this._counterNode.playbackRate.cancelScheduledValues(n),this._counterNode.playbackRate.linearRampToValueAtTime(Math.abs(t),n)}return this.playbackRate=t,this.playbackRate},t.SoundFile.prototype.setPitch=function(t){var e=l(t)/l(60);this.rate(e)},t.SoundFile.prototype.getPlaybackRate=function(){return this.playbackRate},t.SoundFile.prototype.duration=function(){return this.buffer?this.buffer.duration:0},t.SoundFile.prototype.currentTime=function(){return this._pauseTime>0?this._pauseTime:this._lastPos/h.sampleRate},t.SoundFile.prototype.jump=function(t,e){if(0>t||t>this.buffer.duration)throw"jump time out of range";if(e>this.buffer.duration-t)throw"end time out of range";var i=t||0,n=e||this.buffer.duration-t;this.isPlaying()&&this.stop(),this.play(0,this.playbackRate,this.output.gain.value,i,n)},t.SoundFile.prototype.channels=function(){return this.buffer.numberOfChannels},t.SoundFile.prototype.sampleRate=function(){return this.buffer.sampleRate},t.SoundFile.prototype.frames=function(){return this.buffer.length},t.SoundFile.prototype.getPeaks=function(t){if(!this.buffer)throw"Cannot load peaks yet, buffer is not loaded";if(t||(t=5*window.width),this.buffer){for(var e=this.buffer,i=e.length/t,n=~~(i/10)||1,o=e.numberOfChannels,r=new Float32Array(Math.round(t)),s=0;o>s;s++)for(var a=e.getChannelData(s),u=0;t>u;u++){for(var p=~~(u*i),c=~~(p+i),h=0,l=p;c>l;l+=n){var f=a[l];f>h?h=f:-f>h&&(h=f)}(0===s||Math.abs(h)>r[u])&&(r[u]=h)}return r}},t.SoundFile.prototype.reverseBuffer=function(){var t=this.getVolume();if(this.setVolume(0,.01,0),!this.buffer)throw"SoundFile is not done loading";for(var e=0;eo;o++){var r=n.getChannelData(o);r.set(t[o])}this.buffer=n,this.panner.inputChannels(e)};var f=function(t){for(var e=new Float32Array(t.length),i=h.createBuffer(1,t.length,44100),n=0;n=d);var u=r(h),p=s(u,n.sampleRate),c=p.sort(function(t,e){return e.count-t.count}).splice(0,5);this.tempo=c[0].tempo;var l=5,y=a(h,c[0].tempo,n.sampleRate,l);t(y)}};var d=function(t,e){this.sampleIndex=e,this.amplitude=t,this.tempos=[],this.intervals=[]},m=function(t,e,i,n){this.callback=t,this.time=e,this.id=i,this.val=n};t.SoundFile.prototype.addCue=function(t,e,i){var n=this._cueIDCounter++,o=new m(e,t,n,i);return this._cues.push(o),n},t.SoundFile.prototype.removeCue=function(t){for(var e=this._cues.length,i=0;e>i;i++){var n=this._cues[i];n.id===t&&this.cues.splice(i,1)}0===this._cues.length},t.SoundFile.prototype.clearCues=function(){this._cues=[]},t.SoundFile.prototype._onTimeUpdate=function(t){for(var e=t/this.buffer.sampleRate,i=this._cues.length,n=0;i>n;n++){var o=this._cues[n],r=o.time,s=o.val;this._prevTime=r&&o.callback(s)}this._prevTime=e}}(e,o,i,n);var a;a=function(){var e=i;t.Amplitude=function(t){this.bufferSize=2048,this.audiocontext=e.audiocontext,this.processor=this.audiocontext.createScriptProcessor(this.bufferSize,2,1),this.input=this.processor,this.output=this.audiocontext.createGain(),this.smoothing=t||0,this.volume=0,this.average=0,this.stereoVol=[0,0],this.stereoAvg=[0,0],this.stereoVolNorm=[0,0],this.volMax=.001,this.normalize=!1,this.processor.onaudioprocess=this._audioProcess.bind(this),this.processor.connect(this.output),this.output.gain.value=0,this.output.connect(this.audiocontext.destination),e.meter.connect(this.processor),e.soundArray.push(this)},t.Amplitude.prototype.setInput=function(i,n){e.meter.disconnect(),n&&(this.smoothing=n),null==i?(console.log("Amplitude input source is not ready! Connecting to master output instead"),e.meter.connect(this.processor)):i instanceof t.Signal?i.output.connect(this.processor):i?(i.connect(this.processor),this.processor.disconnect(),this.processor.connect(this.output)):e.meter.connect(this.processor)},t.Amplitude.prototype.connect=function(t){t?t.hasOwnProperty("input")?this.output.connect(t.input):this.output.connect(t):this.output.connect(this.panner.connect(e.input))},t.Amplitude.prototype.disconnect=function(){this.output.disconnect()},t.Amplitude.prototype._audioProcess=function(t){for(var e=0;ea;a++)i=n[a],this.normalize?(r+=Math.max(Math.min(i/this.volMax,1),-1),s+=Math.max(Math.min(i/this.volMax,1),-1)*Math.max(Math.min(i/this.volMax,1),-1)):(r+=i,s+=i*i);var u=r/o,p=Math.sqrt(s/o);this.stereoVol[e]=Math.max(p,this.stereoVol[e]*this.smoothing),this.stereoAvg[e]=Math.max(u,this.stereoVol[e]*this.smoothing),this.volMax=Math.max(this.stereoVol[e],this.volMax)}var c=this,h=this.stereoVol.reduce(function(t,e,i){return c.stereoVolNorm[i-1]=Math.max(Math.min(c.stereoVol[i-1]/c.volMax,1),0),c.stereoVolNorm[i]=Math.max(Math.min(c.stereoVol[i]/c.volMax,1),0),t+e});this.volume=h/this.stereoVol.length,this.volNorm=Math.max(Math.min(this.volume/this.volMax,1),0)},t.Amplitude.prototype.getLevel=function(t){return"undefined"!=typeof t?this.normalize?this.stereoVolNorm[t]:this.stereoVol[t]:this.normalize?this.volNorm:this.volume},t.Amplitude.prototype.toggleNormalize=function(t){"boolean"==typeof t?this.normalize=t:this.normalize=!this.normalize},t.Amplitude.prototype.smooth=function(t){t>=0&&1>t?this.smoothing=t:console.log("Error: smoothing must be between 0 and 1")},t.Amplitude.prototype.dispose=function(){var t=e.soundArray.indexOf(this);e.soundArray.splice(t,1),this.input.disconnect(),this.output.disconnect(),this.input=this.processor=void 0,this.output=void 0}}(i);var u;u=function(){var e=i;t.FFT=function(t,i){this.input=this.analyser=e.audiocontext.createAnalyser(),Object.defineProperties(this,{bins:{get:function(){return this.analyser.fftSize/2},set:function(t){this.analyser.fftSize=2*t},configurable:!0,enumerable:!0},smoothing:{get:function(){return this.analyser.smoothingTimeConstant},set:function(t){this.analyser.smoothingTimeConstant=t},configurable:!0,enumerable:!0}}),this.smooth(t),this.bins=i||1024,e.fftMeter.connect(this.analyser),this.freqDomain=new Uint8Array(this.analyser.frequencyBinCount),this.timeDomain=new Uint8Array(this.analyser.frequencyBinCount),this.bass=[20,140],this.lowMid=[140,400],this.mid=[400,2600],this.highMid=[2600,5200],this.treble=[5200,14e3],e.soundArray.push(this)},t.FFT.prototype.setInput=function(t){t?(t.output?t.output.connect(this.analyser):t.connect&&t.connect(this.analyser),e.fftMeter.disconnect()):e.fftMeter.connect(this.analyser)},t.FFT.prototype.waveform=function(){for(var e,i,n,o=0;oi){var o=i;i=t,t=o}for(var r=Math.round(t/n*this.freqDomain.length),s=Math.round(i/n*this.freqDomain.length),a=0,u=0,p=r;s>=p;p++)a+=this.freqDomain[p],u+=1;var c=a/u;return c}throw"invalid input for getEnergy()"}var h=Math.round(t/n*this.freqDomain.length);return this.freqDomain[h]},t.FFT.prototype.getFreq=function(t,e){console.log("getFreq() is deprecated. Please use getEnergy() instead.");var i=this.getEnergy(t,e);return i},t.FFT.prototype.getCentroid=function(){for(var t=e.audiocontext.sampleRate/2,i=0,n=0,o=0;os;s++)o[r]=void 0!==o[r]?(o[r]+e[s])/2:e[s],s%n===n-1&&r++;return o},t.FFT.prototype.logAverages=function(t){for(var i=e.audiocontext.sampleRate/2,n=this.freqDomain,o=n.length,r=new Array(t.length),s=0,a=0;o>a;a++){var u=Math.round(a*i/this.freqDomain.length);u>t[s].hi&&s++,r[s]=void 0!==r[s]?(r[s]+n[a])/2:n[a]}return r},t.FFT.prototype.getOctaveBands=function(t,i){var t=t||3,i=i||15.625,n=[],o={lo:i/Math.pow(2,1/(2*t)),ctr:i,hi:i*Math.pow(2,1/(2*t))};n.push(o);for(var r=e.audiocontext.sampleRate/2;o.hi1&&(this.input=new Array(t)),this.isUndef(e)||1===e?this.output=this.context.createGain():e>1&&(this.output=new Array(t))};t.prototype.set=function(e,i,n){if(this.isObject(e))n=i;else if(this.isString(e)){var o={};o[e]=i,e=o}t:for(var r in e){i=e[r];var s=this;if(-1!==r.indexOf(".")){for(var a=r.split("."),u=0;u1)for(var t=arguments[0],e=1;e0)for(var t=this,e=0;e0)for(var t=0;te;e++){var n=e/(i-1)*2-1;this._curve[e]=t(n,e)}return this._shaper.curve=this._curve,this},Object.defineProperty(t.WaveShaper.prototype,"curve",{get:function(){return this._shaper.curve},set:function(t){this._curve=new Float32Array(t),this._shaper.curve=this._curve}}),Object.defineProperty(t.WaveShaper.prototype,"oversample",{get:function(){return this._shaper.oversample},set:function(t){if(-1===["none","2x","4x"].indexOf(t))throw new RangeError("Tone.WaveShaper: oversampling must be either 'none', '2x', or '4x'");this._shaper.oversample=t}}),t.WaveShaper.prototype.dispose=function(){return t.prototype.dispose.call(this),this._shaper.disconnect(),this._shaper=null,this._curve=null,this},t.WaveShaper}(p);var l;l=function(t){return t.TimeBase=function(e,i){if(!(this instanceof t.TimeBase))return new t.TimeBase(e,i);if(this._expr=this._noOp,e instanceof t.TimeBase)this.copy(e);else if(!this.isUndef(i)||this.isNumber(e)){i=this.defaultArg(i,this._defaultUnits);var n=this._primaryExpressions[i].method;this._expr=n.bind(this,e)}else this.isString(e)?this.set(e):this.isUndef(e)&&(this._expr=this._defaultExpr())},t.extend(t.TimeBase),t.TimeBase.prototype.set=function(t){return this._expr=this._parseExprString(t),this},t.TimeBase.prototype.clone=function(){var t=new this.constructor;return t.copy(this),t},t.TimeBase.prototype.copy=function(t){var e=t._expr();return this.set(e)},t.TimeBase.prototype._primaryExpressions={n:{regexp:/^(\d+)n/i,method:function(t){return t=parseInt(t),1===t?this._beatsToUnits(this._timeSignature()):this._beatsToUnits(4/t)}},t:{regexp:/^(\d+)t/i,method:function(t){return t=parseInt(t),this._beatsToUnits(8/(3*parseInt(t)))}},m:{regexp:/^(\d+)m/i,method:function(t){return this._beatsToUnits(parseInt(t)*this._timeSignature())}},i:{regexp:/^(\d+)i/i,method:function(t){return this._ticksToUnits(parseInt(t))}},hz:{regexp:/^(\d+(?:\.\d+)?)hz/i,method:function(t){return this._frequencyToUnits(parseFloat(t))}},tr:{regexp:/^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?):?(\d+(?:\.\d+)?)?/,method:function(t,e,i){var n=0;return t&&"0"!==t&&(n+=this._beatsToUnits(this._timeSignature()*parseFloat(t))),e&&"0"!==e&&(n+=this._beatsToUnits(parseFloat(e))),i&&"0"!==i&&(n+=this._beatsToUnits(parseFloat(i)/4)),n}},s:{regexp:/^(\d+(?:\.\d+)?s)/,method:function(t){return this._secondsToUnits(parseFloat(t))}},samples:{regexp:/^(\d+)samples/,method:function(t){return parseInt(t)/this.context.sampleRate}},"default":{regexp:/^(\d+(?:\.\d+)?)/,method:function(t){return this._primaryExpressions[this._defaultUnits].method.call(this,t)}}},t.TimeBase.prototype._binaryExpressions={"+":{regexp:/^\+/,precedence:2,method:function(t,e){return t()+e()}},"-":{regexp:/^\-/,precedence:2,method:function(t,e){return t()-e()}},"*":{regexp:/^\*/,precedence:1,method:function(t,e){return t()*e()}},"/":{regexp:/^\//,precedence:1,method:function(t,e){return t()/e()}}},t.TimeBase.prototype._unaryExpressions={neg:{regexp:/^\-/,method:function(t){return-t()}}},t.TimeBase.prototype._syntaxGlue={"(":{regexp:/^\(/},")":{regexp:/^\)/}},t.TimeBase.prototype._tokenize=function(t){function e(t,e){for(var i=["_binaryExpressions","_unaryExpressions","_primaryExpressions","_syntaxGlue"],n=0;n0;){t=t.trim();var o=e(t,this);n.push(o),t=t.substr(o.value.length)}return{next:function(){return n[++i]},peek:function(){return n[i+1]}}},t.TimeBase.prototype._matchGroup=function(t,e,i){var n=!1;if(!this.isUndef(t))for(var o in e){var r=e[o];if(r.regexp.test(t.value)){if(this.isUndef(i))return r;if(r.precedence===i)return r}}return n},t.TimeBase.prototype._parseBinary=function(t,e){this.isUndef(e)&&(e=2);var i;i=0>e?this._parseUnary(t):this._parseBinary(t,e-1);for(var n=t.peek();n&&this._matchGroup(n,this._binaryExpressions,e);)n=t.next(),i=n.method.bind(this,i,this._parseBinary(t,e-1)),n=t.peek();return i},t.TimeBase.prototype._parseUnary=function(t){var e,i;e=t.peek();var n=this._matchGroup(e,this._unaryExpressions);return n?(e=t.next(),i=this._parseUnary(t),n.method.bind(this,i)):this._parsePrimary(t)},t.TimeBase.prototype._parsePrimary=function(t){var e,i;if(e=t.peek(),this.isUndef(e))throw new SyntaxError("Tone.TimeBase: Unexpected end of expression");if(this._matchGroup(e,this._primaryExpressions)){e=t.next();var n=e.value.match(e.regexp);return e.method.bind(this,n[1],n[2],n[3])}if(e&&"("===e.value){if(t.next(),i=this._parseBinary(t),e=t.next(),!e||")"!==e.value)throw new SyntaxError("Expected )");return i}throw new SyntaxError("Tone.TimeBase: Cannot process token "+e.value)},t.TimeBase.prototype._parseExprString=function(t){this.isString(t)||(t=t.toString());var e=this._tokenize(t),i=this._parseBinary(e);return i},t.TimeBase.prototype._noOp=function(){return 0},t.TimeBase.prototype._defaultExpr=function(){return this._noOp},t.TimeBase.prototype._defaultUnits="s",t.TimeBase.prototype._frequencyToUnits=function(t){return 1/t},t.TimeBase.prototype._beatsToUnits=function(e){return 60/t.Transport.bpm.value*e},t.TimeBase.prototype._secondsToUnits=function(t){return t},t.TimeBase.prototype._ticksToUnits=function(e){return e*(this._beatsToUnits(1)/t.Transport.PPQ)},t.TimeBase.prototype._timeSignature=function(){return t.Transport.timeSignature},t.TimeBase.prototype._pushExpr=function(e,i,n){return e instanceof t.TimeBase||(e=new this.constructor(e,n)),this._expr=this._binaryExpressions[i].method.bind(this,this._expr,e._expr),this},t.TimeBase.prototype.add=function(t,e){return this._pushExpr(t,"+",e)},t.TimeBase.prototype.sub=function(t,e){return this._pushExpr(t,"-",e)},t.TimeBase.prototype.mult=function(t,e){return this._pushExpr(t,"*",e)},t.TimeBase.prototype.div=function(t,e){return this._pushExpr(t,"/",e)},t.TimeBase.prototype.valueOf=function(){return this._expr()},t.TimeBase.prototype.dispose=function(){this._expr=null},t.TimeBase}(p);var f;f=function(t){return t.Time=function(e,i){return this instanceof t.Time?(this._plusNow=!1,void t.TimeBase.call(this,e,i)):new t.Time(e,i)},t.extend(t.Time,t.TimeBase),t.Time.prototype._unaryExpressions=Object.create(t.TimeBase.prototype._unaryExpressions),t.Time.prototype._unaryExpressions.quantize={regexp:/^@/,method:function(e){return t.Transport.nextSubdivision(e())}},t.Time.prototype._unaryExpressions.now={regexp:/^\+/,method:function(t){return this._plusNow=!0,t()}},t.Time.prototype.quantize=function(t,e){return e=this.defaultArg(e,1),this._expr=function(t,e,i){t=t(),e=e.toSeconds();var n=Math.round(t/e),o=n*e,r=o-t;return t+r*i}.bind(this,this._expr,new this.constructor(t),e),this},t.Time.prototype.addNow=function(){return this._plusNow=!0,this},t.Time.prototype._defaultExpr=function(){return this._plusNow=!0,this._noOp},t.Time.prototype.copy=function(e){return t.TimeBase.prototype.copy.call(this,e),this._plusNow=e._plusNow,this},t.Time.prototype.toNotation=function(){var t=this.toSeconds(),e=["1m","2n","4n","8n","16n","32n","64n","128n"],i=this._toNotationHelper(t,e),n=["1m","2n","2t","4n","4t","8n","8t","16n","16t","32n","32t","64n","64t","128n"],o=this._toNotationHelper(t,n);return o.split("+").length1-s%1&&(s+=a),s=Math.floor(s),s>0){if(n+=1===s?e[o]:s.toString()+"*"+e[o],t-=s*r,i>t)break;n+=" + "}}return""===n&&(n="0"),n},t.Time.prototype._notationToUnits=function(t){for(var e=this._primaryExpressions,i=[e.n,e.t,e.m],n=0;n3&&(n=parseFloat(n).toFixed(3));var o=[i,e,n];return o.join(":")},t.Time.prototype.toTicks=function(){var e=this._beatsToUnits(1),i=this.valueOf()/e;return Math.floor(i*t.Transport.PPQ)},t.Time.prototype.toSamples=function(){return this.toSeconds()*this.context.sampleRate},t.Time.prototype.toFrequency=function(){return 1/this.toSeconds()},t.Time.prototype.toSeconds=function(){return this.valueOf()},t.Time.prototype.toMilliseconds=function(){return 1e3*this.toSeconds()},t.Time.prototype.valueOf=function(){var t=this._expr();return t+(this._plusNow?this.now():0)},t.Time}(p);var d;d=function(t){t.Frequency=function(e,i){return this instanceof t.Frequency?void t.TimeBase.call(this,e,i):new t.Frequency(e,i)},t.extend(t.Frequency,t.TimeBase),t.Frequency.prototype._primaryExpressions=Object.create(t.TimeBase.prototype._primaryExpressions),t.Frequency.prototype._primaryExpressions.midi={regexp:/^(\d+(?:\.\d+)?midi)/,method:function(t){return this.midiToFrequency(t)}},t.Frequency.prototype._primaryExpressions.note={regexp:/^([a-g]{1}(?:b|#|x|bb)?)(-?[0-9]+)/i,method:function(t,i){var n=e[t.toLowerCase()],o=n+12*(parseInt(i)+1);return this.midiToFrequency(o)}},t.Frequency.prototype._primaryExpressions.tr={regexp:/^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?):?(\d+(?:\.\d+)?)?/,method:function(t,e,i){var n=1;return t&&"0"!==t&&(n*=this._beatsToUnits(this._timeSignature()*parseFloat(t))),e&&"0"!==e&&(n*=this._beatsToUnits(parseFloat(e))),i&&"0"!==i&&(n*=this._beatsToUnits(parseFloat(i)/4)),n}},t.Frequency.prototype.transpose=function(t){return this._expr=function(t,e){var i=t();return i*this.intervalToFrequencyRatio(e)}.bind(this,this._expr,t),this},t.Frequency.prototype.harmonize=function(t){return this._expr=function(t,e){for(var i=t(),n=[],o=0;or&&(o+=-12*r);var s=i[o%12];return s+r.toString()},t.Frequency.prototype.toSeconds=function(){return 1/this.valueOf()},t.Frequency.prototype.toFrequency=function(){return this.valueOf()},t.Frequency.prototype.toTicks=function(){var e=this._beatsToUnits(1),i=this.valueOf()/e;return Math.floor(i*t.Transport.PPQ)},t.Frequency.prototype._frequencyToUnits=function(t){return t},t.Frequency.prototype._ticksToUnits=function(e){return 1/(60*e/(t.Transport.bpm.value*t.Transport.PPQ))},t.Frequency.prototype._beatsToUnits=function(e){return 1/t.TimeBase.prototype._beatsToUnits.call(this,e)},t.Frequency.prototype._secondsToUnits=function(t){return 1/t},t.Frequency.prototype._defaultUnits="hz";var e={cbb:-2,cb:-1,c:0,"c#":1,cx:2,dbb:0,db:1,d:2,"d#":3,dx:4,ebb:2,eb:3,e:4,"e#":5,ex:6,fbb:3,fb:4,f:5,"f#":6,fx:7,gbb:5,gb:6,g:7,"g#":8,gx:9,abb:7,ab:8,a:9,"a#":10,ax:11,bbb:9,bb:10,b:11,"b#":12,bx:13},i=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"];return t.Frequency.A4=440,t.Frequency.prototype.midiToFrequency=function(e){return t.Frequency.A4*Math.pow(2,(e-69)/12)},t.Frequency.prototype.frequencyToMidi=function(e){return 69+12*Math.log(e/t.Frequency.A4)/Math.LN2},t.Frequency}(p);var m;m=function(t){return t.TransportTime=function(e,i){return this instanceof t.TransportTime?void t.Time.call(this,e,i):new t.TransportTime(e,i)},t.extend(t.TransportTime,t.Time),t.TransportTime.prototype._unaryExpressions=Object.create(t.Time.prototype._unaryExpressions),t.TransportTime.prototype._unaryExpressions.quantize={regexp:/^@/,method:function(e){var i=this._secondsToTicks(e()),n=Math.ceil(t.Transport.ticks/i);return this._ticksToUnits(n*i)}},t.TransportTime.prototype._secondsToTicks=function(e){var i=this._beatsToUnits(1),n=e/i;return Math.round(n*t.Transport.PPQ)},t.TransportTime.prototype.valueOf=function(){var e=this._secondsToTicks(this._expr());return e+(this._plusNow?t.Transport.ticks:0)},t.TransportTime.prototype.toTicks=function(){return this.valueOf()},t.TransportTime.prototype.toSeconds=function(){var e=this._expr();return e+(this._plusNow?t.Transport.seconds:0)},t.TransportTime.prototype.toFrequency=function(){return 1/this.toSeconds()},t.TransportTime}(p);var y;y=function(t){"use strict";return t.Emitter=function(){this._events={}},t.extend(t.Emitter),t.Emitter.prototype.on=function(t,e){for(var i=t.split(/\W+/),n=0;nn;n++)i[n].apply(this,e)}return this},t.Emitter.mixin=function(e){var i=["on","off","emit"];e._events={};for(var n=0;n1&&(this.input=new Array(e)),1===i?this.output=new t.Gain:i>1&&(this.output=new Array(e))},t.Gain}(p,_);var b;b=function(t){"use strict";return t.Signal=function(){var e=this.optionsObject(arguments,["value","units"],t.Signal.defaults);this.output=this._gain=this.context.createGain(),e.param=this._gain.gain,t.Param.call(this,e),this.input=this._param=this._gain.gain,this.context.getConstant(1).chain(this._gain)},t.extend(t.Signal,t.Param),t.Signal.defaults={value:0,units:t.Type.Default,convert:!0},t.Signal.prototype.connect=t.SignalBase.prototype.connect,t.Signal.prototype.dispose=function(){return t.Param.prototype.dispose.call(this),this._param=null,this._gain.disconnect(),this._gain=null,this},t.Signal}(p,h,g,_);var x;x=function(t){"use strict";return t.Add=function(e){this.createInsOuts(2,0),this._sum=this.input[0]=this.input[1]=this.output=new t.Gain,this._param=this.input[1]=new t.Signal(e),this._param.connect(this._sum)},t.extend(t.Add,t.Signal),t.Add.prototype.dispose=function(){return t.prototype.dispose.call(this),this._sum.dispose(),this._sum=null,this._param.dispose(),this._param=null,this},t.Add}(p,b);var S;S=function(t){"use strict";return t.Multiply=function(e){this.createInsOuts(2,0),this._mult=this.input[0]=this.output=new t.Gain,this._param=this.input[1]=this.output.gain,this._param.value=this.defaultArg(e,0)},t.extend(t.Multiply,t.Signal),t.Multiply.prototype.dispose=function(){return t.prototype.dispose.call(this),this._mult.dispose(),this._mult=null,this._param=null,this},t.Multiply}(p,b);var w;w=function(t){"use strict";return t.Scale=function(e,i){this._outputMin=this.defaultArg(e,0),this._outputMax=this.defaultArg(i,1),this._scale=this.input=new t.Multiply(1),this._add=this.output=new t.Add(0),this._scale.connect(this._add),this._setRange()},t.extend(t.Scale,t.SignalBase),Object.defineProperty(t.Scale.prototype,"min",{get:function(){return this._outputMin},set:function(t){this._outputMin=t,this._setRange()}}),Object.defineProperty(t.Scale.prototype,"max",{get:function(){return this._outputMax},set:function(t){this._outputMax=t,this._setRange()}}),t.Scale.prototype._setRange=function(){this._add.value=this._outputMin,this._scale.value=this._outputMax-this._outputMin},t.Scale.prototype.dispose=function(){return t.prototype.dispose.call(this),this._add.dispose(),this._add=null,this._scale.dispose(),this._scale=null,this},t.Scale}(p,x,S);var A;A=function(){var e=b,n=x,o=S,r=w,s=p,a=i;s.setContext(a.audiocontext),t.Signal=function(t){var i=new e(t);return i},e.prototype.fade=e.prototype.linearRampToValueAtTime,o.prototype.fade=e.prototype.fade,n.prototype.fade=e.prototype.fade,r.prototype.fade=e.prototype.fade,e.prototype.setInput=function(t){t.connect(this)},o.prototype.setInput=e.prototype.setInput,n.prototype.setInput=e.prototype.setInput,r.prototype.setInput=e.prototype.setInput,e.prototype.add=function(t){var e=new n(t);return this.connect(e),e},o.prototype.add=e.prototype.add,n.prototype.add=e.prototype.add,r.prototype.add=e.prototype.add,e.prototype.mult=function(t){var e=new o(t);return this.connect(e),e},o.prototype.mult=e.prototype.mult,n.prototype.mult=e.prototype.mult,r.prototype.mult=e.prototype.mult,e.prototype.scale=function(e,i,n,o){var s,a;4===arguments.length?(s=t.prototype.map(n,e,i,0,1)-.5,a=t.prototype.map(o,e,i,0,1)-.5):(s=arguments[0],a=arguments[1]);var u=new r(s,a);return this.connect(u),u},o.prototype.scale=e.prototype.scale,n.prototype.scale=e.prototype.scale,r.prototype.scale=e.prototype.scale}(b,x,S,w,p,i);var P;P=function(){var e=i,n=x,o=S,r=w;t.Oscillator=function(i,n){if("string"==typeof i){var o=n;n=i,i=o}if("number"==typeof n){var o=n;n=i,i=o}this.started=!1,this.phaseAmount=void 0,this.oscillator=e.audiocontext.createOscillator(),this.f=i||440,this.oscillator.type=n||"sine",this.oscillator.frequency.setValueAtTime(this.f,e.audiocontext.currentTime),this.output=e.audiocontext.createGain(),this._freqMods=[],this.output.gain.value=.5,this.output.gain.setValueAtTime(.5,e.audiocontext.currentTime),this.oscillator.connect(this.output),this.panPosition=0,this.connection=e.input,this.panner=new t.Panner(this.output,this.connection,1),this.mathOps=[this.output],e.soundArray.push(this)},t.Oscillator.prototype.start=function(t,i){if(this.started){var n=e.audiocontext.currentTime;this.stop(n)}if(!this.started){var o=i||this.f,r=this.oscillator.type;this.oscillator&&(this.oscillator.disconnect(),this.oscillator=void 0),this.oscillator=e.audiocontext.createOscillator(),this.oscillator.frequency.value=Math.abs(o),this.oscillator.type=r,this.oscillator.connect(this.output),t=t||0,this.oscillator.start(t+e.audiocontext.currentTime),this.freqNode=this.oscillator.frequency;for(var s in this._freqMods)"undefined"!=typeof this._freqMods[s].connect&&this._freqMods[s].connect(this.oscillator.frequency); +this.started=!0}},t.Oscillator.prototype.stop=function(t){if(this.started){var i=t||0,n=e.audiocontext.currentTime;this.oscillator.stop(i+n),this.started=!1}},t.Oscillator.prototype.amp=function(t,i,n){var o=this;if("number"==typeof t){var i=i||0,n=n||0,r=e.audiocontext.currentTime;this.output.gain.linearRampToValueAtTime(t,r+n+i)}else{if(!t)return this.output.gain;t.connect(o.output.gain)}},t.Oscillator.prototype.fade=t.Oscillator.prototype.amp,t.Oscillator.prototype.getAmp=function(){return this.output.gain.value},t.Oscillator.prototype.freq=function(t,i,n){if("number"!=typeof t||isNaN(t)){if(!t)return this.oscillator.frequency;t.output&&(t=t.output),t.connect(this.oscillator.frequency),this._freqMods.push(t)}else{this.f=t;var o=e.audiocontext.currentTime,i=i||0,n=n||0;0===i?(this.oscillator.frequency.cancelScheduledValues(o),this.oscillator.frequency.setValueAtTime(t,n+o)):t>0?this.oscillator.frequency.exponentialRampToValueAtTime(t,n+i+o):this.oscillator.frequency.linearRampToValueAtTime(t,n+i+o),this.phaseAmount&&this.phase(this.phaseAmount)}},t.Oscillator.prototype.getFreq=function(){return this.oscillator.frequency.value},t.Oscillator.prototype.setType=function(t){this.oscillator.type=t},t.Oscillator.prototype.getType=function(){return this.oscillator.type},t.Oscillator.prototype.connect=function(t){t?t.hasOwnProperty("input")?(this.panner.connect(t.input),this.connection=t.input):(this.panner.connect(t),this.connection=t):this.panner.connect(e.input)},t.Oscillator.prototype.disconnect=function(){this.output.disconnect(),this.panner.disconnect(),this.output.connect(this.panner),this.oscMods=[]},t.Oscillator.prototype.pan=function(t,e){this.panPosition=t,this.panner.pan(t,e)},t.Oscillator.prototype.getPan=function(){return this.panPosition},t.Oscillator.prototype.dispose=function(){var t=e.soundArray.indexOf(this);if(e.soundArray.splice(t,1),this.oscillator){var i=e.audiocontext.currentTime;this.stop(i),this.disconnect(),this.panner=null,this.oscillator=null}this.osc2&&this.osc2.dispose()},t.Oscillator.prototype.phase=function(i){var n=t.prototype.map(i,0,1,0,1/this.f),o=e.audiocontext.currentTime;this.phaseAmount=i,this.dNode||(this.dNode=e.audiocontext.createDelay(),this.oscillator.disconnect(),this.oscillator.connect(this.dNode),this.dNode.connect(this.output)),this.dNode.delayTime.setValueAtTime(n,o)};var s=function(t,e,i,n,o){var r=t.oscillator;for(var s in t.mathOps)t.mathOps[s]instanceof o&&(r.disconnect(),t.mathOps[s].dispose(),i=s,i0&&(r=t.mathOps[s-1]),r.disconnect(),r.connect(e),e.connect(n),t.mathOps[i]=e,t};t.Oscillator.prototype.add=function(t){var e=new n(t),i=this.mathOps.length-1,o=this.output;return s(this,e,i,o,n)},t.Oscillator.prototype.mult=function(t){var e=new o(t),i=this.mathOps.length-1,n=this.output;return s(this,e,i,n,o)},t.Oscillator.prototype.scale=function(e,i,n,o){var a,u;4===arguments.length?(a=t.prototype.map(n,e,i,0,1)-.5,u=t.prototype.map(o,e,i,0,1)-.5):(a=arguments[0],u=arguments[1]);var p=new r(a,u),c=this.mathOps.length-1,h=this.output;return s(this,p,c,h,r)},t.SinOsc=function(e){t.Oscillator.call(this,e,"sine")},t.SinOsc.prototype=Object.create(t.Oscillator.prototype),t.TriOsc=function(e){t.Oscillator.call(this,e,"triangle")},t.TriOsc.prototype=Object.create(t.Oscillator.prototype),t.SawOsc=function(e){t.Oscillator.call(this,e,"sawtooth")},t.SawOsc.prototype=Object.create(t.Oscillator.prototype),t.SqrOsc=function(e){t.Oscillator.call(this,e,"square")},t.SqrOsc.prototype=Object.create(t.Oscillator.prototype)}(i,x,S,w);var k;k=function(t){"use strict";return t.Timeline=function(){var e=this.optionsObject(arguments,["memory"],t.Timeline.defaults);this._timeline=[],this._toRemove=[],this._iterating=!1,this.memory=e.memory},t.extend(t.Timeline),t.Timeline.defaults={memory:1/0},Object.defineProperty(t.Timeline.prototype,"length",{get:function(){return this._timeline.length}}),t.Timeline.prototype.add=function(t){if(this.isUndef(t.time))throw new Error("Tone.Timeline: events must have a time attribute");if(this._timeline.length){var e=this._search(t.time);this._timeline.splice(e+1,0,t)}else this._timeline.push(t);if(this.length>this.memory){var i=this.length-this.memory;this._timeline.splice(0,i)}return this},t.Timeline.prototype.remove=function(t){if(this._iterating)this._toRemove.push(t);else{var e=this._timeline.indexOf(t);-1!==e&&this._timeline.splice(e,1)}return this},t.Timeline.prototype.get=function(t){var e=this._search(t);return-1!==e?this._timeline[e]:null},t.Timeline.prototype.peek=function(){return this._timeline[0]},t.Timeline.prototype.shift=function(){return this._timeline.shift()},t.Timeline.prototype.getAfter=function(t){var e=this._search(t);return e+10&&this._timeline[e-1].time=0?this._timeline[i-1]:null},t.Timeline.prototype.cancel=function(t){if(this._timeline.length>1){var e=this._search(t);if(e>=0)if(this._timeline[e].time===t){for(var i=e;i>=0&&this._timeline[i].time===t;i--)e=i;this._timeline=this._timeline.slice(0,e)}else this._timeline=this._timeline.slice(0,e+1);else this._timeline=[]}else 1===this._timeline.length&&this._timeline[0].time>=t&&(this._timeline=[]);return this},t.Timeline.prototype.cancelBefore=function(t){if(this._timeline.length){var e=this._search(t);e>=0&&(this._timeline=this._timeline.slice(e+1))}return this},t.Timeline.prototype._search=function(t){var e=0,i=this._timeline.length,n=i;if(i>0&&this._timeline[i-1].time<=t)return i-1;for(;n>e;){var o=Math.floor(e+(n-e)/2),r=this._timeline[o],s=this._timeline[o+1];if(r.time===t){for(var a=o;at)return o;r.time>t?n=o:r.time=n;n++)t(this._timeline[n]);if(this._iterating=!1,this._toRemove.length>0){for(var o=0;o=0&&this._timeline[i].time>=t;)i--;return this._iterate(e,i+1),this},t.Timeline.prototype.forEachAtTime=function(t,e){var i=this._search(t);return-1!==i&&this._iterate(function(i){i.time===t&&e(i)},0,i),this},t.Timeline.prototype.dispose=function(){t.prototype.dispose.call(this),this._timeline=null,this._toRemove=null},t.Timeline}(p);var O;O=function(t){"use strict";return t.TimelineSignal=function(){var e=this.optionsObject(arguments,["value","units"],t.Signal.defaults);this._events=new t.Timeline(10),t.Signal.apply(this,e),e.param=this._param,t.Param.call(this,e),this._initial=this._fromUnits(this._param.value)},t.extend(t.TimelineSignal,t.Param),t.TimelineSignal.Type={Linear:"linear",Exponential:"exponential",Target:"target",Curve:"curve",Set:"set"},Object.defineProperty(t.TimelineSignal.prototype,"value",{get:function(){var t=this.now(),e=this.getValueAtTime(t);return this._toUnits(e)},set:function(t){var e=this._fromUnits(t);this._initial=e,this.cancelScheduledValues(),this._param.value=e}}),t.TimelineSignal.prototype.setValueAtTime=function(e,i){return e=this._fromUnits(e),i=this.toSeconds(i),this._events.add({type:t.TimelineSignal.Type.Set,value:e,time:i}),this._param.setValueAtTime(e,i),this},t.TimelineSignal.prototype.linearRampToValueAtTime=function(e,i){return e=this._fromUnits(e),i=this.toSeconds(i),this._events.add({type:t.TimelineSignal.Type.Linear,value:e,time:i}),this._param.linearRampToValueAtTime(e,i),this},t.TimelineSignal.prototype.exponentialRampToValueAtTime=function(e,i){i=this.toSeconds(i);var n=this._searchBefore(i);n&&0===n.value&&this.setValueAtTime(this._minOutput,n.time),e=this._fromUnits(e);var o=Math.max(e,this._minOutput);return this._events.add({type:t.TimelineSignal.Type.Exponential,value:o,time:i}),ee)this.cancelScheduledValues(e),this.linearRampToValueAtTime(i,e);else{var o=this._searchAfter(e);o&&(this.cancelScheduledValues(e),o.type===t.TimelineSignal.Type.Linear?this.linearRampToValueAtTime(i,e):o.type===t.TimelineSignal.Type.Exponential&&this.exponentialRampToValueAtTime(i,e)),this.setValueAtTime(i,e)}return this},t.TimelineSignal.prototype.linearRampToValueBetween=function(t,e,i){return this.setRampPoint(e),this.linearRampToValueAtTime(t,i),this},t.TimelineSignal.prototype.exponentialRampToValueBetween=function(t,e,i){return this.setRampPoint(e),this.exponentialRampToValueAtTime(t,i),this},t.TimelineSignal.prototype._searchBefore=function(t){return this._events.get(t)},t.TimelineSignal.prototype._searchAfter=function(t){return this._events.getAfter(t)},t.TimelineSignal.prototype.getValueAtTime=function(e){e=this.toSeconds(e);var i=this._searchAfter(e),n=this._searchBefore(e),o=this._initial;if(null===n)o=this._initial;else if(n.type===t.TimelineSignal.Type.Target){var r,s=this._events.getBefore(n.time);r=null===s?this._initial:s.value,o=this._exponentialApproach(n.time,r,n.value,n.constant,e)}else o=n.type===t.TimelineSignal.Type.Curve?this._curveInterpolate(n.time,n.value,n.duration,e):null===i?n.value:i.type===t.TimelineSignal.Type.Linear?this._linearInterpolate(n.time,n.value,i.time,i.value,e):i.type===t.TimelineSignal.Type.Exponential?this._exponentialInterpolate(n.time,n.value,i.time,i.value,e):n.value;return o},t.TimelineSignal.prototype.connect=t.SignalBase.prototype.connect,t.TimelineSignal.prototype._exponentialApproach=function(t,e,i,n,o){return i+(e-i)*Math.exp(-(o-t)/n)},t.TimelineSignal.prototype._linearInterpolate=function(t,e,i,n,o){return e+(n-e)*((o-t)/(i-t))},t.TimelineSignal.prototype._exponentialInterpolate=function(t,e,i,n,o){return e=Math.max(this._minOutput,e),e*Math.pow(n/e,(o-t)/(i-t))},t.TimelineSignal.prototype._curveInterpolate=function(t,e,i,n){var o=e.length;if(n>=t+i)return e[o-1];if(t>=n)return e[0];var r=(n-t)/i,s=Math.floor((o-1)*r),a=Math.ceil((o-1)*r),u=e[s],p=e[a];return a===s?u:this._linearInterpolate(s,u,a,p,r*(o-1))},t.TimelineSignal.prototype.dispose=function(){t.Signal.prototype.dispose.call(this),t.Param.prototype.dispose.call(this),this._events.dispose(),this._events=null},t.TimelineSignal}(p,b);var F;F=function(){var e=i,n=x,o=S,r=w,s=O,a=p;a.setContext(e.audiocontext),t.Env=function(t,i,n,o,r,a){this.aTime=t||.1,this.aLevel=i||1,this.dTime=n||.5,this.dLevel=o||0,this.rTime=r||0,this.rLevel=a||0,this._rampHighPercentage=.98,this._rampLowPercentage=.02,this.output=e.audiocontext.createGain(),this.control=new s,this._init(),this.control.connect(this.output),this.connection=null,this.mathOps=[this.control],this.isExponential=!1,this.sourceToClear=null,this.wasTriggered=!1,e.soundArray.push(this)},t.Env.prototype._init=function(){var t=e.audiocontext.currentTime,i=t;this.control.setTargetAtTime(1e-5,i,.001),this._setRampAD(this.aTime,this.dTime)},t.Env.prototype.set=function(t,e,i,n,o,r){this.aTime=t,this.aLevel=e,this.dTime=i||0,this.dLevel=n||0,this.rTime=o||0,this.rLevel=r||0,this._setRampAD(t,i)},t.Env.prototype.setADSR=function(t,e,i,n){this.aTime=t,this.dTime=e||0,this.sPercent=i||0,this.dLevel="undefined"!=typeof i?i*(this.aLevel-this.rLevel)+this.rLevel:0,this.rTime=n||0,this._setRampAD(t,e)},t.Env.prototype.setRange=function(t,e){this.aLevel=t||1,this.rLevel=e||0},t.Env.prototype._setRampAD=function(t,e){this._rampAttackTime=this.checkExpInput(t),this._rampDecayTime=this.checkExpInput(e);var i=1;i=Math.log(1/this.checkExpInput(1-this._rampHighPercentage)),this._rampAttackTC=t/this.checkExpInput(i),i=Math.log(1/this._rampLowPercentage),this._rampDecayTC=e/this.checkExpInput(i)},t.Env.prototype.setRampPercentages=function(t,e){this._rampHighPercentage=this.checkExpInput(t),this._rampLowPercentage=this.checkExpInput(e);var i=1;i=Math.log(1/this.checkExpInput(1-this._rampHighPercentage)),this._rampAttackTC=this._rampAttackTime/this.checkExpInput(i),i=Math.log(1/this._rampLowPercentage),this._rampDecayTC=this._rampDecayTime/this.checkExpInput(i)},t.Env.prototype.setInput=function(){for(var t=0;t=t&&(t=1e-8),t},t.Env.prototype.play=function(t,e,i){var n=e||0,i=i||0;t&&this.connection!==t&&this.connect(t),this.triggerAttack(t,n),this.triggerRelease(t,n+this.aTime+this.dTime+i)},t.Env.prototype.triggerAttack=function(t,i){var n=e.audiocontext.currentTime,o=i||0,r=n+o;this.lastAttack=r,this.wasTriggered=!0,t&&this.connection!==t&&this.connect(t);var s=this.control.getValueAtTime(r);this.control.cancelScheduledValues(r),this.isExponential===!0?this.control.exponentialRampToValueAtTime(this.checkExpInput(s),r):this.control.linearRampToValueAtTime(s,r),r+=this.aTime,this.isExponential===!0?(this.control.exponentialRampToValueAtTime(this.checkExpInput(this.aLevel),r),s=this.checkExpInput(this.control.getValueAtTime(r)),this.control.cancelScheduledValues(r),this.control.exponentialRampToValueAtTime(s,r)):(this.control.linearRampToValueAtTime(this.aLevel,r),s=this.control.getValueAtTime(r),this.control.cancelScheduledValues(r),this.control.linearRampToValueAtTime(s,r)),r+=this.dTime,this.isExponential===!0?(this.control.exponentialRampToValueAtTime(this.checkExpInput(this.dLevel),r),s=this.checkExpInput(this.control.getValueAtTime(r)),this.control.cancelScheduledValues(r),this.control.exponentialRampToValueAtTime(s,r)):(this.control.linearRampToValueAtTime(this.dLevel,r),s=this.control.getValueAtTime(r),this.control.cancelScheduledValues(r),this.control.linearRampToValueAtTime(s,r))},t.Env.prototype.triggerRelease=function(t,i){if(this.wasTriggered){var n=e.audiocontext.currentTime,o=i||0,r=n+o;t&&this.connection!==t&&this.connect(t);var s=this.control.getValueAtTime(r);this.control.cancelScheduledValues(r),this.isExponential===!0?this.control.exponentialRampToValueAtTime(this.checkExpInput(s),r):this.control.linearRampToValueAtTime(s,r),r+=this.rTime,this.isExponential===!0?(this.control.exponentialRampToValueAtTime(this.checkExpInput(this.rLevel),r),s=this.checkExpInput(this.control.getValueAtTime(r)),this.control.cancelScheduledValues(r),this.control.exponentialRampToValueAtTime(s,r)):(this.control.linearRampToValueAtTime(this.rLevel,r),s=this.control.getValueAtTime(r),this.control.cancelScheduledValues(r),this.control.linearRampToValueAtTime(s,r)),this.wasTriggered=!1}},t.Env.prototype.ramp=function(t,i,n,o){var r=e.audiocontext.currentTime,s=i||0,a=r+s,u=this.checkExpInput(n),p="undefined"!=typeof o?this.checkExpInput(o):void 0;t&&this.connection!==t&&this.connect(t);var c=this.checkExpInput(this.control.getValueAtTime(a));this.control.cancelScheduledValues(a),u>c?(this.control.setTargetAtTime(u,a,this._rampAttackTC),a+=this._rampAttackTime):c>u&&(this.control.setTargetAtTime(u,a,this._rampDecayTC),a+=this._rampDecayTime),void 0!==p&&(p>u?this.control.setTargetAtTime(p,a,this._rampAttackTC):u>p&&this.control.setTargetAtTime(p,a,this._rampDecayTC))},t.Env.prototype.connect=function(i){this.connection=i,(i instanceof t.Oscillator||i instanceof t.SoundFile||i instanceof t.AudioIn||i instanceof t.Reverb||i instanceof t.Noise||i instanceof t.Filter||i instanceof t.Delay)&&(i=i.output.gain),i instanceof AudioParam&&i.setValueAtTime(0,e.audiocontext.currentTime),i instanceof t.Signal&&i.setValue(0),this.output.connect(i)},t.Env.prototype.disconnect=function(){this.output.disconnect()},t.Env.prototype.add=function(e){var i=new n(e),o=this.mathOps.length,r=this.output;return t.prototype._mathChain(this,i,o,r,n)},t.Env.prototype.mult=function(e){var i=new o(e),n=this.mathOps.length,r=this.output;return t.prototype._mathChain(this,i,n,r,o)},t.Env.prototype.scale=function(e,i,n,o){var s=new r(e,i,n,o),a=this.mathOps.length,u=this.output;return t.prototype._mathChain(this,s,a,u,r)},t.Env.prototype.dispose=function(){var t=e.soundArray.indexOf(this);e.soundArray.splice(t,1),this.disconnect();try{this.control.dispose(),this.control=null}catch(i){console.warn(i,"already disposed p5.Env")}for(var n=1;no;o++)i[o]=1;var r=t.createBufferSource();return r.buffer=e,r.loop=!0,r}var n=i;t.Pulse=function(i,o){t.Oscillator.call(this,i,"sawtooth"),this.w=o||0,this.osc2=new t.SawOsc(i),this.dNode=n.audiocontext.createDelay(),this.dcOffset=e(),this.dcGain=n.audiocontext.createGain(),this.dcOffset.connect(this.dcGain),this.dcGain.connect(this.output),this.f=i||440;var r=this.w/this.oscillator.frequency.value;this.dNode.delayTime.value=r,this.dcGain.gain.value=1.7*(.5-this.w),this.osc2.disconnect(),this.osc2.panner.disconnect(),this.osc2.amp(-1),this.osc2.output.connect(this.dNode),this.dNode.connect(this.output),this.output.gain.value=1,this.output.connect(this.panner)},t.Pulse.prototype=Object.create(t.Oscillator.prototype),t.Pulse.prototype.width=function(e){if("number"==typeof e){if(1>=e&&e>=0){this.w=e;var i=this.w/this.oscillator.frequency.value;this.dNode.delayTime.value=i}this.dcGain.gain.value=1.7*(.5-this.w)}else{e.connect(this.dNode.delayTime);var n=new t.SignalAdd(-.5);n.setInput(e),n=n.mult(-1),n=n.mult(1.7),n.connect(this.dcGain.gain)}},t.Pulse.prototype.start=function(t,i){var o=n.audiocontext.currentTime,r=i||0;if(!this.started){var s=t||this.f,a=this.oscillator.type;this.oscillator=n.audiocontext.createOscillator(),this.oscillator.frequency.setValueAtTime(s,o),this.oscillator.type=a,this.oscillator.connect(this.output),this.oscillator.start(r+o),this.osc2.oscillator=n.audiocontext.createOscillator(),this.osc2.oscillator.frequency.setValueAtTime(s,r+o),this.osc2.oscillator.type=a,this.osc2.oscillator.connect(this.osc2.output),this.osc2.start(r+o),this.freqNode=[this.oscillator.frequency,this.osc2.oscillator.frequency],this.dcOffset=e(),this.dcOffset.connect(this.dcGain),this.dcOffset.start(r+o),void 0!==this.mods&&void 0!==this.mods.frequency&&(this.mods.frequency.connect(this.freqNode[0]),this.mods.frequency.connect(this.freqNode[1])),this.started=!0,this.osc2.started=!0}},t.Pulse.prototype.stop=function(t){if(this.started){var e=t||0,i=n.audiocontext.currentTime;this.oscillator.stop(e+i),this.osc2.oscillator.stop(e+i),this.dcOffset.stop(e+i),this.started=!1,this.osc2.started=!1}},t.Pulse.prototype.freq=function(t,e,i){if("number"==typeof t){this.f=t;var o=n.audiocontext.currentTime,e=e||0,i=i||0,r=this.oscillator.frequency.value;this.oscillator.frequency.cancelScheduledValues(o),this.oscillator.frequency.setValueAtTime(r,o+i),this.oscillator.frequency.exponentialRampToValueAtTime(t,i+e+o),this.osc2.oscillator.frequency.cancelScheduledValues(o),this.osc2.oscillator.frequency.setValueAtTime(r,o+i),this.osc2.oscillator.frequency.exponentialRampToValueAtTime(t,i+e+o),this.freqMod&&(this.freqMod.output.disconnect(),this.freqMod=null)}else t.output&&(t.output.disconnect(),t.output.connect(this.oscillator.frequency),t.output.connect(this.osc2.oscillator.frequency),this.freqMod=t)}}(i,P);var M;M=function(){var e=i;t.Noise=function(e){var i;t.Oscillator.call(this),delete this.f,delete this.freq,delete this.oscillator,i="brown"===e?r:"pink"===e?o:n,this.buffer=i},t.Noise.prototype=Object.create(t.Oscillator.prototype);var n=function(){for(var t=2*e.audiocontext.sampleRate,i=e.audiocontext.createBuffer(1,t,e.audiocontext.sampleRate),n=i.getChannelData(0),o=0;t>o;o++)n[o]=2*Math.random()-1;return i.type="white",i}(),o=function(){var t,i,n,o,r,s,a,u=2*e.audiocontext.sampleRate,p=e.audiocontext.createBuffer(1,u,e.audiocontext.sampleRate),c=p.getChannelData(0);t=i=n=o=r=s=a=0;for(var h=0;u>h;h++){var l=2*Math.random()-1;t=.99886*t+.0555179*l,i=.99332*i+.0750759*l,n=.969*n+.153852*l,o=.8665*o+.3104856*l,r=.55*r+.5329522*l,s=-.7616*s-.016898*l,c[h]=t+i+n+o+r+s+a+.5362*l,c[h]*=.11,a=.115926*l}return p.type="pink",p}(),r=function(){for(var t=2*e.audiocontext.sampleRate,i=e.audiocontext.createBuffer(1,t,e.audiocontext.sampleRate),n=i.getChannelData(0),o=0,r=0;t>r;r++){var s=2*Math.random()-1;n[r]=(o+.02*s)/1.02,o=n[r],n[r]*=3.5}return i.type="brown",i}();t.Noise.prototype.setType=function(t){switch(t){case"white":this.buffer=n;break;case"pink":this.buffer=o;break;case"brown":this.buffer=r;break;default:this.buffer=n}if(this.started){var i=e.audiocontext.currentTime;this.stop(i),this.start(i+.01)}},t.Noise.prototype.getType=function(){return this.buffer.type},t.Noise.prototype.start=function(){this.started&&this.stop(),this.noise=e.audiocontext.createBufferSource(),this.noise.buffer=this.buffer,this.noise.loop=!0,this.noise.connect(this.output);var t=e.audiocontext.currentTime;this.noise.start(t),this.started=!0},t.Noise.prototype.stop=function(){var t=e.audiocontext.currentTime;this.noise&&(this.noise.stop(t),this.started=!1)},t.Noise.prototype.dispose=function(){var t=e.audiocontext.currentTime,i=e.soundArray.indexOf(this);e.soundArray.splice(i,1),this.noise&&(this.noise.disconnect(),this.stop(t)),this.output&&this.output.disconnect(),this.panner&&this.panner.disconnect(),this.output=null,this.panner=null,this.buffer=null,this.noise=null}}(i);var V;V=function(){var e=i;t.AudioIn=function(i){this.input=e.audiocontext.createGain(),this.output=e.audiocontext.createGain(),this.stream=null,this.mediaStream=null,this.currentSource=0,this.enabled=!1,this.amplitude=new t.Amplitude,this.output.connect(this.amplitude.input),"undefined"==typeof window.MediaStreamTrack?i?i():window.alert("This browser does not support AudioIn"):"function"==typeof window.MediaDevices.enumerateDevices&&window.MediaDevices.enumerateDevices(this._gotSources),e.soundArray.push(this)},t.AudioIn.prototype.start=function(t,i){var n=this;if(e.inputSources[n.currentSource]){var o=e.inputSources[n.currentSource].id,r={audio:{optional:[{sourceId:o}]}};window.navigator.getUserMedia(r,this._onStream=function(i){n.stream=i,n.enabled=!0,n.mediaStream=e.audiocontext.createMediaStreamSource(i),n.mediaStream.connect(n.output),t&&t(),n.amplitude.setInput(n.output)},this._onStreamError=function(t){i?i(t):console.error(t)})}else window.navigator.getUserMedia({audio:!0},this._onStream=function(i){n.stream=i,n.enabled=!0,n.mediaStream=e.audiocontext.createMediaStreamSource(i),n.mediaStream.connect(n.output),n.amplitude.setInput(n.output),t&&t()},this._onStreamError=function(t){i?i(t):console.error(t)})},t.AudioIn.prototype.stop=function(){this.stream&&this.stream.getTracks()[0].stop()},t.AudioIn.prototype.connect=function(t){t?t.hasOwnProperty("input")?this.output.connect(t.input):t.hasOwnProperty("analyser")?this.output.connect(t.analyser):this.output.connect(t):this.output.connect(e.input)},t.AudioIn.prototype.disconnect=function(){this.output.disconnect(),this.output.connect(this.amplitude.input)},t.AudioIn.prototype.getLevel=function(t){return t&&(this.amplitude.smoothing=t),this.amplitude.getLevel()},t.AudioIn.prototype._gotSources=function(t){for(var e=0;e0?e.inputSources:"This browser does not support MediaStreamTrack.getSources()"},t.AudioIn.prototype.getSources=function(t){"function"==typeof window.MediaStreamTrack.getSources?window.MediaStreamTrack.getSources(function(i){for(var n=0,o=i.length;o>n;n++){var r=i[n];"audio"===r.kind&&e.inputSources.push(r)}t(e.inputSources)}):console.log("This browser does not support MediaStreamTrack.getSources()")},t.AudioIn.prototype.setSource=function(t){var i=this;e.inputSources.length>0&&t=t?0:1},127),this._scale=this.input=new t.Multiply(1e4),this._scale.connect(this._thresh)},t.extend(t.GreaterThanZero,t.SignalBase),t.GreaterThanZero.prototype.dispose=function(){return t.prototype.dispose.call(this),this._scale.dispose(),this._scale=null,this._thresh.dispose(),this._thresh=null,this},t.GreaterThanZero}(p,b,S);var R;R=function(t){"use strict";return t.GreaterThan=function(e){this.createInsOuts(2,0),this._param=this.input[0]=new t.Subtract(e),this.input[1]=this._param.input[1],this._gtz=this.output=new t.GreaterThanZero,this._param.connect(this._gtz)},t.extend(t.GreaterThan,t.Signal),t.GreaterThan.prototype.dispose=function(){return t.prototype.dispose.call(this),this._param.dispose(),this._param=null,this._gtz.dispose(),this._gtz=null,this},t.GreaterThan}(p,N,E);var D;D=function(t){"use strict";return t.Abs=function(){this._abs=this.input=this.output=new t.WaveShaper(function(t){return 0===t?0:Math.abs(t)},127)},t.extend(t.Abs,t.SignalBase),t.Abs.prototype.dispose=function(){return t.prototype.dispose.call(this),this._abs.dispose(),this._abs=null,this},t.Abs}(p,h);var B;B=function(t){"use strict";return t.Modulo=function(e){this.createInsOuts(1,0),this._shaper=new t.WaveShaper(Math.pow(2,16)),this._multiply=new t.Multiply,this._subtract=this.output=new t.Subtract,this._modSignal=new t.Signal(e),this.input.fan(this._shaper,this._subtract),this._modSignal.connect(this._multiply,0,0),this._shaper.connect(this._multiply,0,1),this._multiply.connect(this._subtract,0,1),this._setWaveShaper(e)},t.extend(t.Modulo,t.SignalBase),t.Modulo.prototype._setWaveShaper=function(t){this._shaper.setMap(function(e){var i=Math.floor((e+1e-4)/t);return i})},Object.defineProperty(t.Modulo.prototype,"value",{get:function(){return this._modSignal.value},set:function(t){this._modSignal.value=t,this._setWaveShaper(t)}}),t.Modulo.prototype.dispose=function(){return t.prototype.dispose.call(this),this._shaper.dispose(),this._shaper=null,this._multiply.dispose(),this._multiply=null,this._subtract.dispose(),this._subtract=null,this._modSignal.dispose(),this._modSignal=null,this},t.Modulo}(p,h,S);var U;U=function(t){"use strict";return t.Pow=function(e){this._exp=this.defaultArg(e,1),this._expScaler=this.input=this.output=new t.WaveShaper(this._expFunc(this._exp),8192)},t.extend(t.Pow,t.SignalBase),Object.defineProperty(t.Pow.prototype,"value",{get:function(){return this._exp},set:function(t){this._exp=t,this._expScaler.setMap(this._expFunc(this._exp))}}),t.Pow.prototype._expFunc=function(t){return function(e){return Math.pow(Math.abs(e),t)}},t.Pow.prototype.dispose=function(){return t.prototype.dispose.call(this),this._expScaler.dispose(),this._expScaler=null,this},t.Pow}(p);var I;I=function(t){"use strict";return t.AudioToGain=function(){this._norm=this.input=this.output=new t.WaveShaper(function(t){return(t+1)/2})},t.extend(t.AudioToGain,t.SignalBase),t.AudioToGain.prototype.dispose=function(){return t.prototype.dispose.call(this),this._norm.dispose(),this._norm=null,this},t.AudioToGain}(p,h);var G;G=function(t){"use strict";function e(t,e,i){var n=new t;return i._eval(e[0]).connect(n,0,0),i._eval(e[1]).connect(n,0,1),n}function i(t,e,i){var n=new t;return i._eval(e[0]).connect(n,0,0),n}function n(t){return t?parseFloat(t):void 0}function o(t){return t&&t.args?parseFloat(t.args):void 0}return t.Expr=function(){var t=this._replacements(Array.prototype.slice.call(arguments)),e=this._parseInputs(t);this._nodes=[],this.input=new Array(e);for(var i=0;e>i;i++)this.input[i]=this.context.createGain();var n,o=this._parseTree(t);try{n=this._eval(o)}catch(r){throw this._disposeNodes(),new Error("Tone.Expr: Could evaluate expression: "+t)}this.output=n},t.extend(t.Expr,t.SignalBase),t.Expr._Expressions={value:{signal:{regexp:/^\d+\.\d+|^\d+/,method:function(e){var i=new t.Signal(n(e));return i}},input:{regexp:/^\$\d/,method:function(t,e){return e.input[n(t.substr(1))]}}},glue:{"(":{regexp:/^\(/},")":{regexp:/^\)/},",":{regexp:/^,/}},func:{abs:{regexp:/^abs/,method:i.bind(this,t.Abs)},mod:{regexp:/^mod/,method:function(e,i){var n=o(e[1]),r=new t.Modulo(n);return i._eval(e[0]).connect(r),r}},pow:{regexp:/^pow/,method:function(e,i){var n=o(e[1]),r=new t.Pow(n);return i._eval(e[0]).connect(r),r}},a2g:{regexp:/^a2g/,method:function(e,i){var n=new t.AudioToGain;return i._eval(e[0]).connect(n),n}}},binary:{"+":{regexp:/^\+/,precedence:1,method:e.bind(this,t.Add)},"-":{regexp:/^\-/,precedence:1,method:function(n,o){return 1===n.length?i(t.Negate,n,o):e(t.Subtract,n,o)}},"*":{regexp:/^\*/,precedence:0,method:e.bind(this,t.Multiply)}},unary:{"-":{regexp:/^\-/,method:i.bind(this,t.Negate)},"!":{regexp:/^\!/,method:i.bind(this,t.NOT)}}},t.Expr.prototype._parseInputs=function(t){var e=t.match(/\$\d/g),i=0; +if(null!==e)for(var n=0;n0;){e=e.trim();var r=i(e);o.push(r),e=e.substr(r.value.length)}return{next:function(){return o[++n]},peek:function(){return o[n+1]}}},t.Expr.prototype._parseTree=function(e){function i(t,e){return!c(t)&&"glue"===t.type&&t.value===e}function n(e,i,n){var o=!1,r=t.Expr._Expressions[i];if(!c(e))for(var s in r){var a=r[s];if(a.regexp.test(e.value)){if(c(n))return!0;if(a.precedence===n)return!0}}return o}function o(t){c(t)&&(t=5);var e;e=0>t?r():o(t-1);for(var i=p.peek();n(i,"binary",t);)i=p.next(),e={operator:i.value,method:i.method,args:[e,o(t-1)]},i=p.peek();return e}function r(){var t,e;return t=p.peek(),n(t,"unary")?(t=p.next(),e=r(),{operator:t.value,method:t.method,args:[e]}):s()}function s(){var t,e;if(t=p.peek(),c(t))throw new SyntaxError("Tone.Expr: Unexpected termination of expression");if("func"===t.type)return t=p.next(),a(t);if("value"===t.type)return t=p.next(),{method:t.method,args:t.value};if(i(t,"(")){if(p.next(),e=o(),t=p.next(),!i(t,")"))throw new SyntaxError("Expected )");return e}throw new SyntaxError("Tone.Expr: Parse error, cannot process token "+t.value)}function a(t){var e,n=[];if(e=p.next(),!i(e,"("))throw new SyntaxError('Tone.Expr: Expected ( in a function call "'+t.value+'"');if(e=p.peek(),i(e,")")||(n=u()),e=p.next(),!i(e,")"))throw new SyntaxError('Tone.Expr: Expected ) in a function call "'+t.value+'"');return{method:t.method,args:n,name:name}}function u(){for(var t,e,n=[];;){if(e=o(),c(e))break;if(n.push(e),t=p.peek(),!i(t,","))break;p.next()}return n}var p=this._tokenize(e),c=this.isUndef.bind(this);return o()},t.Expr.prototype._eval=function(t){if(!this.isUndef(t)){var e=t.method(t.args,this);return this._nodes.push(e),e}},t.Expr.prototype._disposeNodes=function(){for(var t=0;t0){this.connect(arguments[0]);for(var t=1;t=t&&(t=1),"number"==typeof t?(this.biquad.frequency.value=t,this.biquad.frequency.cancelScheduledValues(this.ac.currentTime+.01+i),this.biquad.frequency.exponentialRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.biquad.frequency),this.biquad.frequency.value},t.Filter.prototype.res=function(t,e){var i=e||0;return"number"==typeof t?(this.biquad.Q.value=t,this.biquad.Q.cancelScheduledValues(this.ac.currentTime+.01+i),this.biquad.Q.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.biquad.Q),this.biquad.Q.value},t.Filter.prototype.gain=function(t,e){var i=e||0;return"number"==typeof t?(this.biquad.gain.value=t,this.biquad.gain.cancelScheduledValues(this.ac.currentTime+.01+i),this.biquad.gain.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.biquad.gain),this.biquad.gain.value},t.Filter.prototype.toggle=function(){return this._on=!this._on,this._on===!0?this.biquad.type=this._untoggledType:this._on===!1&&(this.biquad.type="allpass"),this._on},t.Filter.prototype.setType=function(t){this.biquad.type=t,this._untoggledType=this.biquad.type},t.Filter.prototype.dispose=function(){e.prototype.dispose.apply(this),this.biquad.disconnect(),this.biquad=void 0},t.LowPass=function(){t.Filter.call(this,"lowpass")},t.LowPass.prototype=Object.create(t.Filter.prototype),t.HighPass=function(){t.Filter.call(this,"highpass")},t.HighPass.prototype=Object.create(t.Filter.prototype),t.BandPass=function(){t.Filter.call(this,"bandpass")},t.BandPass.prototype=Object.create(t.Filter.prototype),t.Filter}(i,j);var X;X=function(){var e=Z,n=i,o=function(t,i){e.call(this,"peaking"),this.disconnect(),this.set(t,i),this.biquad.gain.value=0,delete this.input,delete this.output,delete this._drywet,delete this.wet};return o.prototype=Object.create(e.prototype),o.prototype.amp=function(){console.warn("`amp()` is not available for p5.EQ bands. Use `.gain()`")},o.prototype.drywet=function(){console.warn("`drywet()` is not available for p5.EQ bands.")},o.prototype.connect=function(e){var i=e||t.soundOut.input;this.biquad?this.biquad.connect(i.input?i.input:i):this.output.connect(i.input?i.input:i)},o.prototype.disconnect=function(){this.biquad.disconnect()},o.prototype.dispose=function(){var t=n.soundArray.indexOf(this);n.soundArray.splice(t,1),this.disconnect(),delete this.biquad},o}(Z,i);var Y;Y=function(){var e=j,i=X;return t.EQ=function(t){e.call(this),t=3===t||8===t?t:3;var i;i=3===t?Math.pow(2,3):2,this.bands=[];for(var n,o,r=0;t>r;r++)r===t-1?(n=21e3,o=.01):0===r?(n=100,o=.1):1===r?(n=3===t?360*i:360,o=1):(n=this.bands[r-1].freq()*i,o=1),this.bands[r]=this._newBand(n,o),r>0?this.bands[r-1].connect(this.bands[r].biquad):this.input.connect(this.bands[r].biquad);this.bands[t-1].connect(this.output)},t.EQ.prototype=Object.create(e.prototype),t.EQ.prototype.process=function(t){t.connect(this.input)},t.EQ.prototype.set=function(){if(arguments.length===2*this.bands.length)for(var t=0;t0;)delete this.bands.pop().dispose();delete this.bands},t.EQ}(j,X);var W;W=function(){var e=j;return t.Panner3D=function(t){e.call(this),this.panner=this.ac.createPanner(),this.panner.panningModel="HRTF",this.panner.distanceModel="linear",this.panner.connect(this.output),this.input.connect(this.panner)},t.Panner3D.prototype=Object.create(e.prototype),t.Panner3D.prototype.process=function(t){t.connect(this.input)},t.Panner3D.prototype.position=function(t,e,i,n){return this.positionX(t,n),this.positionY(e,n),this.positionZ(i,n),[this.panner.positionX.value,this.panner.positionY.value,this.panner.positionZ.value]},t.Panner3D.prototype.positionX=function(t,e){var i=e||0;return"number"==typeof t?(this.panner.positionX.value=t,this.panner.positionX.cancelScheduledValues(this.ac.currentTime+.01+i),this.panner.positionX.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.panner.positionX),this.panner.positionX.value},t.Panner3D.prototype.positionY=function(t,e){var i=e||0;return"number"==typeof t?(this.panner.positionY.value=t,this.panner.positionY.cancelScheduledValues(this.ac.currentTime+.01+i),this.panner.positionY.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.panner.positionY),this.panner.positionY.value},t.Panner3D.prototype.positionZ=function(t,e){var i=e||0;return"number"==typeof t?(this.panner.positionZ.value=t,this.panner.positionZ.cancelScheduledValues(this.ac.currentTime+.01+i),this.panner.positionZ.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.panner.positionZ),this.panner.positionZ.value},t.Panner3D.prototype.orient=function(t,e,i,n){return this.orientX(t,n),this.orientY(e,n),this.orientZ(i,n),[this.panner.orientationX.value,this.panner.orientationY.value,this.panner.orientationZ.value]},t.Panner3D.prototype.orientX=function(t,e){var i=e||0;return"number"==typeof t?(this.panner.orientationX.value=t,this.panner.orientationX.cancelScheduledValues(this.ac.currentTime+.01+i),this.panner.orientationX.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.panner.orientationX),this.panner.orientationX.value},t.Panner3D.prototype.orientY=function(t,e){var i=e||0;return"number"==typeof t?(this.panner.orientationY.value=t,this.panner.orientationY.cancelScheduledValues(this.ac.currentTime+.01+i),this.panner.orientationY.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.panner.orientationY),this.panner.orientationY.value},t.Panner3D.prototype.orientZ=function(t,e){var i=e||0;return"number"==typeof t?(this.panner.orientationZ.value=t,this.panner.orientationZ.cancelScheduledValues(this.ac.currentTime+.01+i),this.panner.orientationZ.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.panner.orientationY),this.panner.orientationZ.value},t.Panner3D}(i,j);var Q;Q=function(){var e=i;return t.Listener3D=function(t){this.ac=e.audiocontext,this.listener=this.ac.listener},t.Listener3D.prototype.process=function(t){t.connect(this.input)},t.Listener3D.prototype.position=function(t,e,i,n){return this.positionX(t,n),this.positionY(e,n),this.positionZ(i,n),[this.spatializer.positionX.value,this.spatializer.positionY.value,this.spatializer.positionZ.value]},t.Listener3D.prototype.positionX=function(t,e){var i=e||0;return"number"==typeof t?(this.spatializer.positionX.value=t,this.spatializer.positionX.cancelScheduledValues(this.ac.currentTime+.01+i),this.spatializer.positionX.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.spatializer.positionX),this.spatializer.positionX.value},t.Listener3D.prototype.positionY=function(t,e){var i=e||0;return"number"==typeof t?(this.spatializer.positionY.value=t,this.spatializer.positionY.cancelScheduledValues(this.ac.currentTime+.01+i),this.spatializer.positionY.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.spatializer.positionY),this.spatializer.positionY.value},t.Listener3D.prototype.positionZ=function(t,e){var i=e||0;return"number"==typeof t?(this.spatializer.positionZ.value=t,this.spatializer.positionZ.cancelScheduledValues(this.ac.currentTime+.01+i),this.spatializer.positionZ.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.spatializer.positionZ),this.spatializer.positionZ.value},t.Listener3D.prototype.orient=function(t,e,i,n,o,r,s){return 3===arguments.length||4===arguments.length?(s=arguments[3],this.orientForward(t,e,i,s)):(6===arguments.length||7===arguments)&&(this.orientForward(t,e,i),this.orientUp(n,o,r,s)),[this.spatializer.forwardX.value,this.spatializer.forwardY.value,this.spatializer.forwardZ.value,this.spatializer.upX.value,this.spatializer.upY.value,this.spatializer.upZ.value]},t.Listener3D.prototype.orientForward=function(t,e,i,n){return this.forwardX(t,n),this.forwardY(e,n),this.forwardZ(i,n),[this.spatializer.forwardX,this.spatializer.forwardY,this.spatializer.forwardZ]},t.Listener3D.prototype.orientUp=function(t,e,i,n){return this.upX(t,n),this.upY(e,n),this.upZ(i,n),[this.spatializer.upX,this.spatializer.upY,this.spatializer.upZ]},t.Listener3D.prototype.forwardX=function(t,e){var i=e||0;return"number"==typeof t?(this.spatializer.forwardX.value=t,this.spatializer.forwardX.cancelScheduledValues(this.ac.currentTime+.01+i),this.spatializer.forwardX.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.spatializer.forwardX),this.spatializer.forwardX.value},t.Listener3D.prototype.forwardY=function(t,e){var i=e||0;return"number"==typeof t?(this.spatializer.forwardY.value=t,this.spatializer.forwardY.cancelScheduledValues(this.ac.currentTime+.01+i),this.spatializer.forwardY.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.spatializer.forwardY),this.spatializer.forwardY.value},t.Listener3D.prototype.forwardZ=function(t,e){var i=e||0;return"number"==typeof t?(this.spatializer.forwardZ.value=t,this.spatializer.forwardZ.cancelScheduledValues(this.ac.currentTime+.01+i),this.spatializer.forwardZ.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.spatializer.forwardZ),this.spatializer.forwardZ.value},t.Listener3D.prototype.upX=function(t,e){var i=e||0;return"number"==typeof t?(this.spatializer.upX.value=t,this.spatializer.upX.cancelScheduledValues(this.ac.currentTime+.01+i),this.spatializer.upX.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.spatializer.upX),this.spatializer.upX.value},t.Listener3D.prototype.upY=function(t,e){var i=e||0;return"number"==typeof t?(this.spatializer.upY.value=t,this.spatializer.upY.cancelScheduledValues(this.ac.currentTime+.01+i),this.spatializer.upY.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.spatializer.upY),this.spatializer.upY.value},t.Listener3D.prototype.upZ=function(t,e){var i=e||0;return"number"==typeof t?(this.spatializer.upZ.value=t,this.spatializer.upZ.cancelScheduledValues(this.ac.currentTime+.01+i),this.spatializer.upZ.linearRampToValueAtTime(t,this.ac.currentTime+.02+i)):t&&t.connect(this.spatializer.upZ),this.spatializer.upZ.value},t.Listener3D}(i,j);var H;H=function(){var e=Z,i=j;t.Delay=function(){i.call(this),this._split=this.ac.createChannelSplitter(2),this._merge=this.ac.createChannelMerger(2),this._leftGain=this.ac.createGain(),this._rightGain=this.ac.createGain(),this.leftDelay=this.ac.createDelay(),this.rightDelay=this.ac.createDelay(),this._leftFilter=new e,this._rightFilter=new e,this._leftFilter.disconnect(),this._rightFilter.disconnect(),this._leftFilter.biquad.frequency.setValueAtTime(1200,this.ac.currentTime),this._rightFilter.biquad.frequency.setValueAtTime(1200,this.ac.currentTime),this._leftFilter.biquad.Q.setValueAtTime(.3,this.ac.currentTime),this._rightFilter.biquad.Q.setValueAtTime(.3,this.ac.currentTime),this.input.connect(this._split),this.leftDelay.connect(this._leftGain),this.rightDelay.connect(this._rightGain),this._leftGain.connect(this._leftFilter.input),this._rightGain.connect(this._rightFilter.input),this._merge.connect(this.wet),this._leftFilter.biquad.gain.setValueAtTime(1,this.ac.currentTime),this._rightFilter.biquad.gain.setValueAtTime(1,this.ac.currentTime),this.setType(0),this._maxDelay=this.leftDelay.delayTime.maxValue,this.feedback(.5)},t.Delay.prototype=Object.create(i.prototype),t.Delay.prototype.process=function(t,e,i,n){var o=i||0,r=e||0;if(o>=1)throw new Error("Feedback value will force a positive feedback loop.");if(r>=this._maxDelay)throw new Error("Delay Time exceeds maximum delay time of "+this._maxDelay+" second.");t.connect(this.input),this.leftDelay.delayTime.setValueAtTime(r,this.ac.currentTime),this.rightDelay.delayTime.setValueAtTime(r,this.ac.currentTime),this._leftGain.gain.value=o,this._rightGain.gain.value=o,n&&(this._leftFilter.freq(n),this._rightFilter.freq(n))},t.Delay.prototype.delayTime=function(t){"number"!=typeof t?(t.connect(this.leftDelay.delayTime),t.connect(this.rightDelay.delayTime)):(this.leftDelay.delayTime.cancelScheduledValues(this.ac.currentTime),this.rightDelay.delayTime.cancelScheduledValues(this.ac.currentTime),this.leftDelay.delayTime.linearRampToValueAtTime(t,this.ac.currentTime),this.rightDelay.delayTime.linearRampToValueAtTime(t,this.ac.currentTime))},t.Delay.prototype.feedback=function(t){if(t&&"number"!=typeof t)t.connect(this._leftGain.gain),t.connect(this._rightGain.gain);else{if(t>=1)throw new Error("Feedback value will force a positive feedback loop.");"number"==typeof t&&(this._leftGain.gain.value=t,this._rightGain.gain.value=t)}return this._leftGain.gain.value},t.Delay.prototype.filter=function(t,e){this._leftFilter.set(t,e),this._rightFilter.set(t,e)},t.Delay.prototype.setType=function(t){switch(1===t&&(t="pingPong"),this._split.disconnect(),this._leftFilter.disconnect(),this._rightFilter.disconnect(),this._split.connect(this.leftDelay,0),this._split.connect(this.rightDelay,1),t){case"pingPong":this._rightFilter.setType(this._leftFilter.biquad.type),this._leftFilter.output.connect(this._merge,0,0),this._rightFilter.output.connect(this._merge,0,1),this._leftFilter.output.connect(this.rightDelay),this._rightFilter.output.connect(this.leftDelay);break;default:this._leftFilter.output.connect(this._merge,0,0),this._rightFilter.output.connect(this._merge,0,1),this._leftFilter.output.connect(this.leftDelay),this._rightFilter.output.connect(this.rightDelay)}},t.Delay.prototype.dispose=function(){i.prototype.dispose.apply(this),this._split.disconnect(),this._leftFilter.dispose(),this._rightFilter.dispose(),this._merge.disconnect(),this._leftGain.disconnect(),this._rightGain.disconnect(),this.leftDelay.disconnect(),this.rightDelay.disconnect(),this._split=void 0,this._leftFilter=void 0,this._rightFilter=void 0,this._merge=void 0,this._leftGain=void 0,this._rightGain=void 0,this.leftDelay=void 0,this.rightDelay=void 0}}(Z,j);var $;$=function(){var e=o,i=j;t.Reverb=function(){i.call(this),this.convolverNode=this.ac.createConvolver(),this.input.gain.value=.5,this.input.connect(this.convolverNode),this.convolverNode.connect(this.wet),this._seconds=3,this._decay=2,this._reverse=!1,this._buildImpulse()},t.Reverb.prototype=Object.create(i.prototype),t.Reverb.prototype.process=function(t,e,i,n){t.connect(this.input);var o=!1;e&&(this._seconds=e,o=!0),i&&(this._decay=i),n&&(this._reverse=n),o&&this._buildImpulse()},t.Reverb.prototype.set=function(t,e,i){var n=!1;t&&(this._seconds=t,n=!0),e&&(this._decay=e),i&&(this._reverse=i),n&&this._buildImpulse()},t.Reverb.prototype._buildImpulse=function(){var t,e,i=this.ac.sampleRate,n=i*this._seconds,o=this._decay,r=this.ac.createBuffer(2,n,i),s=r.getChannelData(0),a=r.getChannelData(1);for(e=0;n>e;e++)t=this._reverse?n-e:e,s[e]=(2*Math.random()-1)*Math.pow(1-t/n,o),a[e]=(2*Math.random()-1)*Math.pow(1-t/n,o);this.convolverNode.buffer=r},t.Reverb.prototype.dispose=function(){i.prototype.dispose.apply(this),this.convolverNode&&(this.convolverNode.buffer=null,this.convolverNode=null)},t.Convolver=function(t,e,n){i.call(this),this.convolverNode=this.ac.createConvolver(),this.input.gain.value=.5,this.input.connect(this.convolverNode),this.convolverNode.connect(this.wet),t?(this.impulses=[],this._loadBuffer(t,e,n)):(this._seconds=3,this._decay=2,this._reverse=!1,this._buildImpulse())},t.Convolver.prototype=Object.create(t.Reverb.prototype),t.prototype.registerPreloadMethod("createConvolver",t.prototype),t.prototype.createConvolver=function(e,i,n){window.location.origin.indexOf("file://")>-1&&"undefined"===window.cordova&&alert("This sketch may require a server to load external files. Please see http://bit.ly/1qcInwS");var o=new t.Convolver(e,i,n);return o.impulses=[],o},t.Convolver.prototype._loadBuffer=function(i,n,o){var i=t.prototype._checkFileFormats(i),r=this,s=(new Error).stack,a=t.prototype.getAudioContext(),u=new XMLHttpRequest;u.open("GET",i,!0),u.responseType="arraybuffer",u.onload=function(){if(200===u.status)a.decodeAudioData(u.response,function(t){var e={},o=i.split("/");e.name=o[o.length-1],e.audioBuffer=t,r.impulses.push(e),r.convolverNode.buffer=e.audioBuffer,n&&n(e)},function(){var t=new e("decodeAudioData",s,r.url),i="AudioContext error at decodeAudioData for "+r.url;o?(t.msg=i,o(t)):console.error(i+"\n The error stack trace includes: \n"+t.stack)});else{var t=new e("loadConvolver",s,r.url),p="Unable to load "+r.url+". The request status was: "+u.status+" ("+u.statusText+")";o?(t.message=p,o(t)):console.error(p+"\n The error stack trace includes: \n"+t.stack)}},u.onerror=function(){var t=new e("loadConvolver",s,r.url),i="There was no response from the server at "+r.url+". Check the url and internet connectivity.";o?(t.message=i,o(t)):console.error(i+"\n The error stack trace includes: \n"+t.stack)},u.send()},t.Convolver.prototype.set=null,t.Convolver.prototype.process=function(t){t.connect(this.input)},t.Convolver.prototype.impulses=[],t.Convolver.prototype.addImpulse=function(t,e,i){window.location.origin.indexOf("file://")>-1&&"undefined"===window.cordova&&alert("This sketch may require a server to load external files. Please see http://bit.ly/1qcInwS"),this._loadBuffer(t,e,i)},t.Convolver.prototype.resetImpulse=function(t,e,i){window.location.origin.indexOf("file://")>-1&&"undefined"===window.cordova&&alert("This sketch may require a server to load external files. Please see http://bit.ly/1qcInwS"),this.impulses=[],this._loadBuffer(t,e,i)},t.Convolver.prototype.toggleImpulse=function(t){if("number"==typeof t&&tthis._nextTick&&this._state;){var s=this._state.getValueAtTime(this._nextTick);if(s!==this._lastState){this._lastState=s;var a=this._state.get(this._nextTick);s===t.State.Started?(this._nextTick=a.time,this.isUndef(a.offset)||(this.ticks=a.offset),this.emit("start",a.time,this.ticks)):s===t.State.Stopped?(this.ticks=0,this.emit("stop",a.time)):s===t.State.Paused&&this.emit("pause",a.time)}var u=this._nextTick;this.frequency&&(this._nextTick+=1/this.frequency.getValueAtTime(this._nextTick),s===t.State.Started&&(this.callback(u),this.ticks++))}},t.Clock.prototype.getStateAtTime=function(t){return t=this.toSeconds(t),this._state.getValueAtTime(t)},t.Clock.prototype.dispose=function(){t.Emitter.prototype.dispose.call(this),this.context.off("tick",this._boundLoop),this._writable("frequency"),this.frequency.dispose(),this.frequency=null,this._boundLoop=null,this._nextTick=1/0,this.callback=null,this._state.dispose(),this._state=null},t.Clock}(p,O,J,y);var tt;tt=function(){var e=i,n=K;t.Metro=function(){this.clock=new n({callback:this.ontick.bind(this)}),this.syncedParts=[],this.bpm=120,this._init(),this.prevTick=0,this.tatumTime=0,this.tickCallback=function(){}},t.Metro.prototype.ontick=function(t){var i=t-this.prevTick,n=t-e.audiocontext.currentTime;if(!(i-this.tatumTime<=-.02)){this.prevTick=t;var o=this;this.syncedParts.forEach(function(t){t.isPlaying&&(t.incrementStep(n),t.phrases.forEach(function(t){var e=t.sequence,i=o.metroTicks%e.length;0!==e[i]&&(o.metroTicks=t.parts.length?(t.scoreStep=0,t.onended()):(t.scoreStep=0,t.parts[t.currentPart-1].stop(),t.parts[t.currentPart].start())}var n=i,o=120;t.prototype.setBPM=function(t,e){o=t;for(var i in n.parts)n.parts[i]&&n.parts[i].setBPM(t,e)},t.Phrase=function(t,e,i){this.phraseStep=0,this.name=t,this.callback=e,this.sequence=i},t.Part=function(e,i){this.length=e||0,this.partStep=0,this.phrases=[],this.isPlaying=!1,this.noLoop(),this.tatums=i||.0625,this.metro=new t.Metro,this.metro._init(),this.metro.beatLength(this.tatums),this.metro.setBPM(o),n.parts.push(this),this.callback=function(){}},t.Part.prototype.setBPM=function(t,e){this.metro.setBPM(t,e)},t.Part.prototype.getBPM=function(){return this.metro.getBPM()},t.Part.prototype.start=function(t){if(!this.isPlaying){this.isPlaying=!0,this.metro.resetSync(this);var e=t||0;this.metro.start(e)}},t.Part.prototype.loop=function(t){this.looping=!0,this.onended=function(){this.partStep=0};var e=t||0;this.start(e)},t.Part.prototype.noLoop=function(){this.looping=!1,this.onended=function(){this.stop()}},t.Part.prototype.stop=function(t){this.partStep=0,this.pause(t)},t.Part.prototype.pause=function(t){this.isPlaying=!1;var e=t||0;this.metro.stop(e)},t.Part.prototype.addPhrase=function(e,i,n){var o;if(3===arguments.length)o=new t.Phrase(e,i,n);else{if(!(arguments[0]instanceof t.Phrase))throw"invalid input. addPhrase accepts name, callback, array or a p5.Phrase";o=arguments[0]}this.phrases.push(o),o.sequence.length>this.length&&(this.length=o.sequence.length)},t.Part.prototype.removePhrase=function(t){for(var e in this.phrases)this.phrases[e].name===t&&this.phrases.splice(e,1)},t.Part.prototype.getPhrase=function(t){for(var e in this.phrases)if(this.phrases[e].name===t)return this.phrases[e]},t.Part.prototype.replaceSequence=function(t,e){for(var i in this.phrases)this.phrases[i].name===t&&(this.phrases[i].sequence=e)},t.Part.prototype.incrementStep=function(t){this.partStepr;)n[r++]=t[o],n[r++]=e[o],o++;return n}function n(t,e,i){for(var n=i.length,o=0;n>o;o++)t.setUint8(e+o,i.charCodeAt(o))}var o=i,r=o.audiocontext;t.SoundRecorder=function(){this.input=r.createGain(),this.output=r.createGain(),this.recording=!1,this.bufferSize=1024,this._channels=2,this._clear(),this._jsNode=r.createScriptProcessor(this.bufferSize,this._channels,2),this._jsNode.onaudioprocess=this._audioprocess.bind(this),this._callback=function(){},this._jsNode.connect(t.soundOut._silentNode),this.setInput(),o.soundArray.push(this)},t.SoundRecorder.prototype.setInput=function(e){this.input.disconnect(),this.input=null,this.input=r.createGain(),this.input.connect(this._jsNode),this.input.connect(this.output),e?e.connect(this.input):t.soundOut.output.connect(this.input)},t.SoundRecorder.prototype.record=function(t,e,i){this.recording=!0,e&&(this.sampleLimit=Math.round(e*r.sampleRate)),t&&i?this._callback=function(){this.buffer=this._getBuffer(),t.setBuffer(this.buffer),i()}:t&&(this._callback=function(){this.buffer=this._getBuffer(),t.setBuffer(this.buffer)})},t.SoundRecorder.prototype.stop=function(){this.recording=!1,this._callback(),this._clear()},t.SoundRecorder.prototype._clear=function(){this._leftBuffers=[],this._rightBuffers=[],this.recordedSamples=0,this.sampleLimit=null},t.SoundRecorder.prototype._audioprocess=function(t){if(this.recording!==!1&&this.recording===!0)if(this.sampleLimit&&this.recordedSamples>=this.sampleLimit)this.stop();else{var e=t.inputBuffer.getChannelData(0),i=t.inputBuffer.getChannelData(1);this._leftBuffers.push(new Float32Array(e)),this._rightBuffers.push(new Float32Array(i)),this.recordedSamples+=this.bufferSize}},t.SoundRecorder.prototype._getBuffer=function(){var t=[];return t.push(this._mergeBuffers(this._leftBuffers)),t.push(this._mergeBuffers(this._rightBuffers)),t},t.SoundRecorder.prototype._mergeBuffers=function(t){for(var e=new Float32Array(this.recordedSamples),i=0,n=t.length,o=0;n>o;o++){var r=t[o];e.set(r,i),i+=r.length}return e},t.SoundRecorder.prototype.dispose=function(){this._clear();var t=o.soundArray.indexOf(this);o.soundArray.splice(t,1),this._callback=function(){},this.input&&this.input.disconnect(),this.input=null,this._jsNode=null},t.prototype.saveSound=function(i,o){var r,s;r=i.buffer.getChannelData(0),s=i.buffer.numberOfChannels>1?i.buffer.getChannelData(1):r;var a=e(r,s),u=new window.ArrayBuffer(44+2*a.length),p=new window.DataView(u);n(p,0,"RIFF"),p.setUint32(4,36+2*a.length,!0),n(p,8,"WAVE"),n(p,12,"fmt "),p.setUint32(16,16,!0),p.setUint16(20,1,!0),p.setUint16(22,2,!0),p.setUint32(24,44100,!0),p.setUint32(28,176400,!0),p.setUint16(32,4,!0),p.setUint16(34,16,!0),n(p,36,"data"),p.setUint32(40,2*a.length,!0);for(var c=a.length,h=44,l=1,f=0;c>f;f++)p.setInt16(h,a[f]*(32767*l),!0),h+=2;t.prototype.writeFile([p],o,"wav")}}(e,i);var ot;ot=function(){t.PeakDetect=function(t,e,i,n){this.framesPerPeak=n||20,this.framesSinceLastPeak=0,this.decayRate=.95,this.threshold=i||.35,this.cutoff=0,this.cutoffMult=1.5,this.energy=0,this.penergy=0,this.currentValue=0,this.isDetected=!1,this.f1=t||40,this.f2=e||2e4,this._onPeak=function(){}},t.PeakDetect.prototype.update=function(t){var e=this.energy=t.getEnergy(this.f1,this.f2)/255;e>this.cutoff&&e>this.threshold&&e-this.penergy>0?(this._onPeak(),this.isDetected=!0,this.cutoff=e*this.cutoffMult,this.framesSinceLastPeak=0):(this.isDetected=!1,this.framesSinceLastPeak<=this.framesPerPeak?this.framesSinceLastPeak++:(this.cutoff*=this.decayRate,this.cutoff=Math.max(this.cutoff,this.threshold))),this.currentValue=e,this.penergy=e},t.PeakDetect.prototype.onPeak=function(t,e){var i=this;i._onPeak=function(){t(i.energy,e)}}}();var rt;rt=function(){var e=i;t.Gain=function(){this.ac=e.audiocontext,this.input=this.ac.createGain(),this.output=this.ac.createGain(),this.input.gain.value=.5,this.input.connect(this.output),e.soundArray.push(this)},t.Gain.prototype.setInput=function(t){t.connect(this.input)},t.Gain.prototype.connect=function(e){var i=e||t.soundOut.input;this.output.connect(i.input?i.input:i)},t.Gain.prototype.disconnect=function(){this.output.disconnect()},t.Gain.prototype.amp=function(t,i,n){var i=i||0,n=n||0,o=e.audiocontext.currentTime,r=this.output.gain.value;this.output.gain.cancelScheduledValues(o),this.output.gain.linearRampToValueAtTime(r,o+n),this.output.gain.linearRampToValueAtTime(t,o+n+i)},t.Gain.prototype.dispose=function(){var t=e.soundArray.indexOf(this);e.soundArray.splice(t,1),this.output.disconnect(),this.input.disconnect(),this.output=void 0,this.input=void 0}}(i,e);var st;st=function(){function e(t){for(var e,i="number"==typeof t?t:50,n=44100,o=new Float32Array(n),r=Math.PI/180,s=0;n>s;++s)e=2*s/n-1,o[s]=(3+i)*e*20*r/(Math.PI+i*Math.abs(e));return o}var i=j;t.Distortion=function(n,o){if(i.call(this),"undefined"==typeof n&&(n=.25),"number"!=typeof n)throw new Error("amount must be a number");if("undefined"==typeof o&&(o="2x"),"string"!=typeof o)throw new Error("oversample must be a String");var r=t.prototype.map(n,0,1,0,2e3);this.waveShaperNode=this.ac.createWaveShaper(),this.amount=r,this.waveShaperNode.curve=e(r),this.waveShaperNode.oversample=o,this.input.connect(this.waveShaperNode),this.waveShaperNode.connect(this.wet)},t.Distortion.prototype=Object.create(i.prototype),t.Distortion.prototype.process=function(t,e,i){t.connect(this.input),this.set(e,i)},t.Distortion.prototype.set=function(i,n){if(i){var o=t.prototype.map(i,0,1,0,2e3);this.amount=o,this.waveShaperNode.curve=e(o)}n&&(this.waveShaperNode.oversample=n)},t.Distortion.prototype.getAmount=function(){return this.amount},t.Distortion.prototype.getOversample=function(){return this.waveShaperNode.oversample},t.Distortion.prototype.dispose=function(){i.prototype.dispose.apply(this),this.waveShaperNode.disconnect(),this.waveShaperNode=null}}(j);var at;at=function(){var t=e;return t}(e,i,n,o,r,s,a,u,A,P,F,q,M,V,Z,Y,W,Q,H,$,tt,et,it,nt,ot,rt,st)}); \ No newline at end of file diff --git a/src/monosynth.js b/src/monosynth.js index 3a56c1e7..fd7f18ed 100644 --- a/src/monosynth.js +++ b/src/monosynth.js @@ -3,10 +3,6 @@ define(function (require) { var p5sound = require('master'); var AudioVoice = require('audioVoice'); - require('sndcore'); - require('oscillator'); - require('env'); - require('filter'); /** * An MonoSynth is used as a single voice for sound synthesis. @@ -102,6 +98,7 @@ define(function (require) { p5.MonoSynth.prototype.play = function (note, velocity, secondsFromNow, susTime) { // set range of env (TO DO: allow this to be scheduled in advance) var susTime = susTime || this.sustain; + this.susTime = susTime; this.triggerAttack(note, veocity, secondsFromNow); this.triggerRelease(secondsFromNow + susTime); }; @@ -256,10 +253,10 @@ define(function (require) { /** * Getters and Setters - * @param {Number} attack - * @param {Number} decay - * @param {Number} sustain - * @param {Number} release + * @property {Number} attack + * @property {Number} decay + * @property {Number} sustain + * @property {Number} release */ Object.defineProperties(p5.MonoSynth.prototype, { 'attack': {