@r_masseater/i68 0.1.0 → 0.2.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 +65 -5
- package/dist/app-J9_4mtbE.mjs +7 -0
- package/dist/app-J9_4mtbE.mjs.map +1 -0
- package/dist/{cli-CWRZxhv9.mjs → cli-CzV_7HHU.mjs} +3 -3
- package/dist/cli-CzV_7HHU.mjs.map +1 -0
- package/dist/cli.mjs +1 -1
- package/dist/habits.d.mts +72 -0
- package/dist/habits.mjs +98 -0
- package/dist/habits.mjs.map +1 -0
- package/dist/index-5D8Rm7JG.d.mts +48 -0
- package/dist/{index-kobZ-fSv.d.mts → index-DB7buWb9.d.mts} +8 -4
- package/dist/index.d.mts +3 -35
- package/dist/index.mjs +3 -7
- package/dist/mix-facts-CvX18d2q.mjs +6997 -0
- package/dist/mix-facts-CvX18d2q.mjs.map +1 -0
- package/dist/presets.d.mts +36 -0
- package/dist/presets.mjs +802 -0
- package/dist/presets.mjs.map +1 -0
- package/dist/{section-DwA18QK6.mjs → section-C9JQ1-aJ.mjs} +29 -17
- package/dist/section-C9JQ1-aJ.mjs.map +1 -0
- package/dist/style-rules-gR1Cixel.d.mts +132 -0
- package/dist/vite.d.mts +1 -1
- package/package.json +31 -17
- package/skills/lint-songs/SKILL.md +2 -2
- package/skills/use-i68-presets/SKILL.md +57 -0
- package/dist/cli-CWRZxhv9.mjs.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/section-DwA18QK6.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
A linter for `.fumx` songs, configured from `vite.config.ts`.
|
|
4
4
|
|
|
5
|
-
`.fumx` writes music as text, so the habits a composer keeps can be checked like code: notes outside the key, a part above what its singer can reach, two parts clashing a semitone apart. i68 reads each song with [`@r_masseater/
|
|
5
|
+
`.fumx` writes music as text, so the habits a composer keeps can be checked like code: notes outside the key, a part above what its singer can reach, two parts clashing a semitone apart. i68 reads each song with [`@r_masseater/song-format`](https://www.npmjs.com/package/@r_masseater/song-format), runs rules written in TypeScript over its notes, and prints each finding with its file, line and column.
|
|
6
6
|
|
|
7
7
|
```sh
|
|
8
|
-
vp add -D @r_masseater/i68
|
|
8
|
+
vp add -D @r_masseater/i68 effect
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
```ts
|
|
12
12
|
import "@r_masseater/i68/vite";
|
|
13
|
-
import { recommended } from "@r_masseater/i68
|
|
13
|
+
import { recommended } from "@r_masseater/i68/presets";
|
|
14
14
|
import { defineConfig } from "vite-plus";
|
|
15
15
|
|
|
16
16
|
export default defineConfig({
|
|
@@ -26,7 +26,7 @@ vp exec i68 # every .fumx file git tracks
|
|
|
26
26
|
vp exec i68 songs/ # only these paths
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
The official rules live in
|
|
29
|
+
The official rules live in the `@r_masseater/i68/presets` subpath, one preset per concern.
|
|
30
30
|
|
|
31
31
|
## Rules
|
|
32
32
|
|
|
@@ -71,6 +71,66 @@ Directives follow ESLint's: they start the comment, `//` or `/* */`, and separat
|
|
|
71
71
|
|
|
72
72
|
`lint({ root, files, read, config })` lints files through your own `read`. `lintText({ path, text, config })` lints one song held in memory, for editors and tests. Both return diagnostics with `path`, `line`, `column`, `rule`, `severity`, `message` and `detail`.
|
|
73
73
|
|
|
74
|
+
## Presets
|
|
75
|
+
|
|
76
|
+
Pick the presets that match how you write, or take `pop` and `harmony` together with `recommended()`. Every rule warns rather than fails.
|
|
77
|
+
|
|
78
|
+
## pop
|
|
79
|
+
|
|
80
|
+
For songs with a lead vocal. `pop({ ranges, maxLeap, breathSeconds })`.
|
|
81
|
+
|
|
82
|
+
| Rule | What it catches | How to fix it |
|
|
83
|
+
| ----------------- | -------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
|
|
84
|
+
| `pop/out-of-key` | A note outside both the key the section implies and the chord under it, except a short chromatic passing or neighbour note | Move it a semitone, or ignore the line if the borrowed note is intended |
|
|
85
|
+
| `pop/part-range` | A note outside its part's range (melody C3-C6, bass E1-C4 unless set per track) | Move the phrase an octave, or set `ranges` |
|
|
86
|
+
| `pop/melody-leap` | A melody jump over an octave | Make it smaller, or step back the other way right after it |
|
|
87
|
+
| `pop/breath` | A sung line longer than 8 seconds without a rest | Put a short rest in the phrase |
|
|
88
|
+
|
|
89
|
+
## harmony
|
|
90
|
+
|
|
91
|
+
How chords and parts sound together: voicing, spacing and clashes. `harmony()`.
|
|
92
|
+
|
|
93
|
+
| Rule | What it catches | How to fix it |
|
|
94
|
+
| ---------------------------- | ------------------------------------------------------------------------------------ | --------------------------------------------------------- |
|
|
95
|
+
| `harmony/semitone-clash` | Two parts a minor 2nd or minor 9th apart, except a dominant's flat 9th over its bass | Move one of them to a chord note |
|
|
96
|
+
| `harmony/low-interval-limit` | A close interval below the pitch where it turns muddy (a 3rd below C3) | Widen it or move the upper note up an octave |
|
|
97
|
+
| `harmony/crowded-low-mids` | More than 3 notes at once between A2 and B3 | Thin the chord or move notes out of that range |
|
|
98
|
+
| `harmony/chord-above-melody` | A harmony part above the lead melody | Keep the chord below the melody |
|
|
99
|
+
| `harmony/voice-jump` | A chord voice that leaps more than a major 3rd into the next chord | Keep shared notes and move each voice to the nearest note |
|
|
100
|
+
|
|
101
|
+
## classical
|
|
102
|
+
|
|
103
|
+
Common-practice part writing, off unless you add it. `classical()`.
|
|
104
|
+
|
|
105
|
+
| Rule | What it catches | How to fix it |
|
|
106
|
+
| --------------------------------- | ---------------------------------------------------------------- | ------------------------------ |
|
|
107
|
+
| `classical/parallel-perfects` | Melody and bass moving in parallel fifths or octaves | Move one of them the other way |
|
|
108
|
+
| `classical/unresolved-dissonance` | A dissonant melody note on a strong beat that does not step down | Move the next note down a step |
|
|
109
|
+
|
|
110
|
+
## progressions
|
|
111
|
+
|
|
112
|
+
Points out well-known chord progressions so you can see where a song leans on one. `progressions()`.
|
|
113
|
+
|
|
114
|
+
| Rule | What it catches | How to fix it |
|
|
115
|
+
| -------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ |
|
|
116
|
+
| `progressions/named` | Marusa (IVM7 III7 VIm7), Oudou (IV V IIIm VIm), Komuro (VIm IV V I), Canon, ii–V–I and Andalusian | Nothing to fix; change a chord if you do not want that progression |
|
|
117
|
+
|
|
118
|
+
Matching ignores sevenths, so IV V IIIm VIm and IVM7 V7 IIIm7 VIm7 are both Oudou. `PROGRESSIONS` lists them.
|
|
119
|
+
|
|
120
|
+
## bach
|
|
121
|
+
|
|
122
|
+
Compares each chord change with what Bach did in his 370 four-part chorales. `bach()`.
|
|
123
|
+
|
|
124
|
+
| Rule | What it catches | How to fix it |
|
|
125
|
+
| ---------------------- | --------------------------------------------------------------------------------- | -------------------------------------------------------- |
|
|
126
|
+
| `bach/rare-transition` | A chord change that Bach makes less than 3% of the time after the same 1-3 chords | Use one of the chords the detail says Bach usually picks |
|
|
127
|
+
|
|
128
|
+
Chords are read as degrees of the key each section implies, so the table works in any key. Minor keys are read as their relative major. The rule looks at the last 1-3 chords and uses the longest of them that the table has seen at least 8 times. Set `["warn", { share, seen }]` to change both numbers.
|
|
129
|
+
|
|
130
|
+
The table in `src/app/presets/features/check-style/data/bach-chorales.json` holds only counts of chord transitions. `vp run build-style-tables` builds it from the Humdrum kern files of [craigsapp/bach-370-chorales](https://github.com/craigsapp/bach-370-chorales). The scores themselves are not in this package. For another composer, build a `StyleTable` the same way and pass it to `stylePluginOf(table)`.
|
|
131
|
+
|
|
132
|
+
Rules find parts by the `role` of their track (`melody`, `countermelody`, `harmony`, `bass`, `drums`), so give each track a role.
|
|
133
|
+
|
|
74
134
|
## Agent skills
|
|
75
135
|
|
|
76
|
-
The package ships
|
|
136
|
+
The package ships agent skills in `skills/`. Add `permissions: { "@r_masseater/i68": { skills: true } }` to `pnpm-workspace.yaml` and `vp install` links them into the skill directories of your agents.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-J9_4mtbE.mjs","names":[],"sources":["../src/entities/rule/model/define.ts"],"sourcesContent":["import type { Plugin, Rule } from \"#/shared/config/index.ts\";\n\nexport const defineRule = (rule: Rule): Rule => rule;\n\nexport const definePlugin = (plugin: Plugin): Plugin => plugin;\n"],"mappings":";;AAEA,MAAa,cAAc,SAAqB;AAEhD,MAAa,gBAAgB,WAA2B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as runCli$1, n as songPathspecs, o as failedWith, r as lint, s as
|
|
1
|
+
import { c as runCli$1, n as songPathspecs, o as failedWith, r as lint, s as formatDiagnostic, t as i68Section } from "./section-C9JQ1-aJ.mjs";
|
|
2
2
|
// src/app/cli.ts
|
|
3
3
|
const runCli = () => {
|
|
4
4
|
runCli$1({
|
|
@@ -6,10 +6,10 @@ const runCli = () => {
|
|
|
6
6
|
section: i68Section,
|
|
7
7
|
pathspecs: songPathspecs,
|
|
8
8
|
lint,
|
|
9
|
-
format,
|
|
9
|
+
format: formatDiagnostic,
|
|
10
10
|
failWith: failedWith
|
|
11
11
|
});
|
|
12
12
|
};
|
|
13
13
|
export { runCli };
|
|
14
14
|
|
|
15
|
-
//# sourceMappingURL=cli-
|
|
15
|
+
//# sourceMappingURL=cli-CzV_7HHU.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-CzV_7HHU.mjs","names":[],"sources":["../src/app/cli.ts"],"sourcesContent":["import { formatDiagnostic, runCli as runLinter } from \"@masseater.dev/lint-host\";\n\nimport { failedWith } from \"#/shared/lib/errors.ts\";\n\nimport { lint } from \"./lint.ts\";\nimport { i68Section, songPathspecs } from \"./section.ts\";\n\nexport const runCli = (): void => {\n runLinter({\n name: \"i68\",\n section: i68Section,\n pathspecs: songPathspecs,\n lint,\n format: formatDiagnostic,\n failWith: failedWith,\n });\n};\n"],"mappings":";;AAOA,MAAa,eAAqB;CAChC,SAAU;EACR,MAAM;EACN,SAAS;EACT,WAAW;EACX;EACA,QAAQ;EACR,UAAU;CACZ,CAAC;AACH"}
|
package/dist/cli.mjs
CHANGED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { a as StyleRulesSchema, c as subjectKeyOf, d as StyleTable, f as StyleTableSchema, i as StyleRules, l as MixHabit, m as Step, n as HabitKind, o as Subject, r as HabitRule, s as SubjectSchema, t as HABIT_KINDS, u as mixKeyOf } from "./style-rules-gR1Cixel.mjs";
|
|
2
|
+
import { Effect, Schema } from "effect";
|
|
3
|
+
import { Song } from "@r_masseater/song-format";
|
|
4
|
+
import { Sounding } from "@r_masseater/song-format/analysis";
|
|
5
|
+
interface MixPlace {
|
|
6
|
+
readonly bar: number;
|
|
7
|
+
readonly line: number;
|
|
8
|
+
readonly column: number;
|
|
9
|
+
}
|
|
10
|
+
interface MixFact {
|
|
11
|
+
readonly habit: MixHabit;
|
|
12
|
+
readonly place: MixPlace;
|
|
13
|
+
}
|
|
14
|
+
interface StyleSong {
|
|
15
|
+
readonly name: string;
|
|
16
|
+
readonly steps: readonly Step[];
|
|
17
|
+
readonly mix: readonly MixFact[];
|
|
18
|
+
}
|
|
19
|
+
interface HabitLimits {
|
|
20
|
+
readonly songs: number;
|
|
21
|
+
readonly share: number;
|
|
22
|
+
readonly baseline: number;
|
|
23
|
+
readonly seen: number;
|
|
24
|
+
}
|
|
25
|
+
export declare const DEFAULT_LIMITS: HabitLimits;
|
|
26
|
+
interface Place {
|
|
27
|
+
readonly song: string;
|
|
28
|
+
readonly bar: number;
|
|
29
|
+
readonly line: number;
|
|
30
|
+
readonly column: number;
|
|
31
|
+
}
|
|
32
|
+
interface Habit {
|
|
33
|
+
readonly context: string;
|
|
34
|
+
readonly next: string;
|
|
35
|
+
readonly songs: number;
|
|
36
|
+
readonly count: number;
|
|
37
|
+
readonly share: number;
|
|
38
|
+
readonly baselineShare: number;
|
|
39
|
+
readonly evidence: readonly Place[];
|
|
40
|
+
}
|
|
41
|
+
interface HabitInput {
|
|
42
|
+
readonly songs: readonly StyleSong[];
|
|
43
|
+
readonly baseline: StyleTable;
|
|
44
|
+
readonly limits: HabitLimits;
|
|
45
|
+
}
|
|
46
|
+
export declare const habitsOf: ({ songs, baseline, limits }: HabitInput) => readonly Habit[];
|
|
47
|
+
declare const UnreadableSong_base: Schema.Class<UnreadableSong, Schema.TaggedStruct<"UnreadableSong", {
|
|
48
|
+
readonly message: Schema.String;
|
|
49
|
+
}>, import("effect/Cause").YieldableError & {
|
|
50
|
+
readonly brand: unique symbol;
|
|
51
|
+
}>;
|
|
52
|
+
export declare class UnreadableSong extends UnreadableSong_base {}
|
|
53
|
+
interface SongText {
|
|
54
|
+
readonly name: string;
|
|
55
|
+
readonly text: string;
|
|
56
|
+
}
|
|
57
|
+
export declare const styleSongFromText: (args_0: SongText) => Effect.Effect<StyleSong, UnreadableSong, never>;
|
|
58
|
+
interface MixHabitFound {
|
|
59
|
+
readonly habit: MixHabit;
|
|
60
|
+
readonly key: string;
|
|
61
|
+
readonly songs: number;
|
|
62
|
+
readonly count: number;
|
|
63
|
+
readonly evidence: readonly Place[];
|
|
64
|
+
}
|
|
65
|
+
interface MixHabitInput {
|
|
66
|
+
readonly songs: readonly StyleSong[];
|
|
67
|
+
readonly minSongs: number;
|
|
68
|
+
}
|
|
69
|
+
export declare const mixHabitsOf: ({ songs, minSongs }: MixHabitInput) => readonly MixHabitFound[];
|
|
70
|
+
export declare const BACH_TABLE: StyleTable;
|
|
71
|
+
export { HABIT_KINDS, type Habit, type HabitInput, type HabitKind, type HabitLimits, type HabitRule, type MixHabit, type MixHabitFound, type Place, type SongText, type StyleRules, StyleRulesSchema, type StyleSong, type StyleTable, StyleTableSchema, type Subject, SubjectSchema, mixKeyOf, subjectKeyOf };
|
|
72
|
+
//# sourceMappingURL=habits.d.mts.map
|
package/dist/habits.mjs
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { a as StyleRulesSchema, c as mixKeyOf, d as bach_chorales_default, f as progressionOf, i as HABIT_KINDS, l as StyleTableSchema, o as SubjectSchema, s as subjectKeyOf, t as mixFactsOf, u as longestContext } from "./mix-facts-CvX18d2q.mjs";
|
|
2
|
+
import { Array, Effect, Number, Option, Order, Record, Schema, String, pipe } from "effect";
|
|
3
|
+
import { readSong } from "@r_masseater/song-format";
|
|
4
|
+
import { soundingsOf } from "@r_masseater/song-format/analysis";
|
|
5
|
+
// src/app/presets/features/find-habits/model/habits.ts
|
|
6
|
+
const FIRST = 1;
|
|
7
|
+
const NEVER = 0;
|
|
8
|
+
const DEFAULT_LIMITS = {
|
|
9
|
+
songs: 2,
|
|
10
|
+
share: .3,
|
|
11
|
+
baseline: .03,
|
|
12
|
+
seen: 8
|
|
13
|
+
};
|
|
14
|
+
const occurrencesIn = (baseline, limits) => (song) => pipe(Array.drop(Array.makeBy(song.steps.length, (index) => index), FIRST), Array.flatMap((index) => {
|
|
15
|
+
const step = Array.getUnsafe(song.steps, index);
|
|
16
|
+
return pipe(longestContext({
|
|
17
|
+
table: baseline,
|
|
18
|
+
seen: limits.seen
|
|
19
|
+
})(Array.take(song.steps, index)), Option.map((context) => ({
|
|
20
|
+
context: context.words,
|
|
21
|
+
next: step.token,
|
|
22
|
+
baselineShare: Option.getOrElse(Record.get(context.next, step.token), () => NEVER) / context.total,
|
|
23
|
+
place: {
|
|
24
|
+
song: song.name,
|
|
25
|
+
bar: step.bar,
|
|
26
|
+
line: step.line,
|
|
27
|
+
column: step.column
|
|
28
|
+
}
|
|
29
|
+
})), Option.filter((occurrence) => occurrence.baselineShare < limits.baseline), Option.toArray);
|
|
30
|
+
}));
|
|
31
|
+
const matches = (tokens, words) => Array.join(tokens, " ") === words;
|
|
32
|
+
const styleShareOf = (songs) => (context, next) => {
|
|
33
|
+
const { length } = String.split(" ")(context);
|
|
34
|
+
const following = pipe(songs, Array.flatMap((song) => {
|
|
35
|
+
const tokens = pipe(song.steps, Array.map((step) => step.token));
|
|
36
|
+
return pipe(Array.makeBy(tokens.length, (index) => index), Array.filter((index) => index >= length && matches(tokens.slice(index - length, index), context)), Array.map((index) => Array.getUnsafe(tokens, index)));
|
|
37
|
+
}));
|
|
38
|
+
return Array.countBy(following, (token) => token === next) / following.length;
|
|
39
|
+
};
|
|
40
|
+
const habitOf = (share) => (same) => {
|
|
41
|
+
const first = Array.headNonEmpty(same);
|
|
42
|
+
return {
|
|
43
|
+
context: first.context,
|
|
44
|
+
next: first.next,
|
|
45
|
+
songs: pipe(same, Array.map((occurrence) => occurrence.place.song), Array.dedupe, Array.length),
|
|
46
|
+
count: same.length,
|
|
47
|
+
share: share(first.context, first.next),
|
|
48
|
+
baselineShare: first.baselineShare,
|
|
49
|
+
evidence: pipe(same, Array.map((occurrence) => occurrence.place))
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
const byReach$1 = Order.combine(Order.mapInput(Number.Order, (habit) => -habit.songs), Order.mapInput(Number.Order, (habit) => -habit.count));
|
|
53
|
+
const habitsOf = ({ songs, baseline, limits }) => {
|
|
54
|
+
const toHabit = habitOf(styleShareOf(songs));
|
|
55
|
+
return pipe(songs, Array.flatMap(occurrencesIn(baseline, limits)), Array.groupBy((occurrence) => `${occurrence.context}\u0000${occurrence.next}`), Record.values, Array.map(toHabit), Array.filter((habit) => habit.songs >= limits.songs && habit.share >= limits.share), Array.sortBy(byReach$1));
|
|
56
|
+
};
|
|
57
|
+
// src/app/presets/features/find-habits/model/read.ts
|
|
58
|
+
const taggedError = Schema.TaggedError;
|
|
59
|
+
var UnreadableSong = class extends taggedError()("UnreadableSong", { message: Schema.String }, { identifier: "UnreadableSong" }) {};
|
|
60
|
+
const styleSongFromText = Effect.fn("styleSongFromText")(function* styleSongFromText({ name, text }) {
|
|
61
|
+
const source = yield* readSong({
|
|
62
|
+
path: `/${name}.fumx`,
|
|
63
|
+
read: () => Effect.succeed(text)
|
|
64
|
+
});
|
|
65
|
+
if (source.status === "invalid") return yield* UnreadableSong.make({ message: `${name} is not a song i68 can read` });
|
|
66
|
+
const soundings = soundingsOf(source.song);
|
|
67
|
+
return {
|
|
68
|
+
name,
|
|
69
|
+
steps: progressionOf(soundings)(source.song),
|
|
70
|
+
mix: mixFactsOf(soundings)(source.song)
|
|
71
|
+
};
|
|
72
|
+
});
|
|
73
|
+
// src/app/presets/features/find-habits/model/mix-habits.ts
|
|
74
|
+
const seenIn = (song) => pipe(song.mix, Array.map((fact) => ({
|
|
75
|
+
habit: fact.habit,
|
|
76
|
+
key: mixKeyOf(fact.habit),
|
|
77
|
+
place: {
|
|
78
|
+
song: song.name,
|
|
79
|
+
...fact.place
|
|
80
|
+
}
|
|
81
|
+
})));
|
|
82
|
+
const foundOf = (same) => {
|
|
83
|
+
const first = Array.headNonEmpty(same);
|
|
84
|
+
return {
|
|
85
|
+
habit: first.habit,
|
|
86
|
+
key: first.key,
|
|
87
|
+
songs: pipe(same, Array.map((seen) => seen.place.song), Array.dedupe, Array.length),
|
|
88
|
+
count: same.length,
|
|
89
|
+
evidence: pipe(same, Array.map((seen) => seen.place))
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
const byReach = Order.combine(Order.mapInput(Order.Number, (found) => -found.songs), Order.mapInput(Order.Number, (found) => -found.count));
|
|
93
|
+
const mixHabitsOf = ({ songs, minSongs }) => pipe(songs, Array.flatMap(seenIn), Array.groupBy((seen) => seen.key), Record.values, Array.map(foundOf), Array.filter((found) => found.songs >= minSongs), Array.sortBy(byReach));
|
|
94
|
+
// src/app/habits.ts
|
|
95
|
+
const BACH_TABLE = bach_chorales_default;
|
|
96
|
+
export { BACH_TABLE, DEFAULT_LIMITS, HABIT_KINDS, StyleRulesSchema, StyleTableSchema, SubjectSchema, UnreadableSong, habitsOf, mixHabitsOf, mixKeyOf, styleSongFromText, subjectKeyOf };
|
|
97
|
+
|
|
98
|
+
//# sourceMappingURL=habits.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"habits.mjs","names":["Arr","Rec","Str","byReach","Num","Arr","Rec","BACH_CHORALES"],"sources":["../src/app/presets/features/find-habits/model/habits.ts","../src/app/presets/features/find-habits/model/read.ts","../src/app/presets/features/find-habits/model/mix-habits.ts","../src/app/habits.ts"],"sourcesContent":["import {\n Array as Arr,\n Number as Num,\n Option,\n Order,\n Record as Rec,\n String as Str,\n pipe,\n} from \"effect\";\n\nimport type { Step } from \"#/app/presets/shared/lib/degrees.ts\";\nimport type { MixFact } from \"#/app/presets/shared/lib/mix-facts.ts\";\nimport { longestContext } from \"#/app/presets/shared/lib/style-table.ts\";\nimport type { StyleTable } from \"#/app/presets/shared/lib/style-table.ts\";\n\nconst FIRST = 1;\nconst NEVER = 0;\n\nexport interface StyleSong {\n readonly name: string;\n readonly steps: readonly Step[];\n readonly mix: readonly MixFact[];\n}\n\nexport interface HabitLimits {\n readonly songs: number;\n readonly share: number;\n readonly baseline: number;\n readonly seen: number;\n}\n\nexport const DEFAULT_LIMITS: HabitLimits = { songs: 2, share: 0.3, baseline: 0.03, seen: 8 };\n\nexport interface Place {\n readonly song: string;\n readonly bar: number;\n readonly line: number;\n readonly column: number;\n}\n\nexport interface Habit {\n readonly context: string;\n readonly next: string;\n readonly songs: number;\n readonly count: number;\n readonly share: number;\n readonly baselineShare: number;\n readonly evidence: readonly Place[];\n}\n\nexport interface HabitInput {\n readonly songs: readonly StyleSong[];\n readonly baseline: StyleTable;\n readonly limits: HabitLimits;\n}\n\ninterface Occurrence {\n readonly context: string;\n readonly next: string;\n readonly baselineShare: number;\n readonly place: Place;\n}\n\nconst occurrencesIn =\n (baseline: StyleTable, limits: HabitLimits) =>\n (song: StyleSong): readonly Occurrence[] =>\n pipe(\n Arr.drop(\n Arr.makeBy(song.steps.length, (index) => index),\n FIRST,\n ),\n Arr.flatMap((index) => {\n const step = Arr.getUnsafe(song.steps, index);\n return pipe(\n longestContext({ table: baseline, seen: limits.seen })(Arr.take(song.steps, index)),\n Option.map((context) => ({\n context: context.words,\n next: step.token,\n baselineShare:\n Option.getOrElse(Rec.get(context.next, step.token), () => NEVER) / context.total,\n place: { song: song.name, bar: step.bar, line: step.line, column: step.column },\n })),\n Option.filter((occurrence) => occurrence.baselineShare < limits.baseline),\n Option.toArray,\n );\n }),\n );\n\nconst matches = (tokens: readonly string[], words: string): boolean =>\n Arr.join(tokens, \" \") === words;\n\nconst styleShareOf =\n (songs: readonly StyleSong[]) =>\n (context: string, next: string): number => {\n const { length } = Str.split(\" \")(context);\n const following = pipe(\n songs,\n Arr.flatMap((song) => {\n const tokens = pipe(\n song.steps,\n Arr.map((step) => step.token),\n );\n return pipe(\n Arr.makeBy(tokens.length, (index) => index),\n Arr.filter(\n (index) => index >= length && matches(tokens.slice(index - length, index), context),\n ),\n Arr.map((index) => Arr.getUnsafe(tokens, index)),\n );\n }),\n );\n return Arr.countBy(following, (token) => token === next) / following.length;\n };\n\nconst habitOf =\n (share: (context: string, next: string) => number) =>\n (same: Arr.NonEmptyReadonlyArray<Occurrence>): Habit => {\n const first = Arr.headNonEmpty(same);\n return {\n context: first.context,\n next: first.next,\n songs: pipe(\n same,\n Arr.map((occurrence) => occurrence.place.song),\n Arr.dedupe,\n Arr.length,\n ),\n count: same.length,\n share: share(first.context, first.next),\n baselineShare: first.baselineShare,\n evidence: pipe(\n same,\n Arr.map((occurrence) => occurrence.place),\n ),\n };\n };\n\nconst byReach = Order.combine(\n Order.mapInput(Num.Order, (habit: Habit) => -habit.songs),\n Order.mapInput(Num.Order, (habit: Habit) => -habit.count),\n);\n\nexport const habitsOf = ({ songs, baseline, limits }: HabitInput): readonly Habit[] => {\n const toHabit = habitOf(styleShareOf(songs));\n return pipe(\n songs,\n Arr.flatMap(occurrencesIn(baseline, limits)),\n Arr.groupBy((occurrence) => `${occurrence.context}\\u0000${occurrence.next}`),\n Rec.values,\n Arr.map(toHabit),\n Arr.filter((habit) => habit.songs >= limits.songs && habit.share >= limits.share),\n Arr.sortBy(byReach),\n );\n};\n","import { readSong } from \"@r_masseater/song-format\";\nimport { soundingsOf } from \"@r_masseater/song-format/analysis\";\nimport { Effect, Schema } from \"effect\";\n\nimport { progressionOf } from \"#/app/presets/shared/lib/degrees.ts\";\nimport { mixFactsOf } from \"#/app/presets/shared/lib/mix-facts.ts\";\n\nimport type { StyleSong } from \"./habits.ts\";\n\nconst taggedError = Schema.TaggedError;\n\nexport class UnreadableSong extends taggedError<\n UnreadableSong,\n { readonly brand: unique symbol }\n>()(\"UnreadableSong\", { message: Schema.String }, { identifier: \"UnreadableSong\" }) {}\n\nexport interface SongText {\n readonly name: string;\n readonly text: string;\n}\n\nexport const styleSongFromText = Effect.fn(\"styleSongFromText\")(function* styleSongFromText({\n name,\n text,\n}: SongText) {\n const source = yield* readSong({ path: `/${name}.fumx`, read: () => Effect.succeed(text) });\n if (source.status === \"invalid\") {\n return yield* UnreadableSong.make({ message: `${name} is not a song i68 can read` });\n }\n const soundings = soundingsOf(source.song);\n const song: StyleSong = {\n name,\n steps: progressionOf(soundings)(source.song),\n mix: mixFactsOf(soundings)(source.song),\n };\n return song;\n});\n","import { Array as Arr, Order, Record as Rec, pipe } from \"effect\";\n\nimport { mixKeyOf } from \"#/app/presets/shared/lib/mix-habit.ts\";\nimport type { MixHabit } from \"#/app/presets/shared/lib/mix-habit.ts\";\n\nimport type { Place, StyleSong } from \"./habits.ts\";\n\nexport interface MixHabitFound {\n readonly habit: MixHabit;\n readonly key: string;\n readonly songs: number;\n readonly count: number;\n readonly evidence: readonly Place[];\n}\n\nexport interface MixHabitInput {\n readonly songs: readonly StyleSong[];\n readonly minSongs: number;\n}\n\ninterface Seen {\n readonly habit: MixHabit;\n readonly key: string;\n readonly place: Place;\n}\n\nconst seenIn = (song: StyleSong): readonly Seen[] =>\n pipe(\n song.mix,\n Arr.map((fact) => ({\n habit: fact.habit,\n key: mixKeyOf(fact.habit),\n place: { song: song.name, ...fact.place },\n })),\n );\n\nconst foundOf = (same: Arr.NonEmptyReadonlyArray<Seen>): MixHabitFound => {\n const first = Arr.headNonEmpty(same);\n return {\n habit: first.habit,\n key: first.key,\n songs: pipe(\n same,\n Arr.map((seen) => seen.place.song),\n Arr.dedupe,\n Arr.length,\n ),\n count: same.length,\n evidence: pipe(\n same,\n Arr.map((seen) => seen.place),\n ),\n };\n};\n\nconst byReach = Order.combine(\n Order.mapInput(Order.Number, (found: MixHabitFound) => -found.songs),\n Order.mapInput(Order.Number, (found: MixHabitFound) => -found.count),\n);\n\nexport const mixHabitsOf = ({ songs, minSongs }: MixHabitInput): readonly MixHabitFound[] =>\n pipe(\n songs,\n Arr.flatMap(seenIn),\n Arr.groupBy((seen) => seen.key),\n Rec.values,\n Arr.map(foundOf),\n Arr.filter((found) => found.songs >= minSongs),\n Arr.sortBy(byReach),\n );\n","import BACH_CHORALES from \"#/app/presets/features/check-style/data/bach-chorales.json\" with { type: \"json\" };\nimport type { StyleTable } from \"#/app/presets/shared/lib/style-table.ts\";\n\nexport {\n DEFAULT_LIMITS,\n UnreadableSong,\n habitsOf,\n mixHabitsOf,\n styleSongFromText,\n} from \"#/app/presets/features/find-habits/index.ts\";\nexport type {\n Habit,\n HabitInput,\n HabitLimits,\n MixHabitFound,\n Place,\n SongText,\n StyleSong,\n} from \"#/app/presets/features/find-habits/index.ts\";\nexport {\n HABIT_KINDS,\n StyleRulesSchema,\n SubjectSchema,\n subjectKeyOf,\n} from \"#/app/presets/shared/lib/style-rules.ts\";\nexport type {\n HabitKind,\n HabitRule,\n StyleRules,\n Subject,\n} from \"#/app/presets/shared/lib/style-rules.ts\";\nexport { mixKeyOf } from \"#/app/presets/shared/lib/mix-habit.ts\";\nexport type { MixHabit } from \"#/app/presets/shared/lib/mix-habit.ts\";\nexport { StyleTableSchema } from \"#/app/presets/shared/lib/style-table.ts\";\nexport type { StyleTable } from \"#/app/presets/shared/lib/style-table.ts\";\n\nexport const BACH_TABLE: StyleTable = BACH_CHORALES;\n"],"mappings":"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"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { a as Rule, n as I68Config, r as Plugin, s as PathspecRequest, t as Diagnostic } from "./index-DB7buWb9.mjs";
|
|
2
|
+
import { Effect, Schema } from "effect";
|
|
3
|
+
import "@r_masseater/song-format";
|
|
4
|
+
interface Reportable {
|
|
5
|
+
readonly path: string;
|
|
6
|
+
readonly line: number;
|
|
7
|
+
readonly column?: number | undefined;
|
|
8
|
+
readonly rule: string;
|
|
9
|
+
readonly message: string;
|
|
10
|
+
readonly detail?: string | undefined;
|
|
11
|
+
readonly context?: string | undefined;
|
|
12
|
+
readonly severity: string;
|
|
13
|
+
}
|
|
14
|
+
declare const formatDiagnostic: (diagnostic: Reportable) => string;
|
|
15
|
+
interface Ignoring {
|
|
16
|
+
readonly ignores?: readonly string[] | undefined;
|
|
17
|
+
}
|
|
18
|
+
declare const defineRule: (rule: Rule) => Rule;
|
|
19
|
+
declare const definePlugin: (plugin: Plugin) => Plugin;
|
|
20
|
+
declare const I68Error_base: Schema.Class<I68Error, Schema.TaggedStruct<"I68Error", {
|
|
21
|
+
readonly message: Schema.String;
|
|
22
|
+
}>, import("effect/Cause").YieldableError & {
|
|
23
|
+
readonly brand: unique symbol;
|
|
24
|
+
}>;
|
|
25
|
+
declare class I68Error extends I68Error_base {}
|
|
26
|
+
type Read = (path: string) => Effect.Effect<string, I68Error>;
|
|
27
|
+
interface LintInput {
|
|
28
|
+
readonly root: string;
|
|
29
|
+
readonly files: readonly string[];
|
|
30
|
+
readonly read: Read;
|
|
31
|
+
readonly config?: I68Config;
|
|
32
|
+
}
|
|
33
|
+
interface TextInput {
|
|
34
|
+
readonly path: string;
|
|
35
|
+
readonly text: string;
|
|
36
|
+
readonly read?: Read;
|
|
37
|
+
readonly config?: I68Config;
|
|
38
|
+
}
|
|
39
|
+
declare const lint: (input: LintInput) => Effect.Effect<Diagnostic[], I68Error, never>;
|
|
40
|
+
declare const lintText: (input: TextInput) => Effect.Effect<Diagnostic[], I68Error, never>;
|
|
41
|
+
type PathspecInput = PathspecRequest<I68Config>;
|
|
42
|
+
declare const i68Section: (config: unknown) => I68Config;
|
|
43
|
+
declare const songPathspecs: ({ config, patterns }: {
|
|
44
|
+
readonly config: Ignoring;
|
|
45
|
+
readonly patterns?: readonly string[];
|
|
46
|
+
}) => readonly string[];
|
|
47
|
+
export { TextInput as a, Read as c, defineRule as d, formatDiagnostic as f, LintInput as i, I68Error as l, i68Section as n, lint as o, songPathspecs as r, lintText as s, PathspecInput as t, definePlugin as u };
|
|
48
|
+
//# sourceMappingURL=index-5D8Rm7JG.d.mts.map
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { Effect, FileSystem, Option, Path } from "effect";
|
|
2
|
-
import { Song } from "@r_masseater/
|
|
3
|
-
import { Sounding } from "@r_masseater/
|
|
2
|
+
import { Song } from "@r_masseater/song-format";
|
|
3
|
+
import { Sounding } from "@r_masseater/song-format/analysis";
|
|
4
4
|
type Severity = "off" | "warn" | "error";
|
|
5
5
|
type RuleOptions = Readonly<Record<string, unknown>>;
|
|
6
6
|
type RuleEntry = Severity | readonly [Severity] | readonly [Severity, RuleOptions];
|
|
7
|
+
interface PathspecRequest<Config> {
|
|
8
|
+
readonly config: Config;
|
|
9
|
+
readonly patterns?: readonly string[];
|
|
10
|
+
}
|
|
7
11
|
interface Report {
|
|
8
12
|
readonly message: string;
|
|
9
13
|
readonly line: number;
|
|
@@ -41,5 +45,5 @@ interface Diagnostic {
|
|
|
41
45
|
readonly detail?: string;
|
|
42
46
|
readonly severity: Exclude<Severity, "off">;
|
|
43
47
|
}
|
|
44
|
-
export { Rule as a,
|
|
45
|
-
//# sourceMappingURL=index-
|
|
48
|
+
export { Rule as a, RuleEntry as c, Report as i, RuleOptions as l, I68Config as n, RuleContext as o, Plugin as r, PathspecRequest as s, Diagnostic as t, Severity as u };
|
|
49
|
+
//# sourceMappingURL=index-DB7buWb9.d.mts.map
|
package/dist/index.d.mts
CHANGED
|
@@ -1,35 +1,3 @@
|
|
|
1
|
-
import { a as Rule, c as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
export declare const defineRule: (rule: Rule) => Rule;
|
|
5
|
-
export declare const definePlugin: (plugin: Plugin) => Plugin;
|
|
6
|
-
export declare const format: (diagnostic: Diagnostic) => string;
|
|
7
|
-
declare const I68Error_base: Schema.Class<I68Error, Schema.TaggedStruct<"I68Error", {
|
|
8
|
-
readonly message: Schema.String;
|
|
9
|
-
}>, import("effect/Cause").YieldableError & {
|
|
10
|
-
readonly brand: unique symbol;
|
|
11
|
-
}>;
|
|
12
|
-
export declare class I68Error extends I68Error_base {}
|
|
13
|
-
type Read = (path: string) => Effect.Effect<string, I68Error>;
|
|
14
|
-
interface LintInput {
|
|
15
|
-
readonly root: string;
|
|
16
|
-
readonly files: readonly string[];
|
|
17
|
-
readonly read: Read;
|
|
18
|
-
readonly config?: I68Config;
|
|
19
|
-
}
|
|
20
|
-
interface TextInput {
|
|
21
|
-
readonly path: string;
|
|
22
|
-
readonly text: string;
|
|
23
|
-
readonly read?: Read;
|
|
24
|
-
readonly config?: I68Config;
|
|
25
|
-
}
|
|
26
|
-
export declare const lint: (input: LintInput) => Effect.Effect<Diagnostic[], I68Error, never>;
|
|
27
|
-
export declare const lintText: (input: TextInput) => Effect.Effect<Diagnostic[], I68Error, never>;
|
|
28
|
-
export declare const i68Section: (config: unknown) => I68Config;
|
|
29
|
-
interface PathspecInput {
|
|
30
|
-
readonly config: I68Config;
|
|
31
|
-
readonly patterns?: readonly string[];
|
|
32
|
-
}
|
|
33
|
-
export declare const songPathspecs: ({ config, patterns }: PathspecInput) => readonly string[];
|
|
34
|
-
export type { Diagnostic, I68Config, LintInput, PathspecInput, Plugin, Read, Report, Rule, RuleContext, RuleEntry, RuleOptions, Severity, TextInput };
|
|
35
|
-
//# sourceMappingURL=index.d.mts.map
|
|
1
|
+
import { a as Rule, c as RuleEntry, i as Report, l as RuleOptions, n as I68Config, o as RuleContext, r as Plugin, t as Diagnostic, u as Severity } from "./index-DB7buWb9.mjs";
|
|
2
|
+
import { a as TextInput, c as Read, d as defineRule, f as formatDiagnostic, i as LintInput, l as I68Error, n as i68Section, o as lint, r as songPathspecs, s as lintText, t as PathspecInput, u as definePlugin } from "./index-5D8Rm7JG.mjs";
|
|
3
|
+
export { type Diagnostic, type I68Config, I68Error, type LintInput, type PathspecInput, type Plugin, type Read, type Report, type Rule, type RuleContext, type RuleEntry, type RuleOptions, type Severity, type TextInput, definePlugin, defineRule, formatDiagnostic as format, i68Section, lint, lintText, songPathspecs };
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const definePlugin = (plugin) => plugin;
|
|
5
|
-
export { I68Error, definePlugin, defineRule, format, i68Section, lint, lintText, songPathspecs };
|
|
6
|
-
|
|
7
|
-
//# sourceMappingURL=index.mjs.map
|
|
1
|
+
import { n as defineRule, t as definePlugin } from "./app-J9_4mtbE.mjs";
|
|
2
|
+
import { a as I68Error, i as lintText, n as songPathspecs, r as lint, s as formatDiagnostic, t as i68Section } from "./section-C9JQ1-aJ.mjs";
|
|
3
|
+
export { I68Error, definePlugin, defineRule, formatDiagnostic as format, i68Section, lint, lintText, songPathspecs };
|