Extracting note onset from MIDI

Posted by Dolphin on Stack Overflow See other posts from Stack Overflow or by Dolphin
Published on 2010-05-28T11:17:25Z Indexed on 2010/05/28 11:22 UTC
Read the original article Hit count: 325

Filed under:
|

Hi

I need to extract musical features (note details->pitch, duration, rhythm, loudness, note start time) from a polyphonic (having 2 scores for treble and bass - bass may also have chords) MIDI file. I'm using the jMusic API to extract these details from a MIDI file. My approach is to go through each score, into parts, then phrases and finally notes and extract the details.

With my approach, it's reading all the treble notes first and then the bass notes - but chords are not captured (i.e. only a single note of the chord is taken), and I cannot identify from which point onwards are the bass notes. So what I tried was to get the note onsets (i.e. the start time of note being played) - since the starting time of both the treble and bass notes at the start of the piece should be same - But I cannot extract the note onset using jMusic API. Each time it shows 0.0.

Is there any way I can identify the voice (treble or bass) of a note? And also all the notes of a chord? How is the voice or note onset for each note stored in MIDI? Is this different for each MIDI file?

Any insight is greatly appreciated. Thanks in advance

© Stack Overflow or respective owner

Related posts about audio

Related posts about midi