Repository navigation
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 totrue, so
4/4 still draws as C and 2/2 as cut C. Set it tofalsefor the fraction.
The layout reserves the same width either way, so nothing shifts. The flag
is part ofPositionedElement.structuralHash, so flipping it repaints.
Contributed by @axiopisty, with two goldens:m04f_fractional_time_glyphs
andm04g_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
warningsthat 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
noneandjianpu, which have noClefTypeyet, are
reported as unsupported rather than unknown. - MusicXML
<type>256th</type>,512thand1024thare 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@symbolmeansnormal, and an MEI meter with no
@symis numeric, so these now render as fractions. Scores built in Dart
keep the default (true). - MusicXML
symbol="single-number",noteanddotted-noteare drawn as
fractions and reported throughwarnings. - An MEI
meter.sym/symwith 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, andJsonMusicExporterwrites
displayCommonTimeSignatureGlyphs: falsewhen 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
JsonMusicParserreadsisFreeTimeandadditiveGroups.
JsonMusicExporteralready 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 thematerial_uipackage, and CI
treats infos as fatal, so every run went red with 121
deprecated_member_useinfos. 38 library files only needed
package:flutter/widgets.dartand now import that. The 9 that use Material
(Colors,Theme,CircularProgressIndicator, the PDF preview's
Scaffold) keep the import with a targetedignore, because the package
supports Flutter>=3.0.0andmaterial_uiexists only from 3.47. Tests
and the example app take the same targetedignore. Nothing public changes.
Tooling — formatting
- The tree is formatted, and CI checks it. It had never been formatted
consistently:dart formaton one file rewrote dozens of unrelated lines,
which a contributor ran into on #62. AFormatjob now fails on any
difference and prints the diff it wants..git-blame-ignore-revsmakes
git blameskip 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.