Open hopskipnfall opened 10 years ago
I am having a really hard time figure out where the instrument id is located. As far as I can see I have to get the the sequence, the the track array, then the Midi message, and the the byte array of that message. Look through the byte array and find the program change message. I don't see any of those in the file though, I am also sure there is a better way to do this, any ideas? I was looking at the getNotes()
method but it doesn't contain the instrument type, just the channel and the track numbers.
@jcgmusic1 The channel is the instrument number.
The channel is the track the the midi note is being played on. It returns a range of 1-16 since there are only 16 allowed tracks in a midi file. Each channel can hold many different instruments though, which I think is the reason it is difficult to extract. I will keep working on this though and I will keep you all posted.
Oh you're right. My bad.
getNotes()
method inKaraokeMidiJava
package to get the channel number.