1.0.13 • Published 6 months ago

code-to-music v1.0.13

Weekly downloads
-
License
ISC
Repository
github
Last release
6 months ago

Code To Music

As simple as posible api for produce melody on JS

Installation

Install my-project with npm

  npm install code-to-music

Usage/Examples

import { Note, produceMelody } from "code-to-music";

const greenTreeMelody: Note[] = [
  { pitch: "E4", duration: 4 },
  { pitch: "C#4", duration: 8 },
  { pitch: "C#4", duration: 8 },
  { pitch: "E4", duration: 4 },
  { pitch: "C#4", duration: 8 },
  { pitch: "C#4", duration: 8 },
  { pitch: "E4", duration: 8 },
  { pitch: "D4", duration: 8 },
  { pitch: "C#4", duration: 8 },
  { pitch: "B3", duration: 8 },
  { pitch: "A3", duration: 2 },
  { pitch: "F#4", duration: 4 },
  { pitch: "A4", duration: 8 },
  { pitch: "F#4", duration: 8 },
  { pitch: "E4", duration: 4 },
  { pitch: "C#4", duration: 8 },
  { pitch: "C#4", duration: 8 },
  { pitch: "E4", duration: 8 },
  { pitch: "D4", duration: 8 },
  { pitch: "C#4", duration: 8 },
  { pitch: "B3", duration: 8 },
  { pitch: "A3", duration: 2 },
];

produceMelody(greenTreeMelody, 120);
1.0.11

6 months ago

1.0.10

6 months ago

1.0.13

6 months ago

1.0.12

6 months ago

1.0.9

6 months ago

1.0.8

6 months ago

1.0.7

6 months ago

1.0.6

6 months ago

1.0.5

7 months ago

1.0.4

7 months ago

1.0.3

7 months ago

1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago