smoosic 2.0.4 → 2.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/build/smoosic.js +23 -12
  2. package/changes.md +10 -0
  3. package/package.json +100 -98
  4. package/release/smoosic.js +23 -12
  5. package/specs/042-preserve-music-time-signature/checklists/requirements.md +35 -0
  6. package/specs/042-preserve-music-time-signature/contracts/rebar-api.md +66 -0
  7. package/specs/042-preserve-music-time-signature/data-model.md +73 -0
  8. package/specs/042-preserve-music-time-signature/plan.md +93 -0
  9. package/specs/042-preserve-music-time-signature/quickstart.md +37 -0
  10. package/specs/042-preserve-music-time-signature/research.md +102 -0
  11. package/specs/042-preserve-music-time-signature/spec.md +153 -0
  12. package/specs/042-preserve-music-time-signature/tasks.md +104 -0
  13. package/src/application/exports.ts +1 -0
  14. package/src/render/sui/renderState.ts +4 -4
  15. package/src/render/sui/scoreViewOperations.ts +58 -3
  16. package/src/render/sui/tracker.ts +18 -23
  17. package/src/smo/data/score.ts +12 -5
  18. package/src/smo/xform/operations.ts +49 -0
  19. package/src/smo/xform/rebar.ts +490 -0
  20. package/src/smo/xform/selections.ts +66 -0
  21. package/src/ui/components/dialogs/timeSignature.vue +13 -3
  22. package/src/ui/dialogs/timeSignature.ts +27 -39
  23. package/tests/rebarMeasures.ts +492 -0
  24. package/tests/timeRangeSelect.ts +111 -0
  25. package/typedoc.ts +1 -0
  26. package/types/src/application/exports.d.ts +1 -0
  27. package/types/src/render/sui/scoreViewOperations.d.ts +19 -2
  28. package/types/src/smo/data/score.d.ts +5 -2
  29. package/types/src/smo/xform/operations.d.ts +24 -0
  30. package/types/src/smo/xform/rebar.d.ts +53 -0
  31. package/types/src/smo/xform/selections.d.ts +14 -0
  32. package/types/typedoc.d.ts +1 -0
package/changes.md CHANGED
@@ -1,6 +1,16 @@
1
1
  <sub>[Github site](https://github.com/smoosic) | [change notes](https://smoosic.github.io//Smoosic/changes.html) | [application](https://smoosic.github.io//Smoosic/release/html/smoosic.html)<sub>
2
2
 
3
3
 
4
+ ## 11-24-2026
5
+ Preserve music when changing the time signature.
6
+
7
+ * The **Time Signature** dialog no longer changes the score while it is open. Editing the time signature, the display options, **Apply To** or the new **Preserve music** box only collects your choices; they are applied together when you click **OK**, as one undo step. Cancel leaves the score untouched. Clicking OK when the measures already have that time signature does nothing.
8
+ * **Preserve music** is ticked by default. The music in the measures you chose is laid out again in the new time signature, with the same notes in the same order, and measures are added after them if the new time signature holds less time. Two measures of 4/4 changed to 3/4 become three measures of 3/4, with a rest at the end of the last one. Measures are never removed: if fewer are needed, the spare ones are filled with rests. This works the same in every staff, so the staves stay lined up.
9
+ * A note that crosses a new bar line is split into tied notes, and a rest is split into rests. Anything attached to the note (dynamics, lyrics, chords, articulations and so on) stays on the first part. A tuplet is kept whole: if it does not fit in what is left of a measure, the rest of the measure is filled with rests and the tuplet starts the next one. Slurs, ties and hairpins stay on the same notes. Hand-placed beaming in the changed measures is reset to automatic. The measures after the ones you changed keep their own time signature and music.
10
+ * A time signature with several parts, such as 3/4+2/4, alternates between them from measure to measure, and the music fills each measure to its own length.
11
+ * **Untick Preserve music** for the old behavior: the new time signature is applied to the measures in place, the music that fits is kept, and the rest is dropped. Changing only the display options, or choosing a time signature with the same length (2/2 for 4/4), never moves any music.
12
+ * For people using Smoosic as a library: `SmoOperation.rebarMeasures` (and `rebarMeasures` in `smo/xform/rebar`) re-bars a range of measures, `SmoOperation.timeSignatureChanges` and `timeSignatureKeepsLength` read what a change would do, `timeSignatureRange` finds the measures for Apply To, and `SuiScoreViewOperations.setTimeSignature` takes an optional second argument `{ applyTo, preserveMusic }`. Called with one argument it works as before. `SmoScore.addMeasure` takes an optional second argument, the measure the new one copies its settings from.
13
+
4
14
  ## 11-16-2026
5
15
  Delete Special.
6
16
 
package/package.json CHANGED
@@ -1,98 +1,100 @@
1
- {
2
- "name": "smoosic",
3
- "version": "2.0.4",
4
- "devDependencies": {
5
- "copy-webpack-plugin": "^12.0.2",
6
- "jquery": "^3.6.0",
7
- "ts-node": "^10.9.2",
8
- "webpack": "^5.89.0",
9
- "webpack-cli": "^4.7.2"
10
- },
11
- "types": "./types/src/application/exports.ts",
12
- "dependencies": {
13
- "@tiptap/extension-subscript": "^3.30.0",
14
- "@tiptap/extension-superscript": "^3.30.0",
15
- "@tiptap/extension-text-align": "^3.30.0",
16
- "@tiptap/extension-text-style": "^3.30.0",
17
- "@tiptap/pm": "^3.30.0",
18
- "@tiptap/starter-kit": "^3.30.0",
19
- "@tiptap/vue-3": "^3.30.0",
20
- "@types/qunit": "^2.19.11",
21
- "express": "^5.1.0",
22
- "midi-parser-js": "^4.0.4",
23
- "midi-writer-js": "^3.1.1",
24
- "smplr": "^0.16.3",
25
- "soundfont2": "^0.4.0",
26
- "standardized-audio-context": "^25.3.58",
27
- "ts-loader": "^9.2.5",
28
- "typedoc": "^0.28.14",
29
- "typescript": "^5.9.3",
30
- "vexflow_smoosic": "4.2.17",
31
- "vue": "^3.5.25",
32
- "vue-loader": "^17.4.2",
33
- "xmldom": "^0.6.0"
34
- },
35
- "main": "build/smoosic.js",
36
- "description": "<sub>[Github site](https://github.com/Smoosic/smoosic) | [source documentation](https://smoosic.github.io/Smoosic/release/docs/modules.html) | [change notes](https://aarondavidnewman.github.io/Smoosic/changes.html) | [demo](https://smoosic.github.io/Smoosic/release/html/smoosic.html)<sub>",
37
- "directories": {
38
- "test": "tests"
39
- },
40
- "browser": {
41
- "fs": false,
42
- "path": false,
43
- "os": false
44
- },
45
- "scripts": {
46
- "test": "exit 0",
47
- "test:attached-text": "ts-node -P tests/tsconfig.json tests/attachedTextMigration.ts",
48
- "test:global-layout-reposition": "ts-node -P tests/tsconfig.json tests/globalLayoutTextReposition.ts",
49
- "test:staff-line-geometry": "ts-node -P tests/tsconfig.json tests/staffLineGeometry.ts",
50
- "test:multimeasure-rest": "ts-node -P tests/tsconfig.json tests/multimeasureRest.ts",
51
- "test:select-voice": "ts-node -P tests/tsconfig.json tests/selectVoice.ts",
52
- "test:voice-copy-paste": "ts-node -P tests/tsconfig.json tests/voiceCopyPaste.ts",
53
- "test:promise-helpers": "ts-node -P tests/tsconfig.json tests/promiseHelpersUsage.ts",
54
- "test:score-change-state": "ts-node -P tests/tsconfig.json tests/scoreChangeState.ts",
55
- "test:page-divisions": "ts-node -P tests/tsconfig.json tests/pageDivisions.ts",
56
- "test:text-drag-placement":"ts-node -P tests/tsconfig.json tests/textDragPlacement.ts",
57
- "test:rehearsal-measure-number": "ts-node -P tests/tsconfig.json tests/rehearsalMarkMeasureNumber.ts",
58
- "test:key-distance-transposition": "ts-node -P tests/tsconfig.json tests/keyDistanceTransposition.ts",
59
- "test:create-part": "ts-node -P tests/tsconfig.json tests/createPart.ts",
60
- "test:move-part": "ts-node -P tests/tsconfig.json tests/movePart.ts",
61
- "test:beam-dotted": "ts-node -P tests/tsconfig.json tests/beamDotted.ts",
62
- "test:beam-groups": "ts-node -P tests/tsconfig.json tests/beamGroups.ts",
63
- "test:quick-beam": "ts-node -P tests/tsconfig.json tests/quickBeam.ts",
64
- "test:measure-fill": "ts-node -P tests/tsconfig.json tests/measureFill.ts",
65
- "test:dynamics-font-size": "ts-node -P tests/tsconfig.json tests/dynamicsFontSize.ts",
66
- "test:delete-special": "ts-node -P tests/tsconfig.json tests/deleteSpecial.ts",
67
- "test:time-signature-display": "ts-node -P tests/tsconfig.json tests/timeSignatureDisplay.ts",
68
- "test:autosave": "ts-node -P tests/tsconfig.json tests/autosave.ts",
69
- "test:paste-special": "ts-node -P tests/tsconfig.json tests/pasteSpecial.ts",
70
- "test:score-archive": "ts-node -P tests/tsconfig.json tests/scoreArchive.ts",
71
- "test:paste-into-measure": "ts-node -P tests/tsconfig.json tests/pasteIntoMeasure.ts",
72
- "server": "node ./build/index.js",
73
- "build": "node ./build/build.js",
74
- "types": "node ./build/build.js types",
75
- "typedoc": "node ./node_modules/typedoc/bin/typedoc"
76
- },
77
- "repository": {
78
- "type": "git",
79
- "url": "git+https://github.com/Smoosic/Smoosic.git"
80
- },
81
- "keywords": [
82
- "music",
83
- "engraving",
84
- "notation",
85
- "audio",
86
- "midi",
87
- "musicxml"
88
- ],
89
- "author": "Aaron D Newman",
90
- "license": "MIT",
91
- "bugs": {
92
- "url": "https://github.com/Smoosic/Smoosic/issues"
93
- },
94
- "homepage": "https://github.com/Smoosic/Smoosic#readme",
95
- "publishConfig": {
96
- "@AaronDavidNewman:registry": "https://npm.pkg.github.com"
97
- }
98
- }
1
+ {
2
+ "name": "smoosic",
3
+ "version": "2.0.5",
4
+ "devDependencies": {
5
+ "copy-webpack-plugin": "^12.0.2",
6
+ "jquery": "^3.6.0",
7
+ "ts-node": "^10.9.2",
8
+ "webpack": "^5.89.0",
9
+ "webpack-cli": "^4.7.2"
10
+ },
11
+ "types": "./types/src/application/exports.ts",
12
+ "dependencies": {
13
+ "@tiptap/extension-subscript": "^3.30.0",
14
+ "@tiptap/extension-superscript": "^3.30.0",
15
+ "@tiptap/extension-text-align": "^3.30.0",
16
+ "@tiptap/extension-text-style": "^3.30.0",
17
+ "@tiptap/pm": "^3.30.0",
18
+ "@tiptap/starter-kit": "^3.30.0",
19
+ "@tiptap/vue-3": "^3.30.0",
20
+ "@types/qunit": "^2.19.11",
21
+ "express": "^5.1.0",
22
+ "midi-parser-js": "^4.0.4",
23
+ "midi-writer-js": "^3.1.1",
24
+ "smplr": "^0.16.3",
25
+ "soundfont2": "^0.4.0",
26
+ "standardized-audio-context": "^25.3.58",
27
+ "ts-loader": "^9.2.5",
28
+ "typedoc": "^0.28.14",
29
+ "typescript": "^5.9.3",
30
+ "vexflow_smoosic": "4.2.17",
31
+ "vue": "^3.5.25",
32
+ "vue-loader": "^17.4.2",
33
+ "xmldom": "^0.6.0"
34
+ },
35
+ "main": "build/smoosic.js",
36
+ "description": "<sub>[Github site](https://github.com/Smoosic/smoosic) | [source documentation](https://smoosic.github.io/Smoosic/release/docs/modules.html) | [change notes](https://aarondavidnewman.github.io/Smoosic/changes.html) | [demo](https://smoosic.github.io/Smoosic/release/html/smoosic.html)<sub>",
37
+ "directories": {
38
+ "test": "tests"
39
+ },
40
+ "browser": {
41
+ "fs": false,
42
+ "path": false,
43
+ "os": false
44
+ },
45
+ "scripts": {
46
+ "test": "exit 0",
47
+ "test:attached-text": "ts-node -P tests/tsconfig.json tests/attachedTextMigration.ts",
48
+ "test:global-layout-reposition": "ts-node -P tests/tsconfig.json tests/globalLayoutTextReposition.ts",
49
+ "test:staff-line-geometry": "ts-node -P tests/tsconfig.json tests/staffLineGeometry.ts",
50
+ "test:multimeasure-rest": "ts-node -P tests/tsconfig.json tests/multimeasureRest.ts",
51
+ "test:select-voice": "ts-node -P tests/tsconfig.json tests/selectVoice.ts",
52
+ "test:time-range-select": "ts-node -P tests/tsconfig.json tests/timeRangeSelect.ts",
53
+ "test:voice-copy-paste": "ts-node -P tests/tsconfig.json tests/voiceCopyPaste.ts",
54
+ "test:promise-helpers": "ts-node -P tests/tsconfig.json tests/promiseHelpersUsage.ts",
55
+ "test:score-change-state": "ts-node -P tests/tsconfig.json tests/scoreChangeState.ts",
56
+ "test:page-divisions": "ts-node -P tests/tsconfig.json tests/pageDivisions.ts",
57
+ "test:text-drag-placement":"ts-node -P tests/tsconfig.json tests/textDragPlacement.ts",
58
+ "test:rehearsal-measure-number": "ts-node -P tests/tsconfig.json tests/rehearsalMarkMeasureNumber.ts",
59
+ "test:key-distance-transposition": "ts-node -P tests/tsconfig.json tests/keyDistanceTransposition.ts",
60
+ "test:create-part": "ts-node -P tests/tsconfig.json tests/createPart.ts",
61
+ "test:move-part": "ts-node -P tests/tsconfig.json tests/movePart.ts",
62
+ "test:beam-dotted": "ts-node -P tests/tsconfig.json tests/beamDotted.ts",
63
+ "test:beam-groups": "ts-node -P tests/tsconfig.json tests/beamGroups.ts",
64
+ "test:quick-beam": "ts-node -P tests/tsconfig.json tests/quickBeam.ts",
65
+ "test:measure-fill": "ts-node -P tests/tsconfig.json tests/measureFill.ts",
66
+ "test:rebar-measures": "ts-node -P tests/tsconfig.json tests/rebarMeasures.ts",
67
+ "test:dynamics-font-size": "ts-node -P tests/tsconfig.json tests/dynamicsFontSize.ts",
68
+ "test:delete-special": "ts-node -P tests/tsconfig.json tests/deleteSpecial.ts",
69
+ "test:time-signature-display": "ts-node -P tests/tsconfig.json tests/timeSignatureDisplay.ts",
70
+ "test:autosave": "ts-node -P tests/tsconfig.json tests/autosave.ts",
71
+ "test:paste-special": "ts-node -P tests/tsconfig.json tests/pasteSpecial.ts",
72
+ "test:score-archive": "ts-node -P tests/tsconfig.json tests/scoreArchive.ts",
73
+ "test:paste-into-measure": "ts-node -P tests/tsconfig.json tests/pasteIntoMeasure.ts",
74
+ "server": "node ./build/index.js",
75
+ "build": "node ./build/build.js",
76
+ "types": "node ./build/build.js types",
77
+ "typedoc": "node ./node_modules/typedoc/bin/typedoc"
78
+ },
79
+ "repository": {
80
+ "type": "git",
81
+ "url": "git+https://github.com/Smoosic/Smoosic.git"
82
+ },
83
+ "keywords": [
84
+ "music",
85
+ "engraving",
86
+ "notation",
87
+ "audio",
88
+ "midi",
89
+ "musicxml"
90
+ ],
91
+ "author": "Aaron D Newman",
92
+ "license": "MIT",
93
+ "bugs": {
94
+ "url": "https://github.com/Smoosic/Smoosic/issues"
95
+ },
96
+ "homepage": "https://github.com/Smoosic/Smoosic#readme",
97
+ "publishConfig": {
98
+ "@AaronDavidNewman:registry": "https://npm.pkg.github.com"
99
+ }
100
+ }