From d7954b8423edcd82c8f1f8940dc4f60de80cb559 Mon Sep 17 00:00:00 2001 From: William Toohey Date: Mon, 25 Jan 2016 23:06:08 +1000 Subject: [PATCH] Move to gulp to simplify the build significantly --- .babelrc | 3 + .gitignore | 1 + Makefile | 36 - README.md | 22 +- gulpfile.js | 70 ++ index-min.html | 72 -- index.html | 44 +- js/mp3/mp3-min.js | 282 ----- {js/lib => lib/workers}/deflate.js | 0 {js/lib => lib/workers}/inflate.js | 0 {js/mp3 => lib/workers}/mp3-worker.js | 2 +- {js/lib => lib/workers}/z-worker.js | 0 {js/lib => lib}/zip-fs.js | 0 {js/lib => lib}/zip.js | 0 old/index.html | 385 ------- old/index_ideal.html | 57 - old/js/0x40.js | 1455 ------------------------- old/js/assetManager.js | 19 - old/js/audioUtils.js | 101 -- old/js/respack.js | 217 ---- old/js/waifuCanvas.js | 197 ---- old/js/waifus.js | 113 -- old/style.css | 153 --- {css => src/css}/hues-h.css | 16 +- {css => src/css}/hues-m.css | 36 - {css => src/css}/hues-r.css | 4 - {css => src/css}/hues-res.css | 9 - {css => src/css}/hues-w.css | 12 - {css => src/css}/hues-x.css | 3 - {css => src/css}/style.css | 24 +- {js => src/js}/HuesCanvas.js | 0 {js => src/js}/HuesCore.js | 31 +- {js => src/js}/HuesInfo.js | 0 {js => src/js}/HuesSettings.js | 20 +- {js => src/js}/HuesUI.js | 0 {js => src/js}/ResourceManager.js | 0 {js => src/js}/ResourcePack.js | 0 {js => src/js}/SoundManager.js | 4 +- {js => src/js}/mp3/aurora.js | 0 {js => src/js}/mp3/mp3.js | 0 40 files changed, 164 insertions(+), 3224 deletions(-) create mode 100644 .babelrc delete mode 100644 Makefile create mode 100644 gulpfile.js delete mode 100644 index-min.html delete mode 100644 js/mp3/mp3-min.js rename {js/lib => lib/workers}/deflate.js (100%) rename {js/lib => lib/workers}/inflate.js (100%) rename {js/mp3 => lib/workers}/mp3-worker.js (97%) rename {js/lib => lib/workers}/z-worker.js (100%) rename {js/lib => lib}/zip-fs.js (100%) rename {js/lib => lib}/zip.js (100%) delete mode 100644 old/index.html delete mode 100644 old/index_ideal.html delete mode 100644 old/js/0x40.js delete mode 100644 old/js/assetManager.js delete mode 100644 old/js/audioUtils.js delete mode 100644 old/js/respack.js delete mode 100644 old/js/waifuCanvas.js delete mode 100644 old/js/waifus.js delete mode 100644 old/style.css rename {css => src/css}/hues-h.css (83%) rename {css => src/css}/hues-m.css (91%) rename {css => src/css}/hues-r.css (91%) rename {css => src/css}/hues-res.css (92%) rename {css => src/css}/hues-w.css (78%) rename {css => src/css}/hues-x.css (94%) rename {css => src/css}/style.css (93%) rename {js => src/js}/HuesCanvas.js (100%) rename {js => src/js}/HuesCore.js (97%) rename {js => src/js}/HuesInfo.js (100%) rename {js => src/js}/HuesSettings.js (97%) rename {js => src/js}/HuesUI.js (100%) rename {js => src/js}/ResourceManager.js (100%) rename {js => src/js}/ResourcePack.js (100%) rename {js => src/js}/SoundManager.js (98%) rename {js => src/js}/mp3/aurora.js (100%) rename {js => src/js}/mp3/mp3.js (100%) diff --git a/.babelrc b/.babelrc new file mode 100644 index 0000000..dc1bc4f --- /dev/null +++ b/.babelrc @@ -0,0 +1,3 @@ +{ + "presets": ["es2015"] +} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 6a4a2fd..36b1130 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ release/ *.jar css/hues-min.css js/hues-min.js +node_modules/ diff --git a/Makefile b/Makefile deleted file mode 100644 index d88d53a..0000000 --- a/Makefile +++ /dev/null @@ -1,36 +0,0 @@ -JS=HuesCanvas.js HuesCore.js HuesSettings.js HuesUI.js HuesInfo.js ResourceManager.js ResourcePack.js SoundManager.js -YUI=yuicompressor-2.4.8.jar - -all: minify pack - -minify: - cd ./js ; java -jar ../compiler.jar --js $(JS) --js_output_file hues-min.js - cd ./js/mp3 ; java -jar ../../compiler.jar --js aurora.js mp3.js --js_output_file mp3-min.js --language_in=ECMASCRIPT6 -W QUIET - -rm ./css/hues-min.css - cd ./css ; java -jar ../$(YUI) --type css -o hues-s-min.css hues-h.css - cd ./css ; java -jar ../$(YUI) --type css -o hues-m-min.css hues-m.css - cd ./css ; java -jar ../$(YUI) --type css -o hues-r-min.css hues-r.css - cd ./css ; java -jar ../$(YUI) --type css -o hues-w-min.css hues-w.css - cd ./css ; java -jar ../$(YUI) --type css -o hues-x-min.css hues-x.css - cd ./css ; java -jar ../$(YUI) --type css -o hues-res-min.css hues-res.css - cd ./css ; java -jar ../$(YUI) --type css -o style-min.css style.css - cat ./css/*-min.css >> hues-min.css - rm ./css/*-min.css - mv ./hues-min.css ./css/ - -pack: - mkdir -p release - cp index-min.html release/index.html - cp favicon.ico release/ - mkdir -p release/js - mkdir -p release/js/mp3 - mkdir -p release/css - mkdir -p release/fonts - mkdir -p release/respacks - cp -r respacks release/ - cp -r img release/ - cp -r fonts release/ - cp -r js/lib release/js - cp js/hues-min.js release/js - cp js/mp3/mp3-min.js js/mp3/mp3-worker.js release/js/mp3 - cp css/hues-min.css release/css \ No newline at end of file diff --git a/README.md b/README.md index 42dc373..a9f9fe8 100644 --- a/README.md +++ b/README.md @@ -12,13 +12,12 @@ You can also have animations that sync perfectly with the beats of the songs. In [420 Hues, Snoop Edition](http://420.mon.im/snoop.html) ["Montegral"](http://0x40.mon.im/montegral.html) -## Make your own Hues +## Install (Make your own Hues) 1. Start by downloading the latest [release](https://github.com/mon/0x40-web/releases). These are minified and load faster. 2. Put your respack zips somewhere they can be found by your web server. My hues have a `respacks/` folder under the main directory. 3. Edit the Javascript that runs on page load - 1. If your html is in a different location to your `js` folder: - * Edit `zip.workerScriptsPath` to point to the correct (relative) location. - * Add the `mp3WorkerPath` setting to the `defaults` object and change it from its default value of `"js/mp3/"` + 1. If your html is in a different location to your `lib` folder: + * Edit `workersPath` to point to the correct (relative) location. 3. Edit the `defaults` object so the `respacks` list contains the respacks you wish to load. 3. *Optional:* Add any extra settings to the `defaults` object. 4. Upload everything to your server! @@ -26,8 +25,9 @@ You can also have animations that sync perfectly with the beats of the songs. In ### Example settings ```javascript var defaults = { + workersPath : "lib/workers/", respacks : ["./respacks/Defaults_v5.0.zip", - "./respacks/HuesMixA.zip", + "./respacks/HuesMixA.zip" ], firstSong : "Nhato - Miss You", }; @@ -35,3 +35,15 @@ var defaults = { ## Settings object See [HuesSettings.js](https://github.com/mon/0x40-web/blob/master/js/HuesSettings.js#L23) for the possible options you can put into the `defaults` object. + +## Building +Install [Node.js](https://nodejs.org/en/), v5 preferred. +Install the required packages for the build: +```bash +npm install gulp -g +npm install gulp-sourcemaps gulp-babel babel-preset-es2015 gulp-uglify gulp-concat gulp-cssnano gulp-autoprefixer gulp-order del +``` +Build: +```bash +gulp +``` \ No newline at end of file diff --git a/gulpfile.js b/gulpfile.js new file mode 100644 index 0000000..421150b --- /dev/null +++ b/gulpfile.js @@ -0,0 +1,70 @@ +var gulp = require("gulp"); +var sourcemaps = require("gulp-sourcemaps"); +var babel = require("gulp-babel"); +var uglify = require('gulp-uglify'); +var concat = require("gulp-concat"); +var minifyCSS = require('gulp-cssnano'); +var autoprefixer = require('gulp-autoprefixer'); +var order = require("gulp-order"); +var del = require('del'); + +gulp.task('default', ['css', 'mp3', 'minify'], function() { + +}); + +gulp.task('css', function(){ + return gulp.src('src/css/**/*.css') + .pipe(order([ + "style.css", // base + "hues-m.css", // modern + "hues-x.css", // xmas + "hues-h.css", // hlwn + "hues-r.css", // retro + "hues-w.css" // weed + ])) + .pipe(autoprefixer('last 2 version', 'ios 6', 'android 4')) + .pipe(minifyCSS()) + .pipe(concat('hues-min.css')) + .pipe(gulp.dest('css')); +}); + +gulp.task("mp3", function () { + return gulp.src("src/js/mp3/*.js") + .pipe(babel()) + .pipe(uglify()) + .pipe(concat("mp3-min.js")) + .pipe(gulp.dest("lib")); +}); + +gulp.task("minify", function () { + return gulp.src("src/js/*.js") + // Enable later + //.pipe(jshint('.jshintrc')) + //.pipe(jshint.reporter('default')) + .pipe(sourcemaps.init()) + .pipe(babel()) + .pipe(uglify()) + .pipe(concat("hues-min.js")) + .pipe(sourcemaps.write(".")) + .pipe(gulp.dest("lib")); +}); + +gulp.task('watch', function() { + gulp.watch('src/css/*.css', ['css']); + gulp.watch('src/js/*.js', ['minify']); +}); + +gulp.task('clean', function() { + return del([ + 'lib/hues-min.js', + 'lib/hues-min.map', + 'lib/mp3-min.js', + 'css', + 'release']); +}); + +gulp.task('release', ['default'], function() { + gulp.src(['css/**/*', 'lib/**/*', 'fonts/**/*', 'img/**/*', 'index.html', 'favicon.ico'], { + base: '.' + }).pipe(gulp.dest('release')); +}); \ No newline at end of file diff --git a/index-min.html b/index-min.html deleted file mode 100644 index 74267d9..0000000 --- a/index-min.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - 0x40 - - - - - - - - -
-
-
0x00
-
-
-
-
-
-
x
-
- - - - - - -
- -
-
-
- -
-
-
-
-

0x40 Hues of JS,

-

Adapted from the 0x40 Flash

-

Web-ified by mon

-

With help from Kepstin

-
- -
-
-
-
-
- -
- - - - \ No newline at end of file diff --git a/index.html b/index.html index 2e7e6da..7affb7f 100644 --- a/index.html +++ b/index.html @@ -3,46 +3,30 @@ 0x40 - - - - - - - - - - - - - - - - - - + + + + +
-
0x00
-
+
Initialising...
+
This page requires Javascript
diff --git a/js/mp3/mp3-min.js b/js/mp3/mp3-min.js deleted file mode 100644 index 0523cfe..0000000 --- a/js/mp3/mp3-min.js +++ /dev/null @@ -1,282 +0,0 @@ -!function(r){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=r();else if("function"==typeof define&&define.amd)define([],r);else{var b;"undefined"!=typeof window?b=window:"undefined"!=typeof global?b=global:"undefined"!=typeof self&&(b=self);b.AV=r()}}(function(){return function b(m,g,l){function a(d,h){if(!g[d]){if(!m[d]){var c="function"==typeof require&&require;if(!h&&c)return c(d,!0);if(e)return e(d,!0);throw Error("Cannot find module '"+d+"'");}c=g[d]={exports:{}};m[d][0].call(c.exports, -function(b){var k=m[d][1][b];return a(k?k:b)},c,c.exports,b,m,g,l)}return g[d].exports}for(var e="function"==typeof require&&require,d=0;de.call(w,k)&&(b[k]=d);u=c.__super__;for(k in b)d=b[k],"function"===typeof d&&q.test(d)?function(a,b){return c.prototype[a]=function(){var c,k;k=this._super;this._super=u[a]; -c=b.apply(this,arguments);this._super=k;return c}}(k,d):c.prototype[k]=d;return c};return b}();m.exports=b},{}],6:[function(b,m,g){b=function(){function b(a){this.stream=a;this.bitPosition=0}b.prototype.copy=function(){var a;a=new b(this.stream.copy());a.bitPosition=this.bitPosition;return a};b.prototype.offset=function(){return 8*this.stream.offset+this.bitPosition};b.prototype.available=function(a){return this.stream.available((a+8-this.bitPosition)/8)};b.prototype.advance=function(a){a=this.bitPosition+ -a;this.stream.advance(a>>3);return this.bitPosition=a&7};b.prototype.rewind=function(a){a=this.bitPosition-a;this.stream.rewind(Math.abs(a>>3));return this.bitPosition=a&7};b.prototype.seek=function(a){var b;b=this.offset();if(a>b)return this.advance(a-b);if(a=k)d=(this.stream.peekUInt8()<< -this.bitPosition&255)>>>8-a;else if(16>=k)d=(this.stream.peekUInt16()<>>16-a;else if(24>=k)d=(this.stream.peekUInt24()<>>24-a;else if(32>=k)d=this.stream.peekUInt32()<>>32-a;else if(40>=k)d=4294967296*this.stream.peekUInt8(0),q=this.stream.peekUInt8(1)<<24>>>0,h=this.stream.peekUInt8(2)<<16,c=this.stream.peekUInt8(3)<<8,x=this.stream.peekUInt8(4),d=(d+q+h+c+x)%Math.pow(2,40-this.bitPosition),d=Math.floor(d/Math.pow(2,40-this.bitPosition- -a));else throw Error("Too many bits!");b&&(32>k?d>>>a-1&&(d=-1*((1<>>0)-d)):d/Math.pow(2,a-1)|0&&(d=-1*(Math.pow(2,a)-d)));this.advance(a);return d};b.prototype.peek=function(a,b){var d,q,h,c,x,k;if(0===a)return 0;k=a+this.bitPosition;if(8>=k)d=(this.stream.peekUInt8()<>>8-a;else if(16>=k)d=(this.stream.peekUInt16()<>>16-a;else if(24>=k)d=(this.stream.peekUInt24()<>>24-a;else if(32>=k)d=this.stream.peekUInt32()<>> -32-a;else if(40>=k)d=4294967296*this.stream.peekUInt8(0),q=this.stream.peekUInt8(1)<<24>>>0,h=this.stream.peekUInt8(2)<<16,c=this.stream.peekUInt8(3)<<8,x=this.stream.peekUInt8(4),d=(d+q+h+c+x)%Math.pow(2,40-this.bitPosition),d=Math.floor(d/Math.pow(2,40-this.bitPosition-a));else throw Error("Too many bits!");b&&(32>k?d>>>a-1&&(d=-1*((1<>>0)-d)):d/Math.pow(2,a-1)|0&&(d=-1*(Math.pow(2,a)-d)));return d};b.prototype.readLSB=function(a,b){var d,q;if(0===a)return 0;if(40>>this.bitPosition;8>>0);32q?d>>>a-1&&(d=-1*((1<>>0)-d)):d/Math.pow(2,a-1)|0&&(d=-1*(Math.pow(2,a)-d)));this.advance(a);return d};b.prototype.peekLSB=function(a,b){var d,q;if(0=== -a)return 0;if(40>>this.bitPosition;8>>0);32q?d>>>a-1&&(d=-1*((1<>>0)-d)):d/Math.pow(2,a-1)|0&&(d=-1*(Math.pow(2,a)-d)));return d};return b}(); -m.exports=b},{}],7:[function(b,m,g){(function(b){var a;a=function(){function a(h){var c;if(h instanceof Uint8Array)this.data=h;else if(h instanceof ArrayBuffer||Array.isArray(h)||"number"===typeof h||null!=(c=b.Buffer)&&c.isBuffer(h))this.data=new Uint8Array(h);else if(h.buffer instanceof ArrayBuffer)this.data=new Uint8Array(h.buffer,h.byteOffset,h.length*h.BYTES_PER_ELEMENT);else if(h instanceof a)this.data=h.data;else throw Error("Constructing buffer with unknown type.");this.length=this.data.length; -this.prev=this.next=null}var d,q;a.allocate=function(b){return new a(b)};a.prototype.copy=function(){return new a(new Uint8Array(this.data))};a.prototype.slice=function(b,c){null==c&&(c=this.length);return 0===b&&c>=this.length?new a(this.data):new a(this.data.subarray(b,b+c))};d=b.BlobBuilder||b.MozBlobBuilder||b.WebKitBlobBuilder;q=b.URL||b.webkitURL||b.mozURL;a.makeBlob=function(a,b){var q;null==b&&(b="application/octet-stream");try{return new Blob([a],{type:b})}catch(k){}return null!=d?(q=new d, -q.append(a),q.getBlob(b)):null};a.makeBlobURL=function(a,b){return null!=q?q.createObjectURL(this.makeBlob(a,b)):void 0};a.revokeBlobURL=function(a){return null!=q?q.revokeObjectURL(a):void 0};a.prototype.toBlob=function(){return a.makeBlob(this.data.buffer)};a.prototype.toBlobURL=function(){return a.makeBlobURL(this.data.buffer)};return a}();m.exports=a}).call(this,"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{}],8:[function(b,m,g){b=function(){function b(){this.last=this.first= -null;this.availableBuffers=this.availableBytes=this.numBuffers=0}b.prototype.copy=function(){var a;a=new b;a.first=this.first;a.last=this.last;a.numBuffers=this.numBuffers;a.availableBytes=this.availableBytes;a.availableBuffers=this.availableBuffers;return a};b.prototype.append=function(a){var b;a.prev=this.last;null!=(b=this.last)&&(b.next=a);this.last=a;null==this.first&&(this.first=a);this.availableBytes+=a.length;this.availableBuffers++;return this.numBuffers++};b.prototype.advance=function(){return this.first? -(this.availableBytes-=this.first.length,this.availableBuffers--,this.first=this.first.next,null!=this.first):!1};b.prototype.rewind=function(){var a;if(this.first&&!this.first.prev)return!1;if(this.first=(null!=(a=this.first)?a.prev:void 0)||this.last)this.availableBytes+=this.first.length,this.availableBuffers++;return null!=this.first};b.prototype.reset=function(){for(;this.rewind(););return[]};return b}();m.exports=b},{}],9:[function(b,m,g){var l={}.hasOwnProperty,a=function(a,b){function h(){this.constructor= -a}for(var c in b)l.call(b,c)&&(a[c]=b[c]);h.prototype=b.prototype;a.prototype=new h;a.__super__=b.prototype;return a},e=[].slice;b=function(b){function q(){return q.__super__.constructor.apply(this,arguments)}a(q,b);q.prototype.on=function(a,b){var d;null==this.events&&(this.events={});null==(d=this.events)[a]&&(d[a]=[]);return this.events[a].push(b)};q.prototype.off=function(a,b){var d;if(null!=(d=this.events)&&d[a]&&(d=this.events[a].indexOf(b),~d))return this.events[a].splice(d,1)};q.prototype.once= -function(a,b){var d;return this.on(a,d=function(){this.off(a,d);return b.apply(this,arguments)})};q.prototype.emit=function(){var a,b,d,k,w;b=arguments[0];a=2<=arguments.length?e.call(arguments,1):[];if(null!=(d=this.events)&&d[b])for(w=this.events[b].slice(),d=0,k=w.length;d=this.list.first.length;)this.localOffset-=this.list.first.length,this.list.advance();return this};b.prototype.rewind=function(a){if(a>this.offset)throw new e; -this.list.first||(this.list.rewind(),this.localOffset=this.list.first.length);this.localOffset-=a;for(this.offset-=a;this.list.first.prev&&0>this.localOffset;)this.list.rewind(),this.localOffset+=this.list.first.length;return this};b.prototype.seek=function(a){if(a>this.offset)return this.advance(a-this.offset);if(aa)return b.data[a];a-=b.length;b=b.next}return 0};b.prototype.read=function(a,b){var c,k;null==b&&(b=!1);if(b===A)for(c=k=0;k>>31);a=b>>>20&2047;b&=1048575;if(2047===a)return b?NaN:Infinity*k;a-=1023;b=(b|1048576)*Math.pow(2,a-20);b+=c*Math.pow(2,a-52);return k*b};b.prototype.peekFloat64=function(a,b){null==a&&(a=0);this.peek(8,a,b);return x?x[0]:k()};b.prototype.readFloat80=function(a){this.read(10,a);return w()};w=function(){var a,b,c,k,h;c=n[0];k=n[1]; -a=v[9];b=v[8];h=1-2*(a>>>7);a=(a&127)<<8|b;if(0===a&&0===k&&0===c)return 0;if(32767===a)return 0===k&&0===c?Infinity*h:NaN;a-=16383;k*=Math.pow(2,a-31);k+=c*Math.pow(2,a-63);return h*k};b.prototype.peekFloat80=function(a,b){null==a&&(a=0);this.peek(10,a,b);return w()};b.prototype.readBuffer=function(a){var b,c,k,h;c=l.allocate(a);k=c.data;for(b=h=0;h>10),56320+(d&1023)));break;case "utf16-be":case "utf16be":case "utf16le":case "utf16-le":case "utf16bom":case "utf16-bom":switch(c){case "utf16be":case "utf16-be":d=!1;break;case "utf16le":case "utf16-le":d=!0;break;case "utf16bom":case "utf16-bom":if(2>b||(A=this.peekUInt16(a))===e)return k&&this.advance(a+2),u;d=65534===A;a+=2}for(;at||57343h||57343b;a=++b)d=~a,k=((d&15)<<3)+132,k<<=(d&112)>>>4,h[a]=d&128?132-k:k-132;else for(a=u=0;256>u;a=++u)d=a^85,k=d&15,k=(b=(d&112)>>>4)?k+k+1+32<>1,e=this.seekPoints[h].timestamp,e=a&&(c=h);c>this.seekPoints.length&&(c=this.seekPoints.length);return c};h.prototype.seek=function(a){if(this.format&&0b;0<=b?++e:--e)k= -this.stream.readString(null),t=this.stream.readString(null),h[k]=t;this.emit("metadata",h);this.headerCache=null;break;case "data":this.sentFirstDataChunk||(this.stream.advance(4),this.headerCache.size-=4,0===this.format.bytesPerPacket||this.sentDuration||(this.numFrames=this.headerCache.size/this.format.bytesPerPacket,this.emit("duration",this.numFrames/this.format.sampleRate*1E3|0)),this.sentFirstDataChunk=!0);b=this.stream.readSingleBuffer(this.headerCache.size);this.headerCache.size-=b.length; -this.emit("data",b);0>=this.headerCache.size&&(this.headerCache=null);break;default:this.stream.available(this.headerCache.size)&&(this.stream.advance(this.headerCache.size),this.headerCache=null)}}};return h})(l)},{"../demuxer":15,"./m4a":19}],19:[function(b,m,g){var l,a={}.hasOwnProperty,e=function(b,d){function c(){this.constructor=b}for(var e in d)a.call(d,e)&&(b[e]=d[e]);c.prototype=d.prototype;b.prototype=new c;b.__super__=d.prototype;return b},d=[].indexOf||function(a){for(var b=0,c=this.length;b< -c;b++)if(b in this&&this[b]===a)return b;return-1};l=b("../demuxer");b=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}var c,x,k,w,t,u,H;e(b,a);l.register(b);x="M4A ;M4P ;M4B ;M4V ;isom;mp42;qt ".split(";");b.probe=function(a){var b;return"ftyp"===a.peekString(4,4)&&(b=a.peekString(8,4),0<=d.call(x,b))};b.prototype.init=function(){this.atoms=[];this.offsets=[];this.track=null;return this.tracks=[]};w={};u={};k=function(a,b){var k,c,d,h,e;k=[];e=a.split(".").slice(0, --1);d=0;for(h=e.length;d=this.offsets[this.offsets.length-1];)a=w[this.atoms.join(".")],null!=a&&a.after&&a.after.call(this),this.atoms.pop(),this.offsets.pop(),this.readHeaders=!1}};k("ftyp",function(){var a;return(a=this.stream.readString(4), -0>d.call(x,a))?this.emit("error","Not a valid M4A file."):this.stream.advance(this.len-4)});k("moov.trak",function(){this.track={};return this.tracks.push(this.track)});k("moov.trak.tkhd",function(){this.stream.advance(4);this.stream.advance(8);this.track.id=this.stream.readUInt32();return this.stream.advance(this.len-16)});k("moov.trak.mdia.hdlr",function(){this.stream.advance(4);this.stream.advance(4);this.track.type=this.stream.readString(4);this.stream.advance(12);return this.stream.advance(this.len- -24)});k("moov.trak.mdia.mdhd",function(){this.stream.advance(4);this.stream.advance(8);this.track.timeScale=this.stream.readUInt32();this.track.duration=this.stream.readUInt32();return this.stream.advance(4)});c={ulaw:8,alaw:8,in24:24,in32:32,fl32:32,fl64:64};k("moov.trak.mdia.minf.stbl.stsd",function(){var a,b,k,d;this.stream.advance(4);a=this.stream.readUInt32();if("soun"!==this.track.type)return this.stream.advance(this.len-8);if(1!==a)return this.emit("error","Only expecting one entry in sample description atom!"); -this.stream.advance(4);a=this.track.format={};a.formatID=this.stream.readString(4);this.stream.advance(6);this.stream.advance(2);b=this.stream.readUInt16();this.stream.advance(6);a.channelsPerFrame=this.stream.readUInt16();a.bitsPerChannel=this.stream.readUInt16();this.stream.advance(4);a.sampleRate=this.stream.readUInt16();this.stream.advance(2);1===b?(a.framesPerPacket=this.stream.readUInt32(),this.stream.advance(4),a.bytesPerFrame=this.stream.readUInt32(),this.stream.advance(4)):0!==b&&this.emit("error", -"Unknown version in stsd atom");null!=c[a.formatID]&&(a.bitsPerChannel=c[a.formatID]);a.floatingPoint="fl32"===(k=a.formatID)||"fl64"===k;a.littleEndian="sowt"===a.formatID&&8>2;this.track.chapterTracks=[];for(b=k=0;k 0) {\t\t\tvar ratioWeight = this.ratioWeight;\t\t\tvar weight = this.lastWeight;\t\t\tvar firstWeight = 0;\t\t\tvar secondWeight = 0;\t\t\tvar sourceOffset = 0;\t\t\tvar outputOffset = 0;\t\t\tvar outputBuffer = this.outputBuffer;\t\t\tfor (; weight < 1; weight += ratioWeight) {\t\t\t\tsecondWeight = weight % 1;\t\t\t\tfirstWeight = 1 - secondWeight;",b=0;b 0) {\t\t\tvar ratioWeight = this.ratioWeight;\t\t\tvar weight = 0;",b=0;b=this.readyMark||this.ended?(this.buffering=!1,this.emit("ready")):this.asset.decodePacket()};b.prototype.read= -function(){if(0===this.buffers.length)return null;this.asset.decodePacket();return this.buffers.shift()};b.prototype.reset=function(){this.buffers.length=0;this.buffering=!0;return this.asset.decodePacket()};return b}(b("./core/events"));m.exports=b},{"./core/events":9}],30:[function(b,m,g){var l,a={}.hasOwnProperty,e=function(b,e){function h(){this.constructor=b}for(var c in e)a.call(e,c)&&(b[c]=e[c]);h.prototype=e.prototype;b.prototype=new h;b.__super__=e.prototype;return b};g=b("../../core/events"); -l=b("../../core/buffer");b=function(a){function b(a){this.file=a;if("undefined"===typeof FileReader||null===FileReader)return this.emit("error","This browser does not have FileReader support.");this.offset=0;this.length=this.file.size;this.chunkSize=1048576;this.file[this.slice="slice"]||this.file[this.slice="webkitSlice"]||this.file[this.slice="mozSlice"]}e(b,a);b.prototype.start=function(){if(this.reader&&!this.active)return this.loop();this.reader=new FileReader;this.active=!0;this.reader.onload= -function(a){return function(b){b=new l(new Uint8Array(b.target.result));a.offset+=b.length;a.emit("data",b);a.active=!1;if(a.offsett;d=0<=t?++e:--e)b[d]=k.charCodeAt(d)&255;b=new l(b);a.offset+=b.length;a.emit("data",b);a.offset>=a.length&&a.emit("end");a.inflight=!1;if(!(a.offset>=a.length))return a.loop()}}(this);this.xhr.onprogress=function(a){return function(b){return a.emit("progress",(a.offset+b.loaded)/a.length*100)}}(this);this.xhr.onerror=function(a){return function(b){a.emit("error",b);return a.pause()}}(this); -this.xhr.onabort=function(a){return function(b){return a.inflight=!1}}(this);this.xhr.open("GET",this.url,!0);this.xhr.responseType="arraybuffer";this.xhr.setRequestHeader("Range","bytes="+this.offset+"-"+Math.min(this.offset+this.chunkSize,this.length));this.xhr.overrideMimeType("text/plain; charset=x-user-defined");return this.xhr.send(null)};b.prototype.pause=function(){var a;this.inflight=!1;return null!=(a=this.xhr)?a.abort():void 0};b.prototype.reset=function(){this.pause();return this.offset= -0};return b}(g);m.exports=b},{"../../core/buffer":7,"../../core/events":9}],32:[function(b,m,g){(function(l){var a,e,d,g=function(a,b){return function(){return a.apply(b,arguments)}},h={}.hasOwnProperty,c=function(a,b){function d(){this.constructor=a}for(var c in b)h.call(b,c)&&(a[c]=b[c]);d.prototype=b.prototype;a.prototype=new d;a.__super__=b.prototype;return a};d=b("../core/events");e=b("../core/bufferlist");a=b("../core/buffer");d=function(b){function k(b){this.loop=g(this.loop,this);b instanceof -e?this.list=b:(this.list=new e,this.list.append(new a(b)));this.paused=!0}var d,h;c(k,b);h=l.setImmediate||function(a){return l.setTimeout(a,0)};d=l.clearImmediate||function(a){return l.clearTimeout(a)};k.prototype.start=function(){this.paused=!1;return this._timer=h(this.loop)};k.prototype.loop=function(){this.emit("progress",(this.list.numBuffers-this.list.availableBuffers+1)/this.list.numBuffers*100|0);this.emit("data",this.list.first);return this.list.advance()?h(this.loop):this.emit("end")}; -k.prototype.pause=function(){d(this._timer);return this.paused=!0};k.prototype.reset=function(){this.pause();return this.list.rewind()};return k}(d);m.exports=d}).call(this,"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"../core/buffer":7,"../core/bufferlist":8,"../core/events":9}]},{},[1])(1)});(function e$$0(b,m,g){function l(d,e){if(!m[d]){if(!b[d]){var h="function"==typeof require&&require;if(!e&&h)return h(d,!0);if(a)return a(d,!0);throw Error("Cannot find module '"+d+"'");}h=m[d]={exports:{}};b[d][0].call(h.exports,function(a){var e=b[d][1][a];return l(e?e:a)},h,h.exports,e$$0,b,m,g)}return m[d].exports}for(var a="function"==typeof require&&require,e=0;ee;e++){for(var c=b+e,l=0;3>l;l++){this.mp3_stream.reset(c);try{var k=g.decode(this.mp3_stream)}catch(t){break}var w= -k.framesize();if(null==w)break;c+=w}if(3===l)break}3!==l&&(e=0);this.mp3_stream.reset(b+e);0===this.demuxer.seekPoints.length&&(a=this.stream.offset/(this.format.bitrate/8)*this.format.sampleRate);this.seeking=!0;return a}});b.exports=r},{"./frame":4,"./header":5,"./layer1":9,"./layer2":10,"./layer3":11,"./stream":12,"./synth":13}],3:[function(r,b,m){var g=r("./id3").ID3v23Stream,l=r("./id3").ID3v22Stream,a=r("./header"),e=r("./stream"),d=AV.Demuxer.extend(function(){AV.Demuxer.register(this);this.probe= -function(b){var c=b.offset,l=d.getID3v2Header(b);l&&b.advance(10+l.length);var l=new e(new AV.Bitstream(b)),k=null;try{k=a.decode(l)}catch(w){}b.seek(c);return!!k};this.getID3v2Header=function(a){if("ID3"==a.peekString(0,3)){a=AV.Stream.fromBuffer(a.peekBuffer(0,10));a.advance(3);var b=a.readUInt8(),d=a.readUInt8(),k=a.readUInt8();a=a.readBuffer(4).data;return{version:"2."+b+"."+d,major:b,minor:d,flags:k,length:a[0]<<21|a[1]<<14|a[2]<<7|a[3]}}return null};var b=[[32,17],[17,9]];this.prototype.parseDuration= -function(d){var c=this.stream,e,k=c.offset;if(!d||3!==d.layer)return!1;c.advance(b[d.flags&a.FLAGS.LSF_EXT?1:0][1===d.nchannels()?1:0]);var w=c.readString(4);if("Xing"===w||"Info"===w){var t=c.readUInt32();t&1&&(e=c.readUInt32());if(t&2)var u=c.readUInt32();if(t&4&&e&&u)for(k=0;100>k;k++){var w=c.readUInt8()/256*u|0,l=k/100*e*d.nbsamples()*32|0;this.addSeekPoint(w,l)}t&8&&c.advance(4)}else if(c.seek(k+4+32),w=c.readString(4),"VBRI"==w&&1===c.readUInt16())for(c.advance(4),c.advance(4),e=c.readUInt32(), -u=c.readUInt16(),c.readUInt16(),k=c.readUInt16(),t=c.readUInt16(),l="readUInt"+8*k,k=w=0;k>1)][d]:l[this.layer- -1][d];d=b.read(2);if(3===d)throw Error("Invalid sampling frequency");this.samplerate=a[d];this.flags&g.FLAGS.LSF_EXT&&(this.samplerate/=2,this.flags&g.FLAGS.MPEG_2_5_EXT&&(this.samplerate/=2));b.read(1)&&(this.flags|=g.FLAGS.PADDING);b.read(1)&&(this.private_bits|=256);this.mode=3-b.read(2);this.mode_extension=b.read(2);b.read(1)&&(this.flags|=g.FLAGS.COPYRIGHT);b.read(1)&&(this.flags|=g.FLAGS.ORIGINAL);this.emphasis=b.read(2);this.flags&g.FLAGS.PROTECTION&&(this.crc_target=b.read(16))};g.decode= -function(a){for(var b=a.next_frame,l=!0,h=null;l;){l=!1;if(a.sync){if(!a.available(g.BUFFER_GUARD))throw a.next_frame=b,new AV.UnderflowError;if(255!==a.getU8(b)||224!==(a.getU8(b+1)&224))throw a.this_frame=b,a.next_frame=b+1,new AV.UnderflowError;}else{a.seek(8*b);if(!a.doSync())throw new AV.UnderflowError;b=a.nextByte()}a.this_frame=b;a.next_frame=b+1;a.seek(8*a.this_frame);h=new g;h.decode(a);0===h.bitrate&&((0===a.freerate||!a.sync||3===h.layer&&64E4x||3===b.layer&&640=this.header.length)return null;var b=this.readHeader(),a=b.identifier;if(0===b.identifier.charCodeAt(0))return this.offset+=this.header.length+1,null;if(!this.frameTypes[a])for(var e in this.map)if(-1!== -this.map[e].indexOf(a)){a=e;break}this.frameTypes[a]?(a=this.decodeFrame(b,this.frameTypes[a]),e=Object.keys(a),1===e.length&&(a=a[e[0]]),a={value:a}):a={value:this.stream.readBuffer(Math.min(b.length,this.header.length-this.offset))};a.key=this.names[b.identifier]?this.names[b.identifier]:b.identifier;"coverArt"===a.key&&(a.value=a.value.data);this.offset+=10+b.length;return a},decodeFrame:function(b,a){var e=this.stream,d=e.offset,q=0,h={},c=Object.keys(a).length,x=0,k;for(k in a){var w=a[k],t= -b.length-(e.offset-d);x++;switch(k){case "encoding":q=e.readUInt8();continue;case "language":h.language=e.readString(3);continue}switch(w){case "latin1":h[k]=e.readString(x===c?t:null,"latin1");break;case "string":h[k]=e.readString(x===c?t:null,g[q]);break;case "binary":h[k]=e.readBuffer(t);break;case "int16":h[k]=e.readInt16();break;case "int8":h[k]=e.readInt8();break;case "int24":h[k]=e.readInt24();break;case "int32":h[k]=e.readInt32();break;case "int32+":h[k]=e.readInt32();if(4e;e++)a=(a<<7)+(this.stream.readUInt8()&127);else a=this.stream.readUInt32();return{identifier:b,length:a,flags:this.stream.readUInt16()}}, -map:{text:"TIT1 TIT2 TIT3 TALB TOAL TRCK TPOS TSST TSRC TPE1 TPE2 TPE3 TPE4 TOPE TEXT TOLY TCOM TMCL TIPL TENC TBPM TLEN TKEY TLAN TCON TFLT TMED TMOO TCOP TPRO TPUB TOWN TRSN TRSO TOFN TDLY TDEN TDOR TDRC TDRL TDTG TSSE TSOA TSOP TSOT TDAT TIME TORY TRDA TSIZ TYER TCMP TSO2 TSOC".split(" "),url:"WCOM WCOP WOAF WOAR WOAS WORS WPAY WPUB".split(" ")},frameTypes:{text:{encoding:1,value:"string"},url:{value:"latin1"},TXXX:{encoding:1,description:"string",value:"string"},WXXX:{encoding:1,description:"string", -value:"latin1"},USLT:{encoding:1,language:1,description:"string",value:"string"},COMM:{encoding:1,language:1,description:"string",value:"string"},APIC:{encoding:1,mime:"latin1",type:"int8",description:"string",data:"binary"},UFID:{owner:"latin1",identifier:"binary"},MCDI:{value:"binary"},PRIV:{owner:"latin1",value:"binary"},GEOB:{encoding:1,mime:"latin1",filename:"string",description:"string",data:"binary"},PCNT:{value:"int32+"},POPM:{email:"latin1",rating:"int8",counter:"int32+"},AENC:{owner:"latin1", -previewStart:"int16",previewLength:"int16",encryptionInfo:"binary"},ETCO:{format:"int8",data:"binary"},MLLT:{framesBetweenReference:"int16",bytesBetweenReference:"int24",millisecondsBetweenReference:"int24",bitsForBytesDeviation:"int8",bitsForMillisecondsDev:"int8",data:"binary"},SYTC:{format:"int8",tempoData:"binary"},SYLT:{encoding:1,language:1,format:"int8",contentType:"int8",description:"string",data:"binary"},RVA2:{identification:"latin1",data:"binary"},EQU2:{interpolationMethod:"int8",identification:"latin1", -data:"binary"},RVRB:{left:"int16",right:"int16",bouncesLeft:"int8",bouncesRight:"int8",feedbackLL:"int8",feedbackLR:"int8",feedbackRR:"int8",feedbackRL:"int8",premixLR:"int8",premixRL:"int8"},RBUF:{size:"int24",flag:"int8",offset:"int32"},LINK:{identifier:"frame_id",url:"latin1",data:"binary"},POSS:{format:"int8",position:"binary"},USER:{encoding:1,language:1,value:"string"},OWNE:{encoding:1,price:"latin1",purchaseDate:"date",seller:"string"},COMR:{encoding:1,price:"latin1",validUntil:"date",contactURL:"latin1", -receivedAs:"int8",seller:"string",description:"string",logoMime:"latin1",logo:"binary"},ENCR:{owner:"latin1",methodSymbol:"int8",data:"binary"},GRID:{owner:"latin1",groupSymbol:"int8",data:"binary"},SIGN:{groupSymbol:"int8",signature:"binary"},SEEK:{value:"int32"},ASPI:{dataStart:"int32",dataLength:"int32",numPoints:"int16",bitsPerPoint:"int8",data:"binary"},IPLS:{encoding:1,value:"string"},RVAD:{adjustment:"int8",bits:"int8",data:"binary"},EQUA:{adjustmentBits:"int8",data:"binary"}},names:{TIT1:"grouping", -TIT2:"title",TIT3:"subtitle",TALB:"album",TOAL:"originalAlbumTitle",TRCK:"trackNumber",TPOS:"diskNumber",TSST:"setSubtitle",TSRC:"ISRC",TPE1:"artist",TPE2:"albumArtist",TPE3:"conductor",TPE4:"modifiedBy",TOPE:"originalArtist",TEXT:"lyricist",TOLY:"originalLyricist",TCOM:"composer",TMCL:"musicianCreditsList",TIPL:"involvedPeopleList",TENC:"encodedBy",TBPM:"tempo",TLEN:"length",TKEY:"initialKey",TLAN:"language",TCON:"genre",TFLT:"fileType",TMED:"mediaType",TMOO:"mood",TCOP:"copyright",TPRO:"producedNotice", -TPUB:"publisher",TOWN:"fileOwner",TRSN:"internetRadioStationName",TRSO:"internetRadioStationOwner",TOFN:"originalFilename",TDLY:"playlistDelay",TDEN:"encodingTime",TDOR:"originalReleaseTime",TDRC:"recordingTime",TDRL:"releaseTime",TDTG:"taggingTime",TSSE:"encodedWith",TSOA:"albumSortOrder",TSOP:"performerSortOrder",TSOT:"titleSortOrder",TXXX:"userText",USLT:"lyrics",APIC:"coverArt",UFID:"uniqueIdentifier",MCDI:"CDIdentifier",COMM:"comments",WCOM:"commercialInformation",WCOP:"copyrightInformation", -WOAF:"officialAudioFileWebpage",WOAR:"officialArtistWebpage",WOAS:"officialAudioSourceWebpage",WORS:"officialInternetRadioStationHomepage",WPAY:"payment",WPUB:"officialPublisherWebpage",WXXX:"url",PRIV:"private",GEOB:"generalEncapsulatedObject",PCNT:"playCount",POPM:"rating",AENC:"audioEncryption",ETCO:"eventTimingCodes",MLLT:"MPEGLocationLookupTable",SYTC:"synchronisedTempoCodes",SYLT:"synchronisedLyrics",RVA2:"volumeAdjustment",EQU2:"equalization",RVRB:"reverb",RBUF:"recommendedBufferSize",LINK:"link", -POSS:"positionSynchronisation",USER:"termsOfUse",OWNE:"ownership",COMR:"commercial",ENCR:"encryption",GRID:"groupIdentifier",SIGN:"signature",SEEK:"seek",ASPI:"audioSeekPointIndex",TDAT:"date",TIME:"time",TORY:"originalReleaseYear",TRDA:"recordingDates",TSIZ:"size",TYER:"year",IPLS:"involvedPeopleList",RVAD:"volumeAdjustment",EQUA:"equalization",TCMP:"compilation",TSO2:"albumArtistSortOrder",TSOC:"composerSortOrder"}});m.ID3v22Stream=m.ID3v23Stream.extend({readHeader:function(){var b=this.stream.readString(3); -this.frameReplacements[b]&&!this.frameTypes[b]&&(this.frameTypes[b]=this.frameReplacements[b]);return{identifier:this.replacements[b]||b,length:this.stream.readUInt24()}},replacements:{UFI:"UFID",TT1:"TIT1",TT2:"TIT2",TT3:"TIT3",TP1:"TPE1",TP2:"TPE2",TP3:"TPE3",TP4:"TPE4",TCM:"TCOM",TXT:"TEXT",TLA:"TLAN",TCO:"TCON",TAL:"TALB",TPA:"TPOS",TRK:"TRCK",TRC:"TSRC",TYE:"TYER",TDA:"TDAT",TIM:"TIME",TRD:"TRDA",TMT:"TMED",TFT:"TFLT",TBP:"TBPM",TCR:"TCOP",TPB:"TPUB",TEN:"TENC",TSS:"TSSE",TOF:"TOFN",TLE:"TLEN", -TSI:"TSIZ",TDY:"TDLY",TKE:"TKEY",TOT:"TOAL",TOA:"TOPE",TOL:"TOLY",TOR:"TORY",TXX:"TXXX",WAF:"WOAF",WAR:"WOAR",WAS:"WOAS",WCM:"WCOM",WCP:"WCOP",WPB:"WPUB",WXX:"WXXX",IPL:"IPLS",MCI:"MCDI",ETC:"ETCO",MLL:"MLLT",STC:"SYTC",ULT:"USLT",SLT:"SYLT",COM:"COMM",RVA:"RVAD",EQU:"EQUA",REV:"RVRB",GEO:"GEOB",CNT:"PCNT",POP:"POPM",BUF:"RBUF",CRA:"AENC",LNK:"LINK",TST:"TSOT",TSP:"TSOP",TSA:"TSOA",TCP:"TCMP",TS2:"TSO2",TSC:"TSOC"},frameReplacements:{PIC:{encoding:1,format:"int24",type:"int8",description:"string", -data:"binary"},CRM:{owner:"latin1",description:"latin1",data:"binary"}}})},{}],8:[function(r,b,m){function g(){this.tmp_imdct36=new Float64Array(18);this.tmp_dctIV=new Float64Array(18);this.tmp_sdctII=new Float64Array(9)}function l(a,b,e){var A,l,n,g,p,m,B,r,D,C,y,E;A=a[3]+a[5];l=a[3]-a[5];n=a[6]+a[2];g=a[6]-a[2];p=a[1]+a[7];m=a[1]-a[7];B=a[8]+a[0];r=a[8]-a[0];D=A+n+B;C=(l+g)*-c;y=(l-r)*-d;E=(g+r)*-x;l=(l-g+r)*-q;m*=-q;g=(n-B)*-w;B=(A-B)*-k;n=(A-n)*-h;A=a[4]+p;a=2*a[4]-p;b[e+0]=A+D;b[e+2]=C-(m+y); -b[e+4]=n-(a+g);b[e+6]=l;b[e+8]=a-g-B;b[e+10]=m-E-y;b[e+12]=D-2*A;b[e+14]=m+E+C;b[e+16]=a+B+n}g.prototype.imdct36=function(a,b){var k=this.tmp_imdct36;this.dctIV(a,k);for(var c=0;9>c;++c)b[c]=k[9+c];for(c=9;27>c;++c)b[c]=-k[36-(9+c)-1];for(c=27;36>c;++c)b[c]=-k[c-27]};var a=[];for(r=0;18>r;r++)a[r]=2*Math.cos(Math.PI*(2*r+1)/72);g.prototype.dctIV=function(b,k){for(var c=this.tmp_dctIV,d=0;18>d;++d)c[d]=b[d]*a[d];this.sdctII(c,k);k[0]/=2;for(d=1;18>d;++d)k[d]=k[d]/2-k[d-1]};var e=[];for(r=0;9>r;++r)e[r]= -2*Math.cos(Math.PI*(2*r+1)/36);g.prototype.sdctII=function(a,b){for(var k=this.tmp_sdctII,c=0;9>c;++c)k[c]=a[c]+a[18-c-1];l(k,b,0);for(c=0;9>c;++c)k[c]=(a[c]-a[18-c-1])*e[c];l(k,b,1);for(c=3;18>c;c+=2)b[c]-=b[c-2]};var d=2*Math.cos(1*Math.PI/18),q=2*Math.cos(3*Math.PI/18),h=2*Math.cos(4*Math.PI/18),c=2*Math.cos(5*Math.PI/18),x=2*Math.cos(7*Math.PI/18),k=2*Math.cos(8*Math.PI/18),w=2*Math.cos(16*Math.PI/18);g.S=[[.608761429,-.923879533,-.130526192,.991444861,-.382683432,-.79335334],[-.79335334,.382683432, -.991444861,.130526192,-.923879533,-.608761429],[.382683432,-.923879533,.923879533,-.382683432,-.382683432,.923879533],[-.923879533,-.382683432,.382683432,.923879533,.923879533,.382683432],[.130526192,-.382683432,.608761429,-.79335334,.923879533,-.991444861],[-.991444861,-.923879533,-.79335334,-.608761429,-.382683432,-.130526192]];b.exports=g},{}],9:[function(r,b,m){function g(){this.allocation=e.makeArray([2,32],Uint8Array);this.scalefactor=e.makeArray([2,32],Uint8Array)}var l=r("./tables"),a=r("./header"); -m=r("./frame");var e=r("./utils");m.layers[1]=g;var d=new Float32Array([1.33333333333333,1.14285714285714,1.06666666666667,1.03225806451613,1.01587301587302,1.00787401574803,1.00392156862745,1.00195694716243,1.00097751710655,1.00048851978505,1.0002442002442,1.00012208521548,1.00006103888177,1.00003051850948]);g.prototype.decode=function(b,d){var c=d.header,e=c.nchannels(),k=32;c.mode===a.MODE.JOINT_STEREO&&(c.flags|=a.FLAGS.I_STEREO,k=4+4*c.mode_extension);for(var c=this.allocation,w=0;ww;w++){u=b.read(4);if(15===u)throw Error("forbidden bit allocation value");c[0][w]=c[1][w]=u?u+1:0}for(var g=this.scalefactor,w=0;32>w;w++)for(t=0;tA;A++){for(w=0;ww;w++)if(u=c[0][w])for(u=this.sample(b,u),t=0;t>b-1);return c*d[b-2]};b.exports=g},{"./frame":4,"./header":5,"./tables":14,"./utils":15}],10:[function(r,b,m){function g(){this.samples=new Float64Array(3);this.allocation=e.makeArray([2,32],Uint8Array);this.scfsi=e.makeArray([2,32],Uint8Array);this.scalefactor=e.makeArray([2,32,3],Uint8Array)}var l=r("./tables"),a=r("./header");m=r("./frame"); -var e=r("./utils");m.layers[2]=g;var d=[{sblimit:27,offsets:[7,7,7,6,6,6,6,6,6,6,6,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0]},{sblimit:30,offsets:[7,7,7,6,6,6,6,6,6,6,6,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0,0]},{sblimit:8,offsets:[5,5,2,2,2,2,2,2]},{sblimit:12,offsets:[5,5,2,2,2,2,2,2,2,2,2,2]},{sblimit:30,offsets:[4,4,4,4,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]}],q=[{nbal:2,offset:0},{nbal:2,offset:3},{nbal:3,offset:3},{nbal:3,offset:1},{nbal:4,offset:2},{nbal:4,offset:3},{nbal:4,offset:4},{nbal:4, -offset:5}],h=[[0,1,16],[0,1,2,3,4,5,16],[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],[0,1,3,4,5,6,7,8,9,10,11,12,13,14,15],[0,1,2,3,4,5,6,7,8,9,10,11,12,13,16],[0,2,4,5,6,7,8,9,10,11,12,13,14,15,16]],c=[{nlevels:3,group:2,bits:5,C:1.33333333333,D:.5},{nlevels:5,group:3,bits:7,C:1.6,D:.5},{nlevels:7,group:0,bits:3,C:1.14285714286,D:.25},{nlevels:9,group:4,bits:10,C:1.77777777777,D:.5},{nlevels:15,group:0,bits:4,C:1.06666666666,D:.125},{nlevels:31,group:0,bits:5,C:1.03225806452,D:.0625},{nlevels:63,group:0, -bits:6,C:1.01587301587,D:.03125},{nlevels:127,group:0,bits:7,C:1.00787401575,D:.015625},{nlevels:255,group:0,bits:8,C:1.00392156863,D:.0078125},{nlevels:511,group:0,bits:9,C:1.00195694716,D:.00390625},{nlevels:1023,group:0,bits:10,C:1.00097751711,D:.001953125},{nlevels:2047,group:0,bits:11,C:1.00048851979,D:9.765625E-4},{nlevels:4095,group:0,bits:12,C:1.00024420024,D:4.8828125E-4},{nlevels:8191,group:0,bits:13,C:1.00012208522,D:2.4414063E-4},{nlevels:16383,group:0,bits:14,C:1.00006103888,D:1.2207031E-4}, -{nlevels:32767,group:0,bits:15,C:1.00003051851,D:6.103516E-5},{nlevels:65535,group:0,bits:16,C:1.00001525902,D:3.051758E-5}];g.prototype.decode=function(b,k){var e=k.header,t=e.nchannels(),u;if(e.flags&a.FLAGS.LSF_EXT)u=4;else if(e.flags&a.FLAGS.FREEFORMAT)u=48E3===e.samplerate?0:1;else{var g=e.bitrate;if(2===t)g/=2;else if(192E3=g?32E3===e.samplerate?3:2:8E4>=g?0:48E3===e.samplerate?0:1}var g=d[u].sblimit,A=d[u].offsets,m=32;e.mode===a.MODE.JOINT_STEREO&& -(e.flags|=a.FLAGS.I_STEREO,m=4+4*e.mode_extension);m>g&&(m=g);for(var e=this.allocation,n=0;nr;r++){for(n=0;n>2]];for(var B=0;3>B;B++)k.sbsample[p][3*r+B][n]=this.samples[B]*u}else for(B=0;3>B;B++)k.sbsample[p][3*r+B][n]=0;for(n=m;n>2]],B=0;3>B;B++)k.sbsample[p][3*r+B][n]=this.samples[B]*u;else for(p=0;p -B;B++)k.sbsample[p][3*r+B][n]=0;for(p=0;pB;B++)for(n=g;32>n;n++)k.sbsample[p][3*r+B][n]=0}};g.prototype.decodeSamples=function(a,b){var c=this.samples,d=b.group;if(d)for(var e=a.read(b.bits),h=b.nlevels,g=0;3>g;g++)c[g]=e%h,e=e/h|0;else for(d=b.bits,g=0;3>g;g++)c[g]=a.read(d);for(g=0;3>g;g++)e=c[g]^1<g.main_data_begin+n&&(d=0);var e=g.main_data_begin+n-d,l=0;if(0===g.main_data_begin)c=a.stream,a.md_len=0,l=e;else{if(g.main_data_begin>a.md_len)throw Error("bad main_data_begin pointer");var p=a.md_len;if(e>g.main_data_begin){if(a.md_len+e-g.main_data_begin>q.BUFFER_MDLEN)throw Error("Assertion failed: (stream.md_len + md_len - si.main_data_begin <= MAD_MP3FrameHeader.BUFFER_MDLEN)"); -l=e-g.main_data_begin;this.memcpy(a.main_data,a.md_len,a.stream.stream,a.nextByte(),l);a.md_len+=l}c=new AV.Bitstream(AV.Stream.fromBuffer(new AV.Buffer(a.main_data)));c.advance(8*(p-g.main_data_begin))}n-=l;this.decodeMainData(c,b,g,h);n>=d?(this.memcpy(a.main_data,0,a.stream.stream,a.next_frame-d,d),a.md_len=d):(ed&&(h=d-n),hm;m++)q.table_select[m]=a.read(5);for(m=0;3>m;m++)q.subblock_gain[m]=a.read(3)}else{for(m=q.block_type= -0;3>m;m++)q.table_select[m]=a.read(5);q.region0_count=a.read(4);q.region1_count=a.read(3)}q.flags|=a.read(c?2:3)}return{si:e,data_bitlen:h,priv_bitlen:g}};e.prototype.decodeMainData=function(a,b,c,e){var h=b.header,g=h.samplerate;h.flags&q.FLAGS.MPEG_2_5_EXT&&(g*=2);g=(g>>7&15)+(g>>15&1)-8;h.flags&q.FLAGS.MPEG_2_5_EXT&&(g+=3);for(var l=h.flags&q.FLAGS.LSF_EXT?1:2,n=this.xr,v=0;vy;++y,x+=18)this.imdct_l(n[r].subarray(x,x+18),I,E),this.overlap(I,b.overlap[r][y],C,y);else for(y=0;2>y;++y,x+=18)this.imdct_s(n[r].subarray(x,x+18),I),this.overlap(I,b.overlap[r][y],C,y);this.freqinver(C,1);for(y=576;36y;++y)this.overlap_z(b.overlap[r][y],C,y),y&1&&this.freqinver(C,y)}}};e.prototype.scalefactors=function(a,b,c,e){var h=a.offset(),g=d.SFLEN_TABLE[b.scalefac_compress].slen1,l=d.SFLEN_TABLE[b.scalefac_compress].slen2,n;if(2===b.block_type){n=0;for(c=b.flags&d.MIXED_BLOCK_FLAG?17:18;c--;)b.scalefac[n++]=a.read(g);for(c= -18;c--;)b.scalefac[n++]=a.read(l);for(c=3;c--;)b.scalefac[n++]=0}else{if(e&8)for(n=0;6>n;++n)b.scalefac[n]=c.scalefac[n];else for(n=0;6>n;++n)b.scalefac[n]=a.read(g);if(e&4)for(n=6;11>n;++n)b.scalefac[n]=c.scalefac[n];else for(n=6;11>n;++n)b.scalefac[n]=a.read(g);if(e&2)for(n=11;16>n;++n)b.scalefac[n]=c.scalefac[n];else for(n=11;16>n;++n)b.scalefac[n]=a.read(l);if(e&1)for(n=16;21>n;++n)b.scalefac[n]=c.scalefac[n];else for(n=16;21>n;++n)b.scalefac[n]=a.read(l);b.scalefac[21]=0}return a.offset()-h}; -e.prototype.scalefactors_lsf=function(a,b,c,e){var h=a.offset(),g=b.scalefac_compress,l=2===b.block_type?b.flags&d.MIXED_BLOCK_FLAG?2:1:0,n=new Int32Array(4);if(e&d.I_STEREO&&c){g>>>=1;180>g?(n[0]=g/36,n[1]=g%36/6,n[2]=g%36%6,n[3]=0,e=d.NSFB_TABLE[3][l]):244>g?(g-=180,n[0]=g%64>>>4,n[1]=g%16>>>2,n[2]=g%4,n[3]=0,e=d.NSFB_TABLE[4][l]):(g-=244,n[0]=g/3,n[1]=g%3,n[2]=0,n[3]=0,e=d.NSFB_TABLE[5][l]);for(p=q=0;4>p;++p)for(g=(1<q;)b.scalefac[q]=0,c.scalefac[q++]=0}else{400>g?(n[0]=(g>>>4)/5,n[1]=(g>>>4)%5,n[2]=g%16>>>2,n[3]=g%4,e=d.NSFB_TABLE[0][l]):500>g?(g-=400,n[0]=(g>>>2)/5,n[1]=(g>>>2)%5,n[2]=g%4,n[3]=0,e=d.NSFB_TABLE[1][l]):(g-=500,n[0]=g/3,n[1]=g%3,n[2]=0,n[3]=0,b.flags|=d.PREFLAG,e=d.NSFB_TABLE[2][l]);for(var q=0,p=0;4>p;p++)for(var m=0;mq;)b.scalefac[q++]=0}return a.offset()-h};e.prototype.huffmanDecode=function(a,b,c,e,g){var l=this._exponents,m=0;g=c.part2_3_length- -g;if(0>g)throw Error("bad audio data length");this.exponents(c,e,l);var n=a.copy();a.advance(g);a=8-n.bitPosition;a+=7+(24-a)&-8;var v=n.read(a);g-=a;var p=0,x=0,r=this.reqcache,G=p+e[m++],D=c.region0_count+1,C=h.huff_pair_table[c.table_select[x]],y=C.table,E=C.linbits,C=C.startbits;if("undefined"===typeof y)throw Error("bad Huffman table select");for(var I=0,K=l[I++],L=0,P=c.big_values;P--&&0a){var J=10+(21-a)&-8,v=v<>a-z&(1<>a-z&(1<>a-E&(1<>a-E&(1< -a+g)throw Error("Huffman data overrun");for(var y=h.huff_quad_table[c.flags&d.COUNT1TABLE_SELECT],F=this.requantize(1,K);0=p;)10>a&&(v=v<<16|n.read(16),a+=16,g-=16),c=y[v>>a-4&15],c["final"]||(a-=4,c=y[c.ptr.offset+(v>>a-c.ptr.bits&(1<a+g&&(p-=4);if(-g>8*q.BUFFER_GUARD)throw Error("assertion failed: (-bits_left <= MP3FrameHeader.BUFFER_GUARD * CHAR_BIT)");for(;576>p;)b[p]=0,b[p+1]=0,p+=2};e.prototype.requantize=function(a,b){var c=b%4>>0;b=b/4>>0;var d=Math.pow(a,4/3),d=d*Math.pow(2,b/4);c&&(d*=Math.pow(2,c/4));0>b&&(d/=Math.pow(2,.75*-b));return d};e.prototype.exponents=function(a,b,c){var e=a.global_gain-210,h=a.flags&d.SCALEFAC_SCALE?2:1;if(2===a.block_type){var g= -0,l=0;if(a.flags&d.MIXED_BLOCK_FLAG)for(var n=a.flags&d.PREFLAG?-1:0;36>l;)c[g]=e-(a.scalefac[g]+(d.PRETAB[g]&n)<l;)c[g+0]=n-(a.scalefac[g+0]<g;g++)c[g]=e-(a.scalefac[g]+d.PRETAB[g]<g;g++)c[g]=e-(a.scalefac[g]<p;p++)l[p]=e.mode_extension;if(e.mode_extension&d.I_STEREO){var x=g.ch[1],r=a[1];e.flags|=q.FLAGS.tables.I_STEREO;if(2===x.block_type){var G,D,C,y=new Uint32Array(3),E,g=n=G=D=C=y[0]=y[1]=y[2]=0;if(x.flags&d.MIXED_BLOCK_FLAG){for(;36>n;){m=h[g++];for(p=0;pn;){m= -h[g++];for(p=0;pn;n+=m){m=h[g++];for(p=0;pn;++g,n+=m){if(m=h[g],l[g]&d.I_STEREO)if(b[g])l[g]&=~d.I_STEREO; -else for(is_pos=x.scalefac[g],p=0;pn;++g,n+=m)if(m=h[g],l[g]&d.I_STEREO)if(is_pos=x.scalefac[g],7<=is_pos)l[g]&=~d.I_STEREO;else for(p=0;pn;++g,n+=m)if(m=h[g],l[g]===d.MS_STEREO)for(p=0;pe;++e){var g=a[c-e-1],h=a[c+e];a[c-e-1]=g*d.CS[e]-h*d.CA[e];a[c+e]=h*d.CS[e]+g*d.CA[e]}};e.prototype.imdct_l=function(a,b,c){this.imdct.imdct36(a,b);switch(c){case 0:for(a=0;36>a;++a)b[a]*=d.WINDOW_L[a];break;case 1:for(a=0;18>a;++a)b[a]*=d.WINDOW_L[a];for(a=24;30>a;++a)b[a]*=d.WINDOW_S[a-18];for(a=30;36>a;++a)b[a]=0;break;case 3:for(a=0;6>a;++a)b[a]=0;for(a=6;12>a;++a)b[a]*= -d.WINDOW_S[a-6];for(a=18;36>a;++a)b[a]*=d.WINDOW_L[a]}};e.prototype.imdct_s=function(a,b){var e=0,g;g=0;for(var h=new Float64Array(36),l,q=0;3>q;++q){for(var n=0,m=0;3>m;++m)l=a[g+0]*c.S[n][0]+a[g+1]*c.S[n][1]+a[g+2]*c.S[n][2]+a[g+3]*c.S[n][3]+a[g+4]*c.S[n][4]+a[g+5]*c.S[n][5],h[e+m+0]=l,h[e+5-m]=-h[e+m+0],++n,l=a[g+0]*c.S[n][0]+a[g+1]*c.S[n][1]+a[g+2]*c.S[n][2]+a[g+3]*c.S[n][3]+a[g+4]*c.S[n][4]+a[g+5]*c.S[n][5],h[e+m+6]=l,h[e+11-m]=h[e+m+6],++n;e+=12;g+=6}for(m=g=e=0;6>m;++m)b[m+0]=0,b[m+6]=h[e+ -0+0]*d.WINDOW_S[g+0],l=h[e+0+6]*d.WINDOW_S[g+6]+h[e+12+0]*d.WINDOW_S[g+0],b[m+12]=l,l=h[e+12+6]*d.WINDOW_S[g+6]+h[e+24+0]*d.WINDOW_S[g+0],b[m+18]=l,b[m+24]=h[e+24+6]*d.WINDOW_S[g+6],b[m+30]=0,++e,++g};e.prototype.overlap=function(a,b,c,d){for(var e=0;18>e;++e)c[e][d]=a[e]+b[e],b[e]=a[e+18]};e.prototype.freqinver=function(a,b){for(var c=1;18>c;c+=2)a[c][b]=-a[c][b]};e.prototype.overlap_z=function(a,b,c){for(var d=0;18>d;++d)b[d][c]=a[d],a[d]=0};e.prototype.reorder=function(a,b,c){var e=0,g=this.tmp, -h=new Uint32Array(3),l=new Uint32Array(3),n=0;if(b.flags&d.MIXED_BLOCK_FLAG)for(n=2,b=0;36>b;)b+=c[e++];for(var m=0;3>m;++m)h[m]=n,l[m]=0;f=c[e++];m=0;for(b=18*n;576>b;++b)0===f--&&(f=c[e++]-1,m=(m+1)%3),g[h[m]][m][l[m]++]=a[b],6===l[m]&&(l[m]=0,++h[m]);c=this.tmp2;for(e=h=0;32>e;e++)for(l=0;3>l;l++)for(b=0;6>b;b++)c[h++]=g[e][l][b];g=576-18*n;for(e=0;e>1,t[0][u&1],t[1][u&1]);var v=u&-2,p=u-1&15|1,O=t[0][u&1];c=t[0][~u&1];var B=t[1][~u& -1],G=0,D=0;h=0;m=a[h];_fx=c[0];_fe=O[G];c=_fx[0]*m[p+0];c+=_fx[1]*m[p+14];c+=_fx[2]*m[p+12];c+=_fx[3]*m[p+10];c+=_fx[4]*m[p+8];c+=_fx[5]*m[p+6];c+=_fx[6]*m[p+4];c+=_fx[7]*m[p+2];c=-c;c+=_fe[0]*m[v+0];c+=_fe[1]*m[v+14];c+=_fe[2]*m[v+12];c+=_fe[3]*m[v+10];c+=_fe[4]*m[v+8];c+=_fe[5]*m[v+6];c+=_fe[6]*m[v+4];c+=_fe[7]*m[v+2];H[A++]=c;for(var M=A+30,C=1;16>C;++C)++G,++h,m=a[h],_fo=B[D],_fe=O[G],c=_fo[0]*m[p+0],c+=_fo[1]*m[p+14],c+=_fo[2]*m[p+12],c+=_fo[3]*m[p+10],c+=_fo[4]*m[p+8],c+=_fo[5]*m[p+6],c+=_fo[6]* -m[p+4],c+=_fo[7]*m[p+2],c=-c,c+=_fe[7]*m[v+2],c+=_fe[6]*m[v+4],c+=_fe[5]*m[v+6],c+=_fe[4]*m[v+8],c+=_fe[3]*m[v+10],c+=_fe[2]*m[v+12],c+=_fe[1]*m[v+14],c+=_fe[0]*m[v+0],H[A++]=c,c=_fe[0]*m[-v+31-16],c+=_fe[1]*m[-v+31-14],c+=_fe[2]*m[-v+31-12],c+=_fe[3]*m[-v+31-10],c+=_fe[4]*m[-v+31-8],c+=_fe[5]*m[-v+31-6],c+=_fe[6]*m[-v+31-4],c+=_fe[7]*m[-v+31-2],c+=_fo[7]*m[-p+31-2],c+=_fo[6]*m[-p+31-4],c+=_fo[5]*m[-p+31-6],c+=_fo[4]*m[-p+31-8],c+=_fo[3]*m[-p+31-10],c+=_fo[2]*m[-p+31-12],c+=_fo[1]*m[-p+31-14],c+= -_fo[0]*m[-p+31-16],H[M--]=c,++D;++h;m=a[h];_fo=B[D];c=_fo[0]*m[p+0];c+=_fo[1]*m[p+14];c+=_fo[2]*m[p+12];c+=_fo[3]*m[p+10];c+=_fo[4]*m[p+8];c+=_fo[5]*m[p+6];c+=_fo[6]*m[p+4];c+=_fo[7]*m[p+2];H[A]=-c;A+=16;u=(u+1)%16}};g.prototype.frame=function(a){var b=a.header.nchannels(),g=a.header.nbsamples();this.pcm.samplerate=a.header.samplerate;this.pcm.channels=b;this.pcm.length=32*g;this.full(a,b,g);this.phase=(this.phase+g)%16};b.exports=g},{"./utils":15}],14:[function(r,b,m){m.SF_TABLE=new Float32Array([2, -1.587401051968,1.259921049895,1,.793700525984,.629960524947,.5,.396850262992,.314980262474,.25,.198425131496,.157490131237,.125,.099212565748,.078745065618,.0625,.049606282874,.039372532809,.03125,.024803141437,.019686266405,.015625,.012401570719,.009843133202,.0078125,.006200785359,.004921566601,.00390625,.00310039268,.002460783301,.001953125,.00155019634,.00123039165,9.765625E-4,7.7509817E-4,6.15195825E-4,4.8828125E-4,3.87549085E-4,3.07597913E-4,2.44140625E-4,1.93774542E-4,1.53798956E-4,1.22070313E-4, -9.6887271E-5,7.6899478E-5,6.1035156E-5,4.8443636E-5,3.8449739E-5,3.0517578E-5,2.4221818E-5,1.922487E-5,1.5258789E-5,1.2110909E-5,9.612435E-6,7.629395E-6,6.055454E-6,4.806217E-6,3.814697E-6,3.027727E-6,2.403109E-6,1.907349E-6,1.513864E-6,1.201554E-6,0]);r=new Uint8Array([4,4,4,4,4,4,6,6,6,8,10,12,16,18,22,28,34,40,46,54,54,192]);b=new Uint8Array([4,4,4,4,4,4,6,6,8,8,10,12,16,20,24,28,34,42,50,54,76,158]);var g=new Uint8Array([4,4,4,4,4,4,6,6,8,10,12,16,20,24,30,38,46,56,68,84,102,26]),l=new Uint8Array([4, -4,4,4,4,4,4,4,4,4,4,4,6,6,6,6,6,6,10,10,10,12,12,12,14,14,14,16,16,16,20,20,20,26,26,26,66,66,66]),a=new Uint8Array([4,4,4,4,4,4,4,4,4,4,4,4,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,22,22,22,30,30,30,56,56,56]),e=new Uint8Array([4,4,4,4,4,4,4,4,4,4,4,4,6,6,6,8,8,8,12,12,12,16,16,16,20,20,20,26,26,26,34,34,34,42,42,42,12,12,12]),d=new Uint8Array([4,4,4,4,4,4,6,6,4,4,4,6,6,6,6,6,6,10,10,10,12,12,12,14,14,14,16,16,16,20,20,20,26,26,26,66,66,66]),q=new Uint8Array([4,4,4,4,4,4,6,6,4,4,4,6,6,6,8, -8,8,10,10,10,12,12,12,14,14,14,18,18,18,22,22,22,30,30,30,56,56,56]),h=new Uint8Array([4,4,4,4,4,4,6,6,4,4,4,6,6,6,8,8,8,12,12,12,16,16,16,20,20,20,26,26,26,34,34,34,42,42,42,12,12,12]),c=new Uint8Array([6,6,6,6,6,6,8,10,12,14,16,18,22,26,32,38,46,54,62,70,76,36]),x=new Uint8Array([6,6,6,6,6,6,8,10,12,14,16,20,24,28,32,38,46,52,60,68,58,54]),k=new Uint8Array([4,4,4,4,4,4,4,4,4,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,24,24,24,32,32,32,44,44,44,12,12,12]),w=new Uint8Array([4,4,4,4,4,4,4,4,4, -6,6,6,6,6,6,8,8,8,10,10,10,14,14,14,18,18,18,26,26,26,32,32,32,42,42,42,18,18,18]),t=new Uint8Array([4,4,4,4,4,4,4,4,4,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,24,24,24,30,30,30,40,40,40,18,18,18]),u=new Uint8Array([6,6,6,6,6,6,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,24,24,24,32,32,32,44,44,44,12,12,12]),H=new Uint8Array([6,6,6,6,6,6,6,6,6,6,6,6,8,8,8,10,10,10,14,14,14,18,18,18,26,26,26,32,32,32,42,42,42,18,18,18]),A=new Uint8Array([6,6,6,6,6,6,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14, -18,18,18,24,24,24,30,30,30,40,40,40,18,18,18]),M=new Uint8Array([12,12,12,12,12,12,16,20,24,28,32,40,48,56,64,76,90,2,2,2,2,2]),n=new Uint8Array([8,8,8,8,8,8,8,8,8,12,12,12,16,16,16,20,20,20,24,24,24,28,28,28,36,36,36,2,2,2,2,2,2,2,2,2,26,26,26]),v=new Uint8Array([12,12,12,4,4,4,8,8,8,12,12,12,16,16,16,20,20,20,24,24,24,28,28,28,36,36,36,2,2,2,2,2,2,2,2,2,26,26,26]);m.SFBWIDTH_TABLE=[{l:r,s:l,m:d},{l:b,s:a,m:q},{l:g,s:e,m:h},{l:c,s:k,m:u},{l:x,s:w,m:H},{l:x,s:t,m:A},{l:x,s:t,m:A},{l:x,s:t,m:A},{l:M, -s:n,m:v}];m.PRETAB=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,2,3,3,3,2,0]);m.ROOT_TABLE=new Float32Array([.59460355750136,.70710678118655,.84089641525371,1,1.18920711500272,1.4142135623731,1.68179283050743]);m.CS=new Float32Array([.857492926,.881741997,.949628649,.983314592,.995517816,.999160558,.999899195,.999993155]);m.CA=new Float32Array([-.514495755,-.471731969,-.313377454,-.1819132,-.094574193,-.040965583,-.014198569,-.003699975]);m.COUNT1TABLE_SELECT=1;m.SCALEFAC_SCALE=2;m.PREFLAG=4;m.MIXED_BLOCK_FLAG= -8;m.I_STEREO=1;m.MS_STEREO=2;m.WINDOW_L=new Float32Array([.043619387,.130526192,.216439614,.3007058,.382683432,.461748613,.537299608,.608761429,.675590208,.737277337,.79335334,.843391446,.887010833,.923879533,.953716951,.976296007,.991444861,.999048222,.999048222,.991444861,.976296007,.953716951,.923879533,.887010833,.843391446,.79335334,.737277337,.675590208,.608761429,.537299608,.461748613,.382683432,.3007058,.216439614,.130526192,.043619387]);m.WINDOW_S=new Float32Array([.130526192,.382683432, -.608761429,.79335334,.923879533,.991444861,.991444861,.923879533,.79335334,.608761429,.382683432,.130526192]);m.IS_TABLE=new Float32Array([0,.211324865,.366025404,.5,.633974596,.788675135,1]);m.IS_LSF_TABLE=[new Float32Array([.840896415,.707106781,.594603558,.5,.420448208,.353553391,.297301779,.25,.210224104,.176776695,.148650889,.125,.105112052,.088388348,.074325445]),new Float32Array([.707106781,.5,.353553391,.25,.176776695,.125,.088388348,.0625,.044194174,.03125,.022097087,.015625,.011048543,.0078125, -.005524272])];m.SFLEN_TABLE=[{slen1:0,slen2:0},{slen1:0,slen2:1},{slen1:0,slen2:2},{slen1:0,slen2:3},{slen1:3,slen2:0},{slen1:1,slen2:1},{slen1:1,slen2:2},{slen1:1,slen2:3},{slen1:2,slen2:1},{slen1:2,slen2:2},{slen1:2,slen2:3},{slen1:3,slen2:1},{slen1:3,slen2:2},{slen1:3,slen2:3},{slen1:4,slen2:2},{slen1:4,slen2:3}];m.NSFB_TABLE=[[[6,5,5,5],[9,9,9,9],[6,9,9,9]],[[6,5,7,3],[9,9,12,6],[6,9,12,6]],[[11,10,0,0],[18,18,0,0],[15,18,0,0]],[[7,7,7,0],[12,12,12,0],[6,15,12,0]],[[6,6,6,3],[12,9,9,6],[6,12, -9,6]],[[8,8,5,0],[15,12,9,0],[6,18,9,0]]]},{}],15:[function(r,b,m){m.makeArray=function(b,l){l||(l=Float64Array);if(1===b.length)return new l(b[0]);for(var a=[],e=b[0],d=0;d - - - - - 0x40 - - - - - - - - -
- 0x00 -
-
-
-
X
-
-
- -
- stop - play - prev - next -
B=0x0000
-
T=0x0000
-
Madeon - Finale
-
Megumi
-
white
-
- - \ No newline at end of file diff --git a/old/index_ideal.html b/old/index_ideal.html deleted file mode 100644 index 28487a2..0000000 --- a/old/index_ideal.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - 0x40 - - - - - - - - - - - -
- 0x00 -
-
-
-
X
-
-
- -
- stop - play - prev - next -
B=0x0000
-
T=0x0000
-
Madeon - Finale
-
Megumi
-
white
-
- - \ No newline at end of file diff --git a/old/js/0x40.js b/old/js/0x40.js deleted file mode 100644 index 41d54f2..0000000 --- a/old/js/0x40.js +++ /dev/null @@ -1,1455 +0,0 @@ -var colors = new Array(); -colors[0] = 'black'; -colors[1] = 'brick'; -colors[2] = 'crimson'; -colors[3] = 'red'; -colors[4] = 'turtle'; -colors[5] = 'sludge'; -colors[6] = 'brown'; -colors[7] = 'orange'; -colors[8] = 'green'; -colors[9] = 'grass'; -colors[10] = 'maize'; -colors[11] = 'citrus'; -colors[12] = 'lime'; -colors[13] = 'leaf'; -colors[14] = 'chartreuse'; -colors[15] = 'yellow'; -colors[16] = 'midnight'; -colors[17] = 'plum'; -colors[18] = 'pomegranate'; -colors[19] = 'rose'; -colors[20] = 'swamp'; -colors[21] = 'dust'; -colors[22] = 'dirt'; -colors[23] = 'blossom'; -colors[24] = 'sea'; -colors[25] = 'ill'; -colors[26] = 'haze'; -colors[27] = 'peach'; -colors[28] = 'spring'; -colors[29] = 'mantis'; -colors[30] = 'brilliant'; -colors[31] = 'canary'; -colors[32] = 'navy'; -colors[33] = 'grape'; -colors[34] = 'mauve'; -colors[35] = 'purple'; -colors[36] = 'cornflower'; -colors[37] = 'deep'; -colors[38] = 'lilac'; -colors[39] = 'lavender'; -colors[40] = 'aqua'; -colors[41] = 'steel'; -colors[42] = 'grey'; -colors[43] = 'pink'; -colors[44] = 'bay'; -colors[45] = 'marina'; -colors[46] = 'tornado'; -colors[47] = 'saltine'; -colors[48] = 'blue'; -colors[49] = 'twilight'; -colors[50] = 'orchid'; -colors[51] = 'magenta'; -colors[52] = 'azure'; -colors[53] = 'liberty'; -colors[54] = 'royalty'; -colors[55] = 'thistle'; -colors[56] = 'ocean'; -colors[57] = 'sky'; -colors[58] = 'periwinkle'; -colors[59] = 'carnation'; -colors[60] = 'cyan'; -colors[61] = 'turquoise'; -colors[62] = 'powder'; -colors[63] = 'white'; - -var waifus = [ - { - name: "Megumi", - file: "Megumi.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Megumi", - source_other: "http://myanimelist.net/character/30398/Airi_Akizuki", - fullname: "Airi Akizuki", - align: "center" - }, - { - name: "Agiri", - file: "Agiri.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Agiri", - source_other: "http://myanimelist.net/character/33582/Agiri_Goshiki", - fullname: "Agiri Goshiki", - align: "center" - }, - { - name: "Ai", - file: "Ai.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Ai", - source_other: "http://myanimelist.net/character/1789/Ai_Enma", - fullname: "Ai Enma", - align: "left" - }, - { - name: "Akarin", - file: "Akarin.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Akarin", - source_other: "http://myanimelist.net/character/35872/Akari_Akaza", - fullname: "Akari Akaza", - align: "center" - }, - { - name: "Akatsuki", - file: "Akatsuki.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Akatsuki", - source_other: "http://myanimelist.net/character/81369/Akatsuki", - fullname: "Akatsuki", - align: "center" - }, - { - name: "Alice", - file: "Alice.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Alice", - source_other: "http://myanimelist.net/character/5582/Alice_Margatroid", - fullname: "Alice Margatroid", - align: "center" - }, - { - name: "Astraea", - file: "Astraea.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Astraea", - source_other: "http://myanimelist.net/character/28859/Astraea", - fullname: "Astraea", - align: "right" - }, - { - name: "Asuha", - file: "Asuha.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Asuha", - source_other: "http://myanimelist.net/character/41091/Asuha_Touhara", - fullname: "Asuha Touhara", - align: "center" - }, - { - name: "Asuka", - file: "Asuka.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Asuka", - source_other: "http://myanimelist.net/character/94/Asuka_Langley_Soryu", - fullname: "Asuka Langley Soryu", - align: "center" - }, - { - name: "Ayase", - file: "Ayase.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Ayase", - source_other: "http://myanimelist.net/character/37302/Ayase_Aragaki", - fullname: "Ayase Aragaki", - align: "center" - }, - { - name: "CC", - file: "CC.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#CC", - source_other: "http://myanimelist.net/character/1111/C.C.", - fullname: "C.C.", - align: "right" - }, - { - name: "Chika", - file: "Chika.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Chika", - source_other: "http://myanimelist.net/character/571/Chika_Itou", - fullname: "Chika Itou", - align: "center" - }, - { - name: "Chiri", - file: "Chiri.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Chiri", - source_other: "http://myanimelist.net/character/3745/Chiri_Kitsu", - fullname: "Chiri Kitsu", - align: "right" - }, - { - name: "Chitanda", - file: "Chitanda.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Chitanda", - source_other: "http://myanimelist.net/character/55133/Eru_Chitanda", - fullname: "Eru Chitanda", - align: "center" - }, - { - name: "Chiyo", - file: "Chiyo.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Chiyo", - source_other: "http://myanimelist.net/character/247/Chiyo_Mihama", - fullname: "Chiyo Mihama", - align: "center" - }, - { - name: "Cirno", - file: "Cirno.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Cirno", - source_other: "http://myanimelist.net/character/24891/Cirno", - fullname: "Cirno", - align: "center" - }, - { - name: "Crona", - file: "Crona.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Crona", - source_other: "http://myanimelist.net/character/11919/Crona", - fullname: "Crona", - align: "right" - }, - { - name: "Demon Sisters", - file: "Demon Sisters.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Demon_Sisters", - source_other: "http://myanimelist.net/character/37861/Kneesocks_Demon, http://myanimelist.net/character/37862/Scanty_Demon", - fullname: "Kneesocks Demon, Scanty Demon", - align: "center" - }, - { - name: "Emi", - file: "Emi.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Emi", - source_other: "http://katawashoujo.wikia.com/wiki/Emi_Ibarazaki", - fullname: "Emi Ibarazaki", - align: "center" - }, - { - name: "Etna", - file: "Etna.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Etna", - source_other: "http://myanimelist.net/character/3419/Etna", - fullname: "Etna", - align: "center" - }, - { - name: "Eureka", - file: "Eureka.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Eureka", - source_other: "http://myanimelist.net/character/1709/Eureka", - fullname: "Eureka", - align: "center" - }, - { - name: "Excel", - file: "Excel.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Excel", - source_other: "http://myanimelist.net/character/1837/Excel", - fullname: "Excel", - align: "right" - }, - { - name: "Faye", - file: "Faye.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Faye", - source_other: "http://myanimelist.net/character/2/Faye_Valentine", - fullname: "Faye Valentine", - align: "right" - }, - { - name: "Felli", - file: "Felli.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Felli", - source_other: "http://myanimelist.net/character/18951/Felli_Loss", - fullname: "Felli Loss", - align: "center" - }, - { - name: "Flandre", - file: "Flandre.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Flandre", - source_other: "http://myanimelist.net/character/38276/Flandre_Scarlet", - fullname: "Flandre Scarlet", - align: "center" - }, - { - name: "Fran", - file: "Fran.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Fran", - source_other: "http://myanimelist.net/character/12564/Fran_Madaraki", - fullname: "Fran Madaraki", - align: "center" - }, - { - name: "Fuu", - file: "Fuu.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Fuu", - source_other: "http://myanimelist.net/character/392/Fuu_Kasumi", - fullname: "Fuu Kasumi", - align: "left" - }, - { - name: "Galil", - file: "Galil.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Galil", - source_other: "http://myanimelist.net/character/62469/Galil_AR", - fullname: "Galil AR", - align: "center" - }, - { - name: "Hajime Ichinose", - file: "Hajime Ichinose.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Hajime_Ichinose", - source_other: "http://myanimelist.net/character/85153/Ichinose_Hajime", - fullname: "Hajime Ichinose", - align: "center" - }, - { - name: "Hakase", - file: "Hakase.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Hakase", - source_other: "http://myanimelist.net/character/41055/Shinonome_Hakase", - fullname: "Hakase Shinonome", - align: "center" - }, - { - name: "Hanako", - file: "Hanako.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Hanako", - source_other: "http://katawashoujo.wikia.com/wiki/Hanako_Ikezawa", - fullname: "Hanako Ikezawa", - align: "center" - }, - { - name: "Haruhi", - file: "Haruhi.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Haruhi", - source_other: "http://myanimelist.net/character/251/Haruhi_Suzumiya", - fullname: "Haruhi Suzumiya", - align: "right" - }, - { - name: "Haruhi Fujioka", - file: "Haruhi Fujioka.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Haruhi_Fujioka", - source_other: "http://myanimelist.net/character/18/Haruhi_Fujioka", - fullname: "Haruhi Fujioka", - align: "center" - }, - { - name: "Haruko", - file: "Haruko.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Haruko", - source_other: "http://myanimelist.net/character/627/Haruko_Haruhara", - fullname: "Haruko Haruhara", - align: "left" - }, - { - name: "Hitoha", - file: "Hitoha.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Hitoha", - source_other: "http://myanimelist.net/character/31765/Hitoha_Marui", - fullname: "Hitoha Marui", - align: "center" - }, - { - name: "Holo", - file: "Holo.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Holo", - source_other: "http://myanimelist.net/character/7373/Holo", - fullname: "Holo Wisewolf of Yoitsu", - align: "right" - }, - { - name: "Homura", - file: "Homura.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Homura", - source_other: "http://myanimelist.net/character/38005/Homura_Akemi", - fullname: "Homura Akemi", - align: "center" - }, - { - name: "Hyatt", - file: "Hyatt.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Hyatt", - source_other: "http://myanimelist.net/character/1838/Hyatt", - fullname: "Hyatt", - align: "right" - }, - { - name: "Ibara", - file: "Ibara.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Ibara", - source_other: "http://myanimelist.net/character/55137/Mayaka_Ibara", - fullname: "Mayaka Ibara", - align: "center" - }, - { - name: "Ika", - file: "Ika.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Ika", - source_other: "http://myanimelist.net/character/20512/Ika_Musume", - fullname: "Ika Musume", - align: "left" - }, - { - name: "Kagami", - file: "Kagami.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Kagami", - source_other: "http://myanimelist.net/character/2171/Kagami_Hiiragi", - fullname: "Kagami Hiiragi", - align: "center" - }, - { - name: "Kanade", - file: "Kanade.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Kanade", - source_other: "http://myanimelist.net/character/22369/Kanade_Tachibana", - fullname: "Kanade Tachibana", - align: "right" - }, - { - name: "Kanoe", - file: "Kanoe.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Kanoe", - source_other: "http://myanimelist.net/character/30273/Yuuko_Kanoe", - fullname: "Yuuko Kanoe", - align: "right" - }, - { - name: "Kaori", - file: "Kaori.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Kaori", - source_other: "http://myanimelist.net/character/2884/Kaori", - fullname: "Kaori", - align: "left" - }, - { - name: "Karen", - file: "Karen.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Karen", - source_other: "http://myanimelist.net/character/50223/Karen_Kujou", - fullname: "Karen Kujou", - align: "center" - }, - { - name: "Kasukabe", - file: "Kasukabe.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Kasukabe", - source_other: "http://myanimelist.net/character/69439/You_Kasukabe", - fullname: "You Kasukabe", - align: "center" - }, - { - name: "Kate", - file: "Kate.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Kate", - source_other: "http://myanimelist.net/character/6823/Kate", - fullname: "Kate", - align: "center" - }, - { - name: "Kirino", - file: "Kirino.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Kirino", - source_other: "http://myanimelist.net/character/24544/Kirino_Kousaka", - fullname: "Kirino Kousaka", - align: "right" - }, - { - name: "Kirisame Marisa", - file: "Kirisame Marisa.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Kirisame_Marisa", - source_other: "http://myanimelist.net/character/5458/Kirisame_Marisa", - fullname: "Kirisame Marisa", - align: "right" - }, - { - name: "Konata", - file: "Konata.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Konata", - source_other: "http://myanimelist.net/character/2169/Konata_Izumi", - fullname: "Konata Izumi", - align: "right" - }, - { - name: "Kurisu", - file: "Kurisu.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Kurisu", - source_other: "http://myanimelist.net/character/34470/Kurisu_Makise", - fullname: "Kurisu Makise", - align: "center" - }, - { - name: "Kuroko", - file: "Kuroko.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Kuroko", - source_other: "http://myanimelist.net/character/17017/Kuroko_Shirai", - fullname: "Kuroko Shirai", - align: "right" - }, - { - name: "Kyouka", - file: "Kyouka.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Kyouka", - source_other: "http://myanimelist.net/character/11704/Kyouka_Midarezaki", - fullname: "Kyouka Midarezaki", - align: "right" - }, - { - name: "Kyouko Sakura", - file: "Kyouko Sakura.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Kyouko_Sakura", - source_other: "http://myanimelist.net/character/40006/Kyouko_Sakura", - fullname: "Kyouko Sakura", - align: "center" - }, - { - name: "Kyouko Toshinou", - file: "Kyouko Toshinou.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Kyouko_Toshinou", - source_other: "http://myanimelist.net/character/35871/Kyouko_Toshinou", - fullname: "Kyouko Toshinou", - align: "center" - }, - { - name: "Kyubey", - file: "Kyubey.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Kyubey", - source_other: "http://myanimelist.net/character/38566/Kyuubey", - fullname: "Kyuubey ", - align: "center" - }, - { - name: "Lain", - file: "Lain (still).png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Lain", - source_other: "http://myanimelist.net/character/2219/Lain_Iwakura", - fullname: "Lain Iwakura", - align: "center" - }, - //{ - // name: "Lain", - // file: "Lain (anim).gif", - // source: "http://0x40Hues.blogspot.com/Sources/Defaults#Lain", - // source_other: "http://myanimelist.net/character/2219/Lain_Iwakura", - // fullname: "Lain Iwakura", - // align: "left", - // frameDuration: 83 - //}, - { - name: "Lala-Ru", - file: "Lala-Ru.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Lala-Ru", - source_other: "http://myanimelist.net/character/1664/Lala-Ru", - fullname: "Lala-Ru", - align: "center" - }, - { - name: "Lilly", - file: "Lilly.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Lilly", - source_other: "http://katawashoujo.wikia.com/wiki/Lilly_Satou", - fullname: "Lilly Satou", - align: "center" - }, - { - name: "Louise", - file: "Louise.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Louiseouise", - source_other: "http://myanimelist.net/character/136/Louise_Fran%C3%A7oise_Le_Blanc_de_La_Valli%C3%A8re", - fullname: "Louise Françoise Le Blanc de La Vallière", - align: "center" - }, - { - name: "Lucchini", - file: "Lucchini.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Lucchini", - source_other: "http://myanimelist.net/character/7632/Francesca_Lucchini", - fullname: "Francesca Lucchini", - align: "left" - }, - { - name: "Lucy", - file: "Lucy.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Lucy", - source_other: "http://myanimelist.net/character/738/Lucy", - fullname: "Lucy ", - align: "left" - }, - { - name: "Madotsuki", - file: "Madotsuki.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Madotsuki", - source_other: "http://myanimelist.net/character/84705/Madotsuki", - fullname: "Madotsuki", - align: "center" - }, - { - name: "Mai", - file: "Mai.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Mai", - source_other: "http://myanimelist.net/character/10421/Mai_Minakami", - fullname: "Mai Minakami", - align: "right" - }, - { - name: "Maka", - file: "Maka.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Maka", - source_other: "http://myanimelist.net/character/8439/Maka_Albarn", - fullname: "Maka Albarn", - align: "right" - }, - { - name: "Makimaki", - file: "Makimaki.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Makimaki", - source_other: "http://myanimelist.net/character/42720/Makina_Sakamaki", - fullname: "Makina Sakamaki", - align: "center" - }, - { - name: "Makoto", - file: "Makoto.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Makoto", - source_other: "http://myanimelist.net/character/3987/Makoto_Kikuchi", - fullname: "Makoto Kikuchi", - align: "center" - }, - { - name: "Mami", - file: "Mami.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Mami", - source_other: "http://myanimelist.net/character/38194/Mami_Tomoe", - fullname: "Mami Tomoe", - align: "right" - }, - { - name: "Mao", - file: "Mao.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Mao", - source_other: "http://myanimelist.net/character/74079/Mao_Amatsuka", - fullname: "Mao Amatsuka", - align: "center" - }, - { - name: "Mary", - file: "Mary.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Mary", - source_other: "http://ibrpg.wikia.com/wiki/Mary", - fullname: "Mary", - align: "right" - }, - { - name: "Mashiro", - file: "Mashiro.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Mashiro", - source_other: "http://myanimelist.net/character/91971/Mashiro_Mitsumine", - fullname: "Mashiro Mitsumine", - align: "center" - }, - { - name: "Mayoi", - file: "Mayoi.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Mayoi", - source_other: "http://myanimelist.net/character/22052/Mayoi_Hachikuji", - fullname: "Mayoi Hachikuji", - align: "left" - }, - { - name: "Mayuri", - file: "Mayuri.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Mayuri", - source_other: "http://myanimelist.net/character/35253/Mayuri_Shiina", - fullname: "Mayuri Shiina", - align: "center" - }, - { - name: "Melfina", - file: "Melfina.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Melfina", - source_other: "http://myanimelist.net/character/1014/Melfina", - fullname: "Melfina ", - align: "left" - }, - { - name: "Mey-Rin", - file: "Mey-Rin.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Mey-Rin", - source_other: "http://myanimelist.net/character/14952/Mey-Rin", - fullname: "Mey-Rin ", - align: "left" - }, - { - name: "Miho", - file: "Miho.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Miho", - source_other: "http://myanimelist.net/character/62939/Miho_Nishizumi", - fullname: "Miho Nishizumi", - align: "center" - }, - { - name: "Miku", - file: "Miku.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Miku", - source_other: "http://myanimelist.net/character/7156/Miku_Hatsune", - fullname: "Miku Hatsune", - align: "right" - }, - { - name: "Mio", - file: "Mio.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Mio", - source_other: "http://myanimelist.net/character/19566/Mio_Akiyama", - fullname: "Mio Akiyama", - align: "right" - }, - { - name: "Mio Naganohara", - file: "Mio Naganohara.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Mio_Naganohara", - source_other: "http://myanimelist.net/character/40081/Mio_Naganohara", - fullname: "Mio Naganohara", - align: "right" - }, - { - name: "Mirai", - file: "Mirai.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Mirai", - source_other: "http://myanimelist.net/character/81751/Mirai_Kuriyama", - fullname: "Mirai Kuriyama", - align: "center" - }, - { - name: "Misaka", - file: "Misaka.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Misaka", - source_other: "http://myanimelist.net/character/13701/", - fullname: "Mikoto Misaka", - align: "left" - }, - { - name: "Misaki", - file: "Misaki.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Misaki", - source_other: "http://myanimelist.net/character/2552/Misaki_Nakahara", - fullname: "Misaki Nakahara", - align: "center" - }, - { - name: "Miu", - file: "Miu.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Miu", - source_other: "http://myanimelist.net/character/570/Miu_Matsuoka", - fullname: "Miu Matsuoka", - align: "center" - }, - { - name: "Miyako", - file: "Miyako.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Miyako", - source_other: "http://myanimelist.net/character/2627/Miyako", - fullname: "Miyako ", - align: "center" - }, - { - name: "Mizuki", - file: "Mizuki.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Mizuki", - source_other: "http://myanimelist.net/character/27363/Mizuki_Himeji", - fullname: "Mizuki Himeji", - align: "center" - }, - { - name: "Momo", - file: "Momo.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Momo", - source_other: "http://myanimelist.net/character/17364/Deviluke_Momo_Velia", - fullname: "Momo Belia Deviluke", - align: "center" - }, - { - name: "Monoko", - file: "Monoko.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Monoko", - source_other: "http://yumenikki.wikia.com/wiki/Monoko", - fullname: "Monoko", - align: "left" - }, - { - name: "Morgiana", - file: "Morgiana.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Morgiana", - source_other: "http://myanimelist.net/character/43121/Morgiana", - fullname: "Morgiana", - align: "left" - }, - { - name: "Motoko", - file: "Motoko.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Motoko", - source_other: "http://myanimelist.net/character/1795/Motoko_Kusanagi", - fullname: "Motoko \"Major\" Kusanagi", - align: "right" - }, - { - name: "Nano", - file: "Nano.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Nano", - source_other: "http://myanimelist.net/character/10422/Nano_Shinonome", - fullname: "Nano Shinonome", - align: "center" - }, - { - name: "Nee-san", - file: "Nee-san.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Nee-san", - source_other: "http://myanimelist.net/character/42719/Iroe_Genma", - fullname: "Iroe Genma", - align: "center" - }, - { - name: "Noel", - file: "Noel.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Noel", - source_other: "http://myanimelist.net/character/24493/No%C3%ABl_Kannagi", - fullname: "Noël Kannagi", - align: "center" - }, - { - name: "Nymph", - file: "Nymph.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Nymph", - source_other: "http://myanimelist.net/character/23496/Nymph", - fullname: "Nymph", - align: "center" - }, - { - name: "Onihime", - file: "Onihime.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Onihime", - source_other: "http://myanimelist.net/character/17245/Onizuka_Hime", - fullname: "Hime Onihime Onizuka", - align: "center" - }, - { - name: "Osaka", - file: "Osaka.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Osaka", - source_other: "http://myanimelist.net/character/183/Ayumu_Kasuga", - fullname: "Ayumu Osaka Kasuga", - align: "center" - }, - { - name: "Popura", - file: "Popura.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Popura", - source_other: "http://myanimelist.net/character/24417/Popura_Taneshima", - fullname: "Popura Taneshima", - align: "center" - }, - { - name: "Rei", - file: "Rei.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Rei", - source_other: "http://myanimelist.net/character/86/Rei_Ayanami", - fullname: "Rei Ayanami", - align: "center" - }, - { - name: "Renge", - file: "Renge.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Renge", - source_other: "http://myanimelist.net/character/54151/Renge_Miyauchi", - fullname: "Renge Miyauchi", - align: "center" - }, - { - name: "Rika", - file: "Rika.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Rika", - source_other: "http://myanimelist.net/character/1534/Furude_Rika", - fullname: "Rika Furude", - align: "left" - }, - { - name: "Rikka", - file: "Rikka.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Rikka", - source_other: "http://myanimelist.net/character/65865/Rikka_Takanashi", - fullname: "Rikka Takanashi", - align: "center" - }, - { - name: "Rin", - file: "Rin.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Rin", - source_other: "http://myanimelist.net/character/498/Rin_Tohsaka", - fullname: "Rin Tohsaka", - align: "center" - }, - { - name: "Rin Tezuka", - file: "Rin Tezuka.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Rin_Tezuka", - source_other: "http://katawashoujo.wikia.com/wiki/Rin_Tezuka", - fullname: "Rin Tezuka", - align: "center" - }, - { - name: "Ritsu", - file: "Ritsu.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Ritsu", - source_other: "http://myanimelist.net/character/19567/Ritsu_Tainaka", - fullname: "Ritsu Tainaka", - align: "center" - }, - { - name: "Ruri", - file: "Ruri.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Ruri", - source_other: "http://myanimelist.net/character/31008/Ruri_Gokou", - fullname: "Ruri Gokou", - align: "center" - }, - { - name: "Ryuuko", - file: "Ryuuko.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Ryuuko", - source_other: "http://myanimelist.net/character/83797/Ryuuko_Matoi", - fullname: "Ryuuko Matoi", - align: "right" - }, - { - name: "Sako", - file: "Sako.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Sako", - source_other: "http://myanimelist.net/character/62467/SAKO_RK95", - fullname: "SAKO RK95", - align: "right" - }, - { - name: "Sakura", - file: "Sakura.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Sakura", - source_other: "http://myanimelist.net/character/2671/Sakura_Kinomoto", - fullname: "Sakura Kinomoto", - align: "center" - }, - { - name: "Sakurako", - file: "Sakurako.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Sakurako", - source_other: "http://myanimelist.net/character/35878/Sakurako_Ohmuro", - fullname: "Sakurako Ohmuro", - align: "center" - }, - { - name: "Sanae", - file: "Sanae.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Sanae", - source_other: "http://myanimelist.net/character/67215/Sanae_Dekomori", - fullname: "Sanae Dekomori", - align: "left" - }, - { - name: "Senjougahara", - file: "Senjougahara.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Senjougahara", - source_other: "http://myanimelist.net/character/22037/Hitagi_Senjougahara", - fullname: "Hitagi Senjougahara", - align: "right" - }, - { - name: "Shiina", - file: "Shiina.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Shiina", - source_other: "http://myanimelist.net/character/61371/Shiina_Mashiro", - fullname: "Mashiro Shiina", - align: "center" - }, - { - name: "Shinobu", - file: "Shinobu.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Shinobu", - source_other: "http://myanimelist.net/character/23602/Shinobu_Oshino", - fullname: "Shinobu Oshino", - align: "center" - }, - { - name: "Sonya", - file: "Sonya.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Sonya", - source_other: "http://myanimelist.net/character/32769/Sonya", - fullname: "Sonya", - align: "center" - }, - { - name: "Stocking", - file: "Stocking.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Stocking", - source_other: "http://myanimelist.net/character/32801/Stocking_Anarchy", - fullname: "Stocking Anarchy", - align: "center" - }, - { - name: "Suiseiseki", - file: "Suiseiseki.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Suiseiseki", - source_other: "http://myanimelist.net/character/1105/Suiseiseki", - fullname: "Suiseiseki", - align: "left" - }, - { - name: "Taiga", - file: "Taiga.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Taiga", - source_other: "http://myanimelist.net/character/12064/Taiga_Aisaka", - fullname: "Taiga Aisaka", - align: "center" - }, - { - name: "Tomoko", - file: "Tomoko.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Tomoko", - source_other: "http://myanimelist.net/character/50057/Tomoko_Kuroki", - fullname: "Tomoko Kuroki", - align: "center" - }, - { - name: "Tsumiki", - file: "Tsumiki.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Tsumiki", - source_other: "http://myanimelist.net/character/55839/Tsumiki_Miniwa", - fullname: "Tsumiki Miniwa", - align: "center" - }, - { - name: "Urotsuki", - file: "Urotsuki.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Urotsuki", - source_other: "http://yume2kki.wikia.com/wiki/Urotsuki", - fullname: "Urotsuki", - align: "center" - }, - { - name: "Winry", - file: "Winry.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Winry", - source_other: "http://myanimelist.net/character/63/Winry_Rockbell", - fullname: "Winry Rockbell", - align: "right" - }, - { - name: "Yasuna", - file: "Yasuna.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Yasuna", - source_other: "http://myanimelist.net/character/33584/Yasuna_Oribe", - fullname: "Yasuna Oribe", - align: "left" - }, - { - name: "Yin", - file: "Yin.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Yin", - source_other: "http://myanimelist.net/character/2163/Yin", - fullname: "Yin", - align: "center" - }, - { - name: "Yoko", - file: "Yoko.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Yoko", - source_other: "http://myanimelist.net/character/2063/Yoko_Littner", - fullname: "Yoko Littner", - align: "center" - }, - { - name: "Yotsuba", - file: "Yotsuba.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Yotsuba", - source_other: "http://myanimelist.net/character/3568/Yotsuba_Koiwai", - fullname: "Yotsuba Koiwai", - align: "center" - }, - { - name: "Yui", - file: "Yui.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Yui", - source_other: "http://myanimelist.net/character/19565/Yui_Hirasawa", - fullname: "Yui Hirasawa", - align: "center" - }, - { - name: "Yukari", - file: "Yukari.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Yukari", - source_other: "http://myanimelist.net/character/76236/Yukari_Hinata", - fullname: "Yukari Hinata", - align: "center" - }, - { - name: "Yuki", - file: "Yuki.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Yuki", - source_other: "http://myanimelist.net/character/249/Yuki_Nagato", - fullname: "Yuki Nagato", - align: "center" - }, - { - name: "Yuno", - file: "Yuno.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Yuno", - source_other: "http://myanimelist.net/character/4963/Gasai_Yuno", - fullname: "Yuno Gasai", - align: "center" - }, - { - name: "Yunocchi", - file: "Yunocchi.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Yunocchi", - source_other: "http://myanimelist.net/character/2528/Yuno", - fullname: "Yuno", - align: "center" - }, - { - name: "Yuuko", - file: "Yuuko.png", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#Yuuko", - source_other: "http://myanimelist.net/character/10418/Yuuko_Aioi", - fullname: "Yuuko Aioi", - align: "center" - } -]; - -var madeonPreload = { - file: "songs/prebuild_Finale.mp3", - buildUp: "songs/preprebuild_Finale.mp3" -} - -var rgSongs = [ - // Pack: Default HQ - { - pack: 1, - file: "songs/loop_Finale.mp3", - name: "Madeon - Finale", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#loop_Finale", - rhythm: "x..xo...x...o...x..xo...x...o...x..xo...x...o...x..xo...x...oxoox..xo...x...o...x..xo...x...o...x..xo...x...o...x...o...x...oooo", - buildUp: "songs/build_Finale.mp3" - }, - { - pack: 1, - file: "songs/loop_Radioactive.mp3", - name: "Imagine Dragons - Radioactive", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#loop_Radioactive", - rhythm: "o...x.o.o...x.o.o...x...o...x.o.o...x.o.o...x.......x.......x...", - }, - { - pack: 1, - file: "songs/loop_RowRow.mp3", - name: "Row Row Fight the Powah (RAGEFOXX & SLUTTT MIX)", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#loop_RowRow", - rhythm: "o...x...o...x...o...x...o...x...o...x...o...x...o...x...o...xxx.x...x...o...x...o...x...o...x...o...x...o...x...o...o...o...o..." - }, - { - pack: 1, - file: "songs/loop_Desire.mp3", - name: "Outlaw Star OST - Desire", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#loop_Desire", - rhythm: "o...x...o.o.x.x...o.x...o.o.x...o...x...o.o.x.x...o.x...oo..x.x.o...x...o.o.x.x...o.x...oo..x.x.o...x...o.o.x.x...o.x...x...x.xx", - buildUp: "songs/build_Desire.mp3", - buildUpRhythm: "x.....x.x.x.xxx." - }, - { - pack: 1, - file: "songs/loop_OutOfSight.mp3", - name: "The Bloody Beetroots - Out of Sight", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#loop_OutOfSight", - rhythm: "o.....oox.......o.o....ox.......o.....oox...o...o.o....ox.......o......ox.......o.o....ox.......o.....oox...o...o.o.....+......." - }, - { - pack: 1, - file: "songs/loop_SmileWithoutAFace.mp3", - name: "Buckethead - Smile Without a Face", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#loop_SmileWithoutAFace", - rhythm: "o......ox.....o.o.......x.......o......ox.....o.o.....o.x.ooooooo......ox.....o.o.......x.......o......ox.....o.o.....o.x.oooooo", - buildUp: "songs/build_SmileWithoutAFace.mp3", - buildUpRhythm: "..o.....-:x.......o.....-:x.......o.....-:x.......o.....-:x.......o.....-:x.......o.....-:x.x....." - }, - { - pack: 1, - file: "songs/loop_CourtshipDate.mp3", - name: "Crystal Castles - Courtship Dating", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#loop_CourtshipDate", - rhythm: "o...x.....o.x...o...x.....o.x...o...x.....o.x...o...x.....o.+..." - }, - { - pack: 1, - file: "songs/loop_Vordhosbn.mp3", - name: "Aphex Twin - Vordhosbn", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#loop_Vordhosbn", - rhythm: "o...x..---o.x...-.o.x------.x..-o.-.x.o..-.ox-.-----x-o-------o-o...x..---o.x...-.o.x------.x..-o.-.x.o..-.ox-.-----x-o-------o-o...x..---o.x...-.o.x------.x..-o.-.x.o..-.ox-.-----x-o-------o-o...x..---o.x...-.o.x------.x..-o.-.x.o..-.ox-.-----x-o-------o-o...x..---o.x...-.o.x------.x..-o.-.x.o..-.ox-.-----x-o-------o-o...x..---o.x...-.o.x------.x..-o.-.x.o..-.ox-.-----x-o-------o-", - buildUp: "songs/build_Vordhosbn.mp3", - buildUpRhythm: ":...x..------.......-.-----.+...............x..-.-.--.-.-.-.---." - }, - { - pack: 1, - file: "songs/loop_Orange.mp3", - name: "Culprate - Orange Sunrise, Sunset", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#loop_Orange", - rhythm: "o.o.x..o.x.x....o..ox......x....o...x....o.x....o...x....o.xx...o.o.x..o.x.x....o..ox......x....o...x....o.x...xo...x....o.xx..." - }, - { - pack: 1, - file: "songs/loop_Spoiler.mp3", - name: "Hyper - Spoiler", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#loop_Spoiler", - rhythm: "o+......x+......o+......x+......o+......x+......o+......x+......o+......x+......o+......x+......o+......x+......o+..............o+......x+......o+......x+......o+......x+......o+......x+......o+......x+......o+......x+......o---------------o+......x......." - }, - { - pack: 1, - file: "songs/loop_Kryptonite.mp3", - name: "DJ Fresh - Kryptonite", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#loop_Kryptonite", - rhythm: "o.x..ox.o.x..ox.o.x..ox.o.x..ox.o.x..xx.o.x..xx.o.x..xx.o.x..xx.o.x..ox.o.x..ox.o.x..ox.o.x..ox.o.x..xx.o.x..xx.o.xx.xx.o.x..xx." - }, - { - pack: 1, - file: "songs/loop_BeyondRightNow.mp3", - name: "STS9 - Beyond Right Now (Glitch Mob Remix)", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#loop_BeyondRightNow", - rhythm: "o.......x...o.......o...xxxxx...o.o.....x...o.......o...xxxxx...o.......x...o.......o...xxxxx...o.......x...o...o.......+.......o.......x...o.......o...xxxxx...o.o.....x...o...-.-.o.-.xxx+x+x+o.......x...o.......o...xxxxx...o.......x...o...o...o.o.+......." - }, - { - pack: 1, - file: "songs/loop_HoldMyLiquor.mp3", - name: "Kanye West - Hold My Liquor", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#loop_HoldMyLiquor", - rhythm: "o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...............+..." - }, - { - pack: 1, - file: "songs/loop_Heart.mp3", - name: "Savant - Heart", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#loop_Heart", - rhythm: "o...x...o...x...o...x...o...x...o...x...o...x...o...x...o...x.-.o...x...o...x...o...x...o...x...o...x...o...x...o...x...o...xx-.", - buildUp: "songs/build_Heart.mp3", - buildUpRhythm: "o...." - }, - { - pack: 1, - file: "songs/loop_FuturePeople.mp3", - name: "SynSUN - Future People (Sonic Elysium Remix)", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#loop_FuturePeople", - rhythm: "o...x...o...x...o...x...o...x...o...x...o...x...o...x...o...x...o...x...o...x...o...x...o...x...o...x...o...x...o---o---o-------o...x...o...x...o...x...o...x...o...x...o...x...o...x...o...x...o...x...o...x...o...x...o...x...o...x...o...x...:.:.:.:.:.:.:.+.....x+..x+..x+.." - }, - { - pack: 1, - file: "songs/loop_Nanox.mp3", - name: "Singularity - Nanox", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#loop_Nanox", - rhythm: "o.....o.x...o.......o...x.......o.....o.x...o.......o...x.......|x|x|x|.x...|x|x|x|xo...x.......|x|x|x|.x...|x|x|x|xo...x.......o.....o.x...o.......o...x.......o.....o.x...o.......o...x.......|x|x|x|.x...|x|x|x|xo...x.......|x|x|x|.x...|x|x|x|xo...x......." - }, - { - pack: 1, - file: "songs/loop_BlackEarth.mp3", - name: "Dayseeker - Black Earth", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#loop_BlackEarth2", - rhythm: "--------o.....o.....o...+...............................x.......x.x.x.x.o.....o.....o...+...........................x...x.......--------o.....o.....o...+...............................x.......x.x.x.x.o.....o.....o...+...........................x...x......." - }, - { - pack: 1, - file: "songs/loop_EarlyMorningMay.mp3", - name: "Ronald Jenkees - Early Morning May", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#loop_EarlyMorningMay", - rhythm: "o.......x.......o.......x.....o.o.......o.......o...o...o...o...o.......x.......o.......x.....o.o.......x.......o.......x.....o." - }, - { - pack: 1, - file: "songs/loop_Weapon.mp3", - name: "deadmau5 - Raise Your Weapon (Madeon Remix)", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#loop_Weapon", - rhythm: "o.-.x...o...x...o.-.x...o...x...o.-.x...o...x...o.-.x...o...x...o.-.x...o...x...o.-.x...o...x...o..o..o...o...o.............x...", - buildUp: "songs/build_Weapon.mp3", - buildUpRhythm: "----" - }, - { - pack: 1, - file: "songs/loop_LoveOnHaightStreet.mp3", - name: "BT - Love On Haight Street ", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#loop_LoveOnHaightStreet", - rhythm: "o.....x.........o.ox....oo..o...x....o...o..x......o..o..x...o.....o..x....oo..o...x....+...o+..x.+...x..o.ox.....o..o...x.....oo..o..x.....o.o.o..x..oooo......x..o.....o..x.....oo..o..x.....o..oo..x............x.......oo.ox.....oo..o..x.....o...+.........", - buildUp: "songs/build_LoveOnHaightStreet.mp3", - buildUpRhythm: "x......:......:.....:......:.....:.....:......:....." - }, - { - pack: 1, - file: "songs/loop_TheClockmaker.mp3", - name: "Vexare - The Clockmaker", - source: "http://0x40Hues.blogspot.com/Sources/Defaults#loop_TheClockmaker", - rhythm: "o.......-...+...x...-----...-...o..:..:.o....:..x.......o...-...o...........o...x.....x.....x...o...............+...............o.......----o--.x.......-...-...o..:..:.o....:..x.......o.-.-.-.o...........o...x...............o.......o.......x...............:...:...:...:.+.x...-----...-...o..:..:.o....:..x.......o...-...o...........o...x.....x.....x...o...............+...............o...........----x.....-.-...-...o..:..:.o....:..x.......o.-.-.-.o...........o...x...............o.......o.......x.....x.....-...", - buildUp: "songs/build_TheClockmaker.mp3", - buildUpRhythm: "+...." - }, - // Pack: Hues Mix A - { - pack: 2, - file: "songs/loop_Omen.mp3", - name: "The Prodigy - Omen", - source: "http://www.youtube.com/watch?v=zsV9wbTFvDE", - rhythm: "x.x.o...x.o.....x...o...x.o....ox...o...x.o.....x...o.o.x.o.oooox.o.o...x.o.....x...o...x.o....ox...o...x.o.....x...o.o.x.o.xxox.xxxo...x.o.....x...o...x.o....ox...o...x.o.....x...o.o.x.o.oooox.o.o...x.o.....x...o...x.o....ox...o...x.o.....x...o.o.x.o.xxoox...o...x..oxxo.x.o.o...x..oxxo.x.x.o..ox.o....ox...o.o.x.o.----x.-.o...x..oxxo.x.o.o...x..oxxo.x.x.o..ox.o....ox...o..o..o.oooo", - buildUp: "songs/build_Omen.mp3", - buildUpRhythm: ":.:.:....:.:+...o...x.o.....x...o.o.x.o...x." - }, - { - pack: 2, - file: "songs/loop_FromMyEyes.mp3", - name: "Phetsta - From My Eyes", - source: "http://www.youtube.com/watch?v=-paV56tKayw", - rhythm: "o...x.....o.x...o...x.....o.x...o...x.....o.x...o...x.....o.x...o...x.....o.x...o...x.....o.x...o...x.....o.x...o...x...xxo.x...o...x.....o.x...o...x.....o.x...o...x.....o.x...o...x.....o.x...o...x.....o.x...o...x.....o.x...o...o...o...o...o---o-------x+.." - }, - { - pack: 2, - file: "songs/loop_BlackPanther.mp3", - name: "Crystal Castles - Black Panther", - source: "http://www.youtube.com/watch?v=zQXHAPf5ijQ", - rhythm: "o.:.x.::o.:.x.::o.:.x.::o.:.x.:.o.:.x.::o.:.x.::o.:.x.::o.:.x.:.o.:.x.::o.:.x.::o.:.x.::o.:.x.:.o.:.x.::o.:.x.::o.:.x.::o.:.x.:." - }, - { - pack: 2, - file: "songs/loop_RunAway.mp3", - name: "Submatik - Run Away", - source: "http://www.youtube.com/watch?v=dxztDhrrXaY", - rhythm: "o...x.o.....x...o...x.....o.x.o.o...x.....o.x...o...x.....o.x...o...x.....o.x...o...x.....o.x.o.o...x.....o.x...o...x.....o.x...o...x.....o.x...o...x.....o.x.o.o...x.....o.x...o...x.....o.x...o...x.o...o.x.....o.x.....o.x.o.o...x.....o.x.....o.x.....o.x.x." - }, - { - pack: 2, - file: "songs/loop_Chansond'Automne.mp3", - name: "Chris Christodoulou - Chanson d'Automne", - source: "http://www.youtube.com/watch?v=iSnOWqTPUNQ", - rhythm: "o.......x.....o.....o...x.......o.....o.x.....o.....o...x.o-----o.o.o.o.x.....o.....o...x.......o.o...oox...o.....xxo...xoo.o.x.", - }, - { - pack: 2, - file: "songs/loop_Moan.mp3", - name: "Trentemoller - Moan", - source: "http://www.youtube.com/watch?v=_LuYdnPy8tA", - rhythm: "o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o......+o.......o...o...o...o...o...o...o...o...o...o...o...o...o...o...o......." - }, - { - pack: 2, - file: "songs/loop_ClearMayhem.mp3", - name: "Faskil - Clear Mayhem (Grid Systems Carte Blanche Remix)", - source: "https://www.youtube.com/watch?v=A7ZQ6ZBdDJQ", - rhythm: "o...o...o...o...o...o...o...o...+...............o...x...o...o.x.o...x.:.o...x...o...x...o...o.x.o...x.:.o...x.x.o...x...o...o.x.o...x.:.o...x...o...x...o...o.x.o...x.:.o...x.x.o...x...o...o.x.o...x.:.o...x...o...x...o...o.x.o...x.:.o...x.x.o...x...o...o.x." - }, - { - pack: 2, - file: "songs/loop_Duvet.mp3", - name: "Boa - Duvet", - source: "https://www.youtube.com/watch?v=4-PkAQcuZOw", - rhythm: "o......o.oo.....o......o.oo.....o......o.oo.....x......o.oo.....", - }, - { - pack: 2, - file: "songs/loop_MoneyTrees.mp3", - name: "Kendrick Lamar - Money Trees", - source: "https://www.youtube.com/watch?v=whyRZ1zzIRM", - rhythm: "x..o..o.x...o...x..o..o.x...o...x.o.....x...o..ox..o.xo.x...o...x..o..o.x...o...x..o..o.x...o...x.o.....x...o..ox..o.xo.x...o...", - }, - { - pack: 2, - file: "songs/loop_Timeless.mp3", - name: "PrototypeRaptor - Timeless", - source: "https://www.youtube.com/watch?v=IPriPTbCf88", - rhythm: "o...x...o...x...o...x...o...x...o...x...o...x...o...x...o...x...o...x...o...x...o...x...o...x...o...x...o...x...o...x...o...xoo.o...x...o...x...o...x...o...x...o...x...o...x...o...x...o...x...o...x...o...x...o...x...o...x...o...x...o...x...o...x...o...x..." - }, - { - pack: 2, - file: "songs/loop_Intimate.mp3", - name: "Crystal Castles - Intimate", - source: "https://www.youtube.com/watch?v=FBsEoOM3dkU", - rhythm: "o.:.x.:.o.:.x.:.o.:.x.:.o.:.x.:.o.:.x.:.o.:.x.:.o.:.x.:.o.:.x.:.o.:.x.:.o.:.x.:.o.:.x.:.o.:.x.:.o.:.x.:.o.:.x.:.o.:.x.:.o.:.x.:...:.x.:...:.x.:...:.x.:...:.x.:...:.x.:...:.x.:...:.x.:...:.x.:...:.x.:...:.x.:...:.x.:...:.x.:...:.x.:...:.x.:...:.x.:...:.x.:." - }, - { - pack: 2, - file: "songs/loop_Vibrate(reversed).mp3", - name: "Outkast - Vibrate (reversed)", - source: "https://www.youtube.com/watch?v=R_toHjogc_s", - rhythm: "o..ox.o.o..ox.o.o..oxxo.o..ox.o.o..ox.o.o..ox.o.o..oxxo.o..ox.o.", - }, - { - pack: 2, - file: "songs/loop_MissYou.mp3", - name: "Nhato - Miss You", - source: "https://www.youtube.com/watch?v=bZQAuaeCtiM", - rhythm: "o.+.o...o...o...o...o...o...o...o.:.o.:.o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o.+.o...o...........+...o...o...o...o...o...o...o...o...o.-.-.-.........o..o..o...x...o.............+...o...o...o...o...o...o...o...o.o.o.+.............", - buildUp: "songs/build_MissYou.mp3", - buildUpRhythm: "::::::::::::" - }, - { - pack: 2, - file: "songs/loop_PropaneNightmares.mp3", - name: "Pendulum - Propane Nightmares", - source: "https://www.youtube.com/watch?v=y2j5uMYTnDE", - rhythm: "o.x..ox.o.x..ox.o.x..ox.o.x..xx.o.x..ox.o.x..ox.o.x..ox.o.x..xx.o.x..ox.o.x..ox.o.x..ox.o.x..xx.o.x..ox.o.x..ox.o.x..ox..x..x.x.o.x..ox.o.x..ox.o.x..ox.o.x..xx.o.x..ox.o.x..ox.o.x..ox.o.x..xx.o.x..ox.o.x..ox.o.x..ox.o.x..xx.o.x..ox.o.x..ox.o.xxxxxxxxxxxxxxo..ox..oo.oox...o..ox..oo.oox.xxo..ox..oo.oox...o..ox..oo.oox.xxo..ox..oo.oox...o..ox..oo.oox.xxo..ox..oo.oox...o..ox..o.xoox.o." - }, - { - pack: 3, - file: "songs/loop_Sail.mp3", - name: "AWOLNation - Sail", - rhythm: "x..::.+.x...+...x..::.+.x:.:+...x..::.+.x...+...x..::.+.x::::...", - buildUp: "songs/build_Sail.mp3", - buildUpRhythm: ".....+...........o...+..........o:...+...........o...+...o...+.o.:..." - }, -]; - -var nCurrentColor = 63; // start white -var nCurrentWaifu = 0; -// initially hold megumi -var lastWaifus = [0]; - -var nColorX, nColorY, nColorZ; - - -function GetRandomWaifu() -{ - var tmp = Math.round(Math.random() * (waifus.length - 1)); - if(lastWaifus.indexOf(tmp) != -1) { - return GetRandomWaifu(); - } - lastWaifus.push(tmp); - while(lastWaifus.length > waifus.length / 2) { - lastWaifus.shift(); - } - nCurrentWaifu = tmp; - return waifus[tmp]; -} - -function pad(n, width, z) { - z = z || '0'; - n = n + ''; - return n.length >= width ? n : new Array(width - n.length + 1).join(z) + n; -} - -function rgbToHex(rgb) { - var ret = '#' - for(var i=0; i < rgb.length; i++) { - ret += pad(rgb[i].toString(16), 2); - } - return ret; -} - -function RequestNextColor() -{ - var rgb = []; - var tmp = Math.round(Math.random() * colors.length); - if(tmp == nCurrentColor) { - return RequestNextColor(); - } - nCurrentColor = tmp; - - nColorX = nCurrentColor % 4; - nColorY = parseInt(nCurrentColor / 4) % 4; - nColorZ = parseInt(nCurrentColor / 16); - - rgb[0] = nColorX * 0x55; - rgb[1] = nColorY * 0x55; - rgb[2] = nColorZ * 0x55; - - return rgbToHex(rgb); -} \ No newline at end of file diff --git a/old/js/assetManager.js b/old/js/assetManager.js deleted file mode 100644 index 0fd5a26..0000000 --- a/old/js/assetManager.js +++ /dev/null @@ -1,19 +0,0 @@ -var assets = {} - -assets.loadLocal = function(file) { - -} - -assets.loadRemote = function(file) { - -} - -// called by loadRemote/Local -assets.decodeZip = function(zip) { - -} - -// Given a buffer -assets.decodeSong = function(index, callback) { - -} \ No newline at end of file diff --git a/old/js/audioUtils.js b/old/js/audioUtils.js deleted file mode 100644 index f5e4da5..0000000 --- a/old/js/audioUtils.js +++ /dev/null @@ -1,101 +0,0 @@ -var LAME_DELAY_START = 2258; -var LAME_DELAY_END = 1000; - -// callback is given a populated song object -function loadSong(song, callback) { - if(song.buffer) { - callback(song); - return; - } - if(song.isLoading) { - return; // we're already trying to load this - } - song.isLoading = true; - song.tmpBuf = {}; - if(song.buildUp) { - loadAudioFile(song, true, callback); - } - loadAudioFile(song, false, callback); -} - -function loadAudioFile(song, isBuild, callback) { - var filename = isBuild ? song.buildUp : song.file; - var req = new XMLHttpRequest(); - req.open('GET', filename, true); - req.responseType = 'arraybuffer'; - req.onload = function() { - audio.context.decodeAudioData( - req.response, - function(buffer) { - if(isBuild) { - song.tmpBuf.build = trimMP3(buffer); - } else { - song.tmpBuf.loop = trimMP3(buffer); - } - onSongLoad(song, callback); - }, - function() { - console.log('Error decoding audio "' + filename + '".'); - } - ); - }; - req.send(); -} - -function onSongLoad(song, callback) { - // if this fails, we need to wait for the other part to load - if(song.tmpBuf.loop && (!song.buildUp || song.tmpBuf.build)) { - if(song.buildUp) { - song.buffer = concatenateAudioBuffers(song.tmpBuf.build, song.tmpBuf.loop); - song.loopStart = song.tmpBuf.build.duration; - } else { - song.buffer = song.tmpBuf.loop; - song.loopStart = 0; - } - song.loopLength = song.buffer.duration - song.loopStart; - // free dat memory - song.tmpBuf = null; - song.isLoading = false; - callback(song); - } -} - -// because MP3 is bad -function trimMP3(buffer) { - var ret = audio.context.createBuffer(buffer.numberOfChannels, buffer.length - LAME_DELAY_START - LAME_DELAY_END, buffer.sampleRate); - for(var i=0; i>> 0; - var thisArg = arguments[1]; - var value; - - for (var i = 0; i < length; i++) { - value = list[i]; - if (predicate.call(thisArg, value, i, list)) { - return value; - } - } - return undefined; - }; - } - - zip.workerScriptsPath = 'lib/'; - respacksLoaded = []; - packno = 4; - function addGlobalSong(song){ - audio.songs[audio.songs.length] = song; - } - var fileInput = document.getElementById("respack-input"); - if(!audio || !audio.songs ){ - console.log("invalid audio object, bailing..."); - if(fileInput){ - fileInput.remove(); - } - - } - - - function respackHandleZipFile(event) { - var fileInput = document.getElementById("respack-input"); - - var fs = new zip.fs.FS(); - - fs.importBlob( fileInput.files[0], function() { - - if(fs.root.children.length === 1){ - rootdir = fs.root.children[0] - var basename = rootdir.name; - //Packshit respack is giving me headaches, this "fixes" the directory structure like Packshit.zip/Packshit/Packshit/songs.xml - if(rootdir.children.length == 1 && rootdir.children[0].name == basename){ - rootdir = rootdir.children[0]; - } - if(respackIsLoaded(basename)){ - alert("respack " + basename + " already loaded!"); - return; - }else{ - respacksLoaded[respacksLoaded.length] = {name: basename, packno: packno}; - } - console.log("Loading " + basename+".zip"); - //Find files of iterest - var songsXML = rootdir.children.find(function(element,index, array){ - if( element.name.toLowerCase() === "songs.xml"){ - return element; - } - return false; - }); - - var songsDir = rootdir.children.find(function(element,index, array){ - if( element.directory && (element.name.toLowerCase() === "songs" || element.name.toLowerCase() === "loops") ){ - return element; - } - return false; - }); - songsXML.getText(function(text){ - text = text.replace(/&/g, '&amp;'); //XML parser will complain about a bare '&', found in the Packshit respack - var songList = respackParseSongs(text); - songList.forEach(function(song, index, arr){ - if(song.buildUp){ - respackFindBuildUpData(song, songsDir, function(data){ - song.buildUp = data; - - }); - } - respackFindSongData(song, songsDir, function(data){ - song.file = data; - addGlobalSong(song); - }); - - if( index === (arr.length-1)){ - - packno += 1; - fs = null; //or somethin - } - }); - - }); - - } - - }, function(error) { - // onerror callback - console.log("Error loading zip file!"); - }); - this.value = null; //Chrom* - return false; //Firefox - } - if(!fileInput){ - //create a file input - fileInput = document.createElement("input"); - fileInput.type ="file" - fileInput.accept="application/zip" - fileInput.id="respack-input" - var controls = document.getElementById("controls"); - controls.appendChild(fileInput); - - } - fileInput.addEventListener('change', respackHandleZipFile, false); - - -} diff --git a/old/js/waifuCanvas.js b/old/js/waifuCanvas.js deleted file mode 100644 index 0029e7e..0000000 --- a/old/js/waifuCanvas.js +++ /dev/null @@ -1,197 +0,0 @@ -var canvas; -var needsRedraw = false; - -var waifuImgs = new Array(); -var waifuColour = "#FFF"; - -var blurDecay, blurAmount, blurIterations, blurMin, blurMax, blurDelta; // set later -// dynamic -var blurStart = 0; -var blurDistance = 0; -var xBlur = false; -var yBlur = false; - -var blackout = false; -var shortBlackout = false; -var blackoutColour = "#000"; // for the whiteout character -var blackoutTimeout; - -waifuCanvas = {}; - -waifuCanvas.init = function() { - waifuCanvas.blendMode = "hard-light"; - waifuCanvas.setBlurAmount(15); - waifuCanvas.setBlurIterations(31); - waifuCanvas.setBlurDecay(25); - canvas = document.getElementById("waifu").getContext("2d"); - window.addEventListener('resize', waifuCanvas.resize); - waifuCanvas.resize(); - //canvas.drawImage(waifuImgs[0], 0, 0); -} - -waifuCanvas.resize = function() { - // height is constant 720px, we expand width to suit - var ratio = window.innerWidth / window.innerHeight; - canvas.canvas.width = 720 * ratio + 1; - needsRedraw = true; -} - -waifuCanvas.preload = function() { - for(var waifu in waifus) { - newImg = new Image(); - newImg.onload = onFileLoad; - newImg.src = 'images/' + waifus[waifu].file; - waifuImgs[waifu] = newImg; - } -} - -waifuCanvas.redraw = function() { - var offset; // for centering/right/left align - var bOpacity; - var width = canvas.canvas.width; - var image = waifuImgs[nCurrentWaifu]; - - var cTime = audio.context.currentTime; - // white BG for the hard light filter - canvas.globalAlpha = 1; - canvas.globalCompositeOperation = "source-over"; - if(blackout) { - bOpacity = (cTime - blackoutStart)*10; // original is 3 frames, this is close - if(bOpacity > 1) { // optimise the draw - canvas.fillStyle = blackoutColour; - canvas.fillRect(0,0,width,720); - needsRedraw = false; - return; - } - } else { - canvas.fillStyle = "#FFF"; - canvas.fillRect(0,0,width,720); - } - - switch(waifus[nCurrentWaifu].align) { - case "left": - offset = 0; - break; - case "right": - offset = width - image.width; - break; - default: - offset = width/2 - image.width/2; - break; - } - if(xBlur || yBlur) { - canvas.globalAlpha = blurAlpha; - var delta = cTime - blurStart; - blurDistance = blurAmount * Math.exp(-blurDecay * delta); - } - if(xBlur) { - for(var i=blurMin; i<=blurMax; i+= blurDelta) { - canvas.drawImage(image, Math.floor(blurDistance * i) + offset, 0); - } - } else if(yBlur) { - for(var i=blurMin; i<=blurMax; i+= blurDelta) { - canvas.drawImage(image, offset, Math.floor(blurDistance * i)); - } - } else { - canvas.globalAlpha = 1; - canvas.drawImage(image, offset, 0); - } - canvas.globalAlpha = 0.7; - canvas.fillStyle = waifuColour; - canvas.globalCompositeOperation = waifuCanvas.blendMode; - canvas.fillRect(0,0,width,720); - if(blackout) { - canvas.globalAlpha = bOpacity; - canvas.fillStyle = blackoutColour; - canvas.fillRect(0,0,width,720); - needsRedraw = true; - } else { - needsRedraw = false; - } -} - -waifuCanvas.animationLoop = function() { - if(blackoutTimeout && audio.context.currentTime > blackoutTimeout) { - waifuCanvas.clearBlackout(); - } - if(blurStart && blurDistance < 0.3) { - blurDistance = 0; - blurStart = 0; - xBlur = yBlur = false; - waifuCanvas.redraw(); - } else if(blurStart) { - waifuCanvas.redraw(); - } else if(needsRedraw){ - waifuCanvas.redraw(); - } -} - -waifuCanvas.newWaifu = function() { - GetRandomWaifu(); // increments the waifu counter - needsRedraw = true; -} - -waifuCanvas.setColour = function(colour) { - waifuColour = colour; - needsRedraw = true; -} - -waifuCanvas.blackout = function(whiteout) { - if (typeof(whiteout)==='undefined') whiteout = false; - if(whiteout) { - blackoutColour = "#FFF"; - } else { - blackoutColour = "#000"; - } - blackoutTimeout = 0; // indefinite - blackoutStart = audio.context.currentTime; - blackout = true; - needsRedraw = true; -} - -// for song changes -waifuCanvas.clearBlackout = function() { - blackout = false; - blackoutTimeout = 0; - needsRedraw = true; -} - -waifuCanvas.shortBlackout = function(beatTime) { - waifuCanvas.blackout(); - GetRandomWaifu(); - blackoutTimeout = audio.context.currentTime + beatTime / 1.7; - // looks better if we go right to black - blackoutStart = 0; -} - -waifuCanvas.xBlur = function() { - blurStart = audio.context.currentTime; - blurDistance = blurAmount; - xBlur = true; - yBlur = false; - needsRedraw = true; -} - -waifuCanvas.yBlur = function() { - blurStart = audio.context.currentTime; - blurDistance = blurAmount; - xBlur = false; - yBlur = true; - needsRedraw = true; -} - -waifuCanvas.setBlurDecay = function(decay) { - blurDecay = decay; -} - -waifuCanvas.setBlurIterations = function(iterations) { - blurIterations = iterations; - blurDelta = blurAmount / blurIterations; - blurAlpha = 1/(blurIterations/2); -} - -waifuCanvas.setBlurAmount = function(amount) { - blurAmount = amount; - blurMin = -blurAmount/2; - blurMax = blurAmount/2; -} \ No newline at end of file diff --git a/old/js/waifus.js b/old/js/waifus.js deleted file mode 100644 index f36ce7d..0000000 --- a/old/js/waifus.js +++ /dev/null @@ -1,113 +0,0 @@ -waifus = {} - -waifus.defaults = { - respacks: ["respacks/default.zip"], - preloadBuild: null, - preloadLoop: null, - preloadOutro: null, - customColourSet: null, - blurQuality: 2, // low/med/high/extreme 0-3 - - // UI accessible config - // Autosong stuff is a todo - smartAlign: true, - blendMode: "hard-light", // hard-light, TODO: plain, alpha - blurAmount: 1, // 0,1,2,3 = off,low,med,high - blurDecay: 2, // 0,1,2,3 = slow,med,fast,faster! - colourSet: "normal", // normal, pastel, 420, custom - // scaleImages, nah - blackoutUI: false, - // channel selection, nah - playBuildups: "on" // off, once, on -} - -waifus.init = function() { - console.log("Initialising 0x40"); - // merge defaults and user set stuff - waifus.config = waifus.config || {}; - for(var attr in waifus.defaults) { - if(!waifus.config[attr]) - waifus.config[attr] = waifus.defaults[attr]; - } - - waifus.updateBlurQuality(); - waifus.updateBlurAmount(); - waifus.updateBlurDecay(); - waifuCanvas.blendMode = waifus.config.blendMode; - waifuCanvas.init(); - - waifus.initPreloader(); - if(waifus.config.preloadBuild || waifus.config.preloadLoop || waifus.config.preloadOutro) - waifus.initPreloadSong(); - - for(var i in waifus.config.respacks) { - waifus.loadRespack(i); - } - console.log("Initialisation complete"); -} - - -waifus.initPreloadSong = function() { - -} - -waifus.initPreloader = function() { - waifus.preload = []; - waifus.leftToLoad = waifus.config.respacks.length; - for(var i in waifus.config.respacks) { - waifus.preload[i] = 0; - } -} - -waifus.updatePreloader = function() { - var total = 0; - for(var i in waifus.config.respacks) { - total += waifus.preload[i]; - } - total /= waifus.config.respacks.length; - total = Math.floor(total * 0x40); - document.getElementById("preloader").innerHTML = '0x' + pad(total.toString(16), 2); -} - -waifus.loadRespack = function(i) { - var respack = waifus.config.respacks[i]; - console.log("Loading " + respack); - var req = new XMLHttpRequest(); - req.open('GET', respack, true); - req.responseType = 'arraybuffer'; - req.onload = function() { - console.log(respack + " downloaded"); - waifus.onRespackLoad(req.response); - }; - req.onprogress = function(evt) { - if (evt.lengthComputable) { - waifus.preload[i] = evt.loaded / evt.total; - waifus.updatePreloader(); - } - } - req.send(); -} - -waifus.onRespackLoad = function(buff) { - processRespack(buff); - waifus.leftToLoad--; - if(!waifus.leftToLoad) { - console.log("All zips downloaded"); - document.getElementById("preloader").style.color = "#0F0"; - } -} - -waifus.updateBlurQuality = function() { - var iterations = [5, 15, 31, 65]; - waifuCanvas.setBlurIterations(iterations[waifus.config.blurQuality]); -} - -waifus.updateBlurAmount = function() { - var amount = [0, 15, 30, 60]; - waifuCanvas.setBlurAmount(amount[waifus.config.blurAmount]); -} - -waifus.updateBlurDecay = function() { - var decay = [10, 15, 25, 45]; - waifuCanvas.setBlurDecay(decay[waifus.config.blurDecay]); -} \ No newline at end of file diff --git a/old/style.css b/old/style.css deleted file mode 100644 index d8ce6f5..0000000 --- a/old/style.css +++ /dev/null @@ -1,153 +0,0 @@ -@font-face { - font-family: 'PetMe64Web'; - font-style: normal; - font-weight: normal; - -webkit-font-smoothing: none; - font-smooth: never; - src: local("PetMe64Web"); - src: local('Pet Me 64'), local('Pet Me 64'), url("PetMe64.woff") format('woff'); -} - -html, body { - height: 100%; - margin: 0; padding: 0; - overflow: hidden; -} - -body { - background-color:#ffffff; -} - -.ui { - border: 3px solid #000; - background-color: rgba(200,200,200,0.5); - font-family: 'PetMe64Web'; - position: absolute; - left: 50%; - transform: translate(-50%, 0); - z-index: 3; - padding: 5px; -} - -#controls { - bottom: 0px; -} - -#beets { - top: 0px; - height: 20px; - overflow:hidden; - #display:table-cell; - #vertical-align:middle; - #padding: 5px; -} - -.beetView { - position: relative; - top: -50%; - display: inline-block; - padding: 0px; - background: #333; - color: #FFF; - #display: table-cell; - #vertical-align: middle; - #background-color: rgba(0,0,0,0.7); - #color: #FFF; - #border-radius: 13px 13px 13px 13px; - #-moz-border-radius: 13px 13px 13px 13px; - #-webkit-border-radius: 13px 13px 13px 13px; - #border: 0px none #000000; -} - -#beetLeft { - -webkit-border-top-left-radius: 5px; - -webkit-border-bottom-left-radius: 5px; - -moz-border-radius-topleft: 5px; - -moz-border-radius-bottomleft: 5px; - border-top-left-radius: 5px; - border-bottom-left-radius: 5px; - padding-right: 10px; -} - -#beetRight { - margin-left: -10px; - -webkit-border-top-right-radius: 5px; - -webkit-border-bottom-right-radius: 5px; - -moz-border-radius-topright: 5px; - -moz-border-radius-bottomright: 5px; - border-top-right-radius: 5px; - border-bottom-right-radius: 5px; - padding-left: 10px; -} - -#beetAccent { - #font-size: 40px; - margin-left: -10px; - font-size: 2em; - color: rgba(255,255,255,1); - z-index: 2; - padding: 7px; - border-radius: 50%; -} - -#beetAccent.fade { - animation-name: textfadeout; - animation-duration: 0.2s; - color: rgba(255,255,255,0); -} - -#waifu { - display: block; - height: 100%; - #margin-left: auto; - #margin-right: auto; - padding: 0; - - z-index: -10; - opacity: 0; -} - -#waifu.loaded { - opacity: 1; - animation-name: fadein; - animation-duration: 0.5s; - -webkit-animation-name: fadein; - -webkit-animation-duration: 0.5s; -} - -#preloader { - background-color: #FFF; - width: 100%; - height: 100%; - display:flex; - justify-content:center; - align-items:center; - font-family: 'PetMe64Web'; - font-size: 30pt; - - position: absolute; - top: 0; - left: 0; - z-index: 10; -} - -#preloader.loaded { - opacity: 0; - animation-name: fadeout; - animation-duration: 3s; - -webkit-animation-name: fadeout; - -webkit-animation-duration: 3s; -} - -@keyframes fadein { - from {opacity: 0;} - to {opacity: 1;} -} -@keyframes fadeout { - from {opacity: 1;} - to {opacity: 0;} -} -@keyframes textfadeout { - from {color: rgba(255,255,255,1);} - to {color: rgba(255,255,255,0);} -} \ No newline at end of file diff --git a/css/hues-h.css b/src/css/hues-h.css similarity index 83% rename from css/hues-h.css rename to src/css/hues-h.css index b930e13..faf3dce 100644 --- a/css/hues-h.css +++ b/src/css/hues-h.css @@ -33,8 +33,7 @@ } .hues-m-beatcenter.hues-h-text.hidden{ - transform: translateY(-80px); - -webkit-transform: translateY(-80px); + transform: translateY(-80px); } .hues-h-eyes { @@ -45,14 +44,8 @@ height: 64px; box-shadow: none; - -moz-animation-duration: 150ms; - -webkit-animation-duration: 150ms; animation-duration: 150ms; - -moz-animation-name: hues-m-beatcenter; - -webkit-animation-name: hues-m-beatcenter; animation-name: hues-m-beatcenter; - -moz-animation-fill-mode: forwards; - -webkit-animation-fill-mode: forwards; animation-fill-mode: forwards; } @@ -82,7 +75,6 @@ @media (min-width: 768px) { .hues-m-controls.hues-h-controls.hidden { transform: translateY(64px); - -webkit-transform: translateY(64px); } } @@ -92,9 +84,6 @@ background: none; border-style: solid; border-width: 0px 19px 0px 18px; - -moz-border-image: url(../img/bones.png) 0 19 0 18 repeat stretch; - -webkit-border-image: url(../img/bones.png) 0 19 0 18 repeat stretch; - -o-border-image: url(../img/bones.png) 0 19 0 18 repeat stretch; border-image: url(../img/bones.png) 0 19 0 18 fill repeat stretch; } @@ -145,9 +134,6 @@ .hues-h-tombstone { border-style: solid; border-width: 22px 40px 0px 42px; - -moz-border-image: url(../img/tombstone.png) 22 42 0 42 repeat; - -webkit-border-image: url(../img/tombstone.png) 22 42 0 42 repeat; - -o-border-image: url(../img/tombstone.png) 22 42 0 42 repeat; border-image: url(../img/tombstone.png) 22 42 0 42 fill repeat; height: 36px; position: absolute; diff --git a/css/hues-m.css b/src/css/hues-m.css similarity index 91% rename from css/hues-m.css rename to src/css/hues-m.css index d7c7c48..bda6d80 100644 --- a/css/hues-m.css +++ b/src/css/hues-m.css @@ -3,26 +3,20 @@ .hues-m-beatbar, .hues-m-beatcenter{ transform: translateY(0px); - -webkit-transform: translateY(0px); transition: transform 1s ease-out; - -webkit-transition: -webkit-transform 1s ease-out; } .hues-m-controls { transform: translateY(0px); - -webkit-transform: translateY(0px); transition: transform 1s ease-out; - -webkit-transition: -webkit-transform 1s ease-out; } .hues-m-beatbar.hidden, .hues-m-beatcenter.hidden{ transform: translateY(-40px); - -webkit-transform: translateY(-40px); } .hues-m-controls.hidden { transform: translateY(108px); - -webkit-transform: translateY(108px); } .hues-m-visualisercontainer { @@ -95,7 +89,6 @@ } .hues-m-beatleft { transform: scaleX(-1); - -webkit-transform: scaleX(-1); left: 8px; right: 50%; } @@ -122,38 +115,10 @@ } .hues-m-beatcenter > span { - -moz-animation-duration: 150ms; - -webkit-animation-duration: 150ms; animation-duration: 150ms; - -moz-animation-name: hues-m-beatcenter; - -webkit-animation-name: hues-m-beatcenter; animation-name: hues-m-beatcenter; - -moz-animation-fill-mode: forwards; - -webkit-animation-fill-mode: forwards; animation-fill-mode: forwards; } -@-moz-keyframes hues-m-beatcenter { - from { - opacity: 1; - } - 50% { - opacity: 1; - } - to { - opacity: 0; - } -} -@-webkit-keyframes hues-m-beatcenter { - from { - opacity: 1; - } - 50% { - opacity: 1; - } - to { - opacity: 0; - } -} @keyframes hues-m-beatcenter { from { opacity: 1; @@ -469,7 +434,6 @@ input[type=range]::-ms-thumb { } .hues-m-controls.hidden { transform: translateY(54px); - -webkit-transform: translateY(54px); } .hues-m-imagename { left: 300px; diff --git a/css/hues-r.css b/src/css/hues-r.css similarity index 91% rename from css/hues-r.css rename to src/css/hues-r.css index f0199be..5c12990 100644 --- a/css/hues-r.css +++ b/src/css/hues-r.css @@ -17,9 +17,7 @@ } .hues-r-controls { - display:-webkit-flex; display:flex; - -webkit-align-items:center; align-items:center; position: absolute; right: 0px; @@ -96,7 +94,6 @@ visibility: visible; opacity: 1; transition: visibility 0.5s linear, opacity 0.5s linear; - -webkit-transition: visibility 0.5s linear, opacity 0.5s linear; } .hues-r-container.hidden, .hues-r-controls.hidden, .hues-r-subcontrols.hidden { @@ -112,7 +109,6 @@ .hues-r-visualisercontainer { transform: scaleY(-1); - -webkit-transform: scaleY(-1); position: absolute; width: 100%; height: 64px; diff --git a/css/hues-res.css b/src/css/hues-res.css similarity index 92% rename from css/hues-res.css rename to src/css/hues-res.css index 0c9dd70..9235258 100644 --- a/css/hues-res.css +++ b/src/css/hues-res.css @@ -50,8 +50,6 @@ height:5px; /* Can be anything */ position: relative; background: #000; - -moz-border-radius: 25px; - -webkit-border-radius: 25px; border-radius: 25px; padding: 2px; margin: 2px; @@ -94,9 +92,7 @@ .res-listitem { font-size: 10px; border-bottom: 1px solid black; - display: -webkit-flex; display: flex; - -webkit-align-items: center; align-items: center; } @@ -140,9 +136,7 @@ } .res-buttons { - display: -webkit-flex; display: flex; - -webkit-justify-content: space-between; justify-content: space-between; padding: 0px 0px; } @@ -165,9 +159,7 @@ #res-packinfo { margin-top: 5px; font-size: 9px; - display: -webkit-flex; display: flex; - -webkit-justify-content: space-between; justify-content: space-between; } @@ -215,7 +207,6 @@ } #res-packbuttons > .res-button { - -webkit-flex-grow: 1; flex-grow: 1; text-align: center; } diff --git a/css/hues-w.css b/src/css/hues-w.css similarity index 78% rename from css/hues-w.css rename to src/css/hues-w.css index 2d310b0..20c1a41 100644 --- a/css/hues-w.css +++ b/src/css/hues-w.css @@ -1,9 +1,7 @@ /* WeedUI */ .hues-w-controls { - display:-webkit-flex; display:flex; - -webkit-align-items:center; align-items:center; position: absolute; right: 0px; @@ -33,7 +31,6 @@ visibility: visible; opacity: 1; transition: visibility 0.5s linear, opacity 0.5s linear; - -webkit-transition: visibility 0.5s linear, opacity 0.5s linear; } .hues-w-controls.hidden, .hues-w-subcontrols.hidden, .hues-w-beatbar.hidden { @@ -52,7 +49,6 @@ } .hues-w-beatleft { transform: scaleX(-1); - -webkit-transform: scaleX(-1); left: 8px; right: 50%; } @@ -75,20 +71,12 @@ animation-name: fallspin; animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); animation-duration: 0.5s; - - -webkit-animation-name: fallspin; - -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); - -webkit-animation-duration: 0.5s; } @keyframes fallspin { from {transform: rotate(0deg) translate(0px, 0px); opacity: 1;} } -@-webkit-keyframes fallspin { - from {-webkit-transform: rotate(0deg) translate(0px, 0px); - opacity: 1;} -} .hues-r-visualisercontainer.hues-w-visualisercontainer { top: 17px; diff --git a/css/hues-x.css b/src/css/hues-x.css similarity index 94% rename from css/hues-x.css rename to src/css/hues-x.css index 9f72e50..02ec58a 100644 --- a/css/hues-x.css +++ b/src/css/hues-x.css @@ -26,14 +26,12 @@ width: 68px; height: 113px; transform-origin: 32px 69px; - -webkit-transform-origin: 32px 69px; background-image: url("../img/lightbase.png"); background-repeat: no-repeat; } .hues-x-fade{ transition: opacity 0.1s linear; - -webkit-transition: opacity 0.1s linear; } .hues-x-lighton, .hues-x-lightoff { @@ -107,7 +105,6 @@ .hues-x-visualisercontainer { transform: scaleY(-1); - -webkit-transform: scaleY(-1); position: absolute; width: 100%; height: 64px; diff --git a/css/style.css b/src/css/style.css similarity index 93% rename from css/style.css rename to src/css/style.css index 1258895..18f5b29 100644 --- a/css/style.css +++ b/src/css/style.css @@ -63,11 +63,8 @@ h1, h2, h3 { } #reference { - display:-webkit-flex; display:flex; - -webkit-align-items:center; align-items:center; - -webkit-justify-content: center; justify-content: center; } @@ -125,13 +122,9 @@ h1, h2, h3 { background-color: #FFF; width: 100%; height: 100%; - display:-webkit-flex; display:flex; - -webkit-justify-content:center; justify-content:center; - -webkit-align-items:center; align-items:center; - -webkit-flex-direction: column; flex-direction: column; font-size: 25pt; @@ -142,7 +135,6 @@ h1, h2, h3 { visibility: visible; opacity: 1; transition: visibility 1s linear, opacity 1s linear; - -webkit-transition: visibility 1s linear, opacity 1s linear; } #preloadHelper.loaded { @@ -191,7 +183,8 @@ input.tab-input[type="radio"]:checked + label { #tab1:checked ~ #tab1-content, #tab2:checked ~ #tab2-content, -#tab3:checked ~ #tab3-content { +#tab3:checked ~ #tab3-content, +#tab4:checked ~ #tab4-content { display: block; } @@ -238,7 +231,7 @@ input.tab-input[type="radio"]:checked + label { } .settings-category { - font-size: 12pt; + font-size: 16px; width: 50%; float: left; margin-bottom: 10px; @@ -319,7 +312,12 @@ label.settings-label:hover { .hues-button.loaded { background-color: rgba(0,127,0,0.5); - cursor: auto; + cursor: default; +} + +.hues-button.disabled { + color: #777; + cursor: default; } .hues-button:hover { @@ -329,4 +327,8 @@ label.settings-label:hover { .hues-button.loaded:hover { background-color: rgba(0,127,0,0.5); cursor: default; +} + +.hues-button.disabled:hover { + background-color: rgba(127,127,127, 0.5); } \ No newline at end of file diff --git a/js/HuesCanvas.js b/src/js/HuesCanvas.js similarity index 100% rename from js/HuesCanvas.js rename to src/js/HuesCanvas.js diff --git a/js/HuesCore.js b/src/js/HuesCore.js similarity index 97% rename from js/HuesCore.js rename to src/js/HuesCore.js index db22a3e..0567ea6 100644 --- a/js/HuesCore.js +++ b/src/js/HuesCore.js @@ -26,6 +26,8 @@ "use strict"; function HuesCore(defaults) { + // Yes, we do indeed have Javascript + this.clearMessage(); // Bunch-o-initialisers this.version = "0x0B"; this.beatIndex = 0; @@ -126,7 +128,9 @@ function HuesCore(defaults) { this.uiArray.push(new RetroUI(), new WeedUI(), new ModernUI(), new XmasUI(), new HalloweenUI()); this.settings = new HuesSettings(defaults); + zip.workerScriptsPath = this.settings.defaults.workersPath; this.resourceManager = new Resources(this); + this.editor = new HuesEditor(this); this.autoSong = localStorage["autoSong"]; @@ -334,6 +338,16 @@ HuesCore.prototype.setSongByName = function(name) { this.setSong(0); // fallback }; +/* To set songs via reference instead of index - used in HuesEditor */ +HuesCore.prototype.setSongOject = function(song) { + for(var i = 0; i < this.resourceManager.enabledSongs.length; i++) { + if(this.resourceManager.enabledSongs[i] === song) { + this.setSong(i); + return; + } + } +} + HuesCore.prototype.setSong = function(index) { if(this.currentSong == this.resourceManager.enabledSongs[index]) { return; @@ -370,8 +384,16 @@ HuesCore.prototype.setSong = function(index) { }.bind(this)); }; +HuesCore.prototype.updateBeatLength = function() { + //if(this.soundManager.currentTime() < 0) { + // this.beatLength = this.soundManager.loopStart / this.currentSong.buildupRhythm.length; + //} else { + this.beatLength = this.soundManager.loopLength / this.currentSong.rhythm.length; + //} +} + HuesCore.prototype.fillBuildup = function() { - this.beatLength = this.soundManager.loopLength / this.currentSong.rhythm.length; + this.updateBeatLength(); var buildBeats = Math.floor(this.soundManager.loopStart / this.beatLength); if(buildBeats < 1) { buildBeats = 1; @@ -825,9 +847,9 @@ HuesCore.prototype.keyHandler = function(key) { case 82: // R this.settings.showRespacks(); break; - /*case 69: // E - this.window.showEditor(); - break;*/ + case 69: // E + this.settings.showEditor(); + break; case 79: // O this.settings.showOptions(); break; @@ -880,7 +902,6 @@ HuesCore.prototype.warning = function(message) { }; HuesCore.prototype.clearMessage = function() { - console.log(message); document.getElementById("preSub").textContent = ""; document.getElementById("preMain").style.color = ""; }; diff --git a/js/HuesInfo.js b/src/js/HuesInfo.js similarity index 100% rename from js/HuesInfo.js rename to src/js/HuesInfo.js diff --git a/js/HuesSettings.js b/src/js/HuesSettings.js similarity index 97% rename from js/HuesSettings.js rename to src/js/HuesSettings.js index c1fcfb4..42dfe82 100644 --- a/js/HuesSettings.js +++ b/src/js/HuesSettings.js @@ -27,8 +27,9 @@ - Go to the HTML and edit the `defaults` object instead! */ HuesSettings.prototype.defaultSettings = { - // MP3 worker script location relative to root - mp3WorkerPath : "js/mp3/", + // Location relative to root - where do the mp3/zip workers live + // This is required because Web Workers need an absolute path + workersPath : "lib/workers/", // Debugging var, for loading zips or not load : true, // Debug, play first song automatically? @@ -49,6 +50,8 @@ HuesSettings.prototype.defaultSettings = { preloadPrefix: "0x", preloadBase: 16, preloadMax: 0x40, + // If true, loads the editor on launch + showEditor: false, // UI accessible config smartAlign: "on", @@ -82,7 +85,9 @@ HuesSettings.prototype.ephemeralSettings = [ "preloadBase", "preloadMax", "noUI", - "showInfo" + "showInfo", + "showEditor", + "workersPath" ]; // To dynamically build the UI like the cool guy I am @@ -273,16 +278,21 @@ HuesSettings.prototype.showRespacks = function() { document.getElementById("tab1").checked = true; }; -HuesSettings.prototype.showOptions = function() { +HuesSettings.prototype.showEditor = function() { this.show(); document.getElementById("tab2").checked = true; }; -HuesSettings.prototype.showInfo = function() { +HuesSettings.prototype.showOptions = function() { this.show(); document.getElementById("tab3").checked = true; }; +HuesSettings.prototype.showInfo = function() { + this.show(); + document.getElementById("tab4").checked = true; +}; + HuesSettings.prototype.initUI = function() { var doc = this.root.ownerDocument; diff --git a/js/HuesUI.js b/src/js/HuesUI.js similarity index 100% rename from js/HuesUI.js rename to src/js/HuesUI.js diff --git a/js/ResourceManager.js b/src/js/ResourceManager.js similarity index 100% rename from js/ResourceManager.js rename to src/js/ResourceManager.js diff --git a/js/ResourcePack.js b/src/js/ResourcePack.js similarity index 100% rename from js/ResourcePack.js rename to src/js/ResourcePack.js diff --git a/js/SoundManager.js b/src/js/SoundManager.js similarity index 98% rename from js/SoundManager.js rename to src/js/SoundManager.js index 353431c..db2666f 100644 --- a/js/SoundManager.js +++ b/src/js/SoundManager.js @@ -83,7 +83,7 @@ SoundManager.prototype.init = function() { return new Promise(function(resolve, reject) { // Get our MP3 decoder started try { - this.mp3Worker = new Worker(this.core.settings.defaults.mp3WorkerPath + 'mp3-worker.js'); + this.mp3Worker = new Worker(this.core.settings.defaults.workersPath + 'mp3-worker.js'); } catch(e) { console.log(e); reject(Error("MP3 Worker cannot be started - correct path set in defaults?")); @@ -118,10 +118,12 @@ SoundManager.prototype.init = function() { source.start(0); window.removeEventListener('touchend', unlocker); + window.removeEventListener('click', unlocker); this.core.clearMessage(); resolve(); }.bind(this); window.addEventListener('touchend', unlocker, false); + window.addEventListener('click', unlocker, false); } else { resolve(); } diff --git a/js/mp3/aurora.js b/src/js/mp3/aurora.js similarity index 100% rename from js/mp3/aurora.js rename to src/js/mp3/aurora.js diff --git a/js/mp3/mp3.js b/src/js/mp3/mp3.js similarity index 100% rename from js/mp3/mp3.js rename to src/js/mp3/mp3.js