Midi dump feature not working with command line startup
|MidiDriver Midi Dump Feature
|Monkey Island 2
Description (last modified by )
has anyone ever used the --midi-dump feature, that is build in since commit 3b4810a to the MidiDriver from audio/mididrv.h+cpp?
I tested it with stable version 2.7.0, an up-to-date build from source and checked out the code to the state of the former commit 3b4810a in order to detect if it is an error that has occured while improving on the engine or if the error maybe is due to my setup.
Alle three attempts failed leading to no file dump.mid was generated.
When I forced a midi file to be written by code change, it gave me a midi file with header only. So, midi events are never recorded (proved it with debug prints) and the dump cache remains empty.
I tested on my version of monkey1 and monkey2.
Monkey2 directory has following files:
ADLIB.IMS MONKEY2.001 ROL_330.IMS ROL_334.IMS ROLAND.IMS SPEAKER.IMS
MONKEY2.000 MONKEY2.EXE ROL_332.IMS ROL_336.IMS SOUNBLAS.IMS
It's the same if I use only the two main game files MONKEY2.000+1. Music is present when run with the engine.
Can anyone help to find the problem? Is it maybe the version of my game, that is not capable?
I am trying to analyse the iMuse engine for academic research, so having the ability to dump midis and, in the best case, redirect events directly from source code to other programs would really help me.
Rebuilding the iMuse engine in python would be the next thing I would check, if this approach with ScummVM does not work. So if anyone has ideas here, that would also be super helpful for me.
I would appreciate it a lot if someone can provide me any hint of where to look next. Thanks in advance!
(And many thanks for all the work anyone has spend on ScummVM. I use it for playing my favorite adventure for over 15 years now. :-D )
--- Added later:
I got a trace. It seems to have something to do with alsa under linux.
I got it to work by changing the driver settings in the GUI.
Since I need command line startup, I will investigate that further by testing out some config files and report my solution by tommorow.
-- Next step:
Creating the dump.mid file works now. I had to choose alsa as music_driver under linux. This can be set via command line by forcing a specifig config with --config=<file> and setting music_driver=alsa.
This creates a dump.mid file, but music cannot be listened to.
For listening, music_driver=alsa_TiMidity can be used, the a server must be started: timidity -iA.
Third option, set music_driver=fluidsynth and soundfont=<anyfont>.sf3.
Next big problem: By doing as described, no instrument change is produced, so only piano is played back. (At least this is the case for Ubuntu 20.04, which I work with on my laptop. Could have sworn it had worked on Ubuntu 22.04, when I tried it a few hours ago back in my office. More testing tomorrow!
Everything is working now. Because I loaded a save file from woodtick, that went in when the music had already started, the program changes (instrument changes) were not send to timidity/alsa/whatever.
When the savefile is created correctly (just earlier) or the game is played from the beginning, everything works fine.
I will now close this ticket and report the --dump-midi feature working properly! (under linux)
Change History (7)
comment:6 by , 8 months ago
|new → closed
|Midi dump feature not working → Midi dump feature not working with command line startup