Skip to content

Commit 28eb3e6

Browse files
converter21 version 3.1.0
Squashed commit of the following: commit 8d26f015944d19e6f309f2024b32fe0c21137616 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Thu Mar 7 11:26:37 2024 -0800 Prepare for 3.1.0 release. commit e361d307c90159af90c95132477423dd519df656 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Wed Mar 6 15:26:51 2024 -0800 Add new MusicXML import vs. MEI/Humdrum export tests, and fix a bunch of stuff found. Squashed commit of the following: commit f5a1fb07586247bb12c0493d90fa57a26cb53191 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sat Mar 2 17:47:26 2024 -0800 MEI export: don't put implicit text in MEI <tempo>. Also, the SMUFL SharedConstants are public now (used by musicdiff). commit 141f1c429b24d0bfe1f3358b6171adb2364939ac Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sat Mar 2 11:53:34 2024 -0800 MEI export: if you emit a clef/keysig/metersig in staffdef, don't emit it again later. commit 8bde2608b6c650b29eb86b539285ba80144e1387 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sat Mar 2 09:38:57 2024 -0800 Humdrum import: fix a missing SMUFL translation of '[quarter]' etc. commit 7b32c02767cbe999049ddec3f58d790386c50833 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Fri Mar 1 17:04:38 2024 -0800 Humdrum export: If tempo part is 0, use !!!OMD: instead. commit 1cb622c78b79c37be5fac9d5a5eb8a84ef8431d0 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Fri Mar 1 17:02:11 2024 -0800 Humdrum export: handle tempos in non-top parts by using new GridMeasure.addLayoutParameterAtTime API. commit 9ffa54736ee2f42c78b99aedb1f2c2ccdd8abf9f Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Fri Mar 1 15:02:19 2024 -0800 Humdrum export: only write !!LO:TX:omd:t= before the very first timesig. If there isn't a timesig at the start, just never write it. commit 90b413f1a1b5329435850cb8dc4dd5afdc5a4794 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Fri Mar 1 12:22:21 2024 -0800 Humdrum import: Look forward for *MM (not just backward) in one more case. commit 4822df39d9a67bae7cfc9de3986c5e50a507fcec Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Thu Feb 29 18:23:55 2024 -0800 Humdrum import: combine new !!LO:TX:omd:t= with nearby *MM. commit 8c63a85e01d1d49535fd3c8b4c1b05737f10e509 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Thu Feb 29 16:31:45 2024 -0800 Humdrum export: give up on :tempo: it has other side-effects. commit 42e0ecdee6367c80e1b241db7dcd4e32f6aad49b Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Thu Feb 29 16:10:24 2024 -0800 Tests: new Humdrum test files with !!LO:TX:omd commit 395fe54ea99a3c2c7514f0d61a69cec538b64233 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Thu Feb 29 14:20:27 2024 -0800 Humdrum export: First cut at unconditionally emitting '!!LO:TX:omd:tempo:t=something' before first timesig. commit 5166d451e4ec2e9443fa4a005a1bd0435523d5f8 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Thu Feb 29 10:56:08 2024 -0800 Humdrum import: pick up OMD vs Tempo changes from Verovio. Also some defaults for text and tempo. commit 81fcc7ceb07e77ed0823843a9cded0b2503abc23 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Tue Feb 27 14:36:06 2024 -0800 Humdrum import: If an initial OMD value looks like a filename, don't make a MetronomeMark out of it. commit af759fb59d559545bb081703af5226dc0a8525f4 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Tue Feb 27 10:30:05 2024 -0800 Humdrum import: Same thing... if single title and single movementName are identical, skip title and go with movementName. commit e66022c8d1b514f476c5f6db7ada30def813869a Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Mon Feb 26 16:37:02 2024 -0800 MEI import: If there is exactly one 'title', and it's identical to the exactly one 'movementName', forget the 'title', it's really just the movementName. commit c70319776156fc8470200f4c0d910b7517878b25 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sun Feb 18 17:02:33 2024 -0800 Humdrum export: fix a crash. commit cd9149ce21e16edfbc41f5c91940efd271eb20d3 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sun Feb 18 16:57:13 2024 -0800 Humdrum export: fix a couple bugs in that layout reordering code. commit 6cfcf966dd23fd09746d512911233d38a8804ca6 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sun Feb 18 16:30:52 2024 -0800 Humdrum export: first cut at ordering slices that are inserted afterward "just before" a data slice (there are sometimes more than one, and order sometimes matters). commit 5e59f9509b2febb833832acb2639220d39da6015 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sun Feb 18 14:31:23 2024 -0800 Humdrum export: emit tempos and texts the same way we now do dynamics (supporting weird offsets). commit 5e20275c8b17e48497e3da78d3578ec0cc733b1d Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sun Feb 18 11:36:12 2024 -0800 Humdrum export: refactor production of invisible-rest-voice (for positioning of weird-offset dynamics) in anticipation of doing the same for TextExpressions and TempoIndications. commit 260e8df3e9eac73af14348d5684eba8ee5f36ab1 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sat Feb 17 15:49:06 2024 -0800 Humdrum import: slight tweak to order of operations when re-anchoring spanners, to try to get spannerAnchor.activeSite to behave a little better. commit 3ad4cbe5eb44c4a64088e4d85b622d8468c98175 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sat Feb 17 13:46:49 2024 -0800 Humdrum import: do the invisible-rest-voice removal at a higher level, so we can avoid removing the only voice in the staff/measure. commit b677bf70e23598a471e679d8bff68eeedd284b9c Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sat Feb 17 13:05:20 2024 -0800 Humdrum import: Try to remove the invisible rest voices we adding during export (moving various things up to the enclosing measure). commit 42087f3a7498a3d6355dde9dfe0171d00763b6fe Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Fri Feb 16 15:55:39 2024 -0800 Humdrum export: avoid crashes by skipping over non-spiny slices. commit ae886fb4197c271d8fc23aab48b92484e69ee030 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Fri Feb 16 15:01:38 2024 -0800 Humdrum export: fix "list index out of range" crash when final measure has no slices. commit 784aa17d9fba63d07e21b09a7aa01bff55d281c4 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Fri Feb 16 14:21:08 2024 -0800 Tests: diffall*.py now print out any exception text. Humdrum import: be more explicit about which Measure() param you're passing measureNumber to. commit c73f69a99e0eb8de7643ab93c8c2ded3bb8a1286 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Fri Feb 16 13:29:30 2024 -0800 Humdrum export: fix that manipulator cleanup bug. commit a9753c662d74b9764cfa34a92009ca8ba2f7635f Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Wed Feb 14 15:17:17 2024 -0800 Humdrum export: getting closer; filling in the entire subspine for the invisible rest voice. This looks much better, but... it triggers a manipulator generation bug where manipulator cleanup is generating an extra manipulator with the wrong number of spines. commit 64ca185c11b14aed6436066fd6233be0a3fc6624 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Tue Feb 13 13:29:00 2024 -0800 Humdrum export: reject scores that have non-aligned measures across parts (Humdrum can't do that). commit e9c721ff5783c9815082511e96b1ab79efe11d69 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Tue Feb 13 12:07:31 2024 -0800 Humdrum export: fix dynamics layout regression introduced by recent changes. commit 6cd2a2e099b7562534fe20953b17f8089bac51bf Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Mon Feb 12 14:39:12 2024 -0800 Humdrum import/export: redo using durations, so we can generate the correct recip for tuplet-y stuff. All: some M21Utilities routines got renamed (to be clear about Duration vs QuarterLength). commit bc2779341c7c670dcf4313249b30451b2b6dfb4e Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Mon Feb 12 10:22:19 2024 -0800 Humdrum export: always use the entire measure duration when generating an invisible rest voice for positioning dynamics. This avoids the need to support tuplet-y fullDuration. commit 95948fd0116756e0f9c31ff5c745948b0224a5f1 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Mon Feb 12 09:35:28 2024 -0800 Humdrum import/export: Snapshot of tuplet work in support of weirdly-positioned dynamics. commit 5675b6cde0ea00175aa6a83268575ffca542a963 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Fri Feb 9 09:11:55 2024 -0800 Humdrum import/export: Second cut at positioning weird-offset dynamics. Triggers some interesting tuplet-import bugs I really need to go back and address (music21 wants total duration of a tuplet to be representable by a single note's duration (i.e. powerOfTwo+dots). commit d6a206db35b77bc232fd4e7a9f0dd657daec3a8c Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sat Feb 3 16:21:20 2024 -0800 Humdrum export: First cut at positioning non-note-aligned dynamics properly on export. Works for a few of them. commit 828452298e7e74c73abb39d499abb4f059872853 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Thu Feb 1 15:17:17 2024 -0800 Humdrum export: don't drop non-note-associated dynamics on the floor. Associate them with a reasonably nearby note. commit 742a29a4af46e36694d59fb496f38d0b60f396d8 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Thu Feb 1 14:51:55 2024 -0800 MEI import: Timestamp computation works better if you update self.activeMeter more conscientiously (particularly noticing meter changes inside layers before processing anything in the measure). commit 64538429061fcc7457caa6cac951d94f258de9d4 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sun Jan 21 11:21:49 2024 -0800 Humdrum import: *staff1/2 also doesn't force (only prefers) center placement. commit 64f36979d51d6260008be62714e7316b5d7f0474 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sun Jan 21 11:11:03 2024 -0800 Humdrum import: forceAbove for dynamics in the presence of lyrics is not supposed to override specific instructions. commit 0bf0c39ebe6d0d22accda420c831b518d5e85f7d Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sat Jan 20 15:46:38 2024 -0800 MEI export: oops, style might still be None, better check. commit ca8a5f5db506972ab91af4ca9bba3d0c590ceb9a Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sat Jan 20 15:41:59 2024 -0800 MEI export: improve absoluteY <-> placement relationshi. commit a0c3e9a5fe0364941e13a346704b1fbe24a61a2a Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sat Jan 20 15:17:08 2024 -0800 MEI import/MEI export: support lyric placement. commit da9a9d78f59d4c395b3af6a3cf01e6b4428baa1f Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sat Jan 20 14:14:02 2024 -0800 Humdrum export: Regularize treatment of absoluteY. commit 755293d326c117b981d27454246e80af5b408a32 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sat Jan 20 12:14:21 2024 -0800 MEI export: sort staffNums returned from makeStaffGrp, so makeScoreDef logic can work. commit 1a96296fc957338a5c5a9979feebd59bcbf76c81 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sat Jan 20 11:55:43 2024 -0800 MEI export/Humdrum export: back off that old staffGroup fix, and instead just deal with the ungrouped staves directly (Humdrum export was already handling this, MEI now does as well). commit 910c707e4e09edeb8ef78f610c3e9286e917ea56 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Fri Jan 19 15:20:03 2024 -0800 MEI export/Humdrum export: obey chordSymbol.writeAsChord during export. We don't yet support actually writing the chord symbol itself, just the chord, if requested. commit 0511f5886da35263d0a9be88242722bf48b464ce Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Fri Jan 19 14:36:48 2024 -0800 Tests: diffall*.py can now visualize note offset differences. commit 54d64c72b320cae208450e0ce26622f77a43dccf Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Wed Jan 17 16:41:03 2024 -0800 Humdrum export: handle gaps by emitting invisible rests. commit 5f7789f793500537a6c020f1f6a3f883f0fe218c Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Wed Jan 17 16:13:18 2024 -0800 MEI export: also fill gap caused by voice.offset > 0 (like Humdrum export already does). commit 7e57d7d7de3be28ea2b33a861d09325dae36c8bb Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Wed Jan 17 16:04:28 2024 -0800 MEI export: handle gaps between m21 objects by emitting <space> elements. commit 260cf24cf411fa211a7d517a69afd63ab278d937 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Tue Jan 16 15:08:17 2024 -0800 MEI export/Humdrum export: handle Grace vs Appoggiatura more carefully (MusicXML import creates GraceDurations that are accented). commit 879f9d3227eb6d8def9a94b7095dc5dd6fe84b76 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Mon Jan 15 15:49:06 2024 -0800 MEI export: if @tstamp2 is going to be in a previous measure, rather than crash, emit @tstamp2="0m+0.0" to pretend it ends at start of this measure. commit ffff93d1da6cdf8ae190c997ad256fb6435a9fed Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sat Jan 13 13:52:54 2024 -0800 Humdrum import: If music21 creates a transposing instrument from a name, clear that transposition, because Humdrum insists on telling us exactly what the transposition is, and we need to trust that only. commit ec95e2fadb306701281b99974b85641bbe65a8d4 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sat Jan 13 12:17:07 2024 -0800 MEI export/Humdrum export: some day this staffGroup fix will work in all cases. commit 0f69482481450f47b4c14016bee766bea0a10e70 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sat Jan 13 12:12:05 2024 -0800 MEI export/Humdrum export: one more redo of staffGroup fix, to handle case where all the left over staves are in one contiguous staff number range. commit 287f21bea24e65229528e893d56c9cf9ae723047 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sat Jan 13 11:25:44 2024 -0800 MEI export/Humdrum export: oops, didn't handle case of exactly 1 ungrouped staff. commit 0d35673be4244470b652b7e34ab5283e93424793 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sat Jan 13 11:20:04 2024 -0800 Redo that staffGrp fix a bit: make a staffGrp for each contiguously-numbered range of "extra" staves. commit af35112bfea8ff7226fdafb3cb9ddcbe4c62c126 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Thu Jan 11 11:53:50 2024 -0800 Tests: add new diffall/showdiff for MusicXML import vs. Humdrum export commit 32d4e3c24823ef20ead6f9c7fbb11e3eec116b2e Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Thu Jan 11 11:41:16 2024 -0800 MEI export/Humdrum export: tweak that staffGroup fix so we don't put an empty staffGroup at the top. commit 445d2aa512c367621c6a5d0e09a83267a53d2c19 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Thu Jan 11 10:34:27 2024 -0800 Humdrum export/MEI export: A better staffgroup solution, just one leftover staffGroup that covers the entire score (and contains the leftover staff groups). commit 96e6541374b207f0a91fa8c589c8a0f563b422f7 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Wed Jan 10 16:54:20 2024 -0800 MEI export/Humdrum export: handle incomplete staffgroup lists, and "play only" metronome marks. commit 6e0a6622498cc6dcb08bf2a7ab612a00e65afbce Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Tue Jan 9 15:45:28 2024 -0800 MEI export: @midi.bpm value must be a string (as all attribute values must be). commit 93dc75d535b190b717a63bcb7c6d236f32547318 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Tue Jan 9 15:39:15 2024 -0800 Tests: diffall and showdiff tests now check for mismatched number of parts, to avoid a musicdiff crash. commit e041bc02676d7556f1f043492188317de7cee500 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Mon Jan 8 14:55:46 2024 -0800 More tests. commit 80eb6d1b90dab31fbfd6127b2cd684c550071caf Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sat Jan 6 16:56:28 2024 -0800 All (but mostly MEI export): Regularize invisible vs regular vs missing m21 Barlines. Some metadata date fixes. Handle tuplet.bracket and visibility better in MEI. Actually export (to MEI) clef/key/timesig changes that aren't at start of measure. Fix MEI export of ornament accidentals. Fix MEI export of hairpins. Squashed commit of the following: commit 5b431c8f3cbdf3d80872589222b6d17fd1eed987 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sat Jan 6 15:16:52 2024 -0800 MEI export: DynamicWedges vs hairpins differ on definition of getLast() vs @endid. So we must always emit @tstamp2, using the end offset of getLast(). commit a18307d21420255e427d1a82554002f91e4506d7 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sat Jan 6 12:40:46 2024 -0800 MEI import: pay attention to spanners and things that might be attached to spaces. commit da0391ca0dd5fcbe7fe29e99ad54d0994cb97266 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sat Jan 6 10:37:56 2024 -0800 MEI export: emit ornament accidentals only if visible. Note there is no @accid.ges on ornamentals, so we just leave it blank if accidental is present but not visible. commit 2397c458268856acb927dd627c017cd6b3649ad5 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Fri Jan 5 14:14:49 2024 -0800 MEI export: fix crash in new staffChanges code when the measure _is_ the one layer. commit c0d2f984579fee76f863f16048099cb2eab3121d Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Wed Jan 3 17:02:11 2024 -0800 MEI export: lint. commit e083d5b0536c54b3a624cb331f092f2adbe3aece Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Wed Jan 3 16:07:35 2024 -0800 MEI export: skip staffChanges that don't land exactly at beginning/end of object in layer. Don't forget to emit xml:id if present in several objects (but we mostly care at the moment about clef/meterSig/keySig). commit e564ba498b7004ecc0ec69cac98ea620e2779b64 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Wed Jan 3 15:12:11 2024 -0800 MEI export: more missing clefs. Handle multiple staff changes at the same offset. Drop staff changes that don't match the start offset of any object in the measure, or the end offset of the measure (they'll land in other layers, presumably). commit 24dcf4ade19ee68cb304049aba0ca6d156f5c392 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Wed Jan 3 13:18:51 2024 -0800 MEI export: one more missing clef (another stupid copy/paste error). commit 75ee1f535fc12435c00f67eadba9f17cb7f153ad Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Wed Jan 3 12:08:25 2024 -0800 MEI export: fix really bad typo in last change (extraStaffChanges indexing). commit 33ba7c77a13eb06ccc02998fc961e56f4c7bb737 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sat Dec 30 13:42:05 2023 -0800 MEI export: staff changes might be at the very end of the layer. commit 2ecd1d812b3a8dc6d8d090dbd043e6d2bffb90c0 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Fri Dec 29 17:32:20 2023 -0800 MEI export: first cut at (1) finding spanner ends in different parts than spanner starts, and (2) pushing Measure-level clefs/timesigs/keysigs down into multiple layers using @sameas for the extra ones. commit 91ad3c121d95f4c5e20133530bf75b33fa8f402b Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Thu Dec 28 13:07:38 2023 -0800 Humdrum import: one last invisible barline (at end of last measure if no barline there). commit f3a5d33aa97c9d78a3dc82a5a3def2a4568d3b22 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Thu Dec 28 11:57:41 2023 -0800 MEI export: be even more OCD about setting bracket.visible et al. commit 5a6c711303e3bf00968aca0d84f2cf805a88e291 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Thu Dec 28 11:28:22 2023 -0800 MEI import/export: handle music21 tuplet.bracket == None appropriately (unspecified, not False). commit 87c8f8a7ceb24530803d42f17aa5061dae9cbc9c Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Thu Dec 28 11:00:25 2023 -0800 All: regularize invisible vs regular barlines (and there no such thing as no barline anymore). commit 6e777d31c2b1419287b4f163b7981ca58ec786e2 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Tue Dec 12 12:25:48 2023 -0800 MEI export (metadata): fix a typo in that last commit. Also, datePublished was missing an isodate attribute. commit dc2db31b77dc9553bbb1b713dc1e56fb6aea30b3 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Tue Dec 12 11:09:31 2023 -0800 MEI import/export (metadata): date range at edge of DatePrimitive range should be "[1594..1595]", not "1594/1595". We still can import from "1594/1595", but our exporter produces "[1594..1595]" and our importer will import it correctly. commit 22004e8af795c1d057f243cb19d22e85dc882ca3 Merge: 8359cf5 5f0b99b Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Wed Dec 6 13:08:33 2023 -0800 Merge branch 'main' into develop commit 8359cf5f90edf1ab7db68471110b9e1750b39a27 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Wed Dec 6 12:19:29 2023 -0800 Update version to 3.0.1 for release. commit 008416add3582e7a7e2e69f24b4cc65e305b2d89 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Mon Dec 4 16:11:49 2023 -0800 Humdrum import (metadata): Do a more careful job of handling zeit date ranges. commit 31fdc0aa8cea866f51709cb343249b7929a49c5d Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sun Dec 3 13:43:44 2023 -0800 Humdrum import: in CDT (date1-date2), a qualifier can be on either of the dates, causing us to need to do a DatePrimitive range. commit 41a1ff3742d8139bdb54ede0f3599621491c5263 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sun Dec 3 12:07:21 2023 -0800 Tests: runDiffAllTests re-ordered a bit. commit e4e8a42ea78779064d874cc793bdd390d6f82a86 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sun Dec 3 11:51:19 2023 -0800 Metadata import/export: better handling of approximate/uncertain overall dates. commit af84fc128a902b0fc0a213aede4336d8afbb4726 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sat Dec 2 15:36:35 2023 -0800 MEI import: be even pickier about rejecting the wrong kind of date string (just count '/' or '-'). commit 0f2f19bb3d8a0a1f6cff881c99591c09b390fc3f Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Fri Dec 1 17:27:45 2023 -0800 Tests: add a new test musicxml file. commit f23c297998ca51ea8fdd367c169be77d18875ec1 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Thu Nov 30 11:52:14 2023 -0800 Tests: add another diffall test that imports Humdrum, exports to MEI, re-imports the MEI and compares with the Humdrum import. diffallHumImportVsMeiExport.py. commit 747676373253cd8c4d55d6cdf17b011872a36653 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Tue Nov 28 20:06:46 2023 -0800 Metadata import/export: handle ranges of DatePrimitives (which can themselves be ranges). commit d94369761212875e245d14ded01a09929e01e86a Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Tue Nov 28 17:45:45 2023 -0800 Humdrum import (metadata): Humdrum keys with suffixes (e.g. OMD-full, OTL-rime, PUB-format) no longer qualify as standard Humdrum keys. They will be put in the music21 metadata as 'raw:OMD-full', etc, instead of 'humdrum:OMD-full', etc. commit 0eba2f1f3447881904995a90ff69b94dc174fa72 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Tue Nov 28 17:36:44 2023 -0800 Metadata import: be careful to avoid parsing an isodate as a Humdrum date or vice versa. It'll parse, and you will hate it. commit 94ac2fdc3caac20426491e531f379d829d5a5028 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Mon Nov 27 22:17:17 2023 -0800 Humdrum import (metadata): handle as a special case the fact that 'MRD' and 'MDT' are the same thing, and 'ACO' and 'GCO' both map to 'collectionDesignation'. commit 5d06be755dfea2ca55522d4415f32219165b1dbe Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Mon Nov 27 21:55:45 2023 -0800 Metadata import/export: humdrum:YOE has a uniqueName; it should never be treated as otherContributor. commit 3697921e6ccb6826efd4ad381f494471c7e5d15b Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Fri Nov 24 15:45:31 2023 -0800 MEI import: when extracting text from <title>, stop at first <titlePart> (but not at first subelement). commit c7cee993cfffac78fede9e0999fe734d0ebd4354 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Tue Nov 21 13:35:25 2023 -0800 Tests: add back some missing Metadata comparison (Humdrum import vs. MEI import). commit e6028f8274b8d95a083e9da3f4f2606fce9479ac Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Tue Nov 21 13:30:17 2023 -0800 MEI export (metadata): fix crash in getBestName(). commit 396a5c81a7d9f6e2c9aee22d7ea28457488eb031 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sun Nov 19 15:20:03 2023 -0800 MEI export (metadata): don't emit an empty <personInfo> element inside <mads>. commit c028026d50026ec88c0f4ef615e0accfa2eef38f Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sat Nov 18 10:41:29 2023 -0800 MEI export (metadata): a few tweaks discovered during verovio metadata implementation. commit b0575d90a2b83d72646e89effbf58a7f830aed77 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Tue Nov 14 19:28:55 2023 -0800 MEI export: if bestTitle and bestMovementName are exactly the same, don't combine them for simpleTitle, just use bestTitle. commit 67c378ca1fe1c253dfe46b0b97ef88ed2c3c3a74 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sun Nov 12 13:11:45 2023 -0800 MEI export: Perry says that within <encodingDesc>, <appInfo> goes before <editorialDesc>. commit 878c18b26d1ceae42953dda8856766b106f22a44 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sun Nov 12 13:05:19 2023 -0800 A few small fixes from humlib. Squashed commit of the following: commit 17d346f92432d82cf25e182bedbc29184a5191d1 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sun Nov 12 13:03:32 2023 -0800 Humdrum export: back out the getStaffCount() fix from humlib. It caused a few more problems than it fixed, including introducing one crash. There's an attempt at a better fix here, commented out because it didn't help. Some day... commit 16d90876df7b56f948a66450f06539fa27173aef Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sat Nov 11 14:47:38 2023 -0800 Humdrum import/export: pick up some small fixes from humlib. commit e429dbb990753be35885b195b6dbe7fbfb3f970e Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sat Nov 11 09:33:08 2023 -0800 Tests: new test file for scoreDef@oct.default. commit 4e63aed9ecc50eefbbb5a7304b98037c083a4632 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Fri Nov 10 11:57:59 2023 -0800 Last minute setup.py (et al) tweaks for release 3. commit a6c50e34ee864d68b13c4264cb7dabe727a59d47 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Thu Nov 9 20:04:36 2023 -0800 MEI export: if a tuplet won't nest reasonably within (or around) the beams in a voice, emit it as a <tupletSpan> instead. commit 763a58cd1b69c180c9b561f9bdf64617b3709eac Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Thu Nov 9 18:24:03 2023 -0800 MEI import: be a little bit better about figuring out start/end of tuplets. commit 5cdd480036191d86a14618b0f76aac9d3a76df79 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Thu Nov 9 15:48:37 2023 -0800 Test: new test mei file that contains a tuplet/beam combination that can't be exported as <tuplet><beam> or <beam><tuplet> (it doesn't nest at all), so must be exported using <tupletSpan>. commit f061d7b13030b40bcde98ec1a0f5b5025113be8c Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Wed Nov 8 14:17:15 2023 -0800 MEI import: Catch the other "in tuplet" cases, not just <tuplet> element. This fixes our dur.ppq vs tuplet code. commit e63f637ffdc4310f5debe5b3a41866389292da4d Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Tue Nov 7 22:20:58 2023 -0800 Humdrum export: Make sure when exporting recip from a tuplet-y duration, that we don't mistakenly produce a recip that is a power of two (with no dots). commit 5430e56d4fb990637c1f07d103f5343c27470b15 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Tue Nov 7 17:15:05 2023 -0800 lint. commit 257f8c3206e7bbde82e0ef73b7790bfcc81416de Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Tue Nov 7 17:12:10 2023 -0800 Humdrum import: more visual durations that might not be tuplet-y. Humdrum export: put layouts closest before a note. commit 6f41537db13a2e1886f6217e3b4b98639bfc8451 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Tue Nov 7 13:16:30 2023 -0800 Humdrum export: same fix... Don't use tupletMultiplier on visual durations. commit 54f3cb1ec076ef954ed45f6621ecf655f0982b2b Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Tue Nov 7 12:38:28 2023 -0800 New test file. commit 38dc91e1e978d97dee3d67426701b4b6eb72e246 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Tue Nov 7 12:35:51 2023 -0800 Humdrum import: With latest fix to Verovio, it is clear that visual durations in Humdrum files should never have tuplet-y durations (like "12"), and so we should not use tupletMultiplier on them, ever. commit dbef2c50f3b942c457b1bb49404789ced7c0c494 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Tue Nov 7 11:46:51 2023 -0800 MEI import: a better solution to @dur.ppq vs. being in a tuplet. commit b323401f0d6331d20c772009aea57b80a39e6ca1 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Mon Nov 6 14:18:10 2023 -0800 MEI Export: rework export of tuplets. Squashed commit of the following: commit 10d1f3f9e454088f478f8b0e87566bd5537be2ad Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Mon Nov 6 12:59:52 2023 -0800 MEI export: if the non-tuplet-y note during a tuplet is a grace note, just skip it; don't stop the tuplet. commit f9b580a131e47d81506c52d0c2f6fb3855e15db6 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Mon Nov 6 12:52:58 2023 -0800 MEI export: more fixes to the tuplet fixes. commit 15f0d85778168084dafbc588578b3aa91ce99ca4 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Mon Nov 6 12:32:58 2023 -0800 MEI export: fix that last tuplet-y fix, and also, if you see a non-tuplet-y note, stop any current tuplet. commit 0ed8d0ea4242776f0165611a9f66ffaabcc49cf4 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Mon Nov 6 12:14:32 2023 -0800 MEI export: Assume tuplets do not cross parts, or measures. (That last isn't right, but it's close.) commit 326d87c37a09f20f93799bc97ed69b1925d5c6d2 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Wed Nov 1 15:25:06 2023 -0700 MEI import: better formatted warning. commit 7251abaa566e1016caf89949bbbff576cdbfd2c9 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Wed Nov 1 12:55:57 2023 -0700 MEI import: warn if @dur.ges and @dots are present but no @dots.ges is present (ambiguous, did you mean dots.ges="0" or dots.ges=dots?). commit d16d77c243b63b82612eeffc03d99884da64b5b8 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Wed Nov 1 11:45:25 2023 -0700 MEI import: if mRest duration is not power-of-two-plus-dots, split it into multiple rests. commit 8590503eb4ea7404e208b824f2e5f9adf9a9f8d3 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Wed Nov 1 10:52:08 2023 -0700 Tests: update tests to match new reality. commit 72577cc03fe3e0debba54fd01b42b8bc5cca6014 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Wed Nov 1 10:49:17 2023 -0700 MEI import: if gestural duration is just tupletized visual duration (i.e. it came from dur.ppq), ignore it. commit 4cf84507543a59de4daaf8e710abd1258e5ac703 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Tue Oct 31 17:14:26 2023 -0700 MEI import: stop hacking around an old Verovio bug. It was causing occasional problems. commit ba7ed66d9094b8c76bfda669d8b8e1677c031482 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Tue Oct 31 16:04:43 2023 -0700 MEI import: OK, put the empty layers back in, but don't warn about them. commit 60fb31a54f2edefccc4c60f843115c0a8b0b841e Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Tue Oct 31 15:49:49 2023 -0700 MEI import: don't bother warning about having to pad voice/layer with only clefs, etc. commit 679825cdf8245163bd14215bcb683015ddcc3741 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Tue Oct 31 15:40:50 2023 -0700 MEI import: If we produce an empty voice from a layer, just ignore it. (Silencing warnings about short layers) commit 012d1b1f1c0dce0fa53e6c495a148354df94c247 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Tue Oct 31 14:34:47 2023 -0700 MEI importer: if dur.ges is present, but not dots.ges, assume dots.ges should be 0, not whatever dots is. commit 8111300b6f9c6d1ec2b2df2f1356cbe61ab7890b Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Tue Oct 31 13:45:19 2023 -0700 MEI export: slightly better @dots.ges fix. commit 8774f6295131eefa6aa1ccb900cec083406f416c Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Tue Oct 31 13:22:05 2023 -0700 Tests: new script to run all diffall tests in separate Terminal windows. commit ca9daa97184331e4597a615a42d48302c51ffc75 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Tue Oct 31 13:19:58 2023 -0700 MEI export: always export @dots.ges with @dur.ges (never make someone guess whether you meant '0' or @dots). commit 4964963313014ba22baeb8472ca504674671e550 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Tue Oct 31 11:57:54 2023 -0700 MEI import: handle bare @tuplet (i.e. not in <tuplet> or referenced from <tupletSpan>. commit f6d4444c8a4395f6c3d96e26e636130c7403695f Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Tue Oct 31 11:04:34 2023 -0700 MEI import: missing staves need a space, but you might need multiple spaces if the expected measure duration is weird. commit 4b1b3244f1f0cb1ddd5601ca5adf72018d3c9cf2 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Mon Oct 30 15:27:17 2023 -0700 MEI import: never mind, we have to go with the longest duration staff/layer (and pad the others), even if it's longer than the time signature would imply. Otherwise we end up with different duration m21Measures, and then they don't line up anymore. commit 4f898c6418cb2aed1b5871da059bb4f1b2e5cb01 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Mon Oct 30 12:52:38 2023 -0700 Squashed commit of the following: commit e11d702f28d91a9f61091578c7189eca7a9c7c53 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Mon Oct 30 12:50:50 2023 -0700 MEI import: Slight adjustment to mRest/mSpace fix: if @dur is present but different than measure duration, set visual duration to @dur, and gestural duration to measure duration. commit 716a19c1b8ba5cc3e487e013fcf96cf9acc2a6ce Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Mon Oct 30 12:20:05 2023 -0700 MEI import: whole note rests that are longer than activeMeter should have gestural duration == activeMeter. commit af7a3f3000bf583c17aa2f34fed5768805688928 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sun Oct 29 17:11:39 2023 -0700 MEI import: Ignore @dur in mRest and mSpace, insist they be the duration of a measure. commit 432f255cee745ffea7a26af38770f25fe77e9034 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sun Oct 29 16:57:29 2023 -0700 MEI import: support @dur.ppq as an alternate form of gestural duration. commit e63eddd4130c58f637ef2043b8826625efda14ea Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sun Oct 29 15:43:07 2023 -0700 MEI import: don't ever let expectedMeasureDuration be longer than the time signature. commit 3ca0dc300a44c97d7e9f02880820fd80f036ba30 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sun Oct 29 13:56:29 2023 -0700 MEI import: That last expectedMeasureDuration fix was a bit too aggressive, and caused errors in pickup measures whose durations were not power-of-two with dots (e.g. a pickup measure containing 5 eighth notes). commit c52100be2b3a914c431fa2f6cb63cb4a2946a2ba Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sun Oct 29 13:12:15 2023 -0700 MEI import: support @dur="2 4" (for example) where the space-delimited durations need to be added together. Discovered in music-encoding/sample-encodings/MEI_5.0/Music/Layout_information/Layout_information.mei commit 51da3411e8d558a05eb09e3517994f8dda6636d0 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sun Oct 29 11:57:13 2023 -0700 MEI import: When giving an mRest duration, if maxDuration isn't expressible as power of two plus dots, simply use the current time signature. commit 7ec5d90d3e7a4282807f48940bdefb1b44ef2d28 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sat Oct 28 16:58:48 2023 -0700 All: MEI date writing fixes which might also effect everyone else. commit 669271af2fc38ab6dfa8c855733d98df21caea0a Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sat Oct 28 12:01:02 2023 -0700 Humdrum export: don't write !!!software, it's not part of Humdrum. commit 86bdffd6066574cc5fac69ece5eec5e4eadacdbe Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Fri Oct 27 15:40:30 2023 -0700 MEI import: in textFromElem you're already recursing by hand, don't recurse automatically as well. commit da66ae169ad0be548fc30f509c295849f4ad21c7 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Fri Oct 27 15:01:12 2023 -0700 Tests: put metadata comparison back in for tests that use verovio's Humdrum->MEI on both sides of the comparison. commit 52b546e836fa3f3a940ef4388f7b06aebe603fe1 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Fri Oct 27 14:59:00 2023 -0700 MEI import: v5 MEI is expected to use mSpace instead of mRest@visible="false". But Verovio produces v5 containing mRest@visible="false", so we have to look for it. commit 58ba123588c9ab58ee310b0cae54003ac19b13b5 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Fri Oct 27 14:31:50 2023 -0700 Tests: diffall and showdiff tests that use verovio to convert from Humdrum to MEI can't (yet) compare metadata, because I haven't made the metadata improvements (yet) to verovio's Humdrum importer. commit 8db8c4ff9aa4f5e3fca6a4211272c1d9944172b8 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Fri Oct 27 14:25:33 2023 -0700 MEI import/export: missing export of 'performer' triggered a cleanup of recorded source and a tweak to the latest metadata import fix. commit 6f4b09017bec5b55dec5953945c08c1b00a42e56 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Thu Oct 26 16:54:58 2023 -0700 MEI export: support 'dedicatee' better (in music21 it's 'dedicatedTo'). commit 1be7d14b5038d189087ef1322b1b555edd866023 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Thu Oct 26 16:37:55 2023 -0700 MEI import: figure out which editor it is from context. commit 0676175af9ae26381d0aef92410574fe88434850 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Thu Oct 26 15:59:35 2023 -0700 lint. commit 721d3bd3e9d29f0b88479573e2bfdb89a6642971 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Thu Oct 26 15:56:07 2023 -0700 MEI export/MEI&Humdrum import: standardize ONB handling in MEI a bit (read from fileDesc _and_ digital source; write all of it to digital source). Don't escape LF when writing MEI files (but do in Humdrum files). Don't crash on badly formed Humdrum date. commit 10dc5aec584415df850a16ce455d9cdaed8ea401 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Wed Oct 25 15:17:52 2023 -0700 Humdrum export: escape LF to \n before putting in Humdrum file. commit 647dd76b8cf03857b0a834273fea818ee90b436f Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Wed Oct 25 15:05:49 2023 -0700 Humdrum export: some metadata fixes. commit dff26bef358afc537fd0f3f6621d0803e1aaeb27 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Wed Oct 25 14:33:50 2023 -0700 ReleaseNotes_3.0.0.txt: mention new MEI v4 vs. v5 support. commit 82d282b0ee9a26d0150088f013e6ad84cb6ba7a0 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Wed Oct 25 14:30:57 2023 -0700 MEI import/export (and some Humdrum import/export fixes, too): import metadata from MEI and export metadata to MEI. Squashed commit of the following: commit 4928f69dcecaa6ab45309f1bde5e377bfc6c8c29 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Wed Oct 25 14:24:10 2023 -0700 Update ReleaseNotes_3.0.0.txt to mention import of metadata from MEI. commit a1b11866c876dc9294937efdf090269619964891 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Wed Oct 25 13:56:44 2023 -0700 MEI export: we were missing some "published" info due to a bad code indent. commit f7409f9a8b9f51c44674fbc0a3b87a448ca41af7 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Tue Oct 17 15:44:34 2023 -0700 MEI import/export: get more aggressive about printed source stuff, to the point of adding 'mei:printedSourceCopyright' to the metadata, since music21 doesn't have anything for that. commit 0ef10d114cc70cd70eebe05c9325bc75b5a7fd3b Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Tue Oct 17 14:22:08 2023 -0700 MEI import: picking up more stuff more accurately from MEI files whose metadata was constructed by hand. commit f8f8ddc06cc213b80c30a42db35fdffd704aa044 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Tue Oct 17 13:27:49 2023 -0700 MEI import/export: some improvements to metadata that originated in MEI (instead of Humdrum). Fixed some bugs in appInfo handling. commit d4300d17057a5f82641f3b771750a46783df74f6 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Tue Oct 17 12:40:36 2023 -0700 MEI import/Humdrum import/MEI export: improve handling of application/version metadata. commit 92dd0fd63797f5e20ff2ef63e3b3fe2463ee78fb Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Tue Oct 17 11:23:30 2023 -0700 MEI export: last few missing metadata exports. At this point, Humdrum import compared with MEI export + MEI import shows only AIN is missing (and I am content with that for now). commit 27d0e1dbe0c5fa394b394103872f453befdf9b09 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Mon Oct 16 13:18:04 2023 -0700 MEI import: lint. commit 2af0f22455ca495545ec64809f9ecfe9999fb204 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Mon Oct 16 13:16:42 2023 -0700 MEI import: import EFL and EEV (I just forgot them). commit 4e14e4a6473681504ab43723d8c9b1e7216525bd Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sun Oct 15 14:29:26 2023 -0700 MEI import/export, Humdrum import: handle custom keys with dates better. MEI export: export ACO metadata as a synonym for GCO. commit 6a4f113f9bdcae0d6718d07c2c80c497bc4a0e41 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sat Oct 14 16:52:34 2023 -0700 MEI import: finish up metadata import from MEI, and fix some musicdiff-noticed issues. More fixes to come. commit 01a046c8bfd286c2b5aacca83a606086b2880d03 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Wed Oct 11 15:58:25 2023 -0700 MEI import/export, Humdrum import/export: better handling of 'software' metadata item. commit 24da4a48692e6ebc5dcf944ff445f24f245b8628 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Wed Oct 11 14:14:22 2023 -0700 MEI import: oopsie. commit c89b97140b8d4a797ff8793e70a0c869a07744ad Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Wed Oct 11 14:13:30 2023 -0700 MEI import: appInfo/application as well as a bug fix to other contributors. commit 381bb45efbd03b0c2ca20c85cf2830986fe45b53 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Wed Oct 11 13:07:04 2023 -0700 MEI import: The start of parsing meiHead/fileDesc. commit ca2fcf3c8217846c2cdd454a3d0b079096eb9c06 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Tue Oct 10 15:20:36 2023 -0700 MEI import: import meiHead/encodingDesc (improving paragraph/linegroup support to do so). commit c32fd30c093b5c9ef840bc5e8253f847e1bec725 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Tue Oct 10 13:40:49 2023 -0700 MEI import: also parse music/back/div looking for lyrics translations. A bit of restructuring and explicit recurse=. commit bdf21a85efdc212b15cd21b2415e8d039ff02e18 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Tue Oct 10 13:06:25 2023 -0700 MEI import: Oops, forgot main <work><classification>. commit f62f4b0696366bb34e225876808b25fc5bebb475 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Tue Oct 10 12:50:08 2023 -0700 MEI import: finish the rest of main <work> import. commit e4550e61cce22834a0b8c0c82e55664442b0faf0 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sun Oct 8 13:51:10 2023 -0700 MEI import: more metadata (work/creation and work/history). commit 769f85a7340286f662f886e1611f3b002cb0dbba Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sun Oct 8 11:28:46 2023 -0700 MEI import: improve handling of @analog to deal with things like 'dcterms:title', 'dcterm:title', etc. commit 848d02cb62e58e4c9e9cb36d867086690588c2b4 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Fri Oct 6 17:36:20 2023 -0700 MEI import: The rest of the <work> contributors commit 039eb4da0b98bb30421eecfbc5a043c0856cb657 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Thu Oct 5 15:23:20 2023 -0700 MEI import: When processing <composer> dip into MADS authority info to get some extra info. commit 8dcf7c743dc3cd9f9baab4e39f18a53ff97ee1d2 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Wed Oct 4 15:55:21 2023 -0700 MEI import: clean up MEIElement annotations, do a better job with titles. commit ce69e200266cea166c30747e6f26f22f02d9639d Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Wed Oct 4 14:03:38 2023 -0700 MEI import: save off metadata import work. commit 14f51ecea2be5cdc575984d3e1b987218f54c692 Merge: d5bd026 0fd5d40 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Mon Oct 2 13:10:36 2023 -0700 Merge branch 'gregc/betterMEIMetadata' into gregc/betterMEIMetadataImport commit 0fd5d405f47b6dcf6a4beb887ad12659fd12d382 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Mon Oct 2 11:43:47 2023 -0700 MEI export: relate printed and digital sources as 'otherFormat' if they are both present. commit 800124064d05eca7734cfdf75a7c20535e28af8e Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Mon Oct 2 11:09:52 2023 -0700 MEI export: get rid of all the unnecessary non-ASCII escaping from ElementTree.write(). commit 745eefb315f65950f3809e8addd539d3f12fb164 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sun Oct 1 11:01:49 2023 -0700 MEI export: Don't crash when attempting to parse date text as isodate. Don't put in an attribute and then check isEmpty; it never will be. commit d5bd026fdb231f5478b4da07dc73461292bb0f4c Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sun Oct 1 10:31:54 2023 -0700 Save off some MEI metadata import changes in progress. commit fb8e9e6a39fcf68dd186be03db0d68d35e058646 Merge: a972165 d42e388 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sat Sep 30 11:54:58 2023 -0700 Merge branch 'gregc/betterMEIMetadata' into gregc/betterMEIMetadataImport commit d42e388e4acf75ad2b038aee3bf039c63b067bb4 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sat Sep 30 11:18:20 2023 -0700 MEI exporter: Tweak metadata (1) to reference mads from composer/persName instead of from composer, and (2) use <name> instead of <persName> in cases where it might be a corpName, and we don't know. commit a972165ed11f4d20e025cea5eee946d45d7c9b9e Merge: a00df19 3d35842 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Fri Sep 29 15:49:24 2023 -0700 Merge branch 'gregc/betterMEIMetadata' into gregc/betterMEIMetadataImport commit 3d358427ec6c14add23368e6a65a86132c8f6a56 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Fri Sep 29 15:45:01 2023 -0700 MEI export: Better <work> relationships. commit a00df196bca33260d61effbae8ba037fc9634afc Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Fri Sep 29 13:50:26 2023 -0700 Save off current work. commit 4e1948da78b858940bf4628e17b2c9d45e1972d6 Merge: a3e262d 19992c9 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Wed Sep 27 16:01:38 2023 -0700 Merge branch 'gregc/betterMEIMetadata' into gregc/betterMEIMetadataImport commit 19992c9c66cc7fa01b9670d2f3ac49432a99a1a7 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Wed Sep 27 15:59:39 2023 -0700 MEI export: another metadata round with Perry (PR6). commit a3e262debca35032d9cc4062e09d9b7787f8d70a Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Wed Sep 27 14:57:21 2023 -0700 MEI import: starting work on importing every bit of MEI metadata we can. commit 9e2763d1b38e2f4ad7e51c37369ea9a17aa6c87d Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Wed Sep 27 14:33:42 2023 -0700 MEI export: Oops! <editor> should be <persName> inside <respStmt>. commit 7b89666ec69c3160f83df4f75e3a62705a11a582 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Wed Sep 27 11:47:01 2023 -0700 MEI export: tweaks to PR5 (MEI metadata export). commit 8bb6926e4271e8c65dbec0719520c83567116c29 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Wed Sep 27 11:34:53 2023 -0700 MEI export: another round of MEI metadata export (PR5) with Perry. commit a0da7d91f3820b215c235a2216b7da7addc27a9a Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Mon Sep 25 15:43:10 2023 -0700 MEI export: Export composer authority info as MADS inside <work><extMeta>. A few other tweaks. commit 6729d27b7aef8a5a58877349d21799ee395c70e4 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sun Sep 24 13:08:55 2023 -0700 MEI export: another round of metadata export tweaks with Perry. commit cafcd60746c54a468e308de1a0562b575da2c824 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sat Sep 23 14:31:39 2023 -0700 MEI export: 'humdrum:HTX' exports as <lg><l><l></lg> now, with @xml.lang on the <lg> if possible. commit 9d1c5924ff3b6f945407e6e65746a7a4610da971 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sat Sep 23 13:25:19 2023 -0700 Squashed commit of the following: commit 6f4bb71886f79381b1a970a5240b9e67259717cd Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sat Sep 23 13:08:46 2023 -0700 MEI export: allow client to specify v4 or v5 MEI to be written. commit 8b43ce20ed298c4b9688567ce02ef7c1a320ca56 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sat Sep 23 12:29:49 2023 -0700 MEI import: support both v4 and v5 (but not 5.0+Neumes or 5.0+Mensural). commit 5143a11678af58c798921263390921f1832e4476 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Fri Sep 22 16:34:30 2023 -0700 MEI export: latest metadata revision from Perry. commit 6f889230007177b2435fbf20a700a11a48f56a74 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Thu Sep 21 16:14:55 2023 -0700 MEI import: read up the @meiversion from the root element. Not using it yet. commit 18b709212793072c5895dc37b0f83f60b020ea02 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Thu Sep 21 11:30:59 2023 -0700 MEI export: No need to re-implement startswith. MEI import: isodate parsing stupid bug ('Z' should have been 'T'). commit 2d5135d8c1dd3e4193c17072ac695230f9f68806 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Wed Sep 20 17:44:58 2023 -0700 MEI import: parse isodates properly. MEI export: fix bug introduced by the xmlId refactor for title@sameas and composer@sameas. commit 16a9cb28668e1e36f9440a9668c69eb94c623c7a Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Wed Sep 20 12:54:25 2023 -0700 MEI export: instead of copying the main <title> element and all the <composer> elements into multiple places, just put @sameas elements in their place (with a single title or name in the element, for human readers). commit 1588b96707757c4867838aacc4f5d88603dd8d2a Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Tue Sep 19 15:35:40 2023 -0700 MEI export: DateSelection can be "and" or "or"; support both. commit 7527f4294a78c9fa110ac556f5930a4866a3b600 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Tue Sep 19 15:02:14 2023 -0700 MEI export: all metadata exported except humdrum:AIN -> <perfMedium>. commit 33e03ad226c23ecacec62ce4ae9cd8397f10fd60 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Mon Sep 18 12:46:13 2023 -0700 MEI export: more composers, add encodingDesc and a start on workList. commit 3d90125bc07946c6a2c213cd0b09f9140e0922e4 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Thu Sep 7 16:19:45 2023 -0700 MEI export: @target, not @data. commit b0c2e01264d223b883c6ade6888e44aa2aa8fcec Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Mon Sep 4 17:42:32 2023 -0700 MEI export: final metadata source (unpublished). commit 73dbb1cdf562f6df4311211623f04bacdefd27f7 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Mon Sep 4 17:04:42 2023 -0700 MEI export: more metadata fileDesc/source (all but the last one: unpublished source). commit 93ebf6ee5db53949a9b7eac449edb596390c5ad3 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Mon Sep 4 14:09:27 2023 -0700 MEI export: More fileDesc, started sourceDesc with digital source. commit 1acc8973aa06637abb0b53c85608242fafb7358e Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sun Sep 3 12:35:25 2023 -0700 MEI export: first cut at rewrite of metadata export. Just fileDesc/titleStmt and music/back/div@type="textTranslation". commit 51c9dc38af3fb857c889c76b7ea145f9ee596569 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sat Sep 2 17:20:27 2023 -0700 MEI export: more removals of first attempt at metadata export. commit 16dd9549004e6a66d770e98d9015c4b6668d6d03 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sat Sep 2 17:13:29 2023 -0700 MEI export: start again with metadata writing. commit ec38b60ec2f7bc3ff0d40f9cbab2e5eeb4dc54ce Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sat Sep 2 14:05:55 2023 -0700 MEI import: support title@type="popular" (the new way of encoding popularTitle). commit fd0494bdc174379e90c52abbdc39c305e1d5084c Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Fri Sep 1 15:59:18 2023 -0700 MEI import/export: Some clean up, some bugfixes, analogs should always be 'humdrum:XXX'. But I'm going to rewrite the metadata export code to be driven by MEI structures (fill 'em in) instead of by music21 metadata items (where does this one go?). commit a8fa3a9a82dbf37218775286e99f29073a7b19de Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sat Aug 26 17:19:44 2023 -0700 MEI export: finish initial implementation of metadata export. It works, modulo some differences of opinion between import and export. commit 09ac4c687251313574fec054604aeced5851d7fe Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Sat Aug 26 13:29:00 2023 -0700 MEI export: Rough implementation of metadata export. Doesn't work yet, but need to save it off. commit 0dcf0c3cf8528f8ea55a598bf659012efdc17322 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Thu Aug 24 16:47:43 2023 -0700 Humdrum import: don't import metadata items with no value. MEI import: if date parsing fails to give a DatePrimitive, use a string instead of giving up. commit 29813dd797585d8849d40c106085dc874b7eb67e Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Wed Aug 23 17:10:28 2023 -0700 Tests: much better diffall output for metadata differences (print the keys). commit 1b3a3f80650dc9812a694c29d166456fcaddc627 Author: Greg Chapman <75333244+gregchapman-dev@users.noreply.github.com> Date: Wed Aug 23 14:38:19 2023 -0700 Humdrum import: no more 'humdrumraw:???' metadata. It's all parsed 'humdrum:???'. We're going to pretend it's all ssupported in music21…
1 parent 5f0b99b commit 28eb3e6

43 files changed

Lines changed: 3245 additions & 597 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
The MIT License (MIT)
2-
Copyright (c) 2021-2023 Greg Chapman
2+
Copyright (c) 2021-2024 Greg Chapman
33

44
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
55

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Call converter21.register() to get music21 to use converter21's alternate Humdru
3939

4040
## License
4141
The MIT License (MIT)
42-
Copyright (c) 2021-2023 Greg Chapman
42+
Copyright (c) 2021-2024 Greg Chapman
4343

4444
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4545

ReleaseNotes_3.1.0.txt

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
Changes since 3.0.1:
2+
3+
All importers/exporters:
4+
- Regularize invisible vs regular vs missing m21 Barlines.
5+
6+
All importers:
7+
- Fix handling of 'title' vs. 'movementName'.
8+
9+
All exporters:
10+
- Fix handling of "play only" MetronomeMarks.
11+
- Regularize treatment of absoluteY and placement.
12+
- Handle Grace vs Appoggiatura more carefully.
13+
- Handle gaps by exporting invisible rests.
14+
- Obey chordSymbol.writeAsChord during export (ChordSymbol is not yet supported, but
15+
if .writeAsChord is true, we'll emit the <chord> itself).
16+
- Fix handling of staves not in any staffGroup.
17+
18+
MEI importer/exporter:
19+
- Support lyric placement
20+
- DatePrimitive range edge that is also a range needs to be
21+
"[date1..date2]", not "date1/date2".
22+
We can now import both, but export always produces "[date1..date2]".
23+
- Fix handling of tuplet.bracket and visibility.
24+
25+
MEI importer:
26+
- Fix timestamp computation (notice meter changes inside layers before computing
27+
any timestamps in that measure).
28+
- Allow <space> to be used as a @startid or @endid in a staff item (e.g. <hairpin>).
29+
30+
MEI exporter:
31+
- MetronomeMark implicit text no longer emitted in <tempo>.
32+
- Fix duplicated clefs/keySigs/meterSigs; if you emit in staffdef, don't emit
33+
again later at start of layer.
34+
- Actually emit clef/key/timesig changes that aren't at start of measure.
35+
- @midi.bpm must be exported as a string (fixes an MEI export crash).
36+
- If @tstamp2 is going to be in a previous measure, don't crash, just put it at the beginning
37+
of this measure.
38+
- Add missing @isodate for "datePublished".
39+
- Fix handling of spanners that start and end in different Parts (we were crashing).
40+
- Emit ornament accidentals only if visible (there is no @accid.ges on
41+
ornamentals, unfortunately, or we would use that for invisible accidentals).
42+
- MEI hairpins end at start of @endid. Unfortunately, music21 DynamicWedges
43+
end at _end_ of dw.getLast(). So we can't use dw.getLast() as @endid. Instead
44+
we now emit a @tstamp2 at the ending offset of dw.getLast().
45+
46+
Humdrum importer/exporter:
47+
- Fix handling of OMD that is not Tempo (picked up !LO:TX:omd: import support from
48+
Verovio, then started emitting that in Humdrum export).
49+
- Support export of non-note-associated (i.e. timestamped) dynamics/directions/tempos
50+
by adding a voice full of invisible rests, one of which lands at the desired offset.
51+
This was a Humdrum export feature, but it exposed several Humdrum import bugs that
52+
got fixed as well.
53+
54+
Humdrum importer:
55+
- Fix handling of transposing instruments.
56+
- Fix handling of preferred vs forced placement of dynamics and hairpins.
57+
58+
Tests:
59+
- Modify all diffall and showdiff tests to report mismatched number of parts before
60+
diffing to avoid musicdiff exception.
61+
- Visualize note offset differences (new musicdiff v3.1 feature) in diffall tests.
62+
- Print out exception information in diffall tests.

converter21/humdrum/convert.py

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ def getTempoText(text: str) -> str:
544544
output += first
545545

546546
# Add the musical symbols (notes and dots), adding a space between them
547-
dotChar: str = SharedConstants._SMUFL_NAME_TO_UNICODE_CHAR.get('metAugmentationDot', '')
547+
dotChar: str = SharedConstants.SMUFL_NAME_TO_UNICODE_CHAR.get('metAugmentationDot', '')
548548
counter: int = 0
549549
for i, char in enumerate(second):
550550
if i > 0:
@@ -598,33 +598,33 @@ def humdrumTempoNoteNameToSmuflText(text: str) -> str:
598598
finaltext = re.sub(r'\.+$', '', finaltext)
599599

600600
if finaltext in ('quarter', '4'):
601-
output = SharedConstants._SMUFL_NAME_TO_UNICODE_CHAR.get('metNoteQuarterUp', '')
601+
output = SharedConstants.SMUFL_NAME_TO_UNICODE_CHAR.get('metNoteQuarterUp', '')
602602
elif finaltext in ('half', '2'):
603-
output = SharedConstants._SMUFL_NAME_TO_UNICODE_CHAR.get('metNoteHalfUp', '')
603+
output = SharedConstants.SMUFL_NAME_TO_UNICODE_CHAR.get('metNoteHalfUp', '')
604604
elif finaltext in ('whole', '1'):
605-
output = SharedConstants._SMUFL_NAME_TO_UNICODE_CHAR.get('metNoteWhole', '')
605+
output = SharedConstants.SMUFL_NAME_TO_UNICODE_CHAR.get('metNoteWhole', '')
606606
elif finaltext in ('breve', 'double-whole', '0'):
607-
output = SharedConstants._SMUFL_NAME_TO_UNICODE_CHAR.get('metNoteDoubleWhole', '')
607+
output = SharedConstants.SMUFL_NAME_TO_UNICODE_CHAR.get('metNoteDoubleWhole', '')
608608
elif finaltext in ('eighth', '8', '8th'):
609-
output = SharedConstants._SMUFL_NAME_TO_UNICODE_CHAR.get('metNote8thUp', '')
609+
output = SharedConstants.SMUFL_NAME_TO_UNICODE_CHAR.get('metNote8thUp', '')
610610
elif finaltext in ('sixteenth', '16', '16th'):
611-
output = SharedConstants._SMUFL_NAME_TO_UNICODE_CHAR.get('metNote16thUp', '')
611+
output = SharedConstants.SMUFL_NAME_TO_UNICODE_CHAR.get('metNote16thUp', '')
612612
elif finaltext in ('32', '32nd'):
613-
output = SharedConstants._SMUFL_NAME_TO_UNICODE_CHAR.get('metNote32ndUp', '')
613+
output = SharedConstants.SMUFL_NAME_TO_UNICODE_CHAR.get('metNote32ndUp', '')
614614
elif finaltext in ('64', '64th'):
615-
output = SharedConstants._SMUFL_NAME_TO_UNICODE_CHAR.get('metNote64thUp', '')
615+
output = SharedConstants.SMUFL_NAME_TO_UNICODE_CHAR.get('metNote64thUp', '')
616616
elif finaltext in ('128', '128th'):
617-
output = SharedConstants._SMUFL_NAME_TO_UNICODE_CHAR.get('metNote128thUp', '')
617+
output = SharedConstants.SMUFL_NAME_TO_UNICODE_CHAR.get('metNote128thUp', '')
618618
elif finaltext in ('256', '256th'):
619-
output = SharedConstants._SMUFL_NAME_TO_UNICODE_CHAR.get('metNote256thUp', '')
619+
output = SharedConstants.SMUFL_NAME_TO_UNICODE_CHAR.get('metNote256thUp', '')
620620
elif finaltext in ('512', '512th'):
621-
output = SharedConstants._SMUFL_NAME_TO_UNICODE_CHAR.get('metNote512thUp', '')
621+
output = SharedConstants.SMUFL_NAME_TO_UNICODE_CHAR.get('metNote512thUp', '')
622622
elif finaltext in ('1024', '1024th'):
623-
output = SharedConstants._SMUFL_NAME_TO_UNICODE_CHAR.get('metNote1024thUp', '')
623+
output = SharedConstants.SMUFL_NAME_TO_UNICODE_CHAR.get('metNote1024thUp', '')
624624

625625
if dots > 0:
626626
output += (
627-
SharedConstants._SMUFL_NAME_TO_UNICODE_CHAR.get('metAugmentationDot', '')
627+
SharedConstants.SMUFL_NAME_TO_UNICODE_CHAR.get('metAugmentationDot', '')
628628
* dots
629629
)
630630

@@ -1395,7 +1395,7 @@ def transToDiatonicChromatic(trans: str) -> tuple[int | None, int | None]:
13951395
def diatonicChromaticToTrans(d: int, c: int) -> str:
13961396
return 'd' + str(d) + 'c' + str(c)
13971397

1398-
_humdrumBarlineStyleFromMeasureStyle: dict[MeasureStyle, str | None] = {
1398+
_humdrumBarlineStyleFromMeasureStyle: dict[MeasureStyle, str] = {
13991399
MeasureStyle.Double: '||',
14001400
MeasureStyle.HeavyHeavy: '!!',
14011401
MeasureStyle.HeavyLight: '!|',
@@ -1407,7 +1407,6 @@ def diatonicChromaticToTrans(d: int, c: int) -> str:
14071407
MeasureStyle.Invisible: '-',
14081408
MeasureStyle.Regular: '',
14091409
MeasureStyle.Heavy: '!',
1410-
MeasureStyle.NoBarline: None,
14111410
MeasureStyle.RepeatBackwardRegular: ':|',
14121411
MeasureStyle.RepeatBackwardHeavy: ':!',
14131412
MeasureStyle.RepeatBackwardHeavyLight: ':!|',
@@ -1431,8 +1430,8 @@ def diatonicChromaticToTrans(d: int, c: int) -> str:
14311430
}
14321431

14331432
@staticmethod
1434-
def measureStyleToHumdrumBarlineStyleStr(measureStyle: MeasureStyle) -> str | None:
1435-
output: str | None = Convert._humdrumBarlineStyleFromMeasureStyle[measureStyle]
1433+
def measureStyleToHumdrumBarlineStyleStr(measureStyle: MeasureStyle) -> str:
1434+
output: str = Convert._humdrumBarlineStyleFromMeasureStyle[measureStyle]
14361435
return output
14371436

14381437
_humdrumFermataStyleFromFermataStyle: dict[FermataStyle, str] = {

converter21/humdrum/gridcommon.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ class SliceType(IntEnum):
9393
class MeasureVisualStyle(IntEnum):
9494
# this enum is sorted so that we can use max() to pick between
9595
# previous right barline and current left barline visual style
96-
NoBarline = auto()
9796
Regular = auto()
9897
Double = auto()
9998
HeavyHeavy = auto()
@@ -131,7 +130,6 @@ class MeasureStyle(Enum):
131130
Invisible = (MeasureVisualStyle.Invisible, MeasureType.NotRepeat)
132131
Regular = (MeasureVisualStyle.Regular, MeasureType.NotRepeat)
133132
Heavy = (MeasureVisualStyle.Heavy, MeasureType.NotRepeat)
134-
NoBarline = (MeasureVisualStyle.NoBarline, MeasureType.NotRepeat)
135133

136134
RepeatBackwardRegular = (MeasureVisualStyle.Regular, MeasureType.RepeatBackward)
137135
RepeatBackwardHeavy = (MeasureVisualStyle.Heavy, MeasureType.RepeatBackward)
@@ -157,7 +155,7 @@ class MeasureStyle(Enum):
157155
RepeatBothHeavyLightHeavy = (MeasureVisualStyle.HeavyLightHeavy, MeasureType.RepeatBoth)
158156
RepeatBothLightHeavyLight = (MeasureVisualStyle.LightHeavyLight, MeasureType.RepeatBoth)
159157

160-
# This is just here so clients can do blah.measureType and blah.measureVisualType instead
158+
# This is just here so clients can do blah.vStyle and blah.mType instead
161159
# of having to know the layout of the tuple.
162160
def __init__(self, vStyle: MeasureVisualStyle, mType: MeasureType) -> None:
163161
self.vStyle = vStyle

converter21/humdrum/gridmeasure.py

Lines changed: 118 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,10 @@ def addTokenOfSliceType(
281281
part: int,
282282
staff: int,
283283
voice: int,
284-
staffCounts: list[int]
284+
staffCounts: list[int],
285+
beforeAnyLayouts: bool = False
285286
) -> GridSlice:
287+
# beforeAnyLayouts == True only works if the timestamp lands us exactly on a data slice
286288
ts: HumNum = opFrac(timestamp)
287289
gs: GridSlice
288290

@@ -303,12 +305,15 @@ def addTokenOfSliceType(
303305

304306
if gridSlice.timestamp == ts and gridSlice.isDataSlice:
305307
# found the correct timestamp, but no slice of the right type at the
306-
# timestamp, so add the new slice before the data slice (eventually
307-
# keeping track of the order in which the other non-data slices should
308-
# be placed).
308+
# timestamp, so add the new slice before the data slice (and, if
309+
# requested, before any layouts preceding this data slice).
310+
insertPoint: int = idx
311+
if beforeAnyLayouts:
312+
insertPoint = self.startIdxOfLayoutGroupBefore(insertPoint)
313+
309314
gs = GridSlice(self, ts, sliceType, staffCounts)
310315
gs.addToken(tok, part, staff, voice)
311-
self.slices.insert(idx, gs)
316+
self.slices.insert(insertPoint, gs)
312317
return gs
313318

314319
if gridSlice.timestamp > ts:
@@ -339,8 +344,16 @@ def addTempoToken(
339344
voice: int,
340345
staffCounts: list[int]
341346
) -> GridSlice:
342-
return self.addTokenOfSliceType(tok, timestamp, SliceType.Tempos,
343-
part, staff, voice, staffCounts)
347+
return self.addTokenOfSliceType(
348+
tok,
349+
timestamp,
350+
SliceType.Tempos,
351+
part,
352+
staff,
353+
voice,
354+
staffCounts,
355+
beforeAnyLayouts=True
356+
)
344357

345358
'''
346359
//////////////////////////////
@@ -957,18 +970,48 @@ def addVerseLabels(
957970
if verseLabel is not None:
958971
newStaff.sides.setVerse(i, verseLabel)
959972

973+
974+
def addLayoutParameterAtTime(
975+
self,
976+
timestamp: HumNum,
977+
partIndex: int,
978+
locomment: str,
979+
beforeAnyNonTextLayouts: bool = False
980+
) -> None:
981+
# find the associated data slice at the timestamp
982+
associatedSlice: GridSlice | None = None
983+
984+
for theSlice in self.slices:
985+
if not theSlice.isDataSlice:
986+
continue
987+
if theSlice.timestamp >= timestamp:
988+
associatedSlice = theSlice
989+
break
990+
991+
staffIndex: int = 0
992+
voiceIndex: int = 0
993+
self.addLayoutParameter(
994+
associatedSlice,
995+
partIndex,
996+
staffIndex,
997+
voiceIndex,
998+
locomment,
999+
beforeAnyNonTextLayouts=beforeAnyNonTextLayouts
1000+
)
1001+
9601002
'''
9611003
//////////////////////////////
9621004
//
9631005
// GridMeasure::addLayoutParameter --
9641006
'''
9651007
def addLayoutParameter(
9661008
self,
967-
associatedSlice: GridSlice,
1009+
associatedSlice: GridSlice | None,
9681010
partIndex: int,
9691011
staffIndex: int,
9701012
voiceIndex: int,
971-
locomment: str
1013+
locomment: str,
1014+
beforeAnyNonTextLayouts: bool = False
9721015
) -> None:
9731016
# add this '!LO:' string just before this associatedSlice
9741017
if len(self.slices) == 0:
@@ -992,25 +1035,37 @@ def addLayoutParameter(
9921035
# cannot find owning line (a.k.a. associatedSlice is not in this GridMeasure)
9931036
return
9941037

995-
# see if the previous slice is a layout slice we can use
996-
prevIdx: int = associatedSliceIdx - 1
997-
prevSlice: GridSlice = self.slices[prevIdx]
998-
if prevSlice.isLocalLayoutSlice:
999-
prevStaff: GridStaff = prevSlice.parts[partIndex].staves[staffIndex]
1000-
prevVoice: GridVoice = self._getIndexedVoice_AppendingIfNecessary(prevStaff.voices,
1001-
voiceIndex)
1002-
if prevVoice.token is None or prevVoice.token.text == '!':
1003-
prevVoice.token = HumdrumToken(locomment)
1004-
return
1038+
if not beforeAnyNonTextLayouts:
1039+
# see if the previous slice is a layout slice we can use
1040+
prevIdx: int = associatedSliceIdx - 1
1041+
prevSlice: GridSlice = self.slices[prevIdx]
1042+
if prevSlice.isLocalLayoutSlice:
1043+
prevStaff: GridStaff = prevSlice.parts[partIndex].staves[staffIndex]
1044+
prevVoice: GridVoice = self._getIndexedVoice_AppendingIfNecessary(prevStaff.voices,
1045+
voiceIndex)
1046+
if prevVoice.token is None or prevVoice.token.text == '!':
1047+
prevVoice.token = HumdrumToken(locomment)
1048+
return
1049+
1050+
insertPoint: int = associatedSliceIdx
1051+
insertSlice: GridSlice | None = associatedSlice
1052+
if beforeAnyNonTextLayouts:
1053+
insertPoint = self.startIdxOfNonTextLayoutGroupBefore(
1054+
associatedSliceIdx,
1055+
partIndex,
1056+
staffIndex,
1057+
voiceIndex
1058+
)
1059+
if insertPoint < len(self.slices):
1060+
insertSlice = self.slices[insertPoint]
10051061

10061062
# if we get here, we couldn't use the previous slice, so we need to insert
10071063
# a new Layout slice to use, just before the associated slice.
1008-
insertPoint: int = associatedSliceIdx
10091064
newSlice: GridSlice
10101065

1011-
if associatedSlice is not None:
1012-
newSlice = GridSlice(self, associatedSlice.timestamp, SliceType.Layouts)
1013-
newSlice.initializeBySlice(associatedSlice)
1066+
if insertSlice is not None:
1067+
newSlice = GridSlice(self, insertSlice.timestamp, SliceType.Layouts)
1068+
newSlice.initializeBySlice(insertSlice)
10141069
self.slices.insert(insertPoint, newSlice)
10151070
else:
10161071
newSlice = GridSlice(self, self.timestamp + self.duration, SliceType.Layouts)
@@ -1022,6 +1077,46 @@ def addLayoutParameter(
10221077
voiceIndex)
10231078
newVoice.token = HumdrumToken(locomment)
10241079

1080+
def startIdxOfLayoutGroupBefore(self, sliceIdx: int) -> int:
1081+
for testIdx in reversed(range(0, sliceIdx)):
1082+
# loop backward from sliceIdx-1 to 0
1083+
# We are counting on layout slices having zero duration,
1084+
# since we need to not change timestamps as we walk them.
1085+
if self.slices[testIdx].sliceType != SliceType.Layouts:
1086+
return testIdx + 1
1087+
return 0
1088+
1089+
def startIdxOfNonTextLayoutGroupBefore(
1090+
self,
1091+
sliceIdx: int,
1092+
partIdx: int,
1093+
staffIdx: int,
1094+
voiceIdx: int
1095+
) -> int:
1096+
for testIdx in reversed(range(0, sliceIdx)):
1097+
# loop backward from sliceIdx-1 to 0
1098+
# We are counting on layout slices having zero duration,
1099+
# since we need to not change timestamps as we walk them.
1100+
if self.slices[testIdx].sliceType != SliceType.Layouts:
1101+
# it is not a layout slice; we stop here
1102+
return testIdx + 1
1103+
1104+
# it is a layout slice. Is this voice a non-text layout (i.e. not '!LO:TX')?
1105+
if 0 <= partIdx < len(self.slices[testIdx].parts):
1106+
part: GridPart = self.slices[testIdx].parts[partIdx]
1107+
if 0 <= staffIdx < len(part.staves):
1108+
staff: GridStaff = part.staves[staffIdx]
1109+
if 0 <= voiceIdx < len(staff.voices):
1110+
voice: GridVoice | None = staff.voices[voiceIdx]
1111+
if voice is not None and voice.token is not None:
1112+
if voice.token.text.startswith('!LO:TX'):
1113+
# it is a text layout;
1114+
# we've passed any non-text layouts; we stop here
1115+
return testIdx + 1
1116+
1117+
return 0
1118+
1119+
10251120
'''
10261121
//////////////////////////////
10271122
//

0 commit comments

Comments
 (0)