:guitar: Music Theory in Code.
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.
Installation:
# Using npm
npm install note-art
# Using yarn
yarn add note-art
Note-art is fully written in TS and offers functions that can achieve any music theory related task you desire.
import { transpose } from 'note-art'
// PitchClass
transpose('A', 5) // 'D'
// Note
transpose('A3', 5) // 'D4'
// Group of notes(can represent a chord, scale or anything else)
const notes = ['C3', 'E3', 'G3']
notes.map(note => transpose(note, 7)) // ['G3', 'B3', 'D4']
import { noteFromFrequency, intervalsToNotes, invertChord };
noteFromFrequency(440) // A4
const majorChordPattern = [0, 4, 7];
const cMajorChord = intervalsToNotes('C3', majorChordPattern) // ['C3', 'E3', 'G3']
const cMajorFirstInversion = invertChord(cMajorChord, 1); // ['E3', 'G3', 'C4']
Check out the API for more.
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.
Create music theory functions - pitch class, note, chord, etc…
Re-implement Music notation.
Sean Dvir - seandvir12@gmail.com"">seandvir12@gmail.com - @seanitzel
Your welcome to mail me your ideas and recommendations!
Note-Art uses the MIT license, check out the license tab for more information.