Friday, July 31, 2009

Timidity patch set

Robert2098 cleverly pointed out that a patch set is necessary for MIDI music in some games (those that use SDL_mixer, actually). Since SDL_mixer is part of the rootfs, I think that the patch set must be included too.

However, when I was just about to use the set found at the SDL_mixer page, I noticed that there is also the freepat project, which is the patch set included in my Ubuntu 9.04 desktop.

So, a question for those knowledgeable in the matter: which patch set should I include? (the one available in the SDL_mixer page is about 18M while freepat is about 33M... smaller is better given the limited amount of memory in the A320).

On a side note, I added support for partitionless cards. Not sure if it's really a good idea to allow two different card layouts. Will go out in the next release (which will include dual-boot and system, since changes in both were required). Bastian linked to a patch for u-boot so I thought it would be relatively easy to fix, but turned out not to work, but at that time I was already into it and ended up with my own working fix. Had to modify also the initramfs embedded in the kernel because it must now try two different devices as boot partition: mmcblk0 (partitionless cards) and mmcblk0p1 (partitioned cards).


  1. About the patch set: I think smaller is better too. They are just sound samples, and dingoo hasn't a very good audio quality. I used to get a soundfont from hammersounds to get a decent midi quality on my pc because I used a lot midi to study songs, composing, etc,... so i needed the best possible support, and configured that way timidity was quite heavy even for a (slightly old=AMDAthlon@1.6GHz+700Mb RAM) desktop computer.

    Moreover, in order to emulate the synthetizers used in most emus, many many soundfonts will never be used (some square, saw, sin and triangle wave should be enough).
    Don't know if a change in the sampling frequency/quantization depth could significantly affect emulation performance, but i supose it is realistic, because of the sw synthesis.

  2. Thanks for implementing a solution for this partition thing. I think it is a good step, because creating a partition table under windows is not exactly easy and a lot of people had problems there

  3. Emulators typically do the entire synthesis themselves, for performance and accuracy reasons.

  4. I'd definitely recommended the smallest possible patch set, if only for performance issues. MIDI playback using the GUS patch set on some games is highly detrimental to performance and the audio breaks up.

    One of my old Creative sound cards came with a 2MB sound font. Now that's proprietary, and the version of timidity compiled with most games doesn't support sound fonts, but if we could get something that small it should greatly improve performance.

  5. Wow, my post on the Dingux forum even got it to here. I think a instrument patch set should be included in the rootfs since it could be considered as a part of SDL.

    But I think the size should be as small as possible. I don't hook up the Dingoo to a high quality amplifier so sound quality is less of importance.

    I don't know how the SDL plays the instruments, but I supose the instruments are loaded on the fly and cached if there is enough memory. But Dingoo internal memory is not very big and the complete patch set will take to much memory.
    You will see it already in some games that stutter in the beginning and then run quite smoothly. Seems to me that loading the instruments is responsible for the stutter in the beginning.