Skip to content

Commit 3413afa

Browse files
authored
feat: add missing docs (#464)
* feat: add missing docs * chore: fix gh-deploy command
1 parent 01a4fcb commit 3413afa

File tree

9 files changed

+1180
-1466
lines changed

9 files changed

+1180
-1466
lines changed

README.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,7 @@ transpose("A4", "P5");
9999

100100
## Documentation
101101

102-
Generally, you just need to install `tonal` package (before it was called `@tonaljs/tonal`).
103-
104-
The API documentation is inside README.md of each module 👇
102+
Visit the [documentation site](https://tonaljs.github.io/tonal/docs) or the README.md of each module 👇
105103

106104
#### Notes and intervals
107105

site/content/docs/dictionaries/chord-types.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: Chord dictionary
33
description: A dictionary of musical chords.
4+
package: ChordType
45
---
56

67
```js

site/content/docs/dictionaries/scale-types.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
title: Scale dictionary
3+
description: A dictionary of musical scales.
4+
package: ScaleType
35
---
46

5-
A dictionary of musical scales.
6-
77
```js
88
import { ScaleType } from "tonal";
99
```

site/content/docs/harmony/keys.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: Keys
33
description: Key scales and chords
4+
package: Key
45
---
56

67
Obtain information of a key's scales and chords:

site/content/docs/harmony/progressions.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: Progressions
33
description: Parse and create harmonic progressions
4+
package: Progression
45
---
56

67
```js

site/content/docs/notation/abc-notation.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: ABC Notation
33
description: Convert note names between scientific and abc notation
4+
package: AbcNotation
45
---
56

67
```js
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,51 @@
11
---
22
title: Roman Numerals
3+
description: Functions to parse roman numerals
4+
package: RomanNumeral
35
---
6+
7+
A roman numeral symbol is a string like `"bVIImaj7"` that can be used to represent chords in an abstract tonality.
8+
9+
```js
10+
import { RomanNumeral } from "tonal";
11+
```
12+
13+
## API
14+
15+
### `RomanNumeral.get(src: string | Pitch): => RomanNumeral`
16+
17+
Get the properties of a roman numeral:
18+
19+
Example:
20+
21+
```js
22+
RomanNumeral.get("bVIIMaj7");
23+
// =>
24+
// {
25+
// empty: false,
26+
// name: "bVIIMaj7",
27+
// roman: "VII",
28+
// acc: "b",
29+
// chordType: "Maj7",
30+
// alt: -1,
31+
// step: 6,
32+
// major: true,
33+
// oct: 0
34+
// }
35+
```
36+
37+
## FAQ
38+
39+
#### How do I get a roman numeral from an interval
40+
41+
`romanNumeral` function accepts a `Pitch` as argument:
42+
43+
```js
44+
import { Interval, RomanNumeral } from "tonal";
45+
46+
RomanNumeral.get(Interval.get("3m")).name; // => "bIII"
47+
```
48+
49+
## Related
50+
51+
Take a look to [@tonal/progression](https://github.com/tonaljs/tonal/tree/master/packages/progression) or [@tonal/key](https://github.com/tonaljs/tonal/tree/master/packages/key)

site/package.json

+9-9
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,29 @@
88
"start": "next start",
99
"postinstall": "fumadocs-mdx",
1010
"deploy": "npm run deploy:build && npm run deploy:fix && npm run deploy:github",
11-
"deploy:github": "gh-pages -d out/ -t true",
11+
"deploy:github": "gh-pages -d out/ -t",
1212
"deploy:build": "DEPLOY=true next build",
1313
"deploy:fix": "cp out/docs.html out/docs/index.html"
1414
},
1515
"dependencies": {
1616
"fumadocs-core": "13.4.10",
1717
"fumadocs-mdx": "10.0.2",
1818
"fumadocs-ui": "13.4.10",
19-
"gh-pages": "^6.1.1",
19+
"gh-pages": "^6.3.0",
2020
"lucide-react": "^0.441.0",
21-
"next": "^14.2.8",
21+
"next": "^14.2.24",
2222
"react": "^18.3.1",
2323
"react-dom": "^18.3.1",
24-
"zod": "^3.23.8"
24+
"zod": "^3.24.2"
2525
},
2626
"devDependencies": {
2727
"@types/mdx": "^2.0.13",
2828
"@types/node": "22.5.4",
29-
"@types/react": "^18.3.5",
30-
"@types/react-dom": "^18.3.0",
29+
"@types/react": "^18.3.18",
30+
"@types/react-dom": "^18.3.5",
3131
"autoprefixer": "^10.4.20",
32-
"postcss": "^8.4.45",
33-
"tailwindcss": "^3.4.10",
34-
"typescript": "^5.5.4"
32+
"postcss": "^8.5.3",
33+
"tailwindcss": "^3.4.17",
34+
"typescript": "^5.8.2"
3535
}
3636
}

site/pnpm-lock.yaml

+1,116-1,452
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)