CLOSE-me: add per-staff and composite time signatures to mx::api#303
CLOSE-me: add per-staff and composite time signatures to mx::api#303webern wants to merge 1 commit into
Conversation
Coverage reportCore-dev coverage
|
| Metric | Coverage | Covered / Total |
|---|---|---|
| Lines | 77.8% | 28513 / 36640 |
| Functions | 74.3% | 6352 / 8552 |
| Branches | 50.7% | 22678 / 44751 |
API coverage src/private/mx/{api,impl,utility}/
| Metric | Coverage | Covered / Total |
|---|---|---|
| Lines | 79.0% | 6198 / 7846 |
| Functions | 64.3% | 2093 / 3254 |
| Branches | 48.2% | 5297 / 10981 |
Core HTML report | API HTML report
Commit 79cf5819b73214cc03d4516ebae22acbaa972e3b.
gen-quality
|
|
Maybe in addition to an easy setter there could be an easy getter routine that returns edit: or it could simply be bool getSimple(std::string& beats, std::string& beatType);Where a return value of false means it isn't simple, but either way it returns the first entry. |
|
Or (and this is more what I think you want): keep beats and beatType as they are and emit them first, followed by the others in the array, if any. I'm not sure what to call the array. Maybe |
b8d278f to
2b00730
Compare
Coverage reportCore-dev coverage
|
| Metric | Coverage | Covered / Total |
|---|---|---|
| Lines | 77.8% | 28513 / 36640 |
| Functions | 74.3% | 6352 / 8552 |
| Branches | 50.7% | 22678 / 44751 |
API coverage src/private/mx/{api,impl,utility}/
| Metric | Coverage | Covered / Total |
|---|---|---|
| Lines | 79.0% | 6180 / 7823 |
| Functions | 64.3% | 2093 / 3254 |
| Branches | 48.2% | 5283 / 10961 |
Core HTML report | API HTML report
Commit 582d556160e0f6050fef98091d07494565ab0775.
gen-quality
|
Splits the time-signature half out of the original combined time-signature and transposition PR so each can be reviewed and merged independently. Closes #268
2b00730 to
f1a3975
Compare
Coverage reportCore-dev coverage
|
| Metric | Coverage | Covered / Total |
|---|---|---|
| Lines | 77.8% | 28513 / 36640 |
| Functions | 74.3% | 6352 / 8552 |
| Branches | 50.7% | 22678 / 44751 |
API coverage src/private/mx/{api,impl,utility}/
| Metric | Coverage | Covered / Total |
|---|---|---|
| Lines | 80.9% | 6470 / 7994 |
| Functions | 67.8% | 2221 / 3276 |
| Branches | 49.7% | 5554 / 11174 |
Core HTML report | API HTML report
Commit c9373ffa23d78e1a7e843787d90973af06a7c62b.
gen-quality
|
Human Summary
Ha, well I asked the machine to pick low hanging fruit from @rpatters1's issues that it could "just do" without my supervisions since I am working a lot for my employer right now, and for some reason it thought these two were easy and small.
I don't love the time signature change, to be honest, I might not want to merge this with that time-signature solution as is. I'd like for there to be a normal path for the 99% of time signatures that are just a X over Y, and you don't have this ugly weird vector in the 99% case. So I think this might need to be reworked.
Summary
mx::corealready fully modeled the composite/staff-scoped time-signature shape (Time::number(),TimeChoiceGroup::timeSignature()asOneOrMore); the gap was entirely inmx::api/mx::impl.TimeSignatureDatareplaces the singlebeats/beatTypestrings withstd::vector<TimeSignatureComponent>(components), supporting composite/interchangeable meters (multiple beats/beat-type pairs in one<time>). AsetSimple(beats, beatType)helper covers the common single-pair case.TimeSignatureDatagainsstaffIndex(sameINDEX_UNSPECIFIEDconvention asKeyData::staffIndex) for staff-scoped<time number="...">.MeasureData::timeSignature(singular) becomestimeSignatures(a vector), carried forward per staff across measures the same way the old singular field carried forward viaisImplicit. An unscoped<time>declaration replaces the whole effective list; staff-scoped declarations merge into the carried-forward list bystaffIndex.TimeReadernow parses every<time>element in a measure's<attributes>(previously only the first) and every beats/beat-type pair within each (previously only the first).Reference corpus file
data/rpatters1/timesigs_composite-ref.musicxml(added by #287) exercises the composite-meter case end to end.Testing
setSimple(), equality coverage for the new fields (TimeSignatureApiTest.cpp)make test: all pass (4587 assertions in 362 test cases, plus the three examples)make test-api-roundtrip: 124 passed, 0 failed (of 124 pinned; no regressions)make fmt/make checkcleanReferences