module MusicUtils

Music utils

Constants

VERSION

Public Class Methods

high_note(from, short) click to toggle source

Returns the second note of an interval calculates from its first note and number and quality in short notation

# File lib/music-utils.rb, line 31
def MusicUtils.high_note(from, short)
  Interval.high_note(from, short)
end
number(note1, note2, step = 0) click to toggle source

Returns the number of the interval

# 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) click to toggle source

Returns the quality of interval

# File lib/music-utils.rb, line 19
def MusicUtils.quality(note1, note2, step = 0)
  Interval.new(note1, note2, step).quality
end
scale(from, scale) click to toggle source

Returns a scale

# File lib/music-utils.rb, line 36
def MusicUtils.scale(from, scale)
  Scales.scale(from, scale)
end
semitones(note1, note2, step = 0) click to toggle source

Returns semitones of interval

# 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) click to toggle source

Returns short notation

# File lib/music-utils.rb, line 24
def MusicUtils.short(note1, note2, step = 0)
  Interval.new(note1, note2, step).short
end