Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
danigb committed Sep 17, 2024
1 parent 35adff6 commit f042c95
Show file tree
Hide file tree
Showing 10 changed files with 1,514 additions and 2,764 deletions.
4,211 changes: 1,473 additions & 2,738 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/tonal/browser/tonal.min.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions packages/tonal/browser/tonal.min.js.map

Large diffs are not rendered by default.

11 changes: 0 additions & 11 deletions site/app/(home)/page.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,8 @@
import Link from "next/link";

export default function HomePage() {
return (
<main className="flex h-screen flex-col justify-center text-center">
<h1 className="mb-4 text-2xl font-bold">tonal</h1>
<p className="mb-8 text-fd-muted-foreground">A music theory library</p>

<p className="">
<Link
href="/docs"
className="text-fd-foreground font-semibold underline"
>
Documentation
</Link>{" "}
</p>
</main>
);
}
16 changes: 10 additions & 6 deletions site/app/docs/[[...slug]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,16 @@ export default async function Page({
<DocsPage toc={page.data.toc} full={page.data.full}>
<DocsTitle>{page.data.title}</DocsTitle>
{page.data.package ? (
<a href={`https://www.npmjs.com/package/@tonaljs/${page.data.package}`}>
<img
className="rounded-lg"
src={`https://img.shields.io/badge/@tonaljs-${page.data.package.replace("-", "--")}-yellow.svg?style=flat-square`}
/>
</a>
<div className="flex">
<a
href={`https://www.npmjs.com/package/@tonaljs/${page.data.package}`}
>
<img
className="rounded-lg"
src={`https://img.shields.io/badge/@tonaljs-${page.data.package.replace("-", "--")}-yellow.svg?style=flat-square`}
/>
</a>
</div>
) : null}
<DocsDescription>{page.data.description}</DocsDescription>
<DocsBody>
Expand Down
3 changes: 3 additions & 0 deletions site/app/layout.config.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { type HomeLayoutProps } from "fumadocs-ui/home-layout";
import { BookIcon, GithubIcon } from "lucide-react";

/**
* Shared layout configurations
Expand All @@ -14,11 +15,13 @@ export const baseOptions: HomeLayoutProps = {
links: [
{
text: "Documentation",
icon: <BookIcon />,
url: "/docs",
active: "nested-url",
},
{
text: "Repository",
icon: <GithubIcon />,
url: "https://github.com/tonaljs/tonal",
},
],
Expand Down
9 changes: 6 additions & 3 deletions site/content/docs/basics/intervals.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
---
title: Intervals
description: Parse and manipulate notes
description: Calculate and manipulate intervals
package: interval
---

`Intervals` module allow to do distance calculations between notes using intervals, obtain information and do calculations:

```js
import { Interval } from "tonal";

Interval.distance("C4", "G4"); // => "5P"
Interval.invert("2M"); // => "7m"
Interval.simplify("9M"); // => "2M"
Interval.semitones("P4"); // => 5
Interval.distance("C4", "G4"); // => "5P"
Interval.semitones("4P"); // => 5
Interval.add("4P", "2M"); // => "5P"
```

## Interval properties
Expand Down
7 changes: 5 additions & 2 deletions site/content/docs/groups/pitch-class-sets.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
---
title: Pitch Class Sets
package: pcset
description: Compare collections of notes
---

A pitch class set is a set (no repeated) of pitch classes (notes without octaves). Pitch classes are useful to identify musical structures (if two chords are related, for example)
A pitch class set is a no repeated collection (set) of notes without octaves (pitch classes).

Pitch classes are useful to identify musical structures (if two chords are related, for example)

```js
import { Pcset } from "tonal";
Expand Down Expand Up @@ -83,7 +86,7 @@ Pcset.notes("101011010110"); // => ["C", "D", "E", "F", "G", "A", "Bb"]
Test if a note is included in the given set. This function is currified:

```js
const isInCTriad = isNoteIncludedIn(["C", "E", "G"]);
const isInCTriad = isIncludedIn(["C", "E", "G"]);
isInCTriad("C4"); // => true
isInCTriad("C#4"); // => false
```
Expand Down
1 change: 1 addition & 0 deletions site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"fumadocs-mdx": "10.0.2",
"fumadocs-ui": "13.4.10",
"gh-pages": "^6.1.1",
"lucide-react": "^0.441.0",
"next": "^14.2.8",
"react": "^18.3.1",
"react-dom": "^18.3.1",
Expand Down
12 changes: 12 additions & 0 deletions site/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f042c95

Please sign in to comment.