Dot Piano is a visual musical instrument that lives on the web. Use your computer keys or MIDI keyboard to record a song, then share it simply by sending a link.
Made by
Alex Chen and
Yotam Mann. A physical version of this project currently lives at the Cooper Hewitt Design Museum in New York.
Note: in order to play and record, you need to visit dotpiano.com on a desktop computer.
"
+}
+, function(t, e, i) {
+ var n, o, r;
+ /**
+ * isMobile.js v0.4.1
+ *
+ * A simple library to detect Apple phones and tablets,
+ * Android phones and tablets, other mobile devices (like blackberry, mini-opera and windows phone),
+ * and any kind of seven inch device, via user agent sniffing.
+ *
+ * @author: Kai Mallea (kmallea@gmail.com)
+ *
+ * @license: http://creativecommons.org/publicdomain/zero/1.0/
+ */
+ !function(i) {
+ var s = /iPhone/i
+ , a = /iPod/i
+ , u = /iPad/i
+ , l = /(?=.*\bAndroid\b)(?=.*\bMobile\b)/i
+ , c = /Android/i
+ , h = /(?=.*\bAndroid\b)(?=.*\bSD4930UR\b)/i
+ , p = /(?=.*\bAndroid\b)(?=.*\b(?:KFOT|KFTT|KFJWI|KFJWA|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|KFARWI|KFASWI|KFSAWI|KFSAWA)\b)/i
+ , f = /Windows Phone/i
+ , d = /(?=.*\bWindows\b)(?=.*\bARM\b)/i
+ , y = /BlackBerry/i
+ , _ = /BB10/i
+ , m = /Opera Mini/i
+ , v = /(CriOS|Chrome)(?=.*\bMobile\b)/i
+ , g = /(?=.*\bFirefox\b)(?=.*\bMobile\b)/i
+ , b = new RegExp("(?:Nexus 7|BNTV250|Kindle Fire|Silk|GT-P1000)","i")
+ , w = function(t, e) {
+ return t.test(e)
+ }
+ , T = function(t) {
+ var e = t || navigator.userAgent
+ , i = e.split("[FBAN");
+ if (void 0 !== i[1] && (e = i[0]),
+ i = e.split("Twitter"),
+ void 0 !== i[1] && (e = i[0]),
+ this.apple = {
+ phone: w(s, e),
+ ipod: w(a, e),
+ tablet: !w(s, e) && w(u, e),
+ device: w(s, e) || w(a, e) || w(u, e)
+ },
+ this.amazon = {
+ phone: w(h, e),
+ tablet: !w(h, e) && w(p, e),
+ device: w(h, e) || w(p, e)
+ },
+ this.android = {
+ phone: w(h, e) || w(l, e),
+ tablet: !w(h, e) && !w(l, e) && (w(p, e) || w(c, e)),
+ device: w(h, e) || w(p, e) || w(l, e) || w(c, e)
+ },
+ this.windows = {
+ phone: w(f, e),
+ tablet: w(d, e),
+ device: w(f, e) || w(d, e)
+ },
+ this.other = {
+ blackberry: w(y, e),
+ blackberry10: w(_, e),
+ opera: w(m, e),
+ firefox: w(g, e),
+ chrome: w(v, e),
+ device: w(y, e) || w(_, e) || w(m, e) || w(g, e) || w(v, e)
+ },
+ this.seven_inch = w(b, e),
+ this.any = this.apple.device || this.android.device || this.windows.device || this.other.device || this.seven_inch,
+ this.phone = this.apple.phone || this.android.phone || this.windows.phone,
+ this.tablet = this.apple.tablet || this.android.tablet || this.windows.tablet,
+ "undefined" == typeof window)
+ return this
+ }
+ , S = function() {
+ var t = new T;
+ return t.Class = T,
+ t
+ };
+ void 0 !== t && t.exports && "undefined" == typeof window ? t.exports = T : void 0 !== t && t.exports && "undefined" != typeof window ? t.exports = S() : (o = [],
+ n = i.isMobile = S(),
+ void 0 !== (r = "function" == typeof n ? n.apply(e, o) : n) && (t.exports = r))
+ }(this)
+}
+, function(t, e) {
+ function i(t) {
+ var e = new r(t)
+ , i = e.readChunk();
+ if ("MThd" != i.id)
+ throw "Bad MIDI file. Expected 'MHdr', got: '" + i.id + "'";
+ for (var s = n(i.data), a = [], u = 0; !e.eof() && u < s.numTracks; u++) {
+ var l = e.readChunk();
+ if ("MTrk" != l.id)
+ throw "Bad MIDI file. Expected 'MTrk', got: '" + l.id + "'";
+ var c = o(l.data);
+ a.push(c)
+ }
+ return {
+ header: s,
+ tracks: a
+ }
+ }
+ function n(t) {
+ var e = new r(t)
+ , i = e.readUInt16()
+ , n = e.readUInt16()
+ , o = {
+ format: i,
+ numTracks: n
+ }
+ , s = e.readUInt16();
+ return 32768 & s ? (o.framesPerSecond = 256 - (s >> 8),
+ o.ticksPerFrame = 255 & s) : o.ticksPerBeat = s,
+ o
+ }
+ function o(t) {
+ for (var e = new r(t), i = []; !e.eof(); ) {
+ var n = function() {
+ var t = {};
+ t.deltaTime = e.readVarInt();
+ var i = e.readUInt8();
+ if (240 == (240 & i)) {
+ if (255 !== i) {
+ if (240 == i) {
+ t.type = "sysEx";
+ var n = e.readVarInt();
+ return t.data = e.readBytes(n),
+ t
+ }
+ if (247 == i) {
+ t.type = "endSysEx";
+ var n = e.readVarInt();
+ return t.data = e.readBytes(n),
+ t
+ }
+ throw "Unrecognised MIDI event type byte: " + i
+ }
+ t.meta = !0;
+ var r = e.readUInt8()
+ , n = e.readVarInt();
+ switch (r) {
+ case 0:
+ if (t.type = "sequenceNumber",
+ 2 !== n)
+ throw "Expected length for sequenceNumber event is 2, got " + n;
+ return t.number = stream.readUInt16(),
+ t;
+ case 1:
+ return t.type = "text",
+ t.text = e.readString(n),
+ t;
+ case 2:
+ return t.type = "copyrightNotice",
+ t.text = e.readString(n),
+ t;
+ case 3:
+ return t.type = "trackName",
+ t.text = e.readString(n),
+ t;
+ case 4:
+ return t.type = "instrumentName",
+ t.text = e.readString(n),
+ t;
+ case 5:
+ return t.type = "lyrics",
+ t.text = e.readString(n),
+ t;
+ case 6:
+ return t.type = "marker",
+ t.text = e.readString(n),
+ t;
+ case 7:
+ return t.type = "cuePoint",
+ t.text = e.readString(n),
+ t;
+ case 32:
+ if (t.type = "channelPrefix",
+ 1 != n)
+ throw "Expected length for channelPrefix event is 1, got " + n;
+ return t.channel = e.readUInt8(),
+ t;
+ case 33:
+ if (t.type = "portPrefix",
+ 1 != n)
+ throw "Expected length for portPrefix event is 1, got " + n;
+ return t.port = e.readUInt8(),
+ t;
+ case 47:
+ if (t.type = "endOfTrack",
+ 0 != n)
+ throw "Expected length for endOfTrack event is 0, got " + n;
+ return t;
+ case 81:
+ if (t.type = "setTempo",
+ 3 != n)
+ throw "Expected length for setTempo event is 3, got " + n;
+ return t.microsecondsPerBeat = e.readUInt24(),
+ t;
+ case 84:
+ if (t.type = "smpteOffset",
+ 5 != n)
+ throw "Expected length for smpteOffset event is 5, got " + n;
+ var s = e.readUInt8()
+ , a = {
+ 0: 24,
+ 32: 25,
+ 64: 29,
+ 96: 30
+ };
+ return t.frameRate = a[96 & s],
+ t.hour = 31 & s,
+ t.min = e.readUInt8(),
+ t.sec = e.readUInt8(),
+ t.frame = e.readUInt8(),
+ t.subFrame = e.readUInt8(),
+ t;
+ case 88:
+ if (t.type = "timeSignature",
+ 4 != n)
+ throw "Expected length for timeSignature event is 4, got " + n;
+ return t.numerator = e.readUInt8(),
+ t.denominator = 1 << e.readUInt8(),
+ t.metronome = e.readUInt8(),
+ t.thirtyseconds = e.readUInt8(),
+ t;
+ case 89:
+ if (t.type = "keySignature",
+ 2 != n)
+ throw "Expected length for keySignature event is 2, got " + n;
+ return t.key = e.readInt8(),
+ t.scale = e.readUInt8(),
+ t;
+ case 127:
+ return t.type = "sequencerSpecific",
+ t.data = e.readBytes(n),
+ t;
+ default:
+ return t.type = "unknownMeta",
+ t.data = e.readBytes(n),
+ t.metatypeByte = r,
+ t
+ }
+ } else {
+ var u;
+ if (0 == (128 & i)) {
+ if (null === o)
+ throw "Running status byte encountered before status byte";
+ u = i,
+ i = o,
+ t.running = !0
+ } else
+ u = e.readUInt8(),
+ o = i;
+ var l = i >> 4;
+ switch (t.channel = 15 & i,
+ l) {
+ case 8:
+ return t.type = "noteOff",
+ t.noteNumber = u,
+ t.velocity = e.readUInt8(),
+ t;
+ case 9:
+ var c = e.readUInt8();
+ return t.type = 0 === c ? "noteOff" : "noteOn",
+ t.noteNumber = u,
+ t.velocity = c,
+ t;
+ case 10:
+ return t.type = "noteAftertouch",
+ t.noteNumber = u,
+ t.amount = e.readUInt8(),
+ t;
+ case 11:
+ return t.type = "controller",
+ t.controllerType = u,
+ t.value = e.readUInt8(),
+ t;
+ case 12:
+ return t.type = "programChange",
+ t.programNumber = u,
+ t;
+ case 13:
+ return t.type = "channelAftertouch",
+ t.amount = u,
+ t;
+ case 14:
+ return t.type = "pitchBend",
+ t.value = u + (e.readUInt8() << 7) - 8192,
+ t;
+ default:
+ throw "Unrecognised MIDI event type: " + l
+ }
+ }
+ }();
+ i.push(n)
+ }
+ return i;
+ var o
+ }
+ function r(t) {
+ this.buffer = t,
+ this.bufferLen = this.buffer.length,
+ this.pos = 0
+ }
+ r.prototype.eof = function() {
+ return this.pos >= this.bufferLen
+ }
+ ,
+ r.prototype.readUInt8 = function() {
+ var t = this.buffer[this.pos];
+ return this.pos += 1,
+ t
+ }
+ ,
+ r.prototype.readInt8 = function() {
+ var t = this.readUInt8();
+ return 128 & t ? t - 256 : t
+ }
+ ,
+ r.prototype.readUInt16 = function() {
+ return (this.readUInt8() << 8) + this.readUInt8()
+ }
+ ,
+ r.prototype.readInt16 = function() {
+ var t = this.readUInt16();
+ return 32768 & t ? t - 65536 : t
+ }
+ ,
+ r.prototype.readUInt24 = function() {
+ return (this.readUInt8() << 16) + (this.readUInt8() << 8) + this.readUInt8()
+ }
+ ,
+ r.prototype.readInt24 = function() {
+ var t = this.readUInt24();
+ return 8388608 & t ? t - 16777216 : t
+ }
+ ,
+ r.prototype.readUInt32 = function() {
+ return (this.readUInt8() << 24) + (this.readUInt8() << 16) + (this.readUInt8() << 8) + this.readUInt8()
+ }
+ ,
+ r.prototype.readBytes = function(t) {
+ var e = this.buffer.slice(this.pos, this.pos + t);
+ return this.pos += t,
+ e
+ }
+ ,
+ r.prototype.readString = function(t) {
+ var e = this.readBytes(t);
+ return String.fromCharCode.apply(null, e)
+ }
+ ,
+ r.prototype.readVarInt = function() {
+ for (var t = 0; !this.eof(); ) {
+ var e = this.readUInt8();
+ if (!(128 & e))
+ return t + e;
+ t += 127 & e,
+ t <<= 7
+ }
+ return t
+ }
+ ,
+ r.prototype.readChunk = function() {
+ var t = this.readString(4)
+ , e = this.readUInt32();
+ return {
+ id: t,
+ length: e,
+ data: this.readBytes(e)
+ }
+ }
+ ,
+ t.exports = i
+}
+, function(t, e) {
+ function i(t) {
+ if ("object" != typeof t)
+ throw "Invalid MIDI data";
+ var e, i = t.header || {}, r = t.tracks || [], a = r.length, u = new s;
+ for (n(u, i, a),
+ e = 0; e < a; e++)
+ o(u, r[e]);
+ return u.buffer
+ }
+ function n(t, e, i) {
+ var n = null == e.format ? 1 : e.format
+ , o = 128;
+ e.timeDivision ? o = e.timeDivision : e.ticksPerFrame && e.framesPerSecond ? o = -(255 & e.framesPerSecond) << 8 | 255 & ticksPerFrame : e.ticksPerBeat && (o = 32767 & e.ticksPerBeat);
+ var r = new s;
+ r.writeUInt16(n),
+ r.writeUInt16(i),
+ r.writeUInt16(o),
+ t.writeChunk("MThd", r.buffer)
+ }
+ function o(t, e) {
+ var i, n = new s, o = e.length;
+ for (i = 0; i < o; i++)
+ r(n, e[i]);
+ t.writeChunk("MTrk", n.buffer)
+ }
+ function r(t, e) {
+ var i = e.type
+ , n = e.deltaTime
+ , o = e.text || ""
+ , r = e.data || [];
+ switch (t.writeVarInt(n),
+ i) {
+ case "sequenceNumber":
+ t.writeUInt8(255),
+ t.writeUInt8(0),
+ t.writeVarInt(2),
+ t.writeUInt16(e.number);
+ break;
+ case "text":
+ t.writeUInt8(255),
+ t.writeUInt8(1),
+ t.writeVarInt(o.length),
+ t.writeString(o);
+ break;
+ case "copyrightNotice":
+ t.writeUInt8(255),
+ t.writeUInt8(2),
+ t.writeVarInt(o.length),
+ t.writeString(o);
+ break;
+ case "trackName":
+ t.writeUInt8(255),
+ t.writeUInt8(3),
+ t.writeVarInt(o.length),
+ t.writeString(o);
+ break;
+ case "instrumentName":
+ t.writeUInt8(255),
+ t.writeUInt8(4),
+ t.writeVarInt(o.length),
+ t.writeString(o);
+ break;
+ case "lyrics":
+ t.writeUInt8(255),
+ t.writeUInt8(5),
+ t.writeVarInt(o.length),
+ t.writeString(o);
+ break;
+ case "marker":
+ t.writeUInt8(255),
+ t.writeUInt8(6),
+ t.writeVarInt(o.length),
+ t.writeString(o);
+ break;
+ case "cuePoint":
+ t.writeUInt8(255),
+ t.writeUInt8(7),
+ t.writeVarInt(o.length),
+ t.writeString(o);
+ break;
+ case "channelPrefix":
+ t.writeUInt8(255),
+ t.writeUInt8(32),
+ t.writeVarInt(1),
+ t.writeUInt8(e.channel);
+ break;
+ case "portPrefix":
+ t.writeUInt8(255),
+ t.writeUInt8(33),
+ t.writeVarInt(1),
+ t.writeUInt8(e.port);
+ break;
+ case "endOfTrack":
+ t.writeUInt8(255),
+ t.writeUInt8(47),
+ t.writeVarInt(0);
+ break;
+ case "setTempo":
+ t.writeUInt8(255),
+ t.writeUInt8(81),
+ t.writeVarInt(3),
+ t.writeUInt24(e.microsecondsPerBeat);
+ break;
+ case "smpteOffset":
+ t.writeUInt8(255),
+ t.writeUInt8(84),
+ t.writeVarInt(5);
+ var s = 31 & e.hour | FRAME_RATES[e.frameRate];
+ t.writeUInt8(s),
+ t.writeUInt8(e.min),
+ t.writeUInt8(e.sec),
+ t.writeUInt8(e.frame),
+ t.writeUInt8(e.subFrame);
+ break;
+ case "timeSignature":
+ t.writeUInt8(255),
+ t.writeUInt8(88),
+ t.writeVarInt(4);
+ var a = 255 & Math.floor(Math.log(e.denominator) / Math.LN2);
+ t.writeUInt8(a),
+ t.writeUInt8(e.numerator),
+ t.writeUInt8(e.metronome),
+ t.writeUInt8(e.thirtyseconds || 8);
+ break;
+ case "keySignature":
+ t.writeUInt8(255),
+ t.writeUInt8(89),
+ t.writeVarInt(2),
+ t.writeInt8(e.key),
+ t.writeUInt8(e.scale);
+ break;
+ case "sequencerSpecific":
+ t.writeUInt8(255),
+ t.writeUInt8(127),
+ t.writeVarInt(r.length),
+ t.writeBytes(r);
+ break;
+ case "unknownMeta":
+ null != e.metatypeByte && (t.writeUInt8(255),
+ t.writeUInt8(e.metatypeByte),
+ t.writeVarInt(r.length),
+ t.writeBytes(r));
+ break;
+ case "sysEx":
+ t.writeUInt8(240),
+ t.writeVarInt(r.length),
+ t.writeBytes(r);
+ break;
+ case "endSysEx":
+ t.writeUInt8(247),
+ t.writeVarInt(r.length),
+ t.writeBytes(r);
+ break;
+ case "noteOff":
+ var u = 0 == e.velocity ? 144 : 128;
+ t.writeUInt8(u | e.channel),
+ t.writeUInt8(e.noteNumber),
+ t.writeUInt8(e.velocity);
+ break;
+ case "noteOn":
+ t.writeUInt8(144 | e.channel),
+ t.writeUInt8(e.noteNumber),
+ t.writeUInt8(e.velocity);
+ break;
+ case "noteAftertouch":
+ t.writeUInt8(160 | e.channel),
+ t.writeUInt8(e.noteNumber),
+ t.writeUInt8(e.amount);
+ break;
+ case "controller":
+ t.writeUInt8(176 | e.channel),
+ t.writeUInt8(e.controllerType),
+ t.writeUInt8(e.value);
+ break;
+ case "programChange":
+ t.writeUInt8(192 | e.channel),
+ t.writeUInt8(e.programNumber);
+ break;
+ case "channelAftertouch":
+ t.writeUInt8(208 | e.channel),
+ t.writeUInt8(e.amount);
+ break;
+ case "pitchBend":
+ t.writeUInt8(224 | e.channel);
+ var l = 8192 + e.value
+ , c = 127 & l
+ , h = l >> 7 & 127;
+ t.writeUInt8(c),
+ t.writeUInt8(h);
+ break;
+ default:
+ throw "Unrecognized event type: " + i
+ }
+ }
+ function s() {
+ this.buffer = []
+ }
+ s.prototype.writeUInt8 = function(t) {
+ this.buffer.push(255 & t)
+ }
+ ,
+ s.prototype.writeInt8 = s.prototype.writeUInt8,
+ s.prototype.writeUInt16 = function(t) {
+ var e = t >> 8 & 255
+ , i = 255 & t;
+ this.writeUInt8(e),
+ this.writeUInt8(i)
+ }
+ ,
+ s.prototype.writeInt16 = s.prototype.writeUInt16,
+ s.prototype.writeUInt24 = function(t) {
+ var e = t >> 16 & 255
+ , i = t >> 8 & 255
+ , n = 255 & t;
+ this.writeUInt8(e),
+ this.writeUInt8(i),
+ this.writeUInt8(n)
+ }
+ ,
+ s.prototype.writeInt24 = s.prototype.writeUInt24,
+ s.prototype.writeUInt32 = function(t) {
+ var e = t >> 24 & 255
+ , i = t >> 16 & 255
+ , n = t >> 8 & 255
+ , o = 255 & t;
+ this.writeUInt8(e),
+ this.writeUInt8(i),
+ this.writeUInt8(n),
+ this.writeUInt8(o)
+ }
+ ,
+ s.prototype.writeInt32 = s.prototype.writeUInt32,
+ s.prototype.writeBytes = function(t) {
+ this.buffer = this.buffer.concat(t)
+ }
+ ,
+ s.prototype.writeString = function(t) {
+ var e, i = t.length, n = [];
+ for (e = 0; e < i; e++)
+ n.push(t.codePointAt(e));
+ this.writeBytes(n)
+ }
+ ,
+ s.prototype.writeVarInt = function(t) {
+ if (t < 0)
+ throw "Cannot write negative variable-length integer";
+ if (t <= 127)
+ this.writeUInt8(t);
+ else {
+ for (var e = t, i = []; ; ) {
+ if (e <= 127) {
+ i.push(128 | e);
+ break
+ }
+ var n = 127 & e;
+ e >>= 7,
+ i.push(n)
+ }
+ this.writeBytes(i.reverse())
+ }
+ }
+ ,
+ s.prototype.writeChunk = function(t, e) {
+ this.writeString(t),
+ this.writeUInt32(e.length),
+ this.writeBytes(e)
+ }
+ ,
+ t.exports = i
+}
+, function(t, e, i) {
+ "use strict";
+ t.exports = function(t, e, i) {
+ if (null == t || null == e)
+ return t;
+ var n = String(t)
+ , o = "number" == typeof e ? e : parseInt(e, 10);
+ if (isNaN(o) || !isFinite(o))
+ return n;
+ var r = n.length;
+ if (r >= o)
+ return n;
+ var s = null == i ? "" : String(i);
+ "" === s && (s = " ");
+ for (var a = o - r; s.length < a; )
+ s += s;
+ return (s.length > a ? s.substr(0, a) : s) + n
+ }
+}
+, function(t, e) {
+ function i() {
+ throw new Error("setTimeout has not been defined")
+ }
+ function n() {
+ throw new Error("clearTimeout has not been defined")
+ }
+ function o(t) {
+ if (c === setTimeout)
+ return setTimeout(t, 0);
+ if ((c === i || !c) && setTimeout)
+ return c = setTimeout,
+ setTimeout(t, 0);
+ try {
+ return c(t, 0)
+ } catch (e) {
+ try {
+ return c.call(null, t, 0)
+ } catch (e) {
+ return c.call(this, t, 0)
+ }
+ }
+ }
+ function r(t) {
+ if (h === clearTimeout)
+ return clearTimeout(t);
+ if ((h === n || !h) && clearTimeout)
+ return h = clearTimeout,
+ clearTimeout(t);
+ try {
+ return h(t)
+ } catch (e) {
+ try {
+ return h.call(null, t)
+ } catch (e) {
+ return h.call(this, t)
+ }
+ }
+ }
+ function s() {
+ y && f && (y = !1,
+ f.length ? d = f.concat(d) : _ = -1,
+ d.length && a())
+ }
+ function a() {
+ if (!y) {
+ var t = o(s);
+ y = !0;
+ for (var e = d.length; e; ) {
+ for (f = d,
+ d = []; ++_ < e; )
+ f && f[_].run();
+ _ = -1,
+ e = d.length
+ }
+ f = null,
+ y = !1,
+ r(t)
+ }
+ }
+ function u(t, e) {
+ this.fun = t,
+ this.array = e
+ }
+ function l() {}
+ var c, h, p = t.exports = {};
+ !function() {
+ try {
+ c = "function" == typeof setTimeout ? setTimeout : i
+ } catch (t) {
+ c = i
+ }
+ try {
+ h = "function" == typeof clearTimeout ? clearTimeout : n
+ } catch (t) {
+ h = n
+ }
+ }();
+ var f, d = [], y = !1, _ = -1;
+ p.nextTick = function(t) {
+ var e = new Array(arguments.length - 1);
+ if (arguments.length > 1)
+ for (var i = 1; i < arguments.length; i++)
+ e[i - 1] = arguments[i];
+ d.push(new u(t,e)),
+ 1 !== d.length || y || o(a)
+ }
+ ,
+ u.prototype.run = function() {
+ this.fun.apply(null, this.array)
+ }
+ ,
+ p.title = "browser",
+ p.browser = !0,
+ p.env = {},
+ p.argv = [],
+ p.version = "",
+ p.versions = {},
+ p.on = l,
+ p.addListener = l,
+ p.once = l,
+ p.off = l,
+ p.removeListener = l,
+ p.removeAllListeners = l,
+ p.emit = l,
+ p.prependListener = l,
+ p.prependOnceListener = l,
+ p.listeners = function(t) {
+ return []
+ }
+ ,
+ p.binding = function(t) {
+ throw new Error("process.binding is not supported")
+ }
+ ,
+ p.cwd = function() {
+ return "/"
+ }
+ ,
+ p.chdir = function(t) {
+ throw new Error("process.chdir is not supported")
+ }
+ ,
+ p.umask = function() {
+ return 0
+ }
+}
+, function(t, e, i) {
+ "use strict";
+ function n(t, e) {
+ return Object.prototype.hasOwnProperty.call(t, e)
+ }
+ t.exports = function(t, e, i, r) {
+ e = e || "&",
+ i = i || "=";
+ var s = {};
+ if ("string" != typeof t || 0 === t.length)
+ return s;
+ var a = /\+/g;
+ t = t.split(e);
+ var u = 1e3;
+ r && "number" == typeof r.maxKeys && (u = r.maxKeys);
+ var l = t.length;
+ u > 0 && l > u && (l = u);
+ for (var c = 0; c < l; ++c) {
+ var h, p, f, d, y = t[c].replace(a, "%20"), _ = y.indexOf(i);
+ _ >= 0 ? (h = y.substr(0, _),
+ p = y.substr(_ + 1)) : (h = y,
+ p = ""),
+ f = decodeURIComponent(h),
+ d = decodeURIComponent(p),
+ n(s, f) ? o(s[f]) ? s[f].push(d) : s[f] = [s[f], d] : s[f] = d
+ }
+ return s
+ }
+ ;
+ var o = Array.isArray || function(t) {
+ return "[object Array]" === Object.prototype.toString.call(t)
+ }
+}
+, function(t, e, i) {
+ "use strict";
+ function n(t, e) {
+ if (t.map)
+ return t.map(e);
+ for (var i = [], n = 0; n < t.length; n++)
+ i.push(e(t[n], n));
+ return i
+ }
+ var o = function(t) {
+ switch (typeof t) {
+ case "string":
+ return t;
+ case "boolean":
+ return t ? "true" : "false";
+ case "number":
+ return isFinite(t) ? t : "";
+ default:
+ return ""
+ }
+ };
+ t.exports = function(t, e, i, a) {
+ return e = e || "&",
+ i = i || "=",
+ null === t && (t = void 0),
+ "object" == typeof t ? n(s(t), function(s) {
+ var a = encodeURIComponent(o(s)) + i;
+ return r(t[s]) ? n(t[s], function(t) {
+ return a + encodeURIComponent(o(t))
+ }).join(e) : a + encodeURIComponent(o(t[s]))
+ }).join(e) : a ? encodeURIComponent(o(a)) + i + encodeURIComponent(o(t)) : ""
+ }
+ ;
+ var r = Array.isArray || function(t) {
+ return "[object Array]" === Object.prototype.toString.call(t)
+ }
+ , s = Object.keys || function(t) {
+ var e = [];
+ for (var i in t)
+ Object.prototype.hasOwnProperty.call(t, i) && e.push(i);
+ return e
+ }
+}
+, function(t, e, i) {
+ "use strict";
+ e.decode = e.parse = i(62),
+ e.encode = e.stringify = i(63)
+}
+, function(t, e) {
+ function i(t) {
+ var e;
+ if ("SELECT" === t.nodeName)
+ t.focus(),
+ e = t.value;
+ else if ("INPUT" === t.nodeName || "TEXTAREA" === t.nodeName) {
+ var i = t.hasAttribute("readonly");
+ i || t.setAttribute("readonly", ""),
+ t.select(),
+ t.setSelectionRange(0, t.value.length),
+ i || t.removeAttribute("readonly"),
+ e = t.value
+ } else {
+ t.hasAttribute("contenteditable") && t.focus();
+ var n = window.getSelection()
+ , o = document.createRange();
+ o.selectNodeContents(t),
+ n.removeAllRanges(),
+ n.addRange(o),
+ e = n.toString()
+ }
+ return e
+ }
+ t.exports = i
+}
+, function(t, e, i) {
+ var n, o, r;
+ /**
+ * StartAudioContext.js
+ * @author Yotam Mann
+ * @license http://opensource.org/licenses/MIT MIT License
+ * @copyright 2016 Yotam Mann
+ */
+ !function(i, s) {
+ o = [],
+ n = s,
+ void 0 !== (r = "function" == typeof n ? n.apply(e, o) : n) && (t.exports = r)
+ }(0, function() {
+ function t(t) {
+ var e = t.createBuffer(1, 1, t.sampleRate)
+ , i = t.createBufferSource();
+ i.buffer = e,
+ i.connect(t.destination),
+ i.start(0),
+ t.resume && t.resume()
+ }
+ function e(t) {
+ return "running" === t.state
+ }
+ function i(t, i) {
+ function n() {
+ e(t) ? i() : (requestAnimationFrame(n),
+ t.resume && t.resume())
+ }
+ e(t) ? i() : n()
+ }
+ function n(t, e, i) {
+ if (Array.isArray(t) || NodeList && t instanceof NodeList)
+ for (var o = 0; o < t.length; o++)
+ n(t[o], e, i);
+ else if ("string" == typeof t)
+ n(document.querySelectorAll(t), e, i);
+ else if (t.jquery && "function" == typeof t.toArray)
+ n(t.toArray(), e, i);
+ else if (Element && t instanceof Element) {
+ var s = new r(t,i);
+ e.push(s)
+ }
+ }
+ function o(t, e, o) {
+ var r = new Promise(function(e) {
+ i(t, e)
+ }
+ )
+ , s = [];
+ return e || (e = document.body),
+ n(e, s, t),
+ r.then(function() {
+ for (var t = 0; t < s.length; t++)
+ s[t].dispose();
+ s = null,
+ o && o()
+ }),
+ r
+ }
+ var r = function(t, e) {
+ this._dragged = !1,
+ this._element = t,
+ this._bindedMove = this._moved.bind(this),
+ this._bindedEnd = this._ended.bind(this, e),
+ t.addEventListener("touchstart", this._bindedEnd),
+ t.addEventListener("touchmove", this._bindedMove),
+ t.addEventListener("touchend", this._bindedEnd),
+ t.addEventListener("mouseup", this._bindedEnd)
+ };
+ return r.prototype._moved = function(t) {
+ this._dragged = !0
+ }
+ ,
+ r.prototype._ended = function(e) {
+ this._dragged || t(e),
+ this._dragged = !1
+ }
+ ,
+ r.prototype.dispose = function() {
+ this._element.removeEventListener("touchstart", this._bindedEnd),
+ this._element.removeEventListener("touchmove", this._bindedMove),
+ this._element.removeEventListener("touchend", this._bindedEnd),
+ this._element.removeEventListener("mouseup", this._bindedEnd),
+ this._bindedMove = null,
+ this._bindedEnd = null,
+ this._element = null
+ }
+ ,
+ o
+ })
+}
+, function(t, e, i) {
+ var n = i(48);
+ "string" == typeof n && (n = [[t.i, n, ""]]);
+ i(10)(n, {});
+ n.locals && (t.exports = n.locals)
+}
+, function(t, e, i) {
+ var n = i(49);
+ "string" == typeof n && (n = [[t.i, n, ""]]);
+ i(10)(n, {});
+ n.locals && (t.exports = n.locals)
+}
+, function(t, e, i) {
+ var n = i(50);
+ "string" == typeof n && (n = [[t.i, n, ""]]);
+ i(10)(n, {});
+ n.locals && (t.exports = n.locals)
+}
+, function(t, e) {
+ function i() {}
+ i.prototype = {
+ on: function(t, e, i) {
+ var n = this.e || (this.e = {});
+ return (n[t] || (n[t] = [])).push({
+ fn: e,
+ ctx: i
+ }),
+ this
+ },
+ once: function(t, e, i) {
+ function n() {
+ o.off(t, n),
+ e.apply(i, arguments)
+ }
+ var o = this;
+ return n._ = e,
+ this.on(t, n, i)
+ },
+ emit: function(t) {
+ var e = [].slice.call(arguments, 1)
+ , i = ((this.e || (this.e = {}))[t] || []).slice()
+ , n = 0
+ , o = i.length;
+ for (n; n < o; n++)
+ i[n].fn.apply(i[n].ctx, e);
+ return this
+ },
+ off: function(t, e) {
+ var i = this.e || (this.e = {})
+ , n = i[t]
+ , o = [];
+ if (n && e)
+ for (var r = 0, s = n.length; r < s; r++)
+ n[r].fn !== e && n[r].fn._ !== e && o.push(n[r]);
+ return o.length ? i[t] = o : delete i[t],
+ this
+ }
+ },
+ t.exports = i
+}
+, function(t, e, i) {
+ !function(e, n) {
+ t.exports = n(i(2))
+ }(0, function(t) {
+ return function(t) {
+ function e(n) {
+ if (i[n])
+ return i[n].exports;
+ var o = i[n] = {
+ i: n,
+ l: !1,
+ exports: {}
+ };
+ return t[n].call(o.exports, o, o.exports, e),
+ o.l = !0,
+ o.exports
+ }
+ var i = {};
+ return e.m = t,
+ e.c = i,
+ e.i = function(t) {
+ return t
+ }
+ ,
+ e.d = function(t, i, n) {
+ e.o(t, i) || Object.defineProperty(t, i, {
+ configurable: !1,
+ enumerable: !0,
+ get: n
+ })
+ }
+ ,
+ e.n = function(t) {
+ var i = t && t.__esModule ? function() {
+ return t.default
+ }
+ : function() {
+ return t
+ }
+ ;
+ return e.d(i, "a", i),
+ i
+ }
+ ,
+ e.o = function(t, e) {
+ return Object.prototype.hasOwnProperty.call(t, e)
+ }
+ ,
+ e.p = "",
+ e(e.s = 8)
+ }([function(e, i) {
+ e.exports = t
+ }
+ , function(t, e, i) {
+ "use strict";
+ Object.defineProperty(e, "__esModule", {
+ value: !0
+ });
+ var n = i(2);
+ e.default = {
+ getReleasesUrl: function(t) {
+ return "rel" + (t - 20) + ".[mp3|ogg]"
+ },
+ getHarmonicsUrl: function(t) {
+ return "harmL" + (0,
+ n.midiToNote)(t).replace("#", "s") + ".[mp3|ogg]"
+ },
+ getNotesUrl: function(t, e) {
+ return (0,
+ n.midiToNote)(t).replace("#", "s") + "v" + e + ".[mp3|ogg]"
+ }
+ }
+ }
+ , function(t, e, i) {
+ "use strict";
+ function n(t) {
+ return (0,
+ u.Frequency)(t).toMidi()
+ }
+ function o(t) {
+ return (0,
+ u.Frequency)(t, "midi").toNote()
+ }
+ function r(t) {
+ var e = t % 3;
+ return 1 === e ? [t - 1, l.default.intervalToFrequencyRatio(1)] : 2 === e ? [t + 1, l.default.intervalToFrequencyRatio(-1)] : [t, 1]
+ }
+ function s(t) {
+ return new u.BufferSource(t)
+ }
+ function a(t, e) {
+ return Math.random() * (e - t) + t
+ }
+ Object.defineProperty(e, "__esModule", {
+ value: !0
+ }),
+ e.randomBetween = e.midiToFrequencyRatio = e.createSource = e.noteToMidi = e.midiToNote = void 0;
+ var u = i(0)
+ , l = function(t) {
+ return t && t.__esModule ? t : {
+ default: t
+ }
+ }(u);
+ e.midiToNote = o,
+ e.noteToMidi = n,
+ e.createSource = s,
+ e.midiToFrequencyRatio = r,
+ e.randomBetween = a
+ }
+ , function(t, e, i) {
+ "use strict";
+ function n(t, e) {
+ if (!(t instanceof e))
+ throw new TypeError("Cannot call a class as a function")
+ }
+ function o(t, e) {
+ if (!t)
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
+ return !e || "object" != typeof e && "function" != typeof e ? t : e
+ }
+ function r(t, e) {
+ if ("function" != typeof e && null !== e)
+ throw new TypeError("Super expression must either be null or a function, not " + typeof e);
+ t.prototype = Object.create(e && e.prototype, {
+ constructor: {
+ value: t,
+ enumerable: !1,
+ writable: !0,
+ configurable: !0
+ }
+ }),
+ e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
+ }
+ Object.defineProperty(e, "__esModule", {
+ value: !0
+ });
+ var s = function() {
+ function t(t, e) {
+ for (var i = 0; i < e.length; i++) {
+ var n = e[i];
+ n.enumerable = n.enumerable || !1,
+ n.configurable = !0,
+ "value"in n && (n.writable = !0),
+ Object.defineProperty(t, n.key, n)
+ }
+ }
+ return function(e, i, n) {
+ return i && t(e.prototype, i),
+ n && t(e, n),
+ e
+ }
+ }()
+ , a = i(0)
+ , u = function(t) {
+ return t && t.__esModule ? t : {
+ default: t
+ }
+ }(a)
+ , l = function(t) {
+ function e() {
+ var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0;
+ n(this, e);
+ var i = o(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this));
+ return i.createInsOuts(0, 1),
+ i.volume = t,
+ i
+ }
+ return r(e, t),
+ s(e, [{
+ key: "volume",
+ get: function() {
+ return u.default.gainToDb(this.output.gain.value)
+ },
+ set: function(t) {
+ this.output.gain.value = u.default.dbToGain(t)
+ }
+ }]),
+ e
+ }(a.AudioNode);
+ e.default = l
+ }
+ , function(t, e, i) {
+ "use strict";
+ function n(t) {
+ return t && t.__esModule ? t : {
+ default: t
+ }
+ }
+ function o(t, e) {
+ if (!(t instanceof e))
+ throw new TypeError("Cannot call a class as a function")
+ }
+ function r(t, e) {
+ if (!t)
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
+ return !e || "object" != typeof e && "function" != typeof e ? t : e
+ }
+ function s(t, e) {
+ if ("function" != typeof e && null !== e)
+ throw new TypeError("Super expression must either be null or a function, not " + typeof e);
+ t.prototype = Object.create(e && e.prototype, {
+ constructor: {
+ value: t,
+ enumerable: !1,
+ writable: !0,
+ configurable: !0
+ }
+ }),
+ e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
+ }
+ Object.defineProperty(e, "__esModule", {
+ value: !0
+ });
+ var a = function() {
+ function t(t, e) {
+ for (var i = 0; i < e.length; i++) {
+ var n = e[i];
+ n.enumerable = n.enumerable || !1,
+ n.configurable = !0,
+ "value"in n && (n.writable = !0),
+ Object.defineProperty(t, n.key, n)
+ }
+ }
+ return function(e, i, n) {
+ return i && t(e.prototype, i),
+ n && t(e, n),
+ e
+ }
+ }()
+ , u = i(1)
+ , l = n(u)
+ , c = i(3)
+ , h = n(c)
+ , p = i(2)
+ , f = i(0)
+ , d = [21, 24, 27, 30, 33, 36, 39, 42, 45, 48, 51, 54, 57, 60, 63, 66, 69, 72, 75, 78, 81, 84, 87]
+ , y = function(t) {
+ function e() {
+ var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [21, 108];
+ o(this, e);
+ var i = r(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this))
+ , n = d.findIndex(function(e) {
+ return e >= t[0]
+ })
+ , s = d.findIndex(function(e) {
+ return e >= t[1]
+ });
+ s = -1 === s ? s = d.length : s;
+ var a = d.slice(n, s);
+ i._samples = {};
+ var u = !0
+ , c = !1
+ , h = void 0;
+ try {
+ for (var p, f = a[Symbol.iterator](); !(u = (p = f.next()).done); u = !0) {
+ var y = p.value;
+ i._samples[y] = l.default.getHarmonicsUrl(y)
+ }
+ } catch (t) {
+ c = !0,
+ h = t
+ } finally {
+ try {
+ !u && f.return && f.return()
+ } finally {
+ if (c)
+ throw h
+ }
+ }
+ return i
+ }
+ return s(e, t),
+ a(e, [{
+ key: "start",
+ value: function(t, e, i) {
+ t >= d[0] && t <= d[d.length - 1] && this._sampler.triggerAttack((0,
+ p.midiToNote)(t), e, i * (0,
+ p.randomBetween)(.5, 1))
+ }
+ }, {
+ key: "load",
+ value: function(t) {
+ var e = this;
+ return new Promise(function(i, n) {
+ e._sampler = new f.Sampler(e._samples,i,t).connect(e.output),
+ e._sampler.release = 1
+ }
+ )
+ }
+ }]),
+ e
+ }(h.default);
+ e.default = y
+ }
+ , function(t, e, i) {
+ "use strict";
+ function n(t) {
+ return t && t.__esModule ? t : {
+ default: t
+ }
+ }
+ function o(t, e) {
+ if (!(t instanceof e))
+ throw new TypeError("Cannot call a class as a function")
+ }
+ function r(t, e) {
+ if (!t)
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
+ return !e || "object" != typeof e && "function" != typeof e ? t : e
+ }
+ function s(t, e) {
+ if ("function" != typeof e && null !== e)
+ throw new TypeError("Super expression must either be null or a function, not " + typeof e);
+ t.prototype = Object.create(e && e.prototype, {
+ constructor: {
+ value: t,
+ enumerable: !1,
+ writable: !0,
+ configurable: !0
+ }
+ }),
+ e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
+ }
+ Object.defineProperty(e, "__esModule", {
+ value: !0
+ }),
+ e.Notes = void 0;
+ var a = function() {
+ function t(t, e) {
+ var i = []
+ , n = !0
+ , o = !1
+ , r = void 0;
+ try {
+ for (var s, a = t[Symbol.iterator](); !(n = (s = a.next()).done) && (i.push(s.value),
+ !e || i.length !== e); n = !0)
+ ;
+ } catch (t) {
+ o = !0,
+ r = t
+ } finally {
+ try {
+ !n && a.return && a.return()
+ } finally {
+ if (o)
+ throw r
+ }
+ }
+ return i
+ }
+ return function(e, i) {
+ if (Array.isArray(e))
+ return e;
+ if (Symbol.iterator in Object(e))
+ return t(e, i);
+ throw new TypeError("Invalid attempt to destructure non-iterable instance")
+ }
+ }()
+ , u = function() {
+ function t(t, e) {
+ for (var i = 0; i < e.length; i++) {
+ var n = e[i];
+ n.enumerable = n.enumerable || !1,
+ n.configurable = !0,
+ "value"in n && (n.writable = !0),
+ Object.defineProperty(t, n.key, n)
+ }
+ }
+ return function(e, i, n) {
+ return i && t(e.prototype, i),
+ n && t(e, n),
+ e
+ }
+ }()
+ , l = i(0)
+ , c = (n(l),
+ i(1))
+ , h = n(c)
+ , p = i(3)
+ , f = n(p)
+ , d = i(2)
+ , y = {
+ 1: [8],
+ 2: [6, 12],
+ 3: [1, 8, 15],
+ 4: [1, 5, 10, 15],
+ 5: [1, 4, 8, 12, 16],
+ 6: [1, 3, 7, 10, 13, 16],
+ 7: [1, 3, 6, 9, 11, 13, 16],
+ 8: [1, 3, 5, 7, 9, 11, 13, 15],
+ 9: [1, 3, 5, 7, 9, 11, 13, 15, 16],
+ 10: [1, 2, 3, 5, 7, 9, 11, 13, 15, 16],
+ 11: [1, 2, 3, 5, 7, 9, 11, 13, 14, 15, 16],
+ 12: [1, 2, 3, 4, 5, 7, 9, 11, 13, 14, 15, 16],
+ 13: [1, 2, 3, 4, 5, 7, 9, 11, 12, 13, 14, 15, 16],
+ 14: [1, 2, 3, 4, 5, 6, 7, 9, 11, 12, 13, 14, 15, 16],
+ 15: [1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16],
+ 16: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
+ }
+ , _ = [21, 24, 27, 30, 33, 36, 39, 42, 45, 48, 51, 54, 57, 60, 63, 66, 69, 72, 75, 78, 81, 84, 87, 90, 93, 96, 99, 102, 105, 108];
+ e.Notes = function(t) {
+ function e() {
+ var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [21, 108]
+ , i = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 1;
+ o(this, e);
+ var n = r(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this))
+ , s = _.findIndex(function(e) {
+ return e >= t[0]
+ })
+ , a = _.findIndex(function(e) {
+ return e >= t[1]
+ });
+ a = -1 === a ? a = _.length : a + 1;
+ var u = _.slice(s, a);
+ return n._samplers = y[i].slice(),
+ n._activeNotes = new Map,
+ n._samplers.forEach(function(t, e) {
+ n._samplers[e] = {},
+ u.forEach(function(i) {
+ n._samplers[e][i] = h.default.getNotesUrl(i, t)
+ })
+ }),
+ n
+ }
+ return s(e, t),
+ u(e, [{
+ key: "_hasNote",
+ value: function(t, e) {
+ return this._samplers.hasOwnProperty(e) && this._samplers[e].has(t)
+ }
+ }, {
+ key: "_getNote",
+ value: function(t, e) {
+ return this._samplers[e].get(t)
+ }
+ }, {
+ key: "stop",
+ value: function(t, e, i) {
+ this._activeNotes.has(t) && (this._activeNotes.get(t).forEach(function(t) {
+ t.stop(e + 1, 1)
+ }),
+ this._activeNotes.delete(t))
+ }
+ }, {
+ key: "start",
+ value: function(t, e, i) {
+ var n = i * (this._samplers.length - 1)
+ , o = Math.round(n)
+ , r = o - n
+ , s = 1 - .5 * r;
+ 1 === this._samplers.length && (s = Math.max(i, .05));
+ var u = (0,
+ d.midiToFrequencyRatio)(t)
+ , l = a(u, 2)
+ , c = l[0]
+ , h = l[1];
+ if (this._hasNote(c, o)) {
+ var p = (0,
+ d.createSource)(this._getNote(c, o));
+ p.playbackRate.value = h,
+ p.connect(this.output),
+ p.curve = "exponential",
+ p.start(e, 0, void 0, s, 0),
+ this._activeNotes.has(t) || this._activeNotes.set(t, []),
+ this._activeNotes.get(t).push(p)
+ }
+ }
+ }, {
+ key: "load",
+ value: function(t) {
+ var e = this
+ , i = [];
+ return this._samplers.forEach(function(n, o) {
+ var r = new Promise(function(i) {
+ e._samplers[o] = new l.Buffers(n,i,t)
+ }
+ );
+ i.push(r)
+ }),
+ Promise.all(i)
+ }
+ }]),
+ e
+ }(f.default)
+ }
+ , function(t, e, i) {
+ "use strict";
+ function n(t) {
+ return t && t.__esModule ? t : {
+ default: t
+ }
+ }
+ function o(t, e) {
+ if (!(t instanceof e))
+ throw new TypeError("Cannot call a class as a function")
+ }
+ function r(t, e) {
+ if (!t)
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
+ return !e || "object" != typeof e && "function" != typeof e ? t : e
+ }
+ function s(t, e) {
+ if ("function" != typeof e && null !== e)
+ throw new TypeError("Super expression must either be null or a function, not " + typeof e);
+ t.prototype = Object.create(e && e.prototype, {
+ constructor: {
+ value: t,
+ enumerable: !1,
+ writable: !0,
+ configurable: !0
+ }
+ }),
+ e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
+ }
+ Object.defineProperty(e, "__esModule", {
+ value: !0
+ });
+ var a = function() {
+ function t(t, e) {
+ for (var i = 0; i < e.length; i++) {
+ var n = e[i];
+ n.enumerable = n.enumerable || !1,
+ n.configurable = !0,
+ "value"in n && (n.writable = !0),
+ Object.defineProperty(t, n.key, n)
+ }
+ }
+ return function(e, i, n) {
+ return i && t(e.prototype, i),
+ n && t(e, n),
+ e
+ }
+ }()
+ , u = i(3)
+ , l = n(u)
+ , c = i(1)
+ , h = (n(c),
+ i(2))
+ , p = i(0)
+ , f = (n(p),
+ function(t) {
+ function e() {
+ o(this, e);
+ var t = r(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this));
+ return t._downTime = 1 / 0,
+ t._currentSound = null,
+ t._buffers = null,
+ t
+ }
+ return s(e, t),
+ a(e, [{
+ key: "load",
+ value: function(t) {
+ var e = this;
+ return new Promise(function(i) {
+ e._buffers = new p.Buffers({
+ up: "pedalU1.mp3",
+ down: "pedalD1.mp3"
+ },i,t)
+ }
+ )
+ }
+ }, {
+ key: "_squash",
+ value: function(t) {
+ this._currentSound && this._currentSound.stop(t + .1, .1),
+ this._currentSound = null
+ }
+ }, {
+ key: "_playSample",
+ value: function(t, e) {
+ this._currentSound = (0,
+ h.createSource)(this._buffers.get(e)),
+ this._currentSound.curve = "exponential",
+ this._currentSound.connect(this.output).start(t, (0,
+ h.randomBetween)(0, .01), void 0, .5 * (0,
+ h.randomBetween)(.5, 1), .05)
+ }
+ }, {
+ key: "down",
+ value: function(t) {
+ this._squash(t),
+ this._downTime = t,
+ this._playSample(t, "down")
+ }
+ }, {
+ key: "up",
+ value: function(t) {
+ this._squash(t),
+ this._downTime = 1 / 0,
+ this._playSample(t, "up")
+ }
+ }, {
+ key: "isDown",
+ value: function(t) {
+ return t > this._downTime
+ }
+ }]),
+ e
+ }(l.default));
+ e.default = f
+ }
+ , function(t, e, i) {
+ "use strict";
+ function n(t) {
+ return t && t.__esModule ? t : {
+ default: t
+ }
+ }
+ function o(t, e) {
+ if (!(t instanceof e))
+ throw new TypeError("Cannot call a class as a function")
+ }
+ function r(t, e) {
+ if (!t)
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
+ return !e || "object" != typeof e && "function" != typeof e ? t : e
+ }
+ function s(t, e) {
+ if ("function" != typeof e && null !== e)
+ throw new TypeError("Super expression must either be null or a function, not " + typeof e);
+ t.prototype = Object.create(e && e.prototype, {
+ constructor: {
+ value: t,
+ enumerable: !1,
+ writable: !0,
+ configurable: !0
+ }
+ }),
+ e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
+ }
+ Object.defineProperty(e, "__esModule", {
+ value: !0
+ });
+ var a = function() {
+ function t(t, e) {
+ for (var i = 0; i < e.length; i++) {
+ var n = e[i];
+ n.enumerable = n.enumerable || !1,
+ n.configurable = !0,
+ "value"in n && (n.writable = !0),
+ Object.defineProperty(t, n.key, n)
+ }
+ }
+ return function(e, i, n) {
+ return i && t(e.prototype, i),
+ n && t(e, n),
+ e
+ }
+ }()
+ , u = i(1)
+ , l = n(u)
+ , c = i(3)
+ , h = n(c)
+ , p = i(2)
+ , f = i(0)
+ , d = function(t) {
+ function e(t) {
+ o(this, e);
+ var i = r(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this));
+ i._buffers = {};
+ for (var n = t[0]; n <= t[1]; n++)
+ i._buffers[n] = l.default.getReleasesUrl(n);
+ return i
+ }
+ return s(e, t),
+ a(e, [{
+ key: "load",
+ value: function(t) {
+ var e = this;
+ return new Promise(function(i) {
+ e._buffers = new f.Buffers(e._buffers,i,t)
+ }
+ )
+ }
+ }, {
+ key: "start",
+ value: function(t, e, i) {
+ if (this._buffers.has(t)) {
+ var n = (0,
+ p.createSource)(this._buffers.get(t)).connect(this.output);
+ i *= (0,
+ p.randomBetween)(.5, 1),
+ n.start(e, 0, void 0, .015 * i, 0)
+ }
+ }
+ }]),
+ e
+ }(h.default);
+ e.default = d
+ }
+ , function(t, e, i) {
+ "use strict";
+ function n(t) {
+ return t && t.__esModule ? t : {
+ default: t
+ }
+ }
+ function o(t, e) {
+ if (!(t instanceof e))
+ throw new TypeError("Cannot call a class as a function")
+ }
+ function r(t, e) {
+ if (!t)
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
+ return !e || "object" != typeof e && "function" != typeof e ? t : e
+ }
+ function s(t, e) {
+ if ("function" != typeof e && null !== e)
+ throw new TypeError("Super expression must either be null or a function, not " + typeof e);
+ t.prototype = Object.create(e && e.prototype, {
+ constructor: {
+ value: t,
+ enumerable: !1,
+ writable: !0,
+ configurable: !0
+ }
+ }),
+ e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
+ }
+ Object.defineProperty(e, "__esModule", {
+ value: !0
+ }),
+ e.Piano = void 0;
+ var a = function() {
+ function t(t, e) {
+ for (var i = 0; i < e.length; i++) {
+ var n = e[i];
+ n.enumerable = n.enumerable || !1,
+ n.configurable = !0,
+ "value"in n && (n.writable = !0),
+ Object.defineProperty(t, n.key, n)
+ }
+ }
+ return function(e, i, n) {
+ return i && t(e.prototype, i),
+ n && t(e, n),
+ e
+ }
+ }()
+ , u = i(0)
+ , l = n(u)
+ , c = i(6)
+ , h = n(c)
+ , p = i(5)
+ , f = i(4)
+ , d = n(f)
+ , y = i(7)
+ , _ = n(y);
+ n(i(1)),
+ e.Piano = function(t) {
+ function e() {
+ o(this, e);
+ var t = l.default.defaults(arguments, ["range", "velocities"], {
+ velocities: 1,
+ range: [21, 108],
+ release: !0
+ })
+ , i = r(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this));
+ return i.createInsOuts(0, 1),
+ i._loaded = !1,
+ i._heldNotes = new Map,
+ i._sustainedNotes = new Map,
+ i._notes = new p.Notes(t.range,t.velocities).connect(i.output),
+ i._pedal = (new h.default).connect(i.output),
+ t.release && (i._harmonics = new d.default(t.range).connect(i.output),
+ i._release = new _.default(t.range).connect(i.output)),
+ i
+ }
+ return s(e, t),
+ a(e, [{
+ key: "load",
+ value: function() {
+ var t = this
+ , e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "https://tambien.github.io/Piano/Salamander/"
+ , i = [this._notes.load(e), this._pedal.load(e)];
+ return this._harmonics && i.push(this._harmonics.load(e)),
+ this._release && i.push(this._release.load(e)),
+ Promise.all(i).then(function() {
+ t._loaded = !0
+ })
+ }
+ }, {
+ key: "pedalDown",
+ value: function(t) {
+ return this.loaded && (t = this.toSeconds(t),
+ this._pedal.isDown(t) || this._pedal.down(t)),
+ this
+ }
+ }, {
+ key: "pedalUp",
+ value: function(t) {
+ var e = this;
+ return this.loaded && (t = this.toSeconds(t),
+ this._pedal.isDown(t) && (this._pedal.up(t),
+ this._sustainedNotes.forEach(function(i, n) {
+ e._heldNotes.has(n) || e._notes.stop(n, t)
+ }),
+ this._sustainedNotes.clear())),
+ this
+ }
+ }, {
+ key: "keyDown",
+ value: function(t) {
+ var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : l.default.now()
+ , i = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : .8;
+ return this.loaded && (e = this.toSeconds(e),
+ l.default.isString(t) && (t = Math.round((0,
+ u.Frequency)(t).toMidi())),
+ this._heldNotes.has(t) || (this._heldNotes.set(t, {
+ time: e,
+ velocity: i
+ }),
+ this._notes.start(t, e, i))),
+ this
+ }
+ }, {
+ key: "keyUp",
+ value: function(t) {
+ var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : l.default.now()
+ , i = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : .8;
+ if (this.loaded && (e = this.toSeconds(e),
+ l.default.isString(t) && (t = Math.round((0,
+ u.Frequency)(t).toMidi())),
+ this._heldNotes.has(t))) {
+ var n = this._heldNotes.get(t);
+ this._heldNotes.delete(t),
+ this._release && this._release.start(t, e, i);
+ var o = e - n.time
+ , r = n.velocity
+ , s = .5 / Math.max(o, .1) + r + i;
+ s = Math.pow(Math.log(Math.max(s, 1)), 2) / 2,
+ this._pedal.isDown(e) ? this._sustainedNotes.has(t) || this._sustainedNotes.set(t, e) : (this._notes.stop(t, e, i),
+ this._harmonics && this._harmonics.start(t, e, s))
+ }
+ return this
+ }
+ }, {
+ key: "setVolume",
+ value: function(t, e) {
+ switch (t) {
+ case "note":
+ this._notes.volume = e;
+ break;
+ case "pedal":
+ this._pedal.volume = e;
+ break;
+ case "release":
+ this._release && (this._release.volume = e);
+ break;
+ case "harmonics":
+ this._harmonics && (this._harmonics.volume = e)
+ }
+ return this
+ }
+ }, {
+ key: "stopAll",
+ value: function() {
+ var t = this;
+ return this.pedalUp(),
+ this._heldNotes.forEach(function(e, i) {
+ t.keyUp(i)
+ }),
+ this
+ }
+ }, {
+ key: "progress",
+ value: function(t) {
+ return u.Buffer.on("progress", t),
+ this
+ }
+ }, {
+ key: "loaded",
+ get: function() {
+ return this._loaded
+ }
+ }]),
+ e
+ }(u.AudioNode)
+ }
+ ])
+ })
+}
+, function(t, e) {
+ t.exports = "data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAwIDEwMDAiPjxkZWZzPjxzdHlsZT4uY2xzLTF7ZmlsbDojZmZmO308L3N0eWxlPjwvZGVmcz48dGl0bGU+MTcwOTI5X2RvdF9waWFub19pY29uc19leHBvcnQ8L3RpdGxlPjxwYXRoIGNsYXNzPSJjbHMtMSIgZD0iTTM4Niw2MzkuNTdhMTYuNjUsMTYuNjUsMCwwLDEtMTEuNzctMjguNDJMNjAyLjI3LDM4My4wOGExNi42NSwxNi42NSwwLDAsMSwyMy41NCwyMy41NEwzOTcuNzMsNjM0LjdBMTYuNiwxNi42LDAsMCwxLDM4Niw2MzkuNTdaIi8+PHBhdGggY2xhc3M9ImNscy0xIiBkPSJNNjE0LDYzOS41N2ExNi41OSwxNi41OSwwLDAsMS0xMS43Ny00Ljg4TDM3NC4xOSw0MDYuNjJhMTYuNjUsMTYuNjUsMCwwLDEsMjMuNTQtMjMuNTRMNjI1LjgxLDYxMS4xNkExNi42NSwxNi42NSwwLDAsMSw2MTQsNjM5LjU3WiIvPjwvc3ZnPg=="
+}
+, function(t, e) {
+ t.exports = "data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv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EuNDYtMWwtMTkuMTctMjAuNjJaIi8+PHBhdGggY2xhc3M9ImNscy0xIiBkPSJNNjY2LjI4LDM2My4wOGE5LjU4LDkuNTgsMCwwLDAtNi43OS0yLjkxLDUuODMsNS44MywwLDAsMC0zLjg4LDEsOS41OCw5LjU4LDAsMCwwLTUuODIsOC43M3YyNi42OGgtOS4yMkExMTQuOTEsMTE0LjkxLDAsMCwwLDU1OC4xLDQzMkw0NDcuNDksNTQ3LjQzYTc5LjY4LDc5LjY4LDAsMCwxLTU3LjczLDI0Ljc0SDMyNy4xOGExNywxNywwLDAsMCwwLDM0aDYyLjU4YTExNC45MSwxMTQuOTEsMCwwLDAsODIuNDctMzUuNDFMNTgyLjg0LDQ1NC43N0E3OS42OCw3OS42OCwwLDAsMSw2NDAuNTcsNDMwaDkuMjJ2MjYuNjhhOS41OCw5LjU4LDAsMCwwLDUuODIsOC43Myw5LjE0LDkuMTQsMCwwLDAsMy44OCwxLDkuNTgsOS41OCwwLDAsMCw2Ljc5LTIuOTFsNDMuNjYtNDMuNjZhOS4zOCw5LjM4LDAsMCwwLDAtMTMuNThaIi8+PC9zdmc+"
+}
+, function(t, e) {
+ t.exports = "data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAwIDEwMDAiPjxkZWZzPjxzdHlsZT4uY2xzLTF7ZmlsbDojNDViNWExO308L3N0eWxlPjwvZGVmcz48dGl0bGU+MTcxMDA1X2RvdF9waWFub19pY29uc19leHBvcnQ8L3RpdGxlPjxwYXRoIGNsYXNzPSJjbHMtMSIgZD0iTTY0MC4zLDYzNi45Mkg1OTQuNTFWMzYyLjE5SDY0MC4zWk0zNjUuNTYsMzYyLjE5VjYzNi45MmwxOTQuNi0xMzcuMzdaIi8+PC9zdmc+"
+}
+]);
+
+//Script Edited By Togi, in association with TMG Inc. https://Togar.media