Comparing version 2.4.1 to 2.5.0
{ | ||
"name": "yjmidi", | ||
"version": "2.4.1", | ||
"version": "2.5.0", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "description": "midi/yjk file parser/player", |
@@ -14,3 +14,3 @@ const EventEmitter = require('events'); | ||
loadMidi(data){ | ||
loadMidi(data,opts = {}){ | ||
if(this.playing) this.pause(); | ||
@@ -22,6 +22,6 @@ if(data instanceof MidiFile){ | ||
} | ||
this.prepare(); | ||
this.prepare(opts); | ||
} | ||
getPoly(port){ | ||
/*getPoly(port){ | ||
return this.calcPolyOfAllTracks(); | ||
@@ -31,3 +31,3 @@ if(port !== 0){ | ||
} | ||
} | ||
}*/ | ||
@@ -68,3 +68,7 @@ calcPoly(portNum = 0,allPorts = false){ | ||
prepare(){ | ||
prepare(opts){ | ||
opts = Object.assign({ | ||
dontSendMidiReset:false | ||
},opts || {}); | ||
this.playms = 0; | ||
@@ -74,3 +78,3 @@ this.lastplayms = 0; | ||
this.tempo = 1; // ๋ฐฐ์ ์ค์ | ||
this.resetNotes(true); | ||
if(!opts.dontSendMidiReset) this.resetNotes(true); | ||
@@ -77,0 +81,0 @@ // reset sysex๊ฐ ์๋ midiํ์ผ์ ๊ฒฝ์ฐ gs reset์ ๊ธฐ๋ณธ์ผ๋ก ์ ์ฉํ๋๋ก ์ค์ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
54322
627