Skip to content

Commit

Permalink
getVel() switched to bitwise for optimization.
Browse files Browse the repository at this point in the history
  • Loading branch information
PoneyClairDeLune committed Jun 17, 2024
1 parent d8678fb commit e8f010e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/state/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1371,8 +1371,8 @@ let OctaviaDevice = class extends CustomEventSource {
let notes = new Map();
let upThis = this;
upThis.#poly.forEach(function (e, i) {
let realCh = Math.floor(e / 128),
realNote = e % 128;
let realCh = e >> 7,
realNote = e & 127;
if (channel == realCh && upThis.#velo[e] > 0) {
notes.set(realNote, {
v: upThis.#velo[e], // Short for velocity
Expand Down

0 comments on commit e8f010e

Please sign in to comment.