Skip to content

3.0.0 — common and cut time, as the source engraves them

Latest

Choose a tag to compare

@alessonqueirozdev-hub alessonqueirozdev-hub released this 01 Dec 16:45
· 119 commits to master since this release
96abc19

Common and cut time, end to end, from two first-time contributors.
@axiopisty's #62 adds TimeSignature.displayCommonTimeSignatureGlyphs, so a
4/4 or 2/2 can be drawn as a fraction instead of C or cut C (#61).
@uveshm003's #66 has the MusicXML, MEI and JSON importers and exporters read
and write that choice (#64). In #67 they also fixed a JSON round trip that
lost free and additive meters, and in #70 they made the last four MusicXML
defects that were absorbed in silence report a warning (#29).

Breaking change, in output only: an imported MusicXML or MEI 4/4 or 2/2
that carries no symbol now renders as a fraction, as its source engraves it. It
used to render as C or cut C. No API is removed, and scores built in Dart keep
the old default, but a golden test of such an imported score changes and has to
be re-recorded. That is why this release is a major one, as @axiopisty pointed
out in review of #68.

It also keeps CI green on Flutter 3.47 without dropping older Flutter, and
formats the tree, with CI now checking formatting. The legacy Duration alias
is still exported; its removal (#33) moves to a later major version.

Added — fraction or symbol for 4/4 and 2/2 (#61, #62)

  • TimeSignature.displayCommonTimeSignatureGlyphs. Defaults to true, so
    4/4 still draws as C and 2/2 as cut C. Set it to false for the fraction.
    The layout reserves the same width either way, so nothing shifts. The flag
    is part of PositionedElement.structuralHash, so flipping it repaints.
    Contributed by @axiopisty, with two goldens: m04f_fractional_time_glyphs
    and m04g_common_time_glyphs.

Fixed — the last four silent MusicXML cases now warn (#29)

  • An unknown <clef><sign>, an unknown <type>, a non-numeric <alter>
    and a missing <part-list> are reported.
    Each adds one line to
    warnings that names the element and the value it could not read. The
    import itself is unchanged: the clef in force is kept, the note value comes
    from <duration>, the alteration from <accidental>, and the parts import
    without names or groups. Each case loses a detail and leaves the music
    readable, so all four warn. A defect that makes the music unreadable, such
    as a <pitch> with no <octave>, is still rejected.
  • The legal clef signs none and jianpu, which have no ClefType yet, are
    reported as unsupported rather than unknown.
  • MusicXML <type>256th</type>, 512th and 1024th are read as note types.
    They used to be unrecognised, so the value came from <duration>.

Fixed — common and cut time in import and export (#64)

  • Imported 4/4 and 2/2 follow the source's symbol. The importers never
    read it, so every imported 4/4 drew as C and every 2/2 as cut C, even where
    the file engraves a fraction. MusicXML <time symbol="common|cut"> and MEI
    @sym (<meterSig>) / @meter.sym (<staffDef>, <scoreDef>) now set
    TimeSignature.displayCommonTimeSignatureGlyphs. Visible change: a
    MusicXML <time> with no @symbol means normal, and an MEI meter with no
    @sym is numeric, so these now render as fractions. Scores built in Dart
    keep the default (true).
  • MusicXML symbol="single-number", note and dotted-note are drawn as
    fractions and reported through warnings.
  • An MEI meter.sym / sym with no count or unit imports as 4/4 (common)
    or 2/2 (cut) instead of being dropped.
  • Export: MusicXML writes symbol="common" / symbol="cut" for a 4/4 /
    2/2 drawn as C, and JsonMusicExporter writes
    displayCommonTimeSignatureGlyphs: false when it is off (and nothing when
    it is on, so existing documents are unchanged). Both round trips keep the
    choice. Contributed by @uveshm003.

Fixed — free and additive meters in JSON import

  • JsonMusicParser reads isFreeTime and additiveGroups.
    JsonMusicExporter already wrote both, but the importer dropped them, so a
    free meter or a (3+2+2)/8 came back from a round trip as a plain fraction.
    A bar-level "timeSignature" map reads them too. Contributed by
    @uveshm003 (#67).

Changed — Flutter 3.47

  • Most of the library no longer imports package:flutter/material.dart.
    Flutter 3.47 deprecates it in favour of the material_ui package, and CI
    treats infos as fatal, so every run went red with 121
    deprecated_member_use infos. 38 library files only needed
    package:flutter/widgets.dart and now import that. The 9 that use Material
    (Colors, Theme, CircularProgressIndicator, the PDF preview's
    Scaffold) keep the import with a targeted ignore, because the package
    supports Flutter >=3.0.0 and material_ui exists only from 3.47. Tests
    and the example app take the same targeted ignore. Nothing public changes.

Tooling — formatting

  • The tree is formatted, and CI checks it. It had never been formatted
    consistently: dart format on one file rewrote dozens of unrelated lines,
    which a contributor ran into on #62. A Format job now fails on any
    difference and prints the diff it wants. .git-blame-ignore-revs makes
    git blame skip the formatting commit.
  • CONTRIBUTING explains that the goldens are recorded on Windows only, and
    how a contributor on macOS or Linux gets theirs recorded. It also explains
    how to format so the result matches CI.