Skip to content

Commit

Permalink
umpTuningBank/Progran()
Browse files Browse the repository at this point in the history
  • Loading branch information
jazz-soft committed Jan 10, 2024
1 parent 77cf764 commit a6cb812
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
6 changes: 6 additions & 0 deletions javascript/JZZ.js
Original file line number Diff line number Diff line change
Expand Up @@ -3125,6 +3125,12 @@
umpCoarseTuning: function(g, c, n) {
return [0x40 + _4b(g), 0x20 + _ch(c), 0, 2, _7b(n) * 2, 0, 0, 0];
},
umpTuningProgram: function(g, c, n) {
return [0x40 + _4b(g), 0x20 + _ch(c), 0, 3, _7b(n) * 2, 0, 0, 0];
},
umpTuningBank: function(g, c, n) {
return [0x40 + _4b(g), 0x20 + _ch(c), 0, 4, _7b(n) * 2, 0, 0, 0];
},
umpPnManagement: function(g, c, n, m) {
var a = m.toString().split('');
var x = 0;
Expand Down
2 changes: 1 addition & 1 deletion minified/JZZ.js

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions test/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -1077,6 +1077,12 @@ describe('UMP messages', function() {
it('umpCoarseTuning', function() {
assert.equal(JZZ.UMP.umpCoarseTuning(1, 2, 3).toString(), '41220002 06000000 -- Registered Controller: Coarse Tuning');
});
it('umpTuningProgram', function() {
assert.equal(JZZ.UMP.umpTuningProgram(1, 2, 0).toString(), '41220003 00000000 -- Registered Controller: Select Tuning Program');
});
it('umpTuningBank', function() {
assert.equal(JZZ.UMP.umpTuningBank(1, 2, 3).toString(), '41220004 06000000 -- Registered Controller: Select Tuning Bank');
});
it('umpPitchBend', function() {
assert.equal(JZZ.UMP.umpPitchBend(1, 2, 3, 4, 5, 6).toString(), '41e20000 03040506 -- Pitch Bend');
assert.equal(JZZ.UMP.umpPitchBendF(1, 2, -1).toString(), '41e20000 00000000 -- Pitch Bend');
Expand Down Expand Up @@ -1639,11 +1645,11 @@ describe('JZZ.M2M1', function() {
});
it('aftertouch/pressure', function(done) {
var sample = new test.Sample(done, [
[0xa1, 60, 80], [0xa1, 60, 0], [0xd1, 80]
[0xa1, 60, 80], [0xa1, 60, 1], [0xa1, 60, 0], [0xa1, 60, 0], [0xd1, 80]
]);
var port = new JZZ.M2M1();
port.connect(function(msg) { sample.compare(msg); });
port.umpAftertouch(0, 1, 'C5', 0xa0000000).umpPnPressure(0, 1, 'C5', 0).umpPressure(0, 1, 0xa0000000);
port.umpAftertouch(0, 1, 'C5', 0xa0000000).umpAftertouch(0, 1, 'C5', 1).umpAftertouch(0, 1, 'C5', 0).umpPnPressure(0, 1, 'C5', 0).umpPressure(0, 1, 0xa0000000);
});
it('pitchBend', function(done) {
var sample = new test.Sample(done, [
Expand Down

0 comments on commit a6cb812

Please sign in to comment.