This module provides classes and functions for working with music theory concepts like a Note
, Interval
, Chord
, or Scale
.
Example 1
import { MajorScale, Note } from "@aviato/music-theory"; const middleC = new Note("C4"); // Note { name: "C4", pitchClass: "C", octave: 4, accidental: "", freq: 261.63 } const cMajorScale = new MajorScale(middleC); // Scale { name: "Major", notes: [Note { name: "C4", pitchClass: "C", octave: 4, accidental: "", freq: 261.63 }, ...] }
Add Package
deno add jsr:@aviato/music-theory
Import symbol
import * as music_theory from "@aviato/music-theory";
---- OR ----
Import directly with a jsr specifier
import * as music_theory from "jsr:@aviato/music-theory";
Add Package
npx jsr add @aviato/music-theory
Import symbol
import * as music_theory from "@aviato/music-theory";
Add Package
yarn dlx jsr add @aviato/music-theory
Import symbol
import * as music_theory from "@aviato/music-theory";
Add Package
pnpm dlx jsr add @aviato/music-theory
Import symbol
import * as music_theory from "@aviato/music-theory";
Add Package
bunx jsr add @aviato/music-theory
Import symbol
import * as music_theory from "@aviato/music-theory";