sky.monome.util.scale
Class Scale


java.lang.Object

  extended by sky.monome.util.scale.Scale


public abstract class Scale
extends java.lang.Object

Musical scale of notes.

Since:
SkyMonome v1.1
Author:
PJ Skyman

Constructor Summary
Scale()
          Constructs a scale.
 
Method Summary
 int getIntervalsSum()
          Returns the sum of all intervals composing this scale.
 int getNotesNumberInOctave()
          Returns the number of notes composing this scale.
 MidiNote[] getScale(MidiNote baseNote, int size)
          Returns an array of Midi notes that represent this scale.
abstract  int[] getScaleOffsets()
          Returns an array of all intervals composing this scale.
abstract  java.lang.String toString()
          Returns a string representation of this scale.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Scale


public Scale()
Constructs a scale.

Method Detail

getScale


public MidiNote[] getScale(MidiNote baseNote,

                           int size)
Returns an array of Midi notes that represent this scale. This array is built with the specified base Midi note and the specified size.

Parameters:
baseNote - Base note of the returned array.
size - Size of the returned array.
Returns:
An array of Midi notes that represent this scale.

getNotesNumberInOctave


public int getNotesNumberInOctave()
Returns the number of notes composing this scale.

Returns:
The number of notes composing this scale.

getIntervalsSum


public int getIntervalsSum()
Returns the sum of all intervals composing this scale. If this method returns 12, so this scale is a standard scale of one octave.

Returns:
The sum of all intervals composing this scale.

getScaleOffsets


public abstract int[] getScaleOffsets()
Returns an array of all intervals composing this scale.

Returns:
An array of all intervals composing this scale.

toString


public abstract java.lang.String toString()
Returns a string representation of this scale.

Overrides:
toString in class java.lang.Object
Returns:
A string representation of this scale.