From 6cce44dbeb09adda20fda7ba542c639de05fca69 Mon Sep 17 00:00:00 2001 From: Scott Kellum Date: Sun, 2 Apr 2017 20:21:24 -0400 Subject: [PATCH] fix #1 --- bower.json | 2 +- modularscale.js | 4 +++- modularscale.min.js | 2 +- package.json | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/bower.json b/bower.json index b2e6457..85703fd 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "modularscale-js", - "version": "3.0.0", + "version": "3.0.1", "homepage": "http://modularscale.com/", "authors": [ "scottkellum " diff --git a/modularscale.js b/modularscale.js index d0f2ca6..e546b7d 100644 --- a/modularscale.js +++ b/modularscale.js @@ -72,4 +72,6 @@ function msFunction(v,settings) { function ms(v,settings) { return msFunction(v,settings); -} \ No newline at end of file +} + +module.exports = ms; \ No newline at end of file diff --git a/modularscale.min.js b/modularscale.min.js index 7e41842..75e192c 100644 --- a/modularscale.min.js +++ b/modularscale.min.js @@ -1 +1 @@ -function msFunction(o,r){void 0===r&&(r=modularscale);var t=r.base,a=r.ratio;if(void 0===a&&(a=modularscale.ratio),void 0===t&&(t=modularscale.base),!Array.isArray(t)||1===t.length)return Math.pow(a,o)*t;for(var e=Math.pow(a,1)*t[0],n=1;n=e/1;)t[n]=Math.pow(a,-1)*t[n]}t.sort();var h=Math.round((o/t.length-Math.floor(o/t.length))*t.length);return Math.pow(a,Math.floor(o/t.length))*t[h]}function ms(o,r){return msFunction(o,r)}var minorSecond=16/15,majorSecond=1.125,minorThird=1.2,majorThird=1.25,perfectFourth=4/3,augFourth=1.414,perfectFifth=1.5,minorSixth=1.6,goldenSection=1.61803398875,majorSixth=5/3,minorSeventh=16/9,majorSeventh=1.875,octave=2,majorTenth=2.5,majorEleventh=8/3,majorTwelfth=3,doubleOctave=4,modularscale={base:16,ratio:1.5}; \ No newline at end of file +function msFunction(a,b){void 0===b&&(b=modularscale);var c=b.base,d=b.ratio;if(void 0===d&&(d=modularscale.ratio),void 0===c&&(c=modularscale.base),!Array.isArray(c)||1===c.length)return Math.pow(d,a)*c;for(var e=Math.pow(d,1)*c[0],f=1;f=e/1;)c[f]=Math.pow(d,-1)*c[f]}c.sort();var g=Math.round((a/c.length-Math.floor(a/c.length))*c.length);return Math.pow(d,Math.floor(a/c.length))*c[g]}function ms(a,b){return msFunction(a,b)}var minorSecond=16/15,majorSecond=1.125,minorThird=1.2,majorThird=1.25,perfectFourth=4/3,augFourth=1.414,perfectFifth=1.5,minorSixth=1.6,goldenSection=1.61803398875,majorSixth=5/3,minorSeventh=16/9,majorSeventh=1.875,octave=2,majorTenth=2.5,majorEleventh=8/3,majorTwelfth=3,doubleOctave=4,modularscale={base:16,ratio:1.5};module.exports=ms; \ No newline at end of file diff --git a/package.json b/package.json index 6d1ec77..474fce7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "modularscale-js", - "version": "3.0.0", + "version": "3.0.1", "description": "A modular scale calculator written in JavaScript", "homepage": "http://www.modularscale.com/", "bugs": {