Menu

#4904 AGI: No music with the new MIDI patch

AGI Fanmade
closed-fixed
7
2010-10-12
2010-06-18
No

ScummVM 1.2.0svn50007 (Jun 18 2010 08:09:10)
Features compiled in: Vorbis FLAC MP3 RGB zLib

The new patch to use MIDI in AGI does not output any sound.
I can see that data is sent to the device (MT-32) but nothing is played.
otoh Scumm titles (i.e. Fatty Bear plays nice).
Looks like a missing initialization, but thats of course pure speculation

on a side note, all the titles send the version or some ingame message to the display of the MT-32, the AGI patch doesn't do anything like that, so maybe thats whats causing it?

All AGI games i.e. Enclosure, Space Quest 0 - Replicated

AmigaOS4
gcc (GCC) 4.2.4 (adtools build 20090118)

Discussion

  • Anonymous

    Anonymous - 2010-07-03

    With one of the last commits the whole MIDI/CAMD functionality is gone again

    No change in the settings here (Preferred device: CAMD, MIDI device: CAMD) butthe engine has switched back to not send signals, instead it went back to use adlib

    Was this intended (maybe switched off due to the missing initialization?)
    Just checking, no offence

     
  • Eugene Sandulenko

    What is the current situation? Could you please retest?

     
  • Anonymous

    Anonymous - 2010-07-24

    ScummVM 1.2.0svn51236 (Jul 24 2010 09:32:25)
    Features compiled in: Vorbis FLAC MP3 RGB zLib

    Unfortunately exactly the same behaviour

    Of course i don't have a single idea on how midi is working in particular, but just to give you an idea (as i don't know if you have a MT-32 device).
    I have the impression that only "MIDI data" is sent to the device (which is reflected on the hardware's display) but no "MIDI commands" which would tell the device what to do with the data...again, this is just an idea which sprung to mind

     
  • Eugene Sandulenko

    • status: open --> closed
     
  • Eugene Sandulenko

    Of course. I did not reset the MIDI devices before. Now I added the code to do it, please test, it should fix it. If it is not, just add a comment here and we will fix it eventually.

     
  • Eugene Sandulenko

    • assigned_to: nobody --> sev
    • status: closed --> closed-fixed
     
  • Anonymous

    Anonymous - 2010-08-24

    Sorry, still not there

    Other games (apart from SCI games) do display the ScummVM revision on the MT-32 display to indicate the program is accessing the device (SCI games display genuine messages) AND change the volume to 100 (i have set it to 20 by default).
    Nothing happens with AGI games

    Maybe the code is still missing the MIDI commands like PLAY NOTE
    It seems there is still only the notes sent to the device, nothing comes out the speakers

    Again, pure speculation

    Thank you so far

     
  • Anonymous

    Anonymous - 2010-09-07

    If i do a manual reset on the device AFTER the game was started in the launcher the music plays

    So it seems it is a wrong or missing reset call to the MIDI hardware (?)

     
  • Eugene Sandulenko

    • status: closed-fixed --> open
     
  • Eugene Sandulenko

    This bug is nice to get fixed before the release. Raising priority for keeping the track.

     
  • Eugene Sandulenko

    • priority: 5 --> 7
     
  • Anonymous

    Anonymous - 2010-10-12

    Found the problem
    It's the same behaviour as in bug report 3067148
    https://sourceforge.net/tracker/?func=detail&aid=3067148&group_id=37116&atid=418820

    The MIDI volume is "copied" in the range from 0-127 and again from 128-256 (where 0 and 128 is the lowest and 127 and 256 the loudest setting)
    Due to my setup the music level in all games is set to 128, hence i DO get a VERY faint music output which i recently was only able to catch because my cat turned up the volume by accident :-)

    Sorry that i haven't caught it before the release, but i think we can savely postpone this fix to the next one, can't we?
    (I mean, it seems i was the only one stupid enough?)

    Someone has to step in and provide a patch ;-)
    lordhoto did the last one in the mentioned bug report :-)

     
  • Anonymous

    Anonymous - 2010-10-12

    It works for me when i change line 85
    of engines/agi/sound.midi.cpp from
    memset(_channelVolume, 255, sizeof(_channelVolume));
    to
    memset(_channelVolume, 127, sizeof(_channelVolume));

    Also taken from the DRACI bug report

     
  • Eugene Sandulenko

    Excellent, thank you! The bug has been fixed.

     
  • Eugene Sandulenko

    • status: open --> closed-fixed
     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.