Page MenuHomePhabricator

crackling at start of OGG renditions of MIDI files (fixed in TiMidity++ 2.14.0)
Closed, DeclinedPublic

Description

Every audio file I've played generated by this (fantastic) extension has had crackling in the first few seconds of music. Try e.g. https://en.wikipedia.org/wiki/User:MarkAHershberger/Music_Sandbox : wait for the player to appear and click play. I'm on Ubuntu and so far only other developers on Linux have confirmed hearing a crackle, so it might be Linux only.

It's not the MediaWiki media player; other .ogg files play fine e.g. https://commons.wikimedia.org/wiki/Audio_files_of_medieval_music , and if I download the .ogg generated by Score it crackles whether I play it in Firefox's built in .ogg player, the rhythmbox player, or the gstreamer pipeline. If I download the .midi file and generate it myself using the same "timidity" MIDI converter that the Score extension uses (e.g. /usr/bin/timidity -Ov --output-file=timidity_out.ogg sample.midi) it has the same crackle. It's not the OGG format: other .ogg files such as /usr/share/sounds/ubuntu/stereo/desktop-logout.ogg play fine, and the crackle remains if I convert to a .wav file instead of a .ogg file.

The real proof that the problem lies in timidity would be to inspect the waveform of the raw output file for crackles.

timidity bug reports suggest using its --output-24bit option for higher quality. For that one sample file the crackle went away if I used both --output-24bit and convert to a .wav file.


Version: master
Severity: major
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=40590

Details

Reference
bz48029

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:34 AM
bzimport set Reference to bz48029.
bzimport added a subscriber: Unknown Object (MLST).

(In reply to comment #1)

See also: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=693011

Thanks. I confirmed that TiMidity++ 2.14.0 — the first release in 9 years! — generates .ogg files without the audio glitch on my PC. Alas Debian, and hence I guess Ubuntu, is lagging on packaging the new version.

(FWIW

$ install libogg-dev and libvorbis-dev packages
download TiMidity++ 2.14.0
$ ./configure --prefix=/tmp/timtest --enable-audio=vorbis &
$ make
$ make install
copy Ubuntu's /etc/timidity/timidity.cfg to /tmp/timtest/share/timidity/timidity.cfg

$ /tmp/timtest/bin/timidity -Ov --output-file=/tmp/MarkH2.ogg /tmp/MarkAHerschberger_Music_Sandbox.midi
)

(In reply to spage from comment #2)

(In reply to comment #1)

See also: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=693011

Thanks. I confirmed that TiMidity++ 2.14.0 — the first release in 9 years! —
generates .ogg files without the audio glitch on my PC. Alas Debian, and
hence I guess Ubuntu, is lagging on packaging the new version.

http://packages.ubuntu.com/trusty/timidity (14.04) lists 2.13.2-40.2 only so we won't get the fix automatically by upgrading the Ubuntu version on servers.

I think timidity should be replaced by fluidsynth.

$ fluidsynth /usr/share/sounds/sf2/FluidR3_GM.sf2 -T oga -F my_file.ogg my_file.midi

@Stemby: Welcome to Phabricator and thanks for registering an account. Please note that "I think Blue looks better than Red" comments (especially without any evaluation criteria provided) are off-topic here. This task is about OGG renditions in MIDI files. Thanks for keeping this task focused.

My comment IS focused. The previous command _does_ exactly MIDI "conversion" to OGG, without crackling at start.

Please note that timidity risks to be removed from Debian testing very soon:

https://packages.qa.debian.org/t/timidity.html

(autoremoval from testing on 2016-08-06).

divadsn subscribed.

Migration to Fluidsynth is in progress, see T181897 :)

Also, Timidity got orphaned yesterday in Debian:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=886347