DIGMID patches (MIDI playback)

Started by monkey0506, Fri 05/02/2016 20:22:12

Previous topic - Next topic

monkey0506

The instructions for various ports mentions that MIDI playback requires the DIGMID patches, and recommends using "Richard Sander's GUS patches". The instructions say to rename the "digmid.dat" to "patches.dat" and place it in "/sdcard/ags" (on Android, other locations on other platforms), but this apparently doesn't work. This causes the annoying "Error: DIGMID patches set not found".

I have found that by downloading the Gravis ULTRASND Files and extracting the "Gravis ULTRASND Files/ULTRASNDPPL161/MIDI" folder to "/sdcard/ags", Allegro is able to correctly load the MIDI patches and play back MIDI music! Presumably these patches could be built into a single patches.dat file, but that doesn't seem necessary, I don't believe there is a benefit to doing so, and based on current experiences with patches.dat, it may not even work correctly that way.

Regarding standalone Android apps, I am currently trying to determine the correct location for the MIDI patches, as the engine does not seem to read them back from "/sdcard/ags" nor from the game files' location. I will update this post when I am able to determine the correct location for this situation. :-D

Mehrdad

#1
Nice job. I tested it on my phone (Sony Xperia z1 Android 5.1) and works fine ;-D
Thanks so much Monkey0506 . I'm waiting for other good news from Android port.
My official site: http://www.pershaland.com/

Crimson Wizard

A user reported a different solution that worked for them:
https://github.com/adventuregamestudio/ags/pull/330

Quote
I have a Galaxy S5 running Cyanogenmod 13 (Android 6.0.1) and couldn't get AGS Android to play MIDI files despite having the patches.dat file downloaded from this link: http://alleg.sourceforge.net/digmid.html The game I tried was Yahtzee's Five Days a Stranger

I found out that the actual patches.dat is compressed, I opened the file with 7-Zip and found a patches1

So I extracted this patches[1] file, copied it to ags, deleted old patches.dat, renamed patches[1] to patches.dat. From there, I tried running Five Days a Stranger again, and sound worked perfectly. The original patches.dat file is 19MB, but after extracting, it grew to 25MB.


I do not have mobile device capable to test this, so I'll leave this for those who may.

Crimson Wizard

#3
I managed to partially test this method out on Atergos Linux, when running AGS game under Wine. It reported problem of DIGMID patches not found, but after I did one of the solutions (either unpacking patches.dat or Gravis MIDI "pat" files in the game folder) it stopped doing that.
Although it still failed to create digital driver, but error was now different, and probably unrelated to DIGMID problem. One thing for sure, both methods mentioned above seem to have similar effect.

EDIT: I should probably also note that when running Linux port itself, it produces no midi-related errors, but MIDI music does not play at all (although digital sounds do). I think there were reports of MIDI not playing on Linux before, but idk if that's a global issue or affects particular users. Putting patches file into game directory produces no effect.

Crimson Wizard

I got reply from Mehrdad, whom I asked to test out this new solution, and it seem working.

So, basically, the problem all this time was that the digmid.dat, available by the mentioned download link, was in fact a bzip2 archive, which in turn contained the correct file.

The proper installation steps should be:

For midi music playback, you have to download GUS patches. We recommend "Richard Sanders's GUS patches" from this address:

http://alleg.sourceforge.net/digmid.html

A direct link is here:

http://www.eglebbk.dds.nl/program/download/digmid.dat

Rename that file to patches.dat and place it into the ags directory alongside your games.
* open the digmid.dat you downloaded with any Zip-manager, and unpack the file found inside (it should be named after the name of the archive).
* remove the original archive, and rename the file you unpacked to "patches.dat".
* put this file into ags directory ('/sdcard/ags' for Android).

JanetC

Thanks for the info, Crimson Wizard! I had exactly the same issue on iOS and the same solution worked (copying patches.dat into the bundle)

SMF spam blocked by CleanTalk