Exemplo n.º 1
0
 @Before
 public void setup() {
   client = new MidiBlocksClient();
   client.getMusicManager().loadScales("src/main/java/MIDIBlocks/MIDIBlocks/scales.csv");
   client.getMusicManager().setScale("chromatic", "C");
   note = new Note(Note.NOTE_ON, 48);
   block = new ChordifyBlock(client.getMusicManager());
 }
Exemplo n.º 2
0
 @Test
 public void testModifyScale() {
   client.getMusicManager().setScale("major", "C");
   ArrayList<Note> result = block.modify(note);
   assertEquals(48, result.get(0).getPitch()); // C
   assertEquals(52, result.get(1).getPitch()); // E
   assertEquals(55, result.get(2).getPitch()); // G
 }
Exemplo n.º 3
0
 @Test
 public void testNoteOutOfScale() {
   client.getMusicManager().setScale("major", "C");
   ArrayList<Note> result = block.modify(new Note(Note.NOTE_ON, 46)); // Bb
   assertEquals(0, result.size());
 }