Skip to content

Commit

Permalink
RawClip.validate()
Browse files Browse the repository at this point in the history
  • Loading branch information
jazz-soft committed Feb 15, 2024
1 parent 9f11417 commit d1a9c6d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
10 changes: 9 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,15 @@ function RawClip(x) {
RawClip.prototype = [];
RawClip.prototype.send = function(msg) { this.push(JZZ.UMP(msg)); return this; };
RawClip.prototype.annotate = function() {};
RawClip.prototype.validate = function() {};
RawClip.prototype.validate = function() {
var clip, w;
try {
clip = new JZZ.MIDI.Clip(this.dump());
w = clip.validate();
}
catch (e) {/**/}
return w;
};
RawClip.prototype._complain = function(off, msg) {
console.log(off, msg);
};
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "test-midi-files",
"version": "1.0.2",
"version": "1.0.3",
"description": "A framework for producing test MIDI files",
"main": "index.js",
"scripts": {
Expand All @@ -24,7 +24,7 @@
"jzz-gui-player": "^1.7.0",
"jzz-midi-gear": "^1.3.2",
"jzz-midi-gm": "^1.3.5",
"jzz-midi-smf": "^1.8.4",
"jzz-midi-smf": "^1.8.5",
"jzz-synth-tiny": "^1.3.8"
},
"devDependencies": {
Expand Down

0 comments on commit d1a9c6d

Please sign in to comment.