views:

90

answers:

1

Hi

May I know whether it's possible to extract note onset and other musical details (e.g. pitch, note duration) form polyphonic MIDI(i.e. either multiples notes played from treble and bass voices, or chords) using the jMusic API?

It has a method to extract note onset - but it returns zero each time for a given note. However extracting pitch and duration for monophonic (i.e. single note) MIDI using jMusic is possible. But when there exist chords it only captures a single note of the chord, and note onset returns zero each time.

Is there a way I can resolve this?

Appreciate any insight asap. Thanks in advance

+1  A: 

Disclaimer: I have not used jMusic. In fact, I never even heard of it.

But from analyzing MIDI files in the past, one mistake I often made was not analyzing the correct tracks. If your MIDI file has several tracks, make sure you address all of them. Otherwise, if you are not addressing the correct track, you may be missing some notes which could explain your problems.

For example, a MIDI file for a solo piano may be divided into two tracks: treble and bass clefs. If you only analyze the treble clef track, you will miss all of the bass clef notes.

Steve
Hi Steve. Thanks for your suggestions. Yes, tracks should do. But still I really don't know how I can code for it - have few papers and sources about midi spec, but kinda lost - can't find sample code.Also Steve, with tracks - isn't there the problem - that not all midi files have treble and bass notes in 2 tracks - have they? It depends on how the midi file is written - isn't it?
Dolphin
Isn't there a universal attribute which I can use to identify polyphony (treble and bass, chords)? Can note onset be the solution? But I couldn't get to it to give a value with jMusic. Are there any sample code which I can use for Midi note onset extraction using Sound API atleast?Any clue? Greatly appreciate any insight.Thanks for your time Steve.
Dolphin