After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 694811 - wildmidi: Truncated start when seeking back to zero
wildmidi: Truncated start when seeking back to zero
Status: RESOLVED NOTGNOME
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
1.x
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on: 696041
Blocks:
 
 
Reported: 2013-02-27 18:43 UTC by Luis Menina
Modified: 2015-01-27 11:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
example of midi file (8.03 KB, audio/midi)
2013-02-27 18:43 UTC, Luis Menina
Details

Description Luis Menina 2013-02-27 18:43:31 UTC
Created attachment 237557 [details]
example of midi file

If I run: totem Pixies\ -\ Where\ is\ my\ mind.midi

The file is played correctly. Please note that the song starts with 5 hits on the snare drum (this is a drum part).

However, if I hit Ctrl+Left to seek to the beginning of the song and play it again, I will only ear 4 hits on the snare drum, the first one is missing. I've tried with another midi file, it seems totem first seeks to second 0, but only starts the playback shortly after, leading to the few first ms of the song to be missing.

Reproducibility: always.
Comment 1 Bastien Nocera 2013-03-06 10:57:08 UTC
Does the same thing happen with:
gst-launch-1.0 playbin uri=file:///path/to/midi/file.mid
?

Does the same thing happen with the bvw-test sample program shipped in Totem's sources?
Comment 2 Tim-Philipp Müller 2013-03-06 12:15:23 UTC
Unfortunately I don't think any of the midi decoders have been ported yet. I might take a stab at that later, shouldn't be much work.
Comment 3 Luis Menina 2013-03-06 13:09:18 UTC
I don't have gstreamer 1.0 at hand, my Mageia 2 is using gstreamer-0.10, and Mageia 3 hasn't been released. I may however try with a live Mageia 3 beta 2 if you think that would help.

I've tried with gst-launch-0.10 playbin uri=file:///path/to/midi/file.mid , and it always works.

I didn't know about bvw-test. I've tried to build it from source, but I get an error when running configure:

checking gnome-doc-utils >= 0.20.3... yes
./configure: line 5141: syntax error near unexpected token `0.6.7'
./configure: line 5141: `GOBJECT_INTROSPECTION_CHECK(0.6.7)'

It happened on master, so I tried to build the V_3_4_3 tag (that's the version on which I have the problem), but I had the same error. I have limited autotools knowledge, so I'm somewhat blocked.
Comment 4 Bastien Nocera 2013-03-19 13:23:22 UTC
This is fixed with the GStreamer 1.0 port of wildmidi (though I doubt the problem was in the midi decoder in the first place).
Comment 5 Bastien Nocera 2013-03-19 13:42:59 UTC
Right, it works the first time it's played, but not after seeking back to the start.

As it happens with the test-playback app, reassigning to GStreamer.
Comment 6 Wim Taymans 2013-03-21 14:29:09 UTC
We do a seek to sample 0 in wildmidi but it somehow doesn't want to.
Comment 7 Bret Curtis 2015-01-04 00:41:36 UTC
We're tracking this bug also upstream here:
https://github.com/Mindwerks/wildmidi/issues/100#issuecomment-68614888

There is actually a problem with the MIDI file. It has a huge delta amount at the beginning which is causing the "silence" at the start of the song. This had not occurred with previous versions of WildMIDI because of undetected bugs which have now been fixed.

Start of Track
Track Size: 8107
Delta: 5376, Accumilated Delta: 5376
Set Patch: chan(9) patch(0)
Delta: 0, Accumilated Delta: 5376
Meta Event: Unsupported (4)
Meta data (5 bytes): 
0x64 0x72 0x75 0x6d 0x73 
Delta: 0, Accumilated Delta: 5376
Controller: chan(9) ctrl(7) set(100)
Delta: 0, Accumilated Delta: 5376
Set Patch: chan(9) patch(0)
Delta: 0, Accumilated Delta: 5376
Note On: chan(9) note(38) vel(77)

The delta value is 0xaa 0x00 which when you do ((0xaa & 0x7f) << 7) + (0x00 & 0x7f) you get 5376
Comment 8 Tim-Philipp Müller 2015-01-04 12:57:41 UTC
Thanks, so I think we can safely close this bug as "not a bug in GStreamer" then? Please re-open if there's still something to be done in GStreamer, thanks!
Comment 9 Bret Curtis 2015-01-04 13:43:57 UTC
Yup, it is problem with the MIDI file and also how WildMIDI dealt with the faulty MIDI file.

The reset/seek back to 0 should be fixed, but the extra silence at the beginning will not be removed.
Comment 10 Ozkan Sezer 2015-01-27 11:41:22 UTC
The reset/seek back to 0 bug is fixed as of newly released wildmidi-0.3.8.