Search results

Types

Classes
Interfaces
Enums
Functions
Type aliases
Constants

Members

Properties
Methods
Getters
Setters
Enum members
Show privates

Other

In this module only

Module note-art[src]

Note-Art JS :guitar:

:fire: Downloads   Build Status   Maintainability   Test Coverage   License: MIT :fire:

Demo (outdated) :musical_note: | API :blue_book:

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

  • Create Notes, Chords, Scales and more easily.
  • Designed to be simple and intuitive.
  • Easily integrate with other music libraries to play music in the browser - You can use libraries like ToneJS to easily play scales, chords and even scores you create with Note-Art.
  • Use this library to create tools for musicians, research music theory, just create some fun music with programming and much more!

Features

  1. Transpose, generate chords and scales easily, invert chords.
  2. Tons of music theory utilities, e.g getting the interval between 2 notes, normalizing notes, getting the enharmonic pitch class, converting sharps to flats and a lot more.

Getting Started

Installation:

# Using npm
npm install note-art

# Using yarn
yarn add note-art

Usage

Note-art is fully written in TS and offers functions that can achieve any music theory related task you desire.

Theory Functions

  • patterns are in semi-tones.
Transpose any pitch class, note or group of notes easily
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'] 
Other functions
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.

Contribute and Support :pray:

  • Make a pull request :avocado:.

    • 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 on the google play store

    • Music Guru - which can generate and play any scale in the history of mankind on google play.

Todo:

  • Create music theory functions - pitch class, note, chord, etc... :heavy_check_mark:

  • Re-implement Music notation.

Contact

Sean Dvir - seandvir12@gmail.com - @seanitzel

Your welcome to mail me your ideas and recommendations!

License

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

Exports

transposePitchClassfunction transposePitchClasstransposePitchClass
transposeNotefunction transposeNotetransposeNote
transposefunction transposetranspose
noteFromFrequencyfunction noteFromFrequencynoteFromFrequency
intervalsToNotesfunction intervalsToNotesintervalsToNotes
invertChordfunction invertChordinvertChord
scaleDegreefunction scaleDegreescaleDegree
getChordFromScalefunction getChordFromScalegetChordFromScale
scaleToChordsfunction scaleToChordsscaleToChords
PITCH_STANDARDconst PITCH_STANDARDPITCH_STANDARD
NUMBER_OF_PITCH_CLASSESconst NUMBER_OF_PITCH_CLASSESNUMBER_OF_PITCH_CLASSES
SEMITONEconst SEMITONESEMITONE
SHARP_CLASS_NOTESconst SHARP_CLASS_NOTESSHARP_CLASS_NOTES
FLAT_CLASS_NOTESconst FLAT_CLASS_NOTESFLAT_CLASS_NOTES
PITCH_CLASS_LETTERSconst PITCH_CLASS_LETTERSPITCH_CLASS_LETTERS
PITCH_CLASSESconst PITCH_CLASSESPITCH_CLASSES
INTERVALSconst INTERVALSINTERVALS
OCTAVES_ON_PIANOconst OCTAVES_ON_PIANOOCTAVES_ON_PIANO
NOTE_DURATIONSconst NOTE_DURATIONSNOTE_DURATIONS
TIME_SIG_NUMERATORSconst TIME_SIG_NUMERATORSTIME_SIG_NUMERATORS
NOTE_DURATIONS_AS_SIZE_IN_MEASUREconst NOTE_DURATIONS_AS_SIZE_IN_MEASURENOTE_DURATIONS_AS_SIZE_IN_MEASURE
NoteAsObjecttype NoteAsObjectNoteAsObject
PitchClassLettertype PitchClassLetterPitchClassLetter
Accidentaltype AccidentalAccidental
Octavetype OctaveOctave
FlatPitchClasstype FlatPitchClassFlatPitchClass
SharpPitchClasstype SharpPitchClassSharpPitchClass
PitchClasstype PitchClassPitchClass
Notetype NoteNote
RawPitchClasstype RawPitchClassRawPitchClass
RawFlatPitchClasstype RawFlatPitchClassRawFlatPitchClass
RawSharpPitchClasstype RawSharpPitchClassRawSharpPitchClass
Chordtype ChordChord
Scaletype ScaleScale
NoteDurationtype NoteDurationNoteDuration

Re-Exports

exports * from utilitiesmodule utilitiesutilities
exports * from notationmodule notationnotation