-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tempo not right when exporting from FL Studio #5
Comments
Unfortunately, I don't have my drives available, so I can not test my theories. From a quick debugging, it seems that
diff --git a/src/MidiFile.cpp b/src/MidiFile.cpp
index a03d413..c68ba2b 100644
--- a/src/MidiFile.cpp
+++ b/src/MidiFile.cpp
@@ -89,7 +89,7 @@ bool MidiFile::read(std::istream &inp)
{
// Tempo information should be stored on the first track and
// (au contraire to what I thought) applied to every track.
- (*tr)->calc_realtimes(m_time_division, m_tracks[0]);
+ (*tr)->calc_realtimes(m_time_division, *tr);
}
return true; Also, I've looked at the files with rosegarden and MidiEditor. While rosegarden seemed to apply the tempi correctly, MidiEditor sounded about 50% "slower" (3 beats in 1.5s, compared to 3 beats in ~1s in the unmodified file). Is that what you hear with |
I've applied your code, but now both midis are slow. I've also tested it in MidiEditor and that is what I hear when I play the files with floppymusic. |
And I've noticed that the tempo information is stored in the second track, not the first when you export via FL Studio. Can't you just read the tempo information from all tracks and apply it to all? |
I guess using all tempo events could be possible, but would probably be behing a flag, as this SO question/answer suggests that tempo information should be in the first track (where MidiEditor probably expects it, too). If you just want your FL Studio MIDIs to work, you can replace the (*tr)->calc_realtimes(m_time_division, m_tracks[1]); which will use tempo events from the second track for everything. |
Ok, thanks. I've tried it out and it works, maybe I can find an option in FL Studio to switch the tempo track. |
When I play a midi file downloaded from the web it works fine, but when I edit it in FL Studio and export it the tempo is not properly recognized by floppymusic. (It works fine in VLC Player and Windows Media Player)
I'm using a Raspberry Pi 1 Model B.
Any help would be appreciated.
Example files (modified is exported using FL Studio and the other is the original):
TheBlackPearl.zip
The text was updated successfully, but these errors were encountered: