Merge pull request #657 from daslyfe/main

[Bug Fix] Midi: Don't treat note 0 as false
This commit is contained in:
Felix Roos 2023-08-07 07:45:26 +02:00 committed by GitHub
commit c20b691683
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -113,7 +113,7 @@ Pattern.prototype.midi = function (output) {
const velocity = hap.context?.velocity ?? 0.9; // TODO: refactor velocity
const duration = hap.duration.valueOf() * 1000 - 5;
if (note) {
if (note != null) {
const midiNumber = typeof note === 'number' ? note : noteToMidi(note);
device.playNote(midiNumber, midichan, {
time,