Skip to content

Commit

Permalink
umpTranspose()
Browse files Browse the repository at this point in the history
  • Loading branch information
jazz-soft committed Jan 31, 2024
1 parent 7633629 commit 83524b9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions javascript/JZZ.js
Original file line number Diff line number Diff line change
Expand Up @@ -3133,6 +3133,9 @@
umpCoarseTuning: function(g, c, n) {
return [0x40 + _4b(g), 0x20 + _ch(c), 0, 2, _7b(n) * 2, 0, 0, 0];
},
umpCoarseTuningF: function(g, c, x) {
return _helperGC.umpCoarseTuning(g, c, 0x40 + (x - x % 1));
},
umpTuningProgram: function(g, c, n) {
return [0x40 + _4b(g), 0x20 + _ch(c), 0, 3, _7b(n) * 2, 0, 0, 0];
},
Expand All @@ -3152,6 +3155,7 @@
};
_helperGC.umpPnPressure = _helperGC.umpAftertouch;
_helperGC.umpPnPressureF = _helperGC.umpAftertouchF;
_helperGC.umpTranspose = _helperGC.umpCoarseTuningF;
var _helperGCX = {
umpCustomText: function(g, c, d, b, s, t) {
var i;
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 @@ -1076,6 +1076,9 @@ describe('UMP messages', function() {
});
it('umpCoarseTuning', function() {
assert.equal(JZZ.UMP.umpCoarseTuning(1, 2, 3).toString(), '41220002 06000000 -- Registered Controller: Coarse Tuning');
assert.equal(JZZ.UMP.umpCoarseTuningF(1, 2, 1.5).toString(), '41220002 82000000 -- Registered Controller: Coarse Tuning');
assert.equal(JZZ.UMP.umpCoarseTuningF(1, 2, -1.5).toString(), '41220002 7e000000 -- Registered Controller: Coarse Tuning');
assert.equal(JZZ.UMP.umpTranspose(1, 2, 0).toString(), '41220002 80000000 -- Registered Controller: Coarse Tuning');
});
it('umpTuningProgram', function() {
assert.equal(JZZ.UMP.umpTuningProgram(1, 2, 0).toString(), '41220003 00000000 -- Registered Controller: Select Tuning Program');
Expand Down

0 comments on commit 83524b9

Please sign in to comment.