java change tempo of the how midi file without sequencer?
-
22-04-2021 - |
Question
I need to get the information of a midi file before it is played which I can do, but I need to do this with alternative bpms of the files' bpm.
So is there a way to set the bpm of a midi file and therefore affect it's corresponding time events?
Solution
You can read the MIDI file in with this library and then filter out the Tempo events and apply your own if need be. It sounds like you're interested in the real time of each event (as opposed to their MIDI tick), so you'll still have to calculate that yourself. (But I assume you were doing that already anyways, since MIDI files don't keep track of real event times.)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow