jpfun 0.2.0 → 0.4.0
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.
- package/README.md +141 -11
- package/dist/converter/midi/convert.d.ts +50 -0
- package/dist/converter/midi/convert.js +700 -0
- package/dist/converter/midi/index.d.ts +5 -0
- package/dist/converter/midi/index.js +11 -0
- package/dist/converter/midi/json.d.ts +38 -0
- package/dist/converter/midi/json.js +1 -0
- package/dist/converter/midi/triplet.d.ts +30 -0
- package/dist/converter/midi/triplet.js +75 -0
- package/dist/converter/musicxml/dom.d.ts +25 -0
- package/dist/converter/musicxml/dom.js +65 -0
- package/dist/converter/musicxml/features.d.ts +51 -0
- package/dist/converter/musicxml/features.js +232 -0
- package/dist/converter/musicxml/index.d.ts +9 -0
- package/dist/converter/musicxml/index.js +1140 -0
- package/dist/converter/musicxml/model.d.ts +123 -0
- package/dist/converter/musicxml/model.js +1 -0
- package/dist/converter/source.d.ts +22 -0
- package/dist/converter/source.js +51 -0
- package/dist/core.d.ts +22 -0
- package/dist/core.js +22 -0
- package/dist/diagnostic.js +5 -2
- package/dist/fraction.d.ts +24 -0
- package/dist/fraction.js +132 -0
- package/dist/functions/ASTtypes.d.ts +51 -31
- package/dist/functions/ASTtypes.js +59 -38
- package/dist/functions/adjust/index.d.ts +2 -0
- package/dist/functions/adjust/index.js +193 -0
- package/dist/functions/arpeggio/index.d.ts +2 -0
- package/dist/functions/arpeggio/index.js +180 -0
- package/dist/functions/arpeggio/shape.d.ts +7 -0
- package/dist/functions/arpeggio/shape.js +122 -0
- package/dist/functions/bar/index.d.ts +8 -0
- package/dist/functions/bar/index.js +62 -25
- package/dist/functions/beam/auto.d.ts +1 -1
- package/dist/functions/beam/auto.js +33 -16
- package/dist/functions/beam/index.js +10 -6
- package/dist/functions/beam/layout.d.ts +4 -3
- package/dist/functions/beam/layout.js +43 -65
- package/dist/functions/box/index.js +37 -36
- package/dist/functions/br/index.js +10 -8
- package/dist/functions/dash/index.js +40 -7
- package/dist/functions/default.js +19 -8
- package/dist/functions/div/index.d.ts +16 -0
- package/dist/functions/div/index.js +45 -17
- package/dist/functions/dot/index.js +23 -25
- package/dist/functions/dyn/index.d.ts +2 -0
- package/dist/functions/dyn/index.js +242 -0
- package/dist/functions/grace/index.d.ts +8 -11
- package/dist/functions/grace/index.js +84 -79
- package/dist/functions/head/index.d.ts +2 -0
- package/dist/functions/head/index.js +496 -0
- package/dist/functions/key/index.js +98 -3
- package/dist/functions/meter/index.d.ts +2 -0
- package/dist/functions/meter/index.js +155 -0
- package/dist/functions/note/accidentals.d.ts +24 -3
- package/dist/functions/note/accidentals.js +31 -1
- package/dist/functions/note/index.js +106 -79
- package/dist/functions/note/noteNameFSM.js +52 -63
- package/dist/functions/page/index.d.ts +11 -2
- package/dist/functions/page/index.js +65 -4
- package/dist/functions/program/index.d.ts +2 -0
- package/dist/functions/program/index.js +30 -0
- package/dist/functions/set/index.js +43 -32
- package/dist/functions/stack/index.js +26 -22
- package/dist/functions/symbol/index.d.ts +31 -0
- package/dist/functions/symbol/index.js +139 -0
- package/dist/functions/symbol/ornament.d.ts +15 -0
- package/dist/functions/symbol/ornament.js +73 -0
- package/dist/functions/symbol/shape.d.ts +24 -0
- package/dist/functions/symbol/shape.js +52 -0
- package/dist/functions/symbol/symbols/accent.d.ts +2 -0
- package/dist/functions/symbol/symbols/accent.js +24 -0
- package/dist/functions/symbol/symbols/dc.d.ts +4 -0
- package/dist/functions/symbol/symbols/dc.js +82 -0
- package/dist/functions/symbol/symbols/ds.d.ts +2 -0
- package/dist/functions/symbol/symbols/ds.js +93 -0
- package/dist/functions/symbol/symbols/dynamics.d.ts +3 -0
- package/dist/functions/symbol/symbols/dynamics.js +168 -0
- package/dist/functions/symbol/symbols/fermata.d.ts +2 -0
- package/dist/functions/symbol/symbols/fermata.js +24 -0
- package/dist/functions/symbol/symbols/fine.d.ts +2 -0
- package/dist/functions/symbol/symbols/fine.js +12 -0
- package/dist/functions/symbol/symbols/mordent.d.ts +2 -0
- package/dist/functions/symbol/symbols/mordent.js +56 -0
- package/dist/functions/symbol/symbols/prall.d.ts +2 -0
- package/dist/functions/symbol/symbols/prall.js +42 -0
- package/dist/functions/symbol/symbols/segno.d.ts +4 -0
- package/dist/functions/symbol/symbols/segno.js +82 -0
- package/dist/functions/symbol/symbols/tr.d.ts +2 -0
- package/dist/functions/symbol/symbols/tr.js +71 -0
- package/dist/functions/tempo/glyph.d.ts +12 -0
- package/dist/functions/tempo/glyph.js +30 -0
- package/dist/functions/tempo/index.js +57 -4
- package/dist/functions/temporal.d.ts +138 -0
- package/dist/functions/temporal.js +101 -0
- package/dist/functions/text/index.js +86 -27
- package/dist/functions/tie/index.js +136 -152
- package/dist/functions/tuplet/index.d.ts +2 -0
- package/dist/functions/tuplet/index.js +218 -0
- package/dist/functions/up/index.d.ts +1 -0
- package/dist/functions/up/index.js +258 -182
- package/dist/functions/voice/index.js +203 -109
- package/dist/functions/volta/index.d.ts +2 -0
- package/dist/functions/volta/index.js +230 -0
- package/dist/iife/core.d.ts +1 -0
- package/dist/iife/core.js +3 -0
- package/dist/iife/from-midi.d.ts +1 -0
- package/dist/iife/from-midi.js +15 -0
- package/dist/iife/from-musicxml.d.ts +1 -0
- package/dist/iife/from-musicxml.js +3 -0
- package/dist/iife/full.d.ts +1 -0
- package/dist/iife/full.js +3 -0
- package/dist/index.d.ts +3 -17
- package/dist/index.js +3 -17
- package/dist/jpfun.core.min.js +153 -0
- package/dist/jpfun.from-midi.min.js +9 -0
- package/dist/jpfun.from-musicxml.min.js +12 -0
- package/dist/jpfun.min.js +166 -0
- package/dist/layout/default.js +2 -3
- package/dist/layout/engine.d.ts +6 -12
- package/dist/layout/engine.js +115 -64
- package/dist/layout/model.d.ts +12 -5
- package/dist/layout/model.js +31 -18
- package/dist/layout/page.js +5 -4
- package/dist/layout/path.d.ts +19 -0
- package/dist/layout/path.js +101 -0
- package/dist/layout/types.d.ts +71 -20
- package/dist/layout/types.js +3 -1
- package/dist/lowering/loweringContext.d.ts +20 -20
- package/dist/lowering/loweringContext.js +153 -101
- package/dist/lowering/track.d.ts +5 -9
- package/dist/lowering/track.js +7 -2
- package/dist/lowering/types.d.ts +26 -112
- package/dist/lowering/types.js +1 -92
- package/dist/parser/parse-utils/call-utils.d.ts +0 -2
- package/dist/parser/parse-utils/call-utils.js +0 -6
- package/dist/parser/parse-utils/note-utils.d.ts +8 -0
- package/dist/parser/parse-utils/note-utils.js +35 -13
- package/dist/parser/parse-utils/string-utils.d.ts +10 -0
- package/dist/parser/parse-utils/string-utils.js +24 -0
- package/dist/parser/parserContext.d.ts +11 -9
- package/dist/parser/parserContext.js +65 -55
- package/dist/parser/preprocess.js +17 -11
- package/dist/pipeline.d.ts +6 -5
- package/dist/pipeline.js +4 -5
- package/dist/playback/compile.d.ts +18 -0
- package/dist/playback/compile.js +414 -0
- package/dist/playback/event.d.ts +105 -0
- package/dist/playback/event.js +105 -0
- package/dist/playback/time.d.ts +14 -0
- package/dist/playback/time.js +81 -0
- package/dist/playback/types.d.ts +129 -0
- package/dist/playback/types.js +3 -0
- package/dist/render/canvas.d.ts +4 -4
- package/dist/render/canvas.js +20 -5
- package/dist/render/index.d.ts +1 -0
- package/dist/render/index.js +1 -0
- package/dist/render/paint.d.ts +8 -0
- package/dist/render/paint.js +101 -0
- package/dist/render/svg.d.ts +3 -3
- package/dist/render/svg.js +10 -8
- package/dist/render/text.d.ts +22 -0
- package/dist/render/text.js +42 -0
- package/dist/render/types.d.ts +1 -1
- package/grammar.md +132 -13
- package/package.json +19 -6
package/README.md
CHANGED
|
@@ -4,11 +4,13 @@ A functional numbered musical notation typesetting engine for TypeScript.
|
|
|
4
4
|
|
|
5
5
|
jpFun compiles a compact numbered-notation DSL into a reusable document layout that can be rendered as SVG or Canvas.
|
|
6
6
|
|
|
7
|
+
[Documentation](https://madderscientist.github.io/jpFun/)
|
|
8
|
+
|
|
7
9
|
## Features
|
|
8
10
|
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
- Automatic spacing,
|
|
11
|
+
- Compact DSL with syntax sugar and function-based extensibility
|
|
12
|
+
- Exact rational timing and composable score structures
|
|
13
|
+
- Automatic spacing, explicit system breaks, and page-aware pagination
|
|
12
14
|
- Shared layout model for SVG and Canvas rendering
|
|
13
15
|
- Structured diagnostics and source locations
|
|
14
16
|
- Zero runtime dependencies
|
|
@@ -28,10 +30,62 @@ import { compileScore } from "jpfun";
|
|
|
28
30
|
|
|
29
31
|
CommonJS `require("jpfun")` is not supported.
|
|
30
32
|
|
|
33
|
+
## Browser via CDN
|
|
34
|
+
|
|
35
|
+
A bundled, minified build ships with the package, so no build step is needed for a plain web page. Load it with a `<script>` tag and use the `jpfun` global:
|
|
36
|
+
|
|
37
|
+
```html
|
|
38
|
+
<script src="https://unpkg.com/jpfun"></script>
|
|
39
|
+
<script>
|
|
40
|
+
const { compileScore, renderLayoutPagesToSvg } = jpfun;
|
|
41
|
+
document.body.innerHTML = renderLayoutPagesToSvg(compileScore("1 2 3 | 4 -").layout)[0];
|
|
42
|
+
</script>
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
For ES modules, jsDelivr bundles the package on the fly:
|
|
46
|
+
|
|
47
|
+
```html
|
|
48
|
+
<script type="module">
|
|
49
|
+
import { compileScore } from "https://cdn.jsdelivr.net/npm/jpfun/+esm";
|
|
50
|
+
</script>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Both URLs resolve to the latest published version. In production, append an exact version (`jpfun@x.y.z`) so that publishing a new release cannot change an existing page.
|
|
54
|
+
|
|
55
|
+
The default URL is the complete build. Plain pages can instead load only the capabilities they use; every script extends the same `jpfun` global:
|
|
56
|
+
|
|
57
|
+
```html
|
|
58
|
+
<!-- Parse, layout, render, and playback without format converters. -->
|
|
59
|
+
<script src="https://unpkg.com/jpfun/dist/jpfun.core.min.js"></script>
|
|
60
|
+
|
|
61
|
+
<!-- MusicXML import works by itself. -->
|
|
62
|
+
<script src="https://unpkg.com/jpfun/dist/jpfun.from-musicxml.min.js"></script>
|
|
63
|
+
<script>
|
|
64
|
+
const document = new DOMParser().parseFromString(musicXmlText, "application/xml");
|
|
65
|
+
const musicXmlSource = jpfun.musicXmlToJpFun(document.documentElement);
|
|
66
|
+
</script>
|
|
67
|
+
|
|
68
|
+
<!-- MIDI JSON import with a fixed measure count works by itself. -->
|
|
69
|
+
<script src="https://unpkg.com/jpfun/dist/jpfun.from-midi.min.js"></script>
|
|
70
|
+
<script>
|
|
71
|
+
const midiSource = jpfun.midiJsonToJpFun(parsedMidiJson, { barsPerLine: 4 });
|
|
72
|
+
</script>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Measured automatic MIDI line breaking uses the layout engine. Load both scripts before calling the converter with an omitted or non-positive `barsPerLine`:
|
|
76
|
+
|
|
77
|
+
```html
|
|
78
|
+
<script src="https://unpkg.com/jpfun/dist/jpfun.core.min.js"></script>
|
|
79
|
+
<script src="https://unpkg.com/jpfun/dist/jpfun.from-midi.min.js"></script>
|
|
80
|
+
<script>
|
|
81
|
+
const source = jpfun.midiJsonToJpFun(parsedMidiJson);
|
|
82
|
+
</script>
|
|
83
|
+
```
|
|
84
|
+
|
|
31
85
|
## Quick Start
|
|
32
86
|
|
|
33
87
|
```ts
|
|
34
|
-
import { compileScore,
|
|
88
|
+
import { compileScore, renderLayoutPagesToSvg } from "jpfun";
|
|
35
89
|
|
|
36
90
|
const source = `
|
|
37
91
|
@1(C4)
|
|
@@ -41,25 +95,40 @@ const source = `
|
|
|
41
95
|
`;
|
|
42
96
|
|
|
43
97
|
const result = compileScore(source);
|
|
44
|
-
const
|
|
98
|
+
const pages = renderLayoutPagesToSvg(result.layout);
|
|
45
99
|
```
|
|
46
100
|
|
|
47
|
-
`
|
|
101
|
+
`renderLayoutPagesToSvg` returns one SVG string per page. Even an infinite-height document produces one natural-height page. Each SVG can be written to a file, sent in an HTTP response, or inserted into a browser page.
|
|
48
102
|
|
|
49
103
|
## Canvas Rendering
|
|
50
104
|
|
|
51
105
|
```ts
|
|
52
|
-
import { compileScore,
|
|
106
|
+
import { compileScore, renderLayoutPagesToCanvas } from "jpfun";
|
|
53
107
|
|
|
54
108
|
const result = compileScore("1 2 3 | 4");
|
|
55
109
|
const canvas = document.querySelector("canvas");
|
|
56
110
|
const context = canvas.getContext("2d");
|
|
57
111
|
|
|
58
112
|
if (context) {
|
|
59
|
-
|
|
113
|
+
renderLayoutPagesToCanvas(result.layout, [context]);
|
|
60
114
|
}
|
|
61
115
|
```
|
|
62
116
|
|
|
117
|
+
## Text Measurement
|
|
118
|
+
|
|
119
|
+
Layout depends on text widths, so `compileScore` needs a `TextMeasurer`. The default one estimates every character at a fixed fraction of the font size. That keeps results platform-independent, which is what tests and server-side rendering want, but it does not match the real glyph widths of a browser font — narrow letters are overestimated, so right-aligned text and `@box` bounds drift visibly.
|
|
120
|
+
|
|
121
|
+
In a browser, pass `CanvasTextMeasurer` so that measurement agrees with what the renderer draws:
|
|
122
|
+
|
|
123
|
+
```ts
|
|
124
|
+
import { compileScore, CanvasTextMeasurer } from "jpfun";
|
|
125
|
+
|
|
126
|
+
const context = document.createElement("canvas").getContext("2d")!;
|
|
127
|
+
const result = compileScore(source, { textMeasurer: new CanvasTextMeasurer(context) });
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
This applies to SVG output too, since measurement happens during layout rather than during painting. The context is only used for measuring and need not be the canvas you render into.
|
|
131
|
+
|
|
63
132
|
## Compilation Pipeline
|
|
64
133
|
|
|
65
134
|
jpFun exposes the intermediate results of its compilation pipeline:
|
|
@@ -68,8 +137,9 @@ jpFun exposes the intermediate results of its compilation pipeline:
|
|
|
68
137
|
Source
|
|
69
138
|
-> Parser -> AST
|
|
70
139
|
-> Lowering -> timed events and relations
|
|
71
|
-
|
|
72
|
-
|
|
140
|
+
|-> Playback -> NoteOn / NoteOff / Tempo events
|
|
141
|
+
`-> Layout -> document geometry
|
|
142
|
+
-> Renderer -> SVG or Canvas
|
|
73
143
|
```
|
|
74
144
|
|
|
75
145
|
```ts
|
|
@@ -81,7 +151,67 @@ result.lowering;
|
|
|
81
151
|
result.layout;
|
|
82
152
|
```
|
|
83
153
|
|
|
84
|
-
|
|
154
|
+
Playback is compiled independently from layout:
|
|
155
|
+
|
|
156
|
+
```ts
|
|
157
|
+
import { compilePlayback } from "jpfun";
|
|
158
|
+
|
|
159
|
+
const playback = compilePlayback(result.lowering);
|
|
160
|
+
playback.events;
|
|
161
|
+
playback.scoreMap;
|
|
162
|
+
playback.tracks;
|
|
163
|
+
playback.durationSeconds;
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
For scores with unusually large repeat expansion, raise the control-flow budget explicitly:
|
|
167
|
+
|
|
168
|
+
```ts
|
|
169
|
+
const playback = compilePlayback(result.lowering, { maxFlowSteps: 200_000 });
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
The default is 65,536 visited columns. Exceeding it throws instead of returning a partial playback plan.
|
|
173
|
+
|
|
174
|
+
The plan stores device-independent `note-on`, `note-off`, `tempo`, `time-signature`, and `program-change` events. Its track number is the same channel identity used by the visual Track; Web Audio, Web MIDI, and Standard MIDI File adapters consume that identity and the exact `Fraction` timestamps at their boundary.
|
|
175
|
+
|
|
176
|
+
## MIDI JSON Conversion
|
|
177
|
+
|
|
178
|
+
`midiJsonToJpFun` converts the JSON returned by madderscientist's [`midi.js`](https://madderscientist.github.io/noteDigger/lib/midi.js) `JSON()` method into jpFun source. MIDI byte parsing stays in the application boundary; the core converter only consumes structured data and has no runtime dependency on a MIDI parser.
|
|
179
|
+
|
|
180
|
+
```ts
|
|
181
|
+
import { midiJsonToJpFun } from "jpfun";
|
|
182
|
+
|
|
183
|
+
const source = midiJsonToJpFun(parsedMidiJson, {
|
|
184
|
+
title: "My Score",
|
|
185
|
+
alignRate: 4,
|
|
186
|
+
barsPerLine: 0,
|
|
187
|
+
});
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
`pitchMode` defaults to `"absolute"`; use `"relative"` for C-based numbered notation. `alignRate` controls adaptive binary quantization. Equal start/end groups become `@up` chords, overlapping lanes become `@stack`, and separate MIDI tracks become named voices. `barsPerLine` defaults to `0`; non-positive values select measured automatic breaks, while a positive value fixes the measures per system. `title` overrides the MIDI header name.
|
|
191
|
+
|
|
192
|
+
With classic scripts, measured automatic breaks require `jpfun.core.min.js`; a positive `barsPerLine` lets `jpfun.from-midi.min.js` run independently.
|
|
193
|
+
|
|
194
|
+
The converter preserves notes, track names, tempo, time signatures, and MIDI programs, and recognizes standard 3:2 quarter-, eighth-, and sixteenth-note triplets. Other tuplets are unsupported. Percussion channel 10 is skipped; velocity, control changes, pitch bends, lyrics, and other MIDI metadata are ignored. Time-signature changes snap to measure boundaries, and continuations that cannot use `-` are emitted as tied notes.
|
|
195
|
+
|
|
196
|
+
## MusicXML Conversion
|
|
197
|
+
|
|
198
|
+
`musicXmlToJpFun` converts a parsed MusicXML root element into jpFun source. XML parsing stays at the application boundary, so the core package has no XML parser dependency. In a browser, use the native `DOMParser`:
|
|
199
|
+
|
|
200
|
+
```ts
|
|
201
|
+
import { musicXmlToJpFun } from "jpfun";
|
|
202
|
+
|
|
203
|
+
const xml = await file.text();
|
|
204
|
+
const document = new DOMParser().parseFromString(xml, "application/xml");
|
|
205
|
+
if (document.querySelector("parsererror")) throw new SyntaxError("Invalid MusicXML");
|
|
206
|
+
|
|
207
|
+
const source = musicXmlToJpFun(document.documentElement, {
|
|
208
|
+
barsPerLine: 4,
|
|
209
|
+
});
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
In Node.js, use any DOM implementation and pass a compatible root element. The converter supports partwise and timewise scores, parts/staves/voices, exact durations, rests, chords, arpeggios, grace notes, ties, tuplets, lyrics, score state, dynamics, repeats/endings, and basic system, page, and title metadata. `pitchMode` defaults to `"absolute"`; `"relative"` uses the active MusicXML key. Generated source uses compact jpFun syntax where unambiguous.
|
|
213
|
+
|
|
214
|
+
Compressed `.mxl` archives are unsupported. Decompress them first or export `.musicxml`. Percussion channel 10 is skipped; pedal, cross-staff arpeggio grouping, detailed engraving coordinates, and other control information are ignored.
|
|
85
215
|
|
|
86
216
|
## Syntax Example
|
|
87
217
|
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MIDI JSON -> jpFun 的转换流水线:
|
|
3
|
+
* 1. 校验输入,选择足以表达原时值的二进制精度;
|
|
4
|
+
* 2. 在原始 tick 上识别 3:2 三连音,再把其余音符量化到二进制网格;
|
|
5
|
+
* 3. 合并同起止音为和弦,把重叠内容拆到不同 lane;
|
|
6
|
+
* 4. 生成单行源码,以真实自然排版宽度选择换行点;
|
|
7
|
+
* 5. 重新生成最终源码,并用 tie 表达跨小节或不足一拍的持续音。
|
|
8
|
+
*
|
|
9
|
+
* MIDI 字节解析不属于 core;这里接收的是 midi.js 已解析好的 JSON。
|
|
10
|
+
*/
|
|
11
|
+
import type { MidiJson } from "./json.js";
|
|
12
|
+
import { type PitchMode } from "../source.js";
|
|
13
|
+
export type * from "./json.js";
|
|
14
|
+
export interface MidiToJpFunOptions {
|
|
15
|
+
pitchMode?: PitchMode;
|
|
16
|
+
alignRate?: number;
|
|
17
|
+
barsPerLine?: number;
|
|
18
|
+
title?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface MidiLayoutCapability {
|
|
21
|
+
compileScore: (source: string) => {
|
|
22
|
+
layout: {
|
|
23
|
+
objects: {
|
|
24
|
+
T: {
|
|
25
|
+
isZero(): boolean;
|
|
26
|
+
};
|
|
27
|
+
t: {
|
|
28
|
+
toNumber(): number;
|
|
29
|
+
};
|
|
30
|
+
layoutLine: number;
|
|
31
|
+
mergeKey: number;
|
|
32
|
+
box: {
|
|
33
|
+
x: number;
|
|
34
|
+
w: number;
|
|
35
|
+
};
|
|
36
|
+
}[];
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
anchorKey: number;
|
|
40
|
+
page: {
|
|
41
|
+
width: number;
|
|
42
|
+
marginLeft: number;
|
|
43
|
+
marginRight: number;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* 公开转换入口。options 只控制表示方式;量化后的 track/note 仍保留原始字段,
|
|
48
|
+
* 方便后续加入力度、乐器和踏板时直接扩展现有时间线。
|
|
49
|
+
*/
|
|
50
|
+
export declare function convertMidiJsonToJpFun(input: MidiJson, options?: MidiToJpFunOptions, layoutCapability?: MidiLayoutCapability): string;
|