@sudobility/music_types 0.13.24 → 0.13.26
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/dist/domain/instruments/instrument-menus.d.ts +55 -0
- package/dist/domain/instruments/instrument-menus.d.ts.map +1 -0
- package/dist/domain/instruments/instrument-menus.js +52 -0
- package/dist/domain/instruments/instrument-menus.js.map +1 -0
- package/dist/domain/instruments/instrument-reference.d.ts +26 -0
- package/dist/domain/instruments/instrument-reference.d.ts.map +1 -0
- package/dist/domain/instruments/instrument-reference.js +40 -0
- package/dist/domain/instruments/instrument-reference.js.map +1 -0
- package/dist/domain/notation/field-values.d.ts +120 -0
- package/dist/domain/notation/field-values.d.ts.map +1 -0
- package/dist/domain/notation/field-values.js +135 -0
- package/dist/domain/notation/field-values.js.map +1 -0
- package/dist/domain/notation/music-vocabulary.d.ts +29 -3
- package/dist/domain/notation/music-vocabulary.d.ts.map +1 -1
- package/dist/domain/notation/music-vocabulary.js +21 -1
- package/dist/domain/notation/music-vocabulary.js.map +1 -1
- package/dist/domain/notation/notation-icon-art.d.ts.map +1 -1
- package/dist/domain/notation/notation-icon-art.js +16 -14
- package/dist/domain/notation/notation-icon-art.js.map +1 -1
- package/dist/domain/notation/picker-options.d.ts +28 -1
- package/dist/domain/notation/picker-options.d.ts.map +1 -1
- package/dist/domain/notation/picker-options.js +52 -1
- package/dist/domain/notation/picker-options.js.map +1 -1
- package/dist/domain/notation/toolbar-icons.d.ts +21 -0
- package/dist/domain/notation/toolbar-icons.d.ts.map +1 -0
- package/dist/domain/notation/toolbar-icons.js +18 -0
- package/dist/domain/notation/toolbar-icons.js.map +1 -0
- package/dist/domain/score/community-search.d.ts +32 -0
- package/dist/domain/score/community-search.d.ts.map +1 -1
- package/dist/domain/score/community-search.js +31 -0
- package/dist/domain/score/community-search.js.map +1 -1
- package/dist/domain/score/transport-readouts.d.ts +42 -0
- package/dist/domain/score/transport-readouts.d.ts.map +1 -0
- package/dist/domain/score/transport-readouts.js +45 -0
- package/dist/domain/score/transport-readouts.js.map +1 -0
- package/dist/domain/validation/limits.d.ts +22 -0
- package/dist/domain/validation/limits.d.ts.map +1 -1
- package/dist/domain/validation/limits.js +23 -1
- package/dist/domain/validation/limits.js.map +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The instrument menus, as data both apps draw.
|
|
3
|
+
*
|
|
4
|
+
* `instrument-options.ts` holds the catalogue's pieces — voices, kits, the GM
|
|
5
|
+
* families. The *menus* built from them were written three times: the web's
|
|
6
|
+
* `InstrumentSelectItems`, the native score-setup sheet's flat list and the
|
|
7
|
+
* native Generate Track sheet's flat list, which had already drifted (no voice
|
|
8
|
+
* group). The order is the web's: voices first, because General MIDI files a
|
|
9
|
+
* singer under Ensemble where nobody looks for one; kits next, because a kit
|
|
10
|
+
* is not a program; then the families in catalogue order.
|
|
11
|
+
*/
|
|
12
|
+
import type { Track } from "../../index.js";
|
|
13
|
+
import type { InstrumentOption } from "./instrument-options.js";
|
|
14
|
+
/**
|
|
15
|
+
* One heading and its entries.
|
|
16
|
+
*
|
|
17
|
+
* Exactly one of `labelKey` and `label` is set: the voice and kit headings are
|
|
18
|
+
* this product's words and travel as i18n keys, while a GM family's name is a
|
|
19
|
+
* fixed identifier ("Chromatic Percussion") printed as it is, the way the
|
|
20
|
+
* program names are.
|
|
21
|
+
*/
|
|
22
|
+
export type InstrumentMenuGroup = {
|
|
23
|
+
key: string;
|
|
24
|
+
labelKey: string | null;
|
|
25
|
+
label: string | null;
|
|
26
|
+
options: readonly InstrumentOption[];
|
|
27
|
+
};
|
|
28
|
+
export declare const GENERATION_INSTRUMENT_GROUPS: readonly InstrumentMenuGroup[];
|
|
29
|
+
/**
|
|
30
|
+
* The same menu flattened, for a picker that draws no group headings.
|
|
31
|
+
*
|
|
32
|
+
* A melodic entry carries its family in the label (`Piano · Acoustic Grand
|
|
33
|
+
* Piano`), since the heading that would have said so is gone; voices and kits
|
|
34
|
+
* are named plainly. `voices: false` is the Generate Track list, which adds an
|
|
35
|
+
* accompanying part to a score and does not offer a singer.
|
|
36
|
+
*/
|
|
37
|
+
export declare function generationInstrumentOptionsFlat({ voices, }?: {
|
|
38
|
+
voices?: boolean;
|
|
39
|
+
}): Array<{
|
|
40
|
+
value: string;
|
|
41
|
+
label: string;
|
|
42
|
+
}>;
|
|
43
|
+
/**
|
|
44
|
+
* The instrument picker for a track: which list, which value, which title.
|
|
45
|
+
*
|
|
46
|
+
* A percussion track's program addresses a *kit* — Brush is 40 and program 40
|
|
47
|
+
* is Violin — so it gets the kit list and a `kit:` value; handing a bare
|
|
48
|
+
* program to the kit list matches nothing and renders an empty control.
|
|
49
|
+
*/
|
|
50
|
+
export declare function instrumentPickerFor(track: Pick<Track, "clef" | "midiProgram">): {
|
|
51
|
+
options: readonly InstrumentOption[];
|
|
52
|
+
value: string;
|
|
53
|
+
titleKey: string;
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=instrument-menus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instrument-menus.d.ts","sourceRoot":"","sources":["../../../src/domain/instruments/instrument-menus.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAQ5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAGhE;;;;;;;GAOG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,OAAO,EAAE,SAAS,gBAAgB,EAAE,CAAC;CACtC,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,SAAS,mBAAmB,EAatE,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,+BAA+B,CAAC,EAC9C,MAAa,GACd,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CASrE;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,CAAC,GACzC;IAAE,OAAO,EAAE,SAAS,gBAAgB,EAAE,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAa3E"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { FAMILY_GROUPS, INSTRUMENT_OPTIONS, KIT_OPTIONS, VOICE_OPTIONS, kitOptionValue, } from "./instrument-options.js";
|
|
2
|
+
import { isPercussionTrack } from "./track-instrument.js";
|
|
3
|
+
export const GENERATION_INSTRUMENT_GROUPS = [
|
|
4
|
+
{ key: "voices", labelKey: "generate.voices", label: null, options: VOICE_OPTIONS },
|
|
5
|
+
{ key: "kits", labelKey: "generate.drumKits", label: null, options: KIT_OPTIONS },
|
|
6
|
+
...FAMILY_GROUPS.map((group) => ({
|
|
7
|
+
key: group.key,
|
|
8
|
+
labelKey: null,
|
|
9
|
+
label: group.label,
|
|
10
|
+
options: group.instruments.map((instrument) => ({
|
|
11
|
+
value: String(instrument.program),
|
|
12
|
+
label: instrument.name,
|
|
13
|
+
group: group.label,
|
|
14
|
+
})),
|
|
15
|
+
})),
|
|
16
|
+
];
|
|
17
|
+
/**
|
|
18
|
+
* The same menu flattened, for a picker that draws no group headings.
|
|
19
|
+
*
|
|
20
|
+
* A melodic entry carries its family in the label (`Piano · Acoustic Grand
|
|
21
|
+
* Piano`), since the heading that would have said so is gone; voices and kits
|
|
22
|
+
* are named plainly. `voices: false` is the Generate Track list, which adds an
|
|
23
|
+
* accompanying part to a score and does not offer a singer.
|
|
24
|
+
*/
|
|
25
|
+
export function generationInstrumentOptionsFlat({ voices = true, } = {}) {
|
|
26
|
+
return GENERATION_INSTRUMENT_GROUPS.filter((group) => voices || group.key !== "voices").flatMap((group) => group.options.map((option) => ({
|
|
27
|
+
value: option.value,
|
|
28
|
+
label: group.label ? `${group.label} · ${option.label}` : option.label,
|
|
29
|
+
})));
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The instrument picker for a track: which list, which value, which title.
|
|
33
|
+
*
|
|
34
|
+
* A percussion track's program addresses a *kit* — Brush is 40 and program 40
|
|
35
|
+
* is Violin — so it gets the kit list and a `kit:` value; handing a bare
|
|
36
|
+
* program to the kit list matches nothing and renders an empty control.
|
|
37
|
+
*/
|
|
38
|
+
export function instrumentPickerFor(track) {
|
|
39
|
+
if (isPercussionTrack(track)) {
|
|
40
|
+
return {
|
|
41
|
+
options: KIT_OPTIONS,
|
|
42
|
+
value: kitOptionValue(track.midiProgram),
|
|
43
|
+
titleKey: "inspector.drumKit",
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
options: INSTRUMENT_OPTIONS,
|
|
48
|
+
value: String(track.midiProgram),
|
|
49
|
+
titleKey: "generate.instrument",
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=instrument-menus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instrument-menus.js","sourceRoot":"","sources":["../../../src/domain/instruments/instrument-menus.ts"],"names":[],"mappings":"AAYA,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,cAAc,GACf,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAiB1D,MAAM,CAAC,MAAM,4BAA4B,GAAmC;IAC1E,EAAE,GAAG,EAAE,QAAQ,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0C;IAE1C,IAAI,iBAAiB,CAAC,KAAK,CAAC,EAAE,CAAC;QAC7B,OAAO;YACL,OAAO,EAAE,WAAW;YACpB,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,WAAW,CAAC;YACxC,QAAQ,EAAE,mBAAmB;SAC9B,CAAC;IACJ,CAAC;IACD,OAAO;QACL,OAAO,EAAE,kBAAkB;QAC3B,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC;QAChC,QAAQ,EAAE,qBAAqB;KAChC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { GmFamily } from "./gm.js";
|
|
2
|
+
import type { InstrumentBasis } from "./gm-catalogue.js";
|
|
3
|
+
export type GmInstrumentRow = {
|
|
4
|
+
program: number;
|
|
5
|
+
name: string;
|
|
6
|
+
family: GmFamily;
|
|
7
|
+
/** The family's fixed GM name. */
|
|
8
|
+
familyLabel: string;
|
|
9
|
+
/** Sounding compass, `E3–D6`, accidentals as `♯`/`♭`. */
|
|
10
|
+
range: string;
|
|
11
|
+
/** Notes at once; `null` for unlimited, which the app words. */
|
|
12
|
+
polyphony: number | null;
|
|
13
|
+
/** Semitones sounding-to-written, signed (`+2`), or `—` for none. */
|
|
14
|
+
transposition: string;
|
|
15
|
+
basis: InstrumentBasis;
|
|
16
|
+
/** `docs.instruments.basis.<basis>`. */
|
|
17
|
+
basisKey: string;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* The catalogue filtered by what was typed, formatted.
|
|
21
|
+
*
|
|
22
|
+
* Matches a name case-insensitively and by substring, a program number
|
|
23
|
+
* exactly, or a family key by substring — the web table's rule.
|
|
24
|
+
*/
|
|
25
|
+
export declare function gmInstrumentRows(query: string): GmInstrumentRow[];
|
|
26
|
+
//# sourceMappingURL=instrument-reference.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instrument-reference.d.ts","sourceRoot":"","sources":["../../../src/domain/instruments/instrument-reference.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,QAAQ,CAAC;IACjB,kCAAkC;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,yDAAyD;IACzD,KAAK,EAAE,MAAM,CAAC;IACd,gEAAgE;IAChE,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,qEAAqE;IACrE,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,eAAe,CAAC;IACvB,wCAAwC;IACxC,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAeF;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,eAAe,EAAE,CAuBjE"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { midiToPitch } from "../pitch/pitch.js";
|
|
2
|
+
import { GM_FAMILY_LABELS } from "./gm.js";
|
|
3
|
+
import { GM_CATALOGUE, UNLIMITED_POLYPHONY } from "./gm-catalogue.js";
|
|
4
|
+
const SIGN = {
|
|
5
|
+
[-2]: "𝄫",
|
|
6
|
+
[-1]: "♭",
|
|
7
|
+
[0]: "",
|
|
8
|
+
[1]: "♯",
|
|
9
|
+
[2]: "𝄪",
|
|
10
|
+
};
|
|
11
|
+
function noteName(midi) {
|
|
12
|
+
const pitch = midiToPitch(midi);
|
|
13
|
+
return `${pitch.step}${SIGN[pitch.accidental]}${pitch.octave}`;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The catalogue filtered by what was typed, formatted.
|
|
17
|
+
*
|
|
18
|
+
* Matches a name case-insensitively and by substring, a program number
|
|
19
|
+
* exactly, or a family key by substring — the web table's rule.
|
|
20
|
+
*/
|
|
21
|
+
export function gmInstrumentRows(query) {
|
|
22
|
+
const needle = query.trim().toLowerCase();
|
|
23
|
+
return GM_CATALOGUE.filter((spec) => needle.length === 0 ||
|
|
24
|
+
spec.name.toLowerCase().includes(needle) ||
|
|
25
|
+
String(spec.program) === needle ||
|
|
26
|
+
spec.family.includes(needle)).map((spec) => ({
|
|
27
|
+
program: spec.program,
|
|
28
|
+
name: spec.name,
|
|
29
|
+
family: spec.family,
|
|
30
|
+
familyLabel: GM_FAMILY_LABELS[spec.family],
|
|
31
|
+
range: `${noteName(spec.range.min)}–${noteName(spec.range.max)}`,
|
|
32
|
+
polyphony: spec.maxPolyphony === UNLIMITED_POLYPHONY ? null : spec.maxPolyphony,
|
|
33
|
+
transposition: spec.writtenTransposition === 0
|
|
34
|
+
? "—"
|
|
35
|
+
: `${spec.writtenTransposition > 0 ? "+" : ""}${spec.writtenTransposition}`,
|
|
36
|
+
basis: spec.basis,
|
|
37
|
+
basisKey: `docs.instruments.basis.${spec.basis}`,
|
|
38
|
+
}));
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=instrument-reference.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instrument-reference.js","sourceRoot":"","sources":["../../../src/domain/instruments/instrument-reference.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAoBtE,MAAM,IAAI,GAAwC;IAChD,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI;IACV,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG;IACT,CAAC,CAAC,CAAC,EAAE,EAAE;IACP,CAAC,CAAC,CAAC,EAAE,GAAG;IACR,CAAC,CAAC,CAAC,EAAE,IAAI;CACV,CAAC;AAEF,SAAS,QAAQ,CAAC,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AC,EAAE,GAAG,IAAI,CAAC,oBAAoB,EAAE;QAC/E,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,QAAQ,EAAE,0BAA0B,IAAI,CAAC,KAAK,EAAE;KACjD,CAAC,CAAC,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a property field does with what it is given.
|
|
3
|
+
*
|
|
4
|
+
* Every inspector field in both apps takes a draft string, turns it into a
|
|
5
|
+
* number, bounds it and writes it — and each app had written those steps
|
|
6
|
+
* inline, per field, per panel. They disagreed in small ways nobody chose: the
|
|
7
|
+
* web rounded a typed tempo and the native panel did not, the native octave
|
|
8
|
+
* field clamped to -1..9 and the web one did not clamp at all, and the pickup
|
|
9
|
+
* list was built from the same arithmetic in two files. The rules are facts
|
|
10
|
+
* about the fields rather than about either panel, so they are stated once.
|
|
11
|
+
*
|
|
12
|
+
* No hooks, no strings a translator would touch — each function takes a value
|
|
13
|
+
* and answers with a value or a key-free structure the app labels itself.
|
|
14
|
+
*/
|
|
15
|
+
import type { DurationName, Measure, Score } from "../../index.js";
|
|
16
|
+
/** Bounds for `parseNumericDraft`; every one is optional. */
|
|
17
|
+
export type NumericDraftOptions = {
|
|
18
|
+
min?: number;
|
|
19
|
+
max?: number;
|
|
20
|
+
/** Round to a whole number before bounding. */
|
|
21
|
+
integer?: boolean;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* A draft field's text as a number, or `null` when there is nothing to commit.
|
|
25
|
+
*
|
|
26
|
+
* Blank is `null` rather than 0: a field emptied and left is "no change", and
|
|
27
|
+
* `Number("")` being 0 is how an emptied velocity field used to write silence.
|
|
28
|
+
* Out-of-range input is clamped rather than refused, because a typed "200" in
|
|
29
|
+
* a 0-127 field means "as loud as it goes".
|
|
30
|
+
*/
|
|
31
|
+
export declare function parseNumericDraft(text: string, options?: NumericDraftOptions): number | null;
|
|
32
|
+
/**
|
|
33
|
+
* A tempo as it may be stored: whole, and inside the validator's bounds.
|
|
34
|
+
*
|
|
35
|
+
* Whole because a tempo the transport rounds for display but stores
|
|
36
|
+
* unrounded reads back differently the next time the field is opened. A
|
|
37
|
+
* non-number gives the default tempo; callers parse with `parseNumericDraft`
|
|
38
|
+
* first and should never get here with one.
|
|
39
|
+
*/
|
|
40
|
+
export declare function clampBpm(bpm: number): number;
|
|
41
|
+
/**
|
|
42
|
+
* The tempo at a bar, and whether the bar itself sets it.
|
|
43
|
+
*
|
|
44
|
+
* `bpm` is the tempo **in force** — the last event at or before the bar's
|
|
45
|
+
* start — so the field is never blank and never lies; unrounded, since the
|
|
46
|
+
* display rounds and the commit clamps. `ownEventId` names the event this bar
|
|
47
|
+
* sets, which is the only one a Remove control may offer to delete.
|
|
48
|
+
* `isStarting` is true when that event is the score's first (earliest-tick)
|
|
49
|
+
* one: the opening tempo is not a *change*, and removing it would leave the
|
|
50
|
+
* score with no tempo at all.
|
|
51
|
+
*/
|
|
52
|
+
export type BarTempo = {
|
|
53
|
+
bpm: number;
|
|
54
|
+
ownEventId: string | null;
|
|
55
|
+
isStarting: boolean;
|
|
56
|
+
};
|
|
57
|
+
export declare function tempoAtBar(score: Score, measure: Measure): BarTempo;
|
|
58
|
+
/**
|
|
59
|
+
* The pickup picker's current value and the lengths it offers, in beats.
|
|
60
|
+
*
|
|
61
|
+
* Beats because "a one-beat pickup" is how a musician says it; the ticks
|
|
62
|
+
* follow from the time signature, so compound time counts dotted beats. The
|
|
63
|
+
* list stops one beat short of the bar — a pickup as long as the bar is just a
|
|
64
|
+
* bar — but always offers at least one beat.
|
|
65
|
+
*/
|
|
66
|
+
export declare function pickupBeatOptions(measure: Measure, ppq: number): {
|
|
67
|
+
current: string;
|
|
68
|
+
beats: number[];
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* A volta's pass numbers from what was typed: `"1, 2"` is a bar played on both
|
|
72
|
+
* passes. Anything that is not a positive whole number is dropped rather than
|
|
73
|
+
* refused — an unparseable entry clears the bracket instead of storing one
|
|
74
|
+
* nobody asked for.
|
|
75
|
+
*/
|
|
76
|
+
export declare function parseEndingNumbers(text: string): number[];
|
|
77
|
+
/** The inverse of `parseEndingNumbers`, for seeding the field. */
|
|
78
|
+
export declare function formatEndingNumbers(numbers: readonly number[] | undefined): string;
|
|
79
|
+
/**
|
|
80
|
+
* What the duration picker shows for a selection.
|
|
81
|
+
*
|
|
82
|
+
* Three states and not two, which is what the native panel got wrong: a
|
|
83
|
+
* selection whose notes agree on a length no notehead spells is one *custom*
|
|
84
|
+
* length, not a *mixed* selection, and the two read differently. `null` for
|
|
85
|
+
* an empty selection, which shows no field.
|
|
86
|
+
*/
|
|
87
|
+
export type DurationFieldState = {
|
|
88
|
+
kind: "name";
|
|
89
|
+
name: DurationName;
|
|
90
|
+
ticks: number;
|
|
91
|
+
} | {
|
|
92
|
+
kind: "custom";
|
|
93
|
+
ticks: number;
|
|
94
|
+
} | {
|
|
95
|
+
kind: "mixed";
|
|
96
|
+
};
|
|
97
|
+
export declare function durationFieldState(notes: ReadonlyArray<{
|
|
98
|
+
durationTicks: number;
|
|
99
|
+
}>, ppq: number): DurationFieldState | null;
|
|
100
|
+
/**
|
|
101
|
+
* A beat for an editable position field: at most two decimals, none on a whole
|
|
102
|
+
* beat. A swung eighth is beat 2.5 and must stay stateable exactly; a triplet
|
|
103
|
+
* is 1.33 rather than 1.3333333333333333, which read as noise.
|
|
104
|
+
*/
|
|
105
|
+
export declare function formatBeatForField(beat: number): string;
|
|
106
|
+
/**
|
|
107
|
+
* The resolution a mixer control moves in.
|
|
108
|
+
*
|
|
109
|
+
* Both sliders already stepped by 0.01; a value committed off-grid — from a
|
|
110
|
+
* drag's float arithmetic — was stored as 0.07000000001 and round-tripped
|
|
111
|
+
* through the project that way.
|
|
112
|
+
*/
|
|
113
|
+
export declare const MIX_STEP = 0.01;
|
|
114
|
+
/** A value snapped onto `MIX_STEP`, without float noise. */
|
|
115
|
+
export declare function quantizeMix(value: number): number;
|
|
116
|
+
/** A track volume inside 0-1. A non-number is silence, never full level. */
|
|
117
|
+
export declare function clampVolume(value: number): number;
|
|
118
|
+
/** A pan position inside -1..1. A non-number is the centre. */
|
|
119
|
+
export declare function clampPan(value: number): number;
|
|
120
|
+
//# sourceMappingURL=field-values.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field-values.d.ts","sourceRoot":"","sources":["../../../src/domain/notation/field-values.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EACV,YAAY,EACZ,OAAO,EACP,KAAK,EAEN,MAAM,gBAAgB,CAAC;AASxB,6DAA6D;AAC7D,MAAM,MAAM,mBAAmB,GAAG;IAChC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,+CAA+C;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,mBAAwB,GAChC,MAAM,GAAG,IAAI,CASf;AAED;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAG5C;AAID;;;;;;;;;;GAUG;AACH,MAAM,MAAM,QAAQ,GAAG;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,wBAAgB,UAAU,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,GAAG,QAAQ,CAcnE;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,MAAM,GACV;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAA;CAAE,CAStC;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAOzD;AAED,kEAAkE;AAClE,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,GACrC,MAAM,CAER;AAID;;;;;;;GAOG;AACH,MAAM,MAAM,kBAAkB,GAC1B;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,YAAY,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACnD;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACjC;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC;AAEtB,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,aAAa,CAAC;IAAE,aAAa,EAAE,MAAM,CAAA;CAAE,CAAC,EAC/C,GAAG,EAAE,MAAM,GACV,kBAAkB,GAAG,IAAI,CAM3B;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEvD;AAID;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,OAAO,CAAC;AAE7B,4DAA4D;AAC5D,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGjD;AAED,4EAA4E;AAC5E,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGjD;AAED,+DAA+D;AAC/D,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAG9C"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { DEFAULT_BPM } from "../score/defaults.js";
|
|
2
|
+
import { commonValue } from "../score/common-value.js";
|
|
3
|
+
import { beatDurationTicks, durationNameForTicks } from "../time/ticks.js";
|
|
4
|
+
import { MAX_BPM, MIN_BPM } from "../validation/limits.js";
|
|
5
|
+
import { NO_PICKUP } from "./picker-options.js";
|
|
6
|
+
/**
|
|
7
|
+
* A draft field's text as a number, or `null` when there is nothing to commit.
|
|
8
|
+
*
|
|
9
|
+
* Blank is `null` rather than 0: a field emptied and left is "no change", and
|
|
10
|
+
* `Number("")` being 0 is how an emptied velocity field used to write silence.
|
|
11
|
+
* Out-of-range input is clamped rather than refused, because a typed "200" in
|
|
12
|
+
* a 0-127 field means "as loud as it goes".
|
|
13
|
+
*/
|
|
14
|
+
export function parseNumericDraft(text, options = {}) {
|
|
15
|
+
const trimmed = text.trim();
|
|
16
|
+
if (trimmed === "")
|
|
17
|
+
return null;
|
|
18
|
+
let value = Number(trimmed);
|
|
19
|
+
if (!Number.isFinite(value))
|
|
20
|
+
return null;
|
|
21
|
+
if (options.integer)
|
|
22
|
+
value = Math.round(value);
|
|
23
|
+
if (options.min !== undefined)
|
|
24
|
+
value = Math.max(options.min, value);
|
|
25
|
+
if (options.max !== undefined)
|
|
26
|
+
value = Math.min(options.max, value);
|
|
27
|
+
return value;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* A tempo as it may be stored: whole, and inside the validator's bounds.
|
|
31
|
+
*
|
|
32
|
+
* Whole because a tempo the transport rounds for display but stores
|
|
33
|
+
* unrounded reads back differently the next time the field is opened. A
|
|
34
|
+
* non-number gives the default tempo; callers parse with `parseNumericDraft`
|
|
35
|
+
* first and should never get here with one.
|
|
36
|
+
*/
|
|
37
|
+
export function clampBpm(bpm) {
|
|
38
|
+
if (!Number.isFinite(bpm))
|
|
39
|
+
return DEFAULT_BPM;
|
|
40
|
+
return Math.min(MAX_BPM, Math.max(MIN_BPM, Math.round(bpm)));
|
|
41
|
+
}
|
|
42
|
+
export function tempoAtBar(score, measure) {
|
|
43
|
+
const sorted = [...score.tempoMap].sort((a, b) => a.tick - b.tick);
|
|
44
|
+
let inForce;
|
|
45
|
+
for (const event of sorted) {
|
|
46
|
+
if (event.tick <= measure.startTick)
|
|
47
|
+
inForce = event;
|
|
48
|
+
}
|
|
49
|
+
const own = sorted.find((event) => event.tick === measure.startTick);
|
|
50
|
+
return {
|
|
51
|
+
bpm: inForce?.bpm ?? DEFAULT_BPM,
|
|
52
|
+
ownEventId: own?.id ?? null,
|
|
53
|
+
isStarting: own !== undefined && sorted[0]?.id === own.id,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* The pickup picker's current value and the lengths it offers, in beats.
|
|
58
|
+
*
|
|
59
|
+
* Beats because "a one-beat pickup" is how a musician says it; the ticks
|
|
60
|
+
* follow from the time signature, so compound time counts dotted beats. The
|
|
61
|
+
* list stops one beat short of the bar — a pickup as long as the bar is just a
|
|
62
|
+
* bar — but always offers at least one beat.
|
|
63
|
+
*/
|
|
64
|
+
export function pickupBeatOptions(measure, ppq) {
|
|
65
|
+
const beatTicks = beatDurationTicks(measure.timeSignature, ppq);
|
|
66
|
+
const fullBeats = Math.max(1, Math.round(measure.durationTicks / beatTicks));
|
|
67
|
+
return {
|
|
68
|
+
current: measure.pickup
|
|
69
|
+
? String(Math.round(measure.durationTicks / beatTicks))
|
|
70
|
+
: NO_PICKUP,
|
|
71
|
+
beats: Array.from({ length: Math.max(1, fullBeats - 1) }, (_, i) => i + 1),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* A volta's pass numbers from what was typed: `"1, 2"` is a bar played on both
|
|
76
|
+
* passes. Anything that is not a positive whole number is dropped rather than
|
|
77
|
+
* refused — an unparseable entry clears the bracket instead of storing one
|
|
78
|
+
* nobody asked for.
|
|
79
|
+
*/
|
|
80
|
+
export function parseEndingNumbers(text) {
|
|
81
|
+
return text
|
|
82
|
+
.split(",")
|
|
83
|
+
.map((part) => part.trim())
|
|
84
|
+
.filter((part) => part !== "")
|
|
85
|
+
.map(Number)
|
|
86
|
+
.filter((n) => Number.isInteger(n) && n > 0);
|
|
87
|
+
}
|
|
88
|
+
/** The inverse of `parseEndingNumbers`, for seeding the field. */
|
|
89
|
+
export function formatEndingNumbers(numbers) {
|
|
90
|
+
return (numbers ?? []).join(", ");
|
|
91
|
+
}
|
|
92
|
+
export function durationFieldState(notes, ppq) {
|
|
93
|
+
if (notes.length === 0)
|
|
94
|
+
return null;
|
|
95
|
+
const ticks = commonValue(notes.map((note) => note.durationTicks));
|
|
96
|
+
if (ticks === null)
|
|
97
|
+
return { kind: "mixed" };
|
|
98
|
+
const name = durationNameForTicks(ticks, ppq);
|
|
99
|
+
return name ? { kind: "name", name, ticks } : { kind: "custom", ticks };
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* A beat for an editable position field: at most two decimals, none on a whole
|
|
103
|
+
* beat. A swung eighth is beat 2.5 and must stay stateable exactly; a triplet
|
|
104
|
+
* is 1.33 rather than 1.3333333333333333, which read as noise.
|
|
105
|
+
*/
|
|
106
|
+
export function formatBeatForField(beat) {
|
|
107
|
+
return String(Math.round(beat * 100) / 100);
|
|
108
|
+
}
|
|
109
|
+
// ---- mixing ----------------------------------------------------------------
|
|
110
|
+
/**
|
|
111
|
+
* The resolution a mixer control moves in.
|
|
112
|
+
*
|
|
113
|
+
* Both sliders already stepped by 0.01; a value committed off-grid — from a
|
|
114
|
+
* drag's float arithmetic — was stored as 0.07000000001 and round-tripped
|
|
115
|
+
* through the project that way.
|
|
116
|
+
*/
|
|
117
|
+
export const MIX_STEP = 0.01;
|
|
118
|
+
/** A value snapped onto `MIX_STEP`, without float noise. */
|
|
119
|
+
export function quantizeMix(value) {
|
|
120
|
+
const steps = Math.round(1 / MIX_STEP);
|
|
121
|
+
return Math.round(value * steps) / steps;
|
|
122
|
+
}
|
|
123
|
+
/** A track volume inside 0-1. A non-number is silence, never full level. */
|
|
124
|
+
export function clampVolume(value) {
|
|
125
|
+
if (!Number.isFinite(value))
|
|
126
|
+
return 0;
|
|
127
|
+
return Math.min(1, Math.max(0, value));
|
|
128
|
+
}
|
|
129
|
+
/** A pan position inside -1..1. A non-number is the centre. */
|
|
130
|
+
export function clampPan(value) {
|
|
131
|
+
if (!Number.isFinite(value))
|
|
132
|
+
return 0;
|
|
133
|
+
return Math.min(1, Math.max(-1, value));
|
|
134
|
+
}
|
|
135
|
+
//# sourceMappingURL=field-values.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field-values.js","sourceRoot":"","sources":["../../../src/domain/notation/field-values.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAYhD;;;;;;;GAOG;AACH,MAAM,UAAU,iBAAiB,CAC/B,IAAY,EACZ,UAA+B,EAAE;IAEjC,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;IAC5B,IAAI,OAAO,KAAK,EAAE;QAAE,OAAO,IAAI,CAAC;IAChC,IAAI,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;IAC5B,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACzC,IAAI,OAAO,CAAC,OAAO;QAAE,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC/C,IAAI,OAAO,CAAC,GAAG,KAAK,SAAS;QAAE,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IACpE,IAAI,OAAO,CAAC,GAAG,KAAK,SAAS;QAAE,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IACpE,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,QAAQ,CAAC,GAAW;IAClC,IAAI,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G,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;AAC1C,CAAC"}
|
|
@@ -23,11 +23,30 @@ export declare function durationLabel(name: DurationName): string;
|
|
|
23
23
|
export declare function accidentalCountLabel(fifths: number): string;
|
|
24
24
|
/** e.g. `D major`. Falls back to the fifths count for a signature outside ±7. */
|
|
25
25
|
export declare function keySignatureName(key: KeySignature): string;
|
|
26
|
-
/**
|
|
27
|
-
export
|
|
26
|
+
/** One entry of the key picker. */
|
|
27
|
+
export type KeySignatureOption = {
|
|
28
28
|
fifths: number;
|
|
29
|
+
/**
|
|
30
|
+
* The English label, `D major — 2 sharps`. Kept for callers that have not
|
|
31
|
+
* moved to the parts below; an app that translates should not show it.
|
|
32
|
+
*/
|
|
29
33
|
label: string;
|
|
30
|
-
|
|
34
|
+
/** The tonic as written, `F♯` — a note name, the same in every locale. */
|
|
35
|
+
tonic: string;
|
|
36
|
+
/** How many sharps or flats, without the sign. */
|
|
37
|
+
accidentalCount: number;
|
|
38
|
+
/** Which of the two, or `none` for C major / A minor. */
|
|
39
|
+
accidentalKind: "sharp" | "flat" | "none";
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Every key a picker should offer, from seven flats to seven sharps.
|
|
43
|
+
*
|
|
44
|
+
* The tonic and the count come apart as well as together: `major`, `minor`
|
|
45
|
+
* and "2 sharps" are words a translator owns, so an app builds its own label
|
|
46
|
+
* from `tonic`, `KEY_MODE_OPTIONS`' key and the count — the web inspector used
|
|
47
|
+
* to print the English label straight into a Chinese build.
|
|
48
|
+
*/
|
|
49
|
+
export declare function keySignatureOptions(mode: KeySignature["mode"]): KeySignatureOption[];
|
|
31
50
|
/**
|
|
32
51
|
* Where `tick` falls, counted the way a player counts: bar 1 upwards, beat 1
|
|
33
52
|
* upwards, with a fraction when it lands between beats.
|
|
@@ -102,6 +121,13 @@ export declare function pitchAtStavePosition(clef: Clef, positionsBelowTopLine:
|
|
|
102
121
|
* moment to stop transcribing.
|
|
103
122
|
*/
|
|
104
123
|
export declare function panReadout(value: number): string;
|
|
124
|
+
/**
|
|
125
|
+
* A volume level as a percentage, `80%`, clamped to the fader's 0-1 range.
|
|
126
|
+
*
|
|
127
|
+
* Beside `panReadout` for the same reason: both apps print this beside the
|
|
128
|
+
* same volume row, and each had written `Math.round(clamped * 100)` inline.
|
|
129
|
+
*/
|
|
130
|
+
export declare function volumeReadout(value: number): string;
|
|
105
131
|
/**
|
|
106
132
|
* How long a song should be, in seconds.
|
|
107
133
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"music-vocabulary.d.ts","sourceRoot":"","sources":["../../../src/domain/notation/music-vocabulary.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EACV,IAAI,EACJ,YAAY,EACZ,YAAY,EACZ,KAAK,EACL,KAAK,EAEN,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"music-vocabulary.d.ts","sourceRoot":"","sources":["../../../src/domain/notation/music-vocabulary.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EACV,IAAI,EACJ,YAAY,EACZ,YAAY,EACZ,KAAK,EACL,KAAK,EAEN,MAAM,gBAAgB,CAAC;AAQxB,2EAA2E;AAC3E,eAAO,MAAM,cAAc,EAA6B,YAAY,EAAE,CAAC;AAuBvE,uCAAuC;AACvC,wBAAgB,aAAa,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,CAExD;AAyCD,sEAAsE;AACtE,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAK3D;AAED,iFAAiF;AACjF,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,YAAY,GAAG,MAAM,CAI1D;AAED,mCAAmC;AACnC,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd,0EAA0E;I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,MAAM,EACf,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,MAAM;AACnB;;;;;;;GAOG;AACH,SAAS,SAAI,GACZ,MAAM,CAKR"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { DURATIONS, beatDurationTicks } from "../time/ticks.js";
|
|
2
2
|
import { barNumberAt, indexOfBarNumber } from "../score/bar-numbers.js";
|
|
3
3
|
import { shiftDiatonic } from "../pitch/transpose.js";
|
|
4
|
+
import { clampVolume } from "./field-values.js";
|
|
4
5
|
// ---- durations -------------------------------------------------------------
|
|
5
6
|
/** Every duration name, longest first, so a picker reads top to bottom. */
|
|
6
7
|
export const DURATION_NAMES = Object.keys(DURATIONS);
|
|
@@ -78,7 +79,14 @@ export function keySignatureName(key) {
|
|
|
78
79
|
const tonic = table[key.fifths];
|
|
79
80
|
return tonic ? `${tonic} ${key.mode}` : `${key.fifths} fifths`;
|
|
80
81
|
}
|
|
81
|
-
/**
|
|
82
|
+
/**
|
|
83
|
+
* Every key a picker should offer, from seven flats to seven sharps.
|
|
84
|
+
*
|
|
85
|
+
* The tonic and the count come apart as well as together: `major`, `minor`
|
|
86
|
+
* and "2 sharps" are words a translator owns, so an app builds its own label
|
|
87
|
+
* from `tonic`, `KEY_MODE_OPTIONS`' key and the count — the web inspector used
|
|
88
|
+
* to print the English label straight into a Chinese build.
|
|
89
|
+
*/
|
|
82
90
|
export function keySignatureOptions(mode) {
|
|
83
91
|
const table = mode === "minor" ? MINOR_KEYS : MAJOR_KEYS;
|
|
84
92
|
return Object.keys(table)
|
|
@@ -87,6 +95,9 @@ export function keySignatureOptions(mode) {
|
|
|
87
95
|
.map((fifths) => ({
|
|
88
96
|
fifths,
|
|
89
97
|
label: `${table[fifths]} ${mode} — ${accidentalCountLabel(fifths)}`,
|
|
98
|
+
tonic: table[fifths],
|
|
99
|
+
accidentalCount: Math.abs(fifths),
|
|
100
|
+
accidentalKind: fifths > 0 ? "sharp" : fifths < 0 ? "flat" : "none",
|
|
90
101
|
}));
|
|
91
102
|
}
|
|
92
103
|
export function barBeatForTick(score, tick) {
|
|
@@ -218,6 +229,15 @@ export function panReadout(value) {
|
|
|
218
229
|
return "C";
|
|
219
230
|
return `${value < 0 ? "L" : "R"}${amount}`;
|
|
220
231
|
}
|
|
232
|
+
/**
|
|
233
|
+
* A volume level as a percentage, `80%`, clamped to the fader's 0-1 range.
|
|
234
|
+
*
|
|
235
|
+
* Beside `panReadout` for the same reason: both apps print this beside the
|
|
236
|
+
* same volume row, and each had written `Math.round(clamped * 100)` inline.
|
|
237
|
+
*/
|
|
238
|
+
export function volumeReadout(value) {
|
|
239
|
+
return `${Math.round(clampVolume(value) * 100)}%`;
|
|
240
|
+
}
|
|
221
241
|
/**
|
|
222
242
|
* How long a song should be, in seconds.
|
|
223
243
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"music-vocabulary.js","sourceRoot":"","sources":["../../../src/domain/notation/music-vocabulary.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"music-vocabulary.js","sourceRoot":"","sources":["../../../src/domain/notation/music-vocabulary.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,+EAA+E;AAE/E,2EAA2E;AAC3E,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,CAAmB,CAAC;AAE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