uk.org.toot.music.tonality
Class ChordMode

java.lang.Object
  extended by uk.org.toot.music.tonality.ChordMode

public class ChordMode
extends java.lang.Object

This class provides static methods to operate on int arrays rerpesenting chord modes. A chord mode is the mode derived from a particular index into a Scale. So called because it 'contains' every diatonic chord from that index of a Scale. Constants SECUNDAL, TERTIAN and QUARTAL are provided for typical chord construction.

Author:
st

Field Summary
static int QUARTAL
          Diminished or perfect fourths.
static int SECUNDAL
          Minor or major seconds.
static int TERTIAN
          Minor or major thirds (conventional chord construction).
 
Method Summary
static int[] getIntervals(int[] chordMode, int poly, int lowInterval)
           
static boolean hasInterval(int[] chordMode, int interval)
          Return whether the chord mode contains the specified interval.
static int interval(int[] chordMode, int index)
          Return the interval of the index of the chord mode
static int interval(int[] chordMode, int index1, int index2)
          Return the interval from index1 to index2 of the chord mode If index2 is less than index1, the interval for index2 is raised by an octave
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SECUNDAL

public static final int SECUNDAL
Minor or major seconds.

See Also:
Constant Field Values

TERTIAN

public static final int TERTIAN
Minor or major thirds (conventional chord construction).

See Also:
Constant Field Values

QUARTAL

public static final int QUARTAL
Diminished or perfect fourths.

See Also:
Constant Field Values
Method Detail

interval

public static int interval(int[] chordMode,
                           int index)
Return the interval of the index of the chord mode

Parameters:
chordMode - the intevals of the chord mode
index -
Returns:
the interval

interval

public static int interval(int[] chordMode,
                           int index1,
                           int index2)
Return the interval from index1 to index2 of the chord mode If index2 is less than index1, the interval for index2 is raised by an octave

Parameters:
chordMode - the intevals of the chord mode
index1 -
index2 -
Returns:
the interval

getIntervals

public static int[] getIntervals(int[] chordMode,
                                 int poly,
                                 int lowInterval)
Parameters:
chordMode - the intervals of the chord mode
poly - the requested polyphony 1..7 but less intervals may be returned
lowInterval - SECUNDAL, TERTIAN or QUARTAL the lower of the two allowed intervals, add 1 for higher allowed interval tertian may be two octaves of intervals so secundal will be less than 2 octaves of intervals? and quartal may be more than 2 octaves of intervals?
Returns:
the intervals of the chord with the specified polyphony

hasInterval

public static boolean hasInterval(int[] chordMode,
                                  int interval)
Return whether the chord mode contains the specified interval.

Parameters:
chordMode - the intervals of the chord mode
interval -
Returns:
true if chordMode contains interval, false otherwise.


Copyright © 2004, 2005, 2006, 2007 Steve Taylor. All Rights Reserved.