Module: MusicUtils
- Includes:
- Scales
- Defined in:
- lib/music-utils.rb,
lib/music-utils/version.rb,
lib/music-utils/note/note.rb,
lib/music-utils/scales/scales.rb,
lib/music-utils/interval/interval.rb
Overview
Music utils
Defined Under Namespace
Modules: Scales Classes: Interval, Note
Constant Summary collapse
- VERSION =
'1.1.2'
Constants included from Scales
Scales::AUG, Scales::AUGP, Scales::CROMATIC_SCALE, Scales::DFLAT, Scales::DIATONIC_SCALE, Scales::DIM, Scales::DIMP, Scales::DO, Scales::DOF, Scales::DOFF, Scales::DOS, Scales::DOSS, Scales::DSHARP, Scales::FA, Scales::FAF, Scales::FAFF, Scales::FAS, Scales::FASS, Scales::FLAT, Scales::LA, Scales::LAF, Scales::LAFF, Scales::LAS, Scales::LASS, Scales::MAJ, Scales::MAJ_SCALE, Scales::MELODIC_MIN_SCALE, Scales::MI, Scales::MIF, Scales::MIFF, Scales::MIN, Scales::MIS, Scales::MISS, Scales::NATURAL_MIN_SCALE, Scales::PERF, Scales::QUALITIES, Scales::RE, Scales::REF, Scales::REFF, Scales::RES, Scales::RESS, Scales::SHARP, Scales::SI, Scales::SIF, Scales::SIFF, Scales::SIS, Scales::SISS, Scales::SOL, Scales::SOLF, Scales::SOLFF, Scales::SOLS, Scales::SOLSS
Class Method Summary collapse
-
.number(note1, note2, step = 0) ⇒ Object
Returns the number of the interval.
-
.quality(note1, note2, step = 0) ⇒ Object
Returns the quality of interval.
-
.scale(from, scale) ⇒ Object
Returns a scale.
-
.semitones(note1, note2, step = 0) ⇒ Object
Returns semitones of interval.
-
.short(note1, note2, step = 0) ⇒ Object
Returns short notation.
Methods included from Scales
Class Method Details
.number(note1, note2, step = 0) ⇒ Object
Returns the number of the interval
9 10 11 |
# File 'lib/music-utils.rb', line 9 def MusicUtils.number(note1, note2, step = 0) Interval.new(note1, note2, step).number end |
.quality(note1, note2, step = 0) ⇒ Object
Returns the quality of interval
19 20 21 |
# File 'lib/music-utils.rb', line 19 def MusicUtils.quality(note1, note2, step = 0) Interval.new(note1, note2, step).quality end |
.scale(from, scale) ⇒ Object
Returns a scale
29 30 31 |
# File 'lib/music-utils.rb', line 29 def MusicUtils.scale(from, scale) Scales.scale(from, scale) end |
.semitones(note1, note2, step = 0) ⇒ Object
Returns semitones of interval
14 15 16 |
# File 'lib/music-utils.rb', line 14 def MusicUtils.semitones(note1, note2, step = 0) Interval.new(note1, note2, step).semitones end |
.short(note1, note2, step = 0) ⇒ Object
Returns short notation
24 25 26 |
# File 'lib/music-utils.rb', line 24 def MusicUtils.short(note1, note2, step = 0) Interval.new(note1, note2, step).short end |