Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "midifile", | ||
"description": "Read/write standard MIDI files.", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"author": "Nicolas Froidure", | ||
@@ -6,0 +6,0 @@ "repository": { |
@@ -63,3 +63,3 @@ # MIDIFile | ||
// Reading whole track events and filtering them yourself | ||
var trackEventsChunk=midiFile.tracks[0].getTrackEvents(), | ||
var trackEventsChunk=midiFile.getTrackEvents(0), | ||
events=new MIDIFile.createParser(trackEventsChunk), | ||
@@ -66,0 +66,0 @@ event; |
@@ -53,3 +53,2 @@ // MIDIFileHeader : Read and edit a MIDI header chunk in a given ArrayBuffer | ||
MIDIFileHeader.prototype.setFormat=function(format) { | ||
var format=this.datas.getUint16(8); | ||
if(0!==format&&1!==format&&2!==format) { | ||
@@ -59,3 +58,3 @@ throw new Error('Invalid MIDI format given ('+format+'),' | ||
} | ||
return format; | ||
this.datas.setUint16(8, format); | ||
}; | ||
@@ -142,2 +141,1 @@ | ||
module.exports = MIDIFileHeader; | ||
@@ -64,3 +64,3 @@ // MIDIFileTrack : Read and edit a MIDI track chunk in a given ArrayBuffer | ||
MIDIFileTrack.prototype.setTrackLength=function(trackLength) { | ||
return this.datas.setUint32(trackLength); | ||
return this.datas.setUint32(4, trackLength); | ||
}; | ||
@@ -67,0 +67,0 @@ |
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
1372001
2126