diff --git a/bin/sf2.parser.js b/bin/sf2.parser.js index 131e753..34b5783 100644 --- a/bin/sf2.parser.js +++ b/bin/sf2.parser.js @@ -1,4 +1,14 @@ -/******/ (function(modules) { // webpackBootstrap +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports["parser"] = factory(); + else + root["parser"] = factory(); +})(typeof self !== 'undefined' ? self : this, function() { +return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ @@ -6,21 +16,21 @@ /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) +/******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; -/******/ +/******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { -/******/ exports: {}, -/******/ id: moduleId, -/******/ loaded: false +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded -/******/ module.loaded = true; +/******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; @@ -33,997 +43,610 @@ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ /******/ // __webpack_public_path__ -/******/ __webpack_require__.p = "static"; +/******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(0); +/******/ return __webpack_require__(__webpack_require__.s = 6); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ -/***/ function(module, exports, __webpack_require__) { +/***/ (function(module, exports, __webpack_require__) { - "use strict"; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - var _sf = __webpack_require__(1); - - Object.keys(_sf).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function get() { - return _sf[key]; - } - }); - }); +"use strict"; -/***/ }, +exports.__esModule = true; +exports.GeneratorEnumeratorTable = [ + 'startAddrsOffset', + 'endAddrsOffset', + 'startloopAddrsOffset', + 'endloopAddrsOffset', + 'startAddrsCoarseOffset', + 'modLfoToPitch', + 'vibLfoToPitch', + 'modEnvToPitch', + 'initialFilterFc', + 'initialFilterQ', + 'modLfoToFilterFc', + 'modEnvToFilterFc', + 'endAddrsCoarseOffset', + 'modLfoToVolume', + undefined, + 'chorusEffectsSend', + 'reverbEffectsSend', + 'pan', + undefined, undefined, undefined, + 'delayModLFO', + 'freqModLFO', + 'delayVibLFO', + 'freqVibLFO', + 'delayModEnv', + 'attackModEnv', + 'holdModEnv', + 'decayModEnv', + 'sustainModEnv', + 'releaseModEnv', + 'keynumToModEnvHold', + 'keynumToModEnvDecay', + 'delayVolEnv', + 'attackVolEnv', + 'holdVolEnv', + 'decayVolEnv', + 'sustainVolEnv', + 'releaseVolEnv', + 'keynumToVolEnvHold', + 'keynumToVolEnvDecay', + 'instrument', + undefined, + 'keyRange', + 'velRange', + 'startloopAddrsCoarseOffset', + 'keynum', + 'velocity', + 'initialAttenuation', + undefined, + 'endloopAddrsCoarseOffset', + 'coarseTune', + 'fineTune', + 'sampleID', + 'sampleModes', + undefined, + 'scaleTuning', + 'exclusiveClass', + 'overridingRootKey' +]; +exports.InfoNameTable = { + ICMT: "comment", + ICOP: "copyright", + ICRD: "creation_date", + IENG: "engineer", + INAM: "name", + IPRD: "product", + ISFT: "software", + ifil: "version", + isng: "sound_engine", + irom: "rom_name", + iver: "rom_version" +}; + + +/***/ }), /* 1 */ -/***/ function(module, exports, __webpack_require__) { +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - var _riff = __webpack_require__(2); - - var _riff2 = _interopRequireDefault(_riff); - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - - /** - * @param {ByteArray} input - * @param {Object=} opt_params - * @constructor - */ - var Parser = function Parser(input, opt_params) { - opt_params = opt_params || {}; - /** @type {ByteArray} */ - this.input = input; - /** @type {(Object|undefined)} */ - this.parserOption = opt_params['parserOption']; - - /** @type {Array.} */ - this.presetHeader; - /** @type {Array.} */ - this.presetZone; - /** @type {Array.} */ - this.presetZoneModulator; - /** @type {Array.} */ - this.presetZoneGenerator; - /** @type {Array.} */ - this.instrument; - /** @type {Array.} */ - this.instrumentZone; - /** @type {Array.} */ - this.instrumentZoneModulator; - /** @type {Array.} */ - this.instrumentZoneGenerator; - /** @type {Array.} */ - this.sampleHeader; - }; - - Parser.prototype.parse = function () { - /** @type {Riff.Parser} */ - var parser = new _riff2.default.Parser(this.input, this.parserOption); - /** @type {?Riff.Chunk} */ - var chunk; - - // parse RIFF chunk - parser.parse(); - if (parser.chunkList.length !== 1) { - throw new Error('wrong chunk length'); - } - - chunk = parser.getChunk(0); - if (chunk === null) { - throw new Error('chunk not found'); - } - - this.parseRiffChunk(chunk); - //console.log(this.sampleHeader); - this.input = null; - }; - - /** - * @param {Riff.Chunk} chunk - */ - Parser.prototype.parseRiffChunk = function (chunk) { - /** @type {Riff.Parser} */ - var parser; - /** @type {ByteArray} */ - var data = this.input; - /** @type {number} */ - var ip = chunk.offset; - /** @type {string} */ - var signature; - - // check parse target - if (chunk.type !== 'RIFF') { - throw new Error('invalid chunk type:' + chunk.type); - } - - // check signature - signature = String.fromCharCode(data[ip++], data[ip++], data[ip++], data[ip++]); - if (signature !== 'sfbk') { - throw new Error('invalid signature:' + signature); - } - - // read structure - parser = new _riff2.default.Parser(data, { 'index': ip, 'length': chunk.size - 4 }); - parser.parse(); - if (parser.getNumberOfChunks() !== 3) { - throw new Error('invalid sfbk structure'); - } - - // INFO-list - this.parseInfoList( /** @type {!Riff.Chunk} */parser.getChunk(0)); - - // sdta-list - this.parseSdtaList( /** @type {!Riff.Chunk} */parser.getChunk(1)); - - // pdta-list - this.parsePdtaList( /** @type {!Riff.Chunk} */parser.getChunk(2)); - }; - - /** - * @param {Riff.Chunk} chunk - */ - Parser.prototype.parseInfoList = function (chunk) { - /** @type {Riff.Parser} */ - var parser; - /** @type {ByteArray} */ - var data = this.input; - /** @type {number} */ - var ip = chunk.offset; - /** @type {string} */ - var signature; - - // check parse target - if (chunk.type !== 'LIST') { - throw new Error('invalid chunk type:' + chunk.type); - } - - // check signature - signature = String.fromCharCode(data[ip++], data[ip++], data[ip++], data[ip++]); - if (signature !== 'INFO') { - throw new Error('invalid signature:' + signature); - } - - // read structure - parser = new _riff2.default.Parser(data, { 'index': ip, 'length': chunk.size - 4 }); - parser.parse(); - }; - - /** - * @param {Riff.Chunk} chunk - */ - Parser.prototype.parseSdtaList = function (chunk) { - /** @type {Riff.Parser} */ - var parser; - /** @type {ByteArray} */ - var data = this.input; - /** @type {number} */ - var ip = chunk.offset; - /** @type {string} */ - var signature; - - // check parse target - if (chunk.type !== 'LIST') { - throw new Error('invalid chunk type:' + chunk.type); - } - - // check signature - signature = String.fromCharCode(data[ip++], data[ip++], data[ip++], data[ip++]); - if (signature !== 'sdta') { - throw new Error('invalid signature:' + signature); - } - - // read structure - parser = new _riff2.default.Parser(data, { 'index': ip, 'length': chunk.size - 4 }); - parser.parse(); - if (parser.chunkList.length !== 1) { - throw new Error('TODO'); - } - this.samplingData = - /** @type {{type: string, size: number, offset: number}} */ - parser.getChunk(0); - }; - - /** - * @param {Riff.Chunk} chunk - */ - Parser.prototype.parsePdtaList = function (chunk) { - /** @type {Riff.Parser} */ - var parser; - /** @type {ByteArray} */ - var data = this.input; - /** @type {number} */ - var ip = chunk.offset; - /** @type {string} */ - var signature; - - // check parse target - if (chunk.type !== 'LIST') { - throw new Error('invalid chunk type:' + chunk.type); - } - - // check signature - signature = String.fromCharCode(data[ip++], data[ip++], data[ip++], data[ip++]); - if (signature !== 'pdta') { - throw new Error('invalid signature:' + signature); - } - - // read structure - parser = new _riff2.default.Parser(data, { 'index': ip, 'length': chunk.size - 4 }); - parser.parse(); - - // check number of chunks - if (parser.getNumberOfChunks() !== 9) { - throw new Error('invalid pdta chunk'); - } - - this.parsePhdr( /** @type {Riff.Chunk} */parser.getChunk(0)); - this.parsePbag( /** @type {Riff.Chunk} */parser.getChunk(1)); - this.parsePmod( /** @type {Riff.Chunk} */parser.getChunk(2)); - this.parsePgen( /** @type {Riff.Chunk} */parser.getChunk(3)); - this.parseInst( /** @type {Riff.Chunk} */parser.getChunk(4)); - this.parseIbag( /** @type {Riff.Chunk} */parser.getChunk(5)); - this.parseImod( /** @type {Riff.Chunk} */parser.getChunk(6)); - this.parseIgen( /** @type {Riff.Chunk} */parser.getChunk(7)); - this.parseShdr( /** @type {Riff.Chunk} */parser.getChunk(8)); - }; - - /** - * @param {Riff.Chunk} chunk - */ - Parser.prototype.parsePhdr = function (chunk) { - /** @type {ByteArray} */ - var data = this.input; - /** @type {number} */ - var ip = chunk.offset; - /** @type {Array.} */ - var presetHeader = this.presetHeader = []; - /** @type {number} */ - var size = chunk.offset + chunk.size; - - // check parse target - if (chunk.type !== 'phdr') { - throw new Error('invalid chunk type:' + chunk.type); - } - - while (ip < size) { - presetHeader.push({ - presetName: String.fromCharCode.apply(null, data.subarray(ip, ip += 20)), - preset: data[ip++] | data[ip++] << 8, - bank: data[ip++] | data[ip++] << 8, - presetBagIndex: data[ip++] | data[ip++] << 8, - library: (data[ip++] | data[ip++] << 8 | data[ip++] << 16 | data[ip++] << 24) >>> 0, - genre: (data[ip++] | data[ip++] << 8 | data[ip++] << 16 | data[ip++] << 24) >>> 0, - morphology: (data[ip++] | data[ip++] << 8 | data[ip++] << 16 | data[ip++] << 24) >>> 0 - }); - } - }; - - /** - * @param {Riff.Chunk} chunk - */ - Parser.prototype.parsePbag = function (chunk) { - /** @type {ByteArray} */ - var data = this.input; - /** @type {number} */ - var ip = chunk.offset; - /** @type {Array.} */ - var presetZone = this.presetZone = []; - /** @type {number} */ - var size = chunk.offset + chunk.size; - - // check parse target - if (chunk.type !== 'pbag') { - throw new Error('invalid chunk type:' + chunk.type); - } - - while (ip < size) { - presetZone.push({ - presetGeneratorIndex: data[ip++] | data[ip++] << 8, - presetModulatorIndex: data[ip++] | data[ip++] << 8 - }); - } - }; - - /** - * @param {Riff.Chunk} chunk - */ - Parser.prototype.parsePmod = function (chunk) { - // check parse target - if (chunk.type !== 'pmod') { - throw new Error('invalid chunk type:' + chunk.type); - } - - this.presetZoneModulator = this.parseModulator(chunk); - }; - - /** - * @param {Riff.Chunk} chunk - */ - Parser.prototype.parsePgen = function (chunk) { - // check parse target - if (chunk.type !== 'pgen') { - throw new Error('invalid chunk type:' + chunk.type); - } - this.presetZoneGenerator = this.parseGenerator(chunk); - }; - - /** - * @param {Riff.Chunk} chunk - */ - Parser.prototype.parseInst = function (chunk) { - /** @type {ByteArray} */ - var data = this.input; - /** @type {number} */ - var ip = chunk.offset; - /** @type {Array.} */ - var instrument = this.instrument = []; - /** @type {number} */ - var size = chunk.offset + chunk.size; - - // check parse target - if (chunk.type !== 'inst') { - throw new Error('invalid chunk type:' + chunk.type); - } - - while (ip < size) { - instrument.push({ - instrumentName: String.fromCharCode.apply(null, data.subarray(ip, ip += 20)), - instrumentBagIndex: data[ip++] | data[ip++] << 8 - }); - } - }; - - /** - * @param {Riff.Chunk} chunk - */ - Parser.prototype.parseIbag = function (chunk) { - /** @type {ByteArray} */ - var data = this.input; - /** @type {number} */ - var ip = chunk.offset; - /** @type {Array.} */ - var instrumentZone = this.instrumentZone = []; - /** @type {number} */ - var size = chunk.offset + chunk.size; - - // check parse target - if (chunk.type !== 'ibag') { - throw new Error('invalid chunk type:' + chunk.type); - } - - while (ip < size) { - instrumentZone.push({ - instrumentGeneratorIndex: data[ip++] | data[ip++] << 8, - instrumentModulatorIndex: data[ip++] | data[ip++] << 8 - }); - } - }; - - /** - * @param {Riff.Chunk} chunk - */ - Parser.prototype.parseImod = function (chunk) { - // check parse target - if (chunk.type !== 'imod') { - throw new Error('invalid chunk type:' + chunk.type); - } - - this.instrumentZoneModulator = this.parseModulator(chunk); - }; - - /** - * @param {Riff.Chunk} chunk - */ - Parser.prototype.parseIgen = function (chunk) { - // check parse target - if (chunk.type !== 'igen') { - throw new Error('invalid chunk type:' + chunk.type); - } - - this.instrumentZoneGenerator = this.parseGenerator(chunk); - }; - - /** - * @param {Riff.Chunk} chunk - */ - Parser.prototype.parseShdr = function (chunk) { - /** @type {ByteArray} */ - var data = this.input; - /** @type {number} */ - var ip = chunk.offset; - /** @type {Array.} */ - var samples = this.sample = []; - /** @type {Array.} */ - var sampleHeader = this.sampleHeader = []; - /** @type {number} */ - var size = chunk.offset + chunk.size; - /** @type {string} */ - var sampleName; - /** @type {number} */ - var start; - /** @type {number} */ - var end; - /** @type {number} */ - var startLoop; - /** @type {number} */ - var endLoop; - /** @type {number} */ - var sampleRate; - /** @type {number} */ - var originalPitch; - /** @type {number} */ - var pitchCorrection; - /** @type {number} */ - var sampleLink; - /** @type {number} */ - var sampleType; - - // check parse target - if (chunk.type !== 'shdr') { - throw new Error('invalid chunk type:' + chunk.type); - } - - while (ip < size) { - sampleName = String.fromCharCode.apply(null, data.subarray(ip, ip += 20)); - start = (data[ip++] << 0 | data[ip++] << 8 | data[ip++] << 16 | data[ip++] << 24) >>> 0; - end = (data[ip++] << 0 | data[ip++] << 8 | data[ip++] << 16 | data[ip++] << 24) >>> 0; - startLoop = (data[ip++] << 0 | data[ip++] << 8 | data[ip++] << 16 | data[ip++] << 24) >>> 0; - endLoop = (data[ip++] << 0 | data[ip++] << 8 | data[ip++] << 16 | data[ip++] << 24) >>> 0; - sampleRate = (data[ip++] << 0 | data[ip++] << 8 | data[ip++] << 16 | data[ip++] << 24) >>> 0; - originalPitch = data[ip++]; - pitchCorrection = data[ip++] << 24 >> 24; - sampleLink = data[ip++] | data[ip++] << 8; - sampleType = data[ip++] | data[ip++] << 8; - - //* - var sample = new Int16Array(new Uint8Array(data.subarray(this.samplingData.offset + start * 2, this.samplingData.offset + end * 2)).buffer); - - startLoop -= start; - endLoop -= start; - - if (sampleRate > 0) { - var adjust = this.adjustSampleData(sample, sampleRate); - sample = adjust.sample; - sampleRate *= adjust.multiply; - startLoop *= adjust.multiply; - endLoop *= adjust.multiply; - } - - samples.push(sample); - //*/ - - sampleHeader.push({ - sampleName: sampleName, - /* - start: start, - end: end, - */ - startLoop: startLoop, - endLoop: endLoop, - sampleRate: sampleRate, - originalPitch: originalPitch, - pitchCorrection: pitchCorrection, - sampleLink: sampleLink, - sampleType: sampleType - }); - } - }; - - Parser.prototype.adjustSampleData = function (sample, sampleRate) { - /** @type {Int16Array} */ - var newSample; - /** @type {number} */ - var i; - /** @type {number} */ - var il; - /** @type {number} */ - var j; - /** @type {number} */ - var multiply = 1; - - // buffer - while (sampleRate < 22050) { - newSample = new Int16Array(sample.length * 2); - for (i = j = 0, il = sample.length; i < il; ++i) { - newSample[j++] = sample[i]; - newSample[j++] = sample[i]; - } - sample = newSample; - multiply *= 2; - sampleRate *= 2; - } - - return { - sample: sample, - multiply: multiply - }; - }; - - /** - * @param {Riff.Chunk} chunk - * @return {Array.} - */ - Parser.prototype.parseModulator = function (chunk) { - /** @type {ByteArray} */ - var data = this.input; - /** @type {number} */ - var ip = chunk.offset; - /** @type {number} */ - var size = chunk.offset + chunk.size; - /** @type {number} */ - var code; - /** @type {string} */ - var key; - /** @type {Array.} */ - var output = []; - - while (ip < size) { - // Src Oper - // TODO - ip += 2; - - // Dest Oper - code = data[ip++] | data[ip++] << 8; - key = Parser.GeneratorEnumeratorTable[code]; - if (key === void 0) { - // Amount - output.push({ - type: key, - value: { - code: code, - amount: data[ip] | data[ip + 1] << 8 << 16 >> 16, - lo: data[ip++], - hi: data[ip++] - } - }); - } else { - // Amount - switch (key) { - case 'keyRange': /* FALLTHROUGH */ - case 'velRange': /* FALLTHROUGH */ - case 'keynum': /* FALLTHROUGH */ - case 'velocity': - output.push({ - type: key, - value: { - lo: data[ip++], - hi: data[ip++] - } - }); - break; - default: - output.push({ - type: key, - value: { - amount: data[ip++] | data[ip++] << 8 << 16 >> 16 - } - }); - break; - } - } - - // AmtSrcOper - // TODO - ip += 2; - - // Trans Oper - // TODO - ip += 2; - } - - return output; - }; - - /** - * @param {Riff.Chunk} chunk - * @return {Array.} - */ - Parser.prototype.parseGenerator = function (chunk) { - /** @type {ByteArray} */ - var data = this.input; - /** @type {number} */ - var ip = chunk.offset; - /** @type {number} */ - var size = chunk.offset + chunk.size; - /** @type {number} */ - var code; - /** @type {string} */ - var key; - /** @type {Array.} */ - var output = []; - - while (ip < size) { - code = data[ip++] | data[ip++] << 8; - key = Parser.GeneratorEnumeratorTable[code]; - if (key === void 0) { - output.push({ - type: key, - value: { - code: code, - amount: data[ip] | data[ip + 1] << 8 << 16 >> 16, - lo: data[ip++], - hi: data[ip++] - } - }); - continue; - } - - switch (key) { - case 'keynum': /* FALLTHROUGH */ - case 'keyRange': /* FALLTHROUGH */ - case 'velRange': /* FALLTHROUGH */ - case 'velocity': - output.push({ - type: key, - value: { - lo: data[ip++], - hi: data[ip++] - } - }); - break; - default: - output.push({ - type: key, - value: { - amount: data[ip++] | data[ip++] << 8 << 16 >> 16 - } - }); - break; - } - } - - return output; - }; - - Parser.prototype.createInstrument = function () { - /** @type {Array.} */ - var instrument = this.instrument; - /** @type {Array.} */ - var zone = this.instrumentZone; - /** @type {Array.} */ - var output = []; - /** @type {number} */ - var bagIndex; - /** @type {number} */ - var bagIndexEnd; - /** @type {Array.} */ - var zoneInfo; - /** @type {{generator: Object, generatorInfo: Array.}} */ - var instrumentGenerator; - /** @type {{modulator: Object, modulatorInfo: Array.}} */ - var instrumentModulator; - /** @type {number} */ - var i; - /** @type {number} */ - var il; - /** @type {number} */ - var j; - /** @type {number} */ - var jl; - - // instrument -> instrument bag -> generator / modulator - for (i = 0, il = instrument.length; i < il; ++i) { - bagIndex = instrument[i].instrumentBagIndex; - bagIndexEnd = instrument[i + 1] ? instrument[i + 1].instrumentBagIndex : zone.length; - zoneInfo = []; - - // instrument bag - for (j = bagIndex, jl = bagIndexEnd; j < jl; ++j) { - instrumentGenerator = this.createInstrumentGenerator_(zone, j); - instrumentModulator = this.createInstrumentModulator_(zone, j); - - zoneInfo.push({ - generator: instrumentGenerator.generator, - generatorSequence: instrumentGenerator.generatorInfo, - modulator: instrumentModulator.modulator, - modulatorSequence: instrumentModulator.modulatorInfo - }); - } - - output.push({ - name: instrument[i].instrumentName, - info: zoneInfo - }); - } - - return output; - }; - - Parser.prototype.createPreset = function () { - /** @type {Array.} */ - var preset = this.presetHeader; - /** @type {Array.} */ - var zone = this.presetZone; - /** @type {Array.} */ - var output = []; - /** @type {number} */ - var bagIndex; - /** @type {number} */ - var bagIndexEnd; - /** @type {Array.} */ - var zoneInfo; - /** @type {number} */ - var instrument; - /** @type {{generator: Object, generatorInfo: Array.}} */ - var presetGenerator; - /** @type {{modulator: Object, modulatorInfo: Array.}} */ - var presetModulator; - /** @type {number} */ - var i; - /** @type {number} */ - var il; - /** @type {number} */ - var j; - /** @type {number} */ - var jl; - - // preset -> preset bag -> generator / modulator - for (i = 0, il = preset.length; i < il; ++i) { - bagIndex = preset[i].presetBagIndex; - bagIndexEnd = preset[i + 1] ? preset[i + 1].presetBagIndex : zone.length; - zoneInfo = []; - - // preset bag - for (j = bagIndex, jl = bagIndexEnd; j < jl; ++j) { - presetGenerator = this.createPresetGenerator_(zone, j); - presetModulator = this.createPresetModulator_(zone, j); - - zoneInfo.push({ - generator: presetGenerator.generator, - generatorSequence: presetGenerator.generatorInfo, - modulator: presetModulator.modulator, - modulatorSequence: presetModulator.modulatorInfo - }); - - instrument = presetGenerator.generator['instrument'] !== void 0 ? presetGenerator.generator['instrument'].amount : presetModulator.modulator['instrument'] !== void 0 ? presetModulator.modulator['instrument'].amount : null; - } - - output.push({ - name: preset[i].presetName, - info: zoneInfo, - header: preset[i], - instrument: instrument - }); - } - - return output; - }; - - /** - * @param {Array.} zone - * @param {number} index - * @returns {{generator: Object, generatorInfo: Array.}} - * @private - */ - Parser.prototype.createInstrumentGenerator_ = function (zone, index) { - var modgen = this.createBagModGen_(zone, zone[index].instrumentGeneratorIndex, zone[index + 1] ? zone[index + 1].instrumentGeneratorIndex : this.instrumentZoneGenerator.length, this.instrumentZoneGenerator); - - return { - generator: modgen.modgen, - generatorInfo: modgen.modgenInfo - }; - }; - - /** - * @param {Array.} zone - * @param {number} index - * @returns {{modulator: Object, modulatorInfo: Array.}} - * @private - */ - Parser.prototype.createInstrumentModulator_ = function (zone, index) { - var modgen = this.createBagModGen_(zone, zone[index].presetModulatorIndex, zone[index + 1] ? zone[index + 1].instrumentModulatorIndex : this.instrumentZoneModulator.length, this.instrumentZoneModulator); - - return { - modulator: modgen.modgen, - modulatorInfo: modgen.modgenInfo - }; - }; - - /** - * @param {Array.} zone - * @param {number} index - * @returns {{generator: Object, generatorInfo: Array.}} - * @private - */ - Parser.prototype.createPresetGenerator_ = function (zone, index) { - var modgen = this.createBagModGen_(zone, zone[index].presetGeneratorIndex, zone[index + 1] ? zone[index + 1].presetGeneratorIndex : this.presetZoneGenerator.length, this.presetZoneGenerator); - - return { - generator: modgen.modgen, - generatorInfo: modgen.modgenInfo - }; - }; - - /** - * @param {Array.} zone - * @param {number} index - * @returns {{modulator: Object, modulatorInfo: Array.}} - * @private - */ - Parser.prototype.createPresetModulator_ = function (zone, index) { - /** @type {{modgen: Object, modgenInfo: Array.}} */ - var modgen = this.createBagModGen_(zone, zone[index].presetModulatorIndex, zone[index + 1] ? zone[index + 1].presetModulatorIndex : this.presetZoneModulator.length, this.presetZoneModulator); - - return { - modulator: modgen.modgen, - modulatorInfo: modgen.modgenInfo - }; - }; - - /** - * @param {Array.} zone - * @param {number} indexStart - * @param {number} indexEnd - * @param zoneModGen - * @returns {{modgen: Object, modgenInfo: Array.}} - * @private - */ - Parser.prototype.createBagModGen_ = function (zone, indexStart, indexEnd, zoneModGen) { - /** @type {Array.} */ - var modgenInfo = []; - /** @type {Object} */ - var modgen = { - unknown: [], - 'keyRange': { - hi: 127, - lo: 0 - } - }; // TODO - /** @type {Object} */ - var info; - /** @type {number} */ - var i; - /** @type {number} */ - var il; - - for (i = indexStart, il = indexEnd; i < il; ++i) { - info = zoneModGen[i]; - modgenInfo.push(info); - - if (info.type === 'unknown') { - modgen.unknown.push(info.value); - } else { - modgen[info.type] = info.value; - } - } - - return { - modgen: modgen, - modgenInfo: modgenInfo - }; - }; - - /** - * @type {Array.} - * @const - */ - Parser.GeneratorEnumeratorTable = ['startAddrsOffset', 'endAddrsOffset', 'startloopAddrsOffset', 'endloopAddrsOffset', 'startAddrsCoarseOffset', 'modLfoToPitch', 'vibLfoToPitch', 'modEnvToPitch', 'initialFilterFc', 'initialFilterQ', 'modLfoToFilterFc', 'modEnvToFilterFc', 'endAddrsCoarseOffset', 'modLfoToVolume',, // 14 - 'chorusEffectsSend', 'reverbEffectsSend', 'pan',,,, // 18,19,20 - 'delayModLFO', 'freqModLFO', 'delayVibLFO', 'freqVibLFO', 'delayModEnv', 'attackModEnv', 'holdModEnv', 'decayModEnv', 'sustainModEnv', 'releaseModEnv', 'keynumToModEnvHold', 'keynumToModEnvDecay', 'delayVolEnv', 'attackVolEnv', 'holdVolEnv', 'decayVolEnv', 'sustainVolEnv', 'releaseVolEnv', 'keynumToVolEnvHold', 'keynumToVolEnvDecay', 'instrument',, // 42 - 'keyRange', 'velRange', 'startloopAddrsCoarseOffset', 'keynum', 'velocity', 'initialAttenuation',, // 49 - 'endloopAddrsCoarseOffset', 'coarseTune', 'fineTune', 'sampleID', 'sampleModes',, // 55 - 'scaleTuning', 'exclusiveClass', 'overridingRootKey']; - - exports.default = Parser; +exports.__esModule = true; +var riff_ts_1 = __webpack_require__(2); +var sf2_data_ts_1 = __webpack_require__(3); +var helper_ts_1 = __webpack_require__(4); +var stream_ts_1 = __webpack_require__(5); +var constants_ts_1 = __webpack_require__(0); +var default_1 = /** @class */ (function () { + function default_1(input, opt_params) { + if (opt_params === void 0) { opt_params = {}; } + this.input = input; + this.parserOption = opt_params.parserOption; + } + default_1.prototype.parse = function () { + var parser = new riff_ts_1.Parser(this.input, this.parserOption); + // parse RIFF chunk + parser.parse(); + if (parser.chunkList.length !== 1) { + throw new Error('wrong chunk length'); + } + var chunk = parser.getChunk(0); + if (chunk === null) { + throw new Error('chunk not found'); + } + this.parseRiffChunk(chunk, this.input); + this.input = null; + }; + default_1.prototype.parseRiffChunk = function (chunk, data) { + var chunkList = getChunkList(chunk, data, "RIFF", "sfbk"); + if (chunkList.length !== 3) { + throw new Error('invalid sfbk structure'); + } + // INFO-list + this.info = parseInfoList(chunkList[0], data); + // sdta-list + this.samplingData = parseSdtaList(chunkList[1], data); + // pdta-list + this.parsePdtaList(chunkList[2], data); + }; + default_1.prototype.parsePdtaList = function (chunk, data) { + var chunkList = getChunkList(chunk, data, "LIST", "pdta"); + // check number of chunks + if (chunkList.length !== 9) { + throw new Error('invalid pdta chunk'); + } + this.presetHeader = parsePhdr(chunkList[0], data); + this.presetZone = parsePbag(chunkList[1], data); + this.presetZoneModulator = parsePmod(chunkList[2], data); + this.presetZoneGenerator = parsePgen(chunkList[3], data); + this.instrument = parseInst(chunkList[4], data); + this.instrumentZone = parseIbag(chunkList[5], data); + this.instrumentZoneModulator = parseImod(chunkList[6], data); + this.instrumentZoneGenerator = parseIgen(chunkList[7], data); + this.sampleHeader = parseShdr(chunkList[8], data); + this.sample = loadSample(this.sampleHeader, this.samplingData.offset, data); + }; + return default_1; +}()); +exports["default"] = default_1; +function getChunkList(chunk, data, expectedType, expectedSignature) { + // check parse target + if (chunk.type !== expectedType) { + throw new Error('invalid chunk type:' + chunk.type); + } + var stream = new stream_ts_1["default"](data, chunk.offset); + // check signature + var signature = stream.readString(4); + if (signature !== expectedSignature) { + throw new Error('invalid signature:' + signature); + } + // read structure + var parser = new riff_ts_1.Parser(data, { 'index': stream.ip, 'length': chunk.size - 4 }); + parser.parse(); + return parser.chunkList; +} +function parseInfoList(chunk, data) { + var info = {}; + var chunkList = getChunkList(chunk, data, "LIST", "INFO"); + for (var _i = 0, chunkList_1 = chunkList; _i < chunkList_1.length; _i++) { + var p = chunkList_1[_i]; + var offset = p.offset, size = p.size, type = p.type; + var name_1 = constants_ts_1.InfoNameTable[type] || type; + info[name_1] = helper_ts_1.readString(data, offset, offset + size); + } + return info; +} +function parseSdtaList(chunk, data) { + var chunkList = getChunkList(chunk, data, "LIST", "sdta"); + if (chunkList.length !== 1) { + throw new Error('TODO'); + } + return chunkList[0]; +} +function parseChunk(chunk, data, type, factory) { + var result = []; + if (chunk.type !== type) { + throw new Error('invalid chunk type:' + chunk.type); + } + var stream = new stream_ts_1["default"](data, chunk.offset); + var size = chunk.offset + chunk.size; + while (stream.ip < size) { + result.push(factory(stream)); + } + return result; +} +var parsePhdr = function (chunk, data) { return parseChunk(chunk, data, "phdr", function (stream) { return sf2_data_ts_1.PresetHeader.parse(stream); }); }; +var parsePbag = function (chunk, data) { return parseChunk(chunk, data, "pbag", function (stream) { return sf2_data_ts_1.PresetBag.parse(stream); }); }; +var parseInst = function (chunk, data) { return parseChunk(chunk, data, "inst", function (stream) { return sf2_data_ts_1.Instrument.parse(stream); }); }; +var parseIbag = function (chunk, data) { return parseChunk(chunk, data, "ibag", function (stream) { return sf2_data_ts_1.InstrumentBag.parse(stream); }); }; +var parsePmod = function (chunk, data) { return parseChunk(chunk, data, "pmod", function (stream) { return sf2_data_ts_1.ModulatorList.parse(stream); }); }; +var parseImod = function (chunk, data) { return parseChunk(chunk, data, "imod", function (stream) { return sf2_data_ts_1.ModulatorList.parse(stream); }); }; +var parsePgen = function (chunk, data) { return parseChunk(chunk, data, "pgen", function (stream) { return sf2_data_ts_1.GeneratorList.parse(stream); }); }; +var parseIgen = function (chunk, data) { return parseChunk(chunk, data, "igen", function (stream) { return sf2_data_ts_1.GeneratorList.parse(stream); }); }; +var parseShdr = function (chunk, data) { return parseChunk(chunk, data, "shdr", function (stream) { return sf2_data_ts_1.Sample.parse(stream); }); }; +function adjustSampleData(sample, sampleRate) { + var multiply = 1; + // buffer + while (sampleRate < 22050) { + var newSample = new Int16Array(sample.length * 2); + for (var i = 0, j = 0, il = sample.length; i < il; ++i) { + newSample[j++] = sample[i]; + newSample[j++] = sample[i]; + } + sample = newSample; + multiply *= 2; + sampleRate *= 2; + } + return { + sample: sample, + multiply: multiply + }; +} +function loadSample(sampleHeader, samplingDataOffset, data) { + var samples = []; + for (var _i = 0, sampleHeader_1 = sampleHeader; _i < sampleHeader_1.length; _i++) { + var header = sampleHeader_1[_i]; + var sample = new Int16Array(new Uint8Array(data.subarray(samplingDataOffset + header.start * 2, samplingDataOffset + header.end * 2)).buffer); + if (header.sampleRate > 0) { + var adjust = adjustSampleData(sample, header.sampleRate); + sample = adjust.sample; + header.sampleRate *= adjust.multiply; + header.startLoop *= adjust.multiply; + header.endLoop *= adjust.multiply; + } + samples.push(sample); + } + return samples; +} -/***/ }, + +/***/ }), /* 2 */ -/***/ function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +exports.__esModule = true; +var Parser = /** @class */ (function () { + function Parser(input, opt_params) { + if (opt_params === void 0) { opt_params = {}; } + this.chunkList = []; + this.input = input; + this.ip = opt_params['index'] || 0; + this.length = opt_params['length'] || input.length - this.ip; + this.chunkList = []; + this.offset = this.ip; + this.padding = + opt_params['padding'] !== void 0 ? opt_params['padding'] : true; + this.bigEndian = + opt_params['bigEndian'] !== void 0 ? opt_params['bigEndian'] : false; + } + Parser.prototype.parse = function () { + var length = this.length + this.offset; + this.chunkList = []; + while (this.ip < length) { + this.parseChunk(); + } + }; + Parser.prototype.parseChunk = function () { + var input = this.input; + var ip = this.ip; + var size; + this.chunkList.push(new Chunk(String.fromCharCode(input[ip++], input[ip++], input[ip++], input[ip++]), (size = this.bigEndian ? + ((input[ip++] << 24) | (input[ip++] << 16) | + (input[ip++] << 8) | (input[ip++])) >>> 0 : + ((input[ip++]) | (input[ip++] << 8) | + (input[ip++] << 16) | (input[ip++] << 24)) >>> 0), ip)); + ip += size; + // padding + if (this.padding && ((ip - this.offset) & 1) === 1) { + ip++; + } + this.ip = ip; + }; + Parser.prototype.getChunk = function (index) { + var chunk = this.chunkList[index]; + if (chunk === void 0) { + return null; + } + return chunk; + }; + Parser.prototype.getNumberOfChunks = function () { + return this.chunkList.length; + }; + return Parser; +}()); +exports.Parser = Parser; +var Chunk = /** @class */ (function () { + function Chunk(type, size, offset) { + this.type = type; + this.size = size; + this.offset = offset; + } + return Chunk; +}()); +exports.Chunk = Chunk; + + +/***/ }), +/* 3 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +exports.__esModule = true; +var constants_ts_1 = __webpack_require__(0); +var VersionTag = /** @class */ (function () { + function VersionTag() { + } + return VersionTag; +}()); +exports.VersionTag = VersionTag; +var PresetHeader = /** @class */ (function () { + function PresetHeader() { + } + PresetHeader.parse = function (stream) { + var p = new PresetHeader(); + p.presetName = stream.readString(20); + p.preset = stream.readWORD(); + p.bank = stream.readWORD(); + p.presetBagIndex = stream.readWORD(); + p.library = stream.readDWORD(); + p.genre = stream.readDWORD(); + p.morphology = stream.readDWORD(); + return p; + }; + return PresetHeader; +}()); +exports.PresetHeader = PresetHeader; +var PresetBag = /** @class */ (function () { + function PresetBag() { + } + PresetBag.parse = function (stream) { + var p = new PresetBag(); + p.presetGeneratorIndex = stream.readWORD(); + p.presetModulatorIndex = stream.readWORD(); + return p; + }; + return PresetBag; +}()); +exports.PresetBag = PresetBag; +var ModulatorList = /** @class */ (function () { + function ModulatorList() { + } + ModulatorList.parse = function (stream) { + var t = new ModulatorList(); + t.sourceOper = stream.readWORD(); + var code = stream.readWORD(); + t.destinationOper = code; + var key = constants_ts_1.GeneratorEnumeratorTable[code]; + t.type = key; + if (key === void 0) { + // Amount + t.value = { + code: code, + amount: stream.readInt16() + }; + } + else { + // Amount + switch (key) { + case 'keyRange': /* FALLTHROUGH */ + case 'velRange': /* FALLTHROUGH */ + case 'keynum': /* FALLTHROUGH */ + case 'velocity': + t.value = { + lo: stream.readByte(), + hi: stream.readByte() + }; + break; + default: + t.value = { + amount: stream.readInt16() + }; + break; + } + } + t.amountSourceOper = stream.readWORD(); + t.transOper = stream.readWORD(); + return t; + }; + return ModulatorList; +}()); +exports.ModulatorList = ModulatorList; +var GeneratorList = /** @class */ (function () { + function GeneratorList() { + } + GeneratorList.parse = function (stream) { + var t = new ModulatorList(); + var code = stream.readWORD(); + var key = constants_ts_1.GeneratorEnumeratorTable[code]; + t.type = key; + if (key === void 0) { + t.value = { + code: code, + amount: stream.readInt16() + }; + } + else { + switch (key) { + case 'keynum': /* FALLTHROUGH */ + case 'keyRange': /* FALLTHROUGH */ + case 'velRange': /* FALLTHROUGH */ + case 'velocity': + t.value = { + lo: stream.readByte(), + hi: stream.readByte() + }; + break; + default: + t.value = { + amount: stream.readInt16() + }; + break; + } + } + return t; + }; + return GeneratorList; +}()); +exports.GeneratorList = GeneratorList; +var Instrument = /** @class */ (function () { + function Instrument() { + } + Instrument.parse = function (stream) { + var t = new Instrument(); + t.instrumentName = stream.readString(20); + t.instrumentBagIndex = stream.readWORD(); + return t; + }; + return Instrument; +}()); +exports.Instrument = Instrument; +var InstrumentBag = /** @class */ (function () { + function InstrumentBag() { + } + InstrumentBag.parse = function (stream) { + var t = new InstrumentBag(); + t.instrumentGeneratorIndex = stream.readWORD(); + t.instrumentModulatorIndex = stream.readWORD(); + return t; + }; + return InstrumentBag; +}()); +exports.InstrumentBag = InstrumentBag; +var Sample = /** @class */ (function () { + function Sample() { + } + Sample.parse = function (stream) { + var s = new Sample(); + s.sampleName = stream.readString(20); + s.start = stream.readDWORD(); + s.end = stream.readDWORD(); + s.startLoop = stream.readDWORD(); + s.endLoop = stream.readDWORD(); + s.sampleRate = stream.readDWORD(); + s.originalPitch = stream.readByte(); + s.pitchCorrection = stream.readInt8(); + s.sampleLink = stream.readWORD(); + s.sampleType = stream.readWORD(); + s.startLoop -= s.start; + s.endLoop -= s.start; + return s; + }; + return Sample; +}()); +exports.Sample = Sample; +/** + * @enum {number} + */ +exports.SampleLink = { + monoSample: 1, + rightSample: 2, + leftSample: 4, + linkedSample: 8, + RomMonoSample: 0x8001, + RomRightSample: 0x8002, + RomLeftSample: 0x8004, + RomLinkedSample: 0x8008 +}; + + +/***/ }), +/* 4 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +exports.__esModule = true; +function readString(data, start, end) { + var str = String.fromCharCode.apply(null, data.subarray(start, end)); + var nullLocation = str.indexOf("\u0000"); + if (nullLocation > 0) { + return str.substr(0, nullLocation); + } + return str; +} +exports.readString = readString; + + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +exports.__esModule = true; +var Stream = /** @class */ (function () { + function Stream(data, offset) { + this.data = data; + this.ip = offset; + } + Stream.prototype.readString = function (size) { + var str = String.fromCharCode.apply(null, this.data.subarray(this.ip, this.ip += size)); + var nullLocation = str.indexOf("\u0000"); + if (nullLocation > 0) { + return str.substr(0, nullLocation); + } + return str; + }; + Stream.prototype.readWORD = function () { + return this.data[this.ip++] | (this.data[this.ip++] << 8); + }; + Stream.prototype.readDWORD = function () { + return (this.data[this.ip++] | + (this.data[this.ip++] << 8) | + (this.data[this.ip++] << 16) | + (this.data[this.ip++] << 24)) >>> 0; + }; + Stream.prototype.readByte = function () { + return this.data[this.ip++]; + }; + Stream.prototype.readAt = function (offset) { + return this.data[this.ip + offset]; + }; + /* helper */ + Stream.prototype.readUInt8 = function () { + return this.readByte(); + }; + Stream.prototype.readInt8 = function () { + return (this.readByte() << 24) >> 24; + }; + Stream.prototype.readUInt16 = function () { + return this.readWORD(); + }; + Stream.prototype.readInt16 = function () { + return (this.readWORD() << 16) >> 16; + }; + Stream.prototype.readUInt32 = function () { + return this.readDWORD(); + }; + return Stream; +}()); +exports["default"] = Stream; + + +/***/ }), +/* 6 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__src_sf2_ts__ = __webpack_require__(1); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__src_sf2_ts___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__src_sf2_ts__); - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - var Riff = {}; - - /** - * @param {ByteArray} input input buffer. - * @param {Object=} opt_params option parameters. - * @constructor - */ - Riff.Parser = function (input, opt_params) { - opt_params = opt_params || {}; - /** @type {ByteArray} */ - this.input = input; - /** @type {number} */ - this.ip = opt_params['index'] || 0; - /** @type {number} */ - this.length = opt_params['length'] || input.length - this.ip; - /** @type {Array.} */ - this.chunkList; - /** @type {number} */ - this.offset = this.ip; - /** @type {boolean} */ - this.padding = opt_params['padding'] !== void 0 ? opt_params['padding'] : true; - /** @type {boolean} */ - this.bigEndian = opt_params['bigEndian'] !== void 0 ? opt_params['bigEndian'] : false; - }; - - /** - * @param {string} type - * @param {number} size - * @param {number} offset - * @constructor - */ - Riff.Chunk = function (type, size, offset) { - /** @type {string} */ - this.type = type; - /** @type {number} */ - this.size = size; - /** @type {number} */ - this.offset = offset; - }; - - Riff.Parser.prototype.parse = function () { - /** @type {number} */ - var length = this.length + this.offset; - - this.chunkList = []; - - while (this.ip < length) { - this.parseChunk(); - } - }; - - Riff.Parser.prototype.parseChunk = function () { - /** @type {ByteArray} */ - var input = this.input; - /** @type {number} */ - var ip = this.ip; - /** @type {number} */ - var size; - - this.chunkList.push(new Riff.Chunk(String.fromCharCode(input[ip++], input[ip++], input[ip++], input[ip++]), size = this.bigEndian ? (input[ip++] << 24 | input[ip++] << 16 | input[ip++] << 8 | input[ip++]) >>> 0 : (input[ip++] | input[ip++] << 8 | input[ip++] << 16 | input[ip++] << 24) >>> 0, ip)); - - ip += size; - - // padding - if (this.padding && (ip - this.offset & 1) === 1) { - ip++; - } - - this.ip = ip; - }; - - /** - * @param {number} index chunk index. - * @return {?Riff.Chunk} - */ - Riff.Parser.prototype.getChunk = function (index) { - /** @type {Riff.Chunk} */ - var chunk = this.chunkList[index]; - - if (chunk === void 0) { - return null; - } - - return chunk; - }; - - /** - * @return {number} - */ - Riff.Parser.prototype.getNumberOfChunks = function () { - return this.chunkList.length; - }; - - exports.default = Riff; +/* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__src_sf2_ts___default.a); -/***/ } +/***/ }) /******/ ]); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay9ib290c3RyYXAgM2E3YTZiZGVkYmY2M2VlNWI1ZWQiLCJ3ZWJwYWNrOi8vLy4vZXhwb3J0L3BhcnNlci5qcyIsIndlYnBhY2s6Ly8vLi9zcmMvc2YyLmpzIiwid2VicGFjazovLy8uL3NyYy9yaWZmLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQSx1QkFBZTtBQUNmO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOzs7QUFHQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBOzs7Ozs7Ozs7Ozs7Ozs7QUN0Q0E7QUFBQT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EhST1VHSCAqL1xyXG4gICAgICAgIGNhc2UgJ2tleW51bSc6IC8qIEZBTExUSFJPVUdIICovXHJcbiAgICAgICAgY2FzZSAndmVsb2NpdHknOlxyXG4gICAgICAgICAgb3V0cHV0LnB1c2goe1xyXG4gICAgICAgICAgICB0eXBlOiBrZXksXHJcbiAgICAgICAgICAgIHZhbHVlOiB7XHJcbiAgICAgICAgICAgICAgbG86IGRhdGFbaXArK10sXHJcbiAgICAgICAgICAgICAgaGk6IGRhdGFbaXArK11cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgfSk7XHJcbiAgICAgICAgICBicmVhaztcclxuICAgICAgICBkZWZhdWx0OlxyXG4gICAgICAgICAgb3V0cHV0LnB1c2goe1xyXG4gICAgICAgICAgICB0eXBlOiBrZXksXHJcbiAgICAgICAgICAgIHZhbHVlOiB7XHJcbiAgICAgICAgICAgICAgYW1vdW50OiBkYXRhW2lwKytdIHwgKGRhdGFbaXArK10gPDwgOCkgPDwgMTYgPj4gMTZcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgfSk7XHJcbiAgICAgICAgICBicmVhaztcclxuICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIC8vIEFtdFNyY09wZXJcclxuICAgIC8vIFRPRE9cclxuICAgIGlwICs9IDI7XHJcblxyXG4gICAgLy8gVHJhbnMgT3BlclxyXG4gICAgLy8gVE9ET1xyXG4gICAgaXAgKz0gMjtcclxuICB9XHJcblxyXG4gIHJldHVybiBvdXRwdXQ7XHJcbn07XHJcblxyXG4vKipcclxuICogQHBhcmFtIHtSaWZmLkNodW5rfSBjaHVua1xyXG4gKiBAcmV0dXJuIHtBcnJheS48T2JqZWN0Pn1cclxuICovXHJcblBhcnNlci5wcm90b3R5cGUucGFyc2VHZW5lcmF0b3IgPSBmdW5jdGlvbihjaHVuaykge1xyXG4gIC8qKiBAdHlwZSB7Qnl0ZUFycmF5fSAqL1xyXG4gIHZhciBkYXRhID0gdGhpcy5pbnB1dDtcclxuIC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y5pcCsrXSA8PCAyNClcclxuICAgICkgPj4+IDBcclxuICB9XHJcblxyXG4gIHJlYWRCeXRlKCkge1xyXG4gICAgcmV0dXJuIHRoaXMuZGF0YVt0aGlzLmlwKytdXHJcbiAgfVxyXG5cclxuICByZWFkQXQob2Zmc2V0OiBudW1iZXIpIHtcclxuICAgIHJldHVybiB0aGlzLmRhdGFbdGhpcy5pcCArIG9mZnNldF1cclxuICB9XHJcblxyXG4gIC8qIGhlbHBlciAqL1xyXG5cclxuICByZWFkVUludDgoKSB7XHJcbiAgICByZXR1cm4gdGhpcy5yZWFkQnl0ZSgpXHJcbiAgfVxyXG4gIFxyXG4gIHJlYWRJbnQ4KCkge1xyXG4gICAgcmV0dXJuICh0aGlzLnJlYWRCeXRlKCkgPDwgMjQpID4+IDI0XHJcbiAgfVxyXG4gIFxyXG4gIHJlYWRVSW50MTYoKSB7XHJcbiAgICByZXR1cm4gdGhpcy5yZWFkV09SRCgpXHJcbiAgfVxyXG5cclxuICByZWFkSW50MTYoKSB7XHJcbiAgICByZXR1cm4gKHRoaXMucmVhZFdPUkQoKSA8PCAxNikgPj4gMTZcclxuICB9XHJcblxyXG4gIHJlYWRVSW50MzIoKSB7XHJcbiAgICByZXR1cm4gdGhpcy5yZWFkRFdPUkQoKVxyXG4gIH1cclxufVxyXG5cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gLi9zcmMvc3RyZWFtLnRzIiwiaW1wb3J0IFBhcnNlciBmcm9tIFwiLi4vc3JjL3NmMi50c1wiXHJcbmV4cG9ydCBkZWZhdWx0IFBhcnNlclxyXG5cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gLi9leHBvcnQvcGFyc2VyLmpzIl0sInNvdXJjZVJvb3QiOiIifQ== \ No newline at end of file diff --git a/bin/sf2.synth.js b/bin/sf2.synth.js index a965870..6c9f80d 100644 --- a/bin/sf2.synth.js +++ b/bin/sf2.synth.js @@ -1,4 +1,14 @@ -/******/ (function(modules) { // webpackBootstrap +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports["synth"] = factory(); + else + root["synth"] = factory(); +})(typeof self !== 'undefined' ? self : this, function() { +return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ @@ -6,21 +16,21 @@ /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) +/******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; -/******/ +/******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { -/******/ exports: {}, -/******/ id: moduleId, -/******/ loaded: false +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded -/******/ module.loaded = true; +/******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; @@ -33,2150 +43,1730 @@ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ /******/ // __webpack_public_path__ -/******/ __webpack_require__.p = "static"; +/******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(0); +/******/ return __webpack_require__(__webpack_require__.s = 7); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ -/***/ function(module, exports, __webpack_require__) { +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +exports.__esModule = true; +exports.GeneratorEnumeratorTable = [ + 'startAddrsOffset', + 'endAddrsOffset', + 'startloopAddrsOffset', + 'endloopAddrsOffset', + 'startAddrsCoarseOffset', + 'modLfoToPitch', + 'vibLfoToPitch', + 'modEnvToPitch', + 'initialFilterFc', + 'initialFilterQ', + 'modLfoToFilterFc', + 'modEnvToFilterFc', + 'endAddrsCoarseOffset', + 'modLfoToVolume', + undefined, + 'chorusEffectsSend', + 'reverbEffectsSend', + 'pan', + undefined, undefined, undefined, + 'delayModLFO', + 'freqModLFO', + 'delayVibLFO', + 'freqVibLFO', + 'delayModEnv', + 'attackModEnv', + 'holdModEnv', + 'decayModEnv', + 'sustainModEnv', + 'releaseModEnv', + 'keynumToModEnvHold', + 'keynumToModEnvDecay', + 'delayVolEnv', + 'attackVolEnv', + 'holdVolEnv', + 'decayVolEnv', + 'sustainVolEnv', + 'releaseVolEnv', + 'keynumToVolEnvHold', + 'keynumToVolEnvDecay', + 'instrument', + undefined, + 'keyRange', + 'velRange', + 'startloopAddrsCoarseOffset', + 'keynum', + 'velocity', + 'initialAttenuation', + undefined, + 'endloopAddrsCoarseOffset', + 'coarseTune', + 'fineTune', + 'sampleID', + 'sampleModes', + undefined, + 'scaleTuning', + 'exclusiveClass', + 'overridingRootKey' +]; +exports.InfoNameTable = { + ICMT: "comment", + ICOP: "copyright", + ICRD: "creation_date", + IENG: "engineer", + INAM: "name", + IPRD: "product", + ISFT: "software", + ifil: "version", + isng: "sound_engine", + irom: "rom_name", + iver: "rom_version" +}; - "use strict"; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - var _wml = __webpack_require__(3); - - Object.keys(_wml).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function get() { - return _wml[key]; - } - }); - }); -/***/ }, +/***/ }), /* 1 */ -/***/ function(module, exports, __webpack_require__) { +/***/ (function(module, exports, __webpack_require__) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - var _riff = __webpack_require__(2); - - var _riff2 = _interopRequireDefault(_riff); - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - - /** - * @param {ByteArray} input - * @param {Object=} opt_params - * @constructor - */ - var Parser = function Parser(input, opt_params) { - opt_params = opt_params || {}; - /** @type {ByteArray} */ - this.input = input; - /** @type {(Object|undefined)} */ - this.parserOption = opt_params['parserOption']; - - /** @type {Array.} */ - this.presetHeader; - /** @type {Array.} */ - this.presetZone; - /** @type {Array.} */ - this.presetZoneModulator; - /** @type {Array.} */ - this.presetZoneGenerator; - /** @type {Array.} */ - this.instrument; - /** @type {Array.} */ - this.instrumentZone; - /** @type {Array.} */ - this.instrumentZoneModulator; - /** @type {Array.} */ - this.instrumentZoneGenerator; - /** @type {Array.} */ - this.sampleHeader; - }; - - Parser.prototype.parse = function () { - /** @type {Riff.Parser} */ - var parser = new _riff2.default.Parser(this.input, this.parserOption); - /** @type {?Riff.Chunk} */ - var chunk; - - // parse RIFF chunk - parser.parse(); - if (parser.chunkList.length !== 1) { - throw new Error('wrong chunk length'); - } - - chunk = parser.getChunk(0); - if (chunk === null) { - throw new Error('chunk not found'); - } - - this.parseRiffChunk(chunk); - //console.log(this.sampleHeader); - this.input = null; - }; - - /** - * @param {Riff.Chunk} chunk - */ - Parser.prototype.parseRiffChunk = function (chunk) { - /** @type {Riff.Parser} */ - var parser; - /** @type {ByteArray} */ - var data = this.input; - /** @type {number} */ - var ip = chunk.offset; - /** @type {string} */ - var signature; - - // check parse target - if (chunk.type !== 'RIFF') { - throw new Error('invalid chunk type:' + chunk.type); - } - - // check signature - signature = String.fromCharCode(data[ip++], data[ip++], data[ip++], data[ip++]); - if (signature !== 'sfbk') { - throw new Error('invalid signature:' + signature); - } - - // read structure - parser = new _riff2.default.Parser(data, { 'index': ip, 'length': chunk.size - 4 }); - parser.parse(); - if (parser.getNumberOfChunks() !== 3) { - throw new Error('invalid sfbk structure'); - } - - // INFO-list - this.parseInfoList( /** @type {!Riff.Chunk} */parser.getChunk(0)); - - // sdta-list - this.parseSdtaList( /** @type {!Riff.Chunk} */parser.getChunk(1)); - - // pdta-list - this.parsePdtaList( /** @type {!Riff.Chunk} */parser.getChunk(2)); - }; - - /** - * @param {Riff.Chunk} chunk - */ - Parser.prototype.parseInfoList = function (chunk) { - /** @type {Riff.Parser} */ - var parser; - /** @type {ByteArray} */ - var data = this.input; - /** @type {number} */ - var ip = chunk.offset; - /** @type {string} */ - var signature; - - // check parse target - if (chunk.type !== 'LIST') { - throw new Error('invalid chunk type:' + chunk.type); - } - - // check signature - signature = String.fromCharCode(data[ip++], data[ip++], data[ip++], data[ip++]); - if (signature !== 'INFO') { - throw new Error('invalid signature:' + signature); - } - - // read structure - parser = new _riff2.default.Parser(data, { 'index': ip, 'length': chunk.size - 4 }); - parser.parse(); - }; - - /** - * @param {Riff.Chunk} chunk - */ - Parser.prototype.parseSdtaList = function (chunk) { - /** @type {Riff.Parser} */ - var parser; - /** @type {ByteArray} */ - var data = this.input; - /** @type {number} */ - var ip = chunk.offset; - /** @type {string} */ - var signature; - - // check parse target - if (chunk.type !== 'LIST') { - throw new Error('invalid chunk type:' + chunk.type); - } - - // check signature - signature = String.fromCharCode(data[ip++], data[ip++], data[ip++], data[ip++]); - if (signature !== 'sdta') { - throw new Error('invalid signature:' + signature); - } - - // read structure - parser = new _riff2.default.Parser(data, { 'index': ip, 'length': chunk.size - 4 }); - parser.parse(); - if (parser.chunkList.length !== 1) { - throw new Error('TODO'); - } - this.samplingData = - /** @type {{type: string, size: number, offset: number}} */ - parser.getChunk(0); - }; - - /** - * @param {Riff.Chunk} chunk - */ - Parser.prototype.parsePdtaList = function (chunk) { - /** @type {Riff.Parser} */ - var parser; - /** @type {ByteArray} */ - var data = this.input; - /** @type {number} */ - var ip = chunk.offset; - /** @type {string} */ - var signature; - - // check parse target - if (chunk.type !== 'LIST') { - throw new Error('invalid chunk type:' + chunk.type); - } - - // check signature - signature = String.fromCharCode(data[ip++], data[ip++], data[ip++], data[ip++]); - if (signature !== 'pdta') { - throw new Error('invalid signature:' + signature); - } - - // read structure - parser = new _riff2.default.Parser(data, { 'index': ip, 'length': chunk.size - 4 }); - parser.parse(); - - // check number of chunks - if (parser.getNumberOfChunks() !== 9) { - throw new Error('invalid pdta chunk'); - } - - this.parsePhdr( /** @type {Riff.Chunk} */parser.getChunk(0)); - this.parsePbag( /** @type {Riff.Chunk} */parser.getChunk(1)); - this.parsePmod( /** @type {Riff.Chunk} */parser.getChunk(2)); - this.parsePgen( /** @type {Riff.Chunk} */parser.getChunk(3)); - this.parseInst( /** @type {Riff.Chunk} */parser.getChunk(4)); - this.parseIbag( /** @type {Riff.Chunk} */parser.getChunk(5)); - this.parseImod( /** @type {Riff.Chunk} */parser.getChunk(6)); - this.parseIgen( /** @type {Riff.Chunk} */parser.getChunk(7)); - this.parseShdr( /** @type {Riff.Chunk} */parser.getChunk(8)); - }; - - /** - * @param {Riff.Chunk} chunk - */ - Parser.prototype.parsePhdr = function (chunk) { - /** @type {ByteArray} */ - var data = this.input; - /** @type {number} */ - var ip = chunk.offset; - /** @type {Array.} */ - var presetHeader = this.presetHeader = []; - /** @type {number} */ - var size = chunk.offset + chunk.size; - - // check parse target - if (chunk.type !== 'phdr') { - throw new Error('invalid chunk type:' + chunk.type); - } - - while (ip < size) { - presetHeader.push({ - presetName: String.fromCharCode.apply(null, data.subarray(ip, ip += 20)), - preset: data[ip++] | data[ip++] << 8, - bank: data[ip++] | data[ip++] << 8, - presetBagIndex: data[ip++] | data[ip++] << 8, - library: (data[ip++] | data[ip++] << 8 | data[ip++] << 16 | data[ip++] << 24) >>> 0, - genre: (data[ip++] | data[ip++] << 8 | data[ip++] << 16 | data[ip++] << 24) >>> 0, - morphology: (data[ip++] | data[ip++] << 8 | data[ip++] << 16 | data[ip++] << 24) >>> 0 - }); - } - }; - - /** - * @param {Riff.Chunk} chunk - */ - Parser.prototype.parsePbag = function (chunk) { - /** @type {ByteArray} */ - var data = this.input; - /** @type {number} */ - var ip = chunk.offset; - /** @type {Array.} */ - var presetZone = this.presetZone = []; - /** @type {number} */ - var size = chunk.offset + chunk.size; - - // check parse target - if (chunk.type !== 'pbag') { - throw new Error('invalid chunk type:' + chunk.type); - } - - while (ip < size) { - presetZone.push({ - presetGeneratorIndex: data[ip++] | data[ip++] << 8, - presetModulatorIndex: data[ip++] | data[ip++] << 8 - }); - } - }; - - /** - * @param {Riff.Chunk} chunk - */ - Parser.prototype.parsePmod = function (chunk) { - // check parse target - if (chunk.type !== 'pmod') { - throw new Error('invalid chunk type:' + chunk.type); - } - - this.presetZoneModulator = this.parseModulator(chunk); - }; - - /** - * @param {Riff.Chunk} chunk - */ - Parser.prototype.parsePgen = function (chunk) { - // check parse target - if (chunk.type !== 'pgen') { - throw new Error('invalid chunk type:' + chunk.type); - } - this.presetZoneGenerator = this.parseGenerator(chunk); - }; - - /** - * @param {Riff.Chunk} chunk - */ - Parser.prototype.parseInst = function (chunk) { - /** @type {ByteArray} */ - var data = this.input; - /** @type {number} */ - var ip = chunk.offset; - /** @type {Array.} */ - var instrument = this.instrument = []; - /** @type {number} */ - var size = chunk.offset + chunk.size; - - // check parse target - if (chunk.type !== 'inst') { - throw new Error('invalid chunk type:' + chunk.type); - } - - while (ip < size) { - instrument.push({ - instrumentName: String.fromCharCode.apply(null, data.subarray(ip, ip += 20)), - instrumentBagIndex: data[ip++] | data[ip++] << 8 - }); - } - }; - - /** - * @param {Riff.Chunk} chunk - */ - Parser.prototype.parseIbag = function (chunk) { - /** @type {ByteArray} */ - var data = this.input; - /** @type {number} */ - var ip = chunk.offset; - /** @type {Array.} */ - var instrumentZone = this.instrumentZone = []; - /** @type {number} */ - var size = chunk.offset + chunk.size; - - // check parse target - if (chunk.type !== 'ibag') { - throw new Error('invalid chunk type:' + chunk.type); - } - - while (ip < size) { - instrumentZone.push({ - instrumentGeneratorIndex: data[ip++] | data[ip++] << 8, - instrumentModulatorIndex: data[ip++] | data[ip++] << 8 - }); - } - }; - - /** - * @param {Riff.Chunk} chunk - */ - Parser.prototype.parseImod = function (chunk) { - // check parse target - if (chunk.type !== 'imod') { - throw new Error('invalid chunk type:' + chunk.type); - } - - this.instrumentZoneModulator = this.parseModulator(chunk); - }; - - /** - * @param {Riff.Chunk} chunk - */ - Parser.prototype.parseIgen = function (chunk) { - // check parse target - if (chunk.type !== 'igen') { - throw new Error('invalid chunk type:' + chunk.type); - } - - this.instrumentZoneGenerator = this.parseGenerator(chunk); - }; - - /** - * @param {Riff.Chunk} chunk - */ - Parser.prototype.parseShdr = function (chunk) { - /** @type {ByteArray} */ - var data = this.input; - /** @type {number} */ - var ip = chunk.offset; - /** @type {Array.} */ - var samples = this.sample = []; - /** @type {Array.} */ - var sampleHeader = this.sampleHeader = []; - /** @type {number} */ - var size = chunk.offset + chunk.size; - /** @type {string} */ - var sampleName; - /** @type {number} */ - var start; - /** @type {number} */ - var end; - /** @type {number} */ - var startLoop; - /** @type {number} */ - var endLoop; - /** @type {number} */ - var sampleRate; - /** @type {number} */ - var originalPitch; - /** @type {number} */ - var pitchCorrection; - /** @type {number} */ - var sampleLink; - /** @type {number} */ - var sampleType; - - // check parse target - if (chunk.type !== 'shdr') { - throw new Error('invalid chunk type:' + chunk.type); - } - - while (ip < size) { - sampleName = String.fromCharCode.apply(null, data.subarray(ip, ip += 20)); - start = (data[ip++] << 0 | data[ip++] << 8 | data[ip++] << 16 | data[ip++] << 24) >>> 0; - end = (data[ip++] << 0 | data[ip++] << 8 | data[ip++] << 16 | data[ip++] << 24) >>> 0; - startLoop = (data[ip++] << 0 | data[ip++] << 8 | data[ip++] << 16 | data[ip++] << 24) >>> 0; - endLoop = (data[ip++] << 0 | data[ip++] << 8 | data[ip++] << 16 | data[ip++] << 24) >>> 0; - sampleRate = (data[ip++] << 0 | data[ip++] << 8 | data[ip++] << 16 | data[ip++] << 24) >>> 0; - originalPitch = data[ip++]; - pitchCorrection = data[ip++] << 24 >> 24; - sampleLink = data[ip++] | data[ip++] << 8; - sampleType = data[ip++] | data[ip++] << 8; - - //* - var sample = new Int16Array(new Uint8Array(data.subarray(this.samplingData.offset + start * 2, this.samplingData.offset + end * 2)).buffer); - - startLoop -= start; - endLoop -= start; - - if (sampleRate > 0) { - var adjust = this.adjustSampleData(sample, sampleRate); - sample = adjust.sample; - sampleRate *= adjust.multiply; - startLoop *= adjust.multiply; - endLoop *= adjust.multiply; - } - - samples.push(sample); - //*/ - - sampleHeader.push({ - sampleName: sampleName, - /* - start: start, - end: end, - */ - startLoop: startLoop, - endLoop: endLoop, - sampleRate: sampleRate, - originalPitch: originalPitch, - pitchCorrection: pitchCorrection, - sampleLink: sampleLink, - sampleType: sampleType - }); - } - }; - - Parser.prototype.adjustSampleData = function (sample, sampleRate) { - /** @type {Int16Array} */ - var newSample; - /** @type {number} */ - var i; - /** @type {number} */ - var il; - /** @type {number} */ - var j; - /** @type {number} */ - var multiply = 1; - - // buffer - while (sampleRate < 22050) { - newSample = new Int16Array(sample.length * 2); - for (i = j = 0, il = sample.length; i < il; ++i) { - newSample[j++] = sample[i]; - newSample[j++] = sample[i]; - } - sample = newSample; - multiply *= 2; - sampleRate *= 2; - } - - return { - sample: sample, - multiply: multiply - }; - }; - - /** - * @param {Riff.Chunk} chunk - * @return {Array.} - */ - Parser.prototype.parseModulator = function (chunk) { - /** @type {ByteArray} */ - var data = this.input; - /** @type {number} */ - var ip = chunk.offset; - /** @type {number} */ - var size = chunk.offset + chunk.size; - /** @type {number} */ - var code; - /** @type {string} */ - var key; - /** @type {Array.} */ - var output = []; - - while (ip < size) { - // Src Oper - // TODO - ip += 2; - - // Dest Oper - code = data[ip++] | data[ip++] << 8; - key = Parser.GeneratorEnumeratorTable[code]; - if (key === void 0) { - // Amount - output.push({ - type: key, - value: { - code: code, - amount: data[ip] | data[ip + 1] << 8 << 16 >> 16, - lo: data[ip++], - hi: data[ip++] - } - }); - } else { - // Amount - switch (key) { - case 'keyRange': /* FALLTHROUGH */ - case 'velRange': /* FALLTHROUGH */ - case 'keynum': /* FALLTHROUGH */ - case 'velocity': - output.push({ - type: key, - value: { - lo: data[ip++], - hi: data[ip++] - } - }); - break; - default: - output.push({ - type: key, - value: { - amount: data[ip++] | data[ip++] << 8 << 16 >> 16 - } - }); - break; - } - } - - // AmtSrcOper - // TODO - ip += 2; - - // Trans Oper - // TODO - ip += 2; - } - - return output; - }; - - /** - * @param {Riff.Chunk} chunk - * @return {Array.} - */ - Parser.prototype.parseGenerator = function (chunk) { - /** @type {ByteArray} */ - var data = this.input; - /** @type {number} */ - var ip = chunk.offset; - /** @type {number} */ - var size = chunk.offset + chunk.size; - /** @type {number} */ - var code; - /** @type {string} */ - var key; - /** @type {Array.} */ - var output = []; - - while (ip < size) { - code = data[ip++] | data[ip++] << 8; - key = Parser.GeneratorEnumeratorTable[code]; - if (key === void 0) { - output.push({ - type: key, - value: { - code: code, - amount: data[ip] | data[ip + 1] << 8 << 16 >> 16, - lo: data[ip++], - hi: data[ip++] - } - }); - continue; - } - - switch (key) { - case 'keynum': /* FALLTHROUGH */ - case 'keyRange': /* FALLTHROUGH */ - case 'velRange': /* FALLTHROUGH */ - case 'velocity': - output.push({ - type: key, - value: { - lo: data[ip++], - hi: data[ip++] - } - }); - break; - default: - output.push({ - type: key, - value: { - amount: data[ip++] | data[ip++] << 8 << 16 >> 16 - } - }); - break; - } - } - - return output; - }; - - Parser.prototype.createInstrument = function () { - /** @type {Array.} */ - var instrument = this.instrument; - /** @type {Array.} */ - var zone = this.instrumentZone; - /** @type {Array.} */ - var output = []; - /** @type {number} */ - var bagIndex; - /** @type {number} */ - var bagIndexEnd; - /** @type {Array.} */ - var zoneInfo; - /** @type {{generator: Object, generatorInfo: Array.}} */ - var instrumentGenerator; - /** @type {{modulator: Object, modulatorInfo: Array.}} */ - var instrumentModulator; - /** @type {number} */ - var i; - /** @type {number} */ - var il; - /** @type {number} */ - var j; - /** @type {number} */ - var jl; - - // instrument -> instrument bag -> generator / modulator - for (i = 0, il = instrument.length; i < il; ++i) { - bagIndex = instrument[i].instrumentBagIndex; - bagIndexEnd = instrument[i + 1] ? instrument[i + 1].instrumentBagIndex : zone.length; - zoneInfo = []; - - // instrument bag - for (j = bagIndex, jl = bagIndexEnd; j < jl; ++j) { - instrumentGenerator = this.createInstrumentGenerator_(zone, j); - instrumentModulator = this.createInstrumentModulator_(zone, j); - - zoneInfo.push({ - generator: instrumentGenerator.generator, - generatorSequence: instrumentGenerator.generatorInfo, - modulator: instrumentModulator.modulator, - modulatorSequence: instrumentModulator.modulatorInfo - }); - } - - output.push({ - name: instrument[i].instrumentName, - info: zoneInfo - }); - } - - return output; - }; - - Parser.prototype.createPreset = function () { - /** @type {Array.} */ - var preset = this.presetHeader; - /** @type {Array.} */ - var zone = this.presetZone; - /** @type {Array.} */ - var output = []; - /** @type {number} */ - var bagIndex; - /** @type {number} */ - var bagIndexEnd; - /** @type {Array.} */ - var zoneInfo; - /** @type {number} */ - var instrument; - /** @type {{generator: Object, generatorInfo: Array.}} */ - var presetGenerator; - /** @type {{modulator: Object, modulatorInfo: Array.}} */ - var presetModulator; - /** @type {number} */ - var i; - /** @type {number} */ - var il; - /** @type {number} */ - var j; - /** @type {number} */ - var jl; - - // preset -> preset bag -> generator / modulator - for (i = 0, il = preset.length; i < il; ++i) { - bagIndex = preset[i].presetBagIndex; - bagIndexEnd = preset[i + 1] ? preset[i + 1].presetBagIndex : zone.length; - zoneInfo = []; - - // preset bag - for (j = bagIndex, jl = bagIndexEnd; j < jl; ++j) { - presetGenerator = this.createPresetGenerator_(zone, j); - presetModulator = this.createPresetModulator_(zone, j); - - zoneInfo.push({ - generator: presetGenerator.generator, - generatorSequence: presetGenerator.generatorInfo, - modulator: presetModulator.modulator, - modulatorSequence: presetModulator.modulatorInfo - }); - - instrument = presetGenerator.generator['instrument'] !== void 0 ? presetGenerator.generator['instrument'].amount : presetModulator.modulator['instrument'] !== void 0 ? presetModulator.modulator['instrument'].amount : null; - } - - output.push({ - name: preset[i].presetName, - info: zoneInfo, - header: preset[i], - instrument: instrument - }); - } - - return output; - }; - - /** - * @param {Array.} zone - * @param {number} index - * @returns {{generator: Object, generatorInfo: Array.}} - * @private - */ - Parser.prototype.createInstrumentGenerator_ = function (zone, index) { - var modgen = this.createBagModGen_(zone, zone[index].instrumentGeneratorIndex, zone[index + 1] ? zone[index + 1].instrumentGeneratorIndex : this.instrumentZoneGenerator.length, this.instrumentZoneGenerator); - - return { - generator: modgen.modgen, - generatorInfo: modgen.modgenInfo - }; - }; - - /** - * @param {Array.} zone - * @param {number} index - * @returns {{modulator: Object, modulatorInfo: Array.}} - * @private - */ - Parser.prototype.createInstrumentModulator_ = function (zone, index) { - var modgen = this.createBagModGen_(zone, zone[index].presetModulatorIndex, zone[index + 1] ? zone[index + 1].instrumentModulatorIndex : this.instrumentZoneModulator.length, this.instrumentZoneModulator); - - return { - modulator: modgen.modgen, - modulatorInfo: modgen.modgenInfo - }; - }; - - /** - * @param {Array.} zone - * @param {number} index - * @returns {{generator: Object, generatorInfo: Array.}} - * @private - */ - Parser.prototype.createPresetGenerator_ = function (zone, index) { - var modgen = this.createBagModGen_(zone, zone[index].presetGeneratorIndex, zone[index + 1] ? zone[index + 1].presetGeneratorIndex : this.presetZoneGenerator.length, this.presetZoneGenerator); - - return { - generator: modgen.modgen, - generatorInfo: modgen.modgenInfo - }; - }; - - /** - * @param {Array.} zone - * @param {number} index - * @returns {{modulator: Object, modulatorInfo: Array.}} - * @private - */ - Parser.prototype.createPresetModulator_ = function (zone, index) { - /** @type {{modgen: Object, modgenInfo: Array.}} */ - var modgen = this.createBagModGen_(zone, zone[index].presetModulatorIndex, zone[index + 1] ? zone[index + 1].presetModulatorIndex : this.presetZoneModulator.length, this.presetZoneModulator); - - return { - modulator: modgen.modgen, - modulatorInfo: modgen.modgenInfo - }; - }; - - /** - * @param {Array.} zone - * @param {number} indexStart - * @param {number} indexEnd - * @param zoneModGen - * @returns {{modgen: Object, modgenInfo: Array.}} - * @private - */ - Parser.prototype.createBagModGen_ = function (zone, indexStart, indexEnd, zoneModGen) { - /** @type {Array.} */ - var modgenInfo = []; - /** @type {Object} */ - var modgen = { - unknown: [], - 'keyRange': { - hi: 127, - lo: 0 - } - }; // TODO - /** @type {Object} */ - var info; - /** @type {number} */ - var i; - /** @type {number} */ - var il; - - for (i = indexStart, il = indexEnd; i < il; ++i) { - info = zoneModGen[i]; - modgenInfo.push(info); - - if (info.type === 'unknown') { - modgen.unknown.push(info.value); - } else { - modgen[info.type] = info.value; - } - } - - return { - modgen: modgen, - modgenInfo: modgenInfo - }; - }; - - /** - * @type {Array.} - * @const - */ - Parser.GeneratorEnumeratorTable = ['startAddrsOffset', 'endAddrsOffset', 'startloopAddrsOffset', 'endloopAddrsOffset', 'startAddrsCoarseOffset', 'modLfoToPitch', 'vibLfoToPitch', 'modEnvToPitch', 'initialFilterFc', 'initialFilterQ', 'modLfoToFilterFc', 'modEnvToFilterFc', 'endAddrsCoarseOffset', 'modLfoToVolume',, // 14 - 'chorusEffectsSend', 'reverbEffectsSend', 'pan',,,, // 18,19,20 - 'delayModLFO', 'freqModLFO', 'delayVibLFO', 'freqVibLFO', 'delayModEnv', 'attackModEnv', 'holdModEnv', 'decayModEnv', 'sustainModEnv', 'releaseModEnv', 'keynumToModEnvHold', 'keynumToModEnvDecay', 'delayVolEnv', 'attackVolEnv', 'holdVolEnv', 'decayVolEnv', 'sustainVolEnv', 'releaseVolEnv', 'keynumToVolEnvHold', 'keynumToVolEnvDecay', 'instrument',, // 42 - 'keyRange', 'velRange', 'startloopAddrsCoarseOffset', 'keynum', 'velocity', 'initialAttenuation',, // 49 - 'endloopAddrsCoarseOffset', 'coarseTune', 'fineTune', 'sampleID', 'sampleModes',, // 55 - 'scaleTuning', 'exclusiveClass', 'overridingRootKey']; - - exports.default = Parser; +"use strict"; -/***/ }, +exports.__esModule = true; +var riff_ts_1 = __webpack_require__(2); +var sf2_data_ts_1 = __webpack_require__(3); +var helper_ts_1 = __webpack_require__(4); +var stream_ts_1 = __webpack_require__(5); +var constants_ts_1 = __webpack_require__(0); +var default_1 = /** @class */ (function () { + function default_1(input, opt_params) { + if (opt_params === void 0) { opt_params = {}; } + this.input = input; + this.parserOption = opt_params.parserOption; + } + default_1.prototype.parse = function () { + var parser = new riff_ts_1.Parser(this.input, this.parserOption); + // parse RIFF chunk + parser.parse(); + if (parser.chunkList.length !== 1) { + throw new Error('wrong chunk length'); + } + var chunk = parser.getChunk(0); + if (chunk === null) { + throw new Error('chunk not found'); + } + this.parseRiffChunk(chunk, this.input); + this.input = null; + }; + default_1.prototype.parseRiffChunk = function (chunk, data) { + var chunkList = getChunkList(chunk, data, "RIFF", "sfbk"); + if (chunkList.length !== 3) { + throw new Error('invalid sfbk structure'); + } + // INFO-list + this.info = parseInfoList(chunkList[0], data); + // sdta-list + this.samplingData = parseSdtaList(chunkList[1], data); + // pdta-list + this.parsePdtaList(chunkList[2], data); + }; + default_1.prototype.parsePdtaList = function (chunk, data) { + var chunkList = getChunkList(chunk, data, "LIST", "pdta"); + // check number of chunks + if (chunkList.length !== 9) { + throw new Error('invalid pdta chunk'); + } + this.presetHeader = parsePhdr(chunkList[0], data); + this.presetZone = parsePbag(chunkList[1], data); + this.presetZoneModulator = parsePmod(chunkList[2], data); + this.presetZoneGenerator = parsePgen(chunkList[3], data); + this.instrument = parseInst(chunkList[4], data); + this.instrumentZone = parseIbag(chunkList[5], data); + this.instrumentZoneModulator = parseImod(chunkList[6], data); + this.instrumentZoneGenerator = parseIgen(chunkList[7], data); + this.sampleHeader = parseShdr(chunkList[8], data); + this.sample = loadSample(this.sampleHeader, this.samplingData.offset, data); + }; + return default_1; +}()); +exports["default"] = default_1; +function getChunkList(chunk, data, expectedType, expectedSignature) { + // check parse target + if (chunk.type !== expectedType) { + throw new Error('invalid chunk type:' + chunk.type); + } + var stream = new stream_ts_1["default"](data, chunk.offset); + // check signature + var signature = stream.readString(4); + if (signature !== expectedSignature) { + throw new Error('invalid signature:' + signature); + } + // read structure + var parser = new riff_ts_1.Parser(data, { 'index': stream.ip, 'length': chunk.size - 4 }); + parser.parse(); + return parser.chunkList; +} +function parseInfoList(chunk, data) { + var info = {}; + var chunkList = getChunkList(chunk, data, "LIST", "INFO"); + for (var _i = 0, chunkList_1 = chunkList; _i < chunkList_1.length; _i++) { + var p = chunkList_1[_i]; + var offset = p.offset, size = p.size, type = p.type; + var name_1 = constants_ts_1.InfoNameTable[type] || type; + info[name_1] = helper_ts_1.readString(data, offset, offset + size); + } + return info; +} +function parseSdtaList(chunk, data) { + var chunkList = getChunkList(chunk, data, "LIST", "sdta"); + if (chunkList.length !== 1) { + throw new Error('TODO'); + } + return chunkList[0]; +} +function parseChunk(chunk, data, type, factory) { + var result = []; + if (chunk.type !== type) { + throw new Error('invalid chunk type:' + chunk.type); + } + var stream = new stream_ts_1["default"](data, chunk.offset); + var size = chunk.offset + chunk.size; + while (stream.ip < size) { + result.push(factory(stream)); + } + return result; +} +var parsePhdr = function (chunk, data) { return parseChunk(chunk, data, "phdr", function (stream) { return sf2_data_ts_1.PresetHeader.parse(stream); }); }; +var parsePbag = function (chunk, data) { return parseChunk(chunk, data, "pbag", function (stream) { return sf2_data_ts_1.PresetBag.parse(stream); }); }; +var parseInst = function (chunk, data) { return parseChunk(chunk, data, "inst", function (stream) { return sf2_data_ts_1.Instrument.parse(stream); }); }; +var parseIbag = function (chunk, data) { return parseChunk(chunk, data, "ibag", function (stream) { return sf2_data_ts_1.InstrumentBag.parse(stream); }); }; +var parsePmod = function (chunk, data) { return parseChunk(chunk, data, "pmod", function (stream) { return sf2_data_ts_1.ModulatorList.parse(stream); }); }; +var parseImod = function (chunk, data) { return parseChunk(chunk, data, "imod", function (stream) { return sf2_data_ts_1.ModulatorList.parse(stream); }); }; +var parsePgen = function (chunk, data) { return parseChunk(chunk, data, "pgen", function (stream) { return sf2_data_ts_1.GeneratorList.parse(stream); }); }; +var parseIgen = function (chunk, data) { return parseChunk(chunk, data, "igen", function (stream) { return sf2_data_ts_1.GeneratorList.parse(stream); }); }; +var parseShdr = function (chunk, data) { return parseChunk(chunk, data, "shdr", function (stream) { return sf2_data_ts_1.Sample.parse(stream); }); }; +function adjustSampleData(sample, sampleRate) { + var multiply = 1; + // buffer + while (sampleRate < 22050) { + var newSample = new Int16Array(sample.length * 2); + for (var i = 0, j = 0, il = sample.length; i < il; ++i) { + newSample[j++] = sample[i]; + newSample[j++] = sample[i]; + } + sample = newSample; + multiply *= 2; + sampleRate *= 2; + } + return { + sample: sample, + multiply: multiply + }; +} +function loadSample(sampleHeader, samplingDataOffset, data) { + var samples = []; + for (var _i = 0, sampleHeader_1 = sampleHeader; _i < sampleHeader_1.length; _i++) { + var header = sampleHeader_1[_i]; + var sample = new Int16Array(new Uint8Array(data.subarray(samplingDataOffset + header.start * 2, samplingDataOffset + header.end * 2)).buffer); + if (header.sampleRate > 0) { + var adjust = adjustSampleData(sample, header.sampleRate); + sample = adjust.sample; + header.sampleRate *= adjust.multiply; + header.startLoop *= adjust.multiply; + header.endLoop *= adjust.multiply; + } + samples.push(sample); + } + return samples; +} + + +/***/ }), /* 2 */ -/***/ function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - var Riff = {}; - - /** - * @param {ByteArray} input input buffer. - * @param {Object=} opt_params option parameters. - * @constructor - */ - Riff.Parser = function (input, opt_params) { - opt_params = opt_params || {}; - /** @type {ByteArray} */ - this.input = input; - /** @type {number} */ - this.ip = opt_params['index'] || 0; - /** @type {number} */ - this.length = opt_params['length'] || input.length - this.ip; - /** @type {Array.} */ - this.chunkList; - /** @type {number} */ - this.offset = this.ip; - /** @type {boolean} */ - this.padding = opt_params['padding'] !== void 0 ? opt_params['padding'] : true; - /** @type {boolean} */ - this.bigEndian = opt_params['bigEndian'] !== void 0 ? opt_params['bigEndian'] : false; - }; - - /** - * @param {string} type - * @param {number} size - * @param {number} offset - * @constructor - */ - Riff.Chunk = function (type, size, offset) { - /** @type {string} */ - this.type = type; - /** @type {number} */ - this.size = size; - /** @type {number} */ - this.offset = offset; - }; - - Riff.Parser.prototype.parse = function () { - /** @type {number} */ - var length = this.length + this.offset; - - this.chunkList = []; - - while (this.ip < length) { - this.parseChunk(); - } - }; - - Riff.Parser.prototype.parseChunk = function () { - /** @type {ByteArray} */ - var input = this.input; - /** @type {number} */ - var ip = this.ip; - /** @type {number} */ - var size; - - this.chunkList.push(new Riff.Chunk(String.fromCharCode(input[ip++], input[ip++], input[ip++], input[ip++]), size = this.bigEndian ? (input[ip++] << 24 | input[ip++] << 16 | input[ip++] << 8 | input[ip++]) >>> 0 : (input[ip++] | input[ip++] << 8 | input[ip++] << 16 | input[ip++] << 24) >>> 0, ip)); - - ip += size; - - // padding - if (this.padding && (ip - this.offset & 1) === 1) { - ip++; - } - - this.ip = ip; - }; - - /** - * @param {number} index chunk index. - * @return {?Riff.Chunk} - */ - Riff.Parser.prototype.getChunk = function (index) { - /** @type {Riff.Chunk} */ - var chunk = this.chunkList[index]; - - if (chunk === void 0) { - return null; - } - - return chunk; - }; - - /** - * @return {number} - */ - Riff.Parser.prototype.getNumberOfChunks = function () { - return this.chunkList.length; - }; - - exports.default = Riff; +exports.__esModule = true; +var Parser = /** @class */ (function () { + function Parser(input, opt_params) { + if (opt_params === void 0) { opt_params = {}; } + this.chunkList = []; + this.input = input; + this.ip = opt_params['index'] || 0; + this.length = opt_params['length'] || input.length - this.ip; + this.chunkList = []; + this.offset = this.ip; + this.padding = + opt_params['padding'] !== void 0 ? opt_params['padding'] : true; + this.bigEndian = + opt_params['bigEndian'] !== void 0 ? opt_params['bigEndian'] : false; + } + Parser.prototype.parse = function () { + var length = this.length + this.offset; + this.chunkList = []; + while (this.ip < length) { + this.parseChunk(); + } + }; + Parser.prototype.parseChunk = function () { + var input = this.input; + var ip = this.ip; + var size; + this.chunkList.push(new Chunk(String.fromCharCode(input[ip++], input[ip++], input[ip++], input[ip++]), (size = this.bigEndian ? + ((input[ip++] << 24) | (input[ip++] << 16) | + (input[ip++] << 8) | (input[ip++])) >>> 0 : + ((input[ip++]) | (input[ip++] << 8) | + (input[ip++] << 16) | (input[ip++] << 24)) >>> 0), ip)); + ip += size; + // padding + if (this.padding && ((ip - this.offset) & 1) === 1) { + ip++; + } + this.ip = ip; + }; + Parser.prototype.getChunk = function (index) { + var chunk = this.chunkList[index]; + if (chunk === void 0) { + return null; + } + return chunk; + }; + Parser.prototype.getNumberOfChunks = function () { + return this.chunkList.length; + }; + return Parser; +}()); +exports.Parser = Parser; +var Chunk = /** @class */ (function () { + function Chunk(type, size, offset) { + this.type = type; + this.size = size; + this.offset = offset; + } + return Chunk; +}()); +exports.Chunk = Chunk; -/***/ }, + +/***/ }), /* 3 */ -/***/ function(module, exports, __webpack_require__) { +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +exports.__esModule = true; +var constants_ts_1 = __webpack_require__(0); +var VersionTag = /** @class */ (function () { + function VersionTag() { + } + return VersionTag; +}()); +exports.VersionTag = VersionTag; +var PresetHeader = /** @class */ (function () { + function PresetHeader() { + } + PresetHeader.parse = function (stream) { + var p = new PresetHeader(); + p.presetName = stream.readString(20); + p.preset = stream.readWORD(); + p.bank = stream.readWORD(); + p.presetBagIndex = stream.readWORD(); + p.library = stream.readDWORD(); + p.genre = stream.readDWORD(); + p.morphology = stream.readDWORD(); + return p; + }; + return PresetHeader; +}()); +exports.PresetHeader = PresetHeader; +var PresetBag = /** @class */ (function () { + function PresetBag() { + } + PresetBag.parse = function (stream) { + var p = new PresetBag(); + p.presetGeneratorIndex = stream.readWORD(); + p.presetModulatorIndex = stream.readWORD(); + return p; + }; + return PresetBag; +}()); +exports.PresetBag = PresetBag; +var ModulatorList = /** @class */ (function () { + function ModulatorList() { + } + ModulatorList.parse = function (stream) { + var t = new ModulatorList(); + t.sourceOper = stream.readWORD(); + var code = stream.readWORD(); + t.destinationOper = code; + var key = constants_ts_1.GeneratorEnumeratorTable[code]; + t.type = key; + if (key === void 0) { + // Amount + t.value = { + code: code, + amount: stream.readInt16() + }; + } + else { + // Amount + switch (key) { + case 'keyRange': /* FALLTHROUGH */ + case 'velRange': /* FALLTHROUGH */ + case 'keynum': /* FALLTHROUGH */ + case 'velocity': + t.value = { + lo: stream.readByte(), + hi: stream.readByte() + }; + break; + default: + t.value = { + amount: stream.readInt16() + }; + break; + } + } + t.amountSourceOper = stream.readWORD(); + t.transOper = stream.readWORD(); + return t; + }; + return ModulatorList; +}()); +exports.ModulatorList = ModulatorList; +var GeneratorList = /** @class */ (function () { + function GeneratorList() { + } + GeneratorList.parse = function (stream) { + var t = new ModulatorList(); + var code = stream.readWORD(); + var key = constants_ts_1.GeneratorEnumeratorTable[code]; + t.type = key; + if (key === void 0) { + t.value = { + code: code, + amount: stream.readInt16() + }; + } + else { + switch (key) { + case 'keynum': /* FALLTHROUGH */ + case 'keyRange': /* FALLTHROUGH */ + case 'velRange': /* FALLTHROUGH */ + case 'velocity': + t.value = { + lo: stream.readByte(), + hi: stream.readByte() + }; + break; + default: + t.value = { + amount: stream.readInt16() + }; + break; + } + } + return t; + }; + return GeneratorList; +}()); +exports.GeneratorList = GeneratorList; +var Instrument = /** @class */ (function () { + function Instrument() { + } + Instrument.parse = function (stream) { + var t = new Instrument(); + t.instrumentName = stream.readString(20); + t.instrumentBagIndex = stream.readWORD(); + return t; + }; + return Instrument; +}()); +exports.Instrument = Instrument; +var InstrumentBag = /** @class */ (function () { + function InstrumentBag() { + } + InstrumentBag.parse = function (stream) { + var t = new InstrumentBag(); + t.instrumentGeneratorIndex = stream.readWORD(); + t.instrumentModulatorIndex = stream.readWORD(); + return t; + }; + return InstrumentBag; +}()); +exports.InstrumentBag = InstrumentBag; +var Sample = /** @class */ (function () { + function Sample() { + } + Sample.parse = function (stream) { + var s = new Sample(); + s.sampleName = stream.readString(20); + s.start = stream.readDWORD(); + s.end = stream.readDWORD(); + s.startLoop = stream.readDWORD(); + s.endLoop = stream.readDWORD(); + s.sampleRate = stream.readDWORD(); + s.originalPitch = stream.readByte(); + s.pitchCorrection = stream.readInt8(); + s.sampleLink = stream.readWORD(); + s.sampleType = stream.readWORD(); + s.startLoop -= s.start; + s.endLoop -= s.start; + return s; + }; + return Sample; +}()); +exports.Sample = Sample; +/** + * @enum {number} + */ +exports.SampleLink = { + monoSample: 1, + rightSample: 2, + leftSample: 4, + linkedSample: 8, + RomMonoSample: 0x8001, + RomRightSample: 0x8002, + RomLeftSample: 0x8004, + RomLinkedSample: 0x8008 +}; - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - var _sound_font_synth = __webpack_require__(4); - - var _sound_font_synth2 = _interopRequireDefault(_sound_font_synth); - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - - /** - * @constructor - */ - var WebMidiLink = function WebMidiLink() { - /** @type {Array.} */ - this.RpnMsb = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; - /** @type {Array.} */ - this.RpnLsb = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; - /** @type {boolean} */ - this.ready; - /** @type {Synthesizer} */ - this.synth; - /** @type {function(ArrayBuffer)} */ - this.loadCallback; - /** @type {Function} */ - this.messageHandler = this.onmessage.bind(this); - - window.addEventListener('DOMContentLoaded', function () { - this.ready = true; - }.bind(this), false); - }; - - WebMidiLink.prototype.setup = function (url) { - if (!this.ready) { - window.addEventListener('DOMContentLoaded', function onload() { - window.removeEventListener('DOMContentLoaded', onload, false); - this.load(url); - }.bind(this), false); - } else { - this.load(url); - } - }; - - WebMidiLink.prototype.load = function (url) { - /** @type {XMLHttpRequest} */ - var xhr = new XMLHttpRequest(); - - xhr.open('GET', url, true); - xhr.responseType = 'arraybuffer'; - - xhr.addEventListener('load', function (ev) { - /** @type {XMLHttpRequest} */ - var xhr = ev.target; - - this.onload(xhr.response); - if (typeof this.loadCallback === 'function') { - this.loadCallback(xhr.response); - } - }.bind(this), false); - - xhr.send(); - }; - - /** - * @param {ArrayBuffer} response - */ - WebMidiLink.prototype.onload = function (response) { - /** @type {Uint8Array} */ - var input = new Uint8Array(response); - - this.loadSoundFont(input); - }; - - /** - * @param {Uint8Array} input - */ - WebMidiLink.prototype.loadSoundFont = function (input) { - /** @type {Synthesizer} */ - var synth; - - if (!this.synth) { - synth = this.synth = new _sound_font_synth2.default(input); - document.body.appendChild(synth.drawSynth()); - synth.init(); - synth.start(); - window.addEventListener('message', this.messageHandler, false); - } else { - synth = this.synth; - synth.refreshInstruments(input); - } - - // link ready - if (window.opener) { - window.opener.postMessage("link,ready", '*'); - } else if (window.parent !== window) { - window.parent.postMessage("link,ready", '*'); - } - }; - - /** - * @param {Event} ev - */ - WebMidiLink.prototype.onmessage = function (ev) { - var msg = ev.data.split(','); - var type = msg.shift(); - var command; - - switch (type) { - case 'midi': - this.processMidiMessage(msg.map(function (hex) { - return parseInt(hex, 16); - })); - break; - case 'link': - command = msg.shift(); - switch (command) { - case 'reqpatch': - // TODO: dummy data - if (window.opener) { - window.opener.postMessage("link,patch", '*'); - } else if (window.parent !== window) { - window.parent.postMessage("link,patch", '*'); - } - break; - case 'setpatch': - // TODO: NOP - break; - default: - console.error('unknown link message:', command); - break; - } - break; - default: - console.error('unknown message type'); - } - }; - - /** - * @param {function(ArrayBuffer)} callback - */ - WebMidiLink.prototype.setLoadCallback = function (callback) { - this.loadCallback = callback; - }; - - /** - * @param {Array.} message - */ - WebMidiLink.prototype.processMidiMessage = function (message) { - /** @type {number} */ - var channel = message[0] & 0x0f; - /** @type {Synthesizer} */ - var synth = this.synth; - - switch (message[0] & 0xf0) { - case 0x80: - // NoteOff: 8n kk vv - synth.noteOff(channel, message[1], message[2]); - break; - case 0x90: - // NoteOn: 9n kk vv - if (message[2] > 0) { - synth.noteOn(channel, message[1], message[2]); - } else { - synth.noteOff(channel, message[1], 0); - } - break; - case 0xB0: - // Control Change: Bn cc dd - switch (message[1]) { - case 0x06: - // Data Entry: Bn 06 dd - switch (this.RpnMsb[channel]) { - case 0: - switch (this.RpnLsb[channel]) { - case 0: - // Pitch Bend Sensitivity - synth.pitchBendSensitivity(channel, message[2]); - break; - } - break; - } - break; - case 0x07: - // Volume Change: Bn 07 dd - synth.volumeChange(channel, message[2]); - break; - case 0x0A: - // Panpot Change: Bn 0A dd - synth.panpotChange(channel, message[2]); - break; - case 0x78: - // All Sound Off: Bn 78 00 - synth.allSoundOff(channel); - break; - case 0x79: - // Reset All Control: Bn 79 00 - synth.resetAllControl(channel); - break; - case 0x20: - // BankSelect - //console.log("bankselect:", channel, message[2]); - break; - case 0x64: - // RPN MSB - this.RpnMsb[channel] = message[2]; - break; - case 0x65: - // RPN LSB - this.RpnLsb[channel] = message[2]; - break; - default: - // not supported - } - break; - case 0xC0: - // Program Change: Cn pp - synth.programChange(channel, message[1]); - break; - case 0xE0: - // Pitch Bend - synth.pitchBend(channel, message[1], message[2]); - break; - case 0xf0: - // System Exclusive Message - // ID number - switch (message[1]) { - case 0x7e: - // non-realtime - // TODO - break; - case 0x7f: - // realtime - var device = message[2]; - // sub ID 1 - switch (message[3]) { - case 0x04: - // device control - // sub ID 2 - switch (message[4]) { - case 0x01: - // master volume - synth.setMasterVolume(message[5] + (message[6] << 7)); - break; - } - break; - } - break; - } - break; - default: - // not supported - break; - } - }; - - exports.default = WebMidiLink; -/***/ }, +/***/ }), /* 4 */ -/***/ function(module, exports, __webpack_require__) { +/***/ (function(module, exports, __webpack_require__) { - "use strict"; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - var _sound_font_synth_note = __webpack_require__(5); - - var _sound_font_synth_note2 = _interopRequireDefault(_sound_font_synth_note); - - var _sf = __webpack_require__(1); - - var _sf2 = _interopRequireDefault(_sf); - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - - /** - * @constructor - */ - var Synthesizer = function Synthesizer(input) { - /** @type {Uint8Array} */ - this.input = input; - /** @type {Parser} */ - this.parser; - /** @type {number} */ - this.bank = 0; - /** @type {Array.>} */ - this.bankSet; - /** @type {number} */ - this.bufferSize = 1024; - /** @type {AudioContext} */ - this.ctx = this.getAudioContext(); - /** @type {AudioGainNode} */ - this.gainMaster = this.ctx.createGainNode(); - /** @type {DynamicsCompressorNode} */ - this.compressor = this.ctx.createDynamicsCompressor(); - /** @type {AudioBufferSourceNode} */ - this.bufSrc = this.ctx.createBufferSource(); - /** @type {Array.} */ - this.channelInstrument = [0, 1, 2, 3, 4, 5, 6, 7, 8, 0, 10, 11, 12, 13, 14, 15]; - /** @type {Array.} */ - this.channelVolume = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; - /** @type {Array.} */ - this.channelPanpot = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; - /** @type {Array.} */ - this.channelPitchBend = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; - this.channelPitchBendSensitivity = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; - /** @type {Array.>} */ - this.currentNoteOn = [[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []]; - /** @type {number} */ - this.baseVolume = 1 / 0x8000; - /** @type {number} */ - this.masterVolume = 16384; - - /** @type {HTMLTableElement} */ - this.table; - }; - /** - * @returns {AudioContext} - */ - Synthesizer.prototype.getAudioContext = function () { - /** @type {AudioContext} */ - var ctx; - - if (AudioContext !== void 0) { - ctx = new AudioContext(); - } else if (webkitAudioContext !== void 0) { - ctx = new webkitAudioContext(); - } else if (mozAudioContext !== void 0) { - ctx = new mozAudioContext(); - } else { - throw new Error('Web Audio not supported'); - } - - if (ctx.createGainNode === void 0) { - ctx.createGainNode = ctx.createGain; - } - - return ctx; - }; - - /** - * @type {Array.} - * @const - */ - Synthesizer.ProgramNames = ["Acoustic Piano", "Bright Piano", "Electric Grand Piano", "Honky-tonk Piano", "Electric Piano", "Electric Piano 2", "Harpsichord", "Clavi", "Celesta", "Glockenspiel", "Musical box", "Vibraphone", "Marimba", "Xylophone", "Tubular Bell", "Dulcimer", "Drawbar Organ", "Percussive Organ", "Rock Organ", "Church organ", "Reed organ", "Accordion", "Harmonica", "Tango Accordion", "Acoustic Guitar (nylon)", "Acoustic Guitar (steel)", "Electric Guitar (jazz)", "Electric Guitar (clean)", "Electric Guitar (muted)", "Overdriven Guitar", "Distortion Guitar", "Guitar harmonics", "Acoustic Bass", "Electric Bass (finger)", "Electric Bass (pick)", "Fretless Bass", "Slap Bass 1", "Slap Bass 2", "Synth Bass 1", "Synth Bass 2", "Violin", "Viola", "Cello", "Double bass", "Tremolo Strings", "Pizzicato Strings", "Orchestral Harp", "Timpani", "String Ensemble 1", "String Ensemble 2", "Synth Strings 1", "Synth Strings 2", "Voice Aahs", "Voice Oohs", "Synth Voice", "Orchestra Hit", "Trumpet", "Trombone", "Tuba", "Muted Trumpet", "French horn", "Brass Section", "Synth Brass 1", "Synth Brass 2", "Soprano Sax", "Alto Sax", "Tenor Sax", "Baritone Sax", "Oboe", "English Horn", "Bassoon", "Clarinet", "Piccolo", "Flute", "Recorder", "Pan Flute", "Blown Bottle", "Shakuhachi", "Whistle", "Ocarina", "Lead 1 (square)", "Lead 2 (sawtooth)", "Lead 3 (calliope)", "Lead 4 (chiff)", "Lead 5 (charang)", "Lead 6 (voice)", "Lead 7 (fifths)", "Lead 8 (bass + lead)", "Pad 1 (Fantasia)", "Pad 2 (warm)", "Pad 3 (polysynth)", "Pad 4 (choir)", "Pad 5 (bowed)", "Pad 6 (metallic)", "Pad 7 (halo)", "Pad 8 (sweep)", "FX 1 (rain)", "FX 2 (soundtrack)", "FX 3 (crystal)", "FX 4 (atmosphere)", "FX 5 (brightness)", "FX 6 (goblins)", "FX 7 (echoes)", "FX 8 (sci-fi)", "Sitar", "Banjo", "Shamisen", "Koto", "Kalimba", "Bagpipe", "Fiddle", "Shanai", "Tinkle Bell", "Agogo", "Steel Drums", "Woodblock", "Taiko Drum", "Melodic Tom", "Synth Drum", "Reverse Cymbal", "Guitar Fret Noise", "Breath Noise", "Seashore", "Bird Tweet", "Telephone Ring", "Helicopter", "Applause", "Gunshot"]; - - Synthesizer.prototype.init = function () { - /** @type {number} */ - var i; - - this.parser = new _sf2.default(this.input); - this.bankSet = this.createAllInstruments(); - - for (i = 0; i < 16; ++i) { - this.programChange(i, i); - this.volumeChange(i, 0x64); - this.panpotChange(i, 0x40); - this.pitchBend(i, 0x00, 0x40); // 8192 - this.pitchBendSensitivity(i, 2); - } - }; - - /** - * @param {Uint8Array} input - */ - Synthesizer.prototype.refreshInstruments = function (input) { - this.input = input; - this.parser = new _sf2.default(input); - this.bankSet = this.createAllInstruments(); - }; - - Synthesizer.prototype.createAllInstruments = function () { - /** @type {Parser} */ - var parser = this.parser; - parser.parse(); - /** @type {Array} TODO */ - var presets = parser.createPreset(); - /** @type {Array} TODO */ - var instruments = parser.createInstrument(); - /** @type {Object} */ - var banks = []; - /** @type {Array.>} */ - var bank; - /** @type {Object} TODO */ - var preset; - /** @type {Object} */ - var instrument; - /** @type {number} */ - var presetNumber; - /** @type {number} */ - var i; - /** @type {number} */ - var il; - /** @type {number} */ - var j; - /** @type {number} */ - var jl; - - for (i = 0, il = presets.length; i < il; ++i) { - preset = presets[i]; - presetNumber = preset.header.preset; - - if (typeof preset.instrument !== 'number') { - continue; - } - - instrument = instruments[preset.instrument]; - if (instrument.name.replace(/\0*$/, '') === 'EOI') { - continue; - } - - // select bank - if (banks[preset.header.bank] === void 0) { - banks[preset.header.bank] = []; - } - bank = banks[preset.header.bank]; - bank[presetNumber] = []; - bank[presetNumber].name = preset.name; - - for (j = 0, jl = instrument.info.length; j < jl; ++j) { - this.createNoteInfo(parser, instrument.info[j], bank[presetNumber]); - } - } - - return banks; - }; - - Synthesizer.prototype.createNoteInfo = function (parser, info, preset) { - var generator = info.generator; - /** @type {number} */ - var sampleId; - /** @type {Object} */ - var sampleHeader; - /** @type {number} */ - var volAttack; - /** @type {number} */ - var volDecay; - /** @type {number} */ - var volSustain; - /** @type {number} */ - var volRelease; - /** @type {number} */ - var modAttack; - /** @type {number} */ - var modDecay; - /** @type {number} */ - var modSustain; - /** @type {number} */ - var modRelease; - /** @type {number} */ - var tune; - /** @type {number} */ - var scale; - /** @type {number} */ - var freqVibLFO; - /** @type {number} */ - var i; - /** @type {number} */ - var il; - - if (generator['keyRange'] === void 0 || generator['sampleID'] === void 0) { - return; - } - - volAttack = this.getModGenAmount(generator, 'attackVolEnv', -12000); - volDecay = this.getModGenAmount(generator, 'decayVolEnv', -12000); - volSustain = this.getModGenAmount(generator, 'sustainVolEnv'); - volRelease = this.getModGenAmount(generator, 'releaseVolEnv', -12000); - modAttack = this.getModGenAmount(generator, 'attackModEnv', -12000); - modDecay = this.getModGenAmount(generator, 'decayModEnv', -12000); - modSustain = this.getModGenAmount(generator, 'sustainModEnv'); - modRelease = this.getModGenAmount(generator, 'releaseModEnv', -12000); - - tune = this.getModGenAmount(generator, 'coarseTune') + this.getModGenAmount(generator, 'fineTune') / 100; - scale = this.getModGenAmount(generator, 'scaleTuning', 100) / 100; - freqVibLFO = this.getModGenAmount(generator, 'freqVibLFO'); - - for (i = generator['keyRange'].lo, il = generator['keyRange'].hi; i <= il; ++i) { - if (preset[i]) { - continue; - } - - sampleId = this.getModGenAmount(generator, 'sampleID'); - sampleHeader = parser.sampleHeader[sampleId]; - preset[i] = { - 'sample': parser.sample[sampleId], - 'sampleRate': sampleHeader.sampleRate, - 'basePlaybackRate': Math.pow(Math.pow(2, 1 / 12), (i - this.getModGenAmount(generator, 'overridingRootKey', sampleHeader.originalPitch) + tune + sampleHeader.pitchCorrection / 100) * scale), - 'modEnvToPitch': this.getModGenAmount(generator, 'modEnvToPitch') / 100, - 'scaleTuning': scale, - 'start': this.getModGenAmount(generator, 'startAddrsCoarseOffset') * 32768 + this.getModGenAmount(generator, 'startAddrsOffset'), - 'end': this.getModGenAmount(generator, 'endAddrsCoarseOffset') * 32768 + this.getModGenAmount(generator, 'endAddrsOffset'), - 'loopStart': - //(sampleHeader.startLoop - sampleHeader.start) + - sampleHeader.startLoop + this.getModGenAmount(generator, 'startloopAddrsCoarseOffset') * 32768 + this.getModGenAmount(generator, 'startloopAddrsOffset'), - 'loopEnd': - //(sampleHeader.endLoop - sampleHeader.start) + - sampleHeader.endLoop + this.getModGenAmount(generator, 'endloopAddrsCoarseOffset') * 32768 + this.getModGenAmount(generator, 'endloopAddrsOffset'), - 'volAttack': Math.pow(2, volAttack / 1200), - 'volDecay': Math.pow(2, volDecay / 1200), - 'volSustain': volSustain / 1000, - 'volRelease': Math.pow(2, volRelease / 1200), - 'modAttack': Math.pow(2, modAttack / 1200), - 'modDecay': Math.pow(2, modDecay / 1200), - 'modSustain': modSustain / 1000, - 'modRelease': Math.pow(2, modRelease / 1200), - 'initialFilterFc': this.getModGenAmount(generator, 'initialFilterFc', 13500), - 'modEnvToFilterFc': this.getModGenAmount(generator, 'modEnvToFilterFc'), - 'initialFilterQ': this.getModGenAmount(generator, 'initialFilterQ'), - 'freqVibLFO': freqVibLFO ? Math.pow(2, freqVibLFO / 1200) * 8.176 : void 0 - }; - } - }; - - /** - * @param {Object} generator - * @param {string} enumeratorType - * @param {number=} opt_default - * @returns {number} - */ - Synthesizer.prototype.getModGenAmount = function (generator, enumeratorType, opt_default) { - if (opt_default === void 0) { - opt_default = 0; - } - - return generator[enumeratorType] ? generator[enumeratorType].amount : opt_default; - }; - - Synthesizer.prototype.start = function () { - this.bufSrc.connect(this.gainMaster); - this.gainMaster.connect(this.ctx.destination); - this.bufSrc.start(0); - - this.setMasterVolume(16383); - }; - - Synthesizer.prototype.setMasterVolume = function (volume) { - this.masterVolume = volume; - this.gainMaster.gain.value = this.baseVolume * (volume / 16384); - }; - - Synthesizer.prototype.stop = function () { - this.bufSrc.disconnect(0); - this.gainMaster.disconnect(0); - this.compressor.disconnect(0); - }; - - /** - * @type {!Array.} - * @const - */ - Synthesizer.TableHeader = ['Instrument', 'Vol', 'Pan', 'Bend', 'Range']; - - Synthesizer.prototype.drawSynth = function () { - /** @type {HTMLTableElement} */ - var table = this.table = - /** @type {HTMLTableElement} */document.createElement('table'); - /** @type {HTMLTableSectionElement} */ - var head = - /** @type {HTMLTableSectionElement} */document.createElement('thead'); - /** @type {HTMLTableSectionElement} */ - var body = - /** @type {HTMLTableSectionElement} */ - document.createElement('tbody'); - /** @type {HTMLTableRowElement} */ - var tableLine; - /** @type {NodeList} */ - var notes; - /** @type {number} */ - var i; - /** @type {number} */ - var j; - - head.appendChild(this.createTableLine(Synthesizer.TableHeader, true)); - - for (i = 0; i < 16; ++i) { - tableLine = this.createTableLine(Synthesizer.TableHeader.length + 128, false); - body.appendChild(tableLine); - - if (i !== 9) { - var select = document.createElement('select'); - var option; - for (j = 0; j < 128; ++j) { - option = document.createElement('option'); - option.textContent = Synthesizer.ProgramNames[j]; - select.appendChild(option); - } - tableLine.querySelector('td:nth-child(1)').appendChild(select); - select.addEventListener('change', function (synth, channel) { - return function (event) { - synth.programChange(channel, event.target.selectedIndex); - }; - }(this, i), false); - select.selectedIndex = this.channelInstrument[i]; - } else { - tableLine.querySelector('td:first-child').textContent = '[ RHYTHM TRACK ]'; - } - - notes = tableLine.querySelectorAll('td:nth-last-child(-n+128)'); - for (j = 0; j < 128; ++j) { - notes[j].addEventListener('mousedown', function (synth, channel, key) { - return function (event) { - event.preventDefault(); - synth.drag = true; - synth.noteOn(channel, key, 127); - }; - }(this, i, j)); - notes[j].addEventListener('mouseover', function (synth, channel, key) { - return function (event) { - event.preventDefault(); - if (synth.drag) { - synth.noteOn(channel, key, 127); - } - }; - }(this, i, j)); - notes[j].addEventListener('mouseout', function (synth, channel, key) { - return function (event) { - event.preventDefault(); - synth.noteOff(channel, key, 0); - }; - }(this, i, j)); - notes[j].addEventListener('mouseup', function (synth, channel, key) { - return function (event) { - event.preventDefault(); - synth.drag = false; - synth.noteOff(channel, key, 0); - }; - }(this, i, j)); - } - } - - table.appendChild(head); - table.appendChild(body); - - return table; - }; - - Synthesizer.prototype.removeSynth = function () { - var table = this.table; - - if (table) { - table.parentNode.removeChild(table); - this.table = null; - } - }; - - /** - * @param {!(Array.|number)} array - * @param {boolean} isTitleLine - * @returns {HTMLTableRowElement} - */ - Synthesizer.prototype.createTableLine = function (array, isTitleLine) { - /** @type {HTMLTableRowElement} */ - var tr = /** @type {HTMLTableRowElement} */document.createElement('tr'); - /** @type {HTMLTableCellElement} */ - var cell; - /** @type {boolean} */ - var isArray = array instanceof Array; - /** @type {number} */ - var i; - /** @type {number} */ - var il = isArray ? array.length : /** @type {number} */array; - - for (i = 0; i < il; ++i) { - cell = - /** @type {HTMLTableCellElement} */ - document.createElement(isTitleLine ? 'th' : 'td'); - cell.textContent = isArray && array[i] !== void 0 ? array[i] : ''; - tr.appendChild(cell); - } - - return tr; - }; - - /** - * @param {number} channel NoteOn するチャンネル. - * @param {number} key NoteOn するキー. - * @param {number} velocity 強さ. - */ - Synthesizer.prototype.noteOn = function (channel, key, velocity) { - /** @type {Object} */ - var bank = this.bankSet[channel === 9 ? 128 : this.bank]; - /** @type {Object} */ - var instrument = bank[this.channelInstrument[channel]]; - /** @type {Object} */ - var instrumentKey; - /** @type {SynthesizerNote} */ - var note; - - if (this.table) { - this.table.querySelector('tbody > ' + 'tr:nth-child(' + (channel + 1) + ') > ' + 'td:nth-child(' + (Synthesizer.TableHeader.length + key + 1) + ')').classList.add('note-on'); - } - - if (!instrument) { - // TODO - console.warn("instrument not found: bank=%s instrument=%s channel=%s", channel === 9 ? 128 : this.bank, this.channelInstrument[channel], channel); - return; - } - - instrumentKey = instrument[key]; - - if (!instrumentKey) { - // TODO - console.warn("instrument not found: bank=%s instrument=%s channel=%s key=%s", channel === 9 ? 128 : this.bank, this.channelInstrument[channel], channel, key); - return; - } - - var panpot = this.channelPanpot[channel] - 64; - panpot /= panpot < 0 ? 64 : 63; - - // create note information - instrumentKey['channel'] = channel; - instrumentKey['key'] = key; - instrumentKey['velocity'] = velocity; - instrumentKey['panpot'] = panpot; - instrumentKey['volume'] = this.channelVolume[channel] / 127; - instrumentKey['pitchBend'] = this.channelPitchBend[channel] - 8192; - instrumentKey['pitchBendSensitivity'] = this.channelPitchBendSensitivity[channel]; - - // note on - note = new _sound_font_synth_note2.default(this.ctx, this.gainMaster, instrumentKey); - note.noteOn(); - this.currentNoteOn[channel].push(note); - }; - - /** - * @param {number} channel NoteOff するチャンネル. - * @param {number} key NoteOff するキー. - * @param {number} velocity 強さ. - */ - Synthesizer.prototype.noteOff = function (channel, key, velocity) { - /** @type {Object} */ - var bank = this.bankSet[channel === 9 ? 128 : this.bank]; - /** @type {Object} */ - var instrument = bank[this.channelInstrument[channel]]; - /** @type {number} */ - var i; - /** @type {number} */ - var il; - /** @type {Array.} */ - var currentNoteOn = this.currentNoteOn[channel]; - /** @type {SynthesizerNote} */ - var note; - - if (this.table) { - this.table.querySelector('tbody > ' + 'tr:nth-child(' + (channel + 1) + ') > ' + 'td:nth-child(' + (key + Synthesizer.TableHeader.length + 1) + ')').classList.remove('note-on'); - } - - if (!instrument) { - return; - } - - for (i = 0, il = currentNoteOn.length; i < il; ++i) { - note = currentNoteOn[i]; - if (note.key === key) { - note.noteOff(); - currentNoteOn.splice(i, 1); - --i; - --il; - } - } - }; - - /** - * @param {number} channel 音色を変更するチャンネル. - * @param {number} instrument 音色番号. - */ - Synthesizer.prototype.programChange = function (channel, instrument) { - if (this.table) { - if (channel !== 9) { - this.table.querySelector('tbody > tr:nth-child(' + (channel + 1) + ') > td:first-child > select').selectedIndex = instrument; - } - } - // リズムトラックは無視する - if (channel === 9) { - return; - } - - this.channelInstrument[channel] = instrument; - }; - - /** - * @param {number} channel 音量を変更するチャンネル. - * @param {number} volume 音量(0-127). - */ - Synthesizer.prototype.volumeChange = function (channel, volume) { - if (this.table) { - this.table.querySelector('tbody > tr:nth-child(' + (channel + 1) + ') > td:nth-child(2)').textContent = volume; - } - - this.channelVolume[channel] = volume; - }; - - /** - * @param {number} channel panpot を変更するチャンネル. - * @param {number} panpot panpot(0-127). - */ - Synthesizer.prototype.panpotChange = function (channel, panpot) { - if (this.table) { - this.table.querySelector('tbody > tr:nth-child(' + (channel + 1) + ') > td:nth-child(3)').textContent = panpot; - } - - this.channelPanpot[channel] = panpot; - }; - - /** - * @param {number} channel panpot を変更するチャンネル. - * @param {number} lowerByte - * @param {number} higherByte - */ - Synthesizer.prototype.pitchBend = function (channel, lowerByte, higherByte) { - /** @type {number} */ - var bend = lowerByte & 0x7f | (higherByte & 0x7f) << 7; - /** @type {number} */ - var i; - /** @type {number} */ - var il; - /** @type {Array.} */ - var currentNoteOn = this.currentNoteOn[channel]; - /** @type {number} */ - var calculated = bend - 8192; - - if (this.table) { - this.table.querySelector('tbody > tr:nth-child(' + (channel + 1) + ') > td:nth-child(4)').textContent = calculated; - } - - for (i = 0, il = currentNoteOn.length; i < il; ++i) { - currentNoteOn[i].updatePitchBend(calculated); - } - - this.channelPitchBend[channel] = bend; - }; - - /** - * @param {number} channel pitch bend sensitivity を変更するチャンネル. - * @param {number} sensitivity - */ - Synthesizer.prototype.pitchBendSensitivity = function (channel, sensitivity) { - if (this.table) { - this.table.querySelector('tbody > tr:nth-child(' + (channel + 1) + ') > td:nth-child(5)').textContent = sensitivity; - } - - this.channelPitchBendSensitivity[channel] = sensitivity; - }; - - /** - * @param {number} channel 音を消すチャンネル. - */ - Synthesizer.prototype.allSoundOff = function (channel) { - /** @type {Array.} */ - var currentNoteOn = this.currentNoteOn[channel]; - - while (currentNoteOn.length > 0) { - this.noteOff(channel, currentNoteOn[0].key, 0); - } - }; - - /** - * @param {number} channel リセットするチャンネル - */ - Synthesizer.prototype.resetAllControl = function (channel) { - this.pitchBend(channel, 0x00, 0x40); // 8192 - }; - - exports.default = Synthesizer; +"use strict"; -/***/ }, +exports.__esModule = true; +function readString(data, start, end) { + var str = String.fromCharCode.apply(null, data.subarray(start, end)); + var nullLocation = str.indexOf("\u0000"); + if (nullLocation > 0) { + return str.substr(0, nullLocation); + } + return str; +} +exports.readString = readString; + + +/***/ }), /* 5 */ -/***/ function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +exports.__esModule = true; +var Stream = /** @class */ (function () { + function Stream(data, offset) { + this.data = data; + this.ip = offset; + } + Stream.prototype.readString = function (size) { + var str = String.fromCharCode.apply(null, this.data.subarray(this.ip, this.ip += size)); + var nullLocation = str.indexOf("\u0000"); + if (nullLocation > 0) { + return str.substr(0, nullLocation); + } + return str; + }; + Stream.prototype.readWORD = function () { + return this.data[this.ip++] | (this.data[this.ip++] << 8); + }; + Stream.prototype.readDWORD = function () { + return (this.data[this.ip++] | + (this.data[this.ip++] << 8) | + (this.data[this.ip++] << 16) | + (this.data[this.ip++] << 24)) >>> 0; + }; + Stream.prototype.readByte = function () { + return this.data[this.ip++]; + }; + Stream.prototype.readAt = function (offset) { + return this.data[this.ip + offset]; + }; + /* helper */ + Stream.prototype.readUInt8 = function () { + return this.readByte(); + }; + Stream.prototype.readInt8 = function () { + return (this.readByte() << 24) >> 24; + }; + Stream.prototype.readUInt16 = function () { + return this.readWORD(); + }; + Stream.prototype.readInt16 = function () { + return (this.readWORD() << 16) >> 16; + }; + Stream.prototype.readUInt32 = function () { + return this.readDWORD(); + }; + return Stream; +}()); +exports["default"] = Stream; + + +/***/ }), +/* 6 */, +/* 7 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__src_wml_ts__ = __webpack_require__(8); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__src_wml_ts___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__src_wml_ts__); + +/* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__src_wml_ts___default.a); + +/***/ }), +/* 8 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +exports.__esModule = true; +var sound_font_synth_ts_1 = __webpack_require__(9); +var synth_view_ts_1 = __webpack_require__(12); +var midi_message_handler_ts_1 = __webpack_require__(14); +/** + * @constructor + */ +var WebMidiLink = function () { + /** @type {function(ArrayBuffer)} */ + this.loadCallback; + /** @type {Function} */ + this.messageHandler = this.onmessage.bind(this); + this.midiMessageHandler = new midi_message_handler_ts_1["default"](); + window.addEventListener('DOMContentLoaded', function () { + this.ready = true; + }.bind(this), false); +}; +WebMidiLink.prototype.setup = function (url) { + if (!this.ready) { + window.addEventListener('DOMContentLoaded', function onload() { + window.removeEventListener('DOMContentLoaded', onload, false); + this.load(url); + }.bind(this), false); + } + else { + this.load(url); + } +}; +WebMidiLink.prototype.load = function (url) { + /** @type {XMLHttpRequest} */ + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, true); + xhr.responseType = 'arraybuffer'; + xhr.addEventListener('load', function (ev) { + /** @type {XMLHttpRequest} */ + var xhr = ev.target; + this.onload(xhr.response); + if (typeof this.loadCallback === 'function') { + this.loadCallback(xhr.response); + } + }.bind(this), false); + xhr.send(); +}; +/** + * @param {ArrayBuffer} response + */ +WebMidiLink.prototype.onload = function (response) { + /** @type {Uint8Array} */ + var input = new Uint8Array(response); + this.loadSoundFont(input); +}; +/** + * @param {Uint8Array} input + */ +WebMidiLink.prototype.loadSoundFont = function (input) { + /** @type {Synthesizer} */ + var synth; + if (!this.synth) { + synth = this.synth = new sound_font_synth_ts_1["default"](input); + var view = this.view = new synth_view_ts_1["default"](); + document.body.appendChild(view.draw(synth)); + this.midiMessageHandler.synth = synth; + synth.init(); + synth.start(); + window.addEventListener('message', this.messageHandler, false); + } + else { + synth = this.synth; + synth.refreshInstruments(input); + } + // link ready + if (window.opener) { + window.opener.postMessage("link,ready", '*'); + } + else if (window.parent !== window) { + window.parent.postMessage("link,ready", '*'); + } +}; +/** + * @param {Event} ev + */ +WebMidiLink.prototype.onmessage = function (ev) { + var msg = ev.data.split(','); + var type = msg.shift(); + var command; + switch (type) { + case 'midi': + this.midiMessageHandler.processMidiMessage(msg.map(function (hex) { + return parseInt(hex, 16); + })); + break; + case 'link': + command = msg.shift(); + switch (command) { + case 'reqpatch': + // TODO: dummy data + if (window.opener) { + window.opener.postMessage("link,patch", '*'); + } + else if (window.parent !== window) { + window.parent.postMessage("link,patch", '*'); + } + break; + case 'setpatch': + // TODO: NOP + break; + default: + console.error('unknown link message:', command); + break; + } + break; + default: + console.error('unknown message type'); + } +}; +/** + * @param {function(ArrayBuffer)} callback + */ +WebMidiLink.prototype.setLoadCallback = function (callback) { + this.loadCallback = callback; +}; +exports["default"] = WebMidiLink; + + +/***/ }), +/* 9 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +exports.__esModule = true; +var sound_font_synth_note_ts_1 = __webpack_require__(10); +var sf2_ts_1 = __webpack_require__(1); +var sound_font_ts_1 = __webpack_require__(11); +var BASE_VOLUME = 0.4; +var Channel = /** @class */ (function () { + function Channel() { + this.instrument = 0; + this.volume = 0; + this.pitchBend = 0; + this.pitchBendSensitivity = 0; + this.panpot = 0; + this.currentNoteOn = []; + } + return Channel; +}()); +var DummyView = /** @class */ (function () { + function DummyView() { + } + DummyView.prototype.draw = function () { }; + DummyView.prototype.remove = function () { }; + DummyView.prototype.getInstrumentElement = function () { }; + DummyView.prototype.getKeyElement = function () { }; + DummyView.prototype.noteOn = function () { }; + DummyView.prototype.noteOff = function () { }; + DummyView.prototype.programChange = function () { }; + DummyView.prototype.volumeChange = function () { }; + DummyView.prototype.panpotChange = function () { }; + DummyView.prototype.pitchBend = function () { }; + DummyView.prototype.pitchBendSensitivity = function () { }; + return DummyView; +}()); +var Synthesizer = /** @class */ (function () { + function Synthesizer(ctx) { + this.input = null; + this.bank = 0; + this.bufferSize = 1024; + this.channels = []; + this.masterVolume = 1.0; + this.view = new DummyView(); + this.ctx = ctx; + this.gainMaster = this.ctx.createGain(); + this.setMasterVolume(this.masterVolume); + this.init(); + } + Synthesizer.prototype.init = function () { + for (var i = 0; i < 16; ++i) { + this.channels.push(new Channel()); + this.programChange(i, i !== 9 ? i : 0); + this.volumeChange(i, 0x64); + this.panpotChange(i, 0x40); + this.pitchBend(i, 0x00, 0x40); // 8192 + this.pitchBendSensitivity(i, 2); + } + }; + Synthesizer.prototype.refreshInstruments = function (input) { + this.input = input; + var parser = new sf2_ts_1["default"](input); + parser.parse(); + this.soundFont = new sound_font_ts_1["default"](parser); + }; + Synthesizer.prototype.connect = function (destination) { + this.gainMaster.connect(destination); + }; + Synthesizer.prototype.setMasterVolume = function (volume) { + this.masterVolume = volume; + this.gainMaster.gain.value = BASE_VOLUME * volume / 0x8000; + }; + Synthesizer.prototype.noteOn = function (channelNumber, key, velocity) { + if (!this.soundFont) { + return; + } + var bankNumber = channelNumber === 9 ? 128 : this.bank; + var channel = this.channels[channelNumber]; + var instrumentKey = this.soundFont.getInstrumentKey(bankNumber, channel.instrument, key, velocity); + if (!instrumentKey) { + return; + } + var panpot = channel.panpot - 64; + panpot /= panpot < 0 ? 64 : 63; + // create note information + instrumentKey['channel'] = channelNumber; + instrumentKey['key'] = key; + instrumentKey['velocity'] = velocity; + instrumentKey['panpot'] = panpot; + instrumentKey['volume'] = channel.volume / 127; + instrumentKey['pitchBend'] = channel.pitchBend - 0x2000; + instrumentKey['pitchBendSensitivity'] = channel.pitchBendSensitivity; + // note on + var note = new sound_font_synth_note_ts_1["default"](this.ctx, this.gainMaster, instrumentKey); + note.noteOn(); + channel.currentNoteOn.push(note); + this.view.noteOn(channelNumber, key); + }; + Synthesizer.prototype.noteOff = function (channelNumber, key, velocity) { + if (!this.soundFont) { + return; + } + var bankNumber = channelNumber === 9 ? 128 : this.bank; + var channel = this.channels[channelNumber]; + var instrumentKey = this.soundFont.getInstrumentKey(bankNumber, channel.instrument, key); + if (!instrumentKey) { + return; + } + var currentNoteOn = channel.currentNoteOn; + for (var i = 0, il = currentNoteOn.length; i < il; ++i) { + var note = currentNoteOn[i]; + if (note.key === key) { + note.noteOff(); + currentNoteOn.splice(i, 1); + --i; + --il; + } + } + this.view.noteOff(channelNumber, key); + }; + Synthesizer.prototype.programChange = function (channelNumber, instrument) { + this.view.programChange(channelNumber, instrument); + this.channels[channelNumber].instrument = instrument; + }; + Synthesizer.prototype.volumeChange = function (channelNumber, volume) { + this.view.volumeChange(channelNumber, volume); + this.channels[channelNumber].volume = volume; + }; + Synthesizer.prototype.panpotChange = function (channelNumber, panpot) { + this.view.panpotChange(channelNumber, panpot); + this.channels[channelNumber].panpot = panpot; + }; + Synthesizer.prototype.pitchBend = function (channelNumber, lowerByte, higherByte) { + var bend = (lowerByte & 0x7f) | ((higherByte & 0x7f) << 7); + var channel = this.channels[channelNumber]; + var currentNoteOn = channel.currentNoteOn; + var calculated = bend - 0x2000; + this.view.pitchBend(channelNumber, calculated); + for (var i = 0, il = currentNoteOn.length; i < il; ++i) { + currentNoteOn[i].updatePitchBend(calculated); + } + channel.pitchBend = bend; + }; + Synthesizer.prototype.pitchBendSensitivity = function (channelNumber, sensitivity) { + this.view.pitchBendSensitivity(channelNumber, sensitivity); + this.channels[channelNumber].pitchBendSensitivity = sensitivity; + }; + Synthesizer.prototype.allSoundOff = function (channelNumber) { + var currentNoteOn = this.channels[channelNumber].currentNoteOn; + while (currentNoteOn.length > 0) { + this.noteOff(channelNumber, currentNoteOn[0].key, 0); + } + }; + Synthesizer.prototype.resetAllControl = function (channelNumber) { + this.pitchBend(channelNumber, 0x00, 0x40); // 8192 + }; + return Synthesizer; +}()); +exports["default"] = Synthesizer; + + +/***/ }), +/* 10 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +exports.__esModule = true; +var SynthesizerNote = /** @class */ (function () { + function SynthesizerNote(ctx, destination, instrument) { + this.ctx = ctx; + this.destination = destination; + this.instrument = instrument; + this.channel = instrument.channel; + this.key = instrument.key; + this.velocity = instrument.velocity; + this.buffer = instrument.sample; + this.playbackRate = instrument.playbackRate(instrument.key); + this.sampleRate = instrument.sampleRate; + this.volume = instrument.volume; + this.panpot = instrument.panpot; + this.pitchBend = instrument.pitchBend; + this.pitchBendSensitivity = instrument.pitchBendSensitivity; + this.modEnvToPitch = instrument.modEnvToPitch; + this.startTime = ctx.currentTime; + this.computedPlaybackRate = this.playbackRate; + } + SynthesizerNote.prototype.noteOn = function () { + var _this = this; + var _a = this, ctx = _a.ctx, instrument = _a.instrument, buffer = _a.buffer; + var sample = buffer.subarray(0, buffer.length + instrument.end); + this.audioBuffer = ctx.createBuffer(1, sample.length, this.sampleRate); + var channelData = this.audioBuffer.getChannelData(0); + channelData.set(sample); + // buffer source + var bufferSource = ctx.createBufferSource(); + bufferSource.buffer = this.audioBuffer; + bufferSource.loop = (this.channel !== 9); + bufferSource.loopStart = instrument.loopStart / this.sampleRate; + bufferSource.loopEnd = instrument.loopEnd / this.sampleRate; + bufferSource.onended = function () { return _this.disconnect(); }; + this.bufferSource = bufferSource; + this.updatePitchBend(this.pitchBend); + // audio node + var panner = this.panner = ctx.createPanner(); + var output = this.gainOutput = ctx.createGain(); + var outputGain = output.gain; + // filter + var filter = ctx.createBiquadFilter(); + filter.type = "lowpass"; + this.filter = filter; + // panpot + panner.panningModel = "equalpower"; + panner.setPosition(Math.sin(this.panpot * Math.PI / 2), 0, Math.cos(this.panpot * Math.PI / 2)); + //--------------------------------------------------------------------------- + // Attack, Decay, Sustain + //--------------------------------------------------------------------------- + var now = this.ctx.currentTime; + var volAttackTime = now + instrument.volAttack; + var modAttackTime = now + instrument.modAttack; + var volDecay = volAttackTime + instrument.volDecay; + var modDecay = modAttackTime + instrument.modDecay; + var startTime = instrument.start / this.sampleRate; + var attackVolume = this.volume * (this.velocity / 127); + outputGain.setValueAtTime(0, now); + outputGain.linearRampToValueAtTime(attackVolume, volAttackTime); + outputGain.linearRampToValueAtTime(attackVolume * (1 - instrument.volSustain), volDecay); + filter.Q.setValueAtTime(instrument.initialFilterQ / 10, now); + var baseFreq = amountToFreq(instrument.initialFilterFc); + var peekFreq = amountToFreq(instrument.initialFilterFc + instrument.modEnvToFilterFc); + var sustainFreq = baseFreq + (peekFreq - baseFreq) * (1 - instrument.modSustain); + filter.frequency.setValueAtTime(baseFreq, now); + filter.frequency.linearRampToValueAtTime(peekFreq, modAttackTime); + filter.frequency.linearRampToValueAtTime(sustainFreq, modDecay); + function amountToFreq(val) { + return Math.pow(2, (val - 6900) / 1200) * 440; + } + // connect + bufferSource.connect(filter); + filter.connect(panner); + panner.connect(output); + output.connect(this.destination); + // fire + bufferSource.start(0, startTime); + }; + SynthesizerNote.prototype.noteOff = function () { + var _a = this, instrument = _a.instrument, bufferSource = _a.bufferSource; + var output = this.gainOutput; + var now = this.ctx.currentTime; + var volEndTime = now + instrument.volRelease; + var modEndTime = now + instrument.modRelease; + if (!this.audioBuffer) { + return; + } + // ignore note off for rhythm track + if (this.channel === 9) { + return; + } + //--------------------------------------------------------------------------- + // Release + //--------------------------------------------------------------------------- + output.gain.cancelScheduledValues(0); + output.gain.linearRampToValueAtTime(0, volEndTime); + bufferSource.playbackRate.cancelScheduledValues(0); + bufferSource.playbackRate.linearRampToValueAtTime(this.computedPlaybackRate, modEndTime); + bufferSource.loop = false; + bufferSource.stop(volEndTime); + }; + SynthesizerNote.prototype.disconnect = function () { + this.bufferSource.disconnect(0); + this.panner.disconnect(0); + this.gainOutput.disconnect(0); + }; + SynthesizerNote.prototype.schedulePlaybackRate = function () { + var playbackRate = this.bufferSource.playbackRate; + var computed = this.computedPlaybackRate; + var start = this.startTime; + var instrument = this.instrument; + var modAttack = start + instrument.modAttack; + var modDecay = modAttack + instrument.modDecay; + var peekPitch = computed * Math.pow(Math.pow(2, 1 / 12), this.modEnvToPitch * this.instrument.scaleTuning); + playbackRate.cancelScheduledValues(0); + playbackRate.setValueAtTime(computed, start); + playbackRate.linearRampToValueAtTime(peekPitch, modAttack); + playbackRate.linearRampToValueAtTime(computed + (peekPitch - computed) * (1 - instrument.modSustain), modDecay); + }; + SynthesizerNote.prototype.updatePitchBend = function (pitchBend) { + this.computedPlaybackRate = this.playbackRate * Math.pow(Math.pow(2, 1 / 12), (this.pitchBendSensitivity * (pitchBend / (pitchBend < 0 ? 8192 : 8191))) * this.instrument.scaleTuning); + this.schedulePlaybackRate(); + }; + return SynthesizerNote; +}()); +exports["default"] = SynthesizerNote; + + +/***/ }), +/* 11 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __assign = (this && this.__assign) || Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; +}; +exports.__esModule = true; +/** + * Parser で読み込んだサウンドフォントのデータを + * Synthesizer から利用しやすい形にするクラス + */ +var SoundFont = /** @class */ (function () { + function SoundFont(parser) { + this.bankSet = createAllInstruments(parser); + } + SoundFont.prototype.getInstrumentKey = function (bankNumber, instrumentNumber, key, velocity) { + if (velocity === void 0) { velocity = 100; } + var bank = this.bankSet[bankNumber]; + if (!bank) { + console.warn("bank not found: bank=%s instrument=%s", bankNumber, instrumentNumber); + return null; + } + var instrument = bank[instrumentNumber]; + if (!instrument) { + // TODO + console.warn("instrument not found: bank=%s instrument=%s", bankNumber, instrumentNumber); + return null; + } + var instrumentKey = instrument.notes.filter(function (i) { + var isInKeyRange = false; + if (i.keyRange) { + isInKeyRange = key >= i.keyRange.lo && key <= i.keyRange.hi; + } + var isInVelRange = true; + if (i.velRange) { + isInVelRange = velocity >= i.velRange.lo && velocity <= i.velRange.hi; + } + return isInKeyRange && isInVelRange; + })[0]; + if (!instrumentKey) { + // TODO + console.warn("instrument not found: bank=%s instrument=%s key=%s", bankNumber, instrumentNumber, key); + return null; + } + return instrumentKey; + }; + return SoundFont; +}()); +exports["default"] = SoundFont; +function createInstrument(_a) { + var instrument = _a.instrument, instrumentZone = _a.instrumentZone, instrumentZoneGenerator = _a.instrumentZoneGenerator, instrumentZoneModulator = _a.instrumentZoneModulator; + var zone = instrumentZone; + var output = []; + // instrument -> instrument bag -> generator / modulator + for (var i = 0; i < instrument.length; ++i) { + var bagIndex = instrument[i].instrumentBagIndex; + var bagIndexEnd = instrument[i + 1] ? instrument[i + 1].instrumentBagIndex : zone.length; + var zoneInfo = []; + // instrument bag + for (var j = bagIndex; j < bagIndexEnd; ++j) { + var instrumentGenerator = createInstrumentGenerator(zone, j, instrumentZoneGenerator); + var instrumentModulator = createInstrumentModulator(zone, j, instrumentZoneModulator); + zoneInfo.push({ + generator: instrumentGenerator.generator, + generatorSequence: instrumentGenerator.generatorInfo, + modulator: instrumentModulator.modulator, + modulatorSequence: instrumentModulator.modulatorInfo + }); + } + output.push({ + name: instrument[i].instrumentName, + info: zoneInfo + }); + } + return output; +} +function createPreset(_a) { + var presetHeader = _a.presetHeader, presetZone = _a.presetZone, presetZoneGenerator = _a.presetZoneGenerator, presetZoneModulator = _a.presetZoneModulator; + // preset -> preset bag -> generator / modulator + return presetHeader.map(function (preset, i) { + var nextPreset = presetHeader[i + 1]; + var bagIndex = preset.presetBagIndex; + var bagIndexEnd = nextPreset ? nextPreset.presetBagIndex : presetZone.length; + var zoneInfo = []; + // preset bag + for (var j = bagIndex, jl = bagIndexEnd; j < jl; ++j) { + zoneInfo.push({ + presetGenerator: createPresetGenerator(presetZone, j, presetZoneGenerator), + presetModulator: createPresetModulator(presetZone, j, presetZoneModulator) + }); + } + return { + info: zoneInfo, + header: preset + }; + }); +} +function createAllInstruments(parser) { + var presets = createPreset(parser); + var instruments = createInstrument(parser); + var banks = []; + for (var _i = 0, presets_1 = presets; _i < presets_1.length; _i++) { + var preset = presets_1[_i]; + var bankNumber = preset.header.bank; + var presetNumber = preset.header.preset; + var notes = preset.info + .map(function (info) { return info.presetGenerator.generator; }) + .map(function (generator) { + if (generator.instrument === undefined) { + return null; + } + var instrumentNumber = generator.instrument.amount; + var instrument = instruments[instrumentNumber]; + // use the first generator in the zone as the default value + var baseGenerator; + if (instrument.info[0].generator) { + var generator_1 = instrument.info[0].generator; + if (generator_1.sampleID === undefined && generator_1.keyRange.lo === 0 && generator_1.keyRange.hi === 127) { + baseGenerator = generator_1; + } + } + return instrument.info + .map(function (info) { return createNoteInfo(parser, info.generator, baseGenerator); }) + .filter(function (x) { return x; }); // remove null + }) + .filter(function (x) { return x; }) // remove null + .reduce(function (a, b) { return a.concat(b); }, []); // flatten + // select bank + if (banks[bankNumber] === undefined) { + banks[bankNumber] = []; + } + var bank = banks[bankNumber]; + bank[presetNumber] = { + notes: notes, + name: preset.header.presetName + }; + } + return banks; +} +function createNoteInfo(parser, targetGenerator, baseGenerator) { + var generator = __assign({}, baseGenerator, targetGenerator); + var _a = generator, keyRange = _a.keyRange, sampleID = _a.sampleID, velRange = _a.velRange; + if (keyRange === undefined || sampleID === undefined) { + return null; + } + var volAttack = getModGenAmount(generator, 'attackVolEnv', -12000); + var volDecay = getModGenAmount(generator, 'decayVolEnv', -12000); + var volSustain = getModGenAmount(generator, 'sustainVolEnv'); + var volRelease = getModGenAmount(generator, 'releaseVolEnv', -12000); + var modAttack = getModGenAmount(generator, 'attackModEnv', -12000); + var modDecay = getModGenAmount(generator, 'decayModEnv', -12000); + var modSustain = getModGenAmount(generator, 'sustainModEnv'); + var modRelease = getModGenAmount(generator, 'releaseModEnv', -12000); + var tune = (getModGenAmount(generator, 'coarseTune') + + getModGenAmount(generator, 'fineTune') / 100); + var scale = getModGenAmount(generator, 'scaleTuning', 100) / 100; + var freqVibLFO = getModGenAmount(generator, 'freqVibLFO'); + var sampleId = getModGenAmount(generator, 'sampleID'); + var sampleHeader = parser.sampleHeader[sampleId]; + var basePitch = tune + (sampleHeader.pitchCorrection / 100) - getModGenAmount(generator, 'overridingRootKey', sampleHeader.originalPitch); + return { + sample: parser.sample[sampleId], + sampleRate: sampleHeader.sampleRate, + sampleName: sampleHeader.sampleName, + modEnvToPitch: getModGenAmount(generator, 'modEnvToPitch') / 100, + scaleTuning: scale, + start: getModGenAmount(generator, 'startAddrsCoarseOffset') * 32768 + + getModGenAmount(generator, 'startAddrsOffset'), + end: getModGenAmount(generator, 'endAddrsCoarseOffset') * 32768 + + getModGenAmount(generator, 'endAddrsOffset'), + loopStart: ( + //(sampleHeader.startLoop - sampleHeader.start) + + (sampleHeader.startLoop) + + getModGenAmount(generator, 'startloopAddrsCoarseOffset') * 32768 + + getModGenAmount(generator, 'startloopAddrsOffset')), + loopEnd: ( + //(sampleHeader.endLoop - sampleHeader.start) + + (sampleHeader.endLoop) + + getModGenAmount(generator, 'endloopAddrsCoarseOffset') * 32768 + + getModGenAmount(generator, 'endloopAddrsOffset')), + volAttack: Math.pow(2, volAttack / 1200), + volDecay: Math.pow(2, volDecay / 1200), + volSustain: volSustain / 1000, + volRelease: Math.pow(2, volRelease / 1200), + modAttack: Math.pow(2, modAttack / 1200), + modDecay: Math.pow(2, modDecay / 1200), + modSustain: modSustain / 1000, + modRelease: Math.pow(2, modRelease / 1200), + initialFilterFc: getModGenAmount(generator, 'initialFilterFc', 13500), + modEnvToFilterFc: getModGenAmount(generator, 'modEnvToFilterFc'), + initialFilterQ: getModGenAmount(generator, 'initialFilterQ', 1), + freqVibLFO: freqVibLFO ? Math.pow(2, freqVibLFO / 1200) * 8.176 : undefined, + playbackRate: function (key) { return Math.pow(Math.pow(2, 1 / 12), (key + basePitch) * scale); }, + keyRange: keyRange, + velRange: velRange + }; +} +function getModGenAmount(generator, enumeratorType, opt_default) { + if (opt_default === void 0) { opt_default = 0; } + return generator[enumeratorType] ? generator[enumeratorType].amount : opt_default; +} +function createBagModGen(zone, indexStart, indexEnd, zoneModGen) { + var modgenInfo = []; + var modgen = { + unknown: [], + 'keyRange': { + hi: 127, + lo: 0 + } + }; // TODO + for (var i = indexStart; i < indexEnd; ++i) { + var info = zoneModGen[i]; + modgenInfo.push(info); + if (info.type === 'unknown') { + modgen.unknown.push(info.value); + } + else { + modgen[info.type] = info.value; + } + } + return { modgen: modgen, modgenInfo: modgenInfo }; +} +function createInstrumentGenerator(zone, index, instrumentZoneGenerator) { + var modgen = createBagModGen(zone, zone[index].instrumentGeneratorIndex, zone[index + 1] ? zone[index + 1].instrumentGeneratorIndex : instrumentZoneGenerator.length, instrumentZoneGenerator); + return { + generator: modgen.modgen, + generatorInfo: modgen.modgenInfo + }; +} +function createInstrumentModulator(zone, index, instrumentZoneModulator) { + var modgen = createBagModGen(zone, zone[index].presetModulatorIndex, zone[index + 1] ? zone[index + 1].instrumentModulatorIndex : instrumentZoneModulator.length, instrumentZoneModulator); + return { + modulator: modgen.modgen, + modulatorInfo: modgen.modgenInfo + }; +} +function createPresetGenerator(zone, index, presetZoneGenerator) { + var modgen = createBagModGen(zone, zone[index].presetGeneratorIndex, zone[index + 1] ? zone[index + 1].presetGeneratorIndex : presetZoneGenerator.length, presetZoneGenerator); + return { + generator: modgen.modgen, + generatorInfo: modgen.modgenInfo + }; +} +function createPresetModulator(zone, index, presetZoneModulator) { + var modgen = createBagModGen(zone, zone[index].presetModulatorIndex, zone[index + 1] ? zone[index + 1].presetModulatorIndex : presetZoneModulator.length, presetZoneModulator); + return { + modulator: modgen.modgen, + modulatorInfo: modgen.modgenInfo + }; +} + + +/***/ }), +/* 12 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +exports.__esModule = true; +var program_names_ts_1 = __webpack_require__(13); +function render(str) { + var wrapper = document.createElement("div"); + wrapper.innerHTML = str.replace(/^\s+/, ""); + return wrapper.firstElementChild; +} +function renderKeys() { + var html = ""; + for (var i = 0; i < 128; i++) { + var n = i % 12; + var isBlack = [1, 3, 6, 8, 10].includes(n); + html += "
"; + } + return html; +} +function renderProgramOptions(programNames, bank) { + var html = ""; + var names = programNames[bank]; + for (var i in names) { + var name_1 = names[i]; + html += ""; + } + return ""; +} +function renderInstrument(program) { + return render("\n
\n
" + program + "
\n
\n
\n
\n
\n
" + renderKeys() + "
\n
\n "); +} +function programNamesFromBankSet(bankSet) { + return bankSet.map(function (bank) { return bank.map(function (s) { return s.name; }); }); +} +function mergeProgramNames(left, right) { + function mergedKeys(a, b) { + return new Set(Object.keys(a).concat(Object.keys(b))); + } + var banks = mergedKeys(left, right); + var result = {}; + banks.forEach(function (bank) { + var l = left[bank] || []; + var r = right[bank] || []; + var list = {}; + var programs = mergedKeys(l, r); + programs.forEach(function (p) { + list[p] = (l[p] || "None") + " (" + (r[p] || "None") + ")"; + }); + result[bank] = list; + }); + return result; +} +var View = /** @class */ (function () { + function View() { + this.drag = false; + } + View.prototype.draw = function (synth) { + var _this = this; + var element = this.element = render("
"); + var programNames = mergeProgramNames(programNamesFromBankSet(synth.soundFont.bankSet), program_names_ts_1["default"]); + var _loop_1 = function (i) { + var bank = i !== 9 ? 0 : 128; + var program = renderProgramOptions(programNames, bank); + var item = renderInstrument(program); + var channel = i; + var select = item.querySelector('select'); + if (select) { + select.addEventListener('change', function (event) { + var target = event.target; + synth.programChange(channel, parseInt(target.value, 10)); + }, false); + select.selectedIndex = synth.channels[i].instrument; + } + var notes = item.querySelectorAll(".key"); + var _loop_2 = function (j) { + var key = j; + notes[j].addEventListener('mousedown', function (event) { + event.preventDefault(); + _this.drag = true; + synth.noteOn(channel, key, 127); + }); + notes[j].addEventListener('mouseover', function (event) { + event.preventDefault(); + if (_this.drag) { + synth.noteOn(channel, key, 127); + } + }); + notes[j].addEventListener('mouseout', function (event) { + event.preventDefault(); + synth.noteOff(channel, key, 0); + }); + notes[j].addEventListener('mouseup', function (event) { + event.preventDefault(); + _this.drag = false; + synth.noteOff(channel, key, 0); + }); + }; + for (var j = 0; j < 128; ++j) { + _loop_2(j); + } + element.appendChild(item); + }; + for (var i = 0; i < 16; ++i) { + _loop_1(i); + } + return element; + }; + View.prototype.remove = function () { + if (!this.element) { + return; + } + this.element.parentNode.removeChild(this.element); + this.element = null; + }; + View.prototype.getInstrumentElement = function (channel) { + return this.element.querySelectorAll(".instrument")[channel]; + }; + View.prototype.getKeyElement = function (channel, key) { + return this.getInstrumentElement(channel).querySelectorAll(".key")[key]; + }; + View.prototype.noteOn = function (channel, key) { + if (!this.element) { + return; + } + this.getKeyElement(channel, key).classList.add('note-on'); + }; + View.prototype.noteOff = function (channel, key) { + if (!this.element) { + return; + } + this.getKeyElement(channel, key).classList.remove('note-on'); + }; + View.prototype.programChange = function (channel, instrument) { + if (!this.element) { + return; + } + var select = this.getInstrumentElement(channel).querySelector(".program select"); + if (select) { + select.value = instrument; + } + }; + View.prototype.volumeChange = function (channel, volume) { + if (!this.element) { + return; + } + this.getInstrumentElement(channel).querySelector(".volume").textContent = volume; + }; + View.prototype.panpotChange = function (channel, panpot) { + if (!this.element) { + return; + } + this.getInstrumentElement(channel).querySelector(".panpot").textContent = panpot; + }; + View.prototype.pitchBend = function (channel, calculatedPitch) { + if (!this.element) { + return; + } + this.getInstrumentElement(channel).querySelector(".pitchBend").textContent = calculatedPitch; + }; + View.prototype.pitchBendSensitivity = function (channel, sensitivity) { + if (!this.element) { + return; + } + this.getInstrumentElement(channel).querySelector(".pitchBendSensitivity").textContent = sensitivity; + }; + return View; +}()); +exports["default"] = View; + + +/***/ }), +/* 13 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +exports.__esModule = true; +var ProgramNames = { + 0: [ + "Acoustic Piano", + "Bright Piano", + "Electric Grand Piano", + "Honky-tonk Piano", + "Electric Piano", + "Electric Piano 2", + "Harpsichord", + "Clavi", + "Celesta", + "Glockenspiel", + "Musical box", + "Vibraphone", + "Marimba", + "Xylophone", + "Tubular Bell", + "Dulcimer", + "Drawbar Organ", + "Percussive Organ", + "Rock Organ", + "Church organ", + "Reed organ", + "Accordion", + "Harmonica", + "Tango Accordion", + "Acoustic Guitar (nylon)", + "Acoustic Guitar (steel)", + "Electric Guitar (jazz)", + "Electric Guitar (clean)", + "Electric Guitar (muted)", + "Overdriven Guitar", + "Distortion Guitar", + "Guitar harmonics", + "Acoustic Bass", + "Electric Bass (finger)", + "Electric Bass (pick)", + "Fretless Bass", + "Slap Bass 1", + "Slap Bass 2", + "Synth Bass 1", + "Synth Bass 2", + "Violin", + "Viola", + "Cello", + "Double bass", + "Tremolo Strings", + "Pizzicato Strings", + "Orchestral Harp", + "Timpani", + "String Ensemble 1", + "String Ensemble 2", + "Synth Strings 1", + "Synth Strings 2", + "Voice Aahs", + "Voice Oohs", + "Synth Voice", + "Orchestra Hit", + "Trumpet", + "Trombone", + "Tuba", + "Muted Trumpet", + "French horn", + "Brass Section", + "Synth Brass 1", + "Synth Brass 2", + "Soprano Sax", + "Alto Sax", + "Tenor Sax", + "Baritone Sax", + "Oboe", + "English Horn", + "Bassoon", + "Clarinet", + "Piccolo", + "Flute", + "Recorder", + "Pan Flute", + "Blown Bottle", + "Shakuhachi", + "Whistle", + "Ocarina", + "Lead 1 (square)", + "Lead 2 (sawtooth)", + "Lead 3 (calliope)", + "Lead 4 (chiff)", + "Lead 5 (charang)", + "Lead 6 (voice)", + "Lead 7 (fifths)", + "Lead 8 (bass + lead)", + "Pad 1 (Fantasia)", + "Pad 2 (warm)", + "Pad 3 (polysynth)", + "Pad 4 (choir)", + "Pad 5 (bowed)", + "Pad 6 (metallic)", + "Pad 7 (halo)", + "Pad 8 (sweep)", + "FX 1 (rain)", + "FX 2 (soundtrack)", + "FX 3 (crystal)", + "FX 4 (atmosphere)", + "FX 5 (brightness)", + "FX 6 (goblins)", + "FX 7 (echoes)", + "FX 8 (sci-fi)", + "Sitar", + "Banjo", + "Shamisen", + "Koto", + "Kalimba", + "Bagpipe", + "Fiddle", + "Shanai", + "Tinkle Bell", + "Agogo", + "Steel Drums", + "Woodblock", + "Taiko Drum", + "Melodic Tom", + "Synth Drum", + "Reverse Cymbal", + "Guitar Fret Noise", + "Breath Noise", + "Seashore", + "Bird Tweet", + "Telephone Ring", + "Helicopter", + "Applause", + "Gunshot" + ], 128: ["Rhythm Track"] +}; +exports["default"] = ProgramNames; + + +/***/ }), +/* 14 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +exports.__esModule = true; +var MidiMessageHandler = /** @class */ (function () { + function MidiMessageHandler() { + this.RpnMsb = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + this.RpnLsb = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + } + MidiMessageHandler.prototype.processMidiMessage = function (message) { + var channel = message[0] & 0x0f; + var synth = this.synth; + if (!synth) { + return; + } + switch (message[0] & 0xf0) { + case 0x80:// NoteOff: 8n kk vv + synth.noteOff(channel, message[1], message[2]); + break; + case 0x90:// NoteOn: 9n kk vv + if (message[2] > 0) { + synth.noteOn(channel, message[1], message[2]); + } + else { + synth.noteOff(channel, message[1], 0); + } + break; + case 0xB0:// Control Change: Bn cc dd + switch (message[1]) { + case 0x06:// Data Entry: Bn 06 dd + switch (this.RpnMsb[channel]) { + case 0: + switch (this.RpnLsb[channel]) { + case 0:// Pitch Bend Sensitivity + synth.pitchBendSensitivity(channel, message[2]); + break; + default: + break; + } + break; + default: + break; + } + break; + case 0x07:// Volume Change: Bn 07 dd + synth.volumeChange(channel, message[2]); + break; + case 0x0A:// Panpot Change: Bn 0A dd + synth.panpotChange(channel, message[2]); + break; + case 0x78:// All Sound Off: Bn 78 00 + synth.allSoundOff(channel); + break; + case 0x79:// Reset All Control: Bn 79 00 + synth.resetAllControl(channel); + break; + case 0x20:// BankSelect + //console.log("bankselect:", channel, message[2]) + break; + case 0x64:// RPN MSB + this.RpnMsb[channel] = message[2]; + break; + case 0x65:// RPN LSB + this.RpnLsb[channel] = message[2]; + break; + default: + } + break; + case 0xC0:// Program Change: Cn pp + synth.programChange(channel, message[1]); + break; + case 0xE0:// Pitch Bend + synth.pitchBend(channel, message[1], message[2]); + break; + case 0xf0:// System Exclusive Message + // ID number + switch (message[1]) { + case 0x7e:// non-realtime + // TODO + break; + case 0x7f:// realtime + // const device = message[2] + // sub ID 1 + switch (message[3]) { + case 0x04:// device control + // sub ID 2 + switch (message[4]) { + case 0x01: { + var volume = message[5] + (message[6] << 7); + var MAX_VOLUME = 0x4000 - 1; + synth.setMasterVolume(volume / MAX_VOLUME); + break; + } + default: + break; + } + break; + default: + break; + } + break; + default: + break; + } + break; + default:// not supported + break; + } + }; + return MidiMessageHandler; +}()); +exports["default"] = MidiMessageHandler; - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - /** - * @param {AudioContext} ctx - * @param {AudioNode} destination - * @param {{ - * channel: number, - * key: number, - * sample: Uint8Array, - * basePlaybackRate: number, - * loopStart: number, - * loopEnd: number, - * volume: number, - * panpot: number - * }} instrument - * @constructor - */ - var SynthesizerNote = function SynthesizerNote(ctx, destination, instrument) { - /** @type {AudioContext} */ - this.ctx = ctx; - /** @type {AudioNode} */ - this.destination = destination; - /** @type {{ - * channel: number, - * key: number, - * sample: Uint8Array, - * basePlaybackRate: number, - * loopStart: number, - * loopEnd: number, - * volume: number, - * panpot: number - * }} - */ - this.instrument = instrument; - /** @type {number} */ - this.channel = instrument['channel']; - /** @type {number} */ - this.key = instrument['key']; - /** @type {number} */ - this.velocity = instrument['velocity']; - /** @type {Int16Array} */ - this.buffer = instrument['sample']; - /** @type {number} */ - this.playbackRate = instrument['basePlaybackRate']; - /** @type {number} */ - this.sampleRate = instrument['sampleRate']; - /** @type {number} */ - this.volume = instrument['volume']; - /** @type {number} */ - this.panpot = instrument['panpot']; - /** @type {number} */ - this.pitchBend = instrument['pitchBend']; - /** @type {number} */ - this.pitchBendSensitivity = instrument['pitchBendSensitivity']; - /** @type {number} */ - this.modEnvToPitch = instrument['modEnvToPitch']; - - // state - /** @type {number} */ - this.startTime = ctx.currentTime; - /** @type {number} */ - this.computedPlaybackRate = this.playbackRate; - - //--------------------------------------------------------------------------- - // audio node - //--------------------------------------------------------------------------- - - /** @type {AudioBuffer} */ - this.audioBuffer; - /** @type {AudioBufferSourceNode} */ - this.bufferSource; - /** @type {AudioPannerNode} */ - this.panner; - /** @type {AudioGainNode} */ - this.gainOutput; - - //console.log(instrument['modAttack'], instrument['modDecay'], instrument['modSustain'], instrument['modRelease']); - }; - - SynthesizerNote.prototype.noteOn = function () { - /** @type {AudioContext} */ - var ctx = this.ctx; - /** @type {{ - * channel: number, - * key: number, - * sample: Uint8Array, - * basePlaybackRate: number, - * loopStart: number, - * loopEnd: number, - * volume: number, - * panpot: number - * }} */ - var instrument = this.instrument; - /** @type {Int16Array} */ - var sample = this.buffer; - /** @type {AudioBuffer} */ - var buffer; - /** @type {Float32Array} */ - var channelData; - /** @type {AudioBufferSourceNode} */ - var bufferSource; - /** @type {BiquadFilterNode} */ - var filter; - /** @type {AudioPannerNode} */ - var panner; - /** @type {AudioGainNode} */ - var output; - /** @type {AudioGain} */ - var outputGain; - /** @type {number} */ - var now = this.ctx.currentTime; - /** @type {number} */ - var volAttack = now + instrument['volAttack']; - /** @type {number} */ - var modAttack = now + instrument['modAttack']; - /** @type {number} */ - var volDecay = volAttack + instrument['volDecay']; - /** @type {number} */ - var modDecay = modAttack + instrument['modDecay']; - /** @type {number} */ - var loopStart = instrument['loopStart'] / this.sampleRate; - /** @type {number} */ - var loopEnd = instrument['loopEnd'] / this.sampleRate; - /** @type {number} */ - var startTime = instrument['start'] / this.sampleRate; - /** @type {number} */ - var baseFreq; - /** @type {number} */ - var peekFreq; - /** @type {number} */ - var sustainFreq; - - sample = sample.subarray(0, sample.length + instrument['end']); - buffer = this.audioBuffer = ctx.createBuffer(1, sample.length, this.sampleRate); - channelData = buffer.getChannelData(0); - channelData.set(sample); - - // buffer source - bufferSource = this.bufferSource = ctx.createBufferSource(); - bufferSource.buffer = buffer; - bufferSource.loop = this.channel !== 9; - bufferSource.loopStart = loopStart; - bufferSource.loopEnd = loopEnd; - this.updatePitchBend(this.pitchBend); - - // audio node - panner = this.panner = ctx.createPanner(); - output = this.gainOutput = ctx.createGainNode(); - outputGain = output.gain; - - // filter - filter = this.filter = ctx.createBiquadFilter(); - filter.type = filter.LOWPASS; - - // panpot - panner.panningModel = 0; - panner.setPosition(Math.sin(this.panpot * Math.PI / 2), 0, Math.cos(this.panpot * Math.PI / 2)); - - //--------------------------------------------------------------------------- - // Attack, Decay, Sustain - //--------------------------------------------------------------------------- - outputGain.setValueAtTime(0, now); - outputGain.linearRampToValueAtTime(this.volume * (this.velocity / 127), volAttack); - outputGain.linearRampToValueAtTime(this.volume * (1 - instrument['volSustain']), volDecay); - - filter.Q.setValueAtTime(instrument['initialFilterQ'] * Math.pow(10, 200), now); - baseFreq = amountToFreq(instrument['initialFilterFc']); - peekFreq = amountToFreq(instrument['initialFilterFc'] + instrument['modEnvToFilterFc']); - sustainFreq = baseFreq + (peekFreq - baseFreq) * (1 - instrument['modSustain']); - filter.frequency.setValueAtTime(baseFreq, now); - filter.frequency.linearRampToValueAtTime(peekFreq, modAttack); - filter.frequency.linearRampToValueAtTime(sustainFreq, modDecay); - - /** - * @param {number} val - * @returns {number} - */ - function amountToFreq(val) { - return Math.pow(2, (val - 6900) / 1200) * 440; - } - - // connect - bufferSource.connect(filter); - filter.connect(panner); - panner.connect(output); - output.connect(this.destination); - - // fire - bufferSource.start(0, startTime); - }; - - SynthesizerNote.prototype.noteOff = function () { - /** @type {{ - * channel: number, - * key: number, - * sample: Uint8Array, - * basePlaybackRate: number, - * loopStart: number, - * loopEnd: number, - * volume: number, - * panpot: number - * }} */ - var instrument = this.instrument; - /** @type {AudioBufferSourceNode} */ - var bufferSource = this.bufferSource; - /** @type {AudioGainNode} */ - var output = this.gainOutput; - /** @type {number} */ - var now = this.ctx.currentTime; - /** @type {number} */ - var volEndTime = now + instrument['volRelease']; - /** @type {number} */ - var modEndTime = now + instrument['modRelease']; - - if (!this.audioBuffer) { - return; - } - - //--------------------------------------------------------------------------- - // Release - //--------------------------------------------------------------------------- - output.gain.cancelScheduledValues(0); - output.gain.linearRampToValueAtTime(0, volEndTime); - bufferSource.playbackRate.cancelScheduledValues(0); - bufferSource.playbackRate.linearRampToValueAtTime(this.computedPlaybackRate, modEndTime); - - bufferSource.loop = false; - bufferSource.stop(volEndTime); - - // disconnect - //* - setTimeout(function (note) { - return function () { - note.bufferSource.disconnect(0); - note.panner.disconnect(0); - note.gainOutput.disconnect(0); - }; - }(this), instrument['volRelease'] * 1000); - //*/ - }; - - SynthesizerNote.prototype.schedulePlaybackRate = function () { - var playbackRate = this.bufferSource.playbackRate; - /** @type {number} */ - var computed = this.computedPlaybackRate; - /** @type {number} */ - var start = this.startTime; - /** @type {Object} */ - var instrument = this.instrument; - /** @type {number} */ - var modAttack = start + instrument['modAttack']; - /** @type {number} */ - var modDecay = modAttack + instrument['modDecay']; - /** @type {number} */ - var peekPitch = computed * Math.pow(Math.pow(2, 1 / 12), this.modEnvToPitch * this.instrument['scaleTuning']); - - playbackRate.cancelScheduledValues(0); - playbackRate.setValueAtTime(computed, start); - playbackRate.linearRampToValueAtTime(peekPitch, modAttack); - playbackRate.linearRampToValueAtTime(computed + (peekPitch - computed) * (1 - instrument['modSustain']), modDecay); - }; - - /** - * @param {number} pitchBend - */ - SynthesizerNote.prototype.updatePitchBend = function (pitchBend) { - this.computedPlaybackRate = this.playbackRate * Math.pow(Math.pow(2, 1 / 12), this.pitchBendSensitivity * (pitchBend / (pitchBend < 0 ? 8192 : 8191)) * this.instrument['scaleTuning']); - this.schedulePlaybackRate(); - }; - - exports.default = SynthesizerNote; -/***/ } +/***/ }) /******/ ]); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay9ib290c3RyYXAgM2E3YTZiZGVkYmY2M2VlNWI1ZWQ/YTM4ZiIsIndlYnBhY2s6Ly8vLi9leHBvcnQvc3ludGguanMiLCJ3ZWJwYWNrOi8vLy4vc3JjL3NmMi5qcz80M2ZhIiwid2VicGFjazovLy8uL3NyYy9yaWZmLmpzPzQyZDIiLCJ3ZWJwYWNrOi8vLy4vc3JjL3dtbC5qcyIsIndlYnBhY2s6Ly8vLi9zcmMvc291bmRfZm9udF9zeW50aC5qcyIsIndlYnBhY2s6Ly8vLi9zcmMvc291bmRfZm9udF9zeW50aF9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gIGNhc2UgJ2tleW51bSc6IC8qIEZBTExUSFJPVUdIICovXHJcbiAgICAgICAgY2FzZSAndmVsb2NpdHknOlxyXG4gICAgICAgICAgb3V0cHV0LnB1c2goe1xyXG4gICAgICAgICAgICB0eXBlOiBrZXksXHJcbiAgICAgICAgICAgIHZhbHVlOiB7XHJcbiAgICAgICAgICAgICAgbG86IGRhdGFbaXArK10sXHJcbiAgICAgICAgICAgICAgaGk6IGRhdGFbaXArK11cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgfSk7XHJcbiAgICAgICAgICBicmVhaztcclxuICAgICAgICBkZWZhdWx0OlxyXG4gICAgICAgICAgb3V0cHV0LnB1c2goe1xyXG4gICAgICAgICAgICB0eXBlOiBrZXksXHJcbiAgICAgICAgICAgIHZhbHVlOiB7XHJcbiAgICAgICAgICAgICAgYW1vdW50OiBkYXRhW2lwKytdIHwgKGRhdGFbaXArK10gPDwgOCkgPDwgMTYgPj4gMTZcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgfSk7XHJcbiAgICAgICAgICBicmVhaztcclxuICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIC8vIEFtdFNyY09wZXJcclxuICAgIC8vIFRPRE9cclxuICAgIGlwICs9IDI7XHJcblxyXG4gICAgLy8gVHJhbnMgT3BlclxyXG4gICAgLy8gVE9ET1xyXG4gICAgaXAgKz0gMjtcclxuICB9XHJcblxyXG4gIHJldHVybiBvdXRwdXQ7XHJcbn07XHJcblxyXG4vKipcclxuICogQHBhcmFtIHtSaWZmLkNodW5rfSBjaHVua1xyXG4gKiBAcmV0dXJuIHtBcnJheS48T2JqZWN0Pn1cclxuICovXHJcblBhcnNlci5wcm90b3R5cGUucGFyc2VHZW5lcmF0b3IgPSBmdW5jdGlvbihjaHVuaykge1xyXG4gIC8qKiBAdHlwZSB7Qnl0ZUFycmF5fSAqL1xyXG4gIHZhciBkYXRhID0gdGhpcy5pbnB1dDtcclxuICAvKiogQHR5cGUge251bWJlcn0gK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cmVhZHlcclxuICBpZiAod2luZG93Lm9wZW5lcikge1xyXG4gICAgd2luZG93Lm9wZW5lci5wb3N0TWVzc2FnZShcImxpbmsscmVhZHlcIiwgJyonKTtcclxuICB9IGVsc2UgaWYgKHdpbmRvdy5wYXJlbnQgIT09IHdpbmRvdykge1xyXG4gICAgd2luZG93LnBhcmVudC5wb3N0TWVzc2FnZShcImxpbmsscmVhZHlcIiwgJyonKTtcclxuICB9XHJcbn07XHJcblxyXG4vKipcclxuICogQHBhcmFtIHtFdmVudH0gZXZcclxuICovXHJcbldlYk1pZGlMaW5rLnByb3RvdHlwZS5vbm1lc3NhZ2UgPSBmdW5jdGlvbihldikge1xyXG4gIHZhciBtc2cgPSBldi5kYXRhLnNwbGl0KCcsJyk7XHJcbiAgdmFyIHR5cGUgPSBtc2cuc2hpZnQoKTtcclxuICB2YXIgY29tbWFuZDtcclxuXHJcbiAgc3dpdGNoICh0eXBlKSB7XHJcbiAgICBjYXNlICdtaWRpJzpcclxuICAgICAgdGhpcy5wcm9jZXNzTWlkaU1lc3NhZ2UoXHJcbiAgICAgICAgbXNnLm1hcChmdW5jdGlvbihoZXgpIHtcclxuICAgICAgICAgIHJldHVybiBwYXJzZUludChoZXgsIDE2KTtcclxuICAgICAgICB9KVxyXG4gICAgICApO1xyXG4gICAgICBicmVhaztcclxuICAgIGNhc2UgJ2xpbmsnOlxyXG4gICAgICBjb21tYW5kID0gbXNnLnNoaWZ0KCk7XHJcbiAgICAgIHN3aXRjaCAoY29tbWFuZCkge1xyXG4gICAgICAgIGNhc2UgJ3JlcXBhdGNoJzpcclxuICAgICAgICAgIC8vIFRPRE86IGR1bW15IGRhdGFcclxuICAgICAgICAgIGlmICh3aW5kb3cub3BlbmVyKSB7XHJcbiAgICAgICAgICAgIHdpbmRvdy5vcGVuZXIucG9zdE1lc3NhZ2UoXCJsaW5rLHBhdGNoXCIsICcqJyk7XHJcbiAgICAgICAgICB9IGVsc2UgaWYgKHdpbmRvdy5wYXJlbnQgI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2l6ZXJOb3RlPn0gKi9cclxuICB2YXIgY3VycmVudE5vdGVPbiA9IHRoaXMuY3VycmVudE5vdGVPbltjaGFubmVsXTtcclxuICAvKiogQHR5cGUge1N5bnRoZXNpemVyTm90ZX0gKi9cclxuICB2YXIgbm90ZTtcclxuXHJcbiAgaWYgKHRoaXMudGFibGUpIHtcclxuICAgIHRoaXMudGFibGUucXVlcnlTZWxlY3RvcihcclxuICAgICAgJ3Rib2R5ID4gJyArXHJcbiAgICAgICd0cjpudGgtY2hpbGQoJyArIChjaGFubmVsKzEpICsgJykgPiAnICtcclxuICAgICAgJ3RkOm50aC1jaGlsZCgnICsgKGtleStTeW50aGVzaXplci5UYWJsZUhlYWRlci5sZW5ndGgrMSkgKyAnKSdcclxuICAgICkuY2xhc3NMaXN0LnJlbW92ZSgnbm90ZS1vbicpO1xyXG4gIH1cclxuXHJcbiAgaWYgKCFpbnN0cnVtZW50KSB7XHJcbiAgICByZXR1cm47XHJcbiAgfVxyXG5cclxuICBmb3IgKGkgPSAwLCBpbCA9IGN1cnJlbnROb3RlT24ubGVuZ3RoOyBpIDwgaWw7ICsraSkge1xyXG4gICAgbm90ZSA9IGN1cnJlbnROb3RlT25baV07XHJcbiAgICBpZiAobm90ZS5rZXkgPT09IGtleSkge1xyXG4gICAgICBub3RlLm5vdGVPZmYoKTtcclxuICAgICAgY3VycmVudE5vdGVPbi5zcGxpY2UoaSwgMSk7XHJcbiAgICAgIC0taTtcclxuICAgICAgLS1pbDtcclxuICAgIH1cclxuICB9XHJcbn07XHJcblxyXG4vKipcclxuICogQHBhcmFtIHtudW1iZXJ9IGNoYW5uZWwg6Z+z6Imy44KS5aSJ5pu044GZ44KL44OB44Oj44Oz44ON44OrLlxyXG4gKiBAcGFyYW0ge251bWJlcn0gaW5zdHJ1bWVudCDpn7PoibLnlarlj7cuXHJcbiAqL1xyXG5TeW50aGVzaXplci5wcm90b3R5cGUucHJvZ3JhbUNoYW5nZSA9IGZ1bmN0aW9uKGNoYW5u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GFubmVsOiBudW1iZXIsXHJcbiAqICAga2V5OiBudW1iZXIsXHJcbiAqICAgc2FtcGxlOiBVaW50OEFycmF5LFxyXG4gKiAgIGJhc2VQbGF5YmFja1JhdGU6IG51bWJlcixcclxuICogICBsb29wU3RhcnQ6IG51bWJlcixcclxuICogICBsb29wRW5kOiBudW1iZXIsXHJcbiAqICAgdm9sdW1lOiBudW1iZXIsXHJcbiAqICAgcGFucG90OiBudW1iZXJcclxuICogfX0gaW5zdHJ1bWVudFxyXG4gKiBAY29uc3RydWN0b3JcclxuICovXHJcbmNvbnN0IFN5bnRoZXNpemVyTm90ZSA9IGZ1bmN0aW9uKGN0eCwgZGVzdGluYXRpb24sIGluc3RydW1lbnQpIHtcclxuICAvKiogQHR5cGUge0F1ZGlvQ29udGV4dH0gKi9cclxuICB0aGlzLmN0eCA9IGN0eDtcclxuICAvKiogQHR5cGUge0F1ZGlvTm9kZX0gKi9cclxuICB0aGlzLmRlc3RpbmF0aW9uID0gZGVzdGluYXRpb247XHJcbiAgLyoqIEB0eXBlIHt7XHJcbiAgICogICBjaGFubmVsOiBudW1iZXIsXHJcbiAgICogICBrZXk6IG51bWJlcixcclxuICAgKiAgIHNhbXBsZTogVWludDhBcnJheSxcclxuICAgKiAgIGJhc2VQbGF5YmFja1JhdGU6IG51bWJlcixcclxuICAgKiAgIGxvb3BTdGFydDogbnVtYmVyLFxyXG4gICAqICAgbG9vcEVuZDogbnVtYmVyLFxyXG4gICAqICAgdm9sdW1lOiBudW1iZXIsXHJcbiAgICogICBwYW5wb3Q6IG51bWJlclxyXG4gICAqIH19XHJcbiAgICovXHJcbiAgdGhpcy5pbnN0cnVtZW50ID0gaW5zdHJ1bWVudDtcclxuICAvKiogQHR5cGUge251bWJlcn0gKi9cclxuICB0aGlzLmNoYW5uZWwgPSBpbnN0cnVtZW50WydjaGFubmVsJ107XHJcbiAgLyoqIEB0eXBlIHtudW1iZXJ9ICovXHJcbiAgdGhpcy5rZXkgPSBpbnN0cnVtZW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hcChmdW5jdGlvbihoZXgpIHtcclxuICAgICAgICAgIHJldHVybiBwYXJzZUludChoZXgsIDE2KTtcclxuICAgICAgICB9KVxyXG4gICAgICApO1xyXG4gICAgICBicmVhaztcclxuICAgIGNhc2UgJ2xpbmsnOlxyXG4gICAgICBjb21tYW5kID0gbXNnLnNoaWZ0KCk7XHJcbiAgICAgIHN3aXRjaCAoY29tbWFuZCkge1xyXG4gICAgICAgIGNhc2UgJ3JlcXBhdGNoJzpcclxuICAgICAgICAgIC8vIFRPRE86IGR1bW15IGRhdGFcclxuICAgICAgICAgIGlmICh3aW5kb3cub3BlbmVyKSB7XHJcbiAgICAgICAgICAgIHdpbmRvdy5vcGVuZXIucG9zdE1lc3NhZ2UoXCJsaW5rLHBhdGNoXCIsICcqJyk7XHJcbiAgICAgICAgICB9IGVsc2UgaWYgKHdpbmRvdy5wYXJlbnQgIT09IHdpbmRvdykge1xyXG4gICAgICAgICAgICB3aW5kb3cucGFyZW50LnBvc3RNZXNzYWdlKFwibGluayxwYXRjaFwiLCAnKicpO1xyXG4gICAgICAgICAgfVxyXG4gICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgY2FzZSAnc2V0cGF0Y2gnOlxyXG4gICAgICAgICAgLy8gVE9ETzogTk9QXHJcbiAgICAgICAgICBicmVhaztcclxuICAgICAgICBkZWZhdWx0OlxyXG4gICAgICAgICAgY29uc29sZS5lcnJvcigndW5rbm93biBsaW5rIG1lc3NhZ2U6JywgY29tbWFuZCk7XHJcbiAgICAgICAgICBicmVhaztcclxuICAgICAgfVxyXG4gICAgICBicmVhaztcclxuICAgIGRlZmF1bHQ6XHJcbiAgICAgIGNvbnNvbGUuZXJyb3IoJ3Vua25vd24gbWVzc2FnZSB0eXBlJyk7XHJcbiAgfVxyXG59O1xyXG5cclxuLyoqXHJcbiAqIEBwYXJhbSB7ZnVuY3Rpb24oQXJyYXlCdWZmZXIpfSBjYWxsYmFja1xyXG4gKi9cclxuV2ViTWlkaUxpbmsucHJvdG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ovjgq/jg6njgrlcclxuICovXHJcbmV4cG9ydCBkZWZhdWx0IGNsYXNzIFNvdW5kRm9udCB7XHJcbiAgYmFua1NldDogT2JqZWN0W11cclxuXHJcbiAgY29uc3RydWN0b3IocGFyc2VyKSB7XHJcbiAgICB0aGlzLmJhbmtTZXQgPSBjcmVhdGVBbGxJbnN0cnVtZW50cyhwYXJzZXIpXHJcbiAgfVxyXG5cclxuICBnZXRJbnN0cnVtZW50S2V5KGJhbmtOdW1iZXIsIGluc3RydW1lbnROdW1iZXIsIGtleSwgdmVsb2NpdHkgPSAxMDApIHtcclxuICAgIGNvbnN0IGJhbmsgPSB0aGlzLmJhbmtTZXRbYmFua051bWJlcl1cclxuICAgIGlmICghYmFuaykge1xyXG4gICAgICBjb25zb2xlLndhcm4oXHJcbiAgICAgICAgXCJiYW5rIG5vdCBmb3VuZDogYmFuaz0lcyBpbnN0cnVtZW50PSVzXCIsXHJcbiAgICAgICAgYmFua051bWJlcixcclxuICAgICAgICBpbnN0cnVtZW50TnVtYmVyXHJcbiAgICAgIClcclxuICAgICAgcmV0dXJuIG51bGxcclxuICAgIH1cclxuXHJcbiAgICBjb25zdCBpbnN0cnVtZW50ID0gYmFua1tpbnN0cnVtZW50TnVtYmVyXVxyXG4gICAgaWYgKCFpbnN0cnVtZW50KSB7XHJcbiAgICAgIC8vIFRPRE9cclxuICAgICAgY29uc29sZS53YXJuKFxyXG4gICAgICAgIFwiaW5zdHJ1bWVudCBub3QgZm91bmQ6IGJhbms9JXMgaW5zdHJ1bWVudD0lc1wiLFxyXG4gICAgICAgIGJhbmtOdW1iZXIsXHJcbiAgICAgICAgaW5zdHJ1bWVudE51bWJlclxyXG4gICAgICApXHJcbiAgICAgIHJldHVybiBudWxsXHJcbiAgICB9XHJcblxyXG4gICAgY29uc3QgaW5zdHJ1bWVudEtleSA9IGluc3RydW1lbnQubm90ZXMuZmlsdGVyKGkgPT4ge1xyXG4gICAgICBsZXQgaXNJbktleVJhbmdlID0gZmFsc2Vc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cicsIGV2ZW50ID0+IHtcclxuICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XHJcbiAgICAgICAgICBpZiAodGhpcy5kcmFnKSB7XHJcbiAgICAgICAgICAgIHN5bnRoLm5vdGVPbihjaGFubmVsLCBrZXksIDEyNyk7XHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcbiAgICAgICAgbm90ZXNbal0uYWRkRXZlbnRMaXN0ZW5lcignbW91c2VvdXQnLCBldmVudCA9PiB7XHJcbiAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xyXG4gICAgICAgICAgc3ludGgubm90ZU9mZihjaGFubmVsLCBrZXksIDApO1xyXG4gICAgICAgIH0pO1xyXG4gICAgICAgIG5vdGVzW2pdLmFkZEV2ZW50TGlzdGVuZXIoJ21vdXNldXAnLCBldmVudCA9PiB7XHJcbiAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xyXG4gICAgICAgICAgdGhpcy5kcmFnID0gZmFsc2U7XHJcbiAgICAgICAgICBzeW50aC5ub3RlT2ZmKGNoYW5uZWwsIGtleSwgMCk7XHJcbiAgICAgICAgfSk7XHJcbiAgICAgIH1cclxuXHJcbiAgICAgIGVsZW1lbnQuYXBwZW5kQ2hpbGQoaXRlbSlcclxuICAgIH1cclxuXHJcbiAgICByZXR1cm4gZWxlbWVudDtcclxuICB9XHJcblxyXG4gIHJlbW92ZSgpIHtcclxuICAgIGlmICghdGhpcy5lbGVtZW50KSB7XHJcbiAgICAgIHJldHVybjtcclxuICAgIH1cclxuXHJcbiAgICB0aGlzLmVsZW1lbnQucGFyZW50Tm9kZS5yZW1vdmVDaGlsZCh0aGlzLmVsZW1lbnQpO1xyXG4gICAgdGhpcy5lbGVtZW50ID0gbnVsbDtcclxuICB9XHJcblxyXG4gIGdldEluc3RydW1lbnRFbGVtZW50KGNoYW5uZWwpIHtcclxuICAgIHJldHVybiB0aGlzLmVsZW1lbnQucXVlcnlTZWx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G4gICAgICAgICAgc3ludGgubm90ZU9uKGNoYW5uZWwsIG1lc3NhZ2VbMV0sIG1lc3NhZ2VbMl0pXHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgIHN5bnRoLm5vdGVPZmYoY2hhbm5lbCwgbWVzc2FnZVsxXSwgMClcclxuICAgICAgICB9XHJcbiAgICAgICAgYnJlYWtcclxuICAgICAgY2FzZSAweEIwOiAvLyBDb250cm9sIENoYW5nZTogQm4gY2MgZGRcclxuICAgICAgICBzd2l0Y2ggKG1lc3NhZ2VbMV0pIHtcclxuICAgICAgICAgIGNhc2UgMHgwNjogLy8gRGF0YSBFbnRyeTogQm4gMDYgZGRcclxuICAgICAgICAgICAgc3dpdGNoICh0aGlzLlJwbk1zYltjaGFubmVsXSkge1xyXG4gICAgICAgICAgICAgIGNhc2UgMDpcclxuICAgICAgICAgICAgICAgIHN3aXRjaCAodGhpcy5ScG5Mc2JbY2hhbm5lbF0pIHtcclxuICAgICAgICAgICAgICAgICAgY2FzZSAwOiAvLyBQaXRjaCBCZW5kIFNlbnNpdGl2aXR5XHJcbiAgICAgICAgICAgICAgICAgICAgc3ludGgucGl0Y2hCZW5kU2Vuc2l0aXZpdHkoY2hhbm5lbCwgbWVzc2FnZVsyXSlcclxuICAgICAgICAgICAgICAgICAgICBicmVha1xyXG4gICAgICAgICAgICAgICAgICBkZWZhdWx0OiBcclxuICAgICAgICAgICAgICAgICAgICBicmVha1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgYnJlYWtcclxuICAgICAgICAgICAgICBkZWZhdWx0OiBcclxuICAgICAgICAgICAgICAgIGJyZWFrXHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgYnJlYWtcclxuICAgICAgICAgIGNhc2UgMHgwNzogLy8gVm9sdW1lIENoYW5nZTogQm4gMDcgZGRcclxuICAgICAgICAgICAgc3ludGgudm9sdW1lQ2hhbmdlKGNoYW5uZWwsIG1lc3NhZ2VbMl0pX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BwcFxyXG4gICAgICAgIHN5bnRoLnByb2dyYW1DaGFuZ2UoY2hhbm5lbCwgbWVzc2FnZVsxXSlcclxuICAgICAgICBicmVha1xyXG4gICAgICBjYXNlIDB4RTA6IC8vIFBpdGNoIEJlbmRcclxuICAgICAgICBzeW50aC5waXRjaEJlbmQoY2hhbm5lbCwgbWVzc2FnZVsxXSwgbWVzc2FnZVsyXSlcclxuICAgICAgICBicmVha1xyXG4gICAgICBjYXNlIDB4ZjA6IC8vIFN5c3RlbSBFeGNsdXNpdmUgTWVzc2FnZVxyXG4gICAgICAgIC8vIElEIG51bWJlclxyXG4gICAgICAgIHN3aXRjaCAobWVzc2FnZVsxXSkge1xyXG4gICAgICAgICAgY2FzZSAweDdlOiAvLyBub24tcmVhbHRpbWVcclxuICAgICAgICAgICAgLy8gVE9ET1xyXG4gICAgICAgICAgICBicmVha1xyXG4gICAgICAgICAgY2FzZSAweDdmOiAvLyByZWFsdGltZVxyXG4gICAgICAgICAgICAvLyBjb25zdCBkZXZpY2UgPSBtZXNzYWdlWzJdXHJcbiAgICAgICAgICAgIC8vIHN1YiBJRCAxXHJcbiAgICAgICAgICAgIHN3aXRjaCAobWVzc2FnZVszXSkge1xyXG4gICAgICAgICAgICAgIGNhc2UgMHgwNDogLy8gZGV2aWNlIGNvbnRyb2xcclxuICAgICAgICAgICAgICAgIC8vIHN1YiBJRCAyXHJcbiAgICAgICAgICAgICAgICBzd2l0Y2ggKG1lc3NhZ2VbNF0pIHtcclxuICAgICAgICAgICAgICAgICAgY2FzZSAweDAxOiB7IC8vIG1hc3RlciB2b2x1bWVcclxuICAgICAgICAgICAgICAgICAgICBjb25zdCB2b2x1bWUgPSBtZXNzYWdlWzVdICsgKG1lc3NhZ2VbNl0gPDwgNylcclxuICAgICAgICAgICAgICAgICAgICBjb25zdCBNQVhfVk9MVU1FID0gMHg0MDAwIC0gMVxyXG4gICAgICAgICAgICAgICAgICAgIHN5bnRoLnNldE1hc3RlclZvbHVtZSh2b2x1bWUgLyBNQVhfVk9MVU1FKVxyXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrXHJcbiAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgZGVmYXVsdDogXHJcbiAgICAgICAgICAgICAgICAgICAgYnJlYWtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGJyZWFrXHJcbiAgICAgICAgICAgICAgZGVmYXVsdDogXHJcbiAgICAgICAgICAgICAgICBicmVha1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGJyZWFrXHJcbiAgICAgICAgICBkZWZhdWx0OiBcclxuICAgICAgICAgICAgYnJlYWtcclxuICAgICAgICB9XHJcbiAgICAgICAgYnJlYWtcclxuICAgICAgZGVmYXVsdDogLy8gbm90IHN1cHBvcnRlZFxyXG4gICAgICAgIGJyZWFrXHJcbiAgICB9XHJcbiAgfVxyXG59XHJcblxuXG5cbi8vIFdFQlBBQ0sgRk9PVEVSIC8vXG4vLyAuL3NyYy9taWRpX21lc3NhZ2VfaGFuZGxlci50cyJdLCJzb3VyY2VSb290IjoiIn0= \ No newline at end of file