Skip to content

Commit

Permalink
umpPortamento()
Browse files Browse the repository at this point in the history
  • Loading branch information
jazz-soft committed Dec 29, 2023
1 parent 410c727 commit ffeb72f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
8 changes: 8 additions & 0 deletions javascript/JZZ.js
Original file line number Diff line number Diff line change
Expand Up @@ -3081,6 +3081,9 @@
if (_noctrl.includes(n)) _throw(n);
return [0x40 + _4b(g), 0xb0 + _ch(c), _7b(n), 0].concat(_32a(x, y, z, w));
},
umpPortamento: function(g, c, n) {
return [0x40 + _4b(g), 0xb0 + _ch(c), 0x54, 0, _7bn(n), 0, 0, 0];
},
umpPressure: function(g, c, x, y, z, w) {
return [0x40 + _4b(g), 0xd0 + _ch(c), 0, 0].concat(_32a(x, y, z, w));
},
Expand Down Expand Up @@ -3409,6 +3412,11 @@
14: 'Pitch Bend',
15: 'Per-Note Management'
}[n];
if (n == 11) {
s = {
84: 'Portamento'
}[this[2]] || s;
}
}
else if (t == 5) {
s = 'Data';
Expand Down
2 changes: 1 addition & 1 deletion minified/JZZ.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions test/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -1059,6 +1059,9 @@ describe('UMP messages', function() {
assert.equal(JZZ.UMP.umpControl(1, 2, 3, 0xf0, 0xf0, 0xf0, 0xf0).toString(), s);
assert.throws(function() { JZZ.UMP.umpControl(1, 2, 0, 0xf0f0f0f0); });
});
it('umpPortamento', function() {
assert.equal(JZZ.UMP.umpPortamento(1, 2, 'C5').toString(), '41b25400 3c000000 -- Portamento');
});
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');
Expand Down

0 comments on commit ffeb72f

Please sign in to comment.