Skip to content

Is there a way to simply tell which channels are in use in a midi file? #190

Answered by melanchall
Jenix-Park asked this question in Q&A
Discussion options

You must be logged in to vote
  1. You can use GetChannels method. But you're right, you need to iterate over all MIDI events in a file. Saving kind of metadata creates more troubles than profit. Because every file modification requires to update that metadata, and there are a lot of ways to change MIDI file and all those ways need to properly update cached metadata.
  2. Absolutely correct. Except GetTrackChunks. This method returns the same chunks a MIDI file contains. So direct operations on these chunks (for example, GetTrackChunks().First().Events.First().DeltaTime = 20;) will go to result file.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Jenix-Park
Comment options

@Jenix-Park
Comment options

@melanchall
Comment options

Answer selected by Jenix-Park
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Just question about the library
2 participants