Skip to content

Commit

Permalink
UMP.match()
Browse files Browse the repository at this point in the history
  • Loading branch information
jazz-soft committed Jul 8, 2023
1 parent d5deb3e commit 876957e
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ by running `npm remove midi-test --save-dev`.

```html
<script src="https://cdn.jsdelivr.net/npm/jzz"></script> // the latest version, or
<script src="https://cdn.jsdelivr.net/npm/jzz@1.6.5"></script> // any particular version
<script src="https://cdn.jsdelivr.net/npm/jzz@1.6.6"></script> // any particular version
//...
```

##### CDN (unpkg)

```html
<script src="https://unpkg.com/jzz"></script> // the latest version, or
<script src="https://unpkg.com/jzz@1.6.5"></script> // any particular version
<script src="https://unpkg.com/jzz@1.6.6"></script> // any particular version
//...
```

Expand Down
5 changes: 4 additions & 1 deletion javascript/JZZ.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
})(this, function() {

var _scope = typeof window === 'undefined' ? global : window;
var _version = '1.6.5';
var _version = '1.6.6';
var i, j, k, m, n;

/* istanbul ignore next */
Expand Down Expand Up @@ -3023,6 +3023,8 @@
UMP.prototype.isTimeSignature = function() {
return (this[0] >> 4) == 13 && (this[1] >> 4) == 1 && this[2] == 0 && this[3] == 1;
};
UMP.prototype.isStartClip = function() { return this.match([0xf0, 0x20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]); };
UMP.prototype.isEndClip = function() { return this.match([0xf0, 0x21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]); };

UMP.prototype.toString = MIDI.prototype.toString;
UMP.prototype._str = function() {
Expand Down Expand Up @@ -3053,6 +3055,7 @@
UMP.prototype._stamp = MIDI.prototype._stamp;
UMP.prototype._unstamp = MIDI.prototype._unstamp;
UMP.prototype._stamped = MIDI.prototype._stamped;
UMP.prototype.match = MIDI.prototype.match;

JZZ.UMP = UMP;
_J.prototype.UMP = UMP;
Expand Down
2 changes: 1 addition & 1 deletion minified/JZZ.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jzz",
"version": "1.6.5",
"version": "1.6.6",
"description": "MIDI library for Node.js and web-browsers",
"main": "javascript/JZZ.js",
"scripts": {
Expand Down
2 changes: 2 additions & 0 deletions test/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -867,6 +867,8 @@ describe('UMP messages', function() {
it('umpStartClip', function() {
var msg = JZZ.UMP.umpStartClip();
assert.equal(typeof msg.getGroup(), 'undefined');
assert.equal(msg.isStartClip(), true);
assert.equal(msg.isEndClip(), false);
assert.equal(msg.toString(), 'f0200000 00000000 00000000 00000000 -- Start of Clip');
});
it('umpEndClip', function() {
Expand Down
2 changes: 1 addition & 1 deletion web-midi-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"web-midi-api"
],
"dependencies": {
"jzz": "^1.6.5"
"jzz": "^1.6.6"
},
"contributors": [
{
Expand Down

0 comments on commit 876957e

Please sign in to comment.