@openstand/engine 0.0.0-stage → 0.1.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/LICENSE +373 -0
- package/README.md +49 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +20261 -0
- package/dist/index.js.map +1 -0
- package/dist/types/packages/engine/src/backingTrack.d.ts +20 -0
- package/dist/types/packages/engine/src/index.d.ts +17 -0
- package/dist/types/src/engine/arrange.d.ts +30 -0
- package/dist/types/src/engine/bass.d.ts +5 -0
- package/dist/types/src/engine/click.d.ts +9 -0
- package/dist/types/src/engine/comp.d.ts +8 -0
- package/dist/types/src/engine/drums.d.ts +5 -0
- package/dist/types/src/engine/events.d.ts +15 -0
- package/dist/types/src/engine/keyOrder.d.ts +8 -0
- package/dist/types/src/engine/meter.d.ts +9 -0
- package/dist/types/src/engine/midiWriter.d.ts +25 -0
- package/dist/types/src/engine/timeline.d.ts +61 -0
- package/dist/types/src/formats/chartFile.d.ts +4 -0
- package/dist/types/src/formats/chordpro.d.ts +2 -0
- package/dist/types/src/formats/chordproRead.d.ts +4 -0
- package/dist/types/src/formats/ireal.d.ts +24 -0
- package/dist/types/src/formats/irealWrite.d.ts +4 -0
- package/dist/types/src/formats/musicxml.d.ts +2 -0
- package/dist/types/src/formats/musicxmlChords.d.ts +20 -0
- package/dist/types/src/formats/musicxmlRead.d.ts +9 -0
- package/dist/types/src/formats/xml.d.ts +17 -0
- package/dist/types/src/formats/zip.d.ts +10 -0
- package/dist/types/src/music/chart.d.ts +50 -0
- package/dist/types/src/music/chords.d.ts +24 -0
- package/dist/types/src/music/edit.d.ts +20 -0
- package/dist/types/src/music/fretboard.d.ts +17 -0
- package/dist/types/src/music/meter.d.ts +13 -0
- package/dist/types/src/music/notation.d.ts +13 -0
- package/dist/types/src/styles/aksak.d.ts +12 -0
- package/dist/types/src/styles/compound.d.ts +2 -0
- package/dist/types/src/styles/drums.d.ts +33 -0
- package/dist/types/src/styles/index.d.ts +4 -0
- package/dist/types/src/styles/library/afro-cuban.d.ts +2 -0
- package/dist/types/src/styles/library/aksak.d.ts +2 -0
- package/dist/types/src/styles/library/bachata.d.ts +2 -0
- package/dist/types/src/styles/library/baiao.d.ts +2 -0
- package/dist/types/src/styles/library/ballad.d.ts +2 -0
- package/dist/types/src/styles/library/bluegrass.d.ts +2 -0
- package/dist/types/src/styles/library/bolero.d.ts +2 -0
- package/dist/types/src/styles/library/bossa-nova.d.ts +2 -0
- package/dist/types/src/styles/library/calypso.d.ts +2 -0
- package/dist/types/src/styles/library/cha-cha.d.ts +2 -0
- package/dist/types/src/styles/library/choro.d.ts +2 -0
- package/dist/types/src/styles/library/country.d.ts +2 -0
- package/dist/types/src/styles/library/cumbia.d.ts +2 -0
- package/dist/types/src/styles/library/disco.d.ts +2 -0
- package/dist/types/src/styles/library/even-eighths.d.ts +2 -0
- package/dist/types/src/styles/library/funk.d.ts +2 -0
- package/dist/types/src/styles/library/gospel.d.ts +2 -0
- package/dist/types/src/styles/library/gypsy-jazz.d.ts +2 -0
- package/dist/types/src/styles/library/hip-hop.d.ts +2 -0
- package/dist/types/src/styles/library/jazz-waltz.d.ts +2 -0
- package/dist/types/src/styles/library/medium-swing.d.ts +2 -0
- package/dist/types/src/styles/library/merengue.d.ts +2 -0
- package/dist/types/src/styles/library/partido-alto.d.ts +2 -0
- package/dist/types/src/styles/library/pop-rock.d.ts +2 -0
- package/dist/types/src/styles/library/reggae.d.ts +2 -0
- package/dist/types/src/styles/library/rock-12-8.d.ts +2 -0
- package/dist/types/src/styles/library/samba.d.ts +2 -0
- package/dist/types/src/styles/library/second-line.d.ts +2 -0
- package/dist/types/src/styles/library/shuffle.d.ts +2 -0
- package/dist/types/src/styles/library/ska.d.ts +2 -0
- package/dist/types/src/styles/library/slow-blues.d.ts +2 -0
- package/dist/types/src/styles/library/smooth-jazz.d.ts +2 -0
- package/dist/types/src/styles/library/soul.d.ts +2 -0
- package/dist/types/src/styles/library/swing-two-four.d.ts +2 -0
- package/dist/types/src/styles/library/tango.d.ts +2 -0
- package/dist/types/src/styles/library/up-tempo-swing.d.ts +2 -0
- package/dist/types/src/styles/types.d.ts +66 -0
- package/package.json +36 -4
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { DrumName } from './drums.js';
|
|
2
|
+
export type Position = number;
|
|
3
|
+
export type StyleFamily = 'jazz' | 'latin' | 'pop' | 'funk' | 'world';
|
|
4
|
+
export type BassTone = 'R' | '8' | '3' | '5' | '6' | '5-' | '7' | 'app';
|
|
5
|
+
export interface BassNote {
|
|
6
|
+
at: Position;
|
|
7
|
+
dur: number;
|
|
8
|
+
tone: BassTone;
|
|
9
|
+
vel?: number;
|
|
10
|
+
}
|
|
11
|
+
export type ByChordLength<T> = Partial<Record<'1' | '1.5' | '2' | '3' | '4', T[]>>;
|
|
12
|
+
export type BassPart = {
|
|
13
|
+
mode: 'walking';
|
|
14
|
+
program: number;
|
|
15
|
+
range?: [number, number];
|
|
16
|
+
} | {
|
|
17
|
+
mode: 'pattern';
|
|
18
|
+
program: number;
|
|
19
|
+
range?: [number, number];
|
|
20
|
+
patterns: ByChordLength<BassNote[]>;
|
|
21
|
+
};
|
|
22
|
+
export type CompHit = [at: Position, dur: number, vel?: number];
|
|
23
|
+
export interface CompPart {
|
|
24
|
+
program: number;
|
|
25
|
+
voicing: 'rootless' | 'close' | 'guitar';
|
|
26
|
+
velocity: [min: number, max: number];
|
|
27
|
+
rhythms: ByChordLength<CompHit[]>;
|
|
28
|
+
twoBar?: CompHit[][];
|
|
29
|
+
anticipation?: number;
|
|
30
|
+
pedal?: boolean;
|
|
31
|
+
}
|
|
32
|
+
export type DrumHit = [at: Position, drum: DrumName, vel: number, chance?: number, dur?: number];
|
|
33
|
+
export interface Groove {
|
|
34
|
+
bars: 1 | 2;
|
|
35
|
+
beats?: number;
|
|
36
|
+
hits: DrumHit[];
|
|
37
|
+
}
|
|
38
|
+
export interface DrumPart {
|
|
39
|
+
kit: number;
|
|
40
|
+
countIn: DrumHit[];
|
|
41
|
+
grooves: {
|
|
42
|
+
middle: Groove[];
|
|
43
|
+
first?: Groove[];
|
|
44
|
+
last?: Groove[];
|
|
45
|
+
};
|
|
46
|
+
ending: DrumHit[];
|
|
47
|
+
}
|
|
48
|
+
export interface StyleDefinition {
|
|
49
|
+
id: string;
|
|
50
|
+
name: string;
|
|
51
|
+
family: StyleFamily;
|
|
52
|
+
swing: number;
|
|
53
|
+
tempo: {
|
|
54
|
+
default: number;
|
|
55
|
+
min: number;
|
|
56
|
+
max: number;
|
|
57
|
+
};
|
|
58
|
+
bass: BassPart;
|
|
59
|
+
comp: CompPart;
|
|
60
|
+
drums: DrumPart;
|
|
61
|
+
firstChorus?: {
|
|
62
|
+
bass?: BassPart;
|
|
63
|
+
drums?: DrumPart;
|
|
64
|
+
comp?: CompPart;
|
|
65
|
+
};
|
|
66
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,38 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openstand/engine",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Accompaniment engine for OpenStand: generate bass, comping, and drums MIDI from chord charts and iReal Pro links.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MPL-2.0",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"import": "./dist/index.js"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"dist",
|
|
15
|
+
"README.md",
|
|
16
|
+
"LICENSE"
|
|
17
|
+
],
|
|
18
|
+
"sideEffects": false,
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "https://github.com/canbmaj7/openstand",
|
|
22
|
+
"directory": "packages/engine"
|
|
23
|
+
},
|
|
24
|
+
"homepage": "https://github.com/canbmaj7/openstand",
|
|
25
|
+
"keywords": [
|
|
26
|
+
"midi",
|
|
27
|
+
"ireal",
|
|
28
|
+
"backing-track",
|
|
29
|
+
"jazz",
|
|
30
|
+
"chord-chart"
|
|
31
|
+
],
|
|
32
|
+
"publishConfig": {
|
|
33
|
+
"access": "public"
|
|
34
|
+
},
|
|
35
|
+
"engines": {
|
|
36
|
+
"node": ">=20"
|
|
37
|
+
}
|
|
38
|
+
}
|