feat(ustx,seqtool,base): replace flat-dict USTX API with typed datamo…#24
Merged
NewComer00 merged 1 commit intomainfrom Mar 22, 2026
Merged
feat(ustx,seqtool,base): replace flat-dict USTX API with typed datamo…#24NewComer00 merged 1 commit intomainfrom
NewComer00 merged 1 commit intomainfrom
Conversation
…del and multi-tempo support BREAKING CHANGE: load_ustx() now returns UProject instead of dict; save_ustx() now accepts UProject instead of dict; edit_ustx_expression_curve() is removed — use UstxEditor or UVoicePart.set_curve() instead. feat(ustx): add UProject, UVoicePart, UCurve, UTrack, UTempo, UTimeSignature dataclasses mirroring OpenUtau C# models feat(ustx): add TimeAxis — piecewise tick ↔ ms converter replicating OpenUtau's BuildSegments / TickPosToMsPos / MsPosToTickPos logic, with full multi-tempo and multi-time-signature support feat(ustx): add UstxEditor — RAII context manager with exclusive FileLock, add_expression_to_part(), and add_expression_to_track() (absolute → relative tick translation with per-part windowing) feat(seqtool): replace time_to_ticks/ticks_to_time with a set_tick_converters() / reset_tick_converters() registry; all to_ticks=True paths and align_sequence_tick() now use the registered tempo-map-aware converters instead of a fixed BPM approximation feat(base): register tick converters from ustx_time_axis in ExpressionLoader.__init__(); remove threading.Lock (superseded by FileLock in UstxEditor); remove self.tempo in favour of self.ustx_time_axis; offset shifting moved to load_to_ustx() via shift_ticks_by_seconds() feat(dyn,pitd,tenc): drop tempo/ppqn kwargs from align_sequence_tick calls; remove manual utau_offset_ticks arithmetic; pitd gains RMS + RMS dynamics features to match dyn/tenc feature sets feat(examples): add テトリス and Прекрасное Далеко examples with project.ustx, reference.wav, utau.wav, expressive_config.json and README; update 明天会更好 project with reference track and corrected exp_selectors; remove expressive_config.json from .gitignore fix(wavtool): extract_wav_frequency now returns np.ndarray instead of list, matching documented return type deps: add filelock to pyproject.toml test(ustx): replace dict-based assertions with UProject attribute access throughout; add TestUProject, TestUCurve, TestTimeAxis, TestUstxEditor covering roundtrip, multi-tempo boundary, relative-tick translation, and context-manager save/no-save behaviour test(seqtool): replace TestTimeConversion with TestTickConverterRegistry using _make_tick_converters() helper and tick_converters_120bpm fixture; drop TestNumericalStability (absorbed into registry tests) test(base): replace loader.tempo with ustx_time_axis assertions; remove ustx_lock tests; add test_tick_converters_registered_after_init test(wavtool): fix list → ndarray type assertions for extract_wav_frequency return values test(expressive): fix integration test to use UProject attribute access Co-authored-by: Claude <claude@anthropic.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…del and multi-tempo support
BREAKING CHANGE: load_ustx() now returns UProject instead of dict; save_ustx() now accepts UProject instead of dict;
edit_ustx_expression_curve() is removed — use UstxEditor or UVoicePart.set_curve() instead.
feat(ustx): add UProject, UVoicePart, UCurve, UTrack, UTempo, UTimeSignature dataclasses mirroring OpenUtau C# models
feat(ustx): add TimeAxis — piecewise tick ↔ ms converter replicating OpenUtau's BuildSegments / TickPosToMsPos / MsPosToTickPos logic, with full multi-tempo and multi-time-signature support
feat(ustx): add UstxEditor — RAII context manager with exclusive FileLock, add_expression_to_part(), and add_expression_to_track() (absolute → relative tick translation with per-part windowing)
feat(seqtool): replace time_to_ticks/ticks_to_time with a set_tick_converters() / reset_tick_converters() registry; all to_ticks=True paths and align_sequence_tick() now use the registered tempo-map-aware converters instead of a fixed BPM approximation
feat(base): register tick converters from ustx_time_axis in ExpressionLoader.init(); remove threading.Lock (superseded by FileLock in UstxEditor); remove self.tempo in favour of self.ustx_time_axis; offset shifting moved to load_to_ustx() via shift_ticks_by_seconds()
feat(dyn,pitd,tenc): drop tempo/ppqn kwargs from align_sequence_tick calls; remove manual utau_offset_ticks arithmetic; pitd gains RMS + RMS dynamics features to match dyn/tenc feature sets
feat(examples): add テトリス and Прекрасное Далеко examples with project.ustx, reference.wav, utau.wav, expressive_config.json and README; update 明天会更好 project with reference track and corrected exp_selectors; remove expressive_config.json from .gitignore
fix(wavtool): extract_wav_frequency now returns np.ndarray instead of list, matching documented return type
deps: add filelock to pyproject.toml
test(ustx): replace dict-based assertions with UProject attribute access throughout; add TestUProject, TestUCurve, TestTimeAxis, TestUstxEditor covering roundtrip, multi-tempo boundary, relative-tick translation, and context-manager save/no-save behaviour
test(seqtool): replace TestTimeConversion with TestTickConverterRegistry using _make_tick_converters() helper and tick_converters_120bpm fixture; drop TestNumericalStability (absorbed into registry tests)
test(base): replace loader.tempo with ustx_time_axis assertions; remove ustx_lock tests; add test_tick_converters_registered_after_init
test(wavtool): fix list → ndarray type assertions for extract_wav_frequency return values
test(expressive): fix integration test to use UProject attribute access