Skip to content

Commit

Permalink
umpProgram() with single bank number
Browse files Browse the repository at this point in the history
  • Loading branch information
jazz-soft committed Nov 30, 2024
1 parent a96a08e commit 02a4e08
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 13 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/[email protected].6"></script> // any particular version
<script src="https://cdn.jsdelivr.net/npm/[email protected].7"></script> // any particular version
//...
```

##### CDN (unpkg)

```html
<script src="https://unpkg.com/jzz"></script> // the latest version, or
<script src="https://unpkg.com/[email protected].6"></script> // any particular version
<script src="https://unpkg.com/[email protected].7"></script> // any particular version
//...
```

Expand Down
7 changes: 4 additions & 3 deletions 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.8.6';
var _version = '1.8.7';
var i, j, k, m, n;

/* istanbul ignore next */
Expand Down Expand Up @@ -3192,8 +3192,9 @@
},
umpProgram: function(g, c, n, msb, lsb) {
return typeof msb == 'undefined' && typeof lsb == 'undefined' ?
[0x40 + _4b(g), 0xc0 + _ch(c), 0, 0, _7bn(n), 0, 0, 0] :
[0x40 + _4b(g), 0xc0 + _ch(c), 0, 1, _7bn(n), 0, _7bn(msb), _7bn(lsb)];
[0x40 + _4b(g), 0xc0 + _ch(c), 0, 0, _7bn(n), 0, 0, 0] : typeof lsb == 'undefined' ?
[0x40 + _4b(g), 0xc0 + _ch(c), 0, 1, _7bn(n), 0, _msb(msb), _lsb(msb)] :
[0x40 + _4b(g), 0xc0 + _ch(c), 0, 1, _7bn(n), 0, _7b(msb), _7b(lsb)];
},
umpPitchBend: function(g, c, x, y, z, w) {
return [0x40 + _4b(g), 0xe0 + _ch(c), 0, 0].concat(_32a(x, y, z, w));
Expand Down
2 changes: 1 addition & 1 deletion minified/JZZ.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jzz",
"version": "1.8.6",
"version": "1.8.7",
"description": "MIDI library for Node.js and web-browsers",
"main": "javascript/JZZ.js",
"scripts": {
Expand All @@ -22,13 +22,13 @@
"jazz-midi": "^1.7.9"
},
"devDependencies": {
"eslint": "^9.9.1",
"eslint": "^9.16.0",
"grunt": "^1.6.1",
"grunt-contrib-jshint": "^3.2.0",
"grunt-contrib-uglify": "^5.2.2",
"midi-test": "^1.3.1",
"mocha": "^10.7.3",
"nyc": "^17.0.0",
"mocha": "^10.8.2",
"nyc": "^17.1.0",
"web-audio-test": "^0.0.8",
"web-midi-test": "^1.2.8"
},
Expand Down
2 changes: 1 addition & 1 deletion test/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,7 @@ describe('UMP messages', function() {
it('umpProgram', function() {
assert.equal(JZZ.UMP.umpProgram(1, 2, 3).toString(), '41c20000 03000000 -- Program Change');
assert.equal(JZZ.UMP.umpProgram(1, 2, 3, 4, 5).toString(), '41c20001 03000405 -- Program Change');
assert.throws(function() { JZZ.UMP.umpProgram(1, 2, 3, 4); });
assert.equal(JZZ.UMP.umpProgram(1, 2, 3, 517).toString(), '41c20001 03000405 -- Program Change');
});
it('umpRPN', function() {
assert.equal(JZZ.UMP.umpRPN(1, 2, 3, 4, 5).toString(), '41220304 00000005 -- Registered Controller');
Expand Down
4 changes: 2 additions & 2 deletions web-midi-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "web-midi-api",
"version": "2.3.3",
"version": "2.3.4",
"description": "Web MIDI API for Node.js",
"main": "index.js",
"scripts": {
Expand All @@ -13,7 +13,7 @@
"web-midi-api"
],
"dependencies": {
"jzz": "^1.8.6"
"jzz": "^1.8.7"
},
"contributors": [
{
Expand Down

0 comments on commit 02a4e08

Please sign in to comment.