Skip to content

Commit ac144b0

Browse files
committed
Write API summary
1 parent bcd912e commit ac144b0

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

pkgs/harnica-lib/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,20 @@
22

33
`Harnica` is a TypeScript implementation of music theory (hype)
44
It can be parsing / building chord note and suggesting next/related chord.
5+
6+
## API Summary
7+
8+
- `parseChordProgression(progStr: string, defaultKey?: string, sigBeats?: number, baseOctave?: number): NoteFragmentType[]`
9+
Parsing chord progression by `progStr`
10+
Ex. `'Key=C C | D | E'`, or degree `'Key=C I | II | III'`
11+
- `progressionToMidi(progStr: string, defaultKey: string, beats?: number): { mime: string, buffer: Uint8Array }`
12+
Generate MIDI binary by chord progression (`progStr`)
13+
- `parseStringAsSingleChordNote(str: string, defaultKey?: string, baseOctabe?: number): NoteFragment.ChordNote | null`
14+
- `analysis.getRelationBetweenNotes(fromNote: NoteFragment.ChordNote, toNote: NoteFragment.ChordNote): Maybe<RelationResult>`
15+
Get the relationship on the chord progression
16+
- `analysis.getChordFunctionOnKey(chord: string, key: string): Maybe<ChordFunctionMatch>`
17+
Get chord's function (likes tonic, dominant, sub dominant) on `key`
18+
- `analysis.getAsFunctionOnScales(chord: string, key: string): Maybe<{ [keyName: string]: Array<keyof ChordFunctionMatch> }>`
19+
Get the function on a different scale of codes
20+
- `suggests.*`
21+
Suggestion functions

0 commit comments

Comments
 (0)