Merge pull request #656 from daslyfe/main

[Bug Fix] Account for numeral notation when converting to midi
This commit is contained in:
Felix Roos 2023-07-29 09:06:17 +02:00 committed by GitHub
commit 2ec2e81511
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -114,7 +114,7 @@ Pattern.prototype.midi = function (output) {
const duration = hap.duration.valueOf() * 1000 - 5;
if (note) {
const midiNumber = noteToMidi(note);
const midiNumber = typeof note === 'number' ? note : noteToMidi(note);
device.playNote(midiNumber, midichan, {
time,
duration,