@Test public void testRhythmWeight() throws InvalidMidiDataException, IOException { List<File> midiFiles = Files.list(new File("C:/Users/prombouts/git/neo/neo/resources/melodies/solo/").toPath()) .map(p -> p.toFile()) .collect(Collectors.toList()); for (File file : midiFiles) { MidiInfo midiInfo = midiParser.readMidi(file); List<Note> notes = midiInfo.getMelodies().get(0).getNotes(); rhythmWeight.setNotes(notes); rhythmWeight.updateRhythmWeight(); System.out.println(file.getName()); double profileAverage = rhythmObjective.getProfileAverage(notes, 3.0); System.out.println(profileAverage); // for (Note note : notes) { // System.out.print(note.getPitch() + ", " + note.getPositionWeight() + "; "); // } // System.out.println(); // Score score = new Score(); // Phrase phrase = scoreUtilities.createPhrase(notes); // Part part = new Part(phrase); // score.add(part); // View.notate(score); // Play.midi(score, true); } }