You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This clarifies the logic around tempo and time
signature in both exports and imports. The
tempo/bpm conversion seems to be correct
and reliable. The time signature is not so
lucky.
First of all, Bosca has a fixed time signature,
the default 4/4. There is no way to change
that, so we pretty much hardcode it (although
now it's a bit clearer what we hardcode, MIDI
spec is weird). On import the old code used
to attempt to rebuild the pattern size using
the time signature. But that's not exactly a
robust approach, since, as I mentioned, even
in Bosca it's always 4/4, whereas the pattern
size can vary.
The best we can do is to just use some fixed
unit of size and hope it's going to generate
nice patterns on import. And for this unit we
can use a part of the signature that makes
sense for this role, the numerator. It could be
nice to add an extra step to the import and let
users decide how large the pattern should be.
That said, there is no working around other
MIDI-specific quirks, like each track having its
own time signature — a feature that would
be impossible to preserve in Bosca.
Aside of all that, this also fixes a couple of
issues related to the order of events (both on
import and on export), and a problem with
invalid notes slipping into MIDI files anyway.
0 commit comments