mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-11 13:48:34 +00:00
2 lines
87 KiB
JavaScript
2 lines
87 KiB
JavaScript
import{P as Pattern}from"./index.ec9f9930.js";let loadCache={};async function loadFont(name){if(loadCache[name])return loadCache[name];const load=async()=>{const url=`https://felixroos.github.io/webaudiofontdata/sound/${name}.js`;console.log("load font",name,url);const preset=await fetch(url).then(h=>h.text());let[_,data]=preset.split("={");return eval("{"+data)};return loadCache[name]=load(),loadCache[name]}async function getFontBufferSource(h,y,S){typeof y=="string"&&(y=toMidi(y));const{buffer:n,zone:e}=await getFontPitch(h,y,S),f=S.createBufferSource();f.buffer=n;const i=e.originalPitch-100*e.coarseTune-e.fineTune,l=1*Math.pow(2,(100*y-i)/1200);return f.playbackRate.value=l,e.loopStart>1&&e.loopStart<e.loopEnd&&(f.loop=!0,f.loopStart=e.loopStart/e.sampleRate,f.loopEnd=e.loopEnd/e.sampleRate),f}let bufferCache={};async function getFontPitch(h,y,S){const n=`${h}:::${y}`;if(bufferCache[n])return bufferCache[n];const e=async()=>{const f=await loadFont(h);if(!f)throw new Error(`Could not load soundfont ${h}`);const i=findZone(f,y);if(!i)throw new Error("no soundfont zone found for preset ",h,"pitch",y);const l=await getBuffer(i,S);if(!l)throw new Error(`no soundfont buffer found for preset ${h}, pitch: ${y}`);return{buffer:l,zone:i}};return bufferCache[n]=e(),bufferCache[n]}function findZone(h,y){return h.find(S=>S.keyRangeLow<=y&&S.keyRangeHigh+1>=y)}async function getBuffer(h,y){if(h.sample){console.warn("zone.sample untested!");const n=atob(h.sample);h.buffer=y.createBuffer(1,n.length/2,h.sampleRate);const e=h.buffer.getChannelData(0);let f,i,l;for(var S=0;S<n.length/2;S++)f=n.charCodeAt(S*2),i=n.charCodeAt(S*2+1),f<0&&(f=256+f),i<0&&(i=256+i),l=i*256+f,l>=65536/2&&(l=l-65536),e[S]=l/65536}else if(h.file){const n=h.file.length,e=new ArrayBuffer(n),f=new Uint8Array(e),i=atob(h.file);let l;for(let t=0;t<i.length;t++)l=i.charCodeAt(t),f[t]=l;return new Promise(t=>y.decodeAudioData(e,t))}}const instruments=["0000_JCLive_sf2_file","0000_Aspirin_sf2_file","0000_Chaos_sf2_file","0000_FluidR3_GM_sf2_file","0000_GeneralUserGS_sf2_file","0000_SBLive_sf2","0000_SoundBlasterOld_sf2","0001_FluidR3_GM_sf2_file","0001_GeneralUserGS_sf2_file","0002_GeneralUserGS_sf2_file","0003_GeneralUserGS_sf2_file","0010_Aspirin_sf2_file","0010_Chaos_sf2_file","0010_FluidR3_GM_sf2_file","0010_GeneralUserGS_sf2_file","0010_JCLive_sf2_file","0010_SBLive_sf2","0010_SoundBlasterOld_sf2","0011_Aspirin_sf2_file","0011_FluidR3_GM_sf2_file","0011_GeneralUserGS_sf2_file","0012_GeneralUserGS_sf2_file","0020_Aspirin_sf2_file","0020_Chaos_sf2_file","0020_FluidR3_GM_sf2_file","0020_GeneralUserGS_sf2_file","0020_JCLive_sf2_file","0020_SBLive_sf2","0020_SoundBlasterOld_sf2","0021_Aspirin_sf2_file","0021_GeneralUserGS_sf2_file","0022_Aspirin_sf2_file","0030_Aspirin_sf2_file","0030_Chaos_sf2_file","0030_FluidR3_GM_sf2_file","0030_GeneralUserGS_sf2_file","0030_JCLive_sf2_file","0030_SBLive_sf2","0030_SoundBlasterOld_sf2","0031_Aspirin_sf2_file","0031_FluidR3_GM_sf2_file","0031_GeneralUserGS_sf2_file","0031_SoundBlasterOld_sf2","0040_Aspirin_sf2_file","0040_Chaos_sf2_file","0040_FluidR3_GM_sf2_file","0040_GeneralUserGS_sf2_file","0040_JCLive_sf2_file","0040_SBLive_sf2","0040_SoundBlasterOld_sf2","0041_FluidR3_GM_sf2_file","0041_GeneralUserGS_sf2_file","0041_SoundBlasterOld_sf2","0042_GeneralUserGS_sf2_file","0043_GeneralUserGS_sf2_file","0044_GeneralUserGS_sf2_file","0045_GeneralUserGS_sf2_file","0046_GeneralUserGS_sf2_file","0050_Aspirin_sf2_file","0050_Chaos_sf2_file","0050_FluidR3_GM_sf2_file","0050_GeneralUserGS_sf2_file","0050_JCLive_sf2_file","0050_SBLive_sf2","0050_SoundBlasterOld_sf2","0051_FluidR3_GM_sf2_file","0051_GeneralUserGS_sf2_file","0052_GeneralUserGS_sf2_file","0053_GeneralUserGS_sf2_file","0054_GeneralUserGS_sf2_file","0060_Aspirin_sf2_file","0060_Chaos_sf2_file","0060_FluidR3_GM_sf2_file","0060_GeneralUserGS_sf2_file","0060_JCLive_sf2_file","0060_SBLive_sf2","0060_SoundBlasterOld_sf2","0061_Aspirin_sf2_file","0061_GeneralUserGS_sf2_file","0061_SoundBlasterOld_sf2","0062_GeneralUserGS_sf2_file","0070_Aspirin_sf2_file","0070_Chaos_sf2_file","0070_FluidR3_GM_sf2_file","0070_GeneralUserGS_sf2_file","0070_JCLive_sf2_file","0070_SBLive_sf2","0070_SoundBlasterOld_sf2","0071_GeneralUserGS_sf2_file","0080_Aspirin_sf2_file","0080_Chaos_sf2_file","0080_FluidR3_GM_sf2_file","0080_GeneralUserGS_sf2_file","0080_JCLive_sf2_file","0080_SBLive_sf2","0080_SoundBlasterOld_sf2","0081_FluidR3_GM_sf2_file","0081_GeneralUserGS_sf2_file","0081_SoundBlasterOld_sf2","0090_Aspirin_sf2_file","0090_Chaos_sf2_file","0090_FluidR3_GM_sf2_file","0090_GeneralUserGS_sf2_file","0090_JCLive_sf2_file","0090_SBLive_sf2","0090_SoundBlasterOld_sf2","0091_SoundBlasterOld_sf2","0100_Aspirin_sf2_file","0100_Chaos_sf2_file","0100_FluidR3_GM_sf2_file","0100_GeneralUserGS_sf2_file","0100_JCLive_sf2_file","0100_SBLive_sf2","0100_SoundBlasterOld_sf2","0101_GeneralUserGS_sf2_file","0101_SoundBlasterOld_sf2","0110_Aspirin_sf2_file","0110_Chaos_sf2_file","0110_FluidR3_GM_sf2_file","0110_GeneralUserGS_sf2_file","0110_JCLive_sf2_file","0110_SBLive_sf2","0110_SoundBlasterOld_sf2","0111_FluidR3_GM_sf2_file","0120_Aspirin_sf2_file","0120_Chaos_sf2_file","0120_FluidR3_GM_sf2_file","0120_GeneralUserGS_sf2_file","0120_JCLive_sf2_file","0120_SBLive_sf2","0120_SoundBlasterOld_sf2","0121_FluidR3_GM_sf2_file","0121_GeneralUserGS_sf2_file","0130_Aspirin_sf2_file","0130_Chaos_sf2_file","0130_FluidR3_GM_sf2_file","0130_GeneralUserGS_sf2_file","0130_JCLive_sf2_file","0130_SBLive_sf2","0130_SoundBlasterOld_sf2","0131_FluidR3_GM_sf2_file","0140_Aspirin_sf2_file","0140_Chaos_sf2_file","0140_FluidR3_GM_sf2_file","0140_GeneralUserGS_sf2_file","0140_JCLive_sf2_file","0140_SBLive_sf2","0140_SoundBlasterOld_sf2","0141_FluidR3_GM_sf2_file","0141_GeneralUserGS_sf2_file","0142_GeneralUserGS_sf2_file","0143_GeneralUserGS_sf2_file","0150_Aspirin_sf2_file","0150_Chaos_sf2_file","0150_FluidR3_GM_sf2_file","0150_GeneralUserGS_sf2_file","0150_JCLive_sf2_file","0150_SBLive_sf2","0150_SoundBlasterOld_sf2","0151_FluidR3_GM_sf2_file","0160_Aspirin_sf2_file","0160_Chaos_sf2_file","0160_FluidR3_GM_sf2_file","0160_GeneralUserGS_sf2_file","0160_JCLive_sf2_file","0160_SBLive_sf2","0160_SoundBlasterOld_sf2","0161_Aspirin_sf2_file","0161_FluidR3_GM_sf2_file","0161_SoundBlasterOld_sf2","0170_Aspirin_sf2_file","0170_Chaos_sf2_file","0170_FluidR3_GM_sf2_file","0170_GeneralUserGS_sf2_file","0170_JCLive_sf2_file","0170_SBLive_sf2","0170_SoundBlasterOld_sf2","0171_FluidR3_GM_sf2_file","0171_GeneralUserGS_sf2_file","0172_FluidR3_GM_sf2_file","0180_Aspirin_sf2_file","0180_Chaos_sf2_file","0180_FluidR3_GM_sf2_file","0180_GeneralUserGS_sf2_file","0180_JCLive_sf2_file","0180_SBLive_sf2","0180_SoundBlasterOld_sf2","0181_Aspirin_sf2_file","0181_GeneralUserGS_sf2_file","0181_SoundBlasterOld_sf2","0190_Aspirin_sf2_file","0190_Chaos_sf2_file","0190_FluidR3_GM_sf2_file","0190_GeneralUserGS_sf2_file","0190_JCLive_sf2_file","0190_SBLive_sf2","0190_SoundBlasterOld_sf2","0191_Aspirin_sf2_file","0191_GeneralUserGS_sf2_file","0191_SoundBlasterOld_sf2","0200_Aspirin_sf2_file","0200_Chaos_sf2_file","0200_FluidR3_GM_sf2_file","0200_GeneralUserGS_sf2_file","0200_JCLive_sf2_file","0200_SBLive_sf2","0200_SoundBlasterOld_sf2","0201_Aspirin_sf2_file","0201_FluidR3_GM_sf2_file","0201_GeneralUserGS_sf2_file","0201_SoundBlasterOld_sf2","0210_Aspirin_sf2_file","0210_Chaos_sf2_file","0210_FluidR3_GM_sf2_file","0210_GeneralUserGS_sf2_file","0210_JCLive_sf2_file","0210_SBLive_sf2","0210_SoundBlasterOld_sf2","0211_Aspirin_sf2_file","0211_FluidR3_GM_sf2_file","0211_GeneralUserGS_sf2_file","0211_SoundBlasterOld_sf2","0212_GeneralUserGS_sf2_file","0220_Aspirin_sf2_file","0220_Chaos_sf2_file","0220_FluidR3_GM_sf2_file","0220_GeneralUserGS_sf2_file","0220_JCLive_sf2_file","0220_SBLive_sf2","0220_SoundBlasterOld_sf2","0221_FluidR3_GM_sf2_file","0230_Aspirin_sf2_file","0230_Chaos_sf2_file","0230_FluidR3_GM_sf2_file","0230_GeneralUserGS_sf2_file","0230_JCLive_sf2_file","0230_SBLive_sf2","0230_SoundBlasterOld_sf2","0231_FluidR3_GM_sf2_file","0231_GeneralUserGS_sf2_file","0231_JCLive_sf2_file","0231_SoundBlasterOld_sf2","0232_FluidR3_GM_sf2_file","0233_FluidR3_GM_sf2_file","0240_Aspirin_sf2_file","0240_Chaos_sf2_file","0240_FluidR3_GM_sf2_file","0240_GeneralUserGS_sf2_file","0240_JCLive_sf2_file","0240_LK_Godin_Nylon_SF2_file","0240_SBLive_sf2","0240_SoundBlasterOld_sf2","0241_GeneralUserGS_sf2_file","0241_JCLive_sf2_file","0242_JCLive_sf2_file","0243_JCLive_sf2_file","0253_Acoustic_Guitar_sf2_file","0250_Aspirin_sf2_file","0250_Chaos_sf2_file","0250_FluidR3_GM_sf2_file","0250_GeneralUserGS_sf2_file","0250_JCLive_sf2_file","0250_LK_AcousticSteel_SF2_file","0250_SBLive_sf2","0250_SoundBlasterOld_sf2","0251_Acoustic_Guitar_sf2_file","0251_GeneralUserGS_sf2_file","0252_Acoustic_Guitar_sf2_file","0252_GeneralUserGS_sf2_file","0253_Acoustic_Guitar_sf2_file","0253_GeneralUserGS_sf2_file","0254_Acoustic_Guitar_sf2_file","0254_GeneralUserGS_sf2_file","0255_GeneralUserGS_sf2_file","0260_Aspirin_sf2_file","0260_Chaos_sf2_file","0260_FluidR3_GM_sf2_file","0260_GeneralUserGS_sf2_file","0260_JCLive_sf2_file","0260_SBLive_sf2","0260_SoundBlasterOld_sf2","0260_Stratocaster_sf2_file","0261_GeneralUserGS_sf2_file","0261_SoundBlasterOld_sf2","0261_Stratocaster_sf2_file","0262_Stratocaster_sf2_file","0270_Aspirin_sf2_file","0270_Chaos_sf2_file","0270_FluidR3_GM_sf2_file","0270_GeneralUserGS_sf2_file","0270_Gibson_Les_Paul_sf2_file","0270_JCLive_sf2_file","0270_SBAWE32_sf2_file","0270_SBLive_sf2","0270_SoundBlasterOld_sf2","0270_Stratocaster_sf2_file","0271_GeneralUserGS_sf2_file","0271_Stratocaster_sf2_file","0272_Stratocaster_sf2_file","0280_Aspirin_sf2_file","0280_Chaos_sf2_file","0280_FluidR3_GM_sf2_file","0280_GeneralUserGS_sf2_file","0280_JCLive_sf2_file","0280_LesPaul_sf2","0280_LesPaul_sf2_file","0280_SBAWE32_sf2_file","0280_SBLive_sf2","0280_SoundBlasterOld_sf2","0281_Aspirin_sf2_file","0281_FluidR3_GM_sf2_file","0281_GeneralUserGS_sf2_file","0282_FluidR3_GM_sf2_file","0282_GeneralUserGS_sf2_file","0283_GeneralUserGS_sf2_file","0290_Aspirin_sf2_file","0290_Chaos_sf2_file","0290_FluidR3_GM_sf2_file","0290_GeneralUserGS_sf2_file","0290_JCLive_sf2_file","0290_LesPaul_sf2","0290_LesPaul_sf2_file","0290_SBAWE32_sf2_file","0290_SBLive_sf2","0290_SoundBlasterOld_sf2","0291_Aspirin_sf2_file","0291_LesPaul_sf2","0291_LesPaul_sf2_file","0291_SBAWE32_sf2_file","0291_SoundBlasterOld_sf2","0292_Aspirin_sf2_file","0292_LesPaul_sf2","0292_LesPaul_sf2_file","0300_Aspirin_sf2_file","0300_Chaos_sf2_file","0300_FluidR3_GM_sf2_file","0300_GeneralUserGS_sf2_file","0300_JCLive_sf2_file","0300_LesPaul_sf2","0300_LesPaul_sf2_file","0300_SBAWE32_sf2_file","0300_SBLive_sf2","0300_SoundBlasterOld_sf2","0301_Aspirin_sf2_file","0301_FluidR3_GM_sf2_file","0301_GeneralUserGS_sf2_file","0301_JCLive_sf2_file","0301_LesPaul_sf2","0301_LesPaul_sf2_file","0302_Aspirin_sf2_file","0302_GeneralUserGS_sf2_file","0302_JCLive_sf2_file","0303_Aspirin_sf2_file","0304_Aspirin_sf2_file","0310_Aspirin_sf2_file","0310_Chaos_sf2_file","0310_FluidR3_GM_sf2_file","0310_GeneralUserGS_sf2_file","0310_JCLive_sf2_file","0310_LesPaul_sf2","0310_LesPaul_sf2_file","0310_SBAWE32_sf2_file","0310_SBLive_sf2","0310_SoundBlasterOld_sf2","0311_FluidR3_GM_sf2_file","0311_GeneralUserGS_sf2_file","0320_Aspirin_sf2_file","0320_Chaos_sf2_file","0320_FluidR3_GM_sf2_file","0320_GeneralUserGS_sf2_file","0320_JCLive_sf2_file","0320_SBLive_sf2","0320_SoundBlasterOld_sf2","0321_GeneralUserGS_sf2_file","0322_GeneralUserGS_sf2_file","0330_Aspirin_sf2_file","0330_Chaos_sf2_file","0330_FluidR3_GM_sf2_file","0330_GeneralUserGS_sf2_file","0330_JCLive_sf2_file","0330_SBLive_sf2","0330_SoundBlasterOld_sf2","0331_GeneralUserGS_sf2_file","0332_GeneralUserGS_sf2_file","0340_Aspirin_sf2_file","0340_Chaos_sf2_file","0340_FluidR3_GM_sf2_file","0340_GeneralUserGS_sf2_file","0340_JCLive_sf2_file","0340_SBLive_sf2","0340_SoundBlasterOld_sf2","0341_Aspirin_sf2_file","0341_GeneralUserGS_sf2_file","0350_Aspirin_sf2_file","0350_Chaos_sf2_file","0350_FluidR3_GM_sf2_file","0350_GeneralUserGS_sf2_file","0350_JCLive_sf2_file","0350_SBLive_sf2","0350_SoundBlasterOld_sf2","0351_GeneralUserGS_sf2_file","0360_Aspirin_sf2_file","0360_Chaos_sf2_file","0360_FluidR3_GM_sf2_file","0360_GeneralUserGS_sf2_file","0360_JCLive_sf2_file","0360_SBLive_sf2","0360_SoundBlasterOld_sf2","0361_GeneralUserGS_sf2_file","0370_Aspirin_sf2_file","0370_Chaos_sf2_file","0370_FluidR3_GM_sf2_file","0370_GeneralUserGS_sf2_file","0370_JCLive_sf2_file","0370_SBLive_sf2","0370_SoundBlasterOld_sf2","0371_GeneralUserGS_sf2_file","0372_GeneralUserGS_sf2_file","0385_GeneralUserGS_sf2_file","0380_Aspirin_sf2_file","0380_Chaos_sf2_file","0380_FluidR3_GM_sf2_file","0380_GeneralUserGS_sf2_file","0380_JCLive_sf2_file","0380_SBLive_sf2","0380_SoundBlasterOld_sf2","0381_FluidR3_GM_sf2_file","0381_GeneralUserGS_sf2_file","0382_FluidR3_GM_sf2_file","0382_GeneralUserGS_sf2_file","0383_GeneralUserGS_sf2_file","0384_GeneralUserGS_sf2_file","0386_GeneralUserGS_sf2_file","0387_GeneralUserGS_sf2_file","0390_Aspirin_sf2_file","0390_Chaos_sf2_file","0390_FluidR3_GM_sf2_file","0390_GeneralUserGS_sf2_file","0390_JCLive_sf2_file","0390_SBLive_sf2","0390_SoundBlasterOld_sf2","0391_FluidR3_GM_sf2_file","0391_GeneralUserGS_sf2_file","0391_SoundBlasterOld_sf2","0392_FluidR3_GM_sf2_file","0392_GeneralUserGS_sf2_file","0393_GeneralUserGS_sf2_file","0400_Aspirin_sf2_file","0400_Chaos_sf2_file","0400_FluidR3_GM_sf2_file","0400_GeneralUserGS_sf2_file","0400_JCLive_sf2_file","0400_SBLive_sf2","0400_SoundBlasterOld_sf2","0401_Aspirin_sf2_file","0401_FluidR3_GM_sf2_file","0401_GeneralUserGS_sf2_file","0402_GeneralUserGS_sf2_file","0410_Aspirin_sf2_file","0410_Chaos_sf2_file","0410_FluidR3_GM_sf2_file","0410_GeneralUserGS_sf2_file","0410_JCLive_sf2_file","0410_SBLive_sf2","0410_SoundBlasterOld_sf2","0411_FluidR3_GM_sf2_file","0420_Aspirin_sf2_file","0420_Chaos_sf2_file","0420_FluidR3_GM_sf2_file","0420_GeneralUserGS_sf2_file","0420_JCLive_sf2_file","0420_SBLive_sf2","0420_SoundBlasterOld_sf2","0421_FluidR3_GM_sf2_file","0421_GeneralUserGS_sf2_file","0430_Aspirin_sf2_file","0430_Chaos_sf2_file","0430_FluidR3_GM_sf2_file","0430_GeneralUserGS_sf2_file","0430_JCLive_sf2_file","0430_SBLive_sf2","0430_SoundBlasterOld_sf2","0431_FluidR3_GM_sf2_file","0440_Aspirin_sf2_file","0440_Chaos_sf2_file","0440_FluidR3_GM_sf2_file","0440_GeneralUserGS_sf2_file","0440_JCLive_sf2_file","0440_SBLive_sf2","0440_SoundBlasterOld_sf2","0441_GeneralUserGS_sf2_file","0442_GeneralUserGS_sf2_file","0450_Aspirin_sf2_file","0450_Chaos_sf2_file","0450_FluidR3_GM_sf2_file","0450_GeneralUserGS_sf2_file","0450_JCLive_sf2_file","0450_SBLive_sf2","0450_SoundBlasterOld_sf2","0451_FluidR3_GM_sf2_file","0460_Aspirin_sf2_file","0460_Chaos_sf2_file","0460_FluidR3_GM_sf2_file","0460_GeneralUserGS_sf2_file","0460_JCLive_sf2_file","0460_SBLive_sf2","0460_SoundBlasterOld_sf2","0461_FluidR3_GM_sf2_file","0470_Aspirin_sf2_file","0470_Chaos_sf2_file","0470_FluidR3_GM_sf2_file","0470_GeneralUserGS_sf2_file","0470_JCLive_sf2_file","0470_SBLive_sf2","0470_SoundBlasterOld_sf2","0471_FluidR3_GM_sf2_file","0471_GeneralUserGS_sf2_file","0480_Aspirin_sf2_file","0480_Chaos_sf2_file","0480_FluidR3_GM_sf2_file","0480_GeneralUserGS_sf2_file","0480_JCLive_sf2_file","0480_SBLive_sf2","0480_SoundBlasterOld_sf2","04810_GeneralUserGS_sf2_file","04811_GeneralUserGS_sf2_file","04812_GeneralUserGS_sf2_file","04813_GeneralUserGS_sf2_file","04814_GeneralUserGS_sf2_file","04815_GeneralUserGS_sf2_file","04816_GeneralUserGS_sf2_file","04817_GeneralUserGS_sf2_file","0481_Aspirin_sf2_file","0481_FluidR3_GM_sf2_file","0481_GeneralUserGS_sf2_file","0482_Aspirin_sf2_file","0482_GeneralUserGS_sf2_file","0483_GeneralUserGS_sf2_file","0484_GeneralUserGS_sf2_file","0485_GeneralUserGS_sf2_file","0486_GeneralUserGS_sf2_file","0487_GeneralUserGS_sf2_file","0488_GeneralUserGS_sf2_file","0489_GeneralUserGS_sf2_file","0490_Aspirin_sf2_file","0490_Chaos_sf2_file","0490_FluidR3_GM_sf2_file","0490_GeneralUserGS_sf2_file","0490_JCLive_sf2_file","0490_SBLive_sf2","0490_SoundBlasterOld_sf2","0491_GeneralUserGS_sf2_file","0492_GeneralUserGS_sf2_file","0500_Aspirin_sf2_file","0500_Chaos_sf2_file","0500_FluidR3_GM_sf2_file","0500_GeneralUserGS_sf2_file","0500_JCLive_sf2_file","0500_SBLive_sf2","0500_SoundBlasterOld_sf2","0501_FluidR3_GM_sf2_file","0501_GeneralUserGS_sf2_file","0502_FluidR3_GM_sf2_file","0502_GeneralUserGS_sf2_file","0503_FluidR3_GM_sf2_file","0504_FluidR3_GM_sf2_file","0505_FluidR3_GM_sf2_file","0510_Aspirin_sf2_file","0510_Chaos_sf2_file","0510_FluidR3_GM_sf2_file","0510_GeneralUserGS_sf2_file","0510_JCLive_sf2_file","0510_SBLive_sf2","0510_SoundBlasterOld_sf2","0511_GeneralUserGS_sf2_file","0511_SoundBlasterOld_sf2","0520_Aspirin_sf2_file","0520_Chaos_sf2_file","0520_FluidR3_GM_sf2_file","0520_GeneralUserGS_sf2_file","0520_JCLive_sf2_file","0520_SBLive_sf2","0520_Soul_Ahhs_sf2_file","0520_SoundBlasterOld_sf2","0521_FluidR3_GM_sf2_file","0521_Soul_Ahhs_sf2_file","0521_SoundBlasterOld_sf2","0522_Soul_Ahhs_sf2_file","0530_Aspirin_sf2_file","0530_Chaos_sf2_file","0530_FluidR3_GM_sf2_file","0530_GeneralUserGS_sf2_file","0530_JCLive_sf2_file","0530_SBLive_sf2","0530_Soul_Ahhs_sf2_file","0530_SoundBlasterOld_sf2","0531_FluidR3_GM_sf2_file","0531_GeneralUserGS_sf2_file","0531_JCLive_sf2_file","0531_SoundBlasterOld_sf2","0540_Aspirin_sf2_file","0540_Chaos_sf2_file","0540_FluidR3_GM_sf2_file","0540_GeneralUserGS_sf2_file","0540_JCLive_sf2_file","0540_SBLive_sf2","0540_SoundBlasterOld_sf2","0541_FluidR3_GM_sf2_file","0550_Aspirin_sf2_file","0550_Chaos_sf2_file","0550_FluidR3_GM_sf2_file","0550_GeneralUserGS_sf2_file","0550_JCLive_sf2_file","0550_SBLive_sf2","0550_SoundBlasterOld_sf2","0551_Aspirin_sf2_file","0551_FluidR3_GM_sf2_file","0560_Aspirin_sf2_file","0560_Chaos_sf2_file","0560_FluidR3_GM_sf2_file","0560_GeneralUserGS_sf2_file","0560_JCLive_sf2_file","0560_SBLive_sf2","0560_SoundBlasterOld_sf2","0570_Aspirin_sf2_file","0570_Chaos_sf2_file","0570_FluidR3_GM_sf2_file","0570_GeneralUserGS_sf2_file","0570_JCLive_sf2_file","0570_SBLive_sf2","0570_SoundBlasterOld_sf2","0571_GeneralUserGS_sf2_file","0580_Aspirin_sf2_file","0580_Chaos_sf2_file","0580_FluidR3_GM_sf2_file","0580_GeneralUserGS_sf2_file","0580_JCLive_sf2_file","0580_SBLive_sf2","0580_SoundBlasterOld_sf2","0581_GeneralUserGS_sf2_file","0590_Aspirin_sf2_file","0590_Chaos_sf2_file","0590_FluidR3_GM_sf2_file","0590_GeneralUserGS_sf2_file","0590_JCLive_sf2_file","0590_SBLive_sf2","0590_SoundBlasterOld_sf2","0591_GeneralUserGS_sf2_file","0600_Aspirin_sf2_file","0600_Chaos_sf2_file","0600_FluidR3_GM_sf2_file","0600_GeneralUserGS_sf2_file","0600_JCLive_sf2_file","0600_SBLive_sf2","0600_SoundBlasterOld_sf2","0601_FluidR3_GM_sf2_file","0601_GeneralUserGS_sf2_file","0602_GeneralUserGS_sf2_file","0603_GeneralUserGS_sf2_file","0610_Aspirin_sf2_file","0610_Chaos_sf2_file","0610_FluidR3_GM_sf2_file","0610_GeneralUserGS_sf2_file","0610_JCLive_sf2_file","0610_SBLive_sf2","0610_SoundBlasterOld_sf2","0611_GeneralUserGS_sf2_file","0612_GeneralUserGS_sf2_file","0613_GeneralUserGS_sf2_file","0614_GeneralUserGS_sf2_file","0615_GeneralUserGS_sf2_file","0620_Aspirin_sf2_file","0620_Chaos_sf2_file","0620_FluidR3_GM_sf2_file","0620_GeneralUserGS_sf2_file","0620_JCLive_sf2_file","0620_SBLive_sf2","0620_SoundBlasterOld_sf2","0621_Aspirin_sf2_file","0621_FluidR3_GM_sf2_file","0621_GeneralUserGS_sf2_file","0622_FluidR3_GM_sf2_file","0622_GeneralUserGS_sf2_file","0630_Aspirin_sf2_file","0630_Chaos_sf2_file","0630_FluidR3_GM_sf2_file","0630_GeneralUserGS_sf2_file","0630_JCLive_sf2_file","0630_SBLive_sf2","0630_SoundBlasterOld_sf2","0631_Aspirin_sf2_file","0631_FluidR3_GM_sf2_file","0631_GeneralUserGS_sf2_file","0632_FluidR3_GM_sf2_file","0633_FluidR3_GM_sf2_file","0640_Aspirin_sf2_file","0640_Chaos_sf2_file","0640_FluidR3_GM_sf2_file","0640_GeneralUserGS_sf2_file","0640_JCLive_sf2_file","0640_SBLive_sf2","0640_SoundBlasterOld_sf2","0641_FluidR3_GM_sf2_file","0650_Aspirin_sf2_file","0650_Chaos_sf2_file","0650_FluidR3_GM_sf2_file","0650_GeneralUserGS_sf2_file","0650_JCLive_sf2_file","0650_SBLive_sf2","0650_SoundBlasterOld_sf2","0651_Aspirin_sf2_file","0651_FluidR3_GM_sf2_file","0660_Aspirin_sf2_file","0660_Chaos_sf2_file","0660_FluidR3_GM_sf2_file","0660_GeneralUserGS_sf2_file","0660_JCLive_sf2_file","0660_SBLive_sf2","0660_SoundBlasterOld_sf2","0661_FluidR3_GM_sf2_file","0661_GeneralUserGS_sf2_file","0670_Aspirin_sf2_file","0670_Chaos_sf2_file","0670_FluidR3_GM_sf2_file","0670_GeneralUserGS_sf2_file","0670_JCLive_sf2_file","0670_SBLive_sf2","0670_SoundBlasterOld_sf2","0671_FluidR3_GM_sf2_file","0680_Aspirin_sf2_file","0680_Chaos_sf2_file","0680_FluidR3_GM_sf2_file","0680_GeneralUserGS_sf2_file","0680_JCLive_sf2_file","0680_SBLive_sf2","0680_SoundBlasterOld_sf2","0681_FluidR3_GM_sf2_file","0690_Aspirin_sf2_file","0690_Chaos_sf2_file","0690_FluidR3_GM_sf2_file","0690_GeneralUserGS_sf2_file","0690_JCLive_sf2_file","0690_SBLive_sf2","0690_SoundBlasterOld_sf2","0691_FluidR3_GM_sf2_file","0700_Aspirin_sf2_file","0700_Chaos_sf2_file","0700_FluidR3_GM_sf2_file","0700_GeneralUserGS_sf2_file","0700_JCLive_sf2_file","0700_SBLive_sf2","0700_SoundBlasterOld_sf2","0701_FluidR3_GM_sf2_file","0701_GeneralUserGS_sf2_file","0710_Aspirin_sf2_file","0710_Chaos_sf2_file","0710_FluidR3_GM_sf2_file","0710_GeneralUserGS_sf2_file","0710_JCLive_sf2_file","0710_SBLive_sf2","0710_SoundBlasterOld_sf2","0711_FluidR3_GM_sf2_file","0720_Aspirin_sf2_file","0720_Chaos_sf2_file","0720_FluidR3_GM_sf2_file","0720_GeneralUserGS_sf2_file","0720_JCLive_sf2_file","0720_SBLive_sf2","0720_SoundBlasterOld_sf2","0721_FluidR3_GM_sf2_file","0721_SoundBlasterOld_sf2","0730_Aspirin_sf2_file","0730_Chaos_sf2_file","0730_FluidR3_GM_sf2_file","0730_GeneralUserGS_sf2_file","0730_JCLive_sf2_file","0730_SBLive_sf2","0730_SoundBlasterOld_sf2","0731_Aspirin_sf2_file","0731_FluidR3_GM_sf2_file","0731_SoundBlasterOld_sf2","0740_Aspirin_sf2_file","0740_Chaos_sf2_file","0740_FluidR3_GM_sf2_file","0740_GeneralUserGS_sf2_file","0740_JCLive_sf2_file","0740_SBLive_sf2","0740_SoundBlasterOld_sf2","0741_GeneralUserGS_sf2_file","0750_Aspirin_sf2_file","0750_Chaos_sf2_file","0750_FluidR3_GM_sf2_file","0750_GeneralUserGS_sf2_file","0750_JCLive_sf2_file","0750_SBLive_sf2","0750_SoundBlasterOld_sf2","0751_Aspirin_sf2_file","0751_FluidR3_GM_sf2_file","0751_GeneralUserGS_sf2_file","0751_SoundBlasterOld_sf2","0760_Aspirin_sf2_file","0760_Chaos_sf2_file","0760_FluidR3_GM_sf2_file","0760_GeneralUserGS_sf2_file","0760_JCLive_sf2_file","0760_SBLive_sf2","0760_SoundBlasterOld_sf2","0761_FluidR3_GM_sf2_file","0761_GeneralUserGS_sf2_file","0761_SoundBlasterOld_sf2","0762_GeneralUserGS_sf2_file","0770_Aspirin_sf2_file","0770_Chaos_sf2_file","0770_FluidR3_GM_sf2_file","0770_GeneralUserGS_sf2_file","0770_JCLive_sf2_file","0770_SBLive_sf2","0770_SoundBlasterOld_sf2","0771_FluidR3_GM_sf2_file","0771_GeneralUserGS_sf2_file","0772_GeneralUserGS_sf2_file","0780_Aspirin_sf2_file","0780_Chaos_sf2_file","0780_FluidR3_GM_sf2_file","0780_GeneralUserGS_sf2_file","0780_JCLive_sf2_file","0780_SBLive_sf2","0780_SoundBlasterOld_sf2","0781_GeneralUserGS_sf2_file","0790_Aspirin_sf2_file","0790_Chaos_sf2_file","0790_FluidR3_GM_sf2_file","0790_GeneralUserGS_sf2_file","0790_JCLive_sf2_file","0790_SBLive_sf2","0790_SoundBlasterOld_sf2","0791_GeneralUserGS_sf2_file","0800_Aspirin_sf2_file","0800_Chaos_sf2_file","0800_FluidR3_GM_sf2_file","0800_GeneralUserGS_sf2_file","0800_JCLive_sf2_file","0800_SBLive_sf2","0800_SoundBlasterOld_sf2","0801_FluidR3_GM_sf2_file","0801_GeneralUserGS_sf2_file","0810_Aspirin_sf2_file","0810_Chaos_sf2_file","0810_FluidR3_GM_sf2_file","0810_GeneralUserGS_sf2_file","0810_JCLive_sf2_file","0810_SBLive_sf2","0810_SoundBlasterOld_sf2","0811_Aspirin_sf2_file","0811_GeneralUserGS_sf2_file","0811_SoundBlasterOld_sf2","0820_Aspirin_sf2_file","0820_Chaos_sf2_file","0820_FluidR3_GM_sf2_file","0820_GeneralUserGS_sf2_file","0820_JCLive_sf2_file","0820_SBLive_sf2","0820_SoundBlasterOld_sf2","0821_FluidR3_GM_sf2_file","0821_GeneralUserGS_sf2_file","0821_SoundBlasterOld_sf2","0822_GeneralUserGS_sf2_file","0823_GeneralUserGS_sf2_file","0830_Aspirin_sf2_file","0830_Chaos_sf2_file","0830_FluidR3_GM_sf2_file","0830_GeneralUserGS_sf2_file","0830_JCLive_sf2_file","0830_SBLive_sf2","0830_SoundBlasterOld_sf2","0831_FluidR3_GM_sf2_file","0831_GeneralUserGS_sf2_file","0831_SoundBlasterOld_sf2","0840_Aspirin_sf2_file","0840_Chaos_sf2_file","0840_FluidR3_GM_sf2_file","0840_GeneralUserGS_sf2_file","0840_JCLive_sf2_file","0840_SBLive_sf2","0840_SoundBlasterOld_sf2","0841_Aspirin_sf2_file","0841_Chaos_sf2_file","0841_FluidR3_GM_sf2_file","0841_GeneralUserGS_sf2_file","0841_JCLive_sf2_file","0841_SoundBlasterOld_sf2","0842_FluidR3_GM_sf2_file","0850_Aspirin_sf2_file","0850_Chaos_sf2_file","0850_FluidR3_GM_sf2_file","0850_GeneralUserGS_sf2_file","0850_JCLive_sf2_file","0850_SBLive_sf2","0850_SoundBlasterOld_sf2","0851_FluidR3_GM_sf2_file","0851_GeneralUserGS_sf2_file","0851_JCLive_sf2_file","0851_SoundBlasterOld_sf2","0860_Aspirin_sf2_file","0860_Chaos_sf2_file","0860_FluidR3_GM_sf2_file","0860_GeneralUserGS_sf2_file","0860_JCLive_sf2_file","0860_SBLive_sf2","0860_SoundBlasterOld_sf2","0861_Aspirin_sf2_file","0861_FluidR3_GM_sf2_file","0861_SoundBlasterOld_sf2","0870_Aspirin_sf2_file","0870_Chaos_sf2_file","0870_FluidR3_GM_sf2_file","0870_GeneralUserGS_sf2_file","0870_JCLive_sf2_file","0870_SBLive_sf2","0870_SoundBlasterOld_sf2","0871_GeneralUserGS_sf2_file","0872_GeneralUserGS_sf2_file","0873_GeneralUserGS_sf2_file","0880_Aspirin_sf2_file","0880_Chaos_sf2_file","0880_FluidR3_GM_sf2_file","0880_GeneralUserGS_sf2_file","0880_JCLive_sf2_file","0880_SBLive_sf2","0880_SoundBlasterOld_sf2","0881_Aspirin_sf2_file","0881_FluidR3_GM_sf2_file","0881_GeneralUserGS_sf2_file","0881_SoundBlasterOld_sf2","0882_Aspirin_sf2_file","0882_FluidR3_GM_sf2_file","0882_GeneralUserGS_sf2_file","0883_GeneralUserGS_sf2_file","0884_GeneralUserGS_sf2_file","0885_GeneralUserGS_sf2_file","0886_GeneralUserGS_sf2_file","0887_GeneralUserGS_sf2_file","0888_GeneralUserGS_sf2_file","0889_GeneralUserGS_sf2_file","0890_Aspirin_sf2_file","0890_Chaos_sf2_file","0890_FluidR3_GM_sf2_file","0890_GeneralUserGS_sf2_file","0890_JCLive_sf2_file","0890_SBLive_sf2","0890_SoundBlasterOld_sf2","0891_Aspirin_sf2_file","0891_FluidR3_GM_sf2_file","0891_GeneralUserGS_sf2_file","0900_Aspirin_sf2_file","0900_Chaos_sf2_file","0900_FluidR3_GM_sf2_file","0900_GeneralUserGS_sf2_file","0900_JCLive_sf2_file","0900_SBLive_sf2","0900_SoundBlasterOld_sf2","0901_Aspirin_sf2_file","0901_FluidR3_GM_sf2_file","0901_GeneralUserGS_sf2_file","0901_SoundBlasterOld_sf2","0910_Aspirin_sf2_file","0910_Chaos_sf2_file","0910_FluidR3_GM_sf2_file","0910_GeneralUserGS_sf2_file","0910_JCLive_sf2_file","0910_SBLive_sf2","0910_SoundBlasterOld_sf2","0911_Aspirin_sf2_file","0911_GeneralUserGS_sf2_file","0911_JCLive_sf2_file","0911_SoundBlasterOld_sf2","0920_Aspirin_sf2_file","0920_Chaos_sf2_file","0920_FluidR3_GM_sf2_file","0920_GeneralUserGS_sf2_file","0920_JCLive_sf2_file","0920_SBLive_sf2","0920_SoundBlasterOld_sf2","0921_Aspirin_sf2_file","0921_GeneralUserGS_sf2_file","0921_SoundBlasterOld_sf2","0930_Aspirin_sf2_file","0930_Chaos_sf2_file","0930_FluidR3_GM_sf2_file","0930_GeneralUserGS_sf2_file","0930_JCLive_sf2_file","0930_SBLive_sf2","0930_SoundBlasterOld_sf2","0931_Aspirin_sf2_file","0931_FluidR3_GM_sf2_file","0931_GeneralUserGS_sf2_file","0931_SoundBlasterOld_sf2","0940_Aspirin_sf2_file","0940_Chaos_sf2_file","0940_FluidR3_GM_sf2_file","0940_GeneralUserGS_sf2_file","0940_JCLive_sf2_file","0940_SBLive_sf2","0940_SoundBlasterOld_sf2","0941_Aspirin_sf2_file","0941_FluidR3_GM_sf2_file","0941_GeneralUserGS_sf2_file","0941_JCLive_sf2_file","0950_Aspirin_sf2_file","0950_Chaos_sf2_file","0950_FluidR3_GM_sf2_file","0950_GeneralUserGS_sf2_file","0950_JCLive_sf2_file","0950_SBLive_sf2","0950_SoundBlasterOld_sf2","0951_FluidR3_GM_sf2_file","0951_GeneralUserGS_sf2_file","0960_Aspirin_sf2_file","0960_Chaos_sf2_file","0960_FluidR3_GM_sf2_file","0960_GeneralUserGS_sf2_file","0960_JCLive_sf2_file","0960_SBLive_sf2","0960_SoundBlasterOld_sf2","0961_Aspirin_sf2_file","0961_FluidR3_GM_sf2_file","0961_GeneralUserGS_sf2_file","0961_SoundBlasterOld_sf2","0962_GeneralUserGS_sf2_file","0970_Aspirin_sf2_file","0970_Chaos_sf2_file","0970_FluidR3_GM_sf2_file","0970_GeneralUserGS_sf2_file","0970_JCLive_sf2_file","0970_SBLive_sf2","0970_SoundBlasterOld_sf2","0971_FluidR3_GM_sf2_file","0971_GeneralUserGS_sf2_file","0971_SoundBlasterOld_sf2","0980_Aspirin_sf2_file","0980_Chaos_sf2_file","0980_FluidR3_GM_sf2_file","0980_GeneralUserGS_sf2_file","0980_JCLive_sf2_file","0980_SBLive_sf2","0980_SoundBlasterOld_sf2","0981_Aspirin_sf2_file","0981_FluidR3_GM_sf2_file","0981_GeneralUserGS_sf2_file","0981_SoundBlasterOld_sf2","0982_GeneralUserGS_sf2_file","0983_GeneralUserGS_sf2_file","0984_GeneralUserGS_sf2_file","0990_Aspirin_sf2_file","0990_Chaos_sf2_file","0990_FluidR3_GM_sf2_file","0990_GeneralUserGS_sf2_file","0990_JCLive_sf2_file","0990_SBLive_sf2","0990_SoundBlasterOld_sf2","0991_Aspirin_sf2_file","0991_FluidR3_GM_sf2_file","0991_GeneralUserGS_sf2_file","0991_JCLive_sf2_file","0991_SoundBlasterOld_sf2","0992_FluidR3_GM_sf2_file","0992_JCLive_sf2_file","0993_JCLive_sf2_file","0994_JCLive_sf2_file","1000_Aspirin_sf2_file","1000_Chaos_sf2_file","1000_FluidR3_GM_sf2_file","1000_GeneralUserGS_sf2_file","1000_JCLive_sf2_file","1000_SBLive_sf2","1000_SoundBlasterOld_sf2","1001_Aspirin_sf2_file","1001_FluidR3_GM_sf2_file","1001_GeneralUserGS_sf2_file","1001_JCLive_sf2_file","1001_SoundBlasterOld_sf2","1002_Aspirin_sf2_file","1002_FluidR3_GM_sf2_file","1002_GeneralUserGS_sf2_file","1010_Aspirin_sf2_file","1010_Chaos_sf2_file","1010_FluidR3_GM_sf2_file","1010_GeneralUserGS_sf2_file","1010_JCLive_sf2_file","1010_SBLive_sf2","1010_SoundBlasterOld_sf2","1011_Aspirin_sf2_file","1011_FluidR3_GM_sf2_file","1011_JCLive_sf2_file","1012_Aspirin_sf2_file","1020_Aspirin_sf2_file","1020_Chaos_sf2_file","1020_FluidR3_GM_sf2_file","1020_GeneralUserGS_sf2_file","1020_JCLive_sf2_file","1020_SBLive_sf2","1020_SoundBlasterOld_sf2","1021_Aspirin_sf2_file","1021_FluidR3_GM_sf2_file","1021_GeneralUserGS_sf2_file","1021_JCLive_sf2_file","1021_SoundBlasterOld_sf2","1022_GeneralUserGS_sf2_file","1030_Aspirin_sf2_file","1030_Chaos_sf2_file","1030_FluidR3_GM_sf2_file","1030_GeneralUserGS_sf2_file","1030_JCLive_sf2_file","1030_SBLive_sf2","1030_SoundBlasterOld_sf2","1031_Aspirin_sf2_file","1031_FluidR3_GM_sf2_file","1031_GeneralUserGS_sf2_file","1031_SoundBlasterOld_sf2","1032_FluidR3_GM_sf2_file","1040_Aspirin_sf2_file","1040_Chaos_sf2_file","1040_FluidR3_GM_sf2_file","1040_GeneralUserGS_sf2_file","1040_JCLive_sf2_file","1040_SBLive_sf2","1040_SoundBlasterOld_sf2","1041_FluidR3_GM_sf2_file","1041_GeneralUserGS_sf2_file","1050_Aspirin_sf2_file","1050_Chaos_sf2_file","1050_FluidR3_GM_sf2_file","1050_GeneralUserGS_sf2_file","1050_JCLive_sf2_file","1050_SBLive_sf2","1050_SoundBlasterOld_sf2","1051_GeneralUserGS_sf2_file","1060_Aspirin_sf2_file","1060_Chaos_sf2_file","1060_FluidR3_GM_sf2_file","1060_GeneralUserGS_sf2_file","1060_JCLive_sf2_file","1060_SBLive_sf2","1060_SoundBlasterOld_sf2","1061_FluidR3_GM_sf2_file","1061_GeneralUserGS_sf2_file","1061_SoundBlasterOld_sf2","1070_Aspirin_sf2_file","1070_Chaos_sf2_file","1070_FluidR3_GM_sf2_file","1070_GeneralUserGS_sf2_file","1070_JCLive_sf2_file","1070_SBLive_sf2","1070_SoundBlasterOld_sf2","1071_FluidR3_GM_sf2_file","1071_GeneralUserGS_sf2_file","1072_GeneralUserGS_sf2_file","1073_GeneralUserGS_sf2_file","1080_Aspirin_sf2_file","1080_Chaos_sf2_file","1080_FluidR3_GM_sf2_file","1080_GeneralUserGS_sf2_file","1080_JCLive_sf2_file","1080_SBLive_sf2","1080_SoundBlasterOld_sf2","1081_SoundBlasterOld_sf2","1090_Aspirin_sf2_file","1090_Chaos_sf2_file","1090_FluidR3_GM_sf2_file","1090_GeneralUserGS_sf2_file","1090_JCLive_sf2_file","1090_SBLive_sf2","1090_SoundBlasterOld_sf2","1091_SoundBlasterOld_sf2","1100_Aspirin_sf2_file","1100_Chaos_sf2_file","1100_FluidR3_GM_sf2_file","1100_GeneralUserGS_sf2_file","1100_JCLive_sf2_file","1100_SBLive_sf2","1100_SoundBlasterOld_sf2","1101_Aspirin_sf2_file","1101_FluidR3_GM_sf2_file","1101_GeneralUserGS_sf2_file","1102_GeneralUserGS_sf2_file","1110_Aspirin_sf2_file","1110_Chaos_sf2_file","1110_FluidR3_GM_sf2_file","1110_GeneralUserGS_sf2_file","1110_JCLive_sf2_file","1110_SBLive_sf2","1110_SoundBlasterOld_sf2","1120_Aspirin_sf2_file","1120_Chaos_sf2_file","1120_FluidR3_GM_sf2_file","1120_GeneralUserGS_sf2_file","1120_JCLive_sf2_file","1120_SBLive_sf2","1120_SoundBlasterOld_sf2","1121_SoundBlasterOld_sf2","1130_Aspirin_sf2_file","1130_Chaos_sf2_file","1130_FluidR3_GM_sf2_file","1130_GeneralUserGS_sf2_file","1130_JCLive_sf2_file","1130_SBLive_sf2","1130_SoundBlasterOld_sf2","1131_FluidR3_GM_sf2_file","1131_SoundBlasterOld_sf2","1140_Aspirin_sf2_file","1140_Chaos_sf2_file","1140_FluidR3_GM_sf2_file","1140_GeneralUserGS_sf2_file","1140_JCLive_sf2_file","1140_SBLive_sf2","1140_SoundBlasterOld_sf2","1141_FluidR3_GM_sf2_file","1150_Aspirin_sf2_file","1150_Chaos_sf2_file","1150_FluidR3_GM_sf2_file","1150_GeneralUserGS_sf2_file","1150_JCLive_sf2_file","1150_SBLive_sf2","1150_SoundBlasterOld_sf2","1151_FluidR3_GM_sf2_file","1151_GeneralUserGS_sf2_file","1152_FluidR3_GM_sf2_file","1152_GeneralUserGS_sf2_file","1160_Aspirin_sf2_file","1160_Chaos_sf2_file","1160_FluidR3_GM_sf2_file","1160_GeneralUserGS_sf2_file","1160_JCLive_sf2_file","1160_SBLive_sf2","1160_SoundBlasterOld_sf2","1161_FluidR3_GM_sf2_file","1161_GeneralUserGS_sf2_file","1161_SoundBlasterOld_sf2","1162_FluidR3_GM_sf2_file","1162_GeneralUserGS_sf2_file","1163_FluidR3_GM_sf2_file","1170_Aspirin_sf2_file","1170_Chaos_sf2_file","1170_FluidR3_GM_sf2_file","1170_GeneralUserGS_sf2_file","1170_JCLive_sf2_file","1170_SBLive_sf2","1170_SoundBlasterOld_sf2","1171_FluidR3_GM_sf2_file","1171_GeneralUserGS_sf2_file","1172_FluidR3_GM_sf2_file","1173_FluidR3_GM_sf2_file","1180_Aspirin_sf2_file","1180_Chaos_sf2_file","1180_FluidR3_GM_sf2_file","1180_GeneralUserGS_sf2_file","1180_JCLive_sf2_file","1180_SBLive_sf2","1180_SoundBlasterOld_sf2","1181_FluidR3_GM_sf2_file","1181_GeneralUserGS_sf2_file","1181_SoundBlasterOld_sf2","1190_Aspirin_sf2_file","1190_Chaos_sf2_file","1190_FluidR3_GM_sf2_file","1190_GeneralUserGS_sf2_file","1190_JCLive_sf2_file","1190_SBLive_sf2","1190_SoundBlasterOld_sf2","1191_GeneralUserGS_sf2_file","1192_GeneralUserGS_sf2_file","1193_GeneralUserGS_sf2_file","1194_GeneralUserGS_sf2_file","1200_Aspirin_sf2_file","1200_Chaos_sf2_file","1200_FluidR3_GM_sf2_file","1200_GeneralUserGS_sf2_file","1200_JCLive_sf2_file","1200_SBLive_sf2","1200_SoundBlasterOld_sf2","1201_Aspirin_sf2_file","1201_GeneralUserGS_sf2_file","1202_GeneralUserGS_sf2_file","1210_Aspirin_sf2_file","1210_Chaos_sf2_file","1210_FluidR3_GM_sf2_file","1210_GeneralUserGS_sf2_file","1210_JCLive_sf2_file","1210_SBLive_sf2","1210_SoundBlasterOld_sf2","1211_Aspirin_sf2_file","1211_GeneralUserGS_sf2_file","1212_GeneralUserGS_sf2_file","1220_Aspirin_sf2_file","1220_Chaos_sf2_file","1220_FluidR3_GM_sf2_file","1220_GeneralUserGS_sf2_file","1220_JCLive_sf2_file","1220_SBLive_sf2","1220_SoundBlasterOld_sf2","1221_Aspirin_sf2_file","1221_GeneralUserGS_sf2_file","1221_JCLive_sf2_file","1222_Aspirin_sf2_file","1222_GeneralUserGS_sf2_file","1223_Aspirin_sf2_file","1223_GeneralUserGS_sf2_file","1224_Aspirin_sf2_file","1224_GeneralUserGS_sf2_file","1225_GeneralUserGS_sf2_file","1226_GeneralUserGS_sf2_file","1230_Aspirin_sf2_file","1230_Chaos_sf2_file","1230_FluidR3_GM_sf2_file","1230_GeneralUserGS_sf2_file","1230_JCLive_sf2_file","1230_SBLive_sf2","1230_SoundBlasterOld_sf2","1231_Aspirin_sf2_file","1231_GeneralUserGS_sf2_file","1232_Aspirin_sf2_file","1232_GeneralUserGS_sf2_file","1233_GeneralUserGS_sf2_file","1234_GeneralUserGS_sf2_file","1240_Aspirin_sf2_file","1240_Chaos_sf2_file","1240_FluidR3_GM_sf2_file","1240_GeneralUserGS_sf2_file","1240_JCLive_sf2_file","1240_SBLive_sf2","1240_SoundBlasterOld_sf2","1241_Aspirin_sf2_file","1241_GeneralUserGS_sf2_file","1242_Aspirin_sf2_file","1242_GeneralUserGS_sf2_file","1243_Aspirin_sf2_file","1243_GeneralUserGS_sf2_file","1244_Aspirin_sf2_file","1244_GeneralUserGS_sf2_file","1250_Aspirin_sf2_file","1250_Chaos_sf2_file","1250_FluidR3_GM_sf2_file","1250_GeneralUserGS_sf2_file","1250_JCLive_sf2_file","1250_SBLive_sf2","1250_SoundBlasterOld_sf2","1251_Aspirin_sf2_file","1251_FluidR3_GM_sf2_file","1251_GeneralUserGS_sf2_file","1252_Aspirin_sf2_file","1252_FluidR3_GM_sf2_file","1252_GeneralUserGS_sf2_file","1253_Aspirin_sf2_file","1253_GeneralUserGS_sf2_file","1254_Aspirin_sf2_file","1254_GeneralUserGS_sf2_file","1255_Aspirin_sf2_file","1255_GeneralUserGS_sf2_file","1256_Aspirin_sf2_file","1256_GeneralUserGS_sf2_file","1257_Aspirin_sf2_file","1257_GeneralUserGS_sf2_file","1258_Aspirin_sf2_file","1258_GeneralUserGS_sf2_file","1259_GeneralUserGS_sf2_file","1260_Aspirin_sf2_file","1260_Chaos_sf2_file","1260_FluidR3_GM_sf2_file","1260_GeneralUserGS_sf2_file","1260_JCLive_sf2_file","1260_SBLive_sf2","1260_SoundBlasterOld_sf2","1261_Aspirin_sf2_file","1261_GeneralUserGS_sf2_file","1262_Aspirin_sf2_file","1262_GeneralUserGS_sf2_file","1263_Aspirin_sf2_file","1263_GeneralUserGS_sf2_file","1264_Aspirin_sf2_file","1264_GeneralUserGS_sf2_file","1265_Aspirin_sf2_file","1265_GeneralUserGS_sf2_file","1270_Aspirin_sf2_file","1270_Chaos_sf2_file","1270_FluidR3_GM_sf2_file","1270_GeneralUserGS_sf2_file","1270_JCLive_sf2_file","1270_SBLive_sf2","1270_SoundBlasterOld_sf2","1271_Aspirin_sf2_file","1271_GeneralUserGS_sf2_file","1272_Aspirin_sf2_file","1272_GeneralUserGS_sf2_file","1273_GeneralUserGS_sf2_file","1274_GeneralUserGS_sf2_file"],drums=["35_0_Chaos_sf2_file","35_12_JCLive_sf2_file","35_16_JCLive_sf2_file","35_18_JCLive_sf2_file","35_4_Chaos_sf2_file","36_0_SBLive_sf2","36_12_JCLive_sf2_file","36_16_JCLive_sf2_file","36_18_JCLive_sf2_file","36_4_Chaos_sf2_file","37_0_SBLive_sf2","37_12_JCLive_sf2_file","37_16_JCLive_sf2_file","37_18_JCLive_sf2_file","37_4_Chaos_sf2_file","38_0_SBLive_sf2","38_12_JCLive_sf2_file","38_16_JCLive_sf2_file","38_18_JCLive_sf2_file","38_4_Chaos_sf2_file","39_0_SBLive_sf2","39_12_JCLive_sf2_file","39_16_JCLive_sf2_file","39_18_JCLive_sf2_file","39_4_Chaos_sf2_file","40_0_SBLive_sf2","40_12_JCLive_sf2_file","40_16_JCLive_sf2_file","40_18_JCLive_sf2_file","40_4_Chaos_sf2_file","41_0_SBLive_sf2","41_12_JCLive_sf2_file","41_16_JCLive_sf2_file","41_18_JCLive_sf2_file","41_4_Chaos_sf2_file","42_0_SBLive_sf2","42_12_JCLive_sf2_file","42_16_JCLive_sf2_file","42_18_JCLive_sf2_file","42_4_Chaos_sf2_file","43_0_SBLive_sf2","43_12_JCLive_sf2_file","43_16_JCLive_sf2_file","43_18_JCLive_sf2_file","43_4_Chaos_sf2_file","44_0_SBLive_sf2","44_12_JCLive_sf2_file","44_16_JCLive_sf2_file","44_18_JCLive_sf2_file","44_4_Chaos_sf2_file","45_0_SBLive_sf2","45_12_JCLive_sf2_file","45_16_JCLive_sf2_file","45_18_JCLive_sf2_file","45_4_Chaos_sf2_file","46_0_SBLive_sf2","46_12_JCLive_sf2_file","46_16_JCLive_sf2_file","46_18_JCLive_sf2_file","46_4_Chaos_sf2_file","47_0_SBLive_sf2","47_12_JCLive_sf2_file","47_16_JCLive_sf2_file","47_18_JCLive_sf2_file","47_4_Chaos_sf2_file","48_0_SBLive_sf2","48_12_JCLive_sf2_file","48_16_JCLive_sf2_file","48_18_JCLive_sf2_file","48_4_Chaos_sf2_file","49_0_SBLive_sf2","49_12_JCLive_sf2_file","49_16_JCLive_sf2_file","49_18_JCLive_sf2_file","49_4_Chaos_sf2_file","50_0_SBLive_sf2","50_12_JCLive_sf2_file","50_16_JCLive_sf2_file","50_18_JCLive_sf2_file","50_4_Chaos_sf2_file","51_0_SBLive_sf2","51_12_JCLive_sf2_file","51_16_JCLive_sf2_file","51_18_JCLive_sf2_file","51_4_Chaos_sf2_file","52_0_SBLive_sf2","52_12_JCLive_sf2_file","52_16_JCLive_sf2_file","52_18_JCLive_sf2_file","52_4_Chaos_sf2_file","53_0_SBLive_sf2","53_12_JCLive_sf2_file","53_16_JCLive_sf2_file","53_18_JCLive_sf2_file","53_4_Chaos_sf2_file","54_0_SBLive_sf2","54_12_JCLive_sf2_file","54_16_JCLive_sf2_file","54_18_JCLive_sf2_file","54_4_Chaos_sf2_file","55_0_SBLive_sf2","55_12_JCLive_sf2_file","55_16_JCLive_sf2_file","55_18_JCLive_sf2_file","55_4_Chaos_sf2_file","56_0_SBLive_sf2","56_12_JCLive_sf2_file","56_16_JCLive_sf2_file","56_18_JCLive_sf2_file","56_4_Chaos_sf2_file","57_0_SBLive_sf2","57_12_JCLive_sf2_file","57_16_JCLive_sf2_file","57_18_JCLive_sf2_file","57_4_Chaos_sf2_file","58_0_SBLive_sf2","58_12_JCLive_sf2_file","58_16_JCLive_sf2_file","58_18_JCLive_sf2_file","58_4_Chaos_sf2_file","59_0_SBLive_sf2","59_12_JCLive_sf2_file","59_16_JCLive_sf2_file","59_18_JCLive_sf2_file","59_4_Chaos_sf2_file","60_0_SBLive_sf2","60_12_JCLive_sf2_file","60_16_JCLive_sf2_file","60_18_JCLive_sf2_file","60_4_Chaos_sf2_file","61_0_SBLive_sf2","61_12_JCLive_sf2_file","61_16_JCLive_sf2_file","61_18_JCLive_sf2_file","61_4_Chaos_sf2_file","62_0_SBLive_sf2","62_12_JCLive_sf2_file","62_16_JCLive_sf2_file","62_18_JCLive_sf2_file","62_4_Chaos_sf2_file","63_0_SBLive_sf2","63_12_JCLive_sf2_file","63_16_JCLive_sf2_file","63_18_JCLive_sf2_file","63_4_Chaos_sf2_file","64_0_SBLive_sf2","64_12_JCLive_sf2_file","64_16_JCLive_sf2_file","64_18_JCLive_sf2_file","64_4_Chaos_sf2_file","65_0_SBLive_sf2","65_12_JCLive_sf2_file","65_16_JCLive_sf2_file","65_18_JCLive_sf2_file","65_4_Chaos_sf2_file","66_0_SBLive_sf2","66_12_JCLive_sf2_file","66_16_JCLive_sf2_file","66_18_JCLive_sf2_file","66_4_Chaos_sf2_file","67_0_SBLive_sf2","67_12_JCLive_sf2_file","67_16_JCLive_sf2_file","67_18_JCLive_sf2_file","67_4_Chaos_sf2_file","68_0_SBLive_sf2","68_12_JCLive_sf2_file","68_16_JCLive_sf2_file","68_18_JCLive_sf2_file","68_4_Chaos_sf2_file","69_0_SBLive_sf2","69_12_JCLive_sf2_file","69_16_JCLive_sf2_file","69_18_JCLive_sf2_file","69_4_Chaos_sf2_file","70_0_SBLive_sf2","70_12_JCLive_sf2_file","70_16_JCLive_sf2_file","70_18_JCLive_sf2_file","70_4_Chaos_sf2_file","71_0_SBLive_sf2","71_12_JCLive_sf2_file","71_16_JCLive_sf2_file","71_18_JCLive_sf2_file","71_4_Chaos_sf2_file","72_0_SBLive_sf2","72_12_JCLive_sf2_file","72_16_JCLive_sf2_file","72_18_JCLive_sf2_file","72_4_Chaos_sf2_file","73_0_SBLive_sf2","73_12_JCLive_sf2_file","73_16_JCLive_sf2_file","73_18_JCLive_sf2_file","73_4_Chaos_sf2_file","74_0_SBLive_sf2","74_12_JCLive_sf2_file","74_16_JCLive_sf2_file","74_18_JCLive_sf2_file","74_4_Chaos_sf2_file","75_0_SBLive_sf2","75_12_JCLive_sf2_file","75_16_JCLive_sf2_file","75_18_JCLive_sf2_file","75_4_Chaos_sf2_file","76_0_SBLive_sf2","76_12_JCLive_sf2_file","76_16_JCLive_sf2_file","76_18_JCLive_sf2_file","76_4_Chaos_sf2_file","77_0_SBLive_sf2","77_12_JCLive_sf2_file","77_16_JCLive_sf2_file","77_18_JCLive_sf2_file","77_4_Chaos_sf2_file","78_0_SBLive_sf2","78_12_JCLive_sf2_file","78_16_JCLive_sf2_file","78_18_JCLive_sf2_file","78_4_Chaos_sf2_file","79_0_SBLive_sf2","79_12_JCLive_sf2_file","79_16_JCLive_sf2_file","79_18_JCLive_sf2_file","79_4_Chaos_sf2_file","80_0_SBLive_sf2","80_12_JCLive_sf2_file","80_16_JCLive_sf2_file","80_18_JCLive_sf2_file","80_4_Chaos_sf2_file","81_0_SBLive_sf2","81_12_JCLive_sf2_file","81_16_JCLive_sf2_file","81_18_JCLive_sf2_file","81_4_Chaos_sf2_file"],instrumentNames=[];instrumentNames[0]="Acoustic Grand Piano: Piano";instrumentNames[1]="Bright Acoustic Piano: Piano";instrumentNames[2]="Electric Grand Piano: Piano";instrumentNames[3]="Honky-tonk Piano: Piano";instrumentNames[4]="Electric Piano 1: Piano";instrumentNames[5]="Electric Piano 2: Piano";instrumentNames[6]="Harpsichord: Piano";instrumentNames[7]="Clavinet: Piano";instrumentNames[8]="Celesta: Chromatic Percussion";instrumentNames[9]="Glockenspiel: Chromatic Percussion";instrumentNames[10]="Music Box: Chromatic Percussion";instrumentNames[11]="Vibraphone: Chromatic Percussion";instrumentNames[12]="Marimba: Chromatic Percussion";instrumentNames[13]="Xylophone: Chromatic Percussion";instrumentNames[14]="Tubular Bells: Chromatic Percussion";instrumentNames[15]="Dulcimer: Chromatic Percussion";instrumentNames[16]="Drawbar Organ: Organ";instrumentNames[17]="Percussive Organ: Organ";instrumentNames[18]="Rock Organ: Organ";instrumentNames[19]="Church Organ: Organ";instrumentNames[20]="Reed Organ: Organ";instrumentNames[21]="Accordion: Organ";instrumentNames[22]="Harmonica: Organ";instrumentNames[23]="Tango Accordion: Organ";instrumentNames[24]="Acoustic Guitar (nylon): Guitar";instrumentNames[25]="Acoustic Guitar (steel): Guitar";instrumentNames[26]="Electric Guitar (jazz): Guitar";instrumentNames[27]="Electric Guitar (clean): Guitar";instrumentNames[28]="Electric Guitar (muted): Guitar";instrumentNames[29]="Overdriven Guitar: Guitar";instrumentNames[30]="Distortion Guitar: Guitar";instrumentNames[31]="Guitar Harmonics: Guitar";instrumentNames[32]="Acoustic Bass: Bass";instrumentNames[33]="Electric Bass (finger): Bass";instrumentNames[34]="Electric Bass (pick): Bass";instrumentNames[35]="Fretless Bass: Bass";instrumentNames[36]="Slap Bass 1: Bass";instrumentNames[37]="Slap Bass 2: Bass";instrumentNames[38]="Synth Bass 1: Bass";instrumentNames[39]="Synth Bass 2: Bass";instrumentNames[40]="Violin: Strings";instrumentNames[41]="Viola: Strings";instrumentNames[42]="Cello: Strings";instrumentNames[43]="Contrabass: Strings";instrumentNames[44]="Tremolo Strings: Strings";instrumentNames[45]="Pizzicato Strings: Strings";instrumentNames[46]="Orchestral Harp: Strings";instrumentNames[47]="Timpani: Strings";instrumentNames[48]="String Ensemble 1: Ensemble";instrumentNames[49]="String Ensemble 2: Ensemble";instrumentNames[50]="Synth Strings 1: Ensemble";instrumentNames[51]="Synth Strings 2: Ensemble";instrumentNames[52]="Choir Aahs: Ensemble";instrumentNames[53]="Voice Oohs: Ensemble";instrumentNames[54]="Synth Choir: Ensemble";instrumentNames[55]="Orchestra Hit: Ensemble";instrumentNames[56]="Trumpet: Brass";instrumentNames[57]="Trombone: Brass";instrumentNames[58]="Tuba: Brass";instrumentNames[59]="Muted Trumpet: Brass";instrumentNames[60]="French Horn: Brass";instrumentNames[61]="Brass Section: Brass";instrumentNames[62]="Synth Brass 1: Brass";instrumentNames[63]="Synth Brass 2: Brass";instrumentNames[64]="Soprano Sax: Reed";instrumentNames[65]="Alto Sax: Reed";instrumentNames[66]="Tenor Sax: Reed";instrumentNames[67]="Baritone Sax: Reed";instrumentNames[68]="Oboe: Reed";instrumentNames[69]="English Horn: Reed";instrumentNames[70]="Bassoon: Reed";instrumentNames[71]="Clarinet: Reed";instrumentNames[72]="Piccolo: Pipe";instrumentNames[73]="Flute: Pipe";instrumentNames[74]="Recorder: Pipe";instrumentNames[75]="Pan Flute: Pipe";instrumentNames[76]="Blown bottle: Pipe";instrumentNames[77]="Shakuhachi: Pipe";instrumentNames[78]="Whistle: Pipe";instrumentNames[79]="Ocarina: Pipe";instrumentNames[80]="Lead 1 (square): Synth Lead";instrumentNames[81]="Lead 2 (sawtooth): Synth Lead";instrumentNames[82]="Lead 3 (calliope): Synth Lead";instrumentNames[83]="Lead 4 (chiff): Synth Lead";instrumentNames[84]="Lead 5 (charang): Synth Lead";instrumentNames[85]="Lead 6 (voice): Synth Lead";instrumentNames[86]="Lead 7 (fifths): Synth Lead";instrumentNames[87]="Lead 8 (bass + lead): Synth Lead";instrumentNames[88]="Pad 1 (new age): Synth Pad";instrumentNames[89]="Pad 2 (warm): Synth Pad";instrumentNames[90]="Pad 3 (polysynth): Synth Pad";instrumentNames[91]="Pad 4 (choir): Synth Pad";instrumentNames[92]="Pad 5 (bowed): Synth Pad";instrumentNames[93]="Pad 6 (metallic): Synth Pad";instrumentNames[94]="Pad 7 (halo): Synth Pad";instrumentNames[95]="Pad 8 (sweep): Synth Pad";instrumentNames[96]="FX 1 (rain): Synth Effects";instrumentNames[97]="FX 2 (soundtrack): Synth Effects";instrumentNames[98]="FX 3 (crystal): Synth Effects";instrumentNames[99]="FX 4 (atmosphere): Synth Effects";instrumentNames[100]="FX 5 (brightness): Synth Effects";instrumentNames[101]="FX 6 (goblins): Synth Effects";instrumentNames[102]="FX 7 (echoes): Synth Effects";instrumentNames[103]="FX 8 (sci-fi): Synth Effects";instrumentNames[104]="Sitar: Ethnic";instrumentNames[105]="Banjo: Ethnic";instrumentNames[106]="Shamisen: Ethnic";instrumentNames[107]="Koto: Ethnic";instrumentNames[108]="Kalimba: Ethnic";instrumentNames[109]="Bagpipe: Ethnic";instrumentNames[110]="Fiddle: Ethnic";instrumentNames[111]="Shanai: Ethnic";instrumentNames[112]="Tinkle Bell: Percussive";instrumentNames[113]="Agogo: Percussive";instrumentNames[114]="Steel Drums: Percussive";instrumentNames[115]="Woodblock: Percussive";instrumentNames[116]="Taiko Drum: Percussive";instrumentNames[117]="Melodic Tom: Percussive";instrumentNames[118]="Synth Drum: Percussive";instrumentNames[119]="Reverse Cymbal: Percussive";instrumentNames[120]="Guitar Fret Noise: Sound effects";instrumentNames[121]="Breath Noise: Sound effects";instrumentNames[122]="Seashore: Sound effects";instrumentNames[123]="Bird Tweet: Sound effects";instrumentNames[124]="Telephone Ring: Sound effects";instrumentNames[125]="Helicopter: Sound effects";instrumentNames[126]="Applause: Sound effects";instrumentNames[127]="Gunshot: Sound effects";const list=Object.freeze(Object.defineProperty({__proto__:null,instruments,drums,instrumentNames},Symbol.toStringTag,{value:"Module"}));var SoundFont2={exports:{}};(function(h,y){(function(S,n){h.exports=n()})(window,function(){return function(S){var n={};function e(f){if(n[f])return n[f].exports;var i=n[f]={i:f,l:!1,exports:{}};return S[f].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=S,e.c=n,e.d=function(f,i,l){e.o(f,i)||Object.defineProperty(f,i,{enumerable:!0,get:l})},e.r=function(f){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(f,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(f,"__esModule",{value:!0})},e.t=function(f,i){if(1&i&&(f=e(f)),8&i||4&i&&typeof f=="object"&&f&&f.__esModule)return f;var l=Object.create(null);if(e.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:f}),2&i&&typeof f!="string")for(var t in f)e.d(l,t,function(s){return f[s]}.bind(null,t));return l},e.n=function(f){var i=f&&f.__esModule?function(){return f.default}:function(){return f};return e.d(i,"a",i),i},e.o=function(f,i){return Object.prototype.hasOwnProperty.call(f,i)},e.p="",e(e.s="./src/index.ts")}({"./src/chunk.ts":function(S,n,e){e.r(n),e.d(n,"SF2Chunk",function(){return r});var f=e("./src/riff/index.ts"),i=e("./src/constants.ts"),l=e("./src/chunks/index.ts");function t(u){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(u)}function s(u,o){for(var d=0;d<o.length;d++){var a=o[d];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(u,a.key,a)}}function c(u){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(u)}function v(u,o){return(v=Object.setPrototypeOf||function(d,a){return d.__proto__=a,d})(u,o)}function p(u){if(u===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u}var r=function(u){function o(L){var g,U,B,F,M,O;return function(R,E){if(!(R instanceof E))throw new TypeError("Cannot call a class as a function")}(this,o),U=this,g=!(B=c(o).call(this,L.id,L.length,L.buffer,L.subChunks))||t(B)!=="object"&&typeof B!="function"?p(U):B,F=p(p(g)),O=void 0,(M="subChunks")in F?Object.defineProperty(F,M,{value:O,enumerable:!0,configurable:!0,writable:!0}):F[M]=O,g.subChunks=L.subChunks.map(function(R){return new o(R)}),g}var d,a;return function(L,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function");L.prototype=Object.create(g&&g.prototype,{constructor:{value:L,writable:!0,configurable:!0}}),g&&v(L,g)}(o,f.RIFFChunk),d=o,(a=[{key:"getMetaData",value:function(){if(this.id!=="LIST")throw new f.ParseError("Unexpected chunk ID","'LIST'","'".concat(this.id,"'"));var L=this.subChunks.reduce(function(g,U){if(U.id==="ifil"||U.id==="iver"){if(U.length!==i.SF_VERSION_LENGTH)throw new f.ParseError("Invalid size for the '".concat(U.id,"' sub-chunk"));g[U.id]="".concat(U.getInt16(),".").concat(U.getInt16(2))}else g[U.id]=U.getString();return g},{});if(!L.ifil)throw new f.ParseError("Missing required 'ifil' sub-chunk");if(!L.INAM)throw new f.ParseError("Missing required 'INAM' sub-chunk");return{version:L.ifil,soundEngine:L.isng||"EMU8000",name:L.INAM,rom:L.irom,romVersion:L.iver,creationDate:L.ICRD,author:L.IENG,product:L.IPRD,copyright:L.ICOP,comments:L.ICMT,createdBy:L.ISFT}}},{key:"getSampleData",value:function(){if(this.id!=="LIST")throw new f.ParseError("Unexpected chunk ID","'LIST'","'".concat(this.id,"'"));var L=this.subChunks[0];if(L.id!=="smpl")throw new f.ParseError("Invalid chunk signature","'smpl'","'".concat(L.id,"'"));return L.buffer}},{key:"getPresetData",value:function(){if(this.id!=="LIST")throw new f.ParseError("Unexpected chunk ID","'LIST'","'".concat(this.id,"'"));return{presetHeaders:Object(l.getPresetHeaders)(this.subChunks[0]),presetZones:Object(l.getZones)(this.subChunks[1],"pbag"),presetModulators:Object(l.getModulators)(this.subChunks[2],"pmod"),presetGenerators:Object(l.getGenerators)(this.subChunks[3],"pgen"),instrumentHeaders:Object(l.getInstrumentHeaders)(this.subChunks[4]),instrumentZones:Object(l.getZones)(this.subChunks[5],"ibag"),instrumentModulators:Object(l.getModulators)(this.subChunks[6],"imod"),instrumentGenerators:Object(l.getGenerators)(this.subChunks[7],"igen"),sampleHeaders:Object(l.getSampleHeaders)(this.subChunks[8])}}}])&&s(d.prototype,a),o}()},"./src/chunks/generators.ts":function(S,n,e){e.r(n),e.d(n,"getGenerators",function(){return v});var f=e("./src/riff/index.ts"),i=e("./src/types/index.ts"),l=e("./src/constants.ts"),t=[i.GeneratorType.StartAddrsOffset,i.GeneratorType.EndAddrsOffset,i.GeneratorType.StartLoopAddrsOffset,i.GeneratorType.EndLoopAddrsOffset,i.GeneratorType.StartAddrsCoarseOffset,i.GeneratorType.EndAddrsCoarseOffset,i.GeneratorType.StartLoopAddrsCoarseOffset,i.GeneratorType.KeyNum,i.GeneratorType.Velocity,i.GeneratorType.EndLoopAddrsCoarseOffset,i.GeneratorType.SampleModes,i.GeneratorType.ExclusiveClass,i.GeneratorType.OverridingRootKey],s=[i.GeneratorType.Unused1,i.GeneratorType.Unused2,i.GeneratorType.Unused3,i.GeneratorType.Unused4,i.GeneratorType.Reserved1,i.GeneratorType.Reserved2,i.GeneratorType.Reserved3],c=[i.GeneratorType.KeyRange,i.GeneratorType.VelRange],v=function(p,r){if(p.id!==r)throw new f.ParseError("Unexpected chunk ID","'".concat(r,"'"),"'".concat(p.id,"'"));if(p.length%l.SF_GENERATOR_SIZE)throw new f.ParseError("Invalid size for the '".concat(r,"' sub-chunk"));return p.iterate(function(u){var o=u.getInt16();return i.GeneratorType[o]?r==="pgen"&&t.includes(o)||r==="igen"&&s.includes(o)?null:c.includes(o)?{id:o,range:{lo:u.getByte(),hi:u.getByte()}}:{id:o,value:u.getInt16BE()}:null})}},"./src/chunks/index.ts":function(S,n,e){e.r(n);var f=e("./src/chunks/instruments/index.ts");e.d(n,"getInstrumentHeaders",function(){return f.getInstrumentHeaders});var i=e("./src/chunks/presets/index.ts");e.d(n,"getPresetHeaders",function(){return i.getPresetHeaders});var l=e("./src/chunks/samples/index.ts");e.d(n,"getSampleHeaders",function(){return l.getSampleHeaders});var t=e("./src/chunks/generators.ts");e.d(n,"getGenerators",function(){return t.getGenerators});var s=e("./src/chunks/modulators.ts");e.d(n,"getModulators",function(){return s.getModulators});var c=e("./src/chunks/zones.ts");e.d(n,"getZones",function(){return c.getZones}),e.d(n,"getItemsInZone",function(){return c.getItemsInZone})},"./src/chunks/instruments/headers.ts":function(S,n,e){e.r(n),e.d(n,"getInstrumentHeaders",function(){return l});var f=e("./src/riff/index.ts"),i=e("./src/constants.ts"),l=function(t){if(t.id!=="inst")throw new f.ParseError("Unexpected chunk ID","'inst'","'".concat(t.id,"'"));if(t.length%i.SF_INSTRUMENT_HEADER_SIZE)throw new f.ParseError("Invalid size for the 'inst' sub-chunk");return t.iterate(function(s){return{name:s.getString(),bagIndex:s.getInt16()}})}},"./src/chunks/instruments/index.ts":function(S,n,e){e.r(n);var f=e("./src/chunks/instruments/headers.ts");e.d(n,"getInstrumentHeaders",function(){return f.getInstrumentHeaders})},"./src/chunks/modulators.ts":function(S,n,e){e.r(n),e.d(n,"getModulators",function(){return t});var f=e("./src/riff/index.ts"),i=e("./src/constants.ts"),l=function(s){return{type:s>>10&63,polarity:s>>9&1,direction:s>>8&1,palette:s>>7&1,index:127&s}},t=function(s,c){if(s.id!==c)throw new f.ParseError("Unexpected chunk ID","'".concat(c,"'"),"'".concat(s.id,"'"));if(s.length%i.SF_MODULATOR_SIZE)throw new f.ParseError("Invalid size for the '".concat(c,"' sub-chunk"));return s.iterate(function(v){return{source:l(v.getInt16BE()),id:v.getInt16BE(),value:v.getInt16BE(),valueSource:l(v.getInt16BE()),transform:v.getInt16BE()}})}},"./src/chunks/presets/headers.ts":function(S,n,e){e.r(n),e.d(n,"getPresetHeaders",function(){return l});var f=e("./src/riff/index.ts"),i=e("./src/constants.ts"),l=function(t){if(t.id!=="phdr")throw new f.ParseError("Invalid chunk ID","'phdr'","'".concat(t.id,"'"));if(t.length%i.SF_PRESET_HEADER_SIZE)throw new f.ParseError("Invalid size for the 'phdr' sub-chunk");return t.iterate(function(s){return{name:s.getString(),preset:s.getInt16(),bank:s.getInt16(),bagIndex:s.getInt16(),library:s.getUInt32(),genre:s.getUInt32(),morphology:s.getUInt32()}})}},"./src/chunks/presets/index.ts":function(S,n,e){e.r(n);var f=e("./src/chunks/presets/headers.ts");e.d(n,"getPresetHeaders",function(){return f.getPresetHeaders})},"./src/chunks/samples/headers.ts":function(S,n,e){e.r(n),e.d(n,"getSampleHeaders",function(){return l});var f=e("./src/riff/index.ts"),i=e("./src/constants.ts"),l=function(t){if(t.id!=="shdr")throw new f.ParseError("Unexpected chunk ID","'shdr'","'".concat(t.id,"'"));if(t.length%i.SF_SAMPLE_HEADER_SIZE)throw new f.ParseError("Invalid size for the 'shdr' sub-chunk");return t.iterate(function(s){return{name:s.getString(),start:s.getUInt32(),end:s.getUInt32(),startLoop:s.getUInt32(),endLoop:s.getUInt32(),sampleRate:s.getUInt32(),originalPitch:s.getByte(),pitchCorrection:s.getChar(),link:s.getInt16(),type:s.getInt16()}})}},"./src/chunks/samples/index.ts":function(S,n,e){e.r(n);var f=e("./src/chunks/samples/headers.ts");e.d(n,"getSampleHeaders",function(){return f.getSampleHeaders})},"./src/chunks/zones.ts":function(S,n,e){e.r(n),e.d(n,"getZones",function(){return t}),e.d(n,"getItemsInZone",function(){return s});var f=e("./src/riff/index.ts"),i=e("./src/constants.ts"),l=e("./src/types/index.ts"),t=function(r,u){if(r.id!==u)throw new f.ParseError("Unexpected chunk ID","'".concat(u,"'"),"'".concat(r.id,"'"));if(r.length%i.SF_BAG_SIZE)throw new f.ParseError("Invalid size for the '".concat(u,"' sub-chunk"));return r.iterate(function(o){return{generatorIndex:o.getInt16(),modulatorIndex:o.getInt16()}})},s=function(r,u,o,d,a,L){for(var g=[],U=0;U<r.length;U++){for(var B=r[U],F=r[U+1],M=B.bagIndex,O=F?F.bagIndex:u.length,R=[],E=void 0,A=M;A<O;A++){var k=c(A,u,o),b=v(A,u,d),P=b[l.GeneratorType.KeyRange]&&b[l.GeneratorType.KeyRange].range,N=b[L];if(N){var I=a[N.value];I&&R.push({keyRange:P,modulators:k,generators:b,reference:I})}else A-M==0&&(E={keyRange:P,modulators:k,generators:b})}g.push({header:B,globalZone:E,zones:R})}return g},c=function(r,u,o){var d=u[r],a=u[r+1],L=d.modulatorIndex,g=a?a.modulatorIndex:u.length;return p(L,g,o)},v=function(r,u,o){var d=u[r],a=u[r+1],L=d.generatorIndex,g=a?a.generatorIndex:u.length;return p(L,g,o)},p=function(r,u,o){for(var d={},a=r;a<u;a++){var L=o[a];L&&(d[L.id]=L)}return d}},"./src/constants.ts":function(S,n,e){e.r(n),e.d(n,"SF_VERSION_LENGTH",function(){return f}),e.d(n,"SF_PRESET_HEADER_SIZE",function(){return i}),e.d(n,"SF_BAG_SIZE",function(){return l}),e.d(n,"SF_MODULATOR_SIZE",function(){return t}),e.d(n,"SF_GENERATOR_SIZE",function(){return s}),e.d(n,"SF_INSTRUMENT_HEADER_SIZE",function(){return c}),e.d(n,"SF_SAMPLE_HEADER_SIZE",function(){return v}),e.d(n,"DEFAULT_SAMPLE_RATE",function(){return p});var f=4,i=38,l=4,t=10,s=4,c=22,v=46,p=22050},"./src/index.ts":function(S,n,e){e.r(n);var f=e("./src/types/index.ts");for(var i in f)i!=="default"&&function(c){e.d(n,c,function(){return f[c]})}(i);var l=e("./src/chunk.ts");e.d(n,"SF2Chunk",function(){return l.SF2Chunk});var t=e("./src/constants.ts");e.d(n,"SF_VERSION_LENGTH",function(){return t.SF_VERSION_LENGTH}),e.d(n,"SF_PRESET_HEADER_SIZE",function(){return t.SF_PRESET_HEADER_SIZE}),e.d(n,"SF_BAG_SIZE",function(){return t.SF_BAG_SIZE}),e.d(n,"SF_MODULATOR_SIZE",function(){return t.SF_MODULATOR_SIZE}),e.d(n,"SF_GENERATOR_SIZE",function(){return t.SF_GENERATOR_SIZE}),e.d(n,"SF_INSTRUMENT_HEADER_SIZE",function(){return t.SF_INSTRUMENT_HEADER_SIZE}),e.d(n,"SF_SAMPLE_HEADER_SIZE",function(){return t.SF_SAMPLE_HEADER_SIZE}),e.d(n,"DEFAULT_SAMPLE_RATE",function(){return t.DEFAULT_SAMPLE_RATE});var s=e("./src/soundFont2.ts");e.d(n,"SoundFont2",function(){return s.SoundFont2})},"./src/riff/chunkIterator.ts":function(S,n,e){e.r(n),e.d(n,"ChunkIterator",function(){return t});var f=e("./src/utils/index.ts");function i(s,c){for(var v=0;v<c.length;v++){var p=c[v];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(s,p.key,p)}}function l(s,c,v){return c in s?Object.defineProperty(s,c,{value:v,enumerable:!0,configurable:!0,writable:!0}):s[c]=v,s}var t=function(){function s(p){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;(function(u,o){if(!(u instanceof o))throw new TypeError("Cannot call a class as a function")})(this,s),l(this,"target",[]),l(this,"chunk",void 0),l(this,"position",0),this.chunk=p,this.position=r}var c,v;return c=s,(v=[{key:"iterate",value:function(p){for(;this.position<this.chunk.length;){var r=p(this);r&&this.target.push(r)}}},{key:"getString",value:function(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:20,r=Object(f.getStringFromBuffer)(this.getBuffer(this.position,p));return this.position+=p,r}},{key:"getInt16",value:function(){return this.chunk.buffer[this.position++]|this.chunk.buffer[this.position++]<<8}},{key:"getInt16BE",value:function(){return this.getInt16()<<16>>16}},{key:"getUInt32",value:function(){return(this.chunk.buffer[this.position++]|this.chunk.buffer[this.position++]<<8|this.chunk.buffer[this.position++]<<16|this.chunk.buffer[this.position++]<<24)>>>0}},{key:"getByte",value:function(){return this.chunk.buffer[this.position++]}},{key:"getChar",value:function(){return this.chunk.buffer[this.position++]<<24>>24}},{key:"skip",value:function(p){this.position+=p}},{key:"getBuffer",value:function(p,r){return this.chunk.buffer.subarray(p,p+r)}},{key:"currentPosition",get:function(){return this.position}}])&&i(c.prototype,v),s}()},"./src/riff/index.ts":function(S,n,e){e.r(n);var f=e("./src/riff/chunkIterator.ts");e.d(n,"ChunkIterator",function(){return f.ChunkIterator});var i=e("./src/riff/parseError.ts");e.d(n,"ParseError",function(){return i.ParseError});var l=e("./src/riff/parser.ts");e.d(n,"parseBuffer",function(){return l.parseBuffer}),e.d(n,"getChunk",function(){return l.getChunk}),e.d(n,"getChunkLength",function(){return l.getChunkLength}),e.d(n,"getSubChunks",function(){return l.getSubChunks}),e.d(n,"getChunkId",function(){return l.getChunkId});var t=e("./src/riff/riffChunk.ts");e.d(n,"RIFFChunk",function(){return t.RIFFChunk})},"./src/riff/parseError.ts":function(S,n,e){function f(p){return(f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(p)}function i(p,r){return!r||f(r)!=="object"&&typeof r!="function"?function(u){if(u===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u}(p):r}function l(p){var r=typeof Map=="function"?new Map:void 0;return(l=function(u){if(u===null||(o=u,Function.toString.call(o).indexOf("[native code]")===-1))return u;var o;if(typeof u!="function")throw new TypeError("Super expression must either be null or a function");if(r!==void 0){if(r.has(u))return r.get(u);r.set(u,d)}function d(){return t(u,arguments,c(this).constructor)}return d.prototype=Object.create(u.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),s(d,u)})(p)}function t(p,r,u){return(t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}()?Reflect.construct:function(o,d,a){var L=[null];L.push.apply(L,d);var g=new(Function.bind.apply(o,L));return a&&s(g,a.prototype),g}).apply(null,arguments)}function s(p,r){return(s=Object.setPrototypeOf||function(u,o){return u.__proto__=o,u})(p,r)}function c(p){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(p)}e.r(n),e.d(n,"ParseError",function(){return v});var v=function(p){function r(u,o,d){return function(a,L){if(!(a instanceof L))throw new TypeError("Cannot call a class as a function")}(this,r),i(this,c(r).call(this,"".concat(u).concat(o&&d?", expected ".concat(o,", received ").concat(d):"")))}return function(u,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(o&&o.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),o&&s(u,o)}(r,l(Error)),r}()},"./src/riff/parser.ts":function(S,n,e){e.r(n),e.d(n,"parseBuffer",function(){return t}),e.d(n,"getChunk",function(){return s}),e.d(n,"getChunkLength",function(){return c}),e.d(n,"getSubChunks",function(){return v}),e.d(n,"getChunkId",function(){return p});var f=e("./src/riff/parseError.ts"),i=e("./src/utils/buffer.ts"),l=e("./src/riff/riffChunk.ts"),t=function(r){var u=p(r);if(u!=="RIFF")throw new f.ParseError("Invalid file format","RIFF",u);var o=p(r,8);if(o!=="sfbk")throw new f.ParseError("Invalid signature","sfbk",o);var d=r.subarray(8),a=v(d.subarray(4));return new l.RIFFChunk(u,d.length,d,a)},s=function(r,u){var o=p(r,u),d=c(r,u+4),a=[];return o!=="RIFF"&&o!=="LIST"||(a=v(r.subarray(u+12))),new l.RIFFChunk(o,d,r.subarray(u+8),a)},c=function(r,u){return((r=r.subarray(u,u+4))[0]|r[1]<<8|r[2]<<16|r[3]<<24)>>>0},v=function(r){for(var u=[],o=0;o<=r.length-8;){var d=s(r,o);u.push(d),o=(o+=8+d.length)%2?o+1:o}return u},p=function(r){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Object(i.getStringFromBuffer)(r.subarray(u,u+4))}},"./src/riff/riffChunk.ts":function(S,n,e){e.r(n),e.d(n,"RIFFChunk",function(){return s});var f=e("./src/riff/chunkIterator.ts"),i=e("./src/utils/index.ts");function l(c,v){for(var p=0;p<v.length;p++){var r=v[p];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(c,r.key,r)}}function t(c,v,p){return v in c?Object.defineProperty(c,v,{value:p,enumerable:!0,configurable:!0,writable:!0}):c[v]=p,c}var s=function(){function c(r,u,o,d){(function(a,L){if(!(a instanceof L))throw new TypeError("Cannot call a class as a function")})(this,c),t(this,"id",void 0),t(this,"length",void 0),t(this,"buffer",void 0),t(this,"subChunks",void 0),this.id=r,this.length=u,this.buffer=o,this.subChunks=d}var v,p;return v=c,(p=[{key:"getString",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,u=arguments.length>1?arguments[1]:void 0;return Object(i.getStringFromBuffer)(this.getBuffer(r,u||this.length-r))}},{key:"getInt16",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return this.buffer[r++]|this.buffer[r]<<8}},{key:"getUInt32",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return(this.buffer[r++]|this.buffer[r++]<<8|this.buffer[r++]<<16|this.buffer[r]<<24)>>>0}},{key:"getByte",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return this.buffer[r]}},{key:"getChar",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return this.buffer[r]<<24>>24}},{key:"iterator",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return new f.ChunkIterator(this,r)}},{key:"iterate",value:function(r){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=new f.ChunkIterator(this,u);return o.iterate(r),o.target}},{key:"getBuffer",value:function(r,u){return this.buffer.subarray(r,r+u)}}])&&l(v.prototype,p),c}()},"./src/soundFont2.ts":function(S,n,e){e.r(n),e.d(n,"SoundFont2",function(){return u});var f=e("./src/types/index.ts"),i=e("./src/chunk.ts"),l=e("./src/riff/index.ts"),t=e("./src/chunks/index.ts"),s=e("./src/utils/index.ts");function c(o){for(var d=1;d<arguments.length;d++){var a=arguments[d]!=null?arguments[d]:{},L=Object.keys(a);typeof Object.getOwnPropertySymbols=="function"&&(L=L.concat(Object.getOwnPropertySymbols(a).filter(function(g){return Object.getOwnPropertyDescriptor(a,g).enumerable}))),L.forEach(function(g){r(o,g,a[g])})}return o}function v(o,d){for(var a=0;a<d.length;a++){var L=d[a];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(o,L.key,L)}}function p(o,d,a){return d&&v(o.prototype,d),a&&v(o,a),o}function r(o,d,a){return d in o?Object.defineProperty(o,d,{value:a,enumerable:!0,configurable:!0,writable:!0}):o[d]=a,o}var u=function(){function o(d){if(function(L,g){if(!(L instanceof g))throw new TypeError("Cannot call a class as a function")}(this,o),r(this,"chunk",void 0),r(this,"metaData",void 0),r(this,"sampleData",void 0),r(this,"samples",void 0),r(this,"presetData",void 0),r(this,"instruments",void 0),r(this,"presets",void 0),r(this,"banks",void 0),!(d instanceof i.SF2Chunk)){var a=Object(l.parseBuffer)(d);d=new i.SF2Chunk(a)}if(d.subChunks.length!==3)throw new l.ParseError("Invalid sfbk structure","3 chunks","".concat(d.subChunks.length," chunks"));this.chunk=d,this.metaData=d.subChunks[0].getMetaData(),this.sampleData=d.subChunks[1].getSampleData(),this.presetData=d.subChunks[2].getPresetData(),this.samples=this.getSamples(),this.instruments=this.getInstruments(),this.presets=this.getPresets(),this.banks=this.getBanks()}return p(o,null,[{key:"from",value:function(d){return new o(d)}}]),p(o,[{key:"getKeyData",value:function(d){var a=this,L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return Object(s.memoize)(function(U,B,F){var M=a.banks[B];if(M){var O=M.presets[F];if(O){var R=O.zones.find(function(N){return a.isKeyInRange(N,U)});if(R){var E=R.instrument,A=E.zones.find(function(N){return a.isKeyInRange(N,U)});if(A){var k=A.sample,b=c({},R.generators,A.generators),P=c({},R.modulators,A.modulators);return{keyNumber:U,preset:O,instrument:E,sample:k,generators:b,modulators:P}}}}}return null})(d,L,g)}},{key:"isKeyInRange",value:function(d,a){return d.keyRange===void 0||d.keyRange.lo<=a&&d.keyRange.hi>=a}},{key:"getBanks",value:function(){return this.presets.reduce(function(d,a){var L=a.header.bank;return d[L]||(d[L]={presets:[]}),d[L].presets[a.header.preset]=a,d},[])}},{key:"getPresets",value:function(){var d=this.presetData,a=d.presetHeaders,L=d.presetZones,g=d.presetGenerators,U=d.presetModulators;return Object(t.getItemsInZone)(a,L,U,g,this.instruments,f.GeneratorType.Instrument).filter(function(B){return B.header.name!=="EOP"}).map(function(B){return{header:B.header,globalZone:B.globalZone,zones:B.zones.map(function(F){return{keyRange:F.keyRange,generators:F.generators,modulators:F.modulators,instrument:F.reference}})}})}},{key:"getInstruments",value:function(){var d=this.presetData,a=d.instrumentHeaders,L=d.instrumentZones,g=d.instrumentModulators,U=d.instrumentGenerators;return Object(t.getItemsInZone)(a,L,g,U,this.samples,f.GeneratorType.SampleId).filter(function(B){return B.header.name!=="EOI"}).map(function(B){return{header:B.header,globalZone:B.globalZone,zones:B.zones.map(function(F){return{keyRange:F.keyRange,generators:F.generators,modulators:F.modulators,sample:F.reference}})}})}},{key:"getSamples",value:function(){var d=this;return this.presetData.sampleHeaders.filter(function(a){return a.name!=="EOS"}).map(function(a){if(a.name!=="EOS"&&a.sampleRate<=0)throw new Error("Illegal sample rate of ".concat(a.sampleRate," hz in sample '").concat(a.name,"'"));return a.originalPitch>=128&&a.originalPitch<=254&&(a.originalPitch=60),a.startLoop-=a.start,a.endLoop-=a.start,{header:a,data:new Int16Array(new Uint8Array(d.sampleData.subarray(2*a.start,2*a.end)).buffer)}})}}]),o}()},"./src/types/bank.ts":function(S,n){},"./src/types/generator.ts":function(S,n,e){var f,i;function l(s,c,v){return c in s?Object.defineProperty(s,c,{value:v,enumerable:!0,configurable:!0,writable:!0}):s[c]=v,s}e.r(n),e.d(n,"GeneratorType",function(){return i}),e.d(n,"DEFAULT_GENERATOR_VALUES",function(){return t}),function(s){s[s.StartAddrsOffset=0]="StartAddrsOffset",s[s.EndAddrsOffset=1]="EndAddrsOffset",s[s.StartLoopAddrsOffset=2]="StartLoopAddrsOffset",s[s.EndLoopAddrsOffset=3]="EndLoopAddrsOffset",s[s.StartAddrsCoarseOffset=4]="StartAddrsCoarseOffset",s[s.ModLFOToPitch=5]="ModLFOToPitch",s[s.VibLFOToPitch=6]="VibLFOToPitch",s[s.ModEnvToPitch=7]="ModEnvToPitch",s[s.InitialFilterFc=8]="InitialFilterFc",s[s.InitialFilterQ=9]="InitialFilterQ",s[s.ModLFOToFilterFc=10]="ModLFOToFilterFc",s[s.ModEnvToFilterFc=11]="ModEnvToFilterFc",s[s.EndAddrsCoarseOffset=12]="EndAddrsCoarseOffset",s[s.ModLFOToVolume=13]="ModLFOToVolume",s[s.Unused1=14]="Unused1",s[s.ChorusEffectsSend=15]="ChorusEffectsSend",s[s.ReverbEffectsSend=16]="ReverbEffectsSend",s[s.Pan=17]="Pan",s[s.Unused2=18]="Unused2",s[s.Unused3=19]="Unused3",s[s.Unused4=20]="Unused4",s[s.DelayModLFO=21]="DelayModLFO",s[s.FreqModLFO=22]="FreqModLFO",s[s.DelayVibLFO=23]="DelayVibLFO",s[s.FreqVibLFO=24]="FreqVibLFO",s[s.DelayModEnv=25]="DelayModEnv",s[s.AttackModEnv=26]="AttackModEnv",s[s.HoldModEnv=27]="HoldModEnv",s[s.DecayModEnv=28]="DecayModEnv",s[s.SustainModEnv=29]="SustainModEnv",s[s.ReleaseModEnv=30]="ReleaseModEnv",s[s.KeyNumToModEnvHold=31]="KeyNumToModEnvHold",s[s.KeyNumToModEnvDecay=32]="KeyNumToModEnvDecay",s[s.DelayVolEnv=33]="DelayVolEnv",s[s.AttackVolEnv=34]="AttackVolEnv",s[s.HoldVolEnv=35]="HoldVolEnv",s[s.DecayVolEnv=36]="DecayVolEnv",s[s.SustainVolEnv=37]="SustainVolEnv",s[s.ReleaseVolEnv=38]="ReleaseVolEnv",s[s.KeyNumToVolEnvHold=39]="KeyNumToVolEnvHold",s[s.KeyNumToVolEnvDecay=40]="KeyNumToVolEnvDecay",s[s.Instrument=41]="Instrument",s[s.Reserved1=42]="Reserved1",s[s.KeyRange=43]="KeyRange",s[s.VelRange=44]="VelRange",s[s.StartLoopAddrsCoarseOffset=45]="StartLoopAddrsCoarseOffset",s[s.KeyNum=46]="KeyNum",s[s.Velocity=47]="Velocity",s[s.InitialAttenuation=48]="InitialAttenuation",s[s.Reserved2=49]="Reserved2",s[s.EndLoopAddrsCoarseOffset=50]="EndLoopAddrsCoarseOffset",s[s.CoarseTune=51]="CoarseTune",s[s.FineTune=52]="FineTune",s[s.SampleId=53]="SampleId",s[s.SampleModes=54]="SampleModes",s[s.Reserved3=55]="Reserved3",s[s.ScaleTuning=56]="ScaleTuning",s[s.ExclusiveClass=57]="ExclusiveClass",s[s.OverridingRootKey=58]="OverridingRootKey",s[s.Unused5=59]="Unused5",s[s.EndOper=60]="EndOper"}(i||(i={}));var t=(l(f={},i.StartAddrsOffset,0),l(f,i.EndAddrsOffset,0),l(f,i.StartLoopAddrsOffset,0),l(f,i.EndLoopAddrsOffset,0),l(f,i.StartAddrsCoarseOffset,0),l(f,i.ModLFOToPitch,0),l(f,i.VibLFOToPitch,0),l(f,i.ModEnvToPitch,0),l(f,i.InitialFilterFc,13500),l(f,i.InitialFilterQ,0),l(f,i.ModLFOToFilterFc,0),l(f,i.ModEnvToFilterFc,0),l(f,i.EndAddrsCoarseOffset,0),l(f,i.ModLFOToVolume,0),l(f,i.ChorusEffectsSend,0),l(f,i.ReverbEffectsSend,0),l(f,i.Pan,0),l(f,i.DelayModLFO,-12e3),l(f,i.FreqModLFO,0),l(f,i.DelayVibLFO,-12e3),l(f,i.FreqVibLFO,0),l(f,i.DelayModEnv,-12e3),l(f,i.AttackModEnv,-12e3),l(f,i.HoldModEnv,-12e3),l(f,i.DecayModEnv,-12e3),l(f,i.SustainModEnv,0),l(f,i.ReleaseModEnv,-12e3),l(f,i.KeyNumToModEnvHold,0),l(f,i.KeyNumToModEnvDecay,0),l(f,i.DelayVolEnv,-12e3),l(f,i.AttackVolEnv,-12e3),l(f,i.HoldVolEnv,-12e3),l(f,i.DecayVolEnv,-12e3),l(f,i.SustainVolEnv,0),l(f,i.ReleaseVolEnv,-12e3),l(f,i.KeyNumToVolEnvHold,0),l(f,i.KeyNumToVolEnvDecay,0),l(f,i.StartLoopAddrsCoarseOffset,0),l(f,i.KeyNum,-1),l(f,i.Velocity,-1),l(f,i.InitialAttenuation,0),l(f,i.EndLoopAddrsCoarseOffset,0),l(f,i.CoarseTune,0),l(f,i.FineTune,0),l(f,i.SampleModes,0),l(f,i.ScaleTuning,100),l(f,i.ExclusiveClass,0),l(f,i.OverridingRootKey,-1),f)},"./src/types/index.ts":function(S,n,e){e.r(n);var f=e("./src/types/bank.ts");for(var i in f)i!=="default"&&function(d){e.d(n,d,function(){return f[d]})}(i);var l=e("./src/types/generator.ts");e.d(n,"GeneratorType",function(){return l.GeneratorType}),e.d(n,"DEFAULT_GENERATOR_VALUES",function(){return l.DEFAULT_GENERATOR_VALUES});var t=e("./src/types/instrument.ts");for(var i in t)["GeneratorType","DEFAULT_GENERATOR_VALUES","default"].indexOf(i)<0&&function(a){e.d(n,a,function(){return t[a]})}(i);var s=e("./src/types/key.ts");for(var i in s)["GeneratorType","DEFAULT_GENERATOR_VALUES","default"].indexOf(i)<0&&function(a){e.d(n,a,function(){return s[a]})}(i);var c=e("./src/types/metaData.ts");for(var i in c)["GeneratorType","DEFAULT_GENERATOR_VALUES","default"].indexOf(i)<0&&function(a){e.d(n,a,function(){return c[a]})}(i);var v=e("./src/types/modulator.ts");e.d(n,"ControllerType",function(){return v.ControllerType}),e.d(n,"ControllerPolarity",function(){return v.ControllerPolarity}),e.d(n,"ControllerDirection",function(){return v.ControllerDirection}),e.d(n,"ControllerPalette",function(){return v.ControllerPalette}),e.d(n,"Controller",function(){return v.Controller}),e.d(n,"TransformType",function(){return v.TransformType}),e.d(n,"DEFAULT_INSTRUMENT_MODULATORS",function(){return v.DEFAULT_INSTRUMENT_MODULATORS});var p=e("./src/types/preset.ts");for(var i in p)["GeneratorType","DEFAULT_GENERATOR_VALUES","ControllerType","ControllerPolarity","ControllerDirection","ControllerPalette","Controller","TransformType","DEFAULT_INSTRUMENT_MODULATORS","default"].indexOf(i)<0&&function(a){e.d(n,a,function(){return p[a]})}(i);var r=e("./src/types/presetData.ts");for(var i in r)["GeneratorType","DEFAULT_GENERATOR_VALUES","ControllerType","ControllerPolarity","ControllerDirection","ControllerPalette","Controller","TransformType","DEFAULT_INSTRUMENT_MODULATORS","default"].indexOf(i)<0&&function(a){e.d(n,a,function(){return r[a]})}(i);var u=e("./src/types/sample.ts");e.d(n,"SampleType",function(){return u.SampleType});var o=e("./src/types/zone.ts");for(var i in o)["GeneratorType","DEFAULT_GENERATOR_VALUES","ControllerType","ControllerPolarity","ControllerDirection","ControllerPalette","Controller","TransformType","DEFAULT_INSTRUMENT_MODULATORS","SampleType","default"].indexOf(i)<0&&function(a){e.d(n,a,function(){return o[a]})}(i)},"./src/types/instrument.ts":function(S,n){},"./src/types/key.ts":function(S,n){},"./src/types/metaData.ts":function(S,n){},"./src/types/modulator.ts":function(S,n,e){e.r(n),e.d(n,"ControllerType",function(){return f}),e.d(n,"ControllerPolarity",function(){return i}),e.d(n,"ControllerDirection",function(){return l}),e.d(n,"ControllerPalette",function(){return t}),e.d(n,"Controller",function(){return s}),e.d(n,"TransformType",function(){return c}),e.d(n,"DEFAULT_INSTRUMENT_MODULATORS",function(){return p});var f,i,l,t,s,c,v=e("./src/types/generator.ts");(function(r){r[r.Linear=0]="Linear",r[r.Concave=1]="Concave",r[r.Convex=2]="Convex",r[r.Switch=3]="Switch"})(f||(f={})),function(r){r[r.Unipolar=0]="Unipolar",r[r.Bipolar=1]="Bipolar"}(i||(i={})),function(r){r[r.Increasing=0]="Increasing",r[r.Decreasing=1]="Decreasing"}(l||(l={})),function(r){r[r.GeneralController=0]="GeneralController",r[r.MidiController=1]="MidiController"}(t||(t={})),function(r){r[r.NoController=0]="NoController",r[r.NoteOnVelocity=2]="NoteOnVelocity",r[r.NoteOnKeyNumber=3]="NoteOnKeyNumber",r[r.PolyPressure=10]="PolyPressure",r[r.ChannelPressure=13]="ChannelPressure",r[r.PitchWheel=14]="PitchWheel",r[r.PitchWheelSensitivity=16]="PitchWheelSensitivity",r[r.Link=127]="Link"}(s||(s={})),function(r){r[r.Linear=0]="Linear",r[r.Absolute=2]="Absolute"}(c||(c={}));var p=[{id:v.GeneratorType.InitialAttenuation,source:{type:f.Concave,polarity:i.Unipolar,direction:l.Decreasing,palette:t.GeneralController,index:s.NoteOnVelocity},value:960,valueSource:{type:f.Linear,polarity:i.Unipolar,direction:l.Increasing,palette:t.GeneralController,index:s.NoController},transform:c.Linear},{id:v.GeneratorType.InitialFilterFc,source:{type:f.Linear,polarity:i.Unipolar,direction:l.Decreasing,palette:t.GeneralController,index:s.NoteOnVelocity},value:-2400,valueSource:{type:f.Linear,polarity:i.Unipolar,direction:l.Increasing,palette:t.GeneralController,index:s.NoController},transform:c.Linear},{id:v.GeneratorType.VibLFOToPitch,source:{type:f.Linear,polarity:i.Unipolar,direction:l.Increasing,palette:t.GeneralController,index:s.ChannelPressure},value:50,valueSource:{type:f.Linear,polarity:i.Unipolar,direction:l.Increasing,palette:t.GeneralController,index:s.NoController},transform:c.Linear},{id:v.GeneratorType.VibLFOToPitch,source:{type:f.Linear,polarity:i.Unipolar,direction:l.Increasing,palette:t.MidiController,index:1},value:50,valueSource:{type:f.Linear,polarity:i.Unipolar,direction:l.Increasing,palette:t.GeneralController,index:s.NoController},transform:c.Linear},{id:v.GeneratorType.InitialAttenuation,source:{type:f.Concave,polarity:i.Unipolar,direction:l.Decreasing,palette:t.MidiController,index:7},value:960,valueSource:{type:f.Linear,polarity:i.Unipolar,direction:l.Increasing,palette:t.GeneralController,index:s.NoController},transform:c.Linear},{id:v.GeneratorType.InitialAttenuation,source:{type:f.Linear,polarity:i.Bipolar,direction:l.Increasing,palette:t.MidiController,index:10},value:1e3,valueSource:{type:f.Linear,polarity:i.Unipolar,direction:l.Increasing,palette:t.GeneralController,index:s.NoController},transform:c.Linear},{id:v.GeneratorType.InitialAttenuation,source:{type:f.Concave,polarity:i.Unipolar,direction:l.Decreasing,palette:t.MidiController,index:11},value:960,valueSource:{type:f.Linear,polarity:i.Unipolar,direction:l.Increasing,palette:t.GeneralController,index:s.NoController},transform:c.Linear},{id:v.GeneratorType.ReverbEffectsSend,source:{type:f.Linear,polarity:i.Unipolar,direction:l.Increasing,palette:t.MidiController,index:91},value:200,valueSource:{type:f.Linear,polarity:i.Unipolar,direction:l.Increasing,palette:t.GeneralController,index:s.NoController},transform:c.Linear},{id:v.GeneratorType.ChorusEffectsSend,source:{type:f.Linear,polarity:i.Unipolar,direction:l.Increasing,palette:t.MidiController,index:93},value:200,valueSource:{type:f.Linear,polarity:i.Unipolar,direction:l.Increasing,palette:t.GeneralController,index:s.NoController},transform:c.Linear},{id:v.GeneratorType.CoarseTune,source:{type:f.Linear,polarity:i.Bipolar,direction:l.Increasing,palette:t.GeneralController,index:s.PitchWheel},value:12700,valueSource:{type:f.Linear,polarity:i.Unipolar,direction:l.Increasing,palette:t.GeneralController,index:s.PitchWheelSensitivity},transform:c.Linear}]},"./src/types/preset.ts":function(S,n){},"./src/types/presetData.ts":function(S,n){},"./src/types/sample.ts":function(S,n,e){var f;e.r(n),e.d(n,"SampleType",function(){return f}),function(i){i[i.EOS=0]="EOS",i[i.Mono=1]="Mono",i[i.Right=2]="Right",i[i.Left=4]="Left",i[i.Linked=8]="Linked",i[i.RomMono=32769]="RomMono",i[i.RomRight=32770]="RomRight",i[i.RomLeft=32772]="RomLeft",i[i.RomLinked=32776]="RomLinked"}(f||(f={}))},"./src/types/zone.ts":function(S,n){},"./src/utils/buffer.ts":function(S,n,e){e.r(n),e.d(n,"getStringFromBuffer",function(){return f});var f=function(i){return new TextDecoder("utf8").decode(i).split(/\0/)[0].trim()}},"./src/utils/index.ts":function(S,n,e){e.r(n);var f=e("./src/utils/buffer.ts");e.d(n,"getStringFromBuffer",function(){return f.getStringFromBuffer});var i=e("./src/utils/memoize.ts");e.d(n,"memoize",function(){return i.memoize})},"./src/utils/memoize.ts":function(S,n,e){e.r(n),e.d(n,"memoize",function(){return f});var f=function(i){var l={};return function(){for(var t=arguments.length,s=new Array(t),c=0;c<t;c++)s[c]=arguments[c];var v=JSON.stringify(s);if(v in l)return l[v];var p=i.apply(void 0,s);return l[v]=p,p}}}})})})(SoundFont2);const m=h=>Math.pow(2,h/1200),Q=h=>h/1e3,G=(h,y)=>{const S=Math.pow(10,y);return Math.round(h*S)/S};typeof AudioParam<"u"&&(AudioParam.prototype.dahdsr=function(h,y,S,n,e,f,i,l,t){e=Math.max(G(e,4),.001),i=Math.max(G(i,4),.001),t=G(t,4),y=Math.max(y,.001);let s=h;return this.setValueAtTime(y,s),this.setValueAtTime(y,s+=n),this.exponentialRampToValueAtTime(S,s+=e),this.setValueAtTime(S,s+=f),this.exponentialRampToValueAtTime(Math.max(l*S,.001),s+=i),(c,v)=>{this.cancelAndHoldAtTime(c);const p=Math.max(v!=null?v:y,.001);this.exponentialRampToValueAtTime(p,c+t)}});const T={0:"startAddrOffset",1:"endAddrOffset",2:"startloopAddrsOffset",3:"endloopAddrsOffset",4:"startAddrsCoarseOffset",5:"modLfoToPitch",6:"vibLfoToPitch",7:"modEnvToPitch",8:"initialFilterFc",9:"initialFilterQ",10:"modLfoToFilterFc",11:"modEnvToFilterFc",12:"endAddrsCoarseOffset",13:"modLfoToVolume",14:"unused1",15:"chorusEffectsSend",16:"reverbEffectsSend",17:"pan",18:"unused2",19:"unused3",20:"unused4",21:"delayModLFO",22:"freqModLFO",23:"delayVibLFO",24:"freqVibLFO",25:"delayModEnv",26:"attackModEnv",27:"holdModEnv",28:"decayModEnv",29:"sustainModEnv",30:"releaseModEnv",31:"keyNumToModEnvHold",32:"keyNumToModEnvDecay",33:"delayVolEnv",34:"attackVolEnv",35:"holdVolEnv",36:"decayVolEnv",37:"sustainVolEnv",38:"releaseVolEnv",39:"keyNumToVolEnvHold",40:"keyNumToVolEnvDecay",41:"instrument",42:"reserved1",43:"keyRange",44:"velRange",45:"startloopAddrsCoarseOffset",46:"keyNum",47:"velocity",48:"initialAttenuation",49:"reserved2",50:"endloopAddrsCoarseOffset",51:"coarseTune",52:"fineTune",53:"sampleID",54:"sampleModes",55:"reserved3",56:"scaleTuning",57:"exclusiveClass",58:"overridingRootKey",59:"unused5",60:"endOper"};Object.fromEntries(Object.entries(SoundFont2.exports.DEFAULT_GENERATOR_VALUES).map(([h,y])=>[T[h],y]));const D=(h,y,S,n,e)=>{var f,i,l,t,s,c,v;const p=SoundFont2.exports.DEFAULT_GENERATOR_VALUES[h];if(typeof p!="number")throw new Error(`no default value found for generator with index ${h}`);const r=y.generators[h],u=(i=(f=S.globalZone)==null?void 0:f.generators)==null?void 0:i[h],o=(l=n==null?void 0:n.generators)==null?void 0:l[h],d=(s=(t=e.globalZone)==null?void 0:t.generators)==null?void 0:s[h],a=r&&"value"in r?r.value:void 0,L=u&&"value"in u?u.value:void 0,g=o&&"value"in o?o.value:void 0,U=d&&"value"in d?d.value:void 0,B=(c=a!=null?a:L)!=null?c:p,F=(v=g!=null?g:U)!=null?v:0;return B+F},J=h=>SoundFont2.exports.DEFAULT_GENERATOR_VALUES[h]!==void 0,W=(h,y,S)=>{var n,e,f,i;return Object.fromEntries(Array.from(new Set([Object.keys((e=(n=S.globalZone)==null?void 0:n.generators)!=null?e:{}),Object.keys(y.generators),Object.keys((i=(f=y.instrument.globalZone)==null?void 0:f.generators)!=null?i:{}),Object.keys(h.generators)].flat())).filter(J).map(l=>[T[l],D(parseInt(l),h,y.instrument,y,S)]))};async function ae(h){const y=await fetch(h).then(n=>n.arrayBuffer()),S=new Uint8Array(y);return new SoundFont2.exports.SoundFont2(S)}function X(h,y,S){let{time:n=h.currentTime}=S;const{midi:e,start:f,velocity:i=.3,startLoop:l,endLoop:t,sampleRate:s,originalPitch:c,pitchCorrection:v,type:p,sampleModes:r=0,overridingRootKey:u,fineTune:o=0,startloopAddrsOffset:d=0,startloopAddrsCoarseOffset:a=0,endloopAddrsOffset:L=0,endloopAddrsCoarseOffset:g=0,delayVolEnv:U=-12e3,attackVolEnv:B=-12e3,holdVolEnv:F=-12e3,decayVolEnv:M=-12e3,sustainVolEnv:O=0,releaseVolEnv:R=-12e3,pan:E=0,...A}=S,k=100*(u!==void 0&&u!==-1?u:c)+v-o,b=e*100-k,P=1*Math.pow(2,b/1200);y.playbackRate.value=P;const N=l+d+a*32768,I=t+L+g*32768;I>N&&r===1?(y.loopStart=N/s,y.loopEnd=I/s,y.loop=!0):r===3&&console.warn("unimplemented sampleMode 3 (play till end on note off)"),Object.keys(A).filter(w=>!["name","instrument","keyRange","sampleID","end"].includes(w)).length;const V=h.createGain(),j=[n,0,i,m(U),m(B),m(F),m(M),O>=960?0:1-Q(O),m(R)],Z=V.gain.dahdsr(...j),H=h.createStereoPanner();return H.pan.value=E/1e3,V.connect(H),y.connect(V),H.connect(h.destination),y.start(n),(w=h.currentTime)=>{y.stop(w+m(R)),Z(w)}}function Y(h,y,S={}){const{header:n,data:e}=y,f=new Float32Array(e.length);for(let t=0;t<e.length;t++)f[t]=e[t]/32768;const i=h.createBuffer(1,f.length,n.sampleRate);i.getChannelData(0).set(f);const l=h.createBufferSource();return l.buffer=i,S={...n,...S},X(h,l,S)}const C=(h,y)=>!h.keyRange||h.keyRange.lo<=y&&y<=h.keyRange.hi,x=(h,y)=>h.zones.filter(S=>C(S,y)&&S.instrument).map(S=>S.instrument.zones.filter(n=>C(n,y)).map(n=>{const e=W(n,S,h);return{...n,mergedGenerators:e}})).flat(),ce=(h,y,S,n=h.currentTime)=>{const e=x(y,S).map(f=>Y(h,f.sample,{...f.mergedGenerators,midi:S,time:n}));return(f=h.currentTime)=>{e.forEach(i=>i(f))}};Pattern.prototype.soundfont=function(h,y=0){return this.onTrigger((S,n,e)=>{const f=getAudioContext(),i=getPlayableNoteValue(n),l=h.presets[y%h.presets.length],t=f.currentTime+S-e,s=[f,l,toMidi(i),t];ce(...s)(t+n.duration)})};const soundfontCache=new Map;function loadSoundfont(h){if(soundfontCache.get(h))return soundfontCache.get(h);const y=ae(h);return soundfontCache.set(h,y),y}export{getFontBufferSource,loadSoundfont,list as soundfontList,ce as startPresetNote};
|