@sudobility/music_types 0.13.5 → 0.13.6
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.
|
@@ -7,7 +7,16 @@
|
|
|
7
7
|
* defend against a bad value from the schema — only against a hand-edited
|
|
8
8
|
* score, which is why `gmInstrument` returns `null` rather than throwing.
|
|
9
9
|
*/
|
|
10
|
-
|
|
10
|
+
/**
|
|
11
|
+
* The sixteen General MIDI families, in program order: family `i` covers
|
|
12
|
+
* programs `i*8 .. i*8+7`.
|
|
13
|
+
*
|
|
14
|
+
* The list is the declaration and the type is read off it, so a family cannot
|
|
15
|
+
* be added to one and missed from the other — this was a union written above
|
|
16
|
+
* the array, which is the same fact stated twice.
|
|
17
|
+
*/
|
|
18
|
+
export declare const GM_FAMILIES: readonly ["piano", "chromatic-percussion", "organ", "guitar", "bass", "strings", "ensemble", "brass", "reed", "pipe", "synth-lead", "synth-pad", "synth-effects", "ethnic", "percussive", "sound-effects"];
|
|
19
|
+
export type GmFamily = (typeof GM_FAMILIES)[number];
|
|
11
20
|
export type GmInstrument = {
|
|
12
21
|
/** 0-127, matching `Track.midiProgram`. */
|
|
13
22
|
program: number;
|
|
@@ -15,8 +24,6 @@ export type GmInstrument = {
|
|
|
15
24
|
name: string;
|
|
16
25
|
family: GmFamily;
|
|
17
26
|
};
|
|
18
|
-
/** In program order: family `i` covers programs `i*8 .. i*8+7`. */
|
|
19
|
-
export declare const GM_FAMILIES: readonly GmFamily[];
|
|
20
27
|
export declare const GM_FAMILY_LABELS: Record<GmFamily, string>;
|
|
21
28
|
/** The family a program belongs to. Arithmetic, because families are runs of eight. */
|
|
22
29
|
export declare function gmFamilyOf(program: number): GmFamily;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gm.d.ts","sourceRoot":"","sources":["../../../src/domain/instruments/gm.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,
|
|
1
|
+
{"version":3,"file":"gm.d.ts","sourceRoot":"","sources":["../../../src/domain/instruments/gm.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,4MAiBd,CAAC;AACX,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpD,MAAM,MAAM,YAAY,GAAG;IACzB,2CAA2C;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,0DAA0D;IAC1D,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,QAAQ,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAiBrD,CAAC;AA0JF,uFAAuF;AACvF,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,QAAQ,CAEpD;AAED,eAAO,MAAM,cAAc,EAAE,SAAS,YAAY,EAMjD,CAAC;AAEF,2DAA2D;AAC3D,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI,CAGjE;AAED,sFAAsF;AACtF,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,QAAQ,GACf,SAAS,YAAY,EAAE,CAEzB"}
|
|
@@ -7,7 +7,14 @@
|
|
|
7
7
|
* defend against a bad value from the schema — only against a hand-edited
|
|
8
8
|
* score, which is why `gmInstrument` returns `null` rather than throwing.
|
|
9
9
|
*/
|
|
10
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* The sixteen General MIDI families, in program order: family `i` covers
|
|
12
|
+
* programs `i*8 .. i*8+7`.
|
|
13
|
+
*
|
|
14
|
+
* The list is the declaration and the type is read off it, so a family cannot
|
|
15
|
+
* be added to one and missed from the other — this was a union written above
|
|
16
|
+
* the array, which is the same fact stated twice.
|
|
17
|
+
*/
|
|
11
18
|
export const GM_FAMILIES = [
|
|
12
19
|
"piano",
|
|
13
20
|
"chromatic-percussion",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gm.js","sourceRoot":"","sources":["../../../src/domain/instruments/gm.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"gm.js","sourceRoot":"","sources":["../../../src/domain/instruments/gm.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,OAAO;IACP,sBAAsB;IACtB,OAAO;IACP,QAAQ;IACR,MAAM;IACN,SAAS;IACT,UAAU;IACV,OAAO;IACP,MAAM;IACN,MAAM;IACN,YAAY;IACZ,WAAW;IACX,eAAe;IACf,QAAQ;IACR,YAAY;IACZ,eAAe;CACP,CAAC;AAWX,MAAM,CAAC,MAAM,gBAAgB,GAA6B;IACxD,KAAK,EAAE,OAAO;IACd,sBAAsB,EAAE,sBAAsB;IAC9C,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,UAAU;IACpB,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,YAAY,EAAE,YAAY;IAC1B,WAAW,EAAE,WAAW;IACxB,eAAe,EAAE,eAAe;IAChC,MAAM,EAAE,QAAQ;IAChB,UAAU,EAAE,YAAY;IACxB,eAAe,EAAE,eAAe;CACjC,CAAC;AAEF;;;;GAIG;AACH,MAAM,QAAQ,GAAsB;IAClC,YAAY;IACZ,sBAAsB;IACtB,uBAAuB;IACvB,sBAAsB;IACtB,kBAAkB;IAClB,kBAAkB;IAClB,kBAAkB;IAClB,aAAa;IACb,UAAU;IACV,4BAA4B;IAC5B,SAAS;IACT,cAAc;IACd,WAAW;IACX,YAAY;IACZ,SAAS;IACT,WAAW;IACX,eAAe;IACf,UAAU;IACV,cAAc;IACd,eAAe;IACf,kBAAkB;IAClB,YAAY;IACZ,cAAc;IACd,YAAY;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S;IACT,QAAQ;IACR,QAAQ;IACR,qBAAqB;IACrB,aAAa;IACb,OAAO;IACP,aAAa;IACb,WAAW;IACX,YAAY;IACZ,aAAa;IACb,YAAY;IACZ,gBAAgB;IAChB,wBAAwB;IACxB,mBAAmB;IACnB,cAAc;IACd,UAAU;IACV,YAAY;IACZ,gBAAgB;IAChB,YAAY;IACZ,UAAU;IACV,SAAS;CACV,CAAC;AAEF,uFAAuF;AACvF,MAAM,UAAU,UAAU,CAAC,OAAe;IACxC,OAAO,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC;AAC9C,CAAC;AAED,MAAM,CAAC,MAAM,cAAc,GAA4B,QAAQ,CAAC,GAAG,CACjE,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC;IAClB,OAAO;IACP,IAAI;IACJ,MAAM,EAAE,UAAU,CAAC,OAAO,CAAC;CAC5B,CAAC,CACH,CAAC;AAEF,2DAA2D;AAC3D,MAAM,UAAU,YAAY,CAAC,OAAe;IAC1C,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,OAAO,GAAG,CAAC,IAAI,OAAO,GAAG,GAAG;QAAE,OAAO,IAAI,CAAC;IAC5E,OAAO,cAAc,CAAC,OAAO,CAAC,CAAC;AACjC,CAAC;AAED,sFAAsF;AACtF,MAAM,UAAU,qBAAqB,CACnC,MAAgB;IAEhB,OAAO,cAAc,CAAC,MAAM,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC;AAC7E,CAAC"}
|
|
@@ -51,7 +51,7 @@ export declare const KIT_OPTIONS: InstrumentOption[];
|
|
|
51
51
|
export declare const INSTRUMENT_OPTIONS: InstrumentOption[];
|
|
52
52
|
/** The same catalogue as nested groups, for a picker that draws its own headings. */
|
|
53
53
|
export declare const FAMILY_GROUPS: {
|
|
54
|
-
key:
|
|
54
|
+
key: "bass" | "pipe" | "piano" | "chromatic-percussion" | "organ" | "guitar" | "strings" | "ensemble" | "brass" | "reed" | "synth-lead" | "synth-pad" | "synth-effects" | "ethnic" | "percussive" | "sound-effects";
|
|
55
55
|
label: string;
|
|
56
56
|
instruments: readonly import("./gm.js").GmInstrument[];
|
|
57
57
|
}[];
|
package/package.json
CHANGED