/Users/lyon/j4p/src/sound/musica/ScaleManager.java

1    /** 
2     * Created by IntelliJ IDEA. 
3     * User: dlyon 
4     * Date: Oct 27, 2003 
5     * Time: 2:15:52 PM 
6     * To change this template use Options | File Templates. 
7     */ 
8    package sound.musica; 
9     
10   public class ScaleManager  { 
11       //- Define Scales 
12       private  ScaleContainer sc = new ScaleContainer(); 
13       public  int[] MAJOR = {0, 2, 2, 1, 2, 2, 2 }; 
14       public static  int[] BLACK_KEYS = {1, 2, 3, 2, 2}; 
15       public static  int[] IONIAN = { 
16           0, 2, 2, 1, 2, 2, 2 
17       }; 
18       public static  int[] HARMONIC_MINOR = { 
19           0, 2, 1, 2, 2, 1, 3 
20       }; 
21       public static  int[] GYPSY = { 
22           0, 1, 3, 1, 1, 2, 1, 2 
23       }; 
24    
25       public ScaleManager(){ 
26           int foo[] = {1,2}; 
27           sc.add(new Scale("major",new int[]{0, 2, 2, 1, 2, 2, 2 })); 
28           sc.add(new Scale("black keys",new int[]{1, 2, 3, 2, 2})); 
29       } 
30       public void printScales() { 
31           System.out.println(this); 
32       } 
33       public String toString() { 
34           return sc.toString(); 
35       } 
36    
37       public ScaleContainer getScaleContainer() { 
38           return sc; 
39       } 
40    
41       // Testing Scales 
42       public static void main(String[] args) { 
43           ScaleManager sm = new ScaleManager(); 
44           System.out.println(sm); 
45       } 
46   } 
47