@libraz/libcantus 0.9.2 → 0.9.4
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 +6 -5
- package/dist/analyze/index.cjs +41 -1676
- package/dist/analyze/index.cjs.map +1 -1
- package/dist/analyze/index.d.cts +194 -122
- package/dist/analyze/index.d.ts +194 -122
- package/dist/analyze/index.js +19 -8
- package/dist/chunk-36N73KZ3.cjs +246 -0
- package/dist/chunk-36N73KZ3.cjs.map +1 -0
- package/dist/chunk-4HLLZPXT.cjs +3077 -0
- package/dist/chunk-4HLLZPXT.cjs.map +1 -0
- package/dist/chunk-7MGZ7D62.cjs +498 -0
- package/dist/chunk-7MGZ7D62.cjs.map +1 -0
- package/dist/{chunk-R3S2LUBH.js → chunk-7NKDPF74.js} +660 -305
- package/dist/chunk-7NKDPF74.js.map +1 -0
- package/dist/chunk-CAN76NCU.cjs +679 -0
- package/dist/chunk-CAN76NCU.cjs.map +1 -0
- package/dist/{chunk-7Y7WF64D.js → chunk-D2FAJBYL.js} +104 -35
- package/dist/chunk-D2FAJBYL.js.map +1 -0
- package/dist/{chunk-COKTX2G5.js → chunk-EHVEBWM5.js} +1052 -510
- package/dist/chunk-EHVEBWM5.js.map +1 -0
- package/dist/chunk-FCANXBAT.cjs +30 -0
- package/dist/chunk-FCANXBAT.cjs.map +1 -0
- package/dist/chunk-FNDWXRRI.cjs +479 -0
- package/dist/chunk-FNDWXRRI.cjs.map +1 -0
- package/dist/{chunk-GQKN5KDT.js → chunk-GQSGS2N4.js} +43 -29
- package/dist/chunk-GQSGS2N4.js.map +1 -0
- package/dist/chunk-HKGYCQ34.js +53 -0
- package/dist/chunk-HKGYCQ34.js.map +1 -0
- package/dist/chunk-I24MV65U.js +106 -0
- package/dist/chunk-I24MV65U.js.map +1 -0
- package/dist/{chunk-LN7ZZMD2.js → chunk-KMHOICIY.js} +322 -173
- package/dist/chunk-KMHOICIY.js.map +1 -0
- package/dist/chunk-LW53AHQU.cjs +1117 -0
- package/dist/chunk-LW53AHQU.cjs.map +1 -0
- package/dist/chunk-N6IHQUOX.js +1 -0
- package/dist/chunk-N6IHQUOX.js.map +1 -0
- package/dist/chunk-NKIBQ6PT.js +30 -0
- package/dist/chunk-NKIBQ6PT.js.map +1 -0
- package/dist/chunk-NP4NA2FB.cjs +106 -0
- package/dist/chunk-NP4NA2FB.cjs.map +1 -0
- package/dist/chunk-NVE34YGZ.cjs +1449 -0
- package/dist/chunk-NVE34YGZ.cjs.map +1 -0
- package/dist/{chunk-A4532ZFR.js → chunk-NYYWMV2C.js} +115 -47
- package/dist/chunk-NYYWMV2C.js.map +1 -0
- package/dist/{chunk-5HTNMQW4.js → chunk-Q2XUP227.js} +310 -118
- package/dist/chunk-Q2XUP227.js.map +1 -0
- package/dist/chunk-Q6OP4U43.cjs +327 -0
- package/dist/chunk-Q6OP4U43.cjs.map +1 -0
- package/dist/chunk-RC6GBMCD.cjs +845 -0
- package/dist/chunk-RC6GBMCD.cjs.map +1 -0
- package/dist/{chunk-XTC3X6MS.js → chunk-RK35RIN7.js} +453 -152
- package/dist/chunk-RK35RIN7.js.map +1 -0
- package/dist/chunk-RUMU3UA6.cjs +53 -0
- package/dist/chunk-RUMU3UA6.cjs.map +1 -0
- package/dist/chunk-T64C7ZD7.cjs +1 -0
- package/dist/chunk-T64C7ZD7.cjs.map +1 -0
- package/dist/chunk-XEBG3G53.js +498 -0
- package/dist/chunk-XEBG3G53.js.map +1 -0
- package/dist/chunk-YLEMGEFH.js +246 -0
- package/dist/chunk-YLEMGEFH.js.map +1 -0
- package/dist/chunk-ZEJR4TKL.cjs +173 -0
- package/dist/chunk-ZEJR4TKL.cjs.map +1 -0
- package/dist/core/index.cjs +130 -431
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +331 -17
- package/dist/core/index.d.ts +331 -17
- package/dist/core/index.js +71 -13
- package/dist/{function-2bJW1Zp_.d.ts → function-BtiZb9i9.d.ts} +28 -7
- package/dist/{function-r2sh-jOO.d.cts → function-DNugAOrt.d.cts} +28 -7
- package/dist/generate/index.cjs +30 -3751
- package/dist/generate/index.cjs.map +1 -1
- package/dist/generate/index.d.cts +373 -59
- package/dist/generate/index.d.ts +373 -59
- package/dist/generate/index.js +23 -9
- package/dist/{index-DZ1M21do.d.cts → index-6VR8-kit.d.ts} +20 -4
- package/dist/index-70p168VM.d.ts +192 -0
- package/dist/{index-D_ZTUNKp.d.cts → index-Be74mcon.d.cts} +18 -17
- package/dist/index-BtXT6UQ0.d.cts +192 -0
- package/dist/{index-BMPxwjwV.d.ts → index-C5UBbQ4G.d.ts} +18 -17
- package/dist/{index-BOBXBNwP.d.cts → index-C83mZI1P.d.ts} +93 -8
- package/dist/{index-BdeQ1r_p.d.cts → index-D6b6na69.d.cts} +14 -11
- package/dist/{index-Cl7mhOFM.d.cts → index-DXd9JikN.d.cts} +92 -10
- package/dist/{index-Cl7mhOFM.d.ts → index-DXd9JikN.d.ts} +92 -10
- package/dist/index-OG65ocOr.d.cts +272 -0
- package/dist/index-OG65ocOr.d.ts +272 -0
- package/dist/{index-BreoJRw0.d.ts → index-tJhkmQgE.d.cts} +20 -4
- package/dist/{index-CP3wAfEH.d.ts → index-tSQh-xwY.d.ts} +14 -11
- package/dist/{index-CM5W4rcm.d.ts → index-y_ak9_Hi.d.cts} +93 -8
- package/dist/index.cjs +419 -6848
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -13
- package/dist/index.d.ts +14 -13
- package/dist/index.js +132 -27
- package/dist/model/index.cjs +8 -2423
- package/dist/model/index.cjs.map +1 -1
- package/dist/model/index.d.cts +433 -74
- package/dist/model/index.d.ts +433 -74
- package/dist/model/index.js +6 -7
- package/dist/styled-DIRkk9Uz.d.ts +506 -0
- package/dist/styled-DJbkJQfj.d.cts +506 -0
- package/dist/theory/index.cjs +172 -1676
- package/dist/theory/index.cjs.map +1 -1
- package/dist/theory/index.d.cts +151 -233
- package/dist/theory/index.d.ts +151 -233
- package/dist/theory/index.js +31 -7
- package/dist/{types-MGP29r3t.d.cts → types-BN6_Q9Kl.d.cts} +11 -2
- package/dist/{types-MGP29r3t.d.ts → types-BN6_Q9Kl.d.ts} +11 -2
- package/package.json +73 -24
- package/dist/chunk-5HTNMQW4.js.map +0 -1
- package/dist/chunk-7Y7WF64D.js.map +0 -1
- package/dist/chunk-A4532ZFR.js.map +0 -1
- package/dist/chunk-BHUT2S5G.js +0 -22
- package/dist/chunk-BHUT2S5G.js.map +0 -1
- package/dist/chunk-CCBLVAPK.js +0 -42
- package/dist/chunk-CCBLVAPK.js.map +0 -1
- package/dist/chunk-COKTX2G5.js.map +0 -1
- package/dist/chunk-DYWFNC4A.js +0 -152
- package/dist/chunk-DYWFNC4A.js.map +0 -1
- package/dist/chunk-GQKN5KDT.js.map +0 -1
- package/dist/chunk-LN7ZZMD2.js.map +0 -1
- package/dist/chunk-MSWFZF7J.js +0 -118
- package/dist/chunk-MSWFZF7J.js.map +0 -1
- package/dist/chunk-R3S2LUBH.js.map +0 -1
- package/dist/chunk-SDM3VJJ5.js +0 -41
- package/dist/chunk-SDM3VJJ5.js.map +0 -1
- package/dist/chunk-XTC3X6MS.js.map +0 -1
- package/dist/chunk-ZXW5YIWK.js +0 -55
- package/dist/chunk-ZXW5YIWK.js.map +0 -1
- package/dist/index-CGMZNCx6.d.cts +0 -140
- package/dist/index-CGMZNCx6.d.ts +0 -140
- package/dist/styled-BjXtOFNk.d.cts +0 -282
- package/dist/styled-D7BAx3S3.d.ts +0 -282
- package/src/analyze/arrange/index.ts +0 -21
- package/src/analyze/arrange/internal.ts +0 -125
- package/src/analyze/arrange/tension.ts +0 -187
- package/src/analyze/arrange/tracks.ts +0 -279
- package/src/analyze/detect/index.ts +0 -235
- package/src/analyze/functional/borrowed.ts +0 -84
- package/src/analyze/functional/cadence.ts +0 -66
- package/src/analyze/functional/function.ts +0 -184
- package/src/analyze/functional/index.ts +0 -23
- package/src/analyze/functional/internal.ts +0 -29
- package/src/analyze/functional/roman.ts +0 -393
- package/src/analyze/index.ts +0 -49
- package/src/analyze/timeline/index.ts +0 -415
- package/src/analyze/voice/index.ts +0 -330
- package/src/core/index.ts +0 -47
- package/src/core/interval/index.ts +0 -81
- package/src/core/meter/index.ts +0 -282
- package/src/core/pitch/index.ts +0 -311
- package/src/core/random/index.ts +0 -53
- package/src/core/tuning/index.ts +0 -156
- package/src/core/types.ts +0 -29
- package/src/generate/bass/index.ts +0 -350
- package/src/generate/countermelody/index.ts +0 -379
- package/src/generate/drums/beat.ts +0 -266
- package/src/generate/drums/euclid.ts +0 -58
- package/src/generate/drums/fills.ts +0 -356
- package/src/generate/drums/ghost.ts +0 -119
- package/src/generate/drums/hihat.ts +0 -285
- package/src/generate/drums/hit.ts +0 -31
- package/src/generate/drums/index.ts +0 -329
- package/src/generate/drums/internal.ts +0 -257
- package/src/generate/drums/kick.ts +0 -160
- package/src/generate/drums/percussion.ts +0 -121
- package/src/generate/drums/rng.ts +0 -7
- package/src/generate/drums/swing.ts +0 -71
- package/src/generate/groove/index.ts +0 -326
- package/src/generate/harmonize/index.ts +0 -440
- package/src/generate/index.ts +0 -59
- package/src/generate/motif/index.ts +0 -398
- package/src/generate/progression/index.ts +0 -370
- package/src/generate/reharmony/index.ts +0 -330
- package/src/generate/rhythm/index.ts +0 -165
- package/src/index.ts +0 -247
- package/src/model/chord.ts +0 -423
- package/src/model/index.ts +0 -15
- package/src/model/interval.ts +0 -82
- package/src/model/key.ts +0 -266
- package/src/model/note.ts +0 -176
- package/src/model/progression.ts +0 -161
- package/src/model/shared.ts +0 -12
- package/src/theory/chord/index.ts +0 -373
- package/src/theory/chordscale/index.ts +0 -374
- package/src/theory/counterpoint/index.ts +0 -230
- package/src/theory/harmony/index.ts +0 -92
- package/src/theory/index.ts +0 -107
- package/src/theory/safety/index.ts +0 -419
- package/src/theory/scale/degrees.ts +0 -123
- package/src/theory/scale/index.ts +0 -28
- package/src/theory/scale/key.ts +0 -56
- package/src/theory/scale/masks.ts +0 -153
- package/src/theory/spelling/index.ts +0 -182
- package/src/theory/symbol/index.ts +0 -268
- package/src/theory/voicing/index.ts +0 -5
- package/src/theory/voicing/internal.ts +0 -168
- package/src/theory/voicing/leading.ts +0 -112
- package/src/theory/voicing/satb.ts +0 -195
- package/src/theory/voicing/styled.ts +0 -176
- package/tsconfig.json +0 -23
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Deterministic rhythm generation over a metric grid.
|
|
3
|
-
*
|
|
4
|
-
* Builds a fixed-resolution grid across one or more bars of a time signature
|
|
5
|
-
* and decides, per grid slot, whether it becomes a note onset. Onset
|
|
6
|
-
* probability follows the metric-accent hierarchy from the `meter` module, so
|
|
7
|
-
* strong positions (downbeats, secondary pulses) are favored over weak
|
|
8
|
-
* off-pulse subdivisions. Given a seed the output is fully reproducible.
|
|
9
|
-
*
|
|
10
|
-
* Positions and durations are measured in quarter-note beats, matching the
|
|
11
|
-
* library-wide convention.
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
import { beatsPerBar, metricWeight, type TimeSignature } from '../../core/meter/index.js';
|
|
15
|
-
import { createRng } from '../../core/random/index.js';
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* A single rhythmic note: an onset position and how long it sounds.
|
|
19
|
-
*
|
|
20
|
-
* @category Rhythm & Meter
|
|
21
|
-
*/
|
|
22
|
-
export type RhythmEvent = {
|
|
23
|
-
/** Onset position in quarter-note beats, absolute from the start of the span. */
|
|
24
|
-
position: number;
|
|
25
|
-
/** Duration in quarter-note beats, extending to the next onset. */
|
|
26
|
-
duration: number;
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Options controlling {@link generateRhythm}.
|
|
31
|
-
*
|
|
32
|
-
* @category Rhythm & Meter
|
|
33
|
-
*/
|
|
34
|
-
export type RhythmOptions = {
|
|
35
|
-
/**
|
|
36
|
-
* Seed for the deterministic PRNG.
|
|
37
|
-
*
|
|
38
|
-
* @defaultValue 0
|
|
39
|
-
*/
|
|
40
|
-
seed?: number;
|
|
41
|
-
/**
|
|
42
|
-
* Number of bars to generate.
|
|
43
|
-
*
|
|
44
|
-
* @defaultValue 1
|
|
45
|
-
*/
|
|
46
|
-
bars?: number;
|
|
47
|
-
/**
|
|
48
|
-
* Grid resolution as the number of equal grid steps per quarter-note beat.
|
|
49
|
-
* The default of 2 yields an eighth-note grid; 4 yields a sixteenth-note
|
|
50
|
-
* grid, 3 an eighth-note triplet grid, and so on.
|
|
51
|
-
*
|
|
52
|
-
* @defaultValue 2
|
|
53
|
-
*/
|
|
54
|
-
subdivision?: number;
|
|
55
|
-
/**
|
|
56
|
-
* Overall onset density in [0, 1]. Scales the per-slot onset probability, so
|
|
57
|
-
* higher values fill more grid slots. Values outside [0, 1] are clamped into
|
|
58
|
-
* range.
|
|
59
|
-
*
|
|
60
|
-
* @defaultValue 0.5
|
|
61
|
-
*/
|
|
62
|
-
density?: number;
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
const DEFAULT_SUBDIVISION = 2;
|
|
66
|
-
const DEFAULT_DENSITY = 0.5;
|
|
67
|
-
const DEFAULT_BARS = 1;
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Map a metric weight (0–3 from {@link metricWeight}) to a base onset
|
|
71
|
-
* probability before density scaling. Strong positions are much more likely to
|
|
72
|
-
* carry an onset than weak ones; the curve is intentionally small and explicit
|
|
73
|
-
* so its behavior is easy to inspect and test.
|
|
74
|
-
*
|
|
75
|
-
* @param weight The metric weight, 0 (off-pulse) to 3 (downbeat).
|
|
76
|
-
* @returns A base onset probability in [0, 1].
|
|
77
|
-
* @category Rhythm & Meter
|
|
78
|
-
*/
|
|
79
|
-
export function onsetWeightCurve(weight: number): number {
|
|
80
|
-
switch (weight) {
|
|
81
|
-
case 3:
|
|
82
|
-
return 1;
|
|
83
|
-
case 2:
|
|
84
|
-
return 0.8;
|
|
85
|
-
case 1:
|
|
86
|
-
return 0.55;
|
|
87
|
-
default:
|
|
88
|
-
return 0.25;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* Generate a deterministic rhythmic pattern over `bars` bars of a time
|
|
94
|
-
* signature. A grid is built at the chosen subdivision; each slot becomes an
|
|
95
|
-
* onset with a probability derived from its metric weight scaled by `density`
|
|
96
|
-
* and sampled from the seeded PRNG. Every bar's downbeat is always an onset, so
|
|
97
|
-
* a pattern of any length has a reliable pulse independent of the seed. Each
|
|
98
|
-
* event's duration extends to the next onset, and the last event extends to the
|
|
99
|
-
* end of the span. `density` is clamped to [0, 1].
|
|
100
|
-
*
|
|
101
|
-
* @param ts The time signature.
|
|
102
|
-
* @param opts Generation options.
|
|
103
|
-
* @returns Onset events sorted by position, non-overlapping, covering the span.
|
|
104
|
-
* @example
|
|
105
|
-
* ```ts
|
|
106
|
-
* import { parseTimeSignature, generateRhythm } from '@libraz/libcantus';
|
|
107
|
-
* const ts = parseTimeSignature('4/4');
|
|
108
|
-
* generateRhythm(ts, { seed: 42, density: 0.6 }); // onset events over one bar
|
|
109
|
-
* ```
|
|
110
|
-
* @category Rhythm & Meter
|
|
111
|
-
*/
|
|
112
|
-
export function generateRhythm(ts: TimeSignature, opts: RhythmOptions = {}): RhythmEvent[] {
|
|
113
|
-
const seed = opts.seed ?? 0;
|
|
114
|
-
const bars = opts.bars ?? DEFAULT_BARS;
|
|
115
|
-
const subdivision = opts.subdivision ?? DEFAULT_SUBDIVISION;
|
|
116
|
-
const density = Math.min(1, Math.max(0, opts.density ?? DEFAULT_DENSITY));
|
|
117
|
-
|
|
118
|
-
const barBeats = beatsPerBar(ts);
|
|
119
|
-
const spanBeats = barBeats * bars;
|
|
120
|
-
const step = 1 / subdivision;
|
|
121
|
-
const slotCount = Math.round(spanBeats * subdivision);
|
|
122
|
-
const slotsPerBar = Math.round(barBeats * subdivision);
|
|
123
|
-
const rng = createRng(seed);
|
|
124
|
-
|
|
125
|
-
const positions: number[] = [];
|
|
126
|
-
for (let i = 0; i < slotCount; i += 1) {
|
|
127
|
-
const position = i * step;
|
|
128
|
-
// Force every bar's downbeat so the pulse is reliable regardless of seed.
|
|
129
|
-
if (i % slotsPerBar === 0) {
|
|
130
|
-
positions.push(position);
|
|
131
|
-
continue;
|
|
132
|
-
}
|
|
133
|
-
const weight = metricWeight(position, ts);
|
|
134
|
-
const probability = onsetWeightCurve(weight) * density;
|
|
135
|
-
if (rng.prob(probability)) {
|
|
136
|
-
positions.push(position);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
const events: RhythmEvent[] = [];
|
|
141
|
-
for (let i = 0; i < positions.length; i += 1) {
|
|
142
|
-
const position = positions[i] ?? 0;
|
|
143
|
-
const nextPosition = positions[i + 1] ?? spanBeats;
|
|
144
|
-
events.push({ position, duration: nextPosition - position });
|
|
145
|
-
}
|
|
146
|
-
return events;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
/**
|
|
150
|
-
* Onset density of a generated pattern: the mean number of onsets per bar.
|
|
151
|
-
*
|
|
152
|
-
* @param events Events from {@link generateRhythm}.
|
|
153
|
-
* @param ts The time signature.
|
|
154
|
-
* @returns The onset count divided by the number of bars the events span.
|
|
155
|
-
* @category Rhythm & Meter
|
|
156
|
-
*/
|
|
157
|
-
export function rhythmDensity(events: RhythmEvent[], ts: TimeSignature): number {
|
|
158
|
-
if (events.length === 0) {
|
|
159
|
-
return 0;
|
|
160
|
-
}
|
|
161
|
-
const last = events[events.length - 1];
|
|
162
|
-
const spanBeats = (last?.position ?? 0) + (last?.duration ?? 0);
|
|
163
|
-
const bars = spanBeats / beatsPerBar(ts);
|
|
164
|
-
return bars > 0 ? events.length / bars : 0;
|
|
165
|
-
}
|
package/src/index.ts
DELETED
|
@@ -1,247 +0,0 @@
|
|
|
1
|
-
export type {
|
|
2
|
-
ArrangementAnalysis,
|
|
3
|
-
ArrangementOptions,
|
|
4
|
-
ArrangementTrack,
|
|
5
|
-
Conflict,
|
|
6
|
-
TensionPoint,
|
|
7
|
-
TrackAnalysis,
|
|
8
|
-
TrackRole,
|
|
9
|
-
} from './analyze/arrange/index.js';
|
|
10
|
-
export { analyzeArrangement, tensionCurve } from './analyze/arrange/index.js';
|
|
11
|
-
export type { ChordMatch, KeyMatch } from './analyze/detect/index.js';
|
|
12
|
-
export { detectChord, detectChordBest, detectKey } from './analyze/detect/index.js';
|
|
13
|
-
export type {
|
|
14
|
-
BorrowedSource,
|
|
15
|
-
Cadence,
|
|
16
|
-
ChordAnalysis,
|
|
17
|
-
HarmonicFunction,
|
|
18
|
-
} from './analyze/functional/index.js';
|
|
19
|
-
export {
|
|
20
|
-
analyzeChord,
|
|
21
|
-
borrowedSource,
|
|
22
|
-
chordToRoman,
|
|
23
|
-
detectCadence,
|
|
24
|
-
functionOf,
|
|
25
|
-
isBorrowedChord,
|
|
26
|
-
isDiatonic,
|
|
27
|
-
isMinorKey,
|
|
28
|
-
parallelKey,
|
|
29
|
-
romanToChord,
|
|
30
|
-
secondaryDominant,
|
|
31
|
-
} from './analyze/functional/index.js';
|
|
32
|
-
export type {
|
|
33
|
-
CadenceHit,
|
|
34
|
-
ChordSegment,
|
|
35
|
-
ChordTimeline,
|
|
36
|
-
ChordTimelineOptions,
|
|
37
|
-
ChordTimelineResult,
|
|
38
|
-
} from './analyze/timeline/index.js';
|
|
39
|
-
export {
|
|
40
|
-
chordTimelineFromChords,
|
|
41
|
-
chordTimelineFromNotes,
|
|
42
|
-
detectCadences,
|
|
43
|
-
} from './analyze/timeline/index.js';
|
|
44
|
-
export type { AnalyzedNote, TheoryLabel, VoiceNote } from './analyze/voice/index.js';
|
|
45
|
-
export { analyzeVoice } from './analyze/voice/index.js';
|
|
46
|
-
export {
|
|
47
|
-
classifyInterval,
|
|
48
|
-
IntervalQuality,
|
|
49
|
-
isConsonantInterval,
|
|
50
|
-
isPerfectInterval,
|
|
51
|
-
} from './core/interval/index.js';
|
|
52
|
-
export type { BarPosition, TimeSignature } from './core/meter/index.js';
|
|
53
|
-
export {
|
|
54
|
-
barPositionToBeat,
|
|
55
|
-
beatsPerBar,
|
|
56
|
-
beatToBarPosition,
|
|
57
|
-
formatTimeSignature,
|
|
58
|
-
isCompound,
|
|
59
|
-
isStrongBeat,
|
|
60
|
-
metricWeight,
|
|
61
|
-
parseTimeSignature,
|
|
62
|
-
pulsesPerBar,
|
|
63
|
-
tuplet,
|
|
64
|
-
} from './core/meter/index.js';
|
|
65
|
-
export type { Note as NoteData, SpelledInterval } from './core/pitch/index.js';
|
|
66
|
-
export {
|
|
67
|
-
formatNote,
|
|
68
|
-
midiToNote,
|
|
69
|
-
noteToMidi,
|
|
70
|
-
noteToPitchClass,
|
|
71
|
-
parseNote,
|
|
72
|
-
spelledInterval,
|
|
73
|
-
} from './core/pitch/index.js';
|
|
74
|
-
export type { Rng } from './core/random/index.js';
|
|
75
|
-
export { createRng } from './core/random/index.js';
|
|
76
|
-
export type { Tuning } from './core/tuning/index.js';
|
|
77
|
-
export {
|
|
78
|
-
centsBetweenFreq,
|
|
79
|
-
centsOfSteps,
|
|
80
|
-
edo,
|
|
81
|
-
frequencyOf,
|
|
82
|
-
JUST_RATIOS,
|
|
83
|
-
justDeviationCents,
|
|
84
|
-
nearestStep,
|
|
85
|
-
ratioToCents,
|
|
86
|
-
TWELVE_TET,
|
|
87
|
-
} from './core/tuning/index.js';
|
|
88
|
-
export type { KeyScale, NoteEvent } from './core/types.js';
|
|
89
|
-
export type { BassLineOptions, BassSegment, BassStyle } from './generate/bass/index.js';
|
|
90
|
-
export { generateBassLine } from './generate/bass/index.js';
|
|
91
|
-
export type { CounterMelodyOptions } from './generate/countermelody/index.js';
|
|
92
|
-
export { generateCounterMelody } from './generate/countermelody/index.js';
|
|
93
|
-
export type {
|
|
94
|
-
DrumHit,
|
|
95
|
-
DrumRole,
|
|
96
|
-
DrumsOptions,
|
|
97
|
-
EuclideanKick,
|
|
98
|
-
GrooveFeel,
|
|
99
|
-
GrooveStyle,
|
|
100
|
-
Section,
|
|
101
|
-
} from './generate/drums/index.js';
|
|
102
|
-
export { generateDrums } from './generate/drums/index.js';
|
|
103
|
-
export type { GrooveSlot, GrooveTemplate, HumanizeOptions } from './generate/groove/index.js';
|
|
104
|
-
export { applyGrooveTemplate, extractGrooveTemplate, humanize } from './generate/groove/index.js';
|
|
105
|
-
export type {
|
|
106
|
-
HarmonizeOptions,
|
|
107
|
-
HarmonizeResult,
|
|
108
|
-
MelodyNote,
|
|
109
|
-
} from './generate/harmonize/index.js';
|
|
110
|
-
export { harmonizeMelody } from './generate/harmonize/index.js';
|
|
111
|
-
export type {
|
|
112
|
-
MotifCell,
|
|
113
|
-
MotifContour,
|
|
114
|
-
MotifNote,
|
|
115
|
-
MotifOptions,
|
|
116
|
-
MotifTransform,
|
|
117
|
-
} from './generate/motif/index.js';
|
|
118
|
-
export { developMotif, generateMotif, transformMotif } from './generate/motif/index.js';
|
|
119
|
-
export type {
|
|
120
|
-
ChordSpan,
|
|
121
|
-
ProgFunction,
|
|
122
|
-
ProgressionOptions,
|
|
123
|
-
ProgressionPreset,
|
|
124
|
-
ProgStyle,
|
|
125
|
-
} from './generate/progression/index.js';
|
|
126
|
-
export {
|
|
127
|
-
generateProgression,
|
|
128
|
-
progressions,
|
|
129
|
-
progressionsByStyle,
|
|
130
|
-
} from './generate/progression/index.js';
|
|
131
|
-
export type {
|
|
132
|
-
BorrowedChord,
|
|
133
|
-
SubstituteOptions,
|
|
134
|
-
Substitution,
|
|
135
|
-
SubstitutionType,
|
|
136
|
-
} from './generate/reharmony/index.js';
|
|
137
|
-
export {
|
|
138
|
-
modalInterchangePalette,
|
|
139
|
-
negativeHarmonyMirror,
|
|
140
|
-
substituteChord,
|
|
141
|
-
} from './generate/reharmony/index.js';
|
|
142
|
-
export type { RhythmEvent, RhythmOptions } from './generate/rhythm/index.js';
|
|
143
|
-
export { generateRhythm, onsetWeightCurve, rhythmDensity } from './generate/rhythm/index.js';
|
|
144
|
-
export { Chord, Interval, Key, Note, Progression } from './model/index.js';
|
|
145
|
-
export type { Chord as ChordData, ChordQuality } from './theory/chord/index.js';
|
|
146
|
-
export {
|
|
147
|
-
chordFromDegree,
|
|
148
|
-
chordPitchClasses,
|
|
149
|
-
chordQualities,
|
|
150
|
-
chordToneRole,
|
|
151
|
-
diatonicSeventh,
|
|
152
|
-
diatonicTriad,
|
|
153
|
-
makeChord,
|
|
154
|
-
} from './theory/chord/index.js';
|
|
155
|
-
export type {
|
|
156
|
-
ChordScaleMatch,
|
|
157
|
-
ChordScaleReportEntry,
|
|
158
|
-
ScaleChoice,
|
|
159
|
-
} from './theory/chordscale/index.js';
|
|
160
|
-
export {
|
|
161
|
-
availableTensions,
|
|
162
|
-
avoidNotes,
|
|
163
|
-
chordScaleReport,
|
|
164
|
-
chordScales,
|
|
165
|
-
scaleMatchesChord,
|
|
166
|
-
scalesForChanges,
|
|
167
|
-
} from './theory/chordscale/index.js';
|
|
168
|
-
export {
|
|
169
|
-
createsHiddenParallelPerfect,
|
|
170
|
-
createsParallelOctave,
|
|
171
|
-
createsParallelPerfect,
|
|
172
|
-
createsParallelUnison,
|
|
173
|
-
createsVerticalDissonance,
|
|
174
|
-
createsVoiceCrossing,
|
|
175
|
-
createsVoiceOverlap,
|
|
176
|
-
exceedsSpacing,
|
|
177
|
-
isForbiddenMelodicLeap,
|
|
178
|
-
isLeadingToneResolution,
|
|
179
|
-
} from './theory/counterpoint/index.js';
|
|
180
|
-
export type { HarmonyRole, LockLevel, VoicedRole } from './theory/harmony/index.js';
|
|
181
|
-
export { roleOf } from './theory/harmony/index.js';
|
|
182
|
-
export type {
|
|
183
|
-
SafetyProfile,
|
|
184
|
-
SafetyQuery,
|
|
185
|
-
SafetyResult,
|
|
186
|
-
VoiceSnapshot,
|
|
187
|
-
} from './theory/safety/index.js';
|
|
188
|
-
export {
|
|
189
|
-
enumerateSafePitches,
|
|
190
|
-
evaluateSafety,
|
|
191
|
-
NoteSafety,
|
|
192
|
-
ReasonFlag,
|
|
193
|
-
} from './theory/safety/index.js';
|
|
194
|
-
export {
|
|
195
|
-
BLUES_MASK,
|
|
196
|
-
CHROMATIC_MASK,
|
|
197
|
-
DORIAN_MASK,
|
|
198
|
-
diatonicPitchClasses,
|
|
199
|
-
HARMONIC_MINOR_MASK,
|
|
200
|
-
isScaleTone,
|
|
201
|
-
LOCRIAN_MASK,
|
|
202
|
-
LYDIAN_MASK,
|
|
203
|
-
MAJOR_MASK,
|
|
204
|
-
MAJOR_PENTATONIC_MASK,
|
|
205
|
-
MELODIC_MINOR_MASK,
|
|
206
|
-
MINOR_PENTATONIC_MASK,
|
|
207
|
-
MIXOLYDIAN_MASK,
|
|
208
|
-
majorKey,
|
|
209
|
-
maskFromOffsets,
|
|
210
|
-
minorKey,
|
|
211
|
-
NAMED_SCALES,
|
|
212
|
-
NATURAL_MINOR_MASK,
|
|
213
|
-
nearestScaleTone,
|
|
214
|
-
OCTATONIC_HALF_WHOLE_MASK,
|
|
215
|
-
OCTATONIC_WHOLE_HALF_MASK,
|
|
216
|
-
PHRYGIAN_MASK,
|
|
217
|
-
pitchToScaleDegree,
|
|
218
|
-
scaleByName,
|
|
219
|
-
scaleTonesInDegreeOrder,
|
|
220
|
-
WHOLE_TONE_MASK,
|
|
221
|
-
} from './theory/scale/index.js';
|
|
222
|
-
export {
|
|
223
|
-
noteNames,
|
|
224
|
-
spellChord,
|
|
225
|
-
spellPitchClass,
|
|
226
|
-
spellPitchClasses,
|
|
227
|
-
spellScale,
|
|
228
|
-
} from './theory/spelling/index.js';
|
|
229
|
-
export {
|
|
230
|
-
formatChordSymbol,
|
|
231
|
-
parseChordSymbol,
|
|
232
|
-
transposeChordSymbol,
|
|
233
|
-
} from './theory/symbol/index.js';
|
|
234
|
-
export type {
|
|
235
|
-
StyledVoicingOptions,
|
|
236
|
-
VoiceRange,
|
|
237
|
-
VoicingOptions,
|
|
238
|
-
VoicingStyle,
|
|
239
|
-
} from './theory/voicing/index.js';
|
|
240
|
-
export {
|
|
241
|
-
nextVoicing,
|
|
242
|
-
SATB_RANGES,
|
|
243
|
-
voiceChord,
|
|
244
|
-
voiceChordStyled,
|
|
245
|
-
voiceLeadingCost,
|
|
246
|
-
voiceProgression,
|
|
247
|
-
} from './theory/voicing/index.js';
|