Skip to content
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

High density of MIDI events slows down playback tempo #20

Open
mrbumpy409 opened this issue Jul 8, 2024 · 2 comments
Open

High density of MIDI events slows down playback tempo #20

mrbumpy409 opened this issue Jul 8, 2024 · 2 comments

Comments

@mrbumpy409
Copy link

mrbumpy409 commented Jul 8, 2024

Where there are a lot of MIDI events (for example, rapid MIDI CC modulation), dmidiplayer slows the tempo down, sometimes considerably so. This happens regardless if sending MIDI to an external player or using the internal FluidSynth. When this happens, the player's CPU usage remains quite low, so it doesn't seem to be a CPU limitation.

I have attached dmidiplayer event density test.zip for reproducing the issue. It contains the following files:

  • dmidiplayer event density test.mid – This MIDI file should play at 138 BPM, but it plays significantly slower than that. The metronome lights in dmidiplayer, however, still tick at 138 BPM. The culprit is the fast CC7 modulation on channels 1 and 2. If you remove these events, dmidiplayer will play correctly at 138 BPM.
  • midi event density test-FluidSynth.ogg – This is the density test MIDI played using the FluidSynth command-line sequencer. The tempo is correct.
  • midi event density test-dmidiplayer.ogg – This is the density test MIDI played using dmidiplayer routed to Qsynth. The tempo is too slow.

The SoundFont used in the recordings is the release candidate for GeneralUser GS v2.0.0, but any GM/GS SoundFont should suffice for testing this bug. Also, this bug happens in both Linux and Windows on my system, which is detailed below.

My System

  • dmidiplayer: 1.7.3
  • OS No.1: KDE Neon 6.0 User Edition (Plasma Desktop 6.1.2, KDE Frameworks 6.3.0, Qt 6.7.0)
  • OS No.2: Windows 10 Home Edition
  • OS No.3: Windows 10 Professional running in Virtualbox under KDE Neon
  • CPU: Intel Core i7-990x Gulftown (3.46 GHz hexa-core, Socket 1366) @ 4.15 GHz
@pedrolcl
Copy link
Owner

pedrolcl commented Jul 8, 2024

Hi Christian! Thanks for the report and the sample song.
I can confirm the bug of tempo slowed down, and that it does not depend on the CPU. It seems some miscalculation.
But I think that the rhythm lights are also affected. To me, the "leds" tick well synchronized with the music: from bar 10 the snare drum sounds exactly on the second and fourth beats synced to the corresponding "leds".

@mrbumpy409
Copy link
Author

To me, the "leds" tick well synchronized with the music: from bar 10 the snare drum sounds exactly on the second and fourth beats synced to the corresponding "leds".

Interesting. I'm seeing it completely desynchronized here using the Flatpak version in Linux. Either way, I'm glad you were able to repro the issue. dmidiplayer is everything I want in a simple MIDI player, so thank you for creating it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants