@Test public void testOrderStartAtA() { assertEquals(0, new Note("a2.wav").orderStartAtA()); assertEquals(1, new Note("a#2.wav").orderStartAtA()); assertEquals(2, new Note("b2.wav").orderStartAtA()); assertEquals(3, new Note("c2.wav").orderStartAtA()); assertEquals(4, new Note("c#2.wav").orderStartAtA()); assertEquals(5, new Note("d2.wav").orderStartAtA()); assertEquals(6, new Note("d#2.wav").orderStartAtA()); assertEquals(7, new Note("e2.wav").orderStartAtA()); assertEquals(8, new Note("f2.wav").orderStartAtA()); assertEquals(9, new Note("f#2.wav").orderStartAtA()); assertEquals(10, new Note("g2.wav").orderStartAtA()); assertEquals(11, new Note("g#2.wav").orderStartAtA()); }
public int orderStartAtA() { if ("a".equals(name)) { if("#".equals(sign)){ return 1; } else if("b".equals(sign)){ return 12; } else return 0; } else if ("b".equals(name)) { if("#".equals(sign)){ return 3; } else if("b".equals(sign)){ return 1; } else { return 2; } } else if ("c".equals(name)) { if("#".equals(sign)){ return 4; } else if("b".equals(sign)){ return 2; } else { return 3; } } else if ("d".equals(name)) { if("#".equals(sign)){ return 6; } else if("b".equals(sign)){ return 4; } else { return 5; } } else if ("e".equals(name)) { if("#".equals(sign)){ return 8; } else if("b".equals(sign)){ return 6; } else { return 7; } } else if ("f".equals(name)) { if("#".equals(sign)){ return 9; } else if("b".equals(sign)){ return 7; } else { return 8; } } else if ("g".equals(name)) { if("#".equals(sign)){ return 11; } else if("b".equals(sign)){ return 9; } else { return 10; } } return -1; }
Note extends EzRgx { public int orderStartAtA() { if ("a".equals(name)) { if("#".equals(sign)){ return 1; } else if("b".equals(sign)){ return 12; } else return 0; } else if ("b".equals(name)) { if("#".equals(sign)){ return 3; } else if("b".equals(sign)){ return 1; } else { return 2; } } else if ("c".equals(name)) { if("#".equals(sign)){ return 4; } else if("b".equals(sign)){ return 2; } else { return 3; } } else if ("d".equals(name)) { if("#".equals(sign)){ return 6; } else if("b".equals(sign)){ return 4; } else { return 5; } } else if ("e".equals(name)) { if("#".equals(sign)){ return 8; } else if("b".equals(sign)){ return 6; } else { return 7; } } else if ("f".equals(name)) { if("#".equals(sign)){ return 9; } else if("b".equals(sign)){ return 7; } else { return 8; } } else if ("g".equals(name)) { if("#".equals(sign)){ return 11; } else if("b".equals(sign)){ return 9; } else { return 10; } } return -1; } }
Note extends EzRgx { public int orderStartAtA() { if ("a".equals(name)) { if("#".equals(sign)){ return 1; } else if("b".equals(sign)){ return 12; } else return 0; } else if ("b".equals(name)) { if("#".equals(sign)){ return 3; } else if("b".equals(sign)){ return 1; } else { return 2; } } else if ("c".equals(name)) { if("#".equals(sign)){ return 4; } else if("b".equals(sign)){ return 2; } else { return 3; } } else if ("d".equals(name)) { if("#".equals(sign)){ return 6; } else if("b".equals(sign)){ return 4; } else { return 5; } } else if ("e".equals(name)) { if("#".equals(sign)){ return 8; } else if("b".equals(sign)){ return 6; } else { return 7; } } else if ("f".equals(name)) { if("#".equals(sign)){ return 9; } else if("b".equals(sign)){ return 7; } else { return 8; } } else if ("g".equals(name)) { if("#".equals(sign)){ return 11; } else if("b".equals(sign)){ return 9; } else { return 10; } } return -1; } Note();  Note(String filename);  Note(File file);  Note(File file, NoteParser parser); }
Note extends EzRgx { public int orderStartAtA() { if ("a".equals(name)) { if("#".equals(sign)){ return 1; } else if("b".equals(sign)){ return 12; } else return 0; } else if ("b".equals(name)) { if("#".equals(sign)){ return 3; } else if("b".equals(sign)){ return 1; } else { return 2; } } else if ("c".equals(name)) { if("#".equals(sign)){ return 4; } else if("b".equals(sign)){ return 2; } else { return 3; } } else if ("d".equals(name)) { if("#".equals(sign)){ return 6; } else if("b".equals(sign)){ return 4; } else { return 5; } } else if ("e".equals(name)) { if("#".equals(sign)){ return 8; } else if("b".equals(sign)){ return 6; } else { return 7; } } else if ("f".equals(name)) { if("#".equals(sign)){ return 9; } else if("b".equals(sign)){ return 7; } else { return 8; } } else if ("g".equals(name)) { if("#".equals(sign)){ return 11; } else if("b".equals(sign)){ return 9; } else { return 10; } } return -1; } Note();  Note(String filename);  Note(File file);  Note(File file, NoteParser parser); NoteDescriptor getDescriptor(); NoteDescriptor getDescriptor(String fullName); int orderStartAtA(); int orderStartAtC(); @Override String toString(); }
Note extends EzRgx { public int orderStartAtA() { if ("a".equals(name)) { if("#".equals(sign)){ return 1; } else if("b".equals(sign)){ return 12; } else return 0; } else if ("b".equals(name)) { if("#".equals(sign)){ return 3; } else if("b".equals(sign)){ return 1; } else { return 2; } } else if ("c".equals(name)) { if("#".equals(sign)){ return 4; } else if("b".equals(sign)){ return 2; } else { return 3; } } else if ("d".equals(name)) { if("#".equals(sign)){ return 6; } else if("b".equals(sign)){ return 4; } else { return 5; } } else if ("e".equals(name)) { if("#".equals(sign)){ return 8; } else if("b".equals(sign)){ return 6; } else { return 7; } } else if ("f".equals(name)) { if("#".equals(sign)){ return 9; } else if("b".equals(sign)){ return 7; } else { return 8; } } else if ("g".equals(name)) { if("#".equals(sign)){ return 11; } else if("b".equals(sign)){ return 9; } else { return 10; } } return -1; } Note();  Note(String filename);  Note(File file);  Note(File file, NoteParser parser); NoteDescriptor getDescriptor(); NoteDescriptor getDescriptor(String fullName); int orderStartAtA(); int orderStartAtC(); @Override String toString(); static NoteParser NOTE_PARSER; public String name; public String sign; public int octave; public int instance; public File file; public Voyel voyel; }