0.0
No commit activity in last 3 years
No release in over 3 years
Utils to classify music intervals, create scales and more. See README.md and CHANGELOG.md on homepage for more info.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 1.0.15
>= 0.8
>= 0
 Project Readme

music-utils

Utils to clasify music intervals, create scales and more.

Examples

Intervals

Simples:

MusicUtils.number(:do, :mi)                   #=> 3 (3th)
MusicUtils.semitones(:do, :mi)                #=> 4 (semi-tones)
MusicUtils.quality(:do, :mi)                  #=> M (major)

Compounds:

MusicUtils.number(:do, :mi, 1)                #=> 10 (10th)
MusicUtils.semitones(:do, :mi, 1)             #=> 16 (semi-tones)
MusicUtils.quality(:do, :mi, 1)               #=> M (major)

Short Notation:

MusicUtils.short(:do, :mi)                    #=> M3
MusicUtils.short(:do, :mi, 1)                 #=> M10

Highest note of interval:

MusicUtils.high_note(:do, :P5)                #=> :sol
MusicUtils.high_note(:fas, :m3)               #=> :la

Scales

Create scales:

MusicUtils.scale(:fa, MusicUtils::MAJ_SCALE)  #=> [:fa, :sol, :la, :sib, :do, :re, :mi]

Installation

gem install music-utils

Usage

The MusicUtils module has constants to refer to common items like notes and scales.

require 'music-utils'

MusicUtils.short(MusicUtils::SOL, MusicUtils::DOF)
MusicUtils.scale(MusicUtils::SOL, MusicUtils::MAJ_SCALE)

Testing

To run the tests:

$ bin/rake

or:

$ ruby bin/rake

To Do

  • Add validations (notes, alterations, etc)
  • Add other scales structures and its tests

Copyright

Copyright (c) 2011 Jorge Luis PĂ©rez. See LICENSE for details.