Skip to content

Commit

Permalink
MIDI.to32b()
Browse files Browse the repository at this point in the history
  • Loading branch information
jazz-soft committed Feb 1, 2024
1 parent 83524b9 commit 851e0e4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions javascript/JZZ.js
Original file line number Diff line number Diff line change
Expand Up @@ -1678,6 +1678,10 @@
x = (Math.floor(x) << 14) + MIDI.to14b(x - Math.floor(x));
return x < 0x1fffff ? x : 0x1ffffe;
};
MIDI.to32b = function(x) {
_float(x);
return x <= 0 ? 0 : x >= 1 ? 0xffffffff : Math.floor(x * 0x100000000);
};
function _MIDI() {}
_MIDI.prototype = MIDI;
MIDI._sxid = 0x7f;
Expand Down

0 comments on commit 851e0e4

Please sign in to comment.