From: <sv...@op...> - 2024-11-04 17:59:32
|
Author: sagamusix Date: Mon Nov 4 18:59:19 2024 New Revision: 22096 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22096 Log: Merged revision(s) 22090, 22092 from trunk/OpenMPT: [Fix] MED: Fix correct octave transposition in some MED files that have hardware mixing disabled but sample transpose enabled; hopefully doesn't break anything else. Fixes Journey.med (https://www.un4seen.com/forum/?topic=15448.msg143713#msg143713). ........ [Var] Update links in credits. ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/common/version.cpp branches/OpenMPT-1.31/soundlib/Load_med.cpp Modified: branches/OpenMPT-1.31/common/version.cpp ============================================================================== --- branches/OpenMPT-1.31/common/version.cpp Mon Nov 4 18:58:14 2024 (r22095) +++ branches/OpenMPT-1.31/common/version.cpp Mon Nov 4 18:59:19 2024 (r22096) @@ -660,7 +660,7 @@ "https://github.com/iamgreaser/it2everything/\n" "\n" "Antti S. Lankila for Amiga resampler implementation\n" - "https://bel.fi/alankila/modguide/interpolate.txt\n" + "https://web.archive.org/web/20221228071135/https://bel.fi/alankila/modguide/\n" "\n" "Shayde / Reality Productions for Opal OPL3 emulator\n" "https://www.3eality.com/\n" @@ -774,7 +774,7 @@ "https://www.behance.net/ulfurkolka\n" "\n" "Nobuyuki for file icon\n" - "https://twitter.com/nobuyukinyuu\n" + "https://github.com/nobuyukinyuu/\n" "\n" #endif "Daniel Collin (emoon/TBL) for providing test infrastructure\n" @@ -784,8 +784,8 @@ "in the form of ideas, testing and support;\n" "thanks particularly to:\n" "33, 8bitbubsy, AliceLR, Anboi, BooT-SectoR-ViruZ, Bvanoudtshoorn\n" - "christofori, cubaxd, Diamond, Ganja, Georg, Goor00,\n" - "Harbinger, jmkz, KrazyKatz, LPChip, Nofold, Rakib, Sam Zen\n" + "a11cf0, christofori, cubaxd, Diamond, Ganja, Georg, Goor00,\n" + "Harbinger, jmkz, KrazyKatz, LPChip, MiDoRi, Nofold, Rakib, Sam Zen\n" "Skaven, Skilletaudio, Snu, Squirrel Havoc, Teimoso, Waxhead\n" "\n" #ifdef MPT_WITH_VST Modified: branches/OpenMPT-1.31/soundlib/Load_med.cpp ============================================================================== --- branches/OpenMPT-1.31/soundlib/Load_med.cpp Mon Nov 4 18:58:14 2024 (r22095) +++ branches/OpenMPT-1.31/soundlib/Load_med.cpp Mon Nov 4 18:59:19 2024 (r22096) @@ -602,7 +602,7 @@ param1 = param; } // Octave wrapping for 4-channel modules - if(ctx.hardwareMixSamples && note >= NOTE_MIDDLEC + 2 * 12) + if(note >= NOTE_MIDDLEC + 2 * 12) needInstruments = true; if(note >= NOTE_MIN && note <= NOTE_MAX) @@ -895,13 +895,14 @@ { needInstruments = true; instr.Transpose(-24); - } else if(!isSynth && hardwareMixSamples) + } else if(!isSynth && (hardwareMixSamples || sampleHeader.sampleTranspose)) { + int offset = NOTE_MIDDLEC + (hardwareMixSamples ? 24 : 36); for(auto ¬e : instr.NoteMap) { int realNote = note + sampleHeader.sampleTranspose; - if(realNote >= NOTE_MIDDLEC + 24) - note -= static_cast<uint8>(mpt::align_down(realNote - NOTE_MIDDLEC - 12, 12)); + if(realNote >= offset) + note -= static_cast<uint8>(mpt::align_down(realNote - offset + 12, 12)); } } |