/Note-Art

:guitar: Music Theory in Code.

Primary LanguageJavaScriptMIT LicenseMIT

Note-Art JS 🎸

🔥 Downloads   Build Status   Maintainability   Test Coverage   License: MIT 🔥


Music is a highly versatile art that originates in nature, and has been taken up by mankind as a way of expression and also as an art. Now, it's going to be taken up by machines as well.


Table of Contents

About 🎶

  • This project aims to create the ultimate music library, including:

    • Music Theory
    • Music Notation
    • Instruments
    • Scheduling and playing Music(using Tone JS)
    • Audio Feature Extraction(Not implemented yet)
  • Designed to be simple and intuitive.

  • Use this library to create tools for musicians, research music theory, just create some fun music with programming and much more!

Features

  1. Create Notes, Chords, Scales and more, and extract information from them.
  2. Create full musical pieces with multiple instruments.
  3. Play music right away using built in Instruments (or easily create your own).

Getting Started

To Start create a new node project(or go to an existing one).
install note-art -

npm install note-art

Usage

import {Note, Chord, Scale} from 'note-art'

// Note

const A = new Note(note: 'a', octave: 4)

console.log(A)      // A4

console.log(A.frequency) // outputs 440

const fourth = A.interval(5) // fourth is the note E with octave 5

console.log(fourth) // E4

//Chord

const A_M = new Chord({note: A, name: 'Major'})

console.log(A_M.pitchClasses) // A4, C5, E5

//Scale

const C_Major = new Scale({tonic: new Note('c', 3), name: 'Major'})

console.log(A_Major.notesString) // C3, D3, E3, F3, G3, A3, B3

See the docs for more

Contribute and Support 🙏

  • Make a pull request 🥑.

    • Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

      1. Fork the Project
      2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
      3. Commit your Changes (`git commit -m 'Add some AmazingFeature`)
      4. Push to the Branch (`git push origin feature/AmazingFeature`)
      5. Open a Pull Request
      
  • Support me on patreon.

  • Download my app - Scale Heaven - which can generate and play any scale in the history of mankind on google play (and press the banner once in a while ;)).

Todo:

  • Create base music models - pitch class, note, chord, etc... ✔️

  • Create instrument models that can play notes. ✔️

  • Implement Music notation. ✔️

  • Create scheduling and automation for playing music pieces with an arbitrary instrument. ✔️

  • Add static and dynamic audio feature extraction.

  • Add more instruments.

Contact

Sean Dvir - seandvir12@gmail.com - @seanitzel

Your welcome to mail me your ideas and recommendations!

Credits

Tone JS - I used this awesome framework which wraps the web audio API for all audio handling and scheduling.

License

Note-Art uses the MIT license, check out the license tab for more information.