Ticket #8414: GMRhythmMap.patch

File GMRhythmMap.patch, 2.2 KB (added by SF/tbcarey, 16 years ago)
  • scumm/imuse.cpp

    RCS file: /cvsroot/scummvm/scummvm/scumm/imuse.cpp,v
    retrieving revision 2.128
    diff -u -r2.128 imuse.cpp
     
    15311531                mc = _player->getMidiDriver()->getPercussionChannel();
    15321532                if (!mc)
    15331533                        return;
    1534                 mc->volume(_vol_eff);
    1535 //              mc->programChange(_bank);
     1534                static byte prev_vol_eff = 128;
     1535                if (_vol_eff != prev_vol_eff){
     1536                        mc->volume(_vol_eff);
     1537                        prev_vol_eff = _vol_eff;
     1538                }
     1539                if ((note < 35) && (!_player->_se->isNativeMT32()))
     1540                        note = Instrument::_gmRhythmMap[note];
     1541
    15361542                mc->noteOn(note, velocity);
    15371543        }
    15381544}
  • scumm/instrument.cpp

    RCS file: /cvsroot/scummvm/scummvm/scumm/instrument.cpp,v
    retrieving revision 2.31
    diff -u -r2.31 instrument.cpp
     
    114115//      { "trickle4  ", ??? }
    115116};
    116117
     118const byte Instrument::_gmRhythmMap[35] = {
     119          0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
     120          0,  0,  0,  0,  0,  0,  0,  0, 36, 37, 38, 39, 40, 41, 66, 47,
     121         65, 48, 56};
     122       // This emulates the percussion bank setup LEC used with the MT-32,
     123       // where notes 24 - 34 were assigned instruments without reverb.
     124       // It also fixes problems on GS devices that map sounds to these
     125       // notes by default.
     126
    117127class Instrument_Program : public InstrumentInternal {
    118128private:
    119129        byte _program;
  • scumm/instrument.h

    RCS file: /cvsroot/scummvm/scummvm/scumm/instrument.h,v
    retrieving revision 2.14
    diff -u -r2.14 instrument.h
     
    5757        Instrument() : _type (0), _instrument (0) { }
    5858        ~Instrument() { delete _instrument; }
    5959        static void nativeMT32 (bool native);
     60        static const byte _gmRhythmMap[35];
    6061
    6162        void clear();
    6263        void copy_to (Instrument *dest) { if (_instrument) _instrument->copy_to (dest); else dest->clear(); }