com.softsynth.jmsl
Class KeyTranslator

java.lang.Object
  extended by com.softsynth.jmsl.Translator
      extended by com.softsynth.jmsl.KeyTranslator

public class KeyTranslator
extends Translator

KeyTranslator provides translation for commonly used scales.

Author:
Phil Burk and Nick Didkovsky

Field Summary
static int KEY_A
           
static int KEY_A_SHARP
           
static int KEY_B
           
static int KEY_C
           
static int KEY_C_SHARP
           
static int KEY_D
           
static int KEY_D_SHARP
           
static int KEY_E
           
static int KEY_F
           
static int KEY_F_SHARP
           
static int KEY_G
           
static int KEY_G_SHARP
           
 
Constructor Summary
KeyTranslator()
           
 
Method Summary
static void main(java.lang.String[] args)
           
static int qa()
          Quality assurance test.
 void useHarmonicMinorScale(int key)
          Setup translator to generate pitches in a HarmonicMinor scale.
 void useHungarianMinorScale(int key)
          Setup translator to generate pitches in a Hungarian Minor scale.
 void useMajorScale(int key)
          Setup translator to generate pitches in a Major scale.
 void usePentatonicScale(int key)
          Setup translator to generate pitches in a Pentatonic scale.
 void useRumanianMinorScale(int key)
          Setup translator to generate pitches in a Rumanian Minor scale.
 
Methods inherited from class com.softsynth.jmsl.Translator
detranslate, setArray, setModulus, setOffset, translate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KEY_C

public static final int KEY_C
See Also:
Constant Field Values

KEY_C_SHARP

public static final int KEY_C_SHARP
See Also:
Constant Field Values

KEY_D

public static final int KEY_D
See Also:
Constant Field Values

KEY_D_SHARP

public static final int KEY_D_SHARP
See Also:
Constant Field Values

KEY_E

public static final int KEY_E
See Also:
Constant Field Values

KEY_F

public static final int KEY_F
See Also:
Constant Field Values

KEY_F_SHARP

public static final int KEY_F_SHARP
See Also:
Constant Field Values

KEY_G

public static final int KEY_G
See Also:
Constant Field Values

KEY_G_SHARP

public static final int KEY_G_SHARP
See Also:
Constant Field Values

KEY_A

public static final int KEY_A
See Also:
Constant Field Values

KEY_A_SHARP

public static final int KEY_A_SHARP
See Also:
Constant Field Values

KEY_B

public static final int KEY_B
See Also:
Constant Field Values
Constructor Detail

KeyTranslator

public KeyTranslator()
Method Detail

useMajorScale

public void useMajorScale(int key)
Setup translator to generate pitches in a Major scale. ( 0, 2, 4, 5, 7, 9, 11 )


useHarmonicMinorScale

public void useHarmonicMinorScale(int key)
Setup translator to generate pitches in a HarmonicMinor scale. ( 0 2 3 5 7 8 11 )


usePentatonicScale

public void usePentatonicScale(int key)
Setup translator to generate pitches in a Pentatonic scale. ( 0 2 4 7 9 )


useHungarianMinorScale

public void useHungarianMinorScale(int key)
Setup translator to generate pitches in a Hungarian Minor scale. ( 0 2 3 6 7 8 11 )


useRumanianMinorScale

public void useRumanianMinorScale(int key)
Setup translator to generate pitches in a Rumanian Minor scale. ( 0 2 3 6 7 9 10 )


qa

public static int qa()
Quality assurance test.

Returns:
0 or error index.

main

public static void main(java.lang.String[] args)