1

I am working on a procedural music generation project which reads in a MIDI file and uses some probability models to generate a new piece of music.

Reading in notes in jMusic is easy. First get the Score object from the MIDI file, then get the Part(s) object from the Score, then get the Phrase(s) object from the Part(s), then get a Note object array from the Phrase(s).

I'm trying to integrate the ability to read chords and include chords in the generated music. jMusic represents chords using the CPhrase object which is basically an array of pitch values. My problem is you can't directly read CPhrase objects from a MIDI file. You also cannot get the actual start/end times of a note from Note objects.

I'm wondering if there is a simpler way to do this other than converting the Score to a SMF object, reading Track objects from it, reading Event objects from the Tracks and then getting the time of the NoteOn/NoteOff events from the Event objects.

If you have experience with jMusic and can help me out I will appreciate you greatly. Thanks!

Hoppeduppeanut
  • 1,109
  • 6
  • 20
  • 29
taylorbl
  • 11
  • 1
  • You can forgo the CPhrase by creating a number of phrases and add the notes there - maybe thats what they use in getPhraseList but I havent used that - you could try – gpasch Feb 16 '19 at 17:31

0 Answers0