From: <sag...@us...> - 2011-04-12 23:03:47
|
Revision: 849 http://modplug.svn.sourceforge.net/modplug/?rev=849&view=rev Author: saga-games Date: 2011-04-12 23:03:37 +0000 (Tue, 12 Apr 2011) Log Message: ----------- [Mod] Improved DMF loader a bit more. [Mod] Updated History.txt Modified Paths: -------------- trunk/OpenMPT/packageTemplate/History.txt trunk/OpenMPT/soundlib/LOAD_DMF.CPP Modified: trunk/OpenMPT/packageTemplate/History.txt =================================================================== --- trunk/OpenMPT/packageTemplate/History.txt 2011-04-12 21:46:10 UTC (rev 848) +++ trunk/OpenMPT/packageTemplate/History.txt 2011-04-12 23:03:37 UTC (rev 849) @@ -10,6 +10,32 @@ (tx XYZ): thanks to XYZ for telling us about the bug / requesting the feature +v1.19.02.00 (***** 2011, revision 848) +-------------------------------------- +Pattern tab::Note properties + [New] <Jojo> Channels can now be moved by dragging their channel header. Holding Shift while doing so duplicates the channel + [Imp] <Jojo> Moving channels through the channel manager creates an undo point now. + [Fix] <Jojo> Axx is not limited to value 7F anymore in IT / S3M format. + +VST + [New] <Jojo> New menu entry in the plugin editor: Create instrument from plugin + [Fix] <Jojo> Fixed note handling in VST editor of plugins that actually don't support MIDI input (http://bugs.openmpt.org/view.php?id=102) + +Mod Conversion + [Imp] <Jojo> Improved conversion of Sxx (IT / S3M) and PC Notes. + [Fix] <Jojo> Sustain loop conversion didn't work + +IT + [Fix] <Jojo> Panning slides with both parameter nibbles set were not ignored in compatible mode. + +Other modules + [Imp] <Jojo> DMF Loader was rewritten completely and is a whole lot more accurate now. + [Fix] <Jojo> J2B Loader: Empty sample slots are now treated correct in new J2B (AM) files. + +Misc + [New] <Jojo> OpenMPT can now automatically check for updates (daily / weekly / monthly) + [Reg] <Jojo> Removed hidden INI flag to suppress warnings when encountering keymaps with unknown items. This option was introduced when faulty keymaps threw multiple message boxes, but now it's just one and it shouldn't be ignored... + v1.19.01.00 (April 2011, revision 836) -------------------------------------- Pattern tab @@ -33,7 +59,7 @@ [Reg] <Jojo> The "Position aware timer" option is gone. The position aware timer is now automatically used. It was optional in the first place because of some buggy code, which is now fixed. Pattern tab::Note properties - [Fix] <Jojo> The meaning of Q0x was displayed wrong for S3M / IT. + [Fix] <Jojo> The meaning of Q0x was displayed wrong for IT / S3M. [Fix] <Jojo> Changing a value didn't create an undo point. (http://bugs.openmpt.org/view.php?id=56) [Fix] <Jojo> Setting the PC note plugin didn't work. @@ -71,7 +97,6 @@ VST [New] <Jojo> Plugins can now request common file dialogs (file and directory selection). - [New] <Jojo> New menu entry in the plugin editor: Create instrument from plugin [Mod] <Jojo> When automatically inserting a new instrument from the VST editor, the bank and patch values are now not filled in anymore, so it is easier to change to another patch while editing. [Mod] <Jojo> Various small improvements to support VST 2.4 plugins better. [Fix] <Jojo> Speaker arrangement is now sent to the plugins upon initialization. This fixes Voxengo SPAN 2 (a VST 2.4 plugin). Does this break other multichannel plugins? Modified: trunk/OpenMPT/soundlib/LOAD_DMF.CPP =================================================================== --- trunk/OpenMPT/soundlib/LOAD_DMF.CPP 2011-04-12 21:46:10 UTC (rev 848) +++ trunk/OpenMPT/soundlib/LOAD_DMF.CPP 2011-04-12 23:03:37 UTC (rev 849) @@ -28,6 +28,7 @@ #define DMF_SMPD 0x44504D53 #define DMF_SMPJ 0x4A504D53 #define DMF_ENDE 0x45444E45 +#define DMF_SETT 0x9C219DE4 // Pattern flags - global track #define DMFPAT_GLOBPACK 0x80 // Pack information for global track follows @@ -150,7 +151,7 @@ val = max(1, val / 4); const bool isFine = (val < 0x0F) || (internalTicks < 2); if(!isFine) - val = max(1, (val + 3) / (internalTicks - 1)); // no slides on first tick! +3 for rounding precision + val = max(1, (val + internalTicks - 2) / (internalTicks - 1)); // no slides on first tick! "+ internalTicks - 2" for rounding precision if(up) return (isFine ? 0x0F : 0x00) | (val << 4); @@ -176,8 +177,9 @@ uint8 DMFdelay2MPT(uint8 val, const uint8 internalTicks) //------------------------------------------------------ { - const int newval = (int)val * (int)internalTicks / 255; - return (uint8)CLAMP(newval, 0, 0x0F); + int newval = (int)val * (int)internalTicks / 255; + Limit(newval, 0, 15); + return (uint8)newval; } @@ -351,7 +353,7 @@ break; } } - tempo = CLAMP(tempo, 32, 255); + Limit(tempo, 32, 255); settings.internalTicks = (uint8)speed; } else { @@ -359,7 +361,7 @@ } } - MODCOMMAND *m = pSndFile->Patterns[nPat].GetpModCommand(nRow, 1); // Reserve first channel for global effects + m = pSndFile->Patterns[nPat].GetpModCommand(nRow, 1); // Reserve first channel for global effects for(CHANNELINDEX nChn = 1; nChn <= numChannels; nChn++, m++) { @@ -368,6 +370,7 @@ { ASSERT_CAN_READ_PATTERN(1); const uint8 channelInfo = lpStream[dwMemPos++]; + //////////////////////////////////////////////////////////////// // 0x80: Packing counter (if not present, counter stays at 0) if((channelInfo & DMFPAT_COUNTER) != 0) { @@ -375,6 +378,7 @@ channelCounter[nChn] = lpStream[dwMemPos++]; } + //////////////////////////////////////////////////////////////// // 0x40: Instrument bool slideNote = true; // If there is no instrument number next to a note, the note is not retriggered! if((channelInfo & DMFPAT_INSTR) != 0) @@ -387,6 +391,7 @@ } } + //////////////////////////////////////////////////////////////// // 0x20: Note if((channelInfo & DMFPAT_NOTE) != 0) { @@ -394,12 +399,13 @@ m->note = lpStream[dwMemPos++]; if(m->note >= 1 && m->note <= 108) { - m->note += 24; + m->note = CLAMP(m->note + 24, NOTE_MIN, NOTE_MAX); settings.lastNote[nChn] = m->note; } else if(m->note >= 129 && m->note <= 236) { // "Buffer notes" for portamento (and other effects?) that are actually not played, but just "queued"... - settings.noteBuffer[nChn] = (m->note & 0x7F) + 24; + m->note = CLAMP((m->note & 0x7F) + 24, NOTE_MIN, NOTE_MAX); + settings.noteBuffer[nChn] = m->note; m->note = NOTE_NONE; } else if(m->note == 255) { @@ -422,6 +428,7 @@ uint8 effect1 = CMD_NONE, effect2 = CMD_NONE, effect3 = CMD_NONE; uint8 effectParam1 = 0, effectParam2 = 0, effectParam3 = 0; + //////////////////////////////////////////////////////////////// // 0x10: Volume if((channelInfo & DMFPAT_VOLUME) != 0) { @@ -430,6 +437,7 @@ m->vol = (lpStream[dwMemPos++] + 3) / 4; } + //////////////////////////////////////////////////////////////// // 0x08: Instrument effect if((channelInfo & DMFPAT_INSEFF) != 0) { @@ -499,6 +507,7 @@ } } + //////////////////////////////////////////////////////////////// // 0x04: Note effect if((channelInfo & DMFPAT_NOTEEFF) != 0) { @@ -541,7 +550,7 @@ effect2 = CMD_TONEPORTAMENTO; break; case 7: // Scratch to Note (neat! but we don't have such an effect...) - m->note = effectParam2 + 25; + m->note = CLAMP(effectParam2 + 25, NOTE_MIN, NOTE_MAX); effect2 = CMD_TONEPORTAMENTO; effectParam2 = 0xFF; break; @@ -578,6 +587,7 @@ } } + //////////////////////////////////////////////////////////////// // 0x02: Volume effect if((channelInfo & DMFPAT_VOLEFF) != 0) { @@ -957,16 +967,16 @@ break; case DMF_SMPJ: // "SMPJ" - Sample jump points (xtracker32 only) + case DMF_SETT: // "Unprintable ID" - those might be GUI settings and other related stuff break; -#if 0 +#ifdef DEBUG default: - // There is some (encrypted?) IFF chunk with a very weird ID at the end of many DMF files. What does it mean? { - char s[32]; + char s[40]; const char *sig = (char *)&chunkheader.signature; - wsprintf(s, "Unknown chunk ID %c%c%c%c at %d", sig[0], sig[1], sig[2], sig[3], dwMemPos - sizeof(DMF_IFFCHUNK)); - MessageBox(0, s, 0, 0); + wsprintf(s, "Unknown chunk ID %c%c%c%c at %d\n", sig[0], sig[1], sig[2], sig[3], dwMemPos - sizeof(DMF_IFFCHUNK)); + if(GetpModDoc()) GetpModDoc()->AddToLog(s); } #endif } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |