Closed humbleCoder1990 closed 2 years ago
Wow I just saw another post https://github.com/grimmdude/MidiWriterJS/issues/58, 128 ticks for per beat. It's very confusing.
Hi @humbleCoder1990,
That's correct, there are 128 ticks per beat. That's how it's specified in MIDI 🤷♂️
I tried to make 1 bar with 16 notes.
So, I caculated durationTick like this.
const duration = 1920 / 16 /* 1920 ticks are 1 bar */
then,
const startTick = duration * noteIndex
But the result is almost 4 bars like the screenshot. What are I missing something? How to caculate ticks properly?
MidiWriterJS uses another value for meaning 1 bar of ticks?