From: <sag...@us...> - 2009-11-23 22:00:41
|
Revision: 422 http://modplug.svn.sourceforge.net/modplug/?rev=422&view=rev Author: saga-games Date: 2009-11-23 22:00:32 +0000 (Mon, 23 Nov 2009) Log Message: ----------- [Fix] FX Editing: Min value for XM arpeggio is now 001, max value for channel volume is M40 [Imp] Mod Conversion: Removing channel features (pan/vol) in formats where they're not supported [Imp] MPTM: Only write full envelope info if at least one envelope has more than 25 envelope points. [Ref] Switched to British English in setup dialog ("Colour" instead of "Color") Modified Paths: -------------- trunk/OpenMPT/mptrack/Moddoc.cpp trunk/OpenMPT/mptrack/Modedit.cpp trunk/OpenMPT/mptrack/Moptions.cpp trunk/OpenMPT/mptrack/mptrack.rc trunk/OpenMPT/soundlib/Load_it.cpp Modified: trunk/OpenMPT/mptrack/Moddoc.cpp =================================================================== --- trunk/OpenMPT/mptrack/Moddoc.cpp 2009-11-21 18:24:39 UTC (rev 421) +++ trunk/OpenMPT/mptrack/Moddoc.cpp 2009-11-23 22:00:32 UTC (rev 422) @@ -2268,9 +2268,10 @@ switch(gFXInfo[ndx].dwEffect) { case CMD_ARPEGGIO: - if (nType & MOD_TYPE_MOD) nmin = 1; + if (nType & (MOD_TYPE_MOD|MOD_TYPE_XM)) nmin = 1; break; case CMD_VOLUME: + case CMD_CHANNELVOLUME: nmax = 0x40; break; case CMD_SPEED: Modified: trunk/OpenMPT/mptrack/Modedit.cpp =================================================================== --- trunk/OpenMPT/mptrack/Modedit.cpp 2009-11-21 18:24:39 UTC (rev 421) +++ trunk/OpenMPT/mptrack/Modedit.cpp 2009-11-23 22:00:32 UTC (rev 422) @@ -344,6 +344,20 @@ } } + // Fix channel settings (pan/vol) + for(CHANNELINDEX nChn = 0; nChn < m_SndFile.m_nChannels; nChn++) + { + if(newTypeIsMOD_XM || newTypeIsS3M) + { + m_SndFile.ChnSettings->nVolume = 64; + m_SndFile.ChnSettings->dwFlags &= ~CHN_SURROUND; + } + if(newTypeIsXM) + { + m_SndFile.ChnSettings->nPan = 128; + } + } + BEGIN_CRITICAL(); m_SndFile.ChangeModTypeTo(nNewType); if (!newTypeIsXM_IT_MPT && (m_SndFile.m_dwSongFlags & SONG_LINEARSLIDES)) Modified: trunk/OpenMPT/mptrack/Moptions.cpp =================================================================== --- trunk/OpenMPT/mptrack/Moptions.cpp 2009-11-21 18:24:39 UTC (rev 421) +++ trunk/OpenMPT/mptrack/Moptions.cpp 2009-11-23 22:00:32 UTC (rev 422) @@ -701,7 +701,7 @@ {PATTERN_OVERFLOWPASTE, "Overflow paste mode", "Wrap pasted pattern data into next pattern. This is useful for creating echo channels."}, {PATTERN_POSITIONAWARETIMER, "Position aware timer", "If enabled, timer will show the playback position time if possible instead of running timer."}, {PATTERN_RESETCHANNELS, "Reset channels on loop", "If enabled, channels will be reset to their initial state when song looping is enabled.\nNote: This does not affect manual song loops (i.e. triggered by pattern commands)"}, - {PATTERN_LIVEUPDATETREE,"Update sample status in tree", "If enabled, active samples and instruments will be indicated by a differnt icon in the treeview."} + {PATTERN_LIVEUPDATETREE,"Update sample status in tree", "If enabled, active samples and instruments will be indicated by a different icon in the treeview."} }; void COptionsGeneral::DoDataExchange(CDataExchange* pDX) Modified: trunk/OpenMPT/mptrack/mptrack.rc =================================================================== --- trunk/OpenMPT/mptrack/mptrack.rc 2009-11-21 18:24:39 UTC (rev 421) +++ trunk/OpenMPT/mptrack/mptrack.rc 2009-11-23 22:00:32 UTC (rev 422) @@ -273,7 +273,7 @@ IDD_OPTIONS_COLORS DIALOGEX 0, 0, 272, 281 STYLE DS_SETFONT | DS_3DLOOK | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Colors" +CAPTION "Colours" FONT 8, "MS Sans Serif", 0, 0, 0x0 BEGIN COMBOBOX IDC_COMBO1,15,25,134,109,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP @@ -287,14 +287,14 @@ PUSHBUTTON "FT2",IDC_BUTTON6,204,246,24,15 PUSHBUTTON "IT",IDC_BUTTON7,174,246,24,15 PUSHBUTTON "Buzz",IDC_BUTTON8,234,246,24,15 - CONTROL "Color",IDC_BUTTON1,"Button",BS_OWNERDRAW,25,194,51,15 - CONTROL "Color",IDC_BUTTON2,"Button",BS_OWNERDRAW,98,194,51,15 - CONTROL "Color",IDC_BUTTON3,"Button",BS_OWNERDRAW,168,194,51,15 + CONTROL "Colour",IDC_BUTTON1,"Button",BS_OWNERDRAW,25,194,51,15 + CONTROL "Colour",IDC_BUTTON2,"Button",BS_OWNERDRAW,98,194,51,15 + CONTROL "Colour",IDC_BUTTON3,"Button",BS_OWNERDRAW,168,194,51,15 LTEXT "Background:",IDC_TEXT1,25,183,60,8 LTEXT "Foreground:",IDC_TEXT2,98,183,62,8 LTEXT "Highlight:",IDC_TEXT3,169,185,61,8 GROUPBOX "",IDC_STATIC,5,5,260,211 - LTEXT "Select color for:",IDC_STATIC,15,15,63,8 + LTEXT "Select colour for:",IDC_STATIC,15,15,63,8 LTEXT "rows",IDC_STATIC,138,92,16,8 LTEXT "rows",IDC_STATIC,138,110,16,8 CONTROL "",IDC_BUTTON4,"Button",BS_OWNERDRAW | BS_FLAT,65,130,114,43 @@ -302,7 +302,7 @@ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,75,136,10 PUSHBUTTON "Load...",IDC_LOAD_COLORSCHEME,18,246,48,15 PUSHBUTTON "Save...",IDC_SAVE_COLORSCHEME,72,246,48,15 - GROUPBOX "Color Presets",IDC_STATIC,6,228,264,42 + GROUPBOX "Colour Presets",IDC_STATIC,6,228,264,42 END IDD_OPTIONS_MIDI DIALOGEX 0, 0, 272, 281 Modified: trunk/OpenMPT/soundlib/Load_it.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_it.cpp 2009-11-21 18:24:39 UTC (rev 421) +++ trunk/OpenMPT/soundlib/Load_it.cpp 2009-11-23 22:00:32 UTC (rev 422) @@ -3413,15 +3413,25 @@ if(m_nType & MOD_TYPE_MPT) { + UINT maxNodes = 0; + for(INSTRUMENTINDEX nIns = 1; nIns <= m_nInstruments; nIns++) if(Instruments[nIns] != nullptr) + { + maxNodes = max(maxNodes, Instruments[nIns]->VolEnv.nNodes); + maxNodes = max(maxNodes, Instruments[nIns]->PanEnv.nNodes); + maxNodes = max(maxNodes, Instruments[nIns]->PitchEnv.nNodes); + } // write full envelope information for MPTM files (more env points) - WriteInstrumentPropertyForAllInstruments('VP[.', sizeof(m_defaultInstrument.VolEnv.Ticks ), f, instruments, nInstruments); - WriteInstrumentPropertyForAllInstruments('VE[.', sizeof(m_defaultInstrument.VolEnv.Values), f, instruments, nInstruments); + if(maxNodes > 25) + { + WriteInstrumentPropertyForAllInstruments('VP[.', sizeof(m_defaultInstrument.VolEnv.Ticks ), f, instruments, nInstruments); + WriteInstrumentPropertyForAllInstruments('VE[.', sizeof(m_defaultInstrument.VolEnv.Values), f, instruments, nInstruments); - WriteInstrumentPropertyForAllInstruments('PP[.', sizeof(m_defaultInstrument.PanEnv.Ticks), f, instruments, nInstruments); - WriteInstrumentPropertyForAllInstruments('PE[.', sizeof(m_defaultInstrument.PanEnv.Values), f, instruments, nInstruments); + WriteInstrumentPropertyForAllInstruments('PP[.', sizeof(m_defaultInstrument.PanEnv.Ticks), f, instruments, nInstruments); + WriteInstrumentPropertyForAllInstruments('PE[.', sizeof(m_defaultInstrument.PanEnv.Values), f, instruments, nInstruments); - WriteInstrumentPropertyForAllInstruments('PiP[', sizeof(m_defaultInstrument.PitchEnv.Ticks), f, instruments, nInstruments); - WriteInstrumentPropertyForAllInstruments('PiE[', sizeof(m_defaultInstrument.PitchEnv.Values), f, instruments, nInstruments); + WriteInstrumentPropertyForAllInstruments('PiP[', sizeof(m_defaultInstrument.PitchEnv.Ticks), f, instruments, nInstruments); + WriteInstrumentPropertyForAllInstruments('PiE[', sizeof(m_defaultInstrument.PitchEnv.Values), f, instruments, nInstruments); + } } return; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2009-11-27 19:18:03
|
Revision: 424 http://modplug.svn.sourceforge.net/modplug/?rev=424&view=rev Author: saga-games Date: 2009-11-27 19:17:19 +0000 (Fri, 27 Nov 2009) Log Message: ----------- [Imp] Orderlist: Using the keyboard manager for shortcuts. The selection code in the keyboard manager always was and still IS very dirty and all those hacks should be rewritten at some point. [Fix] Treeview: Sequence context menu was slightly buggy. [Mod] Default keymaps have been updated to contain the orderlist shortcuts. Modified Paths: -------------- trunk/OpenMPT/mptrack/CommandSet.cpp trunk/OpenMPT/mptrack/CommandSet.h trunk/OpenMPT/mptrack/Ctrl_pat.cpp trunk/OpenMPT/mptrack/Ctrl_pat.h trunk/OpenMPT/mptrack/Ctrl_seq.cpp trunk/OpenMPT/mptrack/KeyConfigDlg.cpp trunk/OpenMPT/mptrack/View_tre.cpp trunk/OpenMPT/mptrack/res/defaultKeybindings.mkb trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb trunk/OpenMPT/packageTemplate/extraKeymaps/FR_FT2Style_(goor00).mkb trunk/OpenMPT/packageTemplate/extraKeymaps/FR_mpt_classic_(vanisherIII).mkb trunk/OpenMPT/packageTemplate/extraKeymaps/SE_laptop_(ganja).mkb trunk/OpenMPT/packageTemplate/extraKeymaps/UK_mpt_it2_hybrid_(rewbs).mkb trunk/OpenMPT/packageTemplate/extraKeymaps/US_it2_(lpchip).mkb trunk/OpenMPT/packageTemplate/extraKeymaps/US_mpt_classic_(diamond).mkb trunk/OpenMPT/packageTemplate/extraKeymaps/dvorak_(snu).mkb Modified: trunk/OpenMPT/mptrack/CommandSet.cpp =================================================================== --- trunk/OpenMPT/mptrack/CommandSet.cpp 2009-11-27 18:52:15 UTC (rev 423) +++ trunk/OpenMPT/mptrack/CommandSet.cpp 2009-11-27 19:17:19 UTC (rev 424) @@ -2350,6 +2350,66 @@ commands[kcEditPasteFlood].isHidden = false; commands[kcEditPasteFlood].isDummy = false; + commands[kcOrderlistNavigateLeft].UID = 1794; + commands[kcOrderlistNavigateLeft].Message = "Previous Order"; + commands[kcOrderlistNavigateLeft].isHidden = false; + commands[kcOrderlistNavigateLeft].isDummy = false; + + commands[kcOrderlistNavigateRight].UID = 1795; + commands[kcOrderlistNavigateRight].Message = "Next Order"; + commands[kcOrderlistNavigateRight].isHidden = false; + commands[kcOrderlistNavigateRight].isDummy = false; + + commands[kcOrderlistNavigateFirst].UID = 1796; + commands[kcOrderlistNavigateFirst].Message = "First Order"; + commands[kcOrderlistNavigateFirst].isHidden = false; + commands[kcOrderlistNavigateFirst].isDummy = false; + + commands[kcOrderlistNavigateLast].UID = 1797; + commands[kcOrderlistNavigateLast].Message = "Last Order"; + commands[kcOrderlistNavigateLast].isHidden = false; + commands[kcOrderlistNavigateLast].isDummy = false; + + commands[kcOrderlistNavigateLeftSelect].UID = 1798; + commands[kcOrderlistNavigateLeftSelect].Message = "kcOrderlistNavigateLeftSelect"; + commands[kcOrderlistNavigateLeftSelect].isHidden = true; + commands[kcOrderlistNavigateLeftSelect].isDummy = false; + + commands[kcOrderlistNavigateRightSelect].UID = 1799; + commands[kcOrderlistNavigateRightSelect].Message = "kcOrderlistNavigateRightSelect"; + commands[kcOrderlistNavigateRightSelect].isHidden = true; + commands[kcOrderlistNavigateRightSelect].isDummy = false; + + commands[kcOrderlistNavigateFirstSelect].UID = 1800; + commands[kcOrderlistNavigateFirstSelect].Message = "kcOrderlistNavigateFirstSelect"; + commands[kcOrderlistNavigateFirstSelect].isHidden = true; + commands[kcOrderlistNavigateFirstSelect].isDummy = false; + + commands[kcOrderlistNavigateLastSelect].UID = 1801; + commands[kcOrderlistNavigateLastSelect].Message = "kcOrderlistNavigateLastSelect"; + commands[kcOrderlistNavigateLastSelect].isHidden = true; + commands[kcOrderlistNavigateLastSelect].isDummy = false; + + commands[kcOrderlistEditDelete].UID = 1802; + commands[kcOrderlistEditDelete].Message = "Delete Order"; + commands[kcOrderlistEditDelete].isHidden = false; + commands[kcOrderlistEditDelete].isDummy = false; + + commands[kcOrderlistEditInsert].UID = 1803; + commands[kcOrderlistEditInsert].Message = "Insert Order"; + commands[kcOrderlistEditInsert].isHidden = false; + commands[kcOrderlistEditInsert].isDummy = false; + + commands[kcOrderlistEditPattern].UID = 1804; + commands[kcOrderlistEditPattern].Message = "Edit Pattern"; + commands[kcOrderlistEditPattern].isHidden = false; + commands[kcOrderlistEditPattern].isDummy = false; + + commands[kcOrderlistSwitchToPatternView].UID = 1805; + commands[kcOrderlistSwitchToPatternView].Message = "Switch to pattern editor"; + commands[kcOrderlistSwitchToPatternView].isHidden = false; + commands[kcOrderlistSwitchToPatternView].isDummy = false; + #ifdef _DEBUG for (int i=0; i<kcNumCommands; i++) { if (commands[i].UID != 0) { // ignore unset UIDs @@ -2508,7 +2568,28 @@ } } } - // When we get a new slection key, we need to make sure that + // Same applies for orderlist navigation + else if (inCmd>=kcStartOrderlistCommands&& inCmd<=kcEndOrderlistNavigationSelect) + {//Check that it is a nav cmd + CommandID cmdNavSelection = (CommandID)(kcStartOrderlistNavigationSelect+ (inCmd-kcStartOrderlistNavigation)); + for (int kSel=0; kSel<commands[kcSelect].kcList.GetSize(); kSel++) + {//for all selection modifiers + curKc=commands[kcSelect].kcList[kSel]; + newKc=inKc; + newKc.mod|=curKc.mod; //Add selection modifier's modifiers to this command + if (adding) + { + Log("Enforcing rule krAllowNavigationWithSelection - adding key:%d with modifier:%d to command: %d\n", kSel, newKc.mod, cmdNavSelection); + Add(newKc, cmdNavSelection, false); + } + else + { + Log("Enforcing rule krAllowNavigationWithSelection - removing key:%d with modifier:%d to command: %d\n", kSel, newKc.mod, cmdNavSelection); + Remove(newKc, cmdNavSelection); + } + } + } + // When we get a new selection key, we need to make sure that // all navigation commands will work with this selection key pressed else if (inCmd==kcSelect) {// check that is is a selection @@ -2531,6 +2612,25 @@ } } } // end all nav commands + for (int curCmd=kcStartOrderlistNavigation; curCmd<=kcEndOrderlistNavigation; curCmd++) + {// for all nav commands + for (int k=0; k<commands[curCmd].kcList.GetSize(); k++) + {// for all keys for this command + CommandID cmdNavSelection = (CommandID)(kcStartOrderlistNavigationSelect+ (curCmd-kcStartOrderlistNavigation)); + newKc=commands[curCmd].kcList[k]; // get all properties from the current nav cmd key + newKc.mod|=inKc.mod; // and the new selection modifier + if (adding) + { + Log("Enforcing rule krAllowNavigationWithSelection - adding key:%d with modifier:%d to command: %d\n", curCmd, inKc.mod, cmdNavSelection); + Add(newKc, cmdNavSelection, false); + } + else + { + Log("Enforcing rule krAllowNavigationWithSelection - removing key:%d with modifier:%d to command: %d\n", curCmd, inKc.mod, cmdNavSelection); + Remove(newKc, cmdNavSelection); + } + } + } // end all nav commands } } // end krAllowNavigationWithSelection @@ -2556,6 +2656,23 @@ } } } + // Same for orderlist navigation + if (inCmd>=kcStartOrderlistNavigation&& inCmd<=kcEndOrderlistNavigation) + {//if this is a navigation command + for (int kSel=0; kSel<commands[kcSelect].kcList.GetSize(); kSel++) + {//for all deselection modifiers + newKcSel=commands[kcSelect].kcList[kSel]; // get all properties from the selection key + newKcSel.mod|=inKc.mod; // add modifiers from the new nav command + if (adding) { + Log("Enforcing rule krAllowSelectionWithNavigation: adding removing kcSelectWithNav and kcSelectOffWithNav\n"); + Add(newKcSel, kcSelectWithNav, false); + } + else { + Log("Enforcing rule krAllowSelectionWithNavigation: removing kcSelectWithNav and kcSelectOffWithNav\n"); + Remove(newKcSel, kcSelectWithNav); + } + } + } // When we get a new selection key, we need to ensure it will work even when // any navigation key is pressed else if (inCmd==kcSelect) @@ -2576,6 +2693,22 @@ } } } // end all nav commands + for (int curCmd=kcStartOrderlistNavigation; curCmd<=kcEndOrderlistNavigation; curCmd++) + {//for all nav commands + for (int k=0; k<commands[curCmd].kcList.GetSize(); k++) + {// for all keys for this command + newKcSel=inKc; // get all properties from the selection key + newKcSel.mod|=commands[curCmd].kcList[k].mod; //add the nav keys' modifiers + if (adding) { + Log("Enforcing rule krAllowSelectionWithNavigation - adding key:%d with modifier:%d to command: %d\n", curCmd, inKc.mod, kcSelectWithNav); + Add(newKcSel, kcSelectWithNav, false); + } + else { + Log("Enforcing rule krAllowSelectionWithNavigation - removing key:%d with modifier:%d to command: %d\n", curCmd, inKc.mod, kcSelectWithNav); + Remove(newKcSel, kcSelectWithNav); + } + } + } // end all nav commands } } @@ -2999,14 +3132,20 @@ //ASSERT(eventTypes.GetSize()>0); //Handle super-contexts (contexts that represent a set of sub contexts) - if (curKc.ctx == kCtxViewPatterns) { + if (curKc.ctx == kCtxViewPatterns) + { contexts.Add(kCtxViewPatternsNote); contexts.Add(kCtxViewPatternsIns); contexts.Add(kCtxViewPatternsVol); contexts.Add(kCtxViewPatternsFX); contexts.Add(kCtxViewPatternsFXparam); } - else { + else if(curKc.ctx == kCtxCtrlPatterns) + { + contexts.Add(kCtxCtrlOrderlist); + } + else + { contexts.Add(curKc.ctx); } @@ -3259,6 +3398,7 @@ case kCtxCtrlSamples: return "Sample Context [top]"; case kCtxCtrlInstruments: return "Instrument Context [top]"; case kCtxCtrlComments: return "Comments Context [top]"; + case kCtxCtrlOrderlist: return "Orderlist"; case kCtxVSTGUI: return "Plugin GUI Context"; case kCtxUnknownContext: default: return "Unknown Context"; @@ -3494,12 +3634,14 @@ m_isParentContext[kCtxCtrlInstruments][kCtxAllContexts] = true; m_isParentContext[kCtxCtrlComments][kCtxAllContexts] = true; m_isParentContext[kCtxCtrlSamples][kCtxAllContexts] = true; + m_isParentContext[kCtxCtrlOrderlist][kCtxAllContexts] = true; m_isParentContext[kCtxViewPatternsNote][kCtxViewPatterns] = true; m_isParentContext[kCtxViewPatternsIns][kCtxViewPatterns] = true; m_isParentContext[kCtxViewPatternsVol][kCtxViewPatterns] = true; m_isParentContext[kCtxViewPatternsFX][kCtxViewPatterns] = true; m_isParentContext[kCtxViewPatternsFXparam][kCtxViewPatterns] = true; + m_isParentContext[kCtxCtrlOrderlist][kCtxCtrlPatterns] = true; } Modified: trunk/OpenMPT/mptrack/CommandSet.h =================================================================== --- trunk/OpenMPT/mptrack/CommandSet.h 2009-11-27 18:52:15 UTC (rev 423) +++ trunk/OpenMPT/mptrack/CommandSet.h 2009-11-27 19:17:19 UTC (rev 424) @@ -962,6 +962,27 @@ kcVSTGUIRandParams, kcEndVSTGUICommands=kcVSTGUIRandParams, + kcStartOrderlistCommands, + kcStartOrderlistNavigation=kcStartOrderlistCommands, + kcOrderlistNavigateLeft=kcStartOrderlistNavigation, + kcOrderlistNavigateRight, + kcOrderlistNavigateFirst, + kcOrderlistNavigateLast, + kcEndOrderlistNavigation= kcOrderlistNavigateLast, + // with selection key(must match order above) + kcStartOrderlistNavigationSelect, + kcOrderlistNavigateLeftSelect=kcStartOrderlistNavigationSelect, + kcOrderlistNavigateRightSelect, + kcOrderlistNavigateFirstSelect, + kcOrderlistNavigateLastSelect, + kcEndOrderlistNavigationSelect = kcOrderlistNavigateLastSelect, + + kcOrderlistEditDelete, + kcOrderlistEditInsert, + kcOrderlistEditPattern, + kcOrderlistSwitchToPatternView, + kcEndOrderlistCommands=kcOrderlistSwitchToPatternView, + kcNumCommands, }; Modified: trunk/OpenMPT/mptrack/Ctrl_pat.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_pat.cpp 2009-11-27 18:52:15 UTC (rev 423) +++ trunk/OpenMPT/mptrack/Ctrl_pat.cpp 2009-11-27 19:17:19 UTC (rev 424) @@ -699,10 +699,7 @@ void CCtrlPatterns::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) //------------------------------------------------------------------ { - if (!m_OrderList.ProcessKeyDown(nChar)) - { - CModControlDlg::OnKeyDown(nChar, nRepCnt, nFlags); - } + CModControlDlg::OnKeyDown(nChar, nRepCnt, nFlags); } Modified: trunk/OpenMPT/mptrack/Ctrl_pat.h =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_pat.h 2009-11-27 18:52:15 UTC (rev 423) +++ trunk/OpenMPT/mptrack/Ctrl_pat.h 2009-11-27 19:17:19 UTC (rev 424) @@ -26,7 +26,7 @@ //m_nScrollPos2nd: 2nd selection point if multiple orders are selected // (not neccessarily the higher order - GetCurSel() is taking care of that.) ORDERINDEX m_nXScroll, m_nScrollPos, m_nScrollPos2nd, m_nDropPos; - bool m_bScrolling, m_bDragging, m_bShift; + bool m_bScrolling, m_bDragging; ORDERINDEX m_nDragOrder; //To tell how many orders('orderboxes') to show at least //on both sides of current order(when updating orderslist position). @@ -46,10 +46,11 @@ UINT GetCurrentPattern() const; ORD_SELECTION GetCurSel(bool bIgnoreSelection) const; // make the current selection the secondary selection (used for keyboard orderlist navigation) - inline void SetCurSelTo2ndSel() - {if(m_bShift && m_nScrollPos2nd == ORDERINDEX_INVALID) m_nScrollPos2nd = m_nScrollPos; else if(!m_bShift && m_nScrollPos2nd != ORDERINDEX_INVALID) m_nScrollPos2nd = ORDERINDEX_INVALID;}; + inline void SetCurSelTo2ndSel(bool isSelectionKeyPressed) + { if(isSelectionKeyPressed && m_nScrollPos2nd == ORDERINDEX_INVALID) m_nScrollPos2nd = m_nScrollPos; + else if(!isSelectionKeyPressed && m_nScrollPos2nd != ORDERINDEX_INVALID) m_nScrollPos2nd = ORDERINDEX_INVALID; + }; bool SetCurSel(ORDERINDEX sel, bool bEdit = true, bool bShiftClick = false, bool bIgnoreCurSel = false); - BOOL ProcessKeyDown(UINT nChar); BOOL ProcessChar(UINT nChar); BOOL UpdateScrollInfo(); void UpdateInfoText(); @@ -86,6 +87,9 @@ // Set given sqeuence and update orderlist display. void SelectSequence(const SEQUENCEINDEX nSeq); + // Little helper function to avoid copypasta + bool IsSelectionKeyPressed() {return CMainFrame::GetInputHandler()->SelectionPressed();} + // Clipboard. void OnEditCopy(); void OnEditCut(); @@ -245,6 +249,7 @@ afx_msg void TogglePluginEditor(); //rewbs.instroVST afx_msg void ToggleSplitPluginEditor(); //rewbs.instroVST afx_msg void OnToggleOverflowPaste(); + afx_msg LRESULT OnCustomKeyMsg(WPARAM, LPARAM); //}}AFX_MSG DECLARE_MESSAGE_MAP() Modified: trunk/OpenMPT/mptrack/Ctrl_seq.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_seq.cpp 2009-11-27 18:52:15 UTC (rev 423) +++ trunk/OpenMPT/mptrack/Ctrl_seq.cpp 2009-11-27 19:17:19 UTC (rev 424) @@ -91,7 +91,6 @@ m_nOrderlistMargins = s_nDefaultMargins; m_bScrolling = false; m_bDragging = false; - m_bShift = false; } @@ -319,48 +318,6 @@ } -BOOL COrderList::ProcessKeyDown(UINT nChar) -//----------------------------------------- -{ - switch(nChar) - { - case VK_UP: - case VK_LEFT: SetCurSelTo2ndSel(); SetCurSel(m_nScrollPos - 1); break; - case VK_DOWN: - case VK_RIGHT: SetCurSelTo2ndSel(); SetCurSel(m_nScrollPos + 1); break; - case VK_HOME: SetCurSelTo2ndSel(); SetCurSel(0); break; - case VK_END: - if (m_pModDoc) - { - CSoundFile *pSndFile = m_pModDoc->GetSoundFile(); - ORDERINDEX nLast = pSndFile->Order.GetLengthFirstEmpty(); - if (nLast) - nLast--; - SetCurSelTo2ndSel(); - SetCurSel(nLast); - } - break; - case VK_DELETE: OnDeleteOrder(); break; - case VK_INSERT: OnInsertOrder(); break; - case VK_TAB: OnSwitchToView(); break; - case VK_RETURN: OnLButtonDblClk(0, CPoint(0,0)); OnSwitchToView(); break; - - //rewbs.customKeys: these are now global commands handled via the inputInhandler -/* case VK_F5: OnPlayerPlay(); break; - case VK_F6: OnPlayerPlayFromStart(); break; - case VK_F7: OnPatternPlayFromStart(); break; - case VK_ESCAPE: - case VK_F8: OnPlayerPause(); break; -*/ - default: - return FALSE; - } - - return TRUE; - -} - - BOOL COrderList::ProcessChar(UINT nChar) //-------------------------------------- { @@ -425,45 +382,92 @@ UINT nRepCnt = LOWORD(pMsg->lParam); UINT nFlags = HIWORD(pMsg->lParam); KeyEventType kT = ih->GetKeyEventType(nFlags); + + InputTargetContext ctx = (InputTargetContext)(kCtxCtrlOrderlist); + if (ih->KeyEvent(ctx, nChar, nRepCnt, nFlags, kT) != kcNull) + return true; // Mapped to a command, no need to pass message on. + //HACK: masquerade as kCtxViewPatternsNote context until we implement appropriate // command propagation to kCtxCtrlOrderlist context. - //InputTargetContext ctx = (InputTargetContext)(kCtxCtrlOrderlist); - InputTargetContext ctx = (InputTargetContext)(kCtxViewPatternsNote); - - CommandID kc = ih->KeyEvent(ctx, nChar, nRepCnt, nFlags, kT); - switch (kc) - { - case kcSwitchToOrderList: OnSwitchToView(); return true; - case kcChangeLoopStatus: m_pParent->OnModCtrlMsg(CTRLMSG_PAT_LOOP, -1); return true; - case kcToggleFollowSong: m_pParent->OnFollowSong(); return true; + ctx = (InputTargetContext)(kCtxViewPatternsNote); + if (ih->KeyEvent(ctx, nChar, nRepCnt, nFlags, kT) != kcNull) + return true; // Mapped to a command, no need to pass message on. - case kcChannelUnmuteAll: - case kcUnmuteAllChnOnPatTransition: - ::PostMessage(m_pParent->GetViewWnd(), WM_MOD_KEYCOMMAND, kc, 0); - return true; - } } //end rewbs.customKeys switch(pMsg->message) { - case WM_KEYUP: - if ((pMsg->wParam == VK_SHIFT) || (pMsg->wParam == VK_LSHIFT) || (pMsg->wParam == VK_RSHIFT)) m_bShift = FALSE; - break; - case WM_KEYDOWN: - if ((pMsg->wParam == VK_SHIFT) || (pMsg->wParam == VK_LSHIFT) || (pMsg->wParam == VK_RSHIFT)) m_bShift = TRUE; - if (ProcessKeyDown(pMsg->wParam)) return TRUE; - break; case WM_CHAR: - if (ProcessChar(pMsg->wParam)) return TRUE; + if (ProcessChar(pMsg->wParam)) return true; break; } return CWnd::PreTranslateMessage(pMsg); } +LRESULT COrderList::OnCustomKeyMsg(WPARAM wParam, LPARAM) +//------------------------------------------------------- +{ + if (wParam == kcNull) + return 0; + + switch(wParam) + { + case kcEditCopy: + OnEditCopy(); return wParam; + case kcEditCut: + OnEditCut(); return wParam; + case kcEditPaste: + OnEditPaste(); return wParam; + + case kcOrderlistNavigateLeftSelect: + case kcOrderlistNavigateLeft: + SetCurSelTo2ndSel(wParam == kcOrderlistNavigateLeftSelect); SetCurSel(m_nScrollPos - 1); return wParam; + case kcOrderlistNavigateRightSelect: + case kcOrderlistNavigateRight: + SetCurSelTo2ndSel(wParam == kcOrderlistNavigateRightSelect); SetCurSel(m_nScrollPos + 1); return wParam; + case kcOrderlistNavigateFirstSelect: + case kcOrderlistNavigateFirst: + SetCurSelTo2ndSel(wParam == kcOrderlistNavigateFirstSelect); SetCurSel(0); return wParam; + case kcOrderlistNavigateLastSelect: + case kcOrderlistNavigateLast: + if((m_pModDoc != nullptr) && (m_pModDoc->GetSoundFile() != nullptr)) + { + SetCurSelTo2ndSel(wParam == kcOrderlistNavigateLast); + ORDERINDEX nLast = m_pModDoc->GetSoundFile()->Order.GetLengthTailTrimmed(); + if(nLast > 0) nLast--; + SetCurSel(nLast); + } + return wParam; + case kcOrderlistEditDelete: + OnDeleteOrder(); return wParam; + case kcOrderlistEditInsert: + OnInsertOrder(); return wParam; + case kcOrderlistSwitchToPatternView: + OnSwitchToView(); return wParam; + case kcOrderlistEditPattern: + OnLButtonDblClk(0, CPoint(0,0)); OnSwitchToView(); return wParam; + + // kCtxViewPatternsNote messages + case kcSwitchToOrderList: + OnSwitchToView(); + return wParam; + case kcChangeLoopStatus: + m_pParent->OnModCtrlMsg(CTRLMSG_PAT_LOOP, -1); return wParam; + case kcToggleFollowSong: m_pParent->OnFollowSong(); return wParam; + + case kcChannelUnmuteAll: + case kcUnmuteAllChnOnPatTransition: + ::PostMessage(m_pParent->GetViewWnd(), WM_MOD_KEYCOMMAND, wParam, 0); return wParam; + } + + return 0; +} + + static const char szClipboardOrdersHdr[] = "OpenMPT %3s\x0D\x0A"; static const char szClipboardOrdCountFieldHdr[] = "OrdNum: %u\x0D\x0A"; static const char szClipboardOrdersFieldHdr[] = "OrdLst: "; @@ -613,23 +617,6 @@ } -LRESULT COrderList::OnCustomKeyMsg(WPARAM wParam, LPARAM) -//------------------------------------------------------- -{ - if (wParam == kcNull) - return 0; - - switch(wParam) - { - case kcEditCopy: OnEditCopy(); return wParam; - case kcEditCut: OnEditCut(); return wParam; - case kcEditPaste: OnEditPaste(); return wParam; - } - - return 0; -} - - void COrderList::UpdateView(DWORD dwHintMask, CObject *pObj) //---------------------------------------------------------- { @@ -645,7 +632,6 @@ //------------------------------- { if (m_pParent) m_pParent->PostViewMessage(VIEWMSG_SETFOCUS); - m_bShift = FALSE; } @@ -788,7 +774,6 @@ { CWnd::OnKillFocus(pWnd); InvalidateSelection(); - m_bShift = FALSE; CMainFrame::GetMainFrame()->m_pOrderlistHasFocus = nullptr; } @@ -842,6 +827,7 @@ { CRect rect; GetClientRect(&rect); + bool bSelection = IsSelectionKeyPressed(); if (m_bDragging) { @@ -865,13 +851,13 @@ for(int i = 0; i <= nMoveCount; i++) { - if(!m_pModDoc->MoveOrder(nMovePos, m_nDropPos, true, m_bShift)) return; - if((bMoveBack ^ m_bShift) == true && bMultiSelection) + if(!m_pModDoc->MoveOrder(nMovePos, m_nDropPos, true, bSelection)) return; + if((bMoveBack ^ bSelection) == true && bMultiSelection) { nMovePos++; m_nDropPos++; } - if(bMoveBack && m_bShift && bMultiSelection) { + if(bMoveBack && bSelection && bMultiSelection) { nMovePos += 2; m_nDropPos++; } @@ -881,10 +867,10 @@ // adjust selection m_nScrollPos2nd = m_nDropPos - 1; m_nDropPos -= nMoveCount + (bMoveBack ? 0 : 1); - SetCurSel((bMoveBack && (!m_bShift)) ? m_nDropPos - 1 : m_nDropPos); + SetCurSel((bMoveBack && (!bSelection)) ? m_nDropPos - 1 : m_nDropPos); } else { - SetCurSel(((m_nDragOrder < (UINT)m_nDropPos) && (!m_bShift)) ? m_nDropPos - 1 : m_nDropPos); + SetCurSel(((m_nDragOrder < (UINT)m_nDropPos) && (!bSelection)) ? m_nDropPos - 1 : m_nDropPos); } m_pModDoc->SetModified(); } Modified: trunk/OpenMPT/mptrack/KeyConfigDlg.cpp =================================================================== --- trunk/OpenMPT/mptrack/KeyConfigDlg.cpp 2009-11-27 18:52:15 UTC (rev 423) +++ trunk/OpenMPT/mptrack/KeyConfigDlg.cpp 2009-11-27 19:17:19 UTC (rev 424) @@ -204,10 +204,18 @@ commandCategories.Add(*newCat); delete newCat; - newCat = new CommandCategory(" Pattern [Top]", kCtxCtrlPatterns); + newCat = new CommandCategory(" Pattern Editor [Top]", kCtxCtrlPatterns); commandCategories.Add(*newCat); delete newCat; + newCat = new CommandCategory(" Pattern Editor - Orderlist", kCtxCtrlOrderlist); + + for (int c=kcStartOrderlistCommands; c<=kcEndOrderlistCommands; c++) + newCat->commands.Add(c); + + commandCategories.Add(*newCat); + delete newCat; + newCat = new CommandCategory(" Pattern Editor - General", kCtxViewPatterns); for (int c=kcStartPlainNavigate; c<=kcEndPlainNavigate; c++) Modified: trunk/OpenMPT/mptrack/View_tre.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_tre.cpp 2009-11-27 18:52:15 UTC (rev 423) +++ trunk/OpenMPT/mptrack/View_tre.cpp 2009-11-27 19:17:19 UTC (rev 424) @@ -1081,15 +1081,10 @@ // find sequence this item belongs to for(SEQUENCEINDEX nSeq = 0; nSeq < pSong->tiOrders.size(); nSeq++) { + if(hItem == pSong->tiSequences[nSeq]) return (MODITEM_SEQUENCE | (nSeq << 16)); for(ORDERINDEX nOrd = 0; nOrd < pSong->tiOrders[nSeq].size(); nOrd++) { - if (hItem == pSong->tiOrders[nSeq][nOrd]) - { - return (MODITEM_ORDER | (nOrd << 16) | (((uint64)nSeq) << 32)); - } else if(hItem == pSong->tiSequences[nSeq]) - { - return (MODITEM_SEQUENCE | (nSeq << 16)); - } + if (hItem == pSong->tiOrders[nSeq][nOrd]) return (MODITEM_ORDER | (nOrd << 16) | (((uint64)nSeq) << 32)); } } } @@ -2319,9 +2314,12 @@ case MODITEM_HDR_ORDERS: { CModDoc *pModDoc = GetDocumentFromItem(hItem); - if(pModDoc && (pModDoc->GetModType() == MOD_TYPE_MPT)) + CSoundFile *pSndFile = (pModDoc) ? pModDoc->GetSoundFile() : nullptr; + if(pModDoc && pSndFile && (pModDoc->GetModType() == MOD_TYPE_MPT)) { AppendMenu(hMenu, MF_STRING, ID_MODTREE_INSERT, "&Insert Sequence"); + if(pSndFile->Order.GetNumSequences() == 1) // this is a sequence + AppendMenu(hMenu, MF_STRING, ID_MODTREE_DUPLICATE, "D&uplicate Sequence"); } } break; @@ -2832,7 +2830,7 @@ pModDoc = GetDocumentFromItem(hItem); CSoundFile *pSndFile = (pModDoc) ? pModDoc->GetSoundFile() : nullptr; - if (pModDoc && pSndFile && (qwItemType == MODITEM_SEQUENCE)) + if (pModDoc && pSndFile && ((qwItemType == MODITEM_SEQUENCE) || (qwItemType == MODITEM_HDR_ORDERS))) { pSndFile->Order.SetSequence((SEQUENCEINDEX)dwItemNo); pSndFile->Order.AddSequence(true); Modified: trunk/OpenMPT/mptrack/res/defaultKeybindings.mkb =================================================================== --- trunk/OpenMPT/mptrack/res/defaultKeybindings.mkb 2009-11-27 18:52:15 UTC (rev 423) +++ trunk/OpenMPT/mptrack/res/defaultKeybindings.mkb 2009-11-27 19:17:19 UTC (rev 424) @@ -277,4 +277,14 @@ //----( Comments Context [top] (18) )------------ -//----( Unknown Context (19) )------------ +//----( Orderlist (19) )------------ +19:1794:0:37:5 //Previous Order: LEFT (KeyDown|KeyHold) +19:1794:0:38:5 //Previous Order: UP (KeyDown|KeyHold) +19:1795:0:39:5 //Next Order: RIGHT (KeyDown|KeyHold) +19:1795:0:40:5 //Next Order: DOWN (KeyDown|KeyHold) +19:1796:0:36:5 //First Order: HOME (KeyDown|KeyHold) +19:1797:0:35:5 //Last Order: END (KeyDown|KeyHold) +19:1802:0:46:5 //Delete Order: DELETE (KeyDown|KeyHold) +19:1803:0:45:5 //Insert Order: INSERT (KeyDown|KeyHold) +19:1804:0:13:5 //Edit Pattern: ENTER (KeyDown|KeyHold) +19:1805:0:9:5 //Switch to pattern editor: TAB (KeyDown|KeyHold) Modified: trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb =================================================================== --- trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb 2009-11-27 18:52:15 UTC (rev 423) +++ trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb 2009-11-27 19:17:19 UTC (rev 424) @@ -24,7 +24,7 @@ 0:1361:2:45:1 //Copy: Ctrl+EINFG (KeyDown) 0:1362:2:86:1 //Paste: Ctrl+V (KeyDown) 0:1363:3:86:1 //Mix Paste: Shift+Ctrl+V (KeyDown) -0:1686:1:86:1 //Mix Paste (old IT Style): Shift+V (KeyDown) +0:1793:1:86:1 //Paste Flood: Shift+V (KeyDown) 0:1364:2:53:1 //SelectAll: Ctrl+5 (KeyDown) 0:1365:2:70:1 //Find: Ctrl+F (KeyDown) 0:1366:0:114:1 //Find Next: F3 (KeyDown) @@ -292,4 +292,14 @@ //----( Comments Context [top] (18) )------------ -//----( Unknown Context (19) )------------ +//----( Orderlist (19) )------------ +19:1794:0:37:5 //Previous Order: NACH-LINKS (KeyDown|KeyHold) +19:1794:0:38:5 //Previous Order: NACH-OBEN (KeyDown|KeyHold) +19:1795:0:39:5 //Next Order: NACH-RECHTS (KeyDown|KeyHold) +19:1795:0:40:5 //Next Order: NACH-UNTEN (KeyDown|KeyHold) +19:1796:0:36:5 //First Order: POS1 (KeyDown|KeyHold) +19:1797:0:35:5 //Last Order: ENDE (KeyDown|KeyHold) +19:1802:0:46:5 //Delete Order: ENTF (KeyDown|KeyHold) +19:1803:0:45:5 //Insert Order: EINFG (KeyDown|KeyHold) +19:1804:0:13:5 //Edit Pattern: EINGABE (KeyDown|KeyHold) +19:1805:0:9:5 //Switch to pattern editor: TABULATOR (KeyDown|KeyHold) Modified: trunk/OpenMPT/packageTemplate/extraKeymaps/FR_FT2Style_(goor00).mkb =================================================================== --- trunk/OpenMPT/packageTemplate/extraKeymaps/FR_FT2Style_(goor00).mkb 2009-11-27 18:52:15 UTC (rev 423) +++ trunk/OpenMPT/packageTemplate/extraKeymaps/FR_FT2Style_(goor00).mkb 2009-11-27 19:17:19 UTC (rev 424) @@ -264,12 +264,26 @@ //----( Unknown Context (12) )------------ -//----( General Context [top] (13) )------------ +//----( Plugin GUI Context (13) )------------ -//----( Pattern Context [top] (14) )------------ +//----( General Context [top] (14) )------------ -//----( Sample Context [top] (15) )------------ +//----( Pattern Context [top] (15) )------------ -//----( Instrument Context [top] (16) )------------ +//----( Sample Context [top] (16) )------------ -//----( Comments Context [top] (17) )------------ +//----( Instrument Context [top] (17) )------------ + +//----( Comments Context [top] (18) )------------ + +//----( Orderlist (19) )------------ +19:1794:0:37:5 //Previous Order: LEFT (KeyDown|KeyHold) +19:1794:0:38:5 //Previous Order: UP (KeyDown|KeyHold) +19:1795:0:39:5 //Next Order: RIGHT (KeyDown|KeyHold) +19:1795:0:40:5 //Next Order: DOWN (KeyDown|KeyHold) +19:1796:0:36:5 //First Order: HOME (KeyDown|KeyHold) +19:1797:0:35:5 //Last Order: END (KeyDown|KeyHold) +19:1802:0:46:5 //Delete Order: DELETE (KeyDown|KeyHold) +19:1803:0:45:5 //Insert Order: INSERT (KeyDown|KeyHold) +19:1804:0:13:5 //Edit Pattern: ENTER (KeyDown|KeyHold) +19:1805:0:9:5 //Switch to pattern editor: TAB (KeyDown|KeyHold) Modified: trunk/OpenMPT/packageTemplate/extraKeymaps/FR_mpt_classic_(vanisherIII).mkb =================================================================== --- trunk/OpenMPT/packageTemplate/extraKeymaps/FR_mpt_classic_(vanisherIII).mkb 2009-11-27 18:52:15 UTC (rev 423) +++ trunk/OpenMPT/packageTemplate/extraKeymaps/FR_mpt_classic_(vanisherIII).mkb 2009-11-27 19:17:19 UTC (rev 424) @@ -250,12 +250,26 @@ //----( Unknown Context (12) )------------ -//----( General Context [top] (13) )------------ +//----( Plugin GUI Context (13) )------------ -//----( Pattern Context [top] (14) )------------ +//----( General Context [top] (14) )------------ -//----( Sample Context [top] (15) )------------ +//----( Pattern Context [top] (15) )------------ -//----( Instrument Context [top] (16) )------------ +//----( Sample Context [top] (16) )------------ -//----( Comments Context [top] (17) )------------ +//----( Instrument Context [top] (17) )------------ + +//----( Comments Context [top] (18) )------------ + +//----( Orderlist (19) )------------ +19:1794:0:37:5 //Previous Order: LEFT (KeyDown|KeyHold) +19:1794:0:38:5 //Previous Order: UP (KeyDown|KeyHold) +19:1795:0:39:5 //Next Order: RIGHT (KeyDown|KeyHold) +19:1795:0:40:5 //Next Order: DOWN (KeyDown|KeyHold) +19:1796:0:36:5 //First Order: HOME (KeyDown|KeyHold) +19:1797:0:35:5 //Last Order: END (KeyDown|KeyHold) +19:1802:0:46:5 //Delete Order: DELETE (KeyDown|KeyHold) +19:1803:0:45:5 //Insert Order: INSERT (KeyDown|KeyHold) +19:1804:0:13:5 //Edit Pattern: ENTER (KeyDown|KeyHold) +19:1805:0:9:5 //Switch to pattern editor: TAB (KeyDown|KeyHold) Modified: trunk/OpenMPT/packageTemplate/extraKeymaps/SE_laptop_(ganja).mkb =================================================================== --- trunk/OpenMPT/packageTemplate/extraKeymaps/SE_laptop_(ganja).mkb 2009-11-27 18:52:15 UTC (rev 423) +++ trunk/OpenMPT/packageTemplate/extraKeymaps/SE_laptop_(ganja).mkb 2009-11-27 19:17:19 UTC (rev 424) @@ -174,12 +174,26 @@ //----( Unknown Context (12) )------------ -//----( General Context [top] (13) )------------ +//----( Plugin GUI Context (13) )------------ -//----( Pattern Context [top] (14) )------------ +//----( General Context [top] (14) )------------ -//----( Sample Context [top] (15) )------------ +//----( Pattern Context [top] (15) )------------ -//----( Instrument Context [top] (16) )------------ +//----( Sample Context [top] (16) )------------ -//----( Comments Context [top] (17) )------------ +//----( Instrument Context [top] (17) )------------ + +//----( Comments Context [top] (18) )------------ + +//----( Orderlist (19) )------------ +19:1794:0:37:5 //Previous Order: LEFT (KeyDown|KeyHold) +19:1794:0:38:5 //Previous Order: UP (KeyDown|KeyHold) +19:1795:0:39:5 //Next Order: RIGHT (KeyDown|KeyHold) +19:1795:0:40:5 //Next Order: DOWN (KeyDown|KeyHold) +19:1796:0:36:5 //First Order: HOME (KeyDown|KeyHold) +19:1797:0:35:5 //Last Order: END (KeyDown|KeyHold) +19:1802:0:46:5 //Delete Order: DELETE (KeyDown|KeyHold) +19:1803:0:45:5 //Insert Order: INSERT (KeyDown|KeyHold) +19:1804:0:13:5 //Edit Pattern: ENTER (KeyDown|KeyHold) +19:1805:0:9:5 //Switch to pattern editor: TAB (KeyDown|KeyHold) Modified: trunk/OpenMPT/packageTemplate/extraKeymaps/UK_mpt_it2_hybrid_(rewbs).mkb =================================================================== --- trunk/OpenMPT/packageTemplate/extraKeymaps/UK_mpt_it2_hybrid_(rewbs).mkb 2009-11-27 18:52:15 UTC (rev 423) +++ trunk/OpenMPT/packageTemplate/extraKeymaps/UK_mpt_it2_hybrid_(rewbs).mkb 2009-11-27 19:17:19 UTC (rev 424) @@ -281,4 +281,14 @@ //----( Comments Context [top] (18) )------------ -//----( Unknown Context (19) )------------ +//----( Orderlist (19) )------------ +19:1794:0:37:5 //Previous Order: LEFT (KeyDown|KeyHold) +19:1794:0:38:5 //Previous Order: UP (KeyDown|KeyHold) +19:1795:0:39:5 //Next Order: RIGHT (KeyDown|KeyHold) +19:1795:0:40:5 //Next Order: DOWN (KeyDown|KeyHold) +19:1796:0:36:5 //First Order: HOME (KeyDown|KeyHold) +19:1797:0:35:5 //Last Order: END (KeyDown|KeyHold) +19:1802:0:46:5 //Delete Order: DELETE (KeyDown|KeyHold) +19:1803:0:45:5 //Insert Order: INSERT (KeyDown|KeyHold) +19:1804:0:13:5 //Edit Pattern: ENTER (KeyDown|KeyHold) +19:1805:0:9:5 //Switch to pattern editor: TAB (KeyDown|KeyHold) Modified: trunk/OpenMPT/packageTemplate/extraKeymaps/US_it2_(lpchip).mkb =================================================================== --- trunk/OpenMPT/packageTemplate/extraKeymaps/US_it2_(lpchip).mkb 2009-11-27 18:52:15 UTC (rev 423) +++ trunk/OpenMPT/packageTemplate/extraKeymaps/US_it2_(lpchip).mkb 2009-11-27 19:17:19 UTC (rev 424) @@ -242,12 +242,26 @@ //----( Unknown Context (12) )------------ -//----( General Context [top] (13) )------------ +//----( Plugin GUI Context (13) )------------ -//----( Pattern Context [top] (14) )------------ +//----( General Context [top] (14) )------------ -//----( Sample Context [top] (15) )------------ +//----( Pattern Context [top] (15) )------------ -//----( Instrument Context [top] (16) )------------ +//----( Sample Context [top] (16) )------------ -//----( Comments Context [top] (17) )------------ +//----( Instrument Context [top] (17) )------------ + +//----( Comments Context [top] (18) )------------ + +//----( Orderlist (19) )------------ +19:1794:0:37:5 //Previous Order: LEFT (KeyDown|KeyHold) +19:1794:0:38:5 //Previous Order: UP (KeyDown|KeyHold) +19:1795:0:39:5 //Next Order: RIGHT (KeyDown|KeyHold) +19:1795:0:40:5 //Next Order: DOWN (KeyDown|KeyHold) +19:1796:0:36:5 //First Order: HOME (KeyDown|KeyHold) +19:1797:0:35:5 //Last Order: END (KeyDown|KeyHold) +19:1802:0:46:5 //Delete Order: DELETE (KeyDown|KeyHold) +19:1803:0:45:5 //Insert Order: INSERT (KeyDown|KeyHold) +19:1804:0:13:5 //Edit Pattern: ENTER (KeyDown|KeyHold) +19:1805:0:9:5 //Switch to pattern editor: TAB (KeyDown|KeyHold) Modified: trunk/OpenMPT/packageTemplate/extraKeymaps/US_mpt_classic_(diamond).mkb =================================================================== --- trunk/OpenMPT/packageTemplate/extraKeymaps/US_mpt_classic_(diamond).mkb 2009-11-27 18:52:15 UTC (rev 423) +++ trunk/OpenMPT/packageTemplate/extraKeymaps/US_mpt_classic_(diamond).mkb 2009-11-27 19:17:19 UTC (rev 424) @@ -257,13 +257,26 @@ //----( Unknown Context (12) )------------ -//----( General Context [top] (13) )------------ +//----( Plugin GUI Context (13) )------------ -//----( Pattern Context [top] (14) )------------ +//----( General Context [top] (14) )------------ -//----( Sample Context [top] (15) )------------ +//----( Pattern Context [top] (15) )------------ -//----( Instrument Context [top] (16) )------------ +//----( Sample Context [top] (16) )------------ -//----( Comments Context [top] (17) )------------ +//----( Instrument Context [top] (17) )------------ +//----( Comments Context [top] (18) )------------ + +//----( Orderlist (19) )------------ +19:1794:0:37:5 //Previous Order: LEFT (KeyDown|KeyHold) +19:1794:0:38:5 //Previous Order: UP (KeyDown|KeyHold) +19:1795:0:39:5 //Next Order: RIGHT (KeyDown|KeyHold) +19:1795:0:40:5 //Next Order: DOWN (KeyDown|KeyHold) +19:1796:0:36:5 //First Order: HOME (KeyDown|KeyHold) +19:1797:0:35:5 //Last Order: END (KeyDown|KeyHold) +19:1802:0:46:5 //Delete Order: DELETE (KeyDown|KeyHold) +19:1803:0:45:5 //Insert Order: INSERT (KeyDown|KeyHold) +19:1804:0:13:5 //Edit Pattern: ENTER (KeyDown|KeyHold) +19:1805:0:9:5 //Switch to pattern editor: TAB (KeyDown|KeyHold) Modified: trunk/OpenMPT/packageTemplate/extraKeymaps/dvorak_(snu).mkb =================================================================== --- trunk/OpenMPT/packageTemplate/extraKeymaps/dvorak_(snu).mkb 2009-11-27 18:52:15 UTC (rev 423) +++ trunk/OpenMPT/packageTemplate/extraKeymaps/dvorak_(snu).mkb 2009-11-27 19:17:19 UTC (rev 424) @@ -256,3 +256,15 @@ //----( Instrument Context [top] (17) )------------ //----( Comments Context [top] (18) )------------ + +//----( Orderlist (19) )------------ +19:1794:0:37:5 //Previous Order: LEFT (KeyDown|KeyHold) +19:1794:0:38:5 //Previous Order: UP (KeyDown|KeyHold) +19:1795:0:39:5 //Next Order: RIGHT (KeyDown|KeyHold) +19:1795:0:40:5 //Next Order: DOWN (KeyDown|KeyHold) +19:1796:0:36:5 //First Order: HOME (KeyDown|KeyHold) +19:1797:0:35:5 //Last Order: END (KeyDown|KeyHold) +19:1802:0:46:5 //Delete Order: DELETE (KeyDown|KeyHold) +19:1803:0:45:5 //Insert Order: INSERT (KeyDown|KeyHold) +19:1804:0:13:5 //Edit Pattern: ENTER (KeyDown|KeyHold) +19:1805:0:9:5 //Switch to pattern editor: TAB (KeyDown|KeyHold) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2009-11-28 14:44:55
|
Revision: 426 http://modplug.svn.sourceforge.net/modplug/?rev=426&view=rev Author: saga-games Date: 2009-11-28 14:44:48 +0000 (Sat, 28 Nov 2009) Log Message: ----------- [Fix] Keymap files have a version number now (currently version 1). If keymap file doesn't have a version number (that's version 0), the orderlist keys will be added automatically so that orderlist remains usable in new builds. [Fix] Orderlist: Show correct shortcuts in context menus [Imp] Orderlist: 0...9, + and - keys are now also configurable. [Imp] Orderlist: Duplicate / Create new pattern shortcuts do also work now here. [Imp] When loading a keymap file and unrecognized lines are found, only one messagebox is shown. [Mod] All keymaps have been updated to version 1. Modified Paths: -------------- trunk/OpenMPT/mptrack/CommandSet.cpp trunk/OpenMPT/mptrack/CommandSet.h trunk/OpenMPT/mptrack/Ctrl_pat.h trunk/OpenMPT/mptrack/Ctrl_seq.cpp trunk/OpenMPT/mptrack/KeyConfigDlg.cpp trunk/OpenMPT/mptrack/res/defaultKeybindings.mkb trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb trunk/OpenMPT/packageTemplate/extraKeymaps/FR_FT2Style_(goor00).mkb trunk/OpenMPT/packageTemplate/extraKeymaps/FR_mpt_classic_(vanisherIII).mkb trunk/OpenMPT/packageTemplate/extraKeymaps/SE_laptop_(ganja).mkb trunk/OpenMPT/packageTemplate/extraKeymaps/UK_mpt_it2_hybrid_(rewbs).mkb trunk/OpenMPT/packageTemplate/extraKeymaps/US_it2_(lpchip).mkb trunk/OpenMPT/packageTemplate/extraKeymaps/US_mpt_classic_(diamond).mkb trunk/OpenMPT/packageTemplate/extraKeymaps/dvorak_(snu).mkb Modified: trunk/OpenMPT/mptrack/CommandSet.cpp =================================================================== --- trunk/OpenMPT/mptrack/CommandSet.cpp 2009-11-27 21:17:33 UTC (rev 425) +++ trunk/OpenMPT/mptrack/CommandSet.cpp 2009-11-28 14:44:48 UTC (rev 426) @@ -2415,6 +2415,66 @@ commands[kcDuplicatePattern].isHidden = false; commands[kcDuplicatePattern].isDummy = false; + commands[kcOrderlistPat0].UID = 1807; + commands[kcOrderlistPat0].isHidden = false; + commands[kcOrderlistPat0].isDummy = false; + commands[kcOrderlistPat0].Message = "Pattern index digit 0"; + + commands[kcOrderlistPat1].UID = 1808; + commands[kcOrderlistPat1].isHidden = false; + commands[kcOrderlistPat1].isDummy = false; + commands[kcOrderlistPat1].Message = "Pattern index digit 1"; + + commands[kcOrderlistPat2].UID = 1809; + commands[kcOrderlistPat2].isHidden = false; + commands[kcOrderlistPat2].isDummy = false; + commands[kcOrderlistPat2].Message = "Pattern index digit 2"; + + commands[kcOrderlistPat3].UID = 1810; + commands[kcOrderlistPat3].isHidden = false; + commands[kcOrderlistPat3].isDummy = false; + commands[kcOrderlistPat3].Message = "Pattern index digit 3"; + + commands[kcOrderlistPat4].UID = 1811; + commands[kcOrderlistPat4].isHidden = false; + commands[kcOrderlistPat4].isDummy = false; + commands[kcOrderlistPat4].Message = "Pattern index digit 4"; + + commands[kcOrderlistPat5].UID = 1812; + commands[kcOrderlistPat5].isHidden = false; + commands[kcOrderlistPat5].isDummy = false; + commands[kcOrderlistPat5].Message = "Pattern index digit 5"; + + commands[kcOrderlistPat6].UID = 1813; + commands[kcOrderlistPat6].isHidden = false; + commands[kcOrderlistPat6].isDummy = false; + commands[kcOrderlistPat6].Message = "Pattern index digit 6"; + + commands[kcOrderlistPat7].UID = 1814; + commands[kcOrderlistPat7].isHidden = false; + commands[kcOrderlistPat7].isDummy = false; + commands[kcOrderlistPat7].Message = "Pattern index digit 7"; + + commands[kcOrderlistPat8].UID = 1815; + commands[kcOrderlistPat8].isHidden = false; + commands[kcOrderlistPat8].isDummy = false; + commands[kcOrderlistPat8].Message = "Pattern index digit 8"; + + commands[kcOrderlistPat9].UID = 1816; + commands[kcOrderlistPat9].isHidden = false; + commands[kcOrderlistPat9].isDummy = false; + commands[kcOrderlistPat9].Message = "Pattern index digit 9"; + + commands[kcOrderlistPatPlus].UID = 1817; + commands[kcOrderlistPatPlus].isHidden = false; + commands[kcOrderlistPatPlus].isDummy = false; + commands[kcOrderlistPatPlus].Message = "Increase pattern index "; + + commands[kcOrderlistPatMinus].UID = 1818; + commands[kcOrderlistPatMinus].isHidden = false; + commands[kcOrderlistPatMinus].isDummy = false; + commands[kcOrderlistPatMinus].Message = "Decrease pattern index"; + #ifdef _DEBUG for (int i=0; i<kcNumCommands; i++) { if (commands[i].UID != 0) { // ignore unset UIDs @@ -2574,7 +2634,7 @@ } } // Same applies for orderlist navigation - else if (inCmd>=kcStartOrderlistCommands&& inCmd<=kcEndOrderlistNavigationSelect) + else if (inCmd>=kcStartOrderlistNavigation && inCmd<=kcEndOrderlistNavigation) {//Check that it is a nav cmd CommandID cmdNavSelection = (CommandID)(kcStartOrderlistNavigationSelect+ (inCmd-kcStartOrderlistNavigation)); for (int kSel=0; kSel<commands[kcSelect].kcList.GetSize(); kSel++) @@ -3232,6 +3292,7 @@ fprintf(outStream, "//-Format is: -\n"); fprintf(outStream, "//- Context:Command ID:Modifiers:Key:KeypressEventType //Comments -\n"); fprintf(outStream, "//----------------------------------------------------------------------\n"); + fprintf(outStream, "version:%d\n", KEYMAP_VERSION); for (int ctx=0; ctx<kCtxMaxInputContexts; ctx++) { @@ -3272,9 +3333,13 @@ int commentStart; CCommandSet *pTempCS; int l=0; + int fileVersion = 0; pTempCS = new CCommandSet(); + int errorCount=0; + CString errText = ""; + while(iStrm.getline(s, sizeof(s))) { //::MessageBox(NULL, s, "", MB_ICONEXCLAMATION|MB_OK); @@ -3289,6 +3354,8 @@ if (!curLine.IsEmpty() && curLine.Compare("\n") !=0) { + bool ignoreLine = false; + //ctx:UID:Description:Modifier:Key:EventMask int spos = 0; @@ -3296,6 +3363,21 @@ token=curLine.Tokenize(":",spos); kc.ctx = (InputTargetContext) atoi(token); + // this line indicates the version of this keymap file instead. (e.g. "version:1") + if((token.Trim().CompareNoCase("version") == 0) && (spos != -1)) + { + fileVersion = atoi(curLine.Mid(spos)); + if(fileVersion > KEYMAP_VERSION) + { + CString err; + err.Format("Key binding file %s has version %d. Your version of OpenMPT only supports loading files up to version %d.", szFilename, fileVersion, KEYMAP_VERSION); + errText += err + "\n"; + Log(err); + } + spos = -1; + ignoreLine = true; + } + //UID if (spos != -1) { @@ -3324,31 +3406,37 @@ kc.event = (KeyEventType) atoi(token); } - //Error checking (TODO): - if (cmd<0 || cmd>=kcNumCommands || spos==-1) + if(!ignoreLine) { - errorCount++; - CString err; - if (errorCount<10) { - err.Format("Line %d in key binding file %s was not understood.", l, szFilename); - if(s_bShowErrorOnUnknownKeybinding) ::MessageBox(NULL, err, "", MB_ICONEXCLAMATION|MB_OK); - Log(err); - } else if (errorCount==10) { - err.Format("Too many errors detected, not reporting any more."); - if(s_bShowErrorOnUnknownKeybinding) ::MessageBox(NULL, err, "", MB_ICONEXCLAMATION|MB_OK); - Log(err); + //Error checking (TODO): + if (cmd<0 || cmd>=kcNumCommands || spos==-1) + { + errorCount++; + CString err; + if (errorCount<10) { + err.Format("Line %d in key binding file %s was not understood.", l, szFilename); + errText += err + "\n"; + Log(err); + } else if (errorCount==10) { + err = "Too many errors detected, not reporting any more."; + errText += err + "\n"; + Log(err); + } } + else + { + pTempCS->Add(kc, cmd, true); + } } - else - { - pTempCS->Add(kc, cmd, true); - } } l++; } + if(s_bShowErrorOnUnknownKeybinding && !errText.IsEmpty()) ::MessageBox(NULL, errText, "", MB_ICONEXCLAMATION|MB_OK); + if(fileVersion < KEYMAP_VERSION) UpgradeKeymap(pTempCS, fileVersion); + Copy(pTempCS); delete pTempCS; @@ -3370,6 +3458,111 @@ } +// Fix outdated keymap files +void CCommandSet::UpgradeKeymap(CCommandSet *pCommands, int oldVersion) +//--------------------------------------------------------------------- +{ + KeyCombination kc; + + // no orderlist context + if(oldVersion == 0) + { + kc.ctx = kCtxCtrlOrderlist; + kc.event = (KeyEventType) (kKeyEventDown | kKeyEventRepeat); + kc.mod = 0; + + kc.code = VK_DELETE; + pCommands->Add(kc, kcOrderlistEditDelete, false); + + kc.code = VK_INSERT; + pCommands->Add(kc, kcOrderlistEditInsert, false); + + kc.code = VK_RETURN; + pCommands->Add(kc, kcOrderlistEditPattern, false); + + kc.code = VK_TAB; + pCommands->Add(kc, kcOrderlistSwitchToPatternView, false); + + kc.code = VK_LEFT; + pCommands->Add(kc, kcOrderlistNavigateLeft, false); + kc.code = VK_UP; + pCommands->Add(kc, kcOrderlistNavigateLeft, false); + + kc.code = VK_RIGHT; + pCommands->Add(kc, kcOrderlistNavigateRight, false); + kc.code = VK_DOWN; + pCommands->Add(kc, kcOrderlistNavigateRight, false); + + kc.code = VK_HOME; + pCommands->Add(kc, kcOrderlistNavigateFirst, false); + + kc.code = VK_END; + pCommands->Add(kc, kcOrderlistNavigateLast, false); + + kc.code = VK_ADD; + pCommands->Add(kc, kcOrderlistPatPlus, false); + kc.code = VK_OEM_PLUS; + pCommands->Add(kc, kcOrderlistPatPlus, false); + + kc.code = VK_SUBTRACT; + pCommands->Add(kc, kcOrderlistPatMinus, false); + kc.code = VK_OEM_MINUS; + pCommands->Add(kc, kcOrderlistPatMinus, false); + + kc.code = '0'; + pCommands->Add(kc, kcOrderlistPat0, false); + kc.code = VK_NUMPAD0; + pCommands->Add(kc, kcOrderlistPat0, false); + + kc.code = '1'; + pCommands->Add(kc, kcOrderlistPat1, false); + kc.code = VK_NUMPAD1; + pCommands->Add(kc, kcOrderlistPat1, false); + + kc.code = '2'; + pCommands->Add(kc, kcOrderlistPat2, false); + kc.code = VK_NUMPAD2; + pCommands->Add(kc, kcOrderlistPat2, false); + + kc.code = '3'; + pCommands->Add(kc, kcOrderlistPat3, false); + kc.code = VK_NUMPAD3; + pCommands->Add(kc, kcOrderlistPat3, false); + + kc.code = '4'; + pCommands->Add(kc, kcOrderlistPat4, false); + kc.code = VK_NUMPAD4; + pCommands->Add(kc, kcOrderlistPat4, false); + + kc.code = '5'; + pCommands->Add(kc, kcOrderlistPat5, false); + kc.code = VK_NUMPAD5; + pCommands->Add(kc, kcOrderlistPat5, false); + + kc.code = '6'; + pCommands->Add(kc, kcOrderlistPat6, false); + kc.code = VK_NUMPAD6; + pCommands->Add(kc, kcOrderlistPat6, false); + + kc.code = '7'; + pCommands->Add(kc, kcOrderlistPat7, false); + kc.code = VK_NUMPAD7; + pCommands->Add(kc, kcOrderlistPat7, false); + + kc.code = '8'; + pCommands->Add(kc, kcOrderlistPat8, false); + kc.code = VK_NUMPAD8; + pCommands->Add(kc, kcOrderlistPat8, false); + + kc.code = '9'; + pCommands->Add(kc, kcOrderlistPat9, false); + kc.code = VK_NUMPAD9; + pCommands->Add(kc, kcOrderlistPat9, false); + + } +} + + //Could do better search algo but this is not perf critical. int CCommandSet::FindCmd(int uid) { Modified: trunk/OpenMPT/mptrack/CommandSet.h =================================================================== --- trunk/OpenMPT/mptrack/CommandSet.h 2009-11-27 21:17:33 UTC (rev 425) +++ trunk/OpenMPT/mptrack/CommandSet.h 2009-11-28 14:44:48 UTC (rev 426) @@ -6,6 +6,8 @@ //#define VK_ALT 0x12 +#define KEYMAP_VERSION 1 // Version of the .mkb format + enum InputTargetContext { kCtxUnknownContext = -1, @@ -964,7 +966,15 @@ kcEndVSTGUICommands=kcVSTGUIRandParams, kcStartOrderlistCommands, - kcStartOrderlistNavigation=kcStartOrderlistCommands, + // Orderlist edit + kcStartOrderlistEdit=kcStartOrderlistCommands, + kcOrderlistEditDelete=kcStartOrderlistEdit, + kcOrderlistEditInsert, + kcOrderlistEditPattern, + kcOrderlistSwitchToPatternView, + kcEndOrderlistEdit=kcOrderlistSwitchToPatternView, + // Orderlist navigation + kcStartOrderlistNavigation, kcOrderlistNavigateLeft=kcStartOrderlistNavigation, kcOrderlistNavigateRight, kcOrderlistNavigateFirst, @@ -977,13 +987,23 @@ kcOrderlistNavigateFirstSelect, kcOrderlistNavigateLastSelect, kcEndOrderlistNavigationSelect = kcOrderlistNavigateLastSelect, + // Orderlist pattern list edit + kcStartOrderlistNum, + kcOrderlistPat0=kcStartOrderlistNum, + kcOrderlistPat1, + kcOrderlistPat2, + kcOrderlistPat3, + kcOrderlistPat4, + kcOrderlistPat5, + kcOrderlistPat6, + kcOrderlistPat7, + kcOrderlistPat8, + kcOrderlistPat9, + kcOrderlistPatPlus, + kcOrderlistPatMinus, + kcEndOrderlistNum=kcOrderlistPatMinus, + kcEndOrderlistCommands=kcEndOrderlistNum, - kcOrderlistEditDelete, - kcOrderlistEditInsert, - kcOrderlistEditPattern, - kcOrderlistSwitchToPatternView, - kcEndOrderlistCommands=kcOrderlistSwitchToPatternView, - kcNumCommands, }; @@ -1125,6 +1145,7 @@ bool SaveFile(CString FileName, bool debug); bool LoadFile(CString FileName); bool LoadFile(std::istream& iStrm, LPCTSTR szFilename); + void UpgradeKeymap(CCommandSet *pCommands, int oldVersion); static DWORD GetKeymapLabel(InputTargetContext ctx, UINT mod, UINT code, KeyEventType ke); Modified: trunk/OpenMPT/mptrack/Ctrl_pat.h =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_pat.h 2009-11-27 21:17:33 UTC (rev 425) +++ trunk/OpenMPT/mptrack/Ctrl_pat.h 2009-11-28 14:44:48 UTC (rev 426) @@ -51,7 +51,6 @@ else if(!isSelectionKeyPressed && m_nScrollPos2nd != ORDERINDEX_INVALID) m_nScrollPos2nd = ORDERINDEX_INVALID; }; bool SetCurSel(ORDERINDEX sel, bool bEdit = true, bool bShiftClick = false, bool bIgnoreCurSel = false); - BOOL ProcessChar(UINT nChar); BOOL UpdateScrollInfo(); void UpdateInfoText(); int GetFontWidth(); @@ -95,6 +94,9 @@ void OnEditCut(); void OnEditPaste(); + // Helper function for entering pattern number + void EnterPatternNum(int enterNum); + //{{AFX_VIRTUAL(COrderList) virtual BOOL PreTranslateMessage(MSG *pMsg); virtual void UpdateView(DWORD dwHintMask=0, CObject *pObj=NULL); Modified: trunk/OpenMPT/mptrack/Ctrl_seq.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_seq.cpp 2009-11-27 21:17:33 UTC (rev 425) +++ trunk/OpenMPT/mptrack/Ctrl_seq.cpp 2009-11-28 14:44:48 UTC (rev 426) @@ -318,55 +318,6 @@ } -BOOL COrderList::ProcessChar(UINT nChar) -//-------------------------------------- -{ - if (m_pModDoc) - { - CSoundFile *pSndFile = m_pModDoc->GetSoundFile(); - int ord = pSndFile->Order[m_nScrollPos]; - int maxpat = 0; - for (int i=0; i<pSndFile->Patterns.Size(); i++) if (pSndFile->Patterns[i]) maxpat = i; - if ((nChar >= '0') && (nChar <= '9')) - { - if (ord >= pSndFile->Patterns.Size()) ord = 0; - - ord = ord * 10 + (nChar - '0'); - if ((ord >= 100) && (ord > maxpat)) ord %= 100; - if ((ord >= 10) && (ord > maxpat)) ord %= 10; - } else - if (nChar == '+') - { - ord++; - if(ord > pSndFile->Order.GetInvalidPatIndex()) - ord = 0; - else - { - const PATTERNINDEX nFirstInvalid = pSndFile->GetModSpecifications().hasIgnoreIndex ? pSndFile->Order.GetIgnoreIndex() : pSndFile->Order.GetInvalidPatIndex(); - if(ord > maxpat && ord < nFirstInvalid) - ord = nFirstInvalid; - } - } else - if (nChar == '-') - { - const PATTERNINDEX nFirstInvalid = pSndFile->GetModSpecifications().hasIgnoreIndex ? pSndFile->Order.GetIgnoreIndex() : pSndFile->Order.GetInvalidPatIndex(); - ord--; - if (ord < 0) ord = pSndFile->Order.GetInvalidPatIndex(); else - if ((ord > maxpat) && (ord < nFirstInvalid)) ord = maxpat; - } - if (ord != pSndFile->Order[m_nScrollPos]) - { - pSndFile->Order[m_nScrollPos] = static_cast<PATTERNINDEX>(ord); - m_pModDoc->SetModified(); - m_pModDoc->UpdateAllViews(NULL, HINT_MODSEQUENCE, this); - InvalidateSelection(); - return TRUE; - } - } - return FALSE; -} - - BOOL COrderList::PreTranslateMessage(MSG *pMsg) //--------------------------------------------- { @@ -397,13 +348,6 @@ } //end rewbs.customKeys - - switch(pMsg->message) - { - case WM_CHAR: - if (ProcessChar(pMsg->wParam)) return true; - break; - } return CWnd::PreTranslateMessage(pMsg); } @@ -423,6 +367,7 @@ case kcEditPaste: OnEditPaste(); return wParam; + // Orderlist navigation case kcOrderlistNavigateLeftSelect: case kcOrderlistNavigateLeft: SetCurSelTo2ndSel(wParam == kcOrderlistNavigateLeftSelect); SetCurSel(m_nScrollPos - 1); return wParam; @@ -442,6 +387,8 @@ SetCurSel(nLast); } return wParam; + + // Orderlist edit case kcOrderlistEditDelete: OnDeleteOrder(); return wParam; case kcOrderlistEditInsert: @@ -451,6 +398,23 @@ case kcOrderlistEditPattern: OnLButtonDblClk(0, CPoint(0,0)); OnSwitchToView(); return wParam; + // Enter pattern number + case kcOrderlistPat0: + case kcOrderlistPat1: + case kcOrderlistPat2: + case kcOrderlistPat3: + case kcOrderlistPat4: + case kcOrderlistPat5: + case kcOrderlistPat6: + case kcOrderlistPat7: + case kcOrderlistPat8: + case kcOrderlistPat9: + EnterPatternNum(wParam - kcOrderlistPat0); return wParam; + case kcOrderlistPatMinus: + EnterPatternNum(10); return wParam; + case kcOrderlistPatPlus: + EnterPatternNum(11); return wParam; + // kCtxViewPatternsNote messages case kcSwitchToOrderList: OnSwitchToView(); @@ -462,12 +426,74 @@ case kcChannelUnmuteAll: case kcUnmuteAllChnOnPatTransition: ::PostMessage(m_pParent->GetViewWnd(), WM_MOD_KEYCOMMAND, wParam, 0); return wParam; + + case kcDuplicatePattern: + OnDuplicatePattern(); return wParam; + case kcNewPattern: + OnCreateNewPattern(); return wParam; } return 0; } +// Helper function to enter pattern index into the orderlist. +// Call with param 0...9 (enter digit), 10 (decrease) or 11 (increase). +void COrderList::EnterPatternNum(int enterNum) +//-------------------------------------------- +{ + if (m_pModDoc == nullptr) return; + CSoundFile *pSndFile = m_pModDoc->GetSoundFile(); + if(pSndFile == nullptr) return; + + PATTERNINDEX nCurNdx = (m_nScrollPos < pSndFile->Order.GetLength()) ? pSndFile->Order[m_nScrollPos] : pSndFile->Order.GetInvalidPatIndex(); + PATTERNINDEX nMaxNdx = 0; + for(PATTERNINDEX nPat = 0; nPat < pSndFile->Patterns.Size(); nPat++) + if (pSndFile->Patterns.IsValidPat(nPat)) nMaxNdx = nPat; + + if (enterNum >= 0 && enterNum <= 9) // enter 0...9 + { + if (nCurNdx >= pSndFile->Patterns.Size()) nCurNdx = 0; + + nCurNdx = nCurNdx * 10 + static_cast<PATTERNINDEX>(enterNum); + if ((nCurNdx >= 1000) && (nCurNdx > nMaxNdx)) nCurNdx %= 1000; + if ((nCurNdx >= 100) && (nCurNdx > nMaxNdx)) nCurNdx %= 100; + if ((nCurNdx >= 10) && (nCurNdx > nMaxNdx)) nCurNdx %= 10; + } else if (enterNum == 11) // increase pattern index + { + if(nCurNdx >= pSndFile->Order.GetInvalidPatIndex()) + { + nCurNdx = 0; + } + else + { + nCurNdx++; + const PATTERNINDEX nFirstInvalid = pSndFile->GetModSpecifications().hasIgnoreIndex ? pSndFile->Order.GetIgnoreIndex() : pSndFile->Order.GetInvalidPatIndex(); + if(nCurNdx > nMaxNdx && nCurNdx < nFirstInvalid) + nCurNdx = nFirstInvalid; + } + } else if (enterNum == 10) // decrease pattern index + { + const PATTERNINDEX nFirstInvalid = pSndFile->GetModSpecifications().hasIgnoreIndex ? pSndFile->Order.GetIgnoreIndex() : pSndFile->Order.GetInvalidPatIndex(); + if (nCurNdx == 0) + nCurNdx = pSndFile->Order.GetInvalidPatIndex(); + else + { + nCurNdx--; + if ((nCurNdx > nMaxNdx) && (nCurNdx < nFirstInvalid)) nCurNdx = nMaxNdx; + } + } + // apply + if (nCurNdx != pSndFile->Order[m_nScrollPos]) + { + pSndFile->Order[m_nScrollPos] = nCurNdx; + m_pModDoc->SetModified(); + m_pModDoc->UpdateAllViews(NULL, HINT_MODSEQUENCE, this); + InvalidateSelection(); + } +} + + static const char szClipboardOrdersHdr[] = "OpenMPT %3s\x0D\x0A"; static const char szClipboardOrdCountFieldHdr[] = "OrdNum: %u\x0D\x0A"; static const char szClipboardOrdersFieldHdr[] = "OrdLst: "; @@ -977,23 +1003,23 @@ if(bMultiSelection) { // several patterns are selected. - AppendMenu(hMenu, MF_STRING, ID_ORDERLIST_INSERT, "&Insert Patterns\tIns"); - AppendMenu(hMenu, MF_STRING, ID_ORDERLIST_DELETE, "&Remove Patterns\tDel"); + AppendMenu(hMenu, MF_STRING, ID_ORDERLIST_INSERT, "&Insert Patterns\t" + ih->GetKeyTextFromCommand(kcOrderlistEditInsert)); + AppendMenu(hMenu, MF_STRING, ID_ORDERLIST_DELETE, "&Remove Patterns\t" + ih->GetKeyTextFromCommand(kcOrderlistEditDelete)); AppendMenu(hMenu, MF_SEPARATOR, NULL, ""); AppendMenu(hMenu, MF_STRING, ID_ORDERLIST_EDIT_COPY, "&Copy Orders\t" + ih->GetKeyTextFromCommand(kcEditCopy)); AppendMenu(hMenu, MF_STRING, ID_ORDERLIST_EDIT_CUT, "&C&ut Orders\t" + ih->GetKeyTextFromCommand(kcEditCut)); AppendMenu(hMenu, MF_STRING, ID_ORDERLIST_EDIT_PASTE, "&Paste Orders\t" + ih->GetKeyTextFromCommand(kcEditPaste)); AppendMenu(hMenu, MF_SEPARATOR, NULL, ""); - AppendMenu(hMenu, MF_STRING | greyed, ID_ORDERLIST_COPY, "&Duplicate Patterns"); + AppendMenu(hMenu, MF_STRING | greyed, ID_ORDERLIST_COPY, "&Duplicate Patterns\t" + ih->GetKeyTextFromCommand(kcDuplicatePattern)); } else { // only one pattern is selected - AppendMenu(hMenu, MF_STRING, ID_ORDERLIST_INSERT, "&Insert Pattern\tIns"); - AppendMenu(hMenu, MF_STRING, ID_ORDERLIST_DELETE, "&Remove Pattern\tDel"); + AppendMenu(hMenu, MF_STRING, ID_ORDERLIST_INSERT, "&Insert Pattern\t" + ih->GetKeyTextFromCommand(kcOrderlistEditInsert)); + AppendMenu(hMenu, MF_STRING, ID_ORDERLIST_DELETE, "&Remove Pattern\t" + ih->GetKeyTextFromCommand(kcOrderlistEditDelete)); AppendMenu(hMenu, MF_SEPARATOR, NULL, ""); - AppendMenu(hMenu, MF_STRING, ID_ORDERLIST_NEW, "Create &New Pattern"); - AppendMenu(hMenu, MF_STRING | greyed, ID_ORDERLIST_COPY, "&Duplicate Pattern"); + AppendMenu(hMenu, MF_STRING, ID_ORDERLIST_NEW, "Create &New Pattern\t" + ih->GetKeyTextFromCommand(kcNewPattern)); + AppendMenu(hMenu, MF_STRING | greyed, ID_ORDERLIST_COPY, "&Duplicate Pattern\t" + ih->GetKeyTextFromCommand(kcDuplicatePattern)); AppendMenu(hMenu, MF_STRING | greyed, ID_PATTERNCOPY, "&Copy Pattern"); AppendMenu(hMenu, MF_STRING | greyed, ID_PATTERNPASTE, "P&aste Pattern"); AppendMenu(hMenu, MF_STRING, ID_ORDERLIST_EDIT_PASTE, "&Paste Orders\t" + ih->GetKeyTextFromCommand(kcEditPaste)); Modified: trunk/OpenMPT/mptrack/KeyConfigDlg.cpp =================================================================== --- trunk/OpenMPT/mptrack/KeyConfigDlg.cpp 2009-11-27 21:17:33 UTC (rev 425) +++ trunk/OpenMPT/mptrack/KeyConfigDlg.cpp 2009-11-28 14:44:48 UTC (rev 426) @@ -212,6 +212,8 @@ for (int c=kcStartOrderlistCommands; c<=kcEndOrderlistCommands; c++) newCat->commands.Add(c); + newCat->separators.Add(kcEndOrderlistNavigation); //-------------------------------------- + newCat->separators.Add(kcEndOrderlistEdit); //-------------------------------------- commandCategories.Add(*newCat); delete newCat; Modified: trunk/OpenMPT/mptrack/res/defaultKeybindings.mkb =================================================================== --- trunk/OpenMPT/mptrack/res/defaultKeybindings.mkb 2009-11-27 21:17:33 UTC (rev 425) +++ trunk/OpenMPT/mptrack/res/defaultKeybindings.mkb 2009-11-28 14:44:48 UTC (rev 426) @@ -2,6 +2,7 @@ //-Format is: - //- Context:Command ID:Modifiers:Key:KeypressEventType //Comments - //---------------------------------------------------------------------- +version:1 //----( Global Context (0) )------------ 0:1347:2:78:1 //File/New: Ctrl+N (KeyDown) @@ -278,13 +279,37 @@ //----( Comments Context [top] (18) )------------ //----( Orderlist (19) )------------ +19:1802:0:46:5 //Delete Order: DELETE (KeyDown|KeyHold) +19:1803:0:45:5 //Insert Order: INSERT (KeyDown|KeyHold) +19:1804:0:13:5 //Edit Pattern: ENTER (KeyDown|KeyHold) +19:1805:0:9:5 //Switch to pattern editor: TAB (KeyDown|KeyHold) 19:1794:0:37:5 //Previous Order: LEFT (KeyDown|KeyHold) 19:1794:0:38:5 //Previous Order: UP (KeyDown|KeyHold) 19:1795:0:39:5 //Next Order: RIGHT (KeyDown|KeyHold) 19:1795:0:40:5 //Next Order: DOWN (KeyDown|KeyHold) 19:1796:0:36:5 //First Order: HOME (KeyDown|KeyHold) 19:1797:0:35:5 //Last Order: END (KeyDown|KeyHold) -19:1802:0:46:5 //Delete Order: DELETE (KeyDown|KeyHold) -19:1803:0:45:5 //Insert Order: INSERT (KeyDown|KeyHold) -19:1804:0:13:5 //Edit Pattern: ENTER (KeyDown|KeyHold) -19:1805:0:9:5 //Switch to pattern editor: TAB (KeyDown|KeyHold) +19:1807:0:48:5 //Pattern index digit 0: 0 (KeyDown|KeyHold) +19:1807:0:96:5 //Pattern index digit 0: NUM 0 (KeyDown|KeyHold) +19:1808:0:49:5 //Pattern index digit 1: 1 (KeyDown|KeyHold) +19:1808:0:97:5 //Pattern index digit 1: NUM 1 (KeyDown|KeyHold) +19:1809:0:50:5 //Pattern index digit 2: 2 (KeyDown|KeyHold) +19:1809:0:98:5 //Pattern index digit 2: NUM 2 (KeyDown|KeyHold) +19:1810:0:51:5 //Pattern index digit 3: 3 (KeyDown|KeyHold) +19:1810:0:99:5 //Pattern index digit 3: NUM 3 (KeyDown|KeyHold) +19:1811:0:52:5 //Pattern index digit 4: 4 (KeyDown|KeyHold) +19:1811:0:100:5 //Pattern index digit 4: NUM 4 (KeyDown|KeyHold) +19:1812:0:53:5 //Pattern index digit 5: 5 (KeyDown|KeyHold) +19:1812:0:101:5 //Pattern index digit 5: NUM 5 (KeyDown|KeyHold) +19:1813:0:54:5 //Pattern index digit 6: 6 (KeyDown|KeyHold) +19:1813:0:102:5 //Pattern index digit 6: NUM 6 (KeyDown|KeyHold) +19:1814:0:55:5 //Pattern index digit 7: 7 (KeyDown|KeyHold) +19:1814:0:103:5 //Pattern index digit 7: NUM 7 (KeyDown|KeyHold) +19:1815:0:56:5 //Pattern index digit 8: 8 (KeyDown|KeyHold) +19:1815:0:104:5 //Pattern index digit 8: NUM 8 (KeyDown|KeyHold) +19:1816:0:57:5 //Pattern index digit 9: 9 (KeyDown|KeyHold) +19:1816:0:105:5 //Pattern index digit 9: NUM 9 (KeyDown|KeyHold) +19:1817:0:107:5 //Increase pattern index : NUM PLUS (KeyDown|KeyHold) +19:1817:0:187:5 //Increase pattern index : + (KeyDown|KeyHold) +19:1818:0:109:1 //Decrease pattern index: NUM SUB (KeyDown) +19:1818:0:189:1 //Decrease pattern index: - (KeyDown) Modified: trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb =================================================================== --- trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb 2009-11-27 21:17:33 UTC (rev 425) +++ trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb 2009-11-28 14:44:48 UTC (rev 426) @@ -2,6 +2,7 @@ //-Format is: - //- Context:Command ID:Modifiers:Key:KeypressEventType //Comments - //---------------------------------------------------------------------- +version:1 //----( Global Context (0) )------------ 0:1347:2:78:1 //File/New: Ctrl+N (KeyDown) @@ -179,6 +180,7 @@ 4:1208:0:54:1 //Set instrument digit 6: 6 (KeyDown) 4:1209:0:103:1 //Set instrument digit 7: 7 (ZEHNERTASTATUR) (KeyDown) 4:1209:0:55:1 //Set instrument digit 7: 7 (KeyDown) +4:1210:0:104:1 //Set instrument digit 8: 8 (ZEHNERTASTATUR) (KeyDown) 4:1210:0:56:1 //Set instrument digit 8: 8 (KeyDown) 4:1211:0:105:1 //Set instrument digit 9: 9 (ZEHNERTASTATUR) (KeyDown) 4:1211:0:57:1 //Set instrument digit 9: 9 (KeyDown) @@ -293,13 +295,37 @@ //----( Comments Context [top] (18) )------------ //----( Orderlist (19) )------------ +19:1802:0:46:5 //Delete Order: ENTF (KeyDown|KeyHold) +19:1803:0:45:5 //Insert Order: EINFG (KeyDown|KeyHold) +19:1804:0:13:5 //Edit Pattern: EINGABE (KeyDown|KeyHold) +19:1805:0:9:5 //Switch to pattern editor: TABULATOR (KeyDown|KeyHold) 19:1794:0:37:5 //Previous Order: NACH-LINKS (KeyDown|KeyHold) 19:1794:0:38:5 //Previous Order: NACH-OBEN (KeyDown|KeyHold) 19:1795:0:39:5 //Next Order: NACH-RECHTS (KeyDown|KeyHold) 19:1795:0:40:5 //Next Order: NACH-UNTEN (KeyDown|KeyHold) 19:1796:0:36:5 //First Order: POS1 (KeyDown|KeyHold) 19:1797:0:35:5 //Last Order: ENDE (KeyDown|KeyHold) -19:1802:0:46:5 //Delete Order: ENTF (KeyDown|KeyHold) -19:1803:0:45:5 //Insert Order: EINFG (KeyDown|KeyHold) -19:1804:0:13:5 //Edit Pattern: EINGABE (KeyDown|KeyHold) -19:1805:0:9:5 //Switch to pattern editor: TABULATOR (KeyDown|KeyHold) +19:1807:0:48:5 //Pattern index digit 0: 0 (KeyDown|KeyHold) +19:1807:0:96:5 //Pattern index digit 0: 0 (ZEHNERTASTATUR) (KeyDown|KeyHold) +19:1808:0:49:5 //Pattern index digit 1: 1 (KeyDown|KeyHold) +19:1808:0:97:5 //Pattern index digit 1: 1 (ZEHNERTASTATUR) (KeyDown|KeyHold) +19:1809:0:50:5 //Pattern index digit 2: 2 (KeyDown|KeyHold) +19:1809:0:98:5 //Pattern index digit 2: 2 (ZEHNERTASTATUR) (KeyDown|KeyHold) +19:1810:0:51:5 //Pattern index digit 3: 3 (KeyDown|KeyHold) +19:1810:0:99:5 //Pattern index digit 3: 3 (ZEHNERTASTATUR) (KeyDown|KeyHold) +19:1811:0:52:5 //Pattern index digit 4: 4 (KeyDown|KeyHold) +19:1811:0:100:5 //Pattern index digit 4: 4 (ZEHNERTASTATUR) (KeyDown|KeyHold) +19:1812:0:53:5 //Pattern index digit 5: 5 (KeyDown|KeyHold) +19:1812:0:101:5 //Pattern index digit 5: 5 (ZEHNERTASTATUR) (KeyDown|KeyHold) +19:1813:0:54:5 //Pattern index digit 6: 6 (KeyDown|KeyHold) +19:1813:0:102:5 //Pattern index digit 6: 6 (ZEHNERTASTATUR) (KeyDown|KeyHold) +19:1814:0:55:5 //Pattern index digit 7: 7 (KeyDown|KeyHold) +19:1814:0:103:5 //Pattern index digit 7: 7 (ZEHNERTASTATUR) (KeyDown|KeyHold) +19:1815:0:56:5 //Pattern index digit 8: 8 (KeyDown|KeyHold) +19:1815:0:104:5 //Pattern index digit 8: 8 (ZEHNERTASTATUR) (KeyDown|KeyHold) +19:1816:0:57:5 //Pattern index digit 9: 9 (KeyDown|KeyHold) +19:1816:0:105:5 //Pattern index digit 9: 9 (ZEHNERTASTATUR) (KeyDown|KeyHold) +19:1817:0:107:5 //Increase pattern index : + (ZEHNERTASTATUR) (KeyDown|KeyHold) +19:1817:0:187:5 //Increase pattern index : + (KeyDown|KeyHold) +19:1818:0:109:1 //Decrease pattern index: - (ZEHNERTASTATUR) (KeyDown) +19:1818:0:189:1 //Decrease pattern index: - (KeyDown) Modified: trunk/OpenMPT/packageTemplate/extraKeymaps/FR_FT2Style_(goor00).mkb =================================================================== --- trunk/OpenMPT/packageTemplate/extraKeymaps/FR_FT2Style_(goor00).mkb 2009-11-27 21:17:33 UTC (rev 425) +++ trunk/OpenMPT/packageTemplate/extraKeymaps/FR_FT2Style_(goor00).mkb 2009-11-28 14:44:48 UTC (rev 426) @@ -2,6 +2,7 @@ //-Format is: - //- Context:Command ID:Modifiers:Key:KeypressEventType //Comments - //---------------------------------------------------------------------- +version:1 //----( Global Context (0) )------------ 0:1347:2:78:1 //File/New: Ctrl+N (KeyDown) @@ -277,13 +278,37 @@ //----( Comments Context [top] (18) )------------ //----( Orderlist (19) )------------ +19:1802:0:46:5 //Delete Order: DELETE (KeyDown|KeyHold) +19:1803:0:45:5 //Insert Order: INSERT (KeyDown|KeyHold) +19:1804:0:13:5 //Edit Pattern: ENTER (KeyDown|KeyHold) +19:1805:0:9:5 //Switch to pattern editor: TAB (KeyDown|KeyHold) 19:1794:0:37:5 //Previous Order: LEFT (KeyDown|KeyHold) 19:1794:0:38:5 //Previous Order: UP (KeyDown|KeyHold) 19:1795:0:39:5 //Next Order: RIGHT (KeyDown|KeyHold) 19:1795:0:40:5 //Next Order: DOWN (KeyDown|KeyHold) 19:1796:0:36:5 //First Order: HOME (KeyDown|KeyHold) 19:1797:0:35:5 //Last Order: END (KeyDown|KeyHold) -19:1802:0:46:5 //Delete Order: DELETE (KeyDown|KeyHold) -19:1803:0:45:5 //Insert Order: INSERT (KeyDown|KeyHold) -19:1804:0:13:5 //Edit Pattern: ENTER (KeyDown|KeyHold) -19:1805:0:9:5 //Switch to pattern editor: TAB (KeyDown|KeyHold) +19:1807:0:48:5 //Pattern index digit 0: 0 (KeyDown|KeyHold) +19:1807:0:96:5 //Pattern index digit 0: NUM 0 (KeyDown|KeyHold) +19:1808:0:49:5 //Pattern index digit 1: 1 (KeyDown|KeyHold) +19:1808:0:97:5 //Pattern index digit 1: NUM 1 (KeyDown|KeyHold) +19:1809:0:50:5 //Pattern index digit 2: 2 (KeyDown|KeyHold) +19:1809:0:98:5 //Pattern index digit 2: NUM 2 (KeyDown|KeyHold) +19:1810:0:51:5 //Pattern index digit 3: 3 (KeyDown|KeyHold) +19:1810:0:99:5 //Pattern index digit 3: NUM 3 (KeyDown|KeyHold) +19:1811:0:52:5 //Pattern index digit 4: 4 (KeyDown|KeyHold) +19:1811:0:100:5 //Pattern index digit 4: NUM 4 (KeyDown|KeyHold) +19:1812:0:53:5 //Pattern index digit 5: 5 (KeyDown|KeyHold) +19:1812:0:101:5 //Pattern index digit 5: NUM 5 (KeyDown|KeyHold) +19:1813:0:54:5 //Pattern index digit 6: 6 (KeyDown|KeyHold) +19:1813:0:102:5 //Pattern index digit 6: NUM 6 (KeyDown|KeyHold) +19:1814:0:55:5 //Pattern index digit 7: 7 (KeyDown|KeyHold) +19:1814:0:103:5 //Pattern index digit 7: NUM 7 (KeyDown|KeyHold) +19:1815:0:56:5 //Pattern index digit 8: 8 (KeyDown|KeyHold) +19:1815:0:104:5 //Pattern index digit 8: NUM 8 (KeyDown|KeyHold) +19:1816:0:57:5 //Pattern index digit 9: 9 (KeyDown|KeyHold) +19:1816:0:105:5 //Pattern index digit 9: NUM 9 (KeyDown|KeyHold) +19:1817:0:107:5 //Increase pattern index : NUM PLUS (KeyDown|KeyHold) +19:1817:0:187:5 //Increase pattern index : + (KeyDown|KeyHold) +19:1818:0:109:1 //Decrease pattern index: NUM SUB (KeyDown) +19:1818:0:189:1 //Decrease pattern index: - (KeyDown) Modified: trunk/OpenMPT/packageTemplate/extraKeymaps/FR_mpt_classic_(vanisherIII).mkb =================================================================== --- trunk/OpenMPT/packageTemplate/extraKeymaps/FR_mpt_classic_(vanisherIII).mkb 2009-11-27 21:17:33 UTC (rev 425) +++ trunk/OpenMPT/packageTemplate/extraKeymaps/FR_mpt_classic_(vanisherIII).mkb 2009-11-28 14:44:48 UTC (rev 426) @@ -2,6 +2,7 @@ //-Format is: - //- Context:Command ID:Modifiers:Key:KeypressEventType //Comments - //---------------------------------------------------------------------- +version:1 //----( Global Context (0) )------------ 0:1347:2:78:1 //File/New: Ctrl+N (KeyDown) @@ -263,13 +264,37 @@ //----( Comments Context [top] (18) )------------ //----( Orderlist (19) )------------ +19:1802:0:46:5 //Delete Order: DELETE (KeyDown|KeyHold) +19:1803:0:45:5 //Insert Order: INSERT (KeyDown|KeyHold) +19:1804:0:13:5 //Edit Pattern: ENTER (KeyDown|KeyHold) +19:1805:0:9:5 //Switch to pattern editor: TAB (KeyDown|KeyHold) 19:1794:0:37:5 //Previous Order: LEFT (KeyDown|KeyHold) 19:1794:0:38:5 //Previous Order: UP (KeyDown|KeyHold) 19:1795:0:39:5 //Next Order: RIGHT (KeyDown|KeyHold) 19:1795:0:40:5 //Next Order: DOWN (KeyDown|KeyHold) 19:1796:0:36:5 //First Order: HOME (KeyDown|KeyHold) 19:1797:0:35:5 //Last Order: END (KeyDown|KeyHold) -19:1802:0:46:5 //Delete Order: DELETE (KeyDown|KeyHold) -19:1803:0:45:5 //Insert Order: INSERT (KeyDown|KeyHold) -19:1804:0:13:5 //Edit Pattern: ENTER (KeyDown|KeyHold) -19:1805:0:9:5 //Switch to pattern editor: TAB (KeyDown|KeyHold) +19:1807:0:48:5 //Pattern index digit 0: 0 (KeyDown|KeyHold) +19:1807:0:96:5 //Pattern index digit 0: NUM 0 (KeyDown|KeyHold) +19:1808:0:49:5 //Pattern index digit 1: 1 (KeyDown|KeyHold) +19:1808:0:97:5 //Pattern index digit 1: NUM 1 (KeyDown|KeyHold) +19:1809:0:50:5 //Pattern index digit 2: 2 (KeyDown|KeyHold) +19:1809:0:98:5 //Pattern index digit 2: NUM 2 (KeyDown|KeyHold) +19:1810:0:51:5 //Pattern index digit 3: 3 (KeyDown|KeyHold) +19:1810:0:99:5 //Pattern index digit 3: NUM 3 (KeyDown|KeyHold) +19:1811:0:52:5 //Pattern index digit 4: 4 (KeyDown|KeyHold) +19:1811:0:100:5 //Pattern index digit 4: NUM 4 (KeyDown|KeyHold) +19:1812:0:53:5 //Pattern index digit 5: 5 (KeyDown|KeyHold) +19:1812:0:101:5 //Pattern index digit 5: NUM 5 (KeyDown|KeyHold) +19:1813:0:54:5 //Pattern index digit 6: 6 (KeyDown|KeyHold) +19:1813:0:102:5 //Pattern index digit 6: NUM 6 (KeyDown|KeyHold) +19:1814:0:55:5 //Pattern index digit 7: 7 (KeyDown|KeyHold) +19:1814:0:103:5 //Pattern index digit 7: NUM 7 (KeyDown|KeyHold) +19:1815:0:56:5 //Pattern index digit 8: 8 (KeyDown|KeyHold) +19:1815:0:104:5 //Pattern index digit 8: NUM 8 (KeyDown|KeyHold) +19:1816:0:57:5 //Pattern index digit 9: 9 (KeyDown|KeyHold) +19:1816:0:105:5 //Pattern index digit 9: NUM 9 (KeyDown|KeyHold) +19:1817:0:107:5 //Increase pattern index : NUM PLUS (KeyDown|KeyHold) +19:1817:0:187:5 //Increase pattern index : + (KeyDown|KeyHold) +19:1818:0:109:1 //Decrease pattern index: NUM SUB (KeyDown) +19:1818:0:189:1 //Decrease pattern index: - (KeyDown) Modified: trunk/OpenMPT/packageTemplate/extraKeymaps/SE_laptop_(ganja).mkb =================================================================== --- trunk/OpenMPT/packageTemplate/extraKeymaps/SE_laptop_(ganja).mkb 2009-11-27 21:17:33 UTC (rev 425) +++ trunk/OpenMPT/packageTemplate/extraKeymaps/SE_laptop_(ganja).mkb 2009-11-28 14:44:48 UTC (rev 426) @@ -2,6 +2,7 @@ //-Format is: - //- Context:Command ID:Modifiers:Key:KeypressEventType //Comments - //---------------------------------------------------------------------- +version:1 //----( Global Context (0) )------------ 0:1347:2:78:1 //File/New: Ctrl+N (KeyDown) @@ -187,13 +188,37 @@ //----( Comments Context [top] (18) )------------ //----( Orderlist (19) )------------ +19:1802:0:46:5 //Delete Order: DELETE (KeyDown|KeyHold) +19:1803:0:45:5 //Insert Order: INSERT (KeyDown|KeyHold) +19:1804:0:13:5 //Edit Pattern: ENTER (KeyDown|KeyHold) +19:1805:0:9:5 //Switch to pattern editor: TAB (KeyDown|KeyHold) 19:1794:0:37:5 //Previous Order: LEFT (KeyDown|KeyHold) 19:1794:0:38:5 //Previous Order: UP (KeyDown|KeyHold) 19:1795:0:39:5 //Next Order: RIGHT (KeyDown|KeyHold) 19:1795:0:40:5 //Next Order: DOWN (KeyDown|KeyHold) 19:1796:0:36:5 //First Order: HOME (KeyDown|KeyHold) 19:1797:0:35:5 //Last Order: END (KeyDown|KeyHold) -19:1802:0:46:5 //Delete Order: DELETE (KeyDown|KeyHold) -19:1803:0:45:5 //Insert Order: INSERT (KeyDown|KeyHold) -19:1804:0:13:5 //Edit Pattern: ENTER (KeyDown|KeyHold) -19:1805:0:9:5 //Switch to pattern editor: TAB (KeyDown|KeyHold) +19:1807:0:48:5 //Pattern index digit 0: 0 (KeyDown|KeyHold) +19:1807:0:96:5 //Pattern index digit 0: NUM 0 (KeyDown|KeyHold) +19:1808:0:49:5 //Pattern index digit 1: 1 (KeyDown|KeyHold) +19:1808:0:97:5 //Pattern index digit 1: NUM 1 (KeyDown|KeyHold) +19:1809:0:50:5 //Pattern index digit 2: 2 (KeyDown|KeyHold) +19:1809:0:98:5 //Pattern index digit 2: NUM 2 (KeyDown|KeyHold) +19:1810:0:51:5 //Pattern index digit 3: 3 (KeyDown|KeyHold) +19:1810:0:99:5 //Pattern index digit 3: NUM 3 (KeyDown|KeyHold) +19:1811:0:52:5 //Pattern index digit 4: 4 (KeyDown|KeyHold) +19:1811:0:100:5 //Pattern index digit 4: NUM 4 (KeyDown|KeyHold) +19:1812:0:53:5 //Pattern index digit 5: 5 (KeyDown|KeyHold) +19:1812:0:101:5 //Pattern index digit 5: NUM 5 (KeyDown|KeyHold) +19:1813:0:54:5 //Pattern index digit 6: 6 (KeyDown|KeyHold) +19:1813:0:102:5 //Pattern index digit 6: NUM 6 (KeyDown|KeyHold) +19:1814:0:55:5 //Pattern index digit 7: 7 (KeyDown|KeyHold) +19:1814:0:103:5 //Pattern index digit 7: NUM 7 (KeyDown|KeyHold) +19:1815:0:56:5 //Pattern index digit 8: 8 (KeyDown|KeyHold) +19:1815:0:104:5 //Pattern index digit 8: NUM 8 (KeyDown|KeyHold) +19:1816:0:57:5 //Pattern index digit 9: 9 (KeyDown|KeyHold) +19:1816:0:105:5 //Pattern index digit 9: NUM 9 (KeyDown|KeyHold) +19:1817:0:107:5 //Increase pattern index : NUM PLUS (KeyDown|KeyHold) +19:1817:0:187:5 //Increase pattern index : + (KeyDown|KeyHold) +19:1818:0:109:1 //Decrease pattern index: NUM SUB (KeyDown) +19:1818:0:189:1 //Decrease pattern index: - (KeyDown) Modified: trunk/OpenMPT/packageTemplate/extraKeymaps/UK_mpt_it2_hybrid_(rewbs).mkb =================================================================== --- trunk/OpenMPT/packageTemplate/extraKeymaps/UK_mpt_it2_hybrid_(rewbs).mkb 2009-11-27 21:17:33 UTC (rev 425) +++ trunk/OpenMPT/packageTemplate/extraKeymaps/UK_mpt_it2_hybrid_(rewbs).mkb 2009-11-28 14:44:48 UTC (rev 426) @@ -2,6 +2,7 @@ //-Format is: - //- Context:Command ID:Modifiers:Key:KeypressEventType //Comments - //---------------------------------------------------------------------- +version:1 //----( Global Context (0) )------------ 0:1347:2:78:1 //File/New: Ctrl+N (KeyDown) @@ -282,13 +283,37 @@ //----( Comments Context [top] (18) )------------ //----( Orderlist (19) )------------ +19:1802:0:46:5 //Delete Order: DELETE (KeyDown|KeyHold) +19:1803:0:45:5 //Insert Order: INSERT (KeyDown|KeyHold) +19:1804:0:13:5 //Edit Pattern: ENTER (KeyDown|KeyHold) +19:1805:0:9:5 //Switch to pattern editor: TAB (KeyDown|KeyHold) 19:1794:0:37:5 //Previous Order: LEFT (KeyDown|KeyHold) 19:1794:0:38:5 //Previous Order: UP (KeyDown|KeyHold) 19:1795:0:39:5 //Next Order: RIGHT (KeyDown|KeyHold) 19:1795:0:40:5 //Next Order: DOWN (KeyDown|KeyHold) 19:1796:0:36:5 //First Order: HOME (KeyDown|KeyHold) 19:1797:0:35:5 //Last Order: END (KeyDown|KeyHold) -19:1802:0:46:5 //Delete Order: DELETE (KeyDown|KeyHold) -19:1803:0:45:5 //Insert Order: INSERT (KeyDown|KeyHold) -19:1804:0:13:5 //Edit Pattern: ENTER (KeyDown|KeyHold) -19:1805:0:9:5 //Switch to pattern editor: TAB (KeyDown|KeyHold) +19:1807:0:48:5 //Pattern index digit 0: 0 (KeyDown|KeyHold) +19:1807:0:96:5 //Pattern index digit 0: NUM 0 (KeyDown|KeyHold) +19:1808:0:49:5 //Pattern index digit 1: 1 (KeyDown|KeyHold) +19:1808:0:97:5 //Pattern index digit 1: NUM 1 (KeyDown|KeyHold) +19:1809:0:50:5 //Pattern index digit 2: 2 (KeyDown|KeyHold) +19:1809:0:98:5 //Pattern index digit 2: NUM 2 (KeyDown|KeyHold) +19:1810:0:51:5 //Pattern index digit 3: 3 (KeyDown|KeyHold) +19:1810:0:99:5 //Pattern index digit 3: NUM 3 (KeyDown|KeyHold) +19:1811:0:52:5 //Pattern index digit 4: 4 (KeyDown|KeyHold) +19:1811:0:100:5 //Pattern index digit 4: NUM 4 (KeyDown|KeyHold) +19:1812:0:53:5 //Pattern index digit 5: 5 (KeyDown|KeyHold) +19:1812:0:101:5 //Pattern index digit 5: NUM 5 (KeyDown|KeyHold) +19:1813:0:54:5 //Pattern index digit 6: 6 (KeyDown|KeyHold) +19:1813:0:102:5 //Pattern index digit 6: NUM 6 (KeyDown|KeyHold) +19:1814:0:55:5 //Pattern index digit 7: 7 (KeyDown|KeyHold) +19:1814:0:103:5 //Pattern index digit 7: NUM 7 (KeyDown|KeyHold) +19:1815:0:56:5 //Pattern index digit 8: 8 (KeyDown|KeyHold) +19:1815:0:104:5 //Pattern index digit 8: NUM 8 (KeyDown|KeyHold) +19:1816:0:57:5 //Pattern index digit 9: 9 (KeyDown|KeyHold) +19:1816:0:105:5 //Pattern index digit 9: NUM 9 (KeyDown|KeyHold) +19:1817:0:107:5 //Increase pattern index : NUM PLUS (KeyDown|KeyHold) +19:1817:0:187:5 //Increase pattern index : + (KeyDown|KeyHold) +19:1818:0:109:1 //Decrease pattern index: NUM SUB (KeyDown) +19:1818:0:189:1 //Decrease pattern index: - (KeyDown) Modified: trunk/OpenMPT/packageTemplate/extraKeymaps/US_it2_(lpchip).mkb =================================================================== --- trunk/OpenMPT/packageTemplate/extraKeymaps/US_it2_(lpchip).mkb 2009-11-27 21:17:33 UTC (rev 425) +++ trunk/OpenMPT/packageTemplate/extraKeymaps/US_it2_(lpchip).mkb 2009-11-28 14:44:48 UTC (rev 426) @@ -2,6 +2,7 @@ //-Format is: - //- Context:Command ID:Modifiers:Key:KeypressEventType //Comments - //---------------------------------------------------------------------- +version:1 //----( Global Context (0) )------------ 0:1347:2:78:1 //File/New: Ctrl+N (KeyDown) @@ -255,13 +256,37 @@ //----( Comments Context [top] (18) )------------ //----( Orderlist (19) )------------ +19:1802:0:46:5 //Delete Order: DELETE (KeyDown|KeyHold) +19:1803:0:45:5 //Insert Order: INSERT (KeyDown|KeyHold) +19:1804:0:13:5 //Edit Pattern: ENTER (KeyDown|KeyHold) +19:1805:0:9:5 //Switch to pattern editor: TAB (KeyDown|KeyHold) 19:1794:0:37:5 //Previous Order: LEFT (KeyDown|KeyHold) 19:1794:0:38:5 //Previous Order: UP (KeyDown|KeyHold) 19:1795:0:39:5 //Next Order: RIGHT (KeyDown|KeyHold) 19:1795:0:40:5 //Next Order: DOWN (KeyDown|KeyHold) 19:1796:0:36:5 //First Order: HOME (KeyDown|KeyHold) 19:1797:0:35:5 //Last Order: END (KeyDown|KeyHold) -19:1802:0:46:5 //Delete Order: DELETE (KeyDown|KeyHold) -19:1803:0:45:5 //Insert Order: INSERT (KeyDown|KeyHold) -19:1804:0:13:5 //Edit Pattern: ENTER (KeyDown|KeyHold) -19:1805:0:9:5 //Switch to pattern editor: TAB (KeyDown|KeyHold) +19:1807:0:48:5 //Pattern index digit 0: 0 (KeyDown|KeyHold) +19:1807:0:96:5 //Pattern index digit 0: NUM 0 (KeyDown|KeyHold) +19:1808:0:49:5 //Pattern index digit 1: 1 (KeyDown|KeyHold) +19:1808:0:97:5 //Pattern index digit 1: NUM 1 (KeyDown|KeyHold) +19:1809:0:50:5 //Pattern index digit 2: 2 (KeyDown|KeyHold) +19:1809:0:98:5 //Pattern index digit 2: NUM 2 (KeyDown|KeyHold) +19:1810:0:51:5 //Pattern index digit 3: 3 (KeyDown|KeyHold) +19:1810:0:99:5 //Pattern index digit 3: NUM 3 (KeyDown|KeyHold) +19:1811:0:52:5 //Pattern index digit 4: 4 (KeyDown|KeyHold) +19:1811:0:100:5 //Pattern index digit 4: NUM 4 (KeyDown|KeyHold) +19:1812:0:53:5 //Pattern index digit 5: 5 (KeyDown|KeyHold) +19:1812:0:101:5 //Pattern index digit 5: NUM 5 (KeyDown|KeyHold) +19:1813:0:54:5 //Pattern index digit 6: 6 (KeyDown|KeyHold) +19:1813:0:102:5 //Pattern index digit 6: NUM 6 (KeyDown|KeyHold) +19:1814:0:55:5 //Pattern index digit 7: 7 (KeyDown|KeyHold) +19:1814:0:103:5 //Pattern index digit 7: NUM 7 (KeyDown|KeyHold) +19:1815:0:56:5 //Pattern index digit 8: 8 (KeyDown|KeyHold) +19:1815:0:104:5 //Pattern index digit 8: NUM 8 (KeyDown|KeyHold) +19:1816:0:57:5 //Pattern index digit 9: 9 (KeyDown|KeyHold) +19:1816:0:105:5 //Pattern index digit 9: NUM 9 (KeyDown|KeyHold) +19:1817:0:107:5 //Increase pattern index : NUM PLUS (KeyDown|KeyHold) +19:1817:0:187:5 //Increase pattern index : + (KeyDown|KeyHold) +19:1818:0:109:1 //Decrease pattern index: NUM SUB (KeyDown) +19:1818:0:189:1 //Decrease pattern index: - (KeyDown) Modified: trunk/OpenMPT/packageTemplate/extraKeymaps/US_mpt_classic_(diamond).mkb =================================================================== --- trunk/OpenMPT/packageTemplate/extraKeymaps/US_mpt_classic_(diamond).mkb 2009-11-27 21:17:33 UTC (rev 425) +++ trunk/OpenMPT/packageTemplate/extraKeymaps/US_mpt_classic_(diamond).mkb 2009-11-28 14:44:48 UTC (rev 426) @@ -2,6 +2,7 @@ //-Format is: - //- Context:Command ID:Modifiers:Key:KeypressEventType //Comments - //---------------------------------------------------------------------- +version:1 //----( Global Context (0) )------------ 0:1347:2:78:1 //File/New: Ctrl+N (KeyDown) @@ -270,13 +271,37 @@ //----( Comments Context [top] (18) )------------ //----( Orderlist (19) )------------ +19:1802:0:46:5 //Delete Order: DELETE (KeyDown|KeyHold) +19:1803:0:45:5 //Insert Order: INSERT (KeyDown|KeyHold) +19:1804:0:13:5 //Edit Pattern: ENTER (KeyDown|KeyHold) +19:1805:0:9:5 //Switch to pattern editor: TAB (KeyDown|KeyHold) 19:1794:0:37:5 //Previous Order: LEFT (KeyDown|KeyHold) 19:1794:0:38:5 //Previous Order: UP (KeyDown|KeyHold) 19:1795:0:39:5 //Next Order: RIGHT (KeyDown|KeyHold) 19:1795:0:40:5 //Next Order: DOWN (KeyDown|KeyHold) 19:1796:0:36:5 //First Order: HOME (KeyDown|KeyHold) 19:1797:0:35:5 //Last Order: END (KeyDown|KeyHold) -19:1802:0:46:5 //Delete Order: DELETE (KeyDown|KeyHold) -19:1803:0:45:5 //Insert Order: INSERT (KeyDown|KeyHold) -19:1804:0:13:5 //Edit Pattern: ENTER (KeyDown|KeyHold) -19:1805:0:9:5 //Switch to pattern editor: TAB (KeyDown|KeyHold) +19:1807:0:48:5 //Pattern index digit 0: 0 (KeyDown|KeyHold) +19:1807:0:96:5 //Pattern index digit 0: NUM 0 (KeyDown|KeyHold) +19:1808:0:49:5 //Pattern index digit 1: 1 (KeyDown|KeyHold) +19:1808:0:97:5 //Pattern index digit 1: NUM 1 (KeyDown|KeyHold) +19:1809:0:50:5 //Pattern index digit 2: 2 (KeyDown|KeyHold) +19:1809:0:98:5 //Pattern index digit 2: NUM 2 (KeyDown|KeyHold) +19:1810:0:51:5 //Pattern index digit 3: 3 (KeyDown|KeyHold) +19:1810:0:99:5 //Pattern index digit 3: NUM 3 (KeyDown|KeyHold) +19:1811:0:52:5 //Pattern index digit 4: 4 (KeyDown|KeyHold) +19:1811:0:100:5 //Pattern index digit 4: NUM 4 (KeyDown|KeyHold) +19:1812:0:53:5 //Pattern index digit 5: 5 (KeyDown|KeyHold) +19:1812:0:101:5 //Pattern index digit 5: NUM 5 (KeyDown|KeyHold) +19:1813:0:54:5 //Pattern index digit 6: 6 (KeyDown|KeyHold) +19:1813:0:102:5 //Pattern index digit 6: NUM 6 (KeyDown|KeyHold) +19:1814:0:55:5 //Pattern index digit 7: 7 (KeyDown|KeyHold) +19:1814:0:103:5 //Pattern index digit 7: NUM 7 (KeyDown|KeyHold) +19:1815:0:56:5 //Pattern index digit 8: 8 (KeyDown|KeyHold) +19:1815:0:104:5 //Pattern index digit 8: NUM 8 (KeyDown|KeyHold) +19:1816:0:57:5 //Pattern index digit 9: 9 (KeyDown|KeyHold) +19:1816:0:105:5 //Pattern index digit 9: NUM 9 (KeyDown|KeyHold) +19:1817:0:107:5 //Increase pattern index : NUM PLUS (KeyDown|KeyHold) +19:1817:0:187:5 //Increase pattern index : + (KeyDown|KeyHold) +19:1818:0:109:1 //Decrease pattern index: NUM SUB (KeyDown) +19:1818:0:189:1 //Decrease pattern index: - (KeyDown) Modified: trunk/OpenMPT/packageTemplate/extraKeymaps/dvorak_(snu).mkb =================================================================== --- trunk/OpenMPT/packageTemplate/extraKeymaps/dvorak_(snu).mkb 2009-11-27 21:17:33 UTC (rev 425) +++ trunk/OpenMPT/packageTemplate/extraKeymaps/dvorak_(snu).mkb 2009-11-28 14:44:48 UTC (rev 426) @@ -2,6 +2,7 @@ //-Format is: - //- Context:Command ID:Modifiers:Key:KeypressEventType //Comments - //---------------------------------------------------------------------- +version:1 //----( Global Context (0) )------------ 0:1347:2:78:1 //File/New: Ctrl+N (KeyDown) @@ -258,13 +259,37 @@ //----( Comments Context [top] (18) )------------ //----( Orderlist (19) )------------ +19:1802:0:46:5 //Delete Order: DELETE (KeyDown|KeyHold) +19:1803:0:45:5 //Insert Order: INSERT (KeyDown|KeyHold) +19:1804:0:13:5 //Edit Pattern: ENTER (KeyDown|KeyHold) +19:1805:0:9:5 //Switch to pattern editor: TAB (KeyDown|KeyHold) 19:1794:0:37:5 //Previous Order: LEFT (KeyDown|KeyHold) 19:1794:0:38:5 //Previous Order: UP (KeyDown|KeyHold) 19:1795:0:39:5 //Next Order: RIGHT (KeyDown|KeyHold) 19:1795:0:40:5 //Next Order: DOWN (KeyDown|KeyHold) 19:1796:0:36:5 //First Order: HOME (KeyDown|KeyHold) 19:1797:0:35:5 //Last Order: END (KeyDown|KeyHold) -19:1802:0:46:5 //Delete Order: DELETE (KeyDown|KeyHold) -19:1803:0:45:5 //Insert Order: INSERT (KeyDown|KeyHold) -19:1804:0:13:5 //Edit Pattern: ENTER (KeyDown|KeyHold) -19:1805:0:9:5 //Switch to pattern editor: TAB (KeyDown|KeyHold) +19:1807:0:48:5 //Pattern index digit 0: 0 (KeyDown|KeyHold) +19:1807:0:96:5 //Pattern index digit 0: NUM 0 (KeyDown|KeyHold) +19:1808:0:49:5 //Pattern index digit 1: 1 (KeyDown|KeyHold) +19:1808:0:97:5 //Pattern index digit 1: NUM 1 (KeyDown|KeyHold) +19:1809:0:50:5 //Pattern index digit 2: 2 (KeyDown|KeyHold) +19:1809:0:98:5 //Pattern index digit 2: NUM 2 (KeyDown|KeyHold) +19:1810:0:51:5 //Pattern index digit 3: 3 (KeyDown|KeyHold) +19:1810:0:99:5 //Pattern index digit 3: NUM 3 (KeyDown|KeyHold) +19:1811:0:52:5 //Pattern index digit 4: 4 (KeyDown|KeyHold) +19:1811:0:100:5 //Pattern index digit 4: NUM 4 (KeyDown|KeyHold) +19:1812:0:53:5 //Pattern index digit 5: 5 (KeyDown|KeyHold) +19:1812:0:101:5 //Pattern index digit 5: NUM 5 (KeyDown|KeyHold) +19:1813:0:54:5 //Pattern index digit 6: 6 (KeyDown|KeyHold) +19:1813:0:102:5 //Pattern index digit 6: NUM 6 (KeyDown|KeyHold) +19:1814:0:55:5 //Pattern index digit 7: 7 (KeyDown|KeyHold) +19:1814:0:103:5 //Pattern index digit 7: NUM 7 (KeyDown|KeyHold) +19:1815:0:56:5 //Pattern index digit 8: 8 (KeyDown|KeyHold) +19:1815:0:104:5 //Pattern index digit 8: NUM 8 (KeyDown|KeyHold) +19:1816:0:57:5 //Pattern index digit 9: 9 (KeyDown|KeyHold) +19:1816:0:105:5 //Pattern index digit 9: NUM 9 (KeyDown|KeyHold) +19:1817:0:107:5 //Increase pattern index : NUM PLUS (KeyDown|KeyHold) +19:1817:0:187:5 //Increase pattern index : + (KeyDown|KeyHold) +19:1818:0:109:1 //Decrease pattern index: NUM SUB (KeyDown) +19:1818:0:189:1 //Decrease pattern index: - (KeyDown) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2009-11-28 16:12:31
|
Revision: 427 http://modplug.svn.sourceforge.net/modplug/?rev=427&view=rev Author: saga-games Date: 2009-11-28 16:12:21 +0000 (Sat, 28 Nov 2009) Log Message: ----------- [Fix] Treeview: Double-clicking a sequence to open the sequence's folder also set this sequence as the active sequence, which was not intended. [Mod] Changed the "Buzz" colour scheme a bit (channel separator colours) [Mod] Updated DE_jojo.mkb (Added Duplicate pattern shortcut) Modified Paths: -------------- trunk/OpenMPT/mptrack/Moptions.cpp trunk/OpenMPT/mptrack/View_tre.cpp trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb Modified: trunk/OpenMPT/mptrack/Moptions.cpp =================================================================== --- trunk/OpenMPT/mptrack/Moptions.cpp 2009-11-28 14:44:48 UTC (rev 426) +++ trunk/OpenMPT/mptrack/Moptions.cpp 2009-11-28 16:12:21 UTC (rev 427) @@ -552,27 +552,27 @@ void COptionsColors::OnPresetBuzz() //--------------------------------- { - CustomColors[MODCOLOR_BACKNORMAL] = 0x00d0dbe1; - CustomColors[MODCOLOR_TEXTNORMAL] = 0x0027343a; - CustomColors[MODCOLOR_BACKCURROW] = 0x009eb4c0; - CustomColors[MODCOLOR_TEXTCURROW] = 0x00000000; - CustomColors[MODCOLOR_BACKSELECTED] = 0x00000000; - CustomColors[MODCOLOR_TEXTSELECTED] = 0x00ccd7dd; - CustomColors[MODCOLOR_BACKPLAYCURSOR] = 0x007a99a9; - CustomColors[MODCOLOR_TEXTPLAYCURSOR] = 0x00000000; - CustomColors[MODCOLOR_BACKHILIGHT] = 0x00b5c5ce; - CustomColors[MODCOLOR_NOTE] = 0x005b0000; - CustomColors[MODCOLOR_INSTRUMENT] = 0x00555500; - CustomColors[MODCOLOR_VOLUME] = 0x00005e00; - CustomColors[MODCOLOR_PANNING] = 0x00686800; - CustomColors[MODCOLOR_PITCH] = 0x00006262; - CustomColors[MODCOLOR_GLOBALS] = 0x00000066; - CustomColors[MODCOLOR_SAMPLE] = 0x0000ff00; - CustomColors[MODCOLOR_ENVELOPES] = 0x000000ff; - CustomColors[MODCOLOR_SEPSHADOW] = RGB(0x80, 0x80, 0x80); - CustomColors[MODCOLOR_SEPFACE] = RGB(0xD4, 0xD0, 0xC8); + CustomColors[MODCOLOR_BACKNORMAL] = RGB(0xE1, 0xDB, 0xD0); + CustomColors[MODCOLOR_TEXTNORMAL] = RGB(0x3A, 0x34, 0x27); + CustomColors[MODCOLOR_BACKCURROW] = RGB(0xC0, 0xB4, 0x9E); + CustomColors[MODCOLOR_TEXTCURROW] = RGB(0x00, 0x00, 0x00); + CustomColors[MODCOLOR_BACKSELECTED] = RGB(0x00, 0x00, 0x00); + CustomColors[MODCOLOR_TEXTSELECTED] = RGB(0xDD, 0xD7, 0xCC); + CustomColors[MODCOLOR_BACKPLAYCURSOR] = RGB(0xA9, 0x99, 0x7A); + CustomColors[MODCOLOR_TEXTPLAYCURSOR] = RGB(0x00, 0x00, 0x00); + CustomColors[MODCOLOR_BACKHILIGHT] = RGB(0xCE, 0xC5, 0xB5); + CustomColors[MODCOLOR_NOTE] = RGB(0x00, 0x00, 0x5B); + CustomColors[MODCOLOR_INSTRUMENT] = RGB(0x00, 0x55, 0x55); + CustomColors[MODCOLOR_VOLUME] = RGB(0x00, 0x5E, 0x00); + CustomColors[MODCOLOR_PANNING] = RGB(0x00, 0x68, 0x68); + CustomColors[MODCOLOR_PITCH] = RGB(0x62, 0x62, 0x00); + CustomColors[MODCOLOR_GLOBALS] = RGB(0x66, 0x00, 0x00); + CustomColors[MODCOLOR_SAMPLE] = RGB(0x00, 0xFF, 0x00); + CustomColors[MODCOLOR_ENVELOPES] = RGB(0xFF, 0x00, 0x00); + CustomColors[MODCOLOR_SEPSHADOW] = RGB(0x9A, 0x87, 0x63); + CustomColors[MODCOLOR_SEPFACE] = RGB(0xE1, 0xDB, 0xD0); CustomColors[MODCOLOR_SEPHILITE] = RGB(0xFF, 0xFF, 0xFF); - CustomColors[MODCOLOR_BLENDCOLOR] = 0x00d0dbe1; + CustomColors[MODCOLOR_BLENDCOLOR] = RGB(0xE1, 0xDB, 0xD0); OnPreviewChanged(); } Modified: trunk/OpenMPT/mptrack/View_tre.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_tre.cpp 2009-11-28 14:44:48 UTC (rev 426) +++ trunk/OpenMPT/mptrack/View_tre.cpp 2009-11-28 16:12:21 UTC (rev 427) @@ -1159,9 +1159,9 @@ if (pModDoc) pModDoc->ActivateView(IDD_CONTROL_COMMENTS, 0); return TRUE; - case MODITEM_SEQUENCE: + /*case MODITEM_SEQUENCE: if (pModDoc) pModDoc->ActivateView(IDD_CONTROL_PATTERNS, (dwItem << 16) | 0x8000); - return TRUE; + return TRUE;*/ case MODITEM_ORDER: if (pModDoc) pModDoc->ActivateView(IDD_CONTROL_PATTERNS, dwItem | 0x8000); Modified: trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb =================================================================== --- trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb 2009-11-28 14:44:48 UTC (rev 426) +++ trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb 2009-11-28 16:12:21 UTC (rev 427) @@ -75,6 +75,7 @@ 2:1002:2:13:5 //Play row: Ctrl+EINGABE (KeyDown|KeyHold) 2:1317:4:18:1 //Set row jump on note entry: Alt (KeyDown) 2:1685:2:9:1 //Switch to order list: Ctrl+TABULATOR (KeyDown) +2:1806:2:68:1 //Duplicate pattern: Ctrl+D (KeyDown) 2:1662:6:80:1 //Toggle channel's plugin editor: Ctrl+Alt+P (KeyDown) 2:1062:0:93:1 //Show note properties: ANWENDUNG (KeyDown) 2:1780:2:80:1 //Show playback time at current row: Ctrl+P (KeyDown) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2009-11-28 20:25:43
|
Revision: 429 http://modplug.svn.sourceforge.net/modplug/?rev=429&view=rev Author: saga-games Date: 2009-11-28 20:25:33 +0000 (Sat, 28 Nov 2009) Log Message: ----------- [Imp] Sample editor: When creating a new sample using "resize", sample loop is activated automatically [Fix] ST3 compatibility: Only allow waveforms 0 to 3 for S3x / S4x / S5x. [Imp] Pattern editor: Hopefully correct limitation and explanation of "Set * waveform" parameters... [Imp] Mod Conversion: Better conversion of MOD/XM E4x / E7x command [Imp] Mod Conversion: Better conversion of note off commands when converting to .mod Modified Paths: -------------- trunk/OpenMPT/mptrack/Moddoc.cpp trunk/OpenMPT/soundlib/Snd_fx.cpp trunk/OpenMPT/soundlib/Sndfile.cpp trunk/OpenMPT/soundlib/modsmp_ctrl.cpp Modified: trunk/OpenMPT/mptrack/Moddoc.cpp =================================================================== --- trunk/OpenMPT/mptrack/Moddoc.cpp 2009-11-28 18:11:44 UTC (rev 428) +++ trunk/OpenMPT/mptrack/Moddoc.cpp 2009-11-28 20:25:33 UTC (rev 429) @@ -2304,6 +2304,15 @@ case CMD_GLOBALVOLUME: nmax = (nType & MOD_TYPE_IT | MOD_TYPE_MPT) ? 128 : 64; break; + + case CMD_MODCMDEX: + // adjust waveform types for XM/MOD + if(gFXInfo[ndx].dwParamValue == 0x40 || gFXInfo[ndx].dwParamValue == 0x70) nmax = gFXInfo[ndx].dwParamValue | 0x07; + break; + case CMD_S3MCMDEX: + // adjust waveform types for IT/S3M + if(gFXInfo[ndx].dwParamValue >= 0x30 && gFXInfo[ndx].dwParamValue <= 0x50) nmax = gFXInfo[ndx].dwParamValue | (m_SndFile.IsCompatibleMode(TRK_IMPULSETRACKER | TRK_SCREAMTRACKER) ? 0x03 : 0x07); + break; } *prangeMin = nmin; *prangeMax = nmax; @@ -2659,17 +2668,22 @@ case 0x30: // vibrato waveform case 0x40: // tremolo waveform case 0x50: // panbrello waveform - if(((param & 0x0F) > 0x03) && m_SndFile.IsCompatibleMode(TRK_IMPULSETRACKER)) + if(((param & 0x0F) > 0x03) && m_SndFile.IsCompatibleMode(TRK_IMPULSETRACKER | TRK_SCREAMTRACKER)) { strcpy(s, "ignore"); break; } switch(param & 0x0F) { - case 0x00: case 0x04: case 0x08: case 0x0C: strcpy(s, "sine wave"); break; - case 0x01: case 0x05: case 0x09: case 0x0D: strcpy(s, "ramp down"); break; - case 0x02: case 0x06: case 0x0A: case 0x0E: strcpy(s, "square wave"); break; - case 0x03: case 0x07: case 0x0B: case 0x0F: strcpy(s, "random"); break; + case 0x00: strcpy(s, "sine wave"); break; + case 0x01: strcpy(s, "ramp down"); break; + case 0x02: strcpy(s, "square wave"); break; + case 0x03: strcpy(s, "random"); break; + case 0x04: strcpy(s, "sine wave (continue)"); break; + case 0x05: strcpy(s, "ramp down (continue)"); break; + case 0x06: strcpy(s, "square wave (continue)"); break; + case 0x07: strcpy(s, "random (continue)"); break; + default: strcpy(s, "ignore"); break; } break; @@ -2717,12 +2731,17 @@ break; case 0x40: // vibrato waveform case 0x70: // tremolo waveform - //todo: find proper values for XM/MOD (it's not as trivial as described here, i think) switch(param & 0x0F) { - case 0x00: case 0x03: case 0x06: case 0x0A: case 0x0D: strcpy(s, "sine wave"); break; - case 0x01: case 0x04: case 0x07: case 0x0B: case 0x0E: strcpy(s, "ramp down"); break; - case 0x02: case 0x05: case 0x08: case 0x0C: case 0x0F: strcpy(s, "square wave"); break; + case 0x00: case 0x08: strcpy(s, "sine wave"); break; + case 0x01: case 0x09: strcpy(s, "ramp down"); break; + case 0x02: case 0x0A: strcpy(s, "square wave"); break; + case 0x03: case 0x0B: strcpy(s, "square wave"); break; + + case 0x04: case 0x0C: strcpy(s, "sine wave (continue)"); break; + case 0x05: case 0x0D: strcpy(s, "ramp down (continue)"); break; + case 0x06: case 0x0E: strcpy(s, "square wave (continue)"); break; + case 0x07: case 0x0F: strcpy(s, "square wave (continue)"); break; } break; case 0x60: // pattern loop Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp =================================================================== --- trunk/OpenMPT/soundlib/Snd_fx.cpp 2009-11-28 18:11:44 UTC (rev 428) +++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2009-11-28 20:25:33 UTC (rev 429) @@ -727,8 +727,9 @@ } pChn->nPos = 0; pChn->nPosLo = 0; - if (pChn->nVibratoType < 4) pChn->nVibratoPos = ((!IsCompatibleMode(TRK_IMPULSETRACKER)) && (m_nType & (MOD_TYPE_IT|MOD_TYPE_MPT)) && (!(m_dwSongFlags & SONG_ITOLDEFFECTS))) ? 0x10 : 0; - if(!IsCompatibleMode(TRK_IMPULSETRACKER) && pChn->nTremoloType < 4) pChn->nTremoloPos = 0; + // Handle "retrigger" waveform type + if (pChn->nVibratoType < 4) pChn->nVibratoPos = ((!IsCompatibleMode(TRK_IMPULSETRACKER | TRK_SCREAMTRACKER)) && (m_nType & (MOD_TYPE_IT|MOD_TYPE_MPT)) && (!(m_dwSongFlags & SONG_ITOLDEFFECTS))) ? 0x10 : 0; + if(!IsCompatibleMode(TRK_IMPULSETRACKER | TRK_SCREAMTRACKER) && pChn->nTremoloType < 4) pChn->nTremoloPos = 0; } if (pChn->nPos >= pChn->nLength) pChn->nPos = pChn->nLoopStart; } Modified: trunk/OpenMPT/soundlib/Sndfile.cpp =================================================================== --- trunk/OpenMPT/soundlib/Sndfile.cpp 2009-11-28 18:11:44 UTC (rev 428) +++ trunk/OpenMPT/soundlib/Sndfile.cpp 2009-11-28 20:25:33 UTC (rev 429) @@ -3236,10 +3236,10 @@ case 0x10: m->command = CMD_PORTAMENTOUP; m->param |= 0xF0; break; case 0x20: m->command = CMD_PORTAMENTODOWN; m->param |= 0xF0; break; case 0x30: m->param = (m->param & 0x0F) | 0x10; break; - case 0x40: m->param = (m->param & 0x0F) | 0x30; break; + case 0x40: m->param = (m->param & 0x03) | 0x30; break; case 0x50: m->param = (m->param & 0x0F) | 0x20; break; case 0x60: m->param = (m->param & 0x0F) | 0xB0; break; - case 0x70: m->param = (m->param & 0x0F) | 0x40; break; + case 0x70: m->param = (m->param & 0x03) | 0x40; break; case 0x90: m->command = CMD_RETRIG; m->param = 0x80 | (m->param & 0x0F); break; case 0xA0: if (m->param & 0x0F) { m->command = CMD_VOLUMESLIDE; m->param = (m->param << 4) | 0x0F; } else m->command = 0; break; case 0xB0: if (m->param & 0x0F) { m->command = CMD_VOLUMESLIDE; m->param |= 0xF0; } else m->command = 0; break; @@ -3389,6 +3389,7 @@ // Convert S3M / IT / MPTM to MOD / XM else if(oldTypeIsS3M_IT_MPT && newTypeIsMOD_XM) { + // convert note cut/off/fade if(m->note == NOTE_NOTECUT || m->note == NOTE_FADE) m->note = NOTE_KEYOFF; @@ -3522,6 +3523,22 @@ // Convert anything to MOD - remove volume column, remove Set Macro if (newTypeIsMOD) { + // convert note off events + if(m->note >= NOTE_MIN_SPECIAL) + { + m->note = NOTE_NONE; + // no effect present, so just convert note off to volume 0 + if(m->command == CMD_NONE) + { + m->command = CMD_VOLUME; + m->param = 0; + // EDx effect present, so convert it to ECx + } else if((m->command == CMD_MODCMDEX) && ((m->param & 0xF0) == 0xD0)) + { + m->param = 0xC0 | (m->param & 0x0F); + } + } + if(m->command) switch(m->command) { case CMD_RETRIG: // MOD only has E9x Modified: trunk/OpenMPT/soundlib/modsmp_ctrl.cpp =================================================================== --- trunk/OpenMPT/soundlib/modsmp_ctrl.cpp 2009-11-28 18:11:44 UTC (rev 428) +++ trunk/OpenMPT/soundlib/modsmp_ctrl.cpp 2009-11-28 20:25:33 UTC (rev 429) @@ -73,8 +73,17 @@ AfxMessageBox(TEXT("Unsupported start position in InsertSilence.")); } - if(smp.nLoopStart >= nStartFrom) smp.nLoopStart += nSilenceLength; - if(smp.nLoopEnd >= nStartFrom) smp.nLoopEnd += nSilenceLength; + // Set loop points automatically + if(nOldBytes == 0) + { + smp.nLoopStart = 0; + smp.nLoopEnd = nNewLength; + smp.uFlags |= CHN_LOOP; + } else + { + if(smp.nLoopStart >= nStartFrom) smp.nLoopStart += nSilenceLength; + if(smp.nLoopEnd >= nStartFrom) smp.nLoopEnd += nSilenceLength; + } ReplaceSample(smp, pNewSmp, nNewLength, pSndFile); AdjustEndOfSample(smp, pSndFile); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2009-11-30 22:12:04
|
Revision: 430 http://modplug.svn.sourceforge.net/modplug/?rev=430&view=rev Author: saga-games Date: 2009-11-30 22:11:46 +0000 (Mon, 30 Nov 2009) Log Message: ----------- [Fix] IT/MPTM Loader: The MPT extensions should now also be loaded again if a file only contains empty sample slots. It still does not work with no sample slots in theory, but modplug created at least one slot when saving so everything should be fine for now. [Mod] Using MS Shell Dlg font instead of MS Sans Serif in resource file Modified Paths: -------------- trunk/OpenMPT/mptrack/mptrack.rc trunk/OpenMPT/soundlib/Load_it.cpp Modified: trunk/OpenMPT/mptrack/mptrack.rc =================================================================== --- trunk/OpenMPT/mptrack/mptrack.rc 2009-11-28 20:25:33 UTC (rev 429) +++ trunk/OpenMPT/mptrack/mptrack.rc 2009-11-30 22:11:46 UTC (rev 430) @@ -137,7 +137,7 @@ IDD_ABOUTBOX DIALOGEX 0, 0, 267, 254 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "About ModPlug Tracker" -FONT 8, "MS Sans Serif", 0, 0, 0x1 +FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN CONTROL "",IDC_BITMAP1,"Static",SS_BLACKRECT | SS_NOTIFY | SS_CENTERIMAGE,5,3,256,81,WS_EX_CLIENTEDGE CTEXT "",IDC_CREDITS,5,116,256,72,0,WS_EX_STATICEDGE @@ -150,7 +150,7 @@ IDD_OPTIONS_PLAYER DIALOGEX 0, 0, 272, 279 STYLE DS_SETFONT | DS_3DLOOK | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Player" -FONT 8, "MS Sans Serif", 0, 0, 0x0 +FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN GROUPBOX "Control",IDC_STATIC,6,6,257,150 CONTROL "Automatic Gain Control",IDC_CHECK2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,20,97,10 @@ -196,7 +196,7 @@ IDD_WAVECONVERT DIALOGEX 0, 0, 262, 197 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Wave Convert" -FONT 8, "MS Sans Serif", 0, 0, 0x0 +FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN DEFPUSHBUTTON "OK",IDOK,204,12,50,14 PUSHBUTTON "Cancel",IDCANCEL,204,30,50,14 @@ -225,7 +225,7 @@ IDD_PROGRESS DIALOG 0, 0, 186, 55 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Saving Wave File" -FONT 8, "MS Sans Serif" +FONT 8, "MS Shell Dlg" BEGIN PUSHBUTTON "Stop",IDCANCEL,68,34,50,14 CONTROL "Progress1",IDC_PROGRESS1,"msctls_progress32",WS_BORDER,4,19,178,12 @@ -235,7 +235,7 @@ IDD_OPTIONS_KEYBOARD DIALOGEX 0, 0, 272, 279 STYLE DS_SETFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Keyboard" -FONT 8, "MS Sans Serif", 0, 0, 0x0 +FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN COMBOBOX IDC_KEYCATEGORY,5,16,130,204,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LISTBOX IDC_COMMAND_LIST,5,32,130,242,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP @@ -274,7 +274,7 @@ IDD_OPTIONS_COLORS DIALOGEX 0, 0, 272, 281 STYLE DS_SETFONT | DS_3DLOOK | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Colours" -FONT 8, "MS Sans Serif", 0, 0, 0x0 +FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN COMBOBOX IDC_COMBO1,15,25,134,109,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP CONTROL "Primary highlight",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,30,91,74,10 @@ -308,7 +308,7 @@ IDD_OPTIONS_MIDI DIALOGEX 0, 0, 272, 281 STYLE DS_SETFONT | DS_3DLOOK | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "MIDI" -FONT 8, "MS Sans Serif", 0, 0, 0x0 +FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN GROUPBOX "MIDI Recording",IDC_STATIC,5,5,260,200 LTEXT "MIDI Input Device:",IDC_STATIC,15,20,67,8 @@ -342,7 +342,7 @@ IDD_LOADRAWSAMPLE DIALOGEX 0, 0, 178, 89 STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Unknown file type" -FONT 8, "MS Sans Serif", 0, 0, 0x0 +FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN DEFPUSHBUTTON "OK",IDOK,66,66,50,14 PUSHBUTTON "Cancel",IDCANCEL,120,66,50,14 @@ -360,7 +360,7 @@ IDD_CONTROL_GLOBALS DIALOGEX 0, 0, 561, 94 STYLE DS_SETFONT | WS_CHILD -FONT 8, "MS Sans Serif", 0, 0, 0x1 +FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN EDITTEXT IDC_EDIT_SONGTITLE,2,3,167,12,ES_AUTOHSCROLL CTEXT "Type EXT, ## channels",IDC_EDIT_MODTYPE,173,3,149,12,SS_CENTERIMAGE,WS_EX_STATICEDGE @@ -406,7 +406,7 @@ IDD_CONTROL_COMMENTS DIALOGEX 0, 0, 435, 119 STYLE DS_SETFONT | WS_CHILD -FONT 8, "MS Sans Serif", 0, 0, 0x1 +FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN EDITTEXT IDC_EDIT_COMMENTS,4,11,426,104,ES_MULTILINE | ES_WANTRETURN | NOT WS_BORDER | WS_VSCROLL | NOT WS_TABSTOP,WS_EX_STATICEDGE LTEXT "Song Message:",IDC_STATIC,4,2,76,8 @@ -414,7 +414,7 @@ IDD_CONTROL_PATTERNS DIALOGEX 0, 0, 585, 114 STYLE DS_SETFONT | WS_CHILD -FONT 8, "MS Sans Serif", 0, 0, 0x1 +FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN CONTROL "Follow Song",IDC_PATTERN_FOLLOWSONG,"Button",BS_AUTOCHECKBOX | BS_FLAT,321,31,55,10 COMBOBOX IDC_COMBO_INSTRUMENT,19,61,96,137,CBS_DROPDOWNLIST | WS_VSCROLL @@ -451,7 +451,7 @@ IDD_CONTROL_SAMPLES DIALOGEX 0, 0, 544, 106 STYLE DS_SETFONT | WS_CHILD -FONT 8, "MS Sans Serif", 0, 0, 0x1 +FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN CONTROL "Toolbar1",IDC_TOOLBAR1,"ToolbarWindow32",WS_GROUP | 0x4d,4,4,55,17 EDITTEXT IDC_EDIT_SAMPLE,90,6,35,12,ES_AUTOHSCROLL | ES_NUMBER @@ -527,7 +527,7 @@ IDD_CONTROL_INSTRUMENTS DIALOGEX 0, 0, 558, 173 STYLE DS_SETFONT | WS_CHILD -FONT 8, "MS Sans Serif", 0, 0, 0x0 +FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN EDITTEXT IDC_EDIT_INSTRUMENT,87,7,29,12,ES_AUTOHSCROLL | ES_NUMBER CONTROL "Spin1",IDC_SPIN_INSTRUMENT,"msctls_updown32",UDS_WRAP | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS | WS_TABSTOP,111,8,11,11 @@ -611,7 +611,7 @@ IDD_MODDOC_MODTYPE DIALOGEX 0, 0, 262, 317 STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Song Properties" -FONT 8, "MS Sans Serif", 0, 0, 0x0 +FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN DEFPUSHBUTTON "OK",IDOK,204,6,50,14 PUSHBUTTON "Cancel",IDCANCEL,204,24,50,14 @@ -649,7 +649,7 @@ IDD_SHOWLOG DIALOG 0, 0, 300, 106 STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_CONTEXTHELP | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Information" -FONT 8, "MS Sans Serif" +FONT 8, "MS Shell Dlg" BEGIN DEFPUSHBUTTON "OK",IDOK,246,7,50,14 PUSHBUTTON "Cancel",IDCANCEL,246,24,50,14 @@ -659,7 +659,7 @@ IDD_REMOVECHANNELS DIALOGEX 0, 0, 171, 220 STYLE DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME CAPTION "Remove Channels" -FONT 8, "MS Sans Serif", 0, 0, 0x0 +FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN DEFPUSHBUTTON "OK",IDOK,54,198,50,14 PUSHBUTTON "Cancel",IDCANCEL,114,198,50,14 @@ -670,7 +670,7 @@ IDD_VIEW_GLOBALS DIALOGEX 0, 0, 471, 337 STYLE DS_SETFONT | DS_3DLOOK | WS_CHILD -FONT 8, "MS Sans Serif", 0, 0, 0x1 +FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN GROUPBOX "Channel 1",IDC_TEXT1,5,18,99,157 EDITTEXT IDC_EDIT9,10,30,89,12,ES_AUTOHSCROLL @@ -770,7 +770,7 @@ IDD_EDIT_FIND DIALOGEX 0, 0, 182, 145 STYLE DS_SETFONT | WS_CHILD | WS_CAPTION CAPTION "Find" -FONT 8, "MS Sans Serif", 0, 0, 0x0 +FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN GROUPBOX "Search for:",IDC_STATIC,4,4,174,107 CONTROL "Note",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,17,31,10 @@ -796,7 +796,7 @@ IDD_EDIT_REPLACE DIALOGEX 0, 0, 182, 145 STYLE DS_SETFONT | WS_CHILD | WS_CAPTION CAPTION "Replace" -FONT 8, "MS Sans Serif", 0, 0, 0x0 +FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN GROUPBOX "",IDC_STATIC,4,4,174,137 CONTROL "Replace By:",IDC_CHECK7,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,15,63,10 @@ -819,7 +819,7 @@ STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_TOOLWINDOW CAPTION "Pattern properties" -FONT 8, "MS Sans Serif", 0, 0, 0x1 +FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN LTEXT "Rows:",IDC_STATIC,10,10,21,8 COMBOBOX IDC_COMBO1,12,19,48,93,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP @@ -834,14 +834,14 @@ STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_TOOLWINDOW CAPTION "Note Properties" -FONT 8, "MS Sans Serif", 0, 0, 0x1 +FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN END IDD_PAGEEDITNOTE DIALOG 0, 0, 220, 34 STYLE DS_SETFONT | DS_CONTROL | WS_CHILD | WS_VISIBLE | WS_CAPTION CAPTION "Note" -FONT 8, "MS Sans Serif" +FONT 8, "MS Shell Dlg" BEGIN LTEXT "Note:",IDC_STATIC,4,4,18,8 LTEXT "Instrument:",IDC_STATIC,74,5,91,8 @@ -852,7 +852,7 @@ IDD_PAGEEDITVOLUME DIALOG 0, 0, 220, 34 STYLE DS_SETFONT | DS_SETFOREGROUND | WS_CHILD | WS_VISIBLE | WS_CAPTION CAPTION "Volume" -FONT 8, "MS Sans Serif" +FONT 8, "MS Shell Dlg" BEGIN LTEXT "Volume Command:",IDC_STATIC,4,4,71,8 LTEXT "Value:",IDC_STATIC,114,4,91,8 @@ -863,7 +863,7 @@ IDD_PAGEEDITEFFECT DIALOGEX 0, 0, 220, 35 STYLE DS_SETFONT | WS_CHILD | WS_CAPTION CAPTION "Effect" -FONT 8, "MS Sans Serif", 0, 0, 0x0 +FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN COMBOBOX IDC_COMBO1,0,15,102,83,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP CONTROL "Slider1",IDC_SLIDER1,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,104,15,114,12 @@ -878,7 +878,7 @@ IDD_SAMPLE_AMPLIFY DIALOGEX 0, 0, 175, 71 STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Amplify" -FONT 8, "MS Sans Serif", 0, 0, 0x0 +FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN LTEXT "Amplify by",IDC_STATIC,13,19,37,8 EDITTEXT IDC_EDIT1,54,16,40,14,ES_AUTOHSCROLL @@ -894,7 +894,7 @@ IDD_SETUP_EQ DIALOGEX 0, 0, 240, 202 STYLE DS_SETFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Equalizer" -FONT 8, "MS Sans Serif", 0, 0, 0x0 +FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN GROUPBOX "",IDC_STATIC,4,3,232,150 LTEXT "+12dB",IDC_STATIC,9,28,22,8 @@ -931,7 +931,7 @@ IDD_OPTIONS_AUTHOR DIALOGEX 0, 0, 214, 151 STYLE DS_SETFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Identification" -FONT 8, "MS Sans Serif", 0, 0, 0x0 +FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN GROUPBOX "Author Information",IDC_STATIC,6,6,202,66 LTEXT "Name:",IDC_STATIC,12,20,25,8 @@ -952,7 +952,7 @@ IDD_SOUNDBANK_INFO DIALOGEX 0, 0, 271, 167 STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Sound Bank Information" -FONT 8, "MS Sans Serif", 0, 0, 0x1 +FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN DEFPUSHBUTTON "Close",IDOK,109,149,50,14 EDITTEXT IDC_EDIT1,7,7,257,138,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_STATICEDGE @@ -961,7 +961,7 @@ IDD_OPTIONS_GENERAL DIALOGEX 0, 0, 272, 279 STYLE DS_SETFONT | DS_3DLOOK | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "General" -FONT 8, "MS Sans Serif", 0, 0, 0x0 +FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN GROUPBOX "Default Directories",IDC_STATIC,6,6,261,102 RTEXT "Songs:",IDC_STATIC_MODDIR,12,18,48,12,SS_CENTERIMAGE @@ -987,7 +987,7 @@ IDD_OPTIONS_SOUNDCARD DIALOGEX 0, 0, 272, 276 STYLE DS_SETFONT | DS_3DLOOK | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Sound Card" -FONT 8, "MS Sans Serif", 0, 0, 0x0 +FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN LTEXT "Sound Device:",IDC_STATIC,11,14,79,8 CONTROL "",IDC_COMBO1,"ComboBoxEx32",CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP,11,25,219,96 @@ -1017,7 +1017,7 @@ STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_TOOLWINDOW CAPTION "Zxx Macros Configuration" -FONT 8, "MS Sans Serif", 0, 0, 0x0 +FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN DEFPUSHBUTTON "OK",IDOK,300,6,50,14 PUSHBUTTON "Cancel",IDCANCEL,300,24,50,14 @@ -1050,7 +1050,7 @@ IDD_CHORDEDIT DIALOGEX 0, 0, 245, 148 STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Chord Editor" -FONT 8, "MS Sans Serif", 0, 0, 0x1 +FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN DEFPUSHBUTTON "Close",IDOK,191,10,50,14 CONTROL "",IDC_KEYBOARD1,"Static",SS_WHITERECT | SS_NOTIFY,4,76,237,56,WS_EX_CLIENTEDGE @@ -1071,7 +1071,7 @@ IDD_LAYER3CONVERT DIALOGEX 0, 0, 280, 202 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "MPEG Layer3 Convert" -FONT 8, "MS Sans Serif", 0, 0, 0x0 +FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN GROUPBOX "",IDC_STATIC,6,6,210,84 DEFPUSHBUTTON "OK",IDOK,222,12,50,14 @@ -1100,14 +1100,14 @@ IDD_SPLASHSCREEN DIALOG 0, 0, 188, 95 STYLE DS_SETFONT | DS_SETFOREGROUND | DS_CENTER | WS_POPUP -FONT 8, "MS Sans Serif" +FONT 8, "MS Shell Dlg" BEGIN CONTROL "",IDC_SPLASH,"Static",SS_WHITERECT,0,0,187,94 END IDD_TREEVIEW DIALOG 0, 0, 85, 266 STYLE DS_SETFONT | WS_CHILD -FONT 8, "MS Sans Serif" +FONT 8, "MS Shell Dlg" BEGIN CONTROL "Tree1",IDC_TREEVIEW,"SysTreeView32",TVS_HASBUTTONS | TVS_HASLINES | WS_BORDER,0,0,85,131 CONTROL "Tree1",IDC_TREEDATA,"SysTreeView32",TVS_HASBUTTONS | TVS_HASLINES | WS_BORDER,0,135,85,131 @@ -1116,7 +1116,7 @@ IDD_MOD2MIDI DIALOGEX 0, 0, 256, 101 STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "MIDI Conversion Setup" -FONT 8, "MS Sans Serif", 0, 0, 0x0 +FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN DEFPUSHBUTTON "OK",IDOK,198,6,50,14 PUSHBUTTON "Cancel",IDCANCEL,198,24,50,14 @@ -1134,7 +1134,7 @@ IDD_SAVEPRESET DIALOGEX 0, 0, 154, 58 STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Save EQ Preset" -FONT 8, "MS Sans Serif", 0, 0, 0x0 +FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN LTEXT "Save As:",IDC_STATIC,6,6,51,8 EDITTEXT IDC_EDIT1,6,18,69,12,ES_AUTOHSCROLL @@ -1147,7 +1147,7 @@ STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_TOOLWINDOW CAPTION "Sample Map" -FONT 8, "MS Sans Serif", 0, 0, 0x1 +FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN DEFPUSHBUTTON "OK",IDOK,232,4,50,14 PUSHBUTTON "Cancel",IDCANCEL,232,22,50,14 @@ -1163,7 +1163,7 @@ IDD_SELECTMIXPLUGIN DIALOGEX 0, 0, 243, 220 STYLE DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME CAPTION "Mix Plugins" -FONT 8, "MS Sans Serif", 0, 0, 0x1 +FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN LTEXT "Filter:",IDC_STATIC_VSTNAMEFILTER,8,9,18,8 EDITTEXT IDC_NAMEFILTER,28,7,152,14,ES_AUTOHSCROLL @@ -1180,14 +1180,14 @@ EXSTYLE WS_EX_TOOLWINDOW | WS_EX_CLIENTEDGE CAPTION "Editor" MENU IDR_PLUGINMENU -FONT 8, "MS Sans Serif", 0, 0, 0x1 +FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN END IDD_SETUP_REVERB DIALOG 0, 0, 240, 156 STYLE DS_SETFONT | WS_CHILD | WS_CAPTION CAPTION "Reverb" -FONT 8, "MS Sans Serif" +FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "",IDC_STATIC,4,3,232,59 GROUPBOX "Early reflections",IDC_STATIC,4,68,78,71 @@ -1222,7 +1222,7 @@ STYLE DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME EXSTYLE WS_EX_TOOLWINDOW | WS_EX_CLIENTEDGE CAPTION "Param Editor" -FONT 8, "MS Sans Serif", 0, 0, 0x1 +FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN EDITTEXT IDC_VISSTATUS,4,91,162,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_STATICEDGE CONTROL "Fill blanks with:",IDC_VISFILLBLANKS,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,188,92,63,10 @@ -1234,7 +1234,7 @@ IDD_SOUNDBANK_INFO1 DIALOGEX 0, 0, 271, 167 STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Sound Bank Information" -FONT 8, "MS Sans Serif", 0, 0, 0x1 +FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN DEFPUSHBUTTON "Close",IDOK,109,149,50,14 EDITTEXT IDC_EDIT1,7,7,257,138,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_STATICEDGE @@ -1243,7 +1243,7 @@ IDD_PITCHSHIFT DIALOGEX 0, 0, 181, 124 STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Time-Stretch Ratio Calculator" -FONT 8, "MS Sans Serif", 0, 0, 0x0 +FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN DEFPUSHBUTTON "OK",IDOK,127,106,50,14 EDITTEXT IDC_SAMPLE_LENGTH_NEW,42,32,40,14,ES_AUTOHSCROLL | ES_NUMBER @@ -1273,7 +1273,7 @@ IDD_OPTIONS_AUTOSAVE DIALOGEX 0, 0, 272, 279 STYLE DS_SETFONT | DS_3DLOOK | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Auto Save" -FONT 8, "MS Sans Serif", 0, 0, 0x0 +FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN CONTROL "Enable Autosave",IDC_AUTOSAVE_ENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,15,70,10 EDITTEXT IDC_AUTOSAVE_INTERVAL,59,29,24,12,ES_AUTOHSCROLL | ES_NUMBER @@ -1298,7 +1298,7 @@ STYLE DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_TOOLWINDOW CAPTION "Go to..." -FONT 8, "MS Sans Serif", 0, 0, 0x0 +FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN RTEXT "Row:",IDC_STATIC,6,9,33,8 EDITTEXT IDC_GOTO_ROW,42,6,40,14,ES_AUTOHSCROLL | ES_NUMBER @@ -1315,7 +1315,7 @@ STYLE DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME EXSTYLE WS_EX_TOOLWINDOW | WS_EX_APPWINDOW CAPTION "Pattern Randomizer - NOT YET FUNCTIONAL" -FONT 8, "MS Sans Serif", 0, 0, 0x1 +FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN PUSHBUTTON "Load",IDC_BUTTON1,112,13,30,14 PUSHBUTTON "Save",IDC_BUTTON2,143,13,30,14 @@ -1329,7 +1329,7 @@ IDD_PATTERNRANDOMIZER_NOTE DIALOGEX 0, 0, 235, 172 STYLE DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD EXSTYLE WS_EX_CONTROLPARENT -FONT 8, "MS Sans Serif", 0, 0, 0x0 +FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN GROUPBOX "",IDC_STATIC,5,5,224,164 CONTROL "Randomize Notes",IDC_RANDOMIZE_NOTE_ENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,4,72,10 @@ -1352,7 +1352,7 @@ IDD_PATTERNRANDOMIZER_INSTRUMENT DIALOGEX 0, 0, 236, 172 STYLE DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD -FONT 8, "MS Sans Serif", 0, 0, 0x0 +FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN GROUPBOX "",-1,5,5,225,164 CONTROL "Randomize Instruments",IDC_RANDOMIZE_NOTE_ENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,4,89,10 @@ -1362,7 +1362,7 @@ IDD_PATTERNRANDOMIZER_VOLCMD DIALOGEX 0, 0, 235, 172 STYLE DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD -FONT 8, "MS Sans Serif", 0, 0, 0x0 +FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN GROUPBOX "",IDC_STATIC,5,5,224,164 CONTROL "Use existing commands.",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON,14,27,92,10 @@ -1402,7 +1402,7 @@ IDD_PATTERNRANDOMIZER_EFFECT DIALOGEX 0, 0, 235, 172 STYLE DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD -FONT 8, "MS Sans Serif", 0, 0, 0x0 +FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN GROUPBOX "",IDC_STATIC,5,5,224,164 CONTROL "Use existing effects.",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON,14,27,79,10 Modified: trunk/OpenMPT/soundlib/Load_it.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_it.cpp 2009-11-28 20:25:33 UTC (rev 429) +++ trunk/OpenMPT/soundlib/Load_it.cpp 2009-11-30 22:11:46 UTC (rev 430) @@ -1217,6 +1217,7 @@ for (UINT nsmp=0; nsmp<pifh->smpnum; nsmp++) if ((smppos[nsmp]) && (smppos[nsmp] <= dwMemLength - sizeof(ITSAMPLESTRUCT))) { ITSAMPLESTRUCT *pis = (ITSAMPLESTRUCT *)(lpStream+smppos[nsmp]); + lastSampleOffset = smppos[nsmp] + sizeof(ITSAMPLESTRUCT); if (pis->id == 0x53504D49) { MODSAMPLE *pSmp = &Samples[nsmp+1]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2009-12-04 19:30:45
|
Revision: 432 http://modplug.svn.sourceforge.net/modplug/?rev=432&view=rev Author: saga-games Date: 2009-12-04 19:30:31 +0000 (Fri, 04 Dec 2009) Log Message: ----------- [New] Two new keymaps: French Laptop by Paul Legovitch, Norwegian MPT Classic by Rakib. [Imp] Changed Buzz colour preset a bit more [Imp] Treeview: Switching between sequences should be easier now. There's a context menu entry for it and double-clicking on an empty sequence will switch to it (as there are no orderlist item to click on). [Ref] Rewrote the treeview GetModItem crap a bit, as it was a lot of redundant code which even differed from function to function (f.e. usage of HIWORD vs. >> 16 shift) Modified Paths: -------------- trunk/OpenMPT/mptrack/Moptions.cpp trunk/OpenMPT/mptrack/View_tre.cpp trunk/OpenMPT/mptrack/View_tre.h trunk/OpenMPT/mptrack/resource.h Added Paths: ----------- trunk/OpenMPT/packageTemplate/extraKeymaps/FR_mpt_laptop_(legovitch).mkb trunk/OpenMPT/packageTemplate/extraKeymaps/NO_mpt_classic_(rakib).mkb Modified: trunk/OpenMPT/mptrack/Moptions.cpp =================================================================== --- trunk/OpenMPT/mptrack/Moptions.cpp 2009-12-01 18:43:53 UTC (rev 431) +++ trunk/OpenMPT/mptrack/Moptions.cpp 2009-12-04 19:30:31 UTC (rev 432) @@ -569,9 +569,9 @@ CustomColors[MODCOLOR_GLOBALS] = RGB(0x66, 0x00, 0x00); CustomColors[MODCOLOR_SAMPLE] = RGB(0x00, 0xFF, 0x00); CustomColors[MODCOLOR_ENVELOPES] = RGB(0xFF, 0x00, 0x00); - CustomColors[MODCOLOR_SEPSHADOW] = RGB(0x9A, 0x87, 0x63); - CustomColors[MODCOLOR_SEPFACE] = RGB(0xE1, 0xDB, 0xD0); - CustomColors[MODCOLOR_SEPHILITE] = RGB(0xFF, 0xFF, 0xFF); + CustomColors[MODCOLOR_SEPSHADOW] = RGB(0xAC, 0xA8, 0xA1); + CustomColors[MODCOLOR_SEPFACE] = RGB(0xD6, 0xD0, 0xC6); + CustomColors[MODCOLOR_SEPHILITE] = RGB(0xEC, 0xE8, 0xE1); CustomColors[MODCOLOR_BLENDCOLOR] = RGB(0xE1, 0xDB, 0xD0); OnPreviewChanged(); } Modified: trunk/OpenMPT/mptrack/View_tre.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_tre.cpp 2009-12-01 18:43:53 UTC (rev 431) +++ trunk/OpenMPT/mptrack/View_tre.cpp 2009-12-04 19:30:31 UTC (rev 432) @@ -75,8 +75,9 @@ ON_COMMAND(ID_MODTREE_UNMUTEALL, OnUnmuteAllTreeItem) ON_COMMAND(ID_MODTREE_DUPLICATE, OnDuplicateTreeItem) ON_COMMAND(ID_MODTREE_INSERT, OnInsertTreeItem) + ON_COMMAND(ID_MODTREE_SWITCHTO, OnSwitchToTreeItem) -// -> CODE#0023 + // -> CODE#0023 // -> DESC="IT project files (.itp)" ON_COMMAND(ID_MODTREE_SETPATH, OnSetItemPath) ON_COMMAND(ID_MODTREE_SAVEITEM, OnSaveItem) @@ -1149,11 +1150,12 @@ { if (hItem) { - uint64 qwItemType = GetModItem(hItem); - DWORD dwItem = (DWORD)(qwItemType >> 16); + const uint64 modItem = GetModItem(hItem); + const uint32 modItemType = GetModItemType(modItem); + uint32 modItemID = GetModItemID(modItem); PMODTREEDOCINFO pInfo = DocInfo[m_nDocNdx]; CModDoc *pModDoc = (pInfo) ? pInfo->pModDoc : NULL; - switch(qwItemType & 0xFFFF) + switch(modItemType) { case MODITEM_COMMENTS: if (pModDoc) pModDoc->ActivateView(IDD_CONTROL_COMMENTS, 0); @@ -1164,25 +1166,25 @@ return TRUE;*/ case MODITEM_ORDER: - if (pModDoc) pModDoc->ActivateView(IDD_CONTROL_PATTERNS, dwItem | 0x8000); + if (pModDoc) pModDoc->ActivateView(IDD_CONTROL_PATTERNS, modItemID | 0x8000); return TRUE; case MODITEM_PATTERN: - if (pModDoc) pModDoc->ActivateView(IDD_CONTROL_PATTERNS, dwItem); + if (pModDoc) pModDoc->ActivateView(IDD_CONTROL_PATTERNS, modItemID); return TRUE; case MODITEM_SAMPLE: - if (pModDoc) pModDoc->ActivateView(IDD_CONTROL_SAMPLES, dwItem); + if (pModDoc) pModDoc->ActivateView(IDD_CONTROL_SAMPLES, modItemID); return TRUE; case MODITEM_INSTRUMENT: - if (pModDoc) pModDoc->ActivateView(IDD_CONTROL_INSTRUMENTS, dwItem); + if (pModDoc) pModDoc->ActivateView(IDD_CONTROL_INSTRUMENTS, modItemID); return TRUE; case MODITEM_MIDIPERCUSSION: - dwItem |= 0x80; + modItemID |= 0x80; case MODITEM_MIDIINSTRUMENT: - OpenMidiInstrument(dwItem); + OpenMidiInstrument(modItemID); return TRUE; case MODITEM_EFFECT: @@ -1201,7 +1203,7 @@ return TRUE; default: - if (qwItemType & 0x8000) + if (modItemType & 0x8000) { PlayItem(hItem); return TRUE; @@ -1217,11 +1219,12 @@ { if (hItem) { - uint64 qwItemType = GetModItem(hItem); - DWORD dwItem = (DWORD)(qwItemType >> 16); + const uint64 modItem = GetModItem(hItem); + const uint32 modItemType = GetModItemType(modItem); + uint32 modItemID = GetModItemID(modItem); PMODTREEDOCINFO pInfo = DocInfo[m_nDocNdx]; CModDoc *pModDoc = (pInfo) ? pInfo->pModDoc : NULL; - switch(qwItemType & 0xFFFF) + switch(modItemType) { case MODITEM_SAMPLE: if (pModDoc) @@ -1233,7 +1236,7 @@ } else { pModDoc->NoteOff(0, TRUE); // cut previous playing samples - pModDoc->PlayNote(nParam & 0x7F, 0, dwItem, FALSE); + pModDoc->PlayNote(nParam & 0x7F, 0, modItemID, FALSE); } } return TRUE; @@ -1248,13 +1251,13 @@ } else { pModDoc->NoteOff(0, TRUE); - pModDoc->PlayNote(nParam, dwItem, 0, FALSE); + pModDoc->PlayNote(nParam, modItemID, 0, FALSE); } } return TRUE; case MODITEM_EFFECT: - if ((pModDoc) && (dwItem < MAX_MIXPLUGINS)) + if ((pModDoc) && (modItemID < MAX_MIXPLUGINS)) {/* CSoundFile *pSndFile = pModDoc->GetSoundFile(); PSNDMIXPLUGIN pPlugin = &pSndFile->m_MixPlugins[dwItem]; @@ -1263,7 +1266,7 @@ CVstPlugin *pVstPlugin = (CVstPlugin *)pPlugin->pMixPlugin; pVstPlugin->ToggleEditor(); }*/ - pModDoc->TogglePluginEditor(dwItem); + pModDoc->TogglePluginEditor(modItemID); } return TRUE; @@ -1280,7 +1283,7 @@ CMainFrame *pMainFrm = CMainFrame::GetMainFrame(); if (pMainFrm) { - if ((qwItemType & 0xFFFF) == MODITEM_INSLIB_INSTRUMENT) + if (modItemType == MODITEM_INSLIB_INSTRUMENT) { pMainFrm->PlaySoundFile(&m_SongFile, n, 0, nParam); } else @@ -1298,34 +1301,34 @@ break; case MODITEM_MIDIPERCUSSION: - dwItem |= 0x80; + modItemID |= 0x80; case MODITEM_MIDIINSTRUMENT: { LPMIDILIBSTRUCT lpMidiLib = CTrackApp::GetMidiLibrary(); - if ((lpMidiLib) && (dwItem < 256) && (lpMidiLib->MidiMap[dwItem])) + if ((lpMidiLib) && (modItemID < 256) && (lpMidiLib->MidiMap[modItemID])) { CMainFrame *pMainFrm = CMainFrame::GetMainFrame(); - if (pMainFrm) pMainFrm->PlaySoundFile(lpMidiLib->MidiMap[dwItem], nParam); + if (pMainFrm) pMainFrm->PlaySoundFile(lpMidiLib->MidiMap[modItemID], nParam); } } break; default: - if (qwItemType & 0x8000) + if (modItemType & 0x8000) { CMainFrame *pMainFrm = CMainFrame::GetMainFrame(); - UINT bank = (qwItemType & 0x3F000000) >> 24; + UINT bank = (modItem & 0x3F000000) >> 24; if ((bank < MAX_DLS_BANKS) && (CTrackApp::gpDLSBanks[bank]) && (pMainFrm)) { CDLSBank *pDLSBank = CTrackApp::gpDLSBanks[bank]; - UINT rgn = 0, instr = (qwItemType & 0x00007FFF); + UINT rgn = 0, instr = (modItem & 0x00007FFF); // Drum - if (qwItemType & 0x80000000) + if (modItem & 0x80000000) { - rgn = (qwItemType & 0x007F0000) >> 16; + rgn = (modItem & 0x007F0000) >> 16; } else // Melodic - if (qwItemType & 0x40000000) + if (modItem & 0x40000000) { if ((!nParam) || (nParam > NOTE_MAX)) nParam = NOTE_MIDDLEC; rgn = pDLSBank->GetRegionFromKey(instr, nParam-1); @@ -1379,63 +1382,65 @@ BOOL CModTree::DeleteTreeItem(HTREEITEM hItem) //-------------------------------------------- { - uint64 qwItemType = GetModItem(hItem); - DWORD dwItem = (DWORD)(qwItemType >> 16); + const uint64 modItem = GetModItem(hItem); + const uint32 modItemType = GetModItemType(modItem); + const uint32 modItemID = GetModItemID(modItem); + PMODTREEDOCINFO pInfo = DocInfo[m_nDocNdx]; CModDoc *pModDoc = (pInfo) ? pInfo->pModDoc : nullptr; CSoundFile *pSndFile = (pModDoc) ? pModDoc->GetSoundFile() : nullptr; - switch(qwItemType & 0xFFFF) + switch(modItemType) { case MODITEM_SEQUENCE: if (pModDoc && pSndFile) { - pSndFile->Order.RemoveSequence((SEQUENCEINDEX)(dwItem & 0xFFFF)); + pSndFile->Order.RemoveSequence((SEQUENCEINDEX)(modItemID & 0xFFFF)); pModDoc->UpdateAllViews(NULL, HINT_MODSEQUENCE, NULL); } break; case MODITEM_ORDER: - if ((pModDoc) && (pModDoc->RemoveOrder((SEQUENCEINDEX)(dwItem >> 16), (ORDERINDEX)(dwItem & 0xFFFF)))) + if ((pModDoc) && (pModDoc->RemoveOrder((SEQUENCEINDEX)(modItemID >> 16), (ORDERINDEX)(modItemID & 0xFFFF)))) { pModDoc->UpdateAllViews(NULL, HINT_MODSEQUENCE, NULL); } break; case MODITEM_PATTERN: - if ((pModDoc) && (pModDoc->RemovePattern((PATTERNINDEX)dwItem))) + if ((pModDoc) && (pModDoc->RemovePattern((PATTERNINDEX)modItemID))) { //pModDoc->UpdateAllViews(NULL, (dwItem << 16)|HINT_PATTERNDATA|HINT_PATNAMES); - pModDoc->UpdateAllViews(NULL, (UINT(dwItem) << HINT_SHIFT_PAT) | HINT_PATTERNDATA|HINT_PATNAMES); + pModDoc->UpdateAllViews(NULL, (UINT(modItemID) << HINT_SHIFT_PAT) | HINT_PATTERNDATA|HINT_PATNAMES); } break; case MODITEM_SAMPLE: - if ((pModDoc) && (pModDoc->RemoveSample((SAMPLEINDEX)dwItem))) + if ((pModDoc) && (pModDoc->RemoveSample((SAMPLEINDEX)modItemID))) { //pModDoc->UpdateAllViews(NULL, (dwItem << 16) | HINT_SMPNAMES|HINT_SAMPLEDATA|HINT_SAMPLEINFO); - pModDoc->UpdateAllViews(NULL, (UINT(dwItem) << HINT_SHIFT_SMP) | HINT_SMPNAMES|HINT_SAMPLEDATA|HINT_SAMPLEINFO); + pModDoc->UpdateAllViews(NULL, (UINT(modItemID) << HINT_SHIFT_SMP) | HINT_SMPNAMES|HINT_SAMPLEDATA|HINT_SAMPLEINFO); } break; case MODITEM_INSTRUMENT: - if ((pModDoc) && (pModDoc->RemoveInstrument((INSTRUMENTINDEX)dwItem))) + if ((pModDoc) && (pModDoc->RemoveInstrument((INSTRUMENTINDEX)modItemID))) { //pModDoc->UpdateAllViews(NULL, (dwItem << 16)|HINT_MODTYPE|HINT_ENVELOPE|HINT_INSTRUMENT); - pModDoc->UpdateAllViews(NULL, (UINT(dwItem) << HINT_SHIFT_INS) | HINT_MODTYPE|HINT_ENVELOPE|HINT_INSTRUMENT); + pModDoc->UpdateAllViews(NULL, (UINT(modItemID) << HINT_SHIFT_INS) | HINT_MODTYPE|HINT_ENVELOPE|HINT_INSTRUMENT); } break; case MODITEM_MIDIINSTRUMENT: - SetMidiInstrument(dwItem, ""); + SetMidiInstrument(modItemID, ""); RefreshMidiLibrary(); break; case MODITEM_MIDIPERCUSSION: - SetMidiPercussion(dwItem, ""); + SetMidiPercussion(modItemID, ""); RefreshMidiLibrary(); break; case MODITEM_DLSBANK_FOLDER: - CTrackApp::RemoveDLSBank(dwItem); + CTrackApp::RemoveDLSBank(modItemID); RefreshDlsBanks(); break; @@ -1463,12 +1468,11 @@ BOOL CModTree::OpenTreeItem(HTREEITEM hItem) //------------------------------------------ { - uint64 qwItemType = GetModItem(hItem); - //DWORD dwItem = dwItemType >> 16; - //PMODTREEDOCINFO pInfo = DocInfo[m_nDocNdx]; - //CModDoc *pModDoc = (pInfo) ? pInfo->pModDoc : NULL; + const uint64 modItem = GetModItem(hItem); + const uint32 modItemType = GetModItemType(modItem); + //const uint32 modItemID = GetModItemID(modItem); - switch(qwItemType & 0xFFFF) + switch(modItemType) { case MODITEM_INSLIB_SONG: { @@ -1908,9 +1912,9 @@ PMODTREEDOCINFO pInfo = DocInfo[m_nDragDocNdx]; pdropinfo->pModDoc = (pInfo) ? pInfo->pModDoc : NULL; pdropinfo->dwDropType = DRAGONDROP_NOTHING; - pdropinfo->dwDropItem = (DWORD)(m_qwItemDrag >> 16); + pdropinfo->dwDropItem = GetModItemID(m_qwItemDrag); pdropinfo->lDropParam = 0; - switch(m_qwItemDrag & 0xFFFF) + switch(GetModItemType(m_qwItemDrag)) { case MODITEM_ORDER: pdropinfo->dwDropType = DRAGONDROP_ORDER; @@ -1991,27 +1995,29 @@ BOOL CModTree::CanDrop(HTREEITEM hItem, BOOL bDoDrop) //--------------------------------------------------- { - uint64 qwItemDrop = GetModItem(hItem); - DWORD dwItemDrag = (DWORD)(m_qwItemDrag >> 16); - DWORD dwDragType = m_qwItemDrag & 0xFFFF; - DWORD dwDropType = (DWORD)(qwItemDrop & 0xFFFF); + const uint64 modItemDrop = GetModItem(hItem); + const uint32 modItemDropType = GetModItemType(modItemDrop); + const uint32 modItemDropID = GetModItemID(modItemDrop); + + const uint32 modItemDragType = GetModItemType(m_qwItemDrag); + const uint32 modItemDragID = GetModItemID(m_qwItemDrag); + PMODTREEDOCINFO pInfo = DocInfo[m_nDocNdx]; CModDoc *pModDoc = (pInfo) ? pInfo->pModDoc : NULL; - qwItemDrop >>= 16; - switch(dwDropType) + switch(modItemDropType) { case MODITEM_ORDER: case MODITEM_SEQUENCE: - if ((dwDragType == MODITEM_ORDER) && (pModDoc) && (m_nDocNdx == m_nDragDocNdx)) + if ((modItemDragType == MODITEM_ORDER) && (pModDoc) && (m_nDocNdx == m_nDragDocNdx)) { if (bDoDrop) { - SEQUENCEINDEX nSeqFrom = (SEQUENCEINDEX)(dwItemDrag >> 16), nSeqTo = (SEQUENCEINDEX)(qwItemDrop >> 16); - ORDERINDEX nOrdFrom = (ORDERINDEX)(dwItemDrag & 0xFFFF), nOrdTo = (ORDERINDEX)(qwItemDrop & 0xFFFF); - if(dwDropType == MODITEM_SEQUENCE) + SEQUENCEINDEX nSeqFrom = (SEQUENCEINDEX)(modItemDragID >> 16), nSeqTo = (SEQUENCEINDEX)(modItemDropID >> 16); + ORDERINDEX nOrdFrom = (ORDERINDEX)(modItemDragID & 0xFFFF), nOrdTo = (ORDERINDEX)(modItemDropID & 0xFFFF); + if(modItemDropType == MODITEM_SEQUENCE) { // drop on sequence -> attach - nSeqTo = (SEQUENCEINDEX)(qwItemDrop & 0xFFFF); + nSeqTo = (SEQUENCEINDEX)(modItemDropID & 0xFFFF); nOrdTo = pModDoc->GetSoundFile()->Order.GetSequence(nSeqTo).GetLengthTailTrimmed(); } @@ -2033,16 +2039,16 @@ case MODITEM_MIDIINSTRUMENT: case MODITEM_MIDIPERCUSSION: - if ((dwDragType == MODITEM_INSLIB_SAMPLE) || (dwDragType == MODITEM_INSLIB_INSTRUMENT)) + if ((modItemDragType == MODITEM_INSLIB_SAMPLE) || (modItemDragType == MODITEM_INSLIB_INSTRUMENT)) { if (bDoDrop) { CHAR szFullPath[_MAX_PATH] = ""; InsLibGetFullPath(m_hItemDrag, szFullPath); - if (dwDropType == MODITEM_MIDIINSTRUMENT) - SetMidiInstrument((DWORD)qwItemDrop, szFullPath); + if (modItemDropType == MODITEM_MIDIINSTRUMENT) + SetMidiInstrument((DWORD)modItemDropID, szFullPath); else - SetMidiPercussion((DWORD)qwItemDrop, szFullPath); + SetMidiPercussion((DWORD)modItemDropID, szFullPath); } return TRUE; } @@ -2171,7 +2177,7 @@ } m_qwItemDrag = GetModItem(m_hItemDrag); m_nDragDocNdx = m_nDocNdx; - switch(m_qwItemDrag & 0xFFFF) + switch(GetModItemType(m_qwItemDrag)) { case MODITEM_ORDER: case MODITEM_PATTERN: @@ -2281,13 +2287,13 @@ { UINT nDefault = 0; BOOL bSep = FALSE; - uint64 qwItemType; - qwItemType = GetModItem(hItem); - const DWORD dwItemNo = (DWORD)(qwItemType >> 16); - qwItemType &= 0xFFFF; + const uint64 modItem = GetModItem(hItem); + const uint32 modItemType = GetModItemType(modItem); + const uint32 modItemID = GetModItemID(modItem); + SelectItem(hItem); - switch(qwItemType) + switch(modItemType) { case MODITEM_COMMENTS: nDefault = ID_MODTREE_EXECUTE; @@ -2299,12 +2305,19 @@ nDefault = ID_MODTREE_EXECUTE; AppendMenu(hMenu, MF_STRING, nDefault, "&Edit Pattern"); AppendMenu(hMenu, MF_STRING, ID_MODTREE_REMOVE, - (qwItemType == MODITEM_ORDER) ? "&Delete from list" : "&Delete Pattern"); + (modItemType == MODITEM_ORDER) ? "&Delete from list" : "&Delete Pattern"); break; case MODITEM_SEQUENCE: - //nDefault = ID_MODTREE_EXECUTE; // don't do it, double-clicking sequences shouldn't switch to the automatically! - //AppendMenu(hMenu, MF_STRING, nDefault, "&Switch to Seqeuence"); + { + CModDoc *pModDoc = GetDocumentFromItem(hItem); + CSoundFile *pSndFile = (pModDoc) ? pModDoc->GetSoundFile() : nullptr; + if(pModDoc && pSndFile && (pModDoc->GetModType() == MOD_TYPE_MPT) && pSndFile->Order.GetSequence((SEQUENCEINDEX)modItemID).GetLength() == 0) + { + nDefault = ID_MODTREE_SWITCHTO; + } + } + AppendMenu(hMenu, MF_STRING, ID_MODTREE_SWITCHTO, "&Switch to Seqeuence"); AppendMenu(hMenu, MF_STRING, ID_MODTREE_INSERT, "&Insert Sequence"); AppendMenu(hMenu, MF_STRING, ID_MODTREE_DUPLICATE, "D&uplicate Sequence"); AppendMenu(hMenu, MF_STRING, ID_MODTREE_REMOVE, "&Delete Sequence"); @@ -2334,7 +2347,7 @@ if ((pModDoc) && (!pModDoc->GetNumInstruments())) { AppendMenu(hMenu, MF_SEPARATOR, NULL, ""); - AppendMenu(hMenu, (pModDoc->IsSampleMuted((SAMPLEINDEX)dwItemNo) ? MF_CHECKED:0)|MF_STRING, ID_MODTREE_MUTE, "&Mute Sample"); + AppendMenu(hMenu, (pModDoc->IsSampleMuted((SAMPLEINDEX)modItemID) ? MF_CHECKED:0)|MF_STRING, ID_MODTREE_MUTE, "&Mute Sample"); AppendMenu(hMenu, MF_STRING, ID_MODTREE_SOLO, "&Solo Sample"); AppendMenu(hMenu, MF_STRING, ID_MODTREE_UNMUTEALL, "&Unmute all"); } @@ -2351,7 +2364,7 @@ if ((pModDoc) && (pModDoc->GetNumInstruments())) { AppendMenu(hMenu, MF_SEPARATOR, NULL, ""); - AppendMenu(hMenu, (pModDoc->IsInstrumentMuted((INSTRUMENTINDEX)dwItemNo) ? MF_CHECKED:0)|MF_STRING, ID_MODTREE_MUTE, "&Mute Instrument"); + AppendMenu(hMenu, (pModDoc->IsInstrumentMuted((INSTRUMENTINDEX)modItemID) ? MF_CHECKED:0)|MF_STRING, ID_MODTREE_MUTE, "&Mute Instrument"); AppendMenu(hMenu, MF_STRING, ID_MODTREE_SOLO, "&Solo Instrument"); AppendMenu(hMenu, MF_STRING, ID_MODTREE_UNMUTEALL, "&Unmute all"); // -> CODE#0023 @@ -2372,7 +2385,7 @@ CModDoc *pModDoc = GetDocumentFromItem(hItem); CSoundFile *pSndFile = pModDoc ? pModDoc->GetSoundFile() : NULL; if (pSndFile) { - PSNDMIXPLUGIN pPlugin = &pSndFile->m_MixPlugins[dwItemNo]; + PSNDMIXPLUGIN pPlugin = &pSndFile->m_MixPlugins[modItemID]; if (pPlugin) { bool bypassed = ((pPlugin->Info.dwInputRouting&MIXPLUG_INPUTF_BYPASS) != 0); AppendMenu(hMenu, (bypassed?MF_CHECKED:0)|MF_STRING, ID_MODTREE_MUTE, "&Bypass"); @@ -2431,7 +2444,7 @@ break; default: - if (qwItemType & 0x8000) + if (modItemType & 0x8000) { nDefault = ID_MODTREE_PLAY; AppendMenu(hMenu, MF_STRING, ID_MODTREE_PLAY, "&Play Instrument"); @@ -2439,9 +2452,9 @@ break; } if (nDefault) SetMenuDefaultItem(hMenu, nDefault, FALSE); - if ((qwItemType == MODITEM_INSLIB_FOLDER) - || (qwItemType == MODITEM_INSLIB_SONG) - || (qwItemType == MODITEM_HDR_INSTRUMENTLIB)) + if ((modItemType == MODITEM_INSLIB_FOLDER) + || (modItemType == MODITEM_INSLIB_SONG) + || (modItemType == MODITEM_HDR_INSTRUMENTLIB)) { if ((bSep) || (nDefault)) AppendMenu(hMenu, MF_SEPARATOR, NULL, ""); AppendMenu(hMenu, (m_bShowAllFiles) ? (MF_STRING|MF_CHECKED) : MF_STRING, ID_MODTREE_SHOWALLFILES, "Show All Files"); @@ -2470,8 +2483,11 @@ HTREEITEM hItem = HitTest(pt, &flags); if (hItem != NULL) { - uint64 qwItem = GetModItem(hItem); - switch(qwItem & 0xFFFF) + const uint64 modItem = GetModItem(hItem); + const uint32 modItemType = GetModItemType(modItem); + const uint32 modItemID = GetModItemID(modItem); + + switch(modItemType) { case MODITEM_INSLIB_FOLDER: case MODITEM_INSLIB_SONG: @@ -2486,8 +2502,8 @@ if (pFrame) { pFrame->SendMessage(WM_MOD_INSTRSELECTED, - ((qwItem & 0xffff) == MODITEM_INSTRUMENT) ? TRUE : FALSE, - (LPARAM)(qwItem >> 16)); + (modItemType == MODITEM_INSTRUMENT) ? TRUE : FALSE, + (LPARAM)modItemID); } } break; @@ -2717,32 +2733,32 @@ //----------------------------- { HTREEITEM hItem = GetSelectedItem(); - uint64 qwItemType; CModDoc *pModDoc; - qwItemType = GetModItem(hItem); - const DWORD dwItemNo = (DWORD)(qwItemType >> 16); - qwItemType &= 0xFFFF; + const uint64 modItem = GetModItem(hItem); + const uint32 modItemType = GetModItemType(modItem); + const uint32 modItemID = GetModItemID(modItem); + pModDoc = GetDocumentFromItem(hItem); if (pModDoc) { - if ((qwItemType == MODITEM_SAMPLE) && (!pModDoc->GetNumInstruments())) + if ((modItemType == MODITEM_SAMPLE) && (!pModDoc->GetNumInstruments())) { - pModDoc->MuteSample((SAMPLEINDEX)dwItemNo, (pModDoc->IsSampleMuted((SAMPLEINDEX)dwItemNo)) ? false : true); + pModDoc->MuteSample((SAMPLEINDEX)modItemID, (pModDoc->IsSampleMuted((SAMPLEINDEX)modItemID)) ? false : true); UpdateView(GetDocumentIDFromModDoc(pModDoc), HINT_SMPNAMES | HINT_SAMPLEINFO); } else - if ((qwItemType == MODITEM_INSTRUMENT) && (pModDoc->GetNumInstruments())) + if ((modItemType == MODITEM_INSTRUMENT) && (pModDoc->GetNumInstruments())) { - pModDoc->MuteInstrument((INSTRUMENTINDEX)dwItemNo, (pModDoc->IsInstrumentMuted((INSTRUMENTINDEX)dwItemNo)) ? false : true); + pModDoc->MuteInstrument((INSTRUMENTINDEX)modItemID, (pModDoc->IsInstrumentMuted((INSTRUMENTINDEX)modItemID)) ? false : true); UpdateView(GetDocumentIDFromModDoc(pModDoc), HINT_INSNAMES | HINT_INSTRUMENT); } - if ((qwItemType == MODITEM_EFFECT)) + if ((modItemType == MODITEM_EFFECT)) { CSoundFile *pSndFile = pModDoc ? pModDoc->GetSoundFile() : NULL; if (pSndFile) { - PSNDMIXPLUGIN pPlugin = &pSndFile->m_MixPlugins[dwItemNo]; + PSNDMIXPLUGIN pPlugin = &pSndFile->m_MixPlugins[modItemID]; if (pPlugin) { CVstPlugin *pVstPlugin = (CVstPlugin *)pPlugin->pMixPlugin; if (pVstPlugin) pVstPlugin->Bypass(); @@ -2758,29 +2774,29 @@ //----------------------------- { HTREEITEM hItem = GetSelectedItem(); - uint64 qwItemType; CModDoc *pModDoc; - qwItemType = GetModItem(hItem); - const DWORD dwItemNo = (DWORD)(qwItemType >> 16); - qwItemType &= 0xFFFF; + const uint64 modItem = GetModItem(hItem); + const uint32 modItemType = GetModItemType(modItem); + const uint32 modItemID = GetModItemID(modItem); + pModDoc = GetDocumentFromItem(hItem); if (pModDoc) { INSTRUMENTINDEX nInstruments = pModDoc->GetNumInstruments(); - if ((qwItemType == MODITEM_SAMPLE) && (!nInstruments)) + if ((modItemType == MODITEM_SAMPLE) && (!nInstruments)) { for (SAMPLEINDEX nSmp = 1; nSmp <= pModDoc->GetNumSamples(); nSmp++) { - pModDoc->MuteSample(nSmp, (nSmp == dwItemNo) ? false : true); + pModDoc->MuteSample(nSmp, (nSmp == modItemID) ? false : true); UpdateView(GetDocumentIDFromModDoc(pModDoc), HINT_SMPNAMES | HINT_SAMPLEINFO); } } else - if ((qwItemType == MODITEM_INSTRUMENT) && (nInstruments)) + if ((modItemType == MODITEM_INSTRUMENT) && (nInstruments)) { for (INSTRUMENTINDEX nIns = 1; nIns <= nInstruments; nIns++) { - pModDoc->MuteInstrument(nIns, (nIns == dwItemNo) ? false : true); + pModDoc->MuteInstrument(nIns, (nIns == modItemID) ? false : true); UpdateView(GetDocumentIDFromModDoc(pModDoc), HINT_INSNAMES | HINT_INSTRUMENT); } } @@ -2792,14 +2808,16 @@ //---------------------------------- { HTREEITEM hItem = GetSelectedItem(); - uint64 qwItemType; CModDoc *pModDoc; - qwItemType = GetModItem(hItem) & 0xFFFF; + const uint64 modItem = GetModItem(hItem); + const uint32 modItemType = GetModItemType(modItem); + //const uint32 modItemID = GetModItemID(modItem); + pModDoc = GetDocumentFromItem(hItem); if (pModDoc) { - if ((qwItemType == MODITEM_SAMPLE) || (qwItemType == MODITEM_INSTRUMENT)) + if ((modItemType == MODITEM_SAMPLE) || (modItemType == MODITEM_INSTRUMENT)) { for (SAMPLEINDEX nSmp = 1; nSmp <= pModDoc->GetNumSamples(); nSmp++) { @@ -2820,19 +2838,18 @@ //---------------------------------- { HTREEITEM hItem = GetSelectedItem(); - uint64 qwItemType; CModDoc *pModDoc; - qwItemType = GetModItem(hItem); - const DWORD dwItemNo = (DWORD)(qwItemType >> 16); - qwItemType &= 0xFFFF; + const uint64 modItem = GetModItem(hItem); + const uint32 modItemType = GetModItemType(modItem); + const uint32 modItemID = GetModItemID(modItem); pModDoc = GetDocumentFromItem(hItem); CSoundFile *pSndFile = (pModDoc) ? pModDoc->GetSoundFile() : nullptr; - if (pModDoc && pSndFile && ((qwItemType == MODITEM_SEQUENCE) || (qwItemType == MODITEM_HDR_ORDERS))) + if (pModDoc && pSndFile && ((modItemType == MODITEM_SEQUENCE) || (modItemType == MODITEM_HDR_ORDERS))) { - pSndFile->Order.SetSequence((SEQUENCEINDEX)dwItemNo); + pSndFile->Order.SetSequence((SEQUENCEINDEX)modItemID); pSndFile->Order.AddSequence(true); UpdateView(GetDocumentIDFromModDoc(pModDoc), HINT_SEQNAMES|HINT_MODSEQUENCE); pModDoc->UpdateAllViews(NULL, HINT_SEQNAMES|HINT_MODSEQUENCE); @@ -2844,15 +2861,16 @@ //------------------------------- { HTREEITEM hItem = GetSelectedItem(); - uint64 qwItemType; CModDoc *pModDoc; - qwItemType = GetModItem(hItem) & 0xFFFF; + const uint64 modItem = GetModItem(hItem); + const uint32 modItemType = GetModItemType(modItem); + //const uint32 modItemID = GetModItemID(modItem); pModDoc = GetDocumentFromItem(hItem); CSoundFile *pSndFile = (pModDoc) ? pModDoc->GetSoundFile() : nullptr; - if (pModDoc && pSndFile && ((qwItemType == MODITEM_SEQUENCE) || (qwItemType == MODITEM_HDR_ORDERS))) + if (pModDoc && pSndFile && ((modItemType == MODITEM_SEQUENCE) || (modItemType == MODITEM_HDR_ORDERS))) { pSndFile->Order.AddSequence(false); UpdateView(GetDocumentIDFromModDoc(pModDoc), HINT_SEQNAMES|HINT_MODSEQUENCE); @@ -2860,21 +2878,39 @@ } } +void CModTree::OnSwitchToTreeItem() +//--------------------------------- +{ + HTREEITEM hItem = GetSelectedItem(); + CModDoc *pModDoc; + const uint64 modItem = GetModItem(hItem); + const uint32 modItemType = GetModItemType(modItem); + const uint32 modItemID = GetModItemID(modItem); + + pModDoc = GetDocumentFromItem(hItem); + + if (pModDoc && (modItemType == MODITEM_SEQUENCE)) + { + pModDoc->ActivateView(IDD_CONTROL_PATTERNS, (modItemID << 16) | 0x8000); + } +} + // -> CODE#0023 // -> DESC="IT project files (.itp)" void CModTree::OnSetItemPath() //---------------------------- { HTREEITEM hItem = GetSelectedItem(); - uint64 qwItemType = GetModItem(hItem); - DWORD dwItem = (DWORD)(qwItemType >> 16); - qwItemType &= 0xFFFF; CModDoc *pModDoc = GetDocumentFromItem(hItem); CSoundFile *pSndFile = pModDoc ? pModDoc->GetSoundFile() : NULL; - if(pSndFile && dwItem){ + const uint64 modItem = GetModItem(hItem); + //const uint32 modItemType = GetModItemType(modItem); + const uint32 modItemID = GetModItemID(modItem); + if(pSndFile && modItemID){ + CHAR pszFileNames[_MAX_PATH]; CFileDialog dlg(TRUE, NULL, NULL, OFN_FILEMUSTEXIST|OFN_PATHMUSTEXIST|OFN_FORCESHOWHIDDEN, @@ -2887,7 +2923,7 @@ dlg.m_ofn.nMaxFile = _MAX_PATH; if(dlg.DoModal() == IDOK){ - strcpy(pSndFile->m_szInstrumentPath[dwItem-1], pszFileNames); + strcpy(pSndFile->m_szInstrumentPath[modItemID - 1], pszFileNames); OnRefreshTree(); } @@ -2900,15 +2936,16 @@ //------------------------- { HTREEITEM hItem = GetSelectedItem(); - uint64 qwItemType = GetModItem(hItem); - const DWORD dwItem = HIWORD(qwItemType); - qwItemType &= 0xFFFF; CModDoc *pModDoc = GetDocumentFromItem(hItem); CSoundFile *pSndFile = pModDoc ? pModDoc->GetSoundFile() : NULL; - if(pSndFile && dwItem){ + const uint64 modItem = GetModItem(hItem); + //const uint32 modItemType = GetModItemType(modItem); + const uint32 modItemID = GetModItemID(modItem); - if(pSndFile->m_szInstrumentPath[dwItem-1][0] == '\0'){ + if(pSndFile && modItemID){ + + if(pSndFile->m_szInstrumentPath[modItemID - 1][0] == '\0'){ CHAR pszFileNames[_MAX_PATH]; CFileDialog dlg(FALSE, (pSndFile->m_nType & (MOD_TYPE_IT|MOD_TYPE_MPT)) ? "iti" : "xi", NULL, @@ -2924,23 +2961,23 @@ dlg.m_ofn.lpstrFile = pszFileNames; dlg.m_ofn.nMaxFile = _MAX_PATH; - if(dlg.DoModal() == IDOK) strcpy(pSndFile->m_szInstrumentPath[dwItem - 1], pszFileNames); + if(dlg.DoModal() == IDOK) strcpy(pSndFile->m_szInstrumentPath[modItemID - 1], pszFileNames); dlg.m_ofn.lpstrFile = NULL; dlg.m_ofn.nMaxFile = 0; } - if(pSndFile->m_szInstrumentPath[dwItem - 1][0] != '\0'){ - int size = strlen(pSndFile->m_szInstrumentPath[dwItem - 1]); - BOOL iti = _stricmp(&pSndFile->m_szInstrumentPath[dwItem - 1][size-3],"iti") == 0; - BOOL xi = _stricmp(&pSndFile->m_szInstrumentPath[dwItem - 1][size-2],"xi") == 0; + if(pSndFile->m_szInstrumentPath[modItemID - 1][0] != '\0'){ + int size = strlen(pSndFile->m_szInstrumentPath[modItemID - 1]); + BOOL iti = _stricmp(&pSndFile->m_szInstrumentPath[modItemID - 1][size-3],"iti") == 0; + BOOL xi = _stricmp(&pSndFile->m_szInstrumentPath[modItemID - 1][size-2],"xi") == 0; if(iti || (!iti && !xi && pSndFile->m_nType & (MOD_TYPE_IT|MOD_TYPE_MPT))) - pSndFile->SaveITIInstrument((INSTRUMENTINDEX)dwItem, pSndFile->m_szInstrumentPath[dwItem - 1]); + pSndFile->SaveITIInstrument((INSTRUMENTINDEX)modItemID, pSndFile->m_szInstrumentPath[modItemID - 1]); if(xi || (!xi && !iti && pSndFile->m_nType == MOD_TYPE_XM)) - pSndFile->SaveXIInstrument((INSTRUMENTINDEX)dwItem, pSndFile->m_szInstrumentPath[dwItem - 1]); + pSndFile->SaveXIInstrument((INSTRUMENTINDEX)modItemID, pSndFile->m_szInstrumentPath[modItemID - 1]); - pSndFile->instrumentModified[dwItem - 1] = FALSE; + pSndFile->instrumentModified[modItemID - 1] = FALSE; } if(pModDoc) pModDoc->UpdateAllViews(NULL, HINT_MODTYPE); @@ -2999,8 +3036,12 @@ { UINT flags; HTREEITEM hItem = HitTest(point, &flags); - uint64 qwItemType = GetModItem(hItem); - switch(qwItemType & 0xFFFF) + + const uint64 modItem = GetModItem(hItem); + const uint32 modItemType = GetModItemType(modItem); + //const uint32 modItemID = GetModItemID(modItem); + + switch(modItemType) { case MODITEM_MIDIINSTRUMENT: case MODITEM_MIDIPERCUSSION: @@ -3010,7 +3051,7 @@ EnsureVisible(hItem); } m_hItemDrag = hItem; - m_qwItemDrag = qwItemType; + m_qwItemDrag = modItem; return DROPEFFECT_LINK; // Folders: case MODITEM_HDR_MIDILIB: @@ -3118,10 +3159,14 @@ //------------------------------------ { HTREEITEM hItem = GetSelectedItem(); - uint64 qwItemType = GetModItem(hItem); - if ((qwItemType & 0xFFFF) == MODITEM_DLSBANK_FOLDER) + + const uint64 modItem = GetModItem(hItem); + const uint32 modItemType = GetModItemType(modItem); + const uint32 modItemID = GetModItemID(modItem); + + if ((modItemType & 0xFFFF) == MODITEM_DLSBANK_FOLDER) { - UINT nBank = (UINT)(qwItemType >> 16); + UINT nBank = modItemID; if ((nBank < MAX_DLS_BANKS) && (CTrackApp::gpDLSBanks[nBank])) { CSoundBankProperties dlg(CTrackApp::gpDLSBanks[nBank], this); Modified: trunk/OpenMPT/mptrack/View_tre.h =================================================================== --- trunk/OpenMPT/mptrack/View_tre.h 2009-12-01 18:43:53 UTC (rev 431) +++ trunk/OpenMPT/mptrack/View_tre.h 2009-12-04 19:30:31 UTC (rev 432) @@ -142,6 +142,8 @@ VOID EmptyInstrumentLibrary(); VOID FillInstrumentLibrary(); uint64 GetModItem(HTREEITEM hItem); + inline uint32 GetModItemType(const uint64 modItem) {return static_cast<uint32>(modItem & 0xFFFF);}; // return "item type" part of mod item variable ( & 0xFFFF ) + inline uint32 GetModItemID(const uint64 modItem) {return static_cast<uint32>(modItem >> 16);}; // return "item ID" part of mod item variable ( >> 16 ) BOOL SetMidiInstrument(UINT nIns, LPCSTR lpszFileName); BOOL SetMidiPercussion(UINT nPerc, LPCSTR lpszFileName); BOOL ExecuteItem(HTREEITEM hItem); @@ -206,6 +208,7 @@ afx_msg void OnUnmuteAllTreeItem(); afx_msg void OnDuplicateTreeItem(); afx_msg void OnInsertTreeItem(); + afx_msg void OnSwitchToTreeItem(); // hack for sequence items to avoid double-click action // -> CODE#0023 // -> DESC="IT project files (.itp)" Modified: trunk/OpenMPT/mptrack/resource.h =================================================================== --- trunk/OpenMPT/mptrack/resource.h 2009-12-01 18:43:53 UTC (rev 431) +++ trunk/OpenMPT/mptrack/resource.h 2009-12-04 19:30:31 UTC (rev 432) @@ -1155,6 +1155,7 @@ #define ID_EDIT_PASTEFLOOD 59235 #define ID_MODTREE_DUPLICATE 59236 #define ID_MODTREE_INSERT 59237 +#define ID_MODTREE_SWITCHTO 59238 // Next default values for new objects // @@ -1162,7 +1163,7 @@ #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_3D_CONTROLS 1 #define _APS_NEXT_RESOURCE_VALUE 523 -#define _APS_NEXT_COMMAND_VALUE 59238 +#define _APS_NEXT_COMMAND_VALUE 59239 #define _APS_NEXT_CONTROL_VALUE 2412 #define _APS_NEXT_SYMED_VALUE 901 #endif Added: trunk/OpenMPT/packageTemplate/extraKeymaps/FR_mpt_laptop_(legovitch).mkb =================================================================== --- trunk/OpenMPT/packageTemplate/extraKeymaps/FR_mpt_laptop_(legovitch).mkb (rev 0) +++ trunk/OpenMPT/packageTemplate/extraKeymaps/FR_mpt_laptop_(legovitch).mkb 2009-12-04 19:30:31 UTC (rev 432) @@ -0,0 +1,327 @@ +//-------- OpenMPT key binding definition file ------- +//-Format is: - +//- Context:Command ID:Modifiers:Key:KeypressEventType //Comments - +//---------------------------------------------------------------------- +version:1 + +//----( Global Context (0) )------------ +0:1347:2:78:1 //File/New: Ctrl+N (KeyDown) +0:1346:2:79:1 //File/Open: Ctrl+O (KeyDown) +0:1348:2:87:1 //File/Close: Ctrl+W (KeyDown) +0:1349:2:83:1 //File/Save: Ctrl+S (KeyDown) +0:1350:3:83:1 //File/Save As: Shift+Ctrl+S (KeyDown) +0:1693:6:37:1 //Previous Document: Ctrl+Alt+GAUCHE (KeyDown) +0:1694:6:39:1 //Next Document: Ctrl+Alt+DROITE (KeyDown) +0:1030:0:114:1 //Play song/Pause song: F3 (KeyDown) +0:1375:0:27:1 //Stop Song: ECHAP (KeyDown) +0:1026:0:115:1 //Play pattern from cursor: F4 (KeyDown) +0:1359:2:90:1 //Undo: Ctrl+Z (KeyDown) +0:1360:2:88:1 //Cut: Ctrl+X (KeyDown) +0:1361:2:67:1 //Copy: Ctrl+C (KeyDown) +0:1361:2:45:1 //Copy: Ctrl+INS (KeyDown) +0:1362:2:86:1 //Paste: Ctrl+V (KeyDown) +0:1362:1:45:1 //Paste: Shift+INS (KeyDown) +0:1363:6:86:1 //Mix Paste: Ctrl+Alt+V (KeyDown) +0:1793:7:86:1 //Paste Flood: Shift+Ctrl+Alt+V (KeyDown) +0:1364:2:53:1 //SelectAll: Ctrl+( (KeyDown) +0:1365:2:70:1 //Find: Ctrl+F (KeyDown) +0:1366:6:70:1 //Find Next: Ctrl+Alt+F (KeyDown) +0:1021:0:116:1 //View General: F5 (KeyDown) +0:1022:0:117:1 //View Pattern: F6 (KeyDown) +0:1023:0:118:1 //View Samples: F7 (KeyDown) +0:1024:0:119:1 //View Instruments: F8 (KeyDown) +0:1025:0:120:1 //View Comments: F9 (KeyDown) +0:1769:1:121:1 //View Graph: Shift+F10 (KeyDown) +0:1367:6:87:1 //Toggle Main View: Ctrl+Alt+W (KeyDown) +0:1368:0:112:1 //Toggle Tree View: F1 (KeyDown) +0:1369:2:112:1 //View Options: Ctrl+F1 (KeyDown) +0:1670:2:116:1 //View Channel Manager: Ctrl+F5 (KeyDown) +0:1669:2:117:1 //View Plugin Manager: Ctrl+F6 (KeyDown) +0:1775:6:112:1 //Show song properties window: Ctrl+Alt+F1 (KeyDown) +0:1032:2:38:1 //Previous instrument: Ctrl+HAUT (KeyDown) +0:1033:2:40:1 //Next instrument: Ctrl+BAS (KeyDown) +0:1036:0:122:1 //Previous octave: F11 (KeyDown) +0:1037:0:123:1 //Next octave: F12 (KeyDown) +0:1034:2:37:5 //Previous order: Ctrl+GAUCHE (KeyDown|KeyHold) +0:1035:2:39:5 //Next order: Ctrl+DROITE (KeyDown|KeyHold) + +//----( General Context [bottom] (1) )------------ + +//----( Pattern Context [bottom] (2) )------------ +2:1017:0:34:1 //Jump down by measure: PG.SUIV (KeyDown) +2:1018:0:33:1 //Jump up by measure: PG.PREC (KeyDown) +2:1338:4:34:1 //Jump down by beat: Alt+PG.SUIV (KeyDown) +2:1339:4:33:1 //Jump up by beat: Alt+PG.PREC (KeyDown) +2:1340:6:34:5 //Snap down to beat: Ctrl+Alt+PG.SUIV (KeyDown|KeyHold) +2:1341:6:33:5 //Snap up to beat: Ctrl+Alt+PG.PREC (KeyDown|KeyHold) +2:1038:0:40:5 //Navigate down by 1 row: BAS (KeyDown|KeyHold) +2:1039:0:38:5 //Navigate up by 1 row: HAUT (KeyDown|KeyHold) +2:1691:4:167:5 //Navigate down by spacing: Alt+ (KeyDown|KeyHold) +2:1692:4:166:5 //Navigate up by spacing: Alt+ (KeyDown|KeyHold) +2:1040:0:37:5 //Navigate left: GAUCHE (KeyDown|KeyHold) +2:1041:0:39:5 //Navigate right: DROITE (KeyDown|KeyHold) +2:1042:0:9:1 //Navigate to next channel: TAB (KeyDown) +2:1042:0:167:1 //Navigate to next channel: (KeyDown) +2:1043:1:9:1 //Navigate to previous channel: Shift+TAB (KeyDown) +2:1043:0:166:1 //Navigate to previous channel: (KeyDown) +2:1044:2:36:1 //Go to first channel: Ctrl+ORIGINE (KeyDown) +2:1045:0:36:1 //Go to first row: ORIGINE (KeyDown) +2:1046:6:36:1 //Go to first row of first channel: Ctrl+Alt+ORIGINE (KeyDown) +2:1047:2:35:1 //Go to last channel: Ctrl+FIN (KeyDown) +2:1048:0:35:1 //Go to last row: FIN (KeyDown) +2:1049:6:35:1 //Go to last row of last channel: Ctrl+Alt+FIN (KeyDown) +2:1050:1:16:1 //Selection key: Shift+MAJ (KeyDown) +2:1011:2:76:1 //Select channel / Select all: Ctrl+L (KeyDown) +2:1663:0:32:1 //Toggle follow song: ESPACE (KeyDown) +2:1003:0:13:1 //Quick copy: ENTREE (KeyDown) +2:1004:1:13:1 //Quick paste: Shift+ENTREE (KeyDown) +2:1001:2:32:1 //Enable recording: Ctrl+ESPACE (KeyDown) +2:1002:2:13:5 //Play row: Ctrl+ENTREE (KeyDown|KeyHold) +2:1317:4:18:1 //Set row jump on note entry: Alt (KeyDown) +2:1685:2:9:1 //Switch to order list: Ctrl+TAB (KeyDown) +2:1806:2:68:1 //Duplicate pattern: Ctrl+D (KeyDown) +2:1662:6:80:1 //Toggle channel's plugin editor: Ctrl+Alt+P (KeyDown) +2:1062:0:255:1 //Show note properties: (KeyDown) +2:1776:4:32:1 //Toggle loop pattern: Alt+ESPACE (KeyDown) +2:1006:0:113:1 //Solo current channel: F2 (KeyDown) +2:1778:2:113:1 //Unmute all channels on pattern transition: Ctrl+F2 (KeyDown) +2:1779:1:113:1 //Solo channel on pattern transition: Shift+F2 (KeyDown) +2:1007:2:65:5 //Transpose +1: Ctrl+A (KeyDown|KeyHold) +2:1008:2:81:1 //Transpose -1: Ctrl+Q (KeyDown) +2:1009:6:65:5 //Transpose +12: Ctrl+Alt+A (KeyDown|KeyHold) +2:1010:6:81:5 //Transpose -12: Ctrl+Alt+Q (KeyDown|KeyHold) +2:1012:2:77:1 //Amplify selection: Ctrl+M (KeyDown) +2:1014:2:74:1 //Interpolate volume: Ctrl+J (KeyDown) +2:1015:2:75:1 //Interpolate effect: Ctrl+K (KeyDown) +2:1016:4:66:1 //Open effect visualizer: Alt+B (KeyDown) +2:1013:2:73:1 //Apply current instrument: Ctrl+I (KeyDown) +2:1660:4:69:5 //Grow selection: Alt+E (KeyDown|KeyHold) +2:1661:4:68:5 //Shrink selection: Alt+D (KeyDown|KeyHold) +2:1057:2:46:1 //Clear row: Ctrl+SUPPR (KeyDown) +2:1058:1:46:1 //Clear field: Shift+SUPPR (KeyDown) +2:1664:0:46:1 //Clear field (IT Style): SUPPR (KeyDown) +2:1059:3:46:1 //Clear row and step: Shift+Ctrl+SUPPR (KeyDown) +2:1061:0:8:1 //Delete rows: RET.ARR (KeyDown) +2:1377:4:8:5 //Delete all rows: Alt+RET.ARR (KeyDown|KeyHold) +2:1378:0:45:1 //Insert Row: INS (KeyDown) +2:1379:4:45:1 //Insert All Rows: Alt+INS (KeyDown) +2:1055:2:166:5 //Previous pattern: Ctrl+ (KeyDown|KeyHold) +2:1054:2:167:5 //Next pattern: Ctrl+ (KeyDown|KeyHold) + +//----( Pattern Context [bottom] - Note Col (3) )------------ +3:1064:0:65:1 //Base octave C: A (KeyDown) +3:1065:0:90:1 //Base octave C#: Z (KeyDown) +3:1066:0:69:1 //Base octave D: E (KeyDown) +3:1067:0:82:1 //Base octave D#: R (KeyDown) +3:1068:0:84:1 //Base octave E: T (KeyDown) +3:1069:0:89:1 //Base octave F: Y (KeyDown) +3:1070:0:85:1 //Base octave F#: U (KeyDown) +3:1071:0:73:1 //Base octave G: I (KeyDown) +3:1072:0:79:1 //Base octave G#: O (KeyDown) +3:1073:0:80:1 //Base octave A: P (KeyDown) +3:1074:0:221:1 //Base octave A#: ACCENT CIRCONFLEXE (KeyDown) +3:1075:0:186:1 //Base octave B: $ (KeyDown) +3:1076:0:81:1 //Base octave +1 C: Q (KeyDown) +3:1077:0:83:1 //Base octave +1 C#: S (KeyDown) +3:1078:0:68:1 //Base octave +1 D: D (KeyDown) +3:1079:0:70:1 //Base octave +1 D#: F (KeyDown) +3:1080:0:71:1 //Base octave +1 E: G (KeyDown) +3:1081:0:72:1 //Base octave +1 F: H (KeyDown) +3:1082:0:74:1 //Base octave +1 F#: J (KeyDown) +3:1083:0:75:1 //Base octave +1 G: K (KeyDown) +3:1084:0:76:1 //Base octave +1 G#: L (KeyDown) +3:1085:0:77:1 //Base octave +1 A: M (KeyDown) +3:1086:0:192:1 //Base octave +1 A#: \xF9 (KeyDown) +3:1087:0:220:1 //Base octave +1 B: * (KeyDown) +3:1088:0:87:1 //Base octave +2 C: W (KeyDown) +3:1089:0:88:1 //Base octave +2 C#: X (KeyDown) +3:1090:0:67:1 //Base octave +2 D: C (KeyDown) +3:1091:0:86:1 //Base octave +2 D#: V (KeyDown) +3:1092:0:66:1 //Base octave +2 E: B (KeyDown) +3:1093:0:78:1 //Base octave +2 F: N (KeyDown) +3:1094:0:188:1 //Base octave +2 F#: , (KeyDown) +3:1095:0:190:1 //Base octave +2 G: ; (KeyDown) +3:1096:0:191:1 //Base octave +2 G#: : (KeyDown) +3:1097:0:223:1 //Base octave +2 A: ! (KeyDown) +3:1212:0:48:1 //Set octave 0: \xE0 (KeyDown) +3:1212:0:96:1 //Set octave 0: 0 (PAVE NUM.) (KeyDown) +3:1213:0:49:1 //Set octave 1: & (KeyDown) +3:1214:0:50:1 //Set octave 2: \xE9 (KeyDown) +3:1215:0:51:1 //Set octave 3: " (KeyDown) +3:1216:0:52:1 //Set octave 4: ' (KeyDown) +3:1217:0:53:1 //Set octave 5: ( (KeyDown) +3:1218:0:54:1 //Set octave 6: - (KeyDown) +3:1219:0:55:1 //Set octave 7: \xE8 (KeyDown) +3:1220:0:56:1 //Set octave 8: _ (KeyDown) +3:1221:0:57:1 //Set octave 9: \xE7 (KeyDown) +3:1316:1:16:1 //Chord Modifier: Shift+MAJ (KeyDown) +3:1200:1:219:1 //Note Cut: Shift+) (KeyDown) +3:1201:1:187:1 //Note Off: Shift+= (KeyDown) +3:1791:3:219:1 //Note Fade: Shift+Ctrl+) (KeyDown) +3:1667:0:219:1 //Note Cut (don't remember instrument): ) (KeyDown) +3:1668:0:187:1 //Note Off (don't remember instrument): = (KeyDown) +3:1792:2:219:1 //Note Fade (don't remember instrument): Ctrl+) (KeyDown) +3:1788:0:222:1 //Parameter control(MPTm only): \xB2 (KeyDown) +3:1789:1:222:1 //Parameter control(smooth)(MPTm only): Shift+\xB2 (KeyDown) + +//----( Pattern Context [bottom] - Ins Col (4) )------------ +4:1202:0:96:1 //Set instrument digit 0: 0 (PAVE NUM.) (KeyDown) +4:1202:0:48:1 //Set instrument digit 0: \xE0 (KeyDown) +4:1203:0:97:1 //Set instrument digit 1: 1 (PAVE NUM.) (KeyDown) +4:1203:0:49:1 //Set instrument digit 1: & (KeyDown) +4:1204:0:98:1 //Set instrument digit 2: 2 (PAVE NUM.) (KeyDown) +4:1204:0:50:1 //Set instrument digit 2: \xE9 (KeyDown) +4:1205:0:99:1 //Set instrument digit 3: 3 (PAVE NUM.) (KeyDown) +4:1205:0:51:1 //Set instrument digit 3: " (KeyDown) +4:1206:0:100:1 //Set instrument digit 4: 4 (PAVE NUM.) (KeyDown) +4:1206:0:52:1 //Set instrument digit 4: ' (KeyDown) +4:1207:0:101:1 //Set instrument digit 5: 5 (PAVE NUM.) (KeyDown) +4:1207:0:53:1 //Set instrument digit 5: ( (KeyDown) +4:1208:0:102:1 //Set instrument digit 6: 6 (PAVE NUM.) (KeyDown) +4:1208:0:54:1 //Set instrument digit 6: - (KeyDown) +4:1209:0:103:1 //Set instrument digit 7: 7 (PAVE NUM.) (KeyDown) +4:1209:0:55:1 //Set instrument digit 7: \xE8 (KeyDown) +4:1210:0:104:1 //Set instrument digit 8: 8 (PAVE NUM.) (KeyDown) +4:1211:0:105:1 //Set instrument digit 9: 9 (PAVE NUM.) (KeyDown) +4:1211:0:57:1 //Set instrument digit 9: \xE7 (KeyDown) + +//----( Pattern Context [bottom] - Vol Col (5) )------------ +5:1222:0:48:1 //Set volume digit 0: \xE0 (KeyDown) +5:1222:0:96:1 //Set volume digit 0: 0 (PAVE NUM.) (KeyDown) +5:1223:0:49:1 //Set volume digit 1: & (KeyDown) +5:1223:0:97:1 //Set volume digit 1: 1 (PAVE NUM.) (KeyDown) +5:1224:0:50:1 //Set volume digit 2: \xE9 (KeyDown) +5:1224:0:98:1 //Set volume digit 2: 2 (PAVE NUM.) (KeyDown) +5:1225:0:51:1 //Set volume digit 3: " (KeyDown) +5:1225:0:99:1 //Set volume digit 3: 3 (PAVE NUM.) (KeyDown) +5:1226:0:52:1 //Set volume digit 4: ' (KeyDown) +5:1226:0:100:1 //Set volume digit 4: 4 (PAVE NUM.) (KeyDown) +5:1227:0:53:1 //Set volume digit 5: ( (KeyDown) +5:1227:0:101:1 //Set volume digit 5: 5 (PAVE NUM.) (KeyDown) +5:1228:0:54:1 //Set volume digit 6: - (KeyDown) +5:1228:0:102:1 //Set volume digit 6: 6 (PAVE NUM.) (KeyDown) +5:1229:0:55:1 //Set volume digit 7: \xE8 (KeyDown) +5:1229:0:103:1 //Set volume digit 7: 7 (PAVE NUM.) (KeyDown) +5:1230:0:56:1 //Set volume digit 8: _ (KeyDown) +5:1231:0:57:1 //Set volume digit 9: \xE7 (KeyDown) +5:1231:0:105:1 //Set volume digit 9: 9 (PAVE NUM.) (KeyDown) +5:1232:0:86:1 //Vol command - volume: V (KeyDown) +5:1233:0:80:1 //Vol command - pan: P (KeyDown) +5:1234:0:67:1 //Vol command - vol slide up: C (KeyDown) +5:1235:0:68:1 //Vol command - vol slide down: D (KeyDown) +5:1236:0:65:1 //Vol command - vol fine slide up: A (KeyDown) +5:1237:0:66:1 //Vol command - vol fine slide down: B (KeyDown) +5:1238:0:85:1 //Vol command - vibrato speed: U (KeyDown) +5:1239:0:72:1 //Vol command - vibrato: H (KeyDown) +5:1240:0:76:1 //Vol command - XM pan left: L (KeyDown) +5:1241:0:82:1 //Vol command - XM pan right: R (KeyDown) +5:1242:0:71:1 //Vol command - Portamento: G (KeyDown) +5:1243:0:70:1 //Vol command - Portamento Up: F (KeyDown) +5:1244:0:69:1 //Vol command - Portamento Down: E (KeyDown) +5:1245:1:186:1 //Vol command - Velocity: Shift+$ (KeyDown) +5:1246:0:79:1 //Vol command - Offset: O (KeyDown) + +//----( Pattern Context [bottom] - FX Col (6) )------------ +6:1294:0:220:1 //FX midi macro slide: * (KeyDown) +6:1295:1:186:1 //FX pseudo-velocity (experimental): Shift+$ (KeyDown) +6:1666:6:51:1 //FX parameter extension command: Ctrl+Alt+" (KeyDown) + +//----( Pattern Context [bottom] - Param Col (7) )------------ +7:1247:0:48:1 //FX Param digit 0: \xE0 (KeyDown) +7:1247:0:96:1 //FX Param digit 0: 0 (PAVE NUM.) (KeyDown) +7:1248:0:49:1 //FX Param digit 1: & (KeyDown) +7:1248:0:97:1 //FX Param digit 1: 1 (PAVE NUM.) (KeyDown) +7:1249:0:50:1 //FX Param digit 2: \xE9 (KeyDown) +7:1249:0:98:1 //FX Param digit 2: 2 (PAVE NUM.) (KeyDown) +7:1250:0:51:1 //FX Param digit 3: " (KeyDown) +7:1250:0:99:1 //FX Param digit 3: 3 (PAVE NUM.) (KeyDown) +7:1251:0:52:1 //FX Param digit 4: ' (KeyDown) +7:1251:0:100:1 //FX Param digit 4: 4 (PAVE NUM.) (KeyDown) +7:1252:0:53:1 //FX Param digit 5: ( (KeyDown) +7:1252:0:101:1 //FX Param digit 5: 5 (PAVE NUM.) (KeyDown) +7:1253:0:54:1 //FX Param digit 6: - (KeyDown) +7:1253:0:102:1 //FX Param digit 6: 6 (PAVE NUM.) (KeyDown) +7:1254:0:55:1 //FX Param digit 7: \xE8 (KeyDown) +7:1254:0:103:1 //FX Param digit 7: 7 (PAVE NUM.) (KeyDown) +7:1255:0:56:1 //FX Param digit 8: _ (KeyDown) +7:1255:0:104:1 //FX Param digit 8: 8 (PAVE NUM.) (KeyDown) +7:1256:0:57:1 //FX Param digit 9: \xE7 (KeyDown) +7:1256:0:105:1 //FX Param digit 9: 9 (PAVE NUM.) (KeyDown) +7:1257:0:65:1 //FX Param digit A: A (KeyDown) +7:1258:0:66:1 //FX Param digit B: B (KeyDown) +7:1259:0:67:1 //FX Param digit C: C (KeyDown) +7:1260:0:68:1 //FX Param digit D: D (KeyDown) +7:1261:0:69:1 //FX Param digit E: E (KeyDown) +7:1262:0:70:1 //FX Param digit F: F (KeyDown) + +//----( Sample Context [bottom] (8) )------------ +8:1673:4:79:1 //Load a Sample: Alt+O (KeyDown) +8:1674:4:83:1 //Save Sample: Alt+S (KeyDown) +8:1675:4:78:1 //New Sample: Alt+N (KeyDown) +8:1380:2:84:1 //Trim sample around loop points: Ctrl+T (KeyDown) +8:1383:0:8:1 //Silence sample selection: RET.ARR (KeyDown) +8:1385:3:65:1 //Amplify Sample: Shift+Ctrl+A (KeyDown) +8:1381:3:82:1 //Reverse sample: Shift+Ctrl+R (KeyDown) +8:1382:0:46:1 //Delete sample selection: SUPPR (KeyDown) +8:1386:0:33:1 //Zoom Out: PG.PREC (KeyDown) +8:1387:0:34:1 //Zoom In: PG.SUIV (KeyDown) +8:1790:6:68:1 //Remove DC Offset: Ctrl+Alt+D (KeyDown) + +//----( Instrument Context [bottom] (9) )------------ + +//----( Comments Context [bottom] (10) )------------ + +//----( Unknown Context (11) )------------ + +//----( Unknown Context (12) )------------ + +//----( Plugin GUI Context (13) )------------ +13:1763:0:166:1 //Previous plugin preset: (KeyDown) +13:1764:0:167:1 //Next plugin preset: (KeyDown) +13:1782:2:166:1 //Plugin preset backward jump: Ctrl+ (KeyDown) +13:1783:2:167:1 //Plugin preset forward jump: Ctrl+ (KeyDown) +13:1765:6:82:1 //Randomize plugin parameters: Ctrl+Alt+R (KeyDown) + +//----( General Context [top] (14) )------------ + +//----( Pattern Context [top] (15) )------------ + +//----( Sample Context [top] (16) )------------ + +//----( Instrument Context [top] (17) )------------ + +//----( Comments Context [top] (18) )------------ + +//----( Orderlist (19) )------------ +19:1802:0:46:5 //Delete Order: SUPPR (KeyDown|KeyHold) +19:1803:0:45:5 //Insert Order: INS (KeyDown|KeyHold) +19:1804:0:13:5 //Edit Pattern: ENTREE (KeyDown|KeyHold) +19:1805:0:9:5 //Switch to pattern editor: TAB (KeyDown|KeyHold) +19:1794:0:37:5 //Previous Order: GAUCHE (KeyDown|KeyHold) +19:1795:0:39:5 //Next Order: DROITE (KeyDown|KeyHold) +19:1796:0:36:5 //First Order: ORIGINE (KeyDown|KeyHold) +19:1797:0:35:5 //Last Order: FIN (KeyDown|KeyHold) +19:1807:0:48:5 //Pattern index digit 0: \xE0 (KeyDown|KeyHold) +19:1807:0:96:5 //Pattern index digit 0: 0 (PAVE NUM.) (KeyDown|KeyHold) +19:1808:0:49:5 //Pattern index digit 1: & (KeyDown|KeyHold) +19:1808:0:97:5 //Pattern index digit 1: 1 (PAVE NUM.) (KeyDown|KeyHold) +19:1809:0:50:5 //Pattern index digit 2: \xE9 (KeyDown|KeyHold) +19:1809:0:98:5 //Pattern index digit 2: 2 (PAVE NUM.) (KeyDown|KeyHold) +19:1810:0:51:5 //Pattern index digit 3: " (KeyDown|KeyHold) +19:1810:0:99:5 //Pattern index digit 3: 3 (PAVE NUM.) (KeyDown|KeyHold) +19:1811:0:52:5 //Pattern index digit 4: ' (KeyDown|KeyHold) +19:1811:0:100:5 //Pattern index digit 4: 4 (PAVE NUM.) (KeyDown|KeyHold) +19:1812:0:53:5 //Pattern index digit 5: ( (KeyDown|KeyHold) +19:1812:0:101:5 //Pattern index digit 5: 5 (PAVE NUM.) (KeyDown|KeyHold) +19:1813:0:54:5 //Pattern index digit 6: - (KeyDown|KeyHold) +19:1813:0:102:5 //Pattern index digit 6: 6 (PAVE NUM.) (KeyDown|KeyHold) +19:1814:0:55:5 //Pattern index digit 7: \xE8 (KeyDown|KeyHold) +19:1814:0:103:5 //Pattern index digit 7: 7 (PAVE NUM.) (KeyDown|KeyHold) +19:1815:0:56:5 //Pattern index digit 8: _ (KeyDown|KeyHold) +19:1815:0:104:5 //Pattern index digit 8: 8 (PAVE NUM.) (KeyDown|KeyHold) +19:1816:0:57:5 //Pattern index digit 9: \xE7 (KeyDown|KeyHold) +19:1816:0:105:5 //Pattern index digit 9: 9 (PAVE NUM.) (KeyDown|KeyHold) +19:1817:0:38:5 //Increase pattern index : HAUT (KeyDown|KeyHold) +19:1817:0:187:5 //Increase pattern index : = (KeyDown|KeyHold) +19:1818:0:40:5 //Decrease pattern index: BAS (KeyDown|KeyHold) +19:1818:0:189:5 //Decrease pattern index: (KeyDown|KeyHold) Added: trunk/OpenMPT/packageTemplate/extraKeymaps/NO_mpt_classic_(rakib).mkb =================================================================== --- trunk/OpenMPT/packageTemplate/extraKeymaps/NO_mpt_classic_(rakib).mkb (rev 0) +++ trunk/OpenMPT/packageTemplate/extraKeymaps/NO_mpt_classic_(rakib).mkb 2009-12-04 19:30:31 UTC (rev 432) @@ -0,0 +1,325 @@ +//-------- OpenMPT key binding definition file ------- +//-Format is: - +//- Context:Command ID:Modifiers:Key:KeypressEventType //Comments - +//---------------------------------------------------------------------- +version:1 + +//----( Global Context (0) )------------ +0:1347:2:78:1 //File/New: Ctrl+N (KeyDown) +0:1346:2:79:1 //File/Open: Ctrl+O (KeyDown) +0:1349:2:83:1 //File/Save: Ctrl+S (KeyDown) +0:1350:3:83:1 //File/Save As: Shift+Ctrl+S (KeyDown) +0:1351:3:87:1 //File/Save as Wave: Shift+Ctrl+W (KeyDown) +0:1693:3:9:1 //Previous Document: Shift+Ctrl+TAB (KeyDown) +0:1030:0:116:1 //Play song/Pause song: F5 (KeyDown) +0:1031:0:119:1 //Pause song: F8 (KeyDown) +0:1375:0:27:1 //Stop Song: ESC (KeyDown) +0:1029:0:117:1 //Play song from start: F6 (KeyDown) +0:1027:0:118:5 //Play pattern from start: F7 (KeyDown|KeyHold) +0:1026:2:118:5 //Play pattern from cursor: Ctrl+F7 (KeyDown|KeyHold) +0:1374:3:84:1 //Estimate Song Length: Shift+Ctrl+T (KeyDown) +0:1376:0:120:1 //Toggle Midi Record: F9 (KeyDown) +0:1359:2:90:1 //Undo: Ctrl+Z (KeyDown) +0:1360:2:88:1 //Cut: Ctrl+X (KeyDown) +0:1361:2:67:1 //Copy: Ctrl+C (KeyDown) +0:1362:2:86:1 //Paste: Ctrl+V (KeyDown) +0:1362:1:45:1 //Paste: Shift+INS (KeyDown) +0:1364:2:53:1 //SelectAll: Ctrl+5 (KeyDown) +0:1365:2:70:1 //Find: Ctrl+F (KeyDown) +0:1366:0:114:1 //Find Next: F3 (KeyDown) +0:1021:4:71:1 //View General: Alt+G (KeyDown) +0:1022:4:80:1 //View Pattern: Alt+P (KeyDown) +0:1023:4:83:1 //View Samples: Alt+S (KeyDown) +0:1024:4:78:1 //View Instruments: Alt+N (KeyDown) +0:1025:1:120:1 //View Comments: Shift+F9 (KeyDown) +0:1368:2:113:1 //Toggle Tree View: Ctrl+F2 (KeyDown) +0:1369:2:112:1 //View Options: Ctrl+F1 (KeyDown) +0:1370:0:112:1 //Help (to do): F1 (KeyDown) +0:1032:2:111:5 //Previous instrument: Ctrl+NUM/ (KeyDown|KeyHold) +0:1032:2:38:5 //Previous instrument: Ctrl+PIL OPP (KeyDown|KeyHold) +0:1033:2:106:5 //Next instrument: Ctrl+NUM* (KeyDown|KeyHold) +0:1033:2:40:5 //Next instrument: Ctrl+PIL NED (KeyDown|KeyHold) +0:1036:0:111:1 //Previous octave: NUM/ (KeyDown) +0:1037:0:106:1 //Next octave: NUM* (KeyDown) +0:1034:2:37:5 //Previous order: Ctrl+PIL VENSTRE (KeyDown|KeyHold) +0:1035:2:39:5 //Next order: Ctrl+PIL H\xD8YRE (KeyDown|KeyHold) + +//----( General Context [bottom] (1) )------------ + +//----( Pattern Context [bottom] (2) )------------ +2:1017:0:34:5 //Jump down by measure: PGDN (KeyDown|KeyHold) +2:1018:0:33:5 //Jump up by measure: PGUP (KeyDown|KeyHold) +2:1338:4:34:5 //Jump down by beat: Alt+PGDN (KeyDown|KeyHold) +2:1339:4:33:5 //Jump up by beat: Alt+PGUP (KeyDown|KeyHold) +2:1340:6:34:5 //Snap down to beat: Ctrl+Alt+PGDN (KeyDown|KeyHold) +2:1341:6:33:5 //Snap up to beat: Ctrl+Alt+PGUP (KeyDown|KeyHold) +2:1038:0:40:5 //Navigate down by 1 row: PIL NED (KeyDown|KeyHold) +2:1039:0:38:5 //Navigate up by 1 row: PIL OPP (KeyDown|KeyHold) +2:1691:4:40:5 //Navigate down by spacing: Alt+PIL NED (KeyDown|KeyHold) +2:1692:4:38:5 //Navigate up by spacing: Alt+PIL OPP (KeyDown|KeyHold) +2:1040:0:37:5 //Navigate left: PIL VENSTRE (KeyDown|KeyHold) +2:1041:0:39:5 //Navigate right: PIL H\xD8YRE (KeyDown|KeyHold) +2:1042:0:9:5 //Navigate to next channel: TAB (KeyDown|KeyHold) +2:1043:1:9:5 //Navigate to previous channel: Shift+TAB (KeyDown|KeyHold) +2:1044:0:36:1 //Go to first channel: HOME (KeyDown) +2:1045:2:36:1 //Go to first row: Ctrl+HOME (KeyDown) +2:1046:6:36:1 //Go to first row of first channel: Ctrl+Alt+HOME (KeyDown) +2:1047:0:35:1 //Go to last channel: END (KeyDown) +2:1048:2:35:1 //Go to last row: Ctrl+END (KeyDown) +2:1049:6:35:1 //Go to last row of last channel: Ctrl+Alt+END (KeyDown) +2:1050:1:16:1 //Selection key: Shift+SKIFT (KeyDown) +2:1051:2:17:1 //Copy select key: Ctrl (KeyDown) +2:1011:2:65:1 //Select channel / Select all: Ctrl+A (KeyDown) +2:1663:0:122:1 //Toggle follow song: F11 (KeyDown) +2:1003:0:13:5 //Quick copy: ENTER (KeyDown|KeyHold) +2:1004:0:32:5 //Quick paste: MELLOMROM (KeyDown|KeyHold) +2:1001:2:32:1 //Enable recording: Ctrl+MELLOMROM (KeyDown) +2:1002:2:13:5 //Play row: Ctrl+ENTER (KeyDown|KeyHold) +2:1317:4:18:1 //Set row jump on note entry: Alt (KeyDown) +2:1685:2:9:1 //Switch to order list: Ctrl+TAB (KeyDown) +2:1806:2:68:1 //Duplicate pattern: Ctrl+D (KeyDown) +2:1662:6:80:1 //Toggle channel's plugin editor: Ctrl+Alt+P (KeyDown) +2:1062:0:93:1 //Show note properties: Program (KeyDown) +2:1005:0:121:5 //Mute current channel: F10 (KeyDown|KeyHold) +2:1006:2:121:5 //Solo current channel: Ctrl+F10 (KeyDown|KeyHold) +2:1007:2:81:5 //Transpose +1: Ctrl+Q (KeyDown|KeyHold) +2:1009:3:81:5 //Transpose +12: Shift+Ctrl+Q (KeyDown|KeyHold) +2:1010:3:65:5 //Transpose -12: Shift+Ctrl+A (KeyDown|KeyHold) +2:1012:2:77:1 //Amplify selection: Ctrl+M (KeyDown) +2:1014:2:74:1 //Interpolate volume: Ctrl+J (KeyDown) +2:1015:2:75:1 //Interpolate effect: Ctrl+K (KeyDown) +2:1016:4:66:1 //Open effect visualizer: Alt+B (KeyDown) +2:1766:2:71:1 //Go to row/channel/...: Ctrl+G (KeyDown) +2:1013:2:73:1 //Apply current instrument: Ctrl+I (KeyDown) +2:1660:4:69:5 //Grow selection: Alt+E (KeyDown|KeyHold) +2:1661:4:68:5 //Shrink selection: Alt+D (KeyDown|KeyHold) +2:1058:0:46:1 //Clear field: DEL (KeyDown) +2:1664:1:190:1 //Clear field (IT Style): Shift+. (KeyDown) +2:1059:2:46:1 //Clear row and step: Ctrl+DEL (KeyDown) +2:1665:1:46:5 //Clear field and step (IT Style): Shift+DEL (KeyDown|KeyHold) +2:1061:0:8:5 //Delete rows: TILBAKE (KeyDown|KeyHold) +2:1377:2:8:5 //Delete all rows: Ctrl+TILBAKE (KeyDown|KeyHold) +2:1378:0:45:1 //Insert Row: INS (KeyDown) +2:1379:2:45:1 //Insert All Rows: Ctrl+INS (KeyDown) +2:1055:0:109:5 //Previous pattern: NUM MINUS (KeyDown|KeyHold) +2:1054:0:107:5 //Next pattern: NUM PLUSS (KeyDown|KeyHold) + +//----( Pattern Context [bottom] - Note Col (3) )------------ +3:1064:0:81:1 //Base octave C: Q (KeyDown) +3:1065:0:87:1 //Base octave C#: W (KeyDown) +3:1066:0:69:1 //Base octave D: E (KeyDown) +3:1067:0:82:1 //Base octave D#: R (KeyDown) +3:1068:0:84:1 //Base octave E: T (KeyDown) +3:1069:0:89:1 //Base octave F: Y (KeyDown) +3:1070:0:85:1 //Base octave F#: U (KeyDown) +3:1071:0:73:1 //Base octave G: I (KeyDown) +3:1072:0:79:1 //Base octave G#: O (KeyDown) +3:1074:0:221:1 //Base octave A#: \xE5 (KeyDown) +3:1075:0:186:1 //Base octave B: T\xD8DLER (KeyDown) +3:1076:0:65:1 //Base octave +1 C: A (KeyDown) +3:1077:0:83:1 //Base octave +1 C#: S (KeyDown) +3:1078:0:68:1 //Base octave +1 D: D (KeyDown) +3:1079:0:70:1 //Base octave +1 D#: F (KeyDown) +3:1080:0:71:1 //Base octave +1 E: G (KeyDown) +3:1081:0:72:1 //Base octave +1 F: H (KeyDown) +3:1082:0:74:1 //Base octave +1 F#: J (KeyDown) +3:1083:0:75:1 //Base octave +1 G: K (KeyDown) +3:1084:0:76:1 //Base octave +1 G#: L (KeyDown) +3:1085:0:192:1 //Base octave +1 A: \xF8 (KeyDown) +3:1086:0:222:1 //Base octave +1 A#: \xE6 (KeyDown) +3:1087:0:191:1 //Base octave +1 B: ' (KeyDown) +3:1088:0:90:1 //Base octave +2 C: Z (KeyDown) +3:1089:0:88:1 //Base octave +2 C#: X (KeyDown) +3:1090:0:67:1 //Base octave +2 D: C (KeyDown) +3:1091:0:86:1 //Base octave +2 D#: V (KeyDown) +3:1092:0:66:1 //Base octave +2 E: B (KeyDown) +3:1093:0:78:1 //Base octave +2 F: N (KeyDown) +3:1094:0:77:1 //Base octave +2 F#: M (KeyDown) +3:1095:0:188:1 //Base octave +2 G: , (KeyDown) +3:1096:0:190:1 //Base octave +2 G#: . (KeyDown) +3:1212:0:48:1 //Set octave 0: 0 (KeyDown) +3:1212:0:96:1 //Set octave 0: NUM 0 (KeyDown) +3:1213:0:49:1 //Set octave 1: 1 (KeyDown) +3:1213:0:97:1 //Set octave 1: NUM 1 (KeyDown) +3:1214:0:50:1 //Set octave 2: 2 (KeyDown) +3:1214:0:98:1 //Set octave 2: NUM 2 (KeyDown) +3:1215:0:51:1 //Set octave 3: 3 (KeyDown) +3:1215:0:99:1 //Set octave 3: NUM 3 (KeyDown) +3:1216:0:52:1 //Set octave 4: 4 (KeyDown) +3:1216:0:100:1 //Set octave 4: NUM 4 (KeyDown) +3:1217:0:53:1 //Set octave 5: 5 (KeyDown) +3:1217:0:101:1 //Set octave 5: NUM 5 (KeyDown) +3:1218:0:54:1 //Set octave 6: 6 (KeyDown) +3:1218:0:102:1 //Set octave 6: NUM 6 (KeyDown) +3:1219:0:55:1 //Set octave 7: 7 (KeyDown) +3:1219:0:103:1 //Set octave 7: NUM 7 (KeyDown) +3:1220:0:56:1 //Set octave 8: 8 (KeyDown) +3:1220:0:104:1 //Set octave 8: NUM 8 (KeyDown) +3:1221:0:57:1 //Set octave 9: 9 (KeyDown) +3:1221:0:105:1 //Set octave 9: NUM 9 (KeyDown) +3:1316:1:16:1 //Chord Modifier: Shift+SKIFT (KeyDown) +3:1667:0:219:1 //Note Cut (don't remember instrument): \ (KeyDown) +3:1668:0:187:1 //Note Off (don't remember instrument): + (KeyDown) +3:1792:0:226:1 //Note Fade (don't remember instrument): < (KeyDown) + +//----( Pattern Context [bottom] - Ins Col (4) )------------ +4:1202:0:96:1 //Set instrument digit 0: NUM 0 (KeyDown) +4:1202:0:48:1 //Set instrument digit 0: 0 (KeyDown) +4:1203:0:97:1 //Set instrument digit 1: NUM 1 (KeyDown) +4:1203:0:49:1 //Set instrument digit 1: 1 (KeyDown) +4:1204:0:98:1 //Set instrument digit 2: NUM 2 (KeyDown) +4:1204:0:50:1 //Set instrument digit 2: 2 (KeyDown) +4:1205:0:99:1 //Set instrument digit 3: NUM 3 (KeyDown) +4:1205:0:51:1 //Set instrument digit 3: 3 (KeyDown) +4:1206:0:100:1 //Set instrument digit 4: NUM 4 (KeyDown) +4:1206:0:52:1 //Set instrument digit 4: 4 (KeyDown) +4:1207:0:101:1 //Set instrument digit 5: NUM 5 (KeyDown) +4:1207:0:53:1 //Set instrument digit 5: 5 (KeyDown) +4:1208:0:102:1 //Set instrument digit 6: NUM 6 (KeyDown) +4:1208:0:54:1 //Set instrument digit 6: 6 (KeyDown) +4:1209:0:103:1 //Set instrument digit 7: NUM 7 (KeyDown) +4:1209:0:55:1 //Set instrument digit 7: 7 (KeyDown) +4:1210:0:56:1 //Set instrument digit 8: 8 (KeyDown) +4:1211:0:105:1 //Set instrument digit 9: NUM 9 (KeyDown) +4:1211:0:57:1 //Set instrument digit 9: 9 (KeyDown) + +//----( Pattern Context [bottom] - Vol Col (5) )------------ +5:1222:0:48:1 //Set volume digit 0: 0 (KeyDown) +5:1222:0:96:1 //Set volume digit 0: NUM 0 (KeyDown) +5:1223:0:49:1 //Set volume digit 1: 1 (KeyDown) +5:1223:0:97:1 //Set volume digit 1: NUM 1 (KeyDown) +5:1224:0:50:1 //Set volume digit 2: 2 (KeyDown) +5:1224:0:98:1 //Set volume digit 2: NUM 2 (KeyDown) +5:1225:0:51:1 //Set volume digit 3: 3 (KeyDown) +5:1225:0:99:1 //Set volume digit 3: NUM 3 (KeyDown) +5:1226:0:52:1 //Set volume digit 4: 4 (KeyDown) +5:1226:0:100:1 //Set volume digit 4: NUM 4 (KeyDown) +5:1227:0:53:1 //Set volume digit 5: 5 (KeyDown... [truncated message content] |
From: <sag...@us...> - 2009-12-05 00:31:53
|
Revision: 433 http://modplug.svn.sourceforge.net/modplug/?rev=433&view=rev Author: saga-games Date: 2009-12-05 00:31:41 +0000 (Sat, 05 Dec 2009) Log Message: ----------- [Imp] Pattern editor: Tidied up the upper panel. It fits perfectly on a 1024x768 screen with treeview enabled and also works on 800x600 with treeview disabled. With the new layout, about 8 more pattern rows can be seen. [Mod] Pattern editor: Due to this cleanup, the "split keyboard" feature has been removed from the interface. The split keyboard settings dialog can now be accessed by using a shortcut, which should be even faster than the old method. [Mod] Updated DE_jojo.mkb (Added shortcut for Split Keyboard Settings) [Mod] Added VU Meter colours for the pattern colour presets [Ref] Removed various constants, structs and stuff that was connected to the old keyboard "manager", as it has been obsolete for years. Modified Paths: -------------- trunk/OpenMPT/mptrack/CommandSet.cpp trunk/OpenMPT/mptrack/CommandSet.h trunk/OpenMPT/mptrack/Ctrl_pat.cpp trunk/OpenMPT/mptrack/Ctrl_pat.h trunk/OpenMPT/mptrack/Mainfrm.h trunk/OpenMPT/mptrack/Moptions.cpp trunk/OpenMPT/mptrack/View_pat.cpp trunk/OpenMPT/mptrack/View_pat.h trunk/OpenMPT/mptrack/dlg_misc.cpp trunk/OpenMPT/mptrack/dlg_misc.h trunk/OpenMPT/mptrack/mptrack.rc trunk/OpenMPT/mptrack/resource.h trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb Modified: trunk/OpenMPT/mptrack/CommandSet.cpp =================================================================== --- trunk/OpenMPT/mptrack/CommandSet.cpp 2009-12-04 19:30:31 UTC (rev 432) +++ trunk/OpenMPT/mptrack/CommandSet.cpp 2009-12-05 00:31:41 UTC (rev 433) @@ -2475,6 +2475,11 @@ commands[kcOrderlistPatMinus].isDummy = false; commands[kcOrderlistPatMinus].Message = "Decrease pattern index"; + commands[kcShowSplitKeyboardSettings].UID = 1819; + commands[kcShowSplitKeyboardSettings].isHidden = false; + commands[kcShowSplitKeyboardSettings].isDummy = false; + commands[kcShowSplitKeyboardSettings].Message = "Split Keyboard Settings dialog"; + #ifdef _DEBUG for (int i=0; i<kcNumCommands; i++) { if (commands[i].UID != 0) { // ignore unset UIDs Modified: trunk/OpenMPT/mptrack/CommandSet.h =================================================================== --- trunk/OpenMPT/mptrack/CommandSet.h 2009-12-04 19:30:31 UTC (rev 432) +++ trunk/OpenMPT/mptrack/CommandSet.h 2009-12-05 00:31:41 UTC (rev 433) @@ -224,6 +224,7 @@ kcShowNoteProperties, kcShowPatternProperties, kcShowMacroConfig, + kcShowSplitKeyboardSettings, kcChangeLoopStatus, kcShowEditMenu, kcTimeAtRow, Modified: trunk/OpenMPT/mptrack/Ctrl_pat.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_pat.cpp 2009-12-04 19:30:31 UTC (rev 432) +++ trunk/OpenMPT/mptrack/Ctrl_pat.cpp 2009-12-05 00:31:41 UTC (rev 433) @@ -53,16 +53,7 @@ ON_COMMAND(ID_PATTERNDETAIL_HI, OnDetailHi) ON_COMMAND(ID_OVERFLOWPASTE, OnToggleOverflowPaste) ON_CBN_SELCHANGE(IDC_COMBO_INSTRUMENT, OnInstrumentChanged) -// -> CODE#0012 -// -> DESC="midi keyboard split" - ON_CBN_SELCHANGE(IDC_COMBO_SPLITINSTRUMENT, OnSplitInstrumentChanged) - ON_CBN_SELCHANGE(IDC_COMBO_SPLITNOTE, OnSplitNoteChanged) - ON_CBN_SELCHANGE(IDC_COMBO_OCTAVEMODIFIER, OnOctaveModifierChanged) - ON_COMMAND(IDC_PATTERN_OCTAVELINK, OnOctaveLink) - ON_CBN_SELCHANGE(IDC_COMBO_SPLITVOLUME, OnSplitVolumeChanged) -// -! NEW_FEATURE#0012 ON_COMMAND(IDC_PATINSTROPLUGGUI, TogglePluginEditor) //rewbs.instroVST - ON_COMMAND(IDC_PATINSTROPLUGGUI2, ToggleSplitPluginEditor) //rewbs.instroVST ON_EN_CHANGE(IDC_EDIT_SPACING, OnSpacingChanged) ON_EN_CHANGE(IDC_EDIT_PATTERNNAME, OnPatternNameChanged) ON_EN_CHANGE(IDC_EDIT_SEQUENCE_NAME, OnSequenceNameChanged) @@ -81,12 +72,6 @@ DDX_Control(pDX, IDC_BUTTON1, m_BtnNext); DDX_Control(pDX, IDC_BUTTON2, m_BtnPrev); DDX_Control(pDX, IDC_COMBO_INSTRUMENT, m_CbnInstrument); -// -> CODE#0012 -// -> DESC="midi keyboard split" - DDX_Control(pDX, IDC_COMBO_SPLITINSTRUMENT, m_CbnSplitInstrument); - DDX_Control(pDX, IDC_COMBO_SPLITNOTE, m_CbnSplitNote); - DDX_Control(pDX, IDC_COMBO_OCTAVEMODIFIER, m_CbnOctaveModifier); - DDX_Control(pDX, IDC_COMBO_SPLITVOLUME, m_CbnSplitVolume); DDX_Control(pDX, IDC_EDIT_SPACING, m_EditSpacing); DDX_Control(pDX, IDC_EDIT_ORDERLIST_MARGINS,m_EditOrderListMargins); DDX_Control(pDX, IDC_EDIT_PATTERNNAME, m_EditPatName); @@ -192,47 +177,6 @@ UpdateView(HINT_MODTYPE|HINT_PATNAMES, NULL); RecalcLayout(); - - -// -> CODE#0012 -// -> DESC="midi keyboard split" - //rewbs.merge: fix buffer overrun: - //CHAR s[8]; - CHAR s[10]; - - AppendNotesToControl(m_CbnSplitNote, 0, NOTE_MAX - 1); - - m_nSplitInstrument = 0; - m_nSplitNote = 60; - m_CbnSplitNote.SetCurSel(m_nSplitNote); - - - for(int i = -9 ; i < 10 ; i++){ - wsprintf(s,i < 0 ? "Oct. - %d" : i > 0 ? "Oct. + %d" : "Oct. + 0", abs(i)); - int n = m_CbnOctaveModifier.AddString(s); - m_CbnOctaveModifier.SetItemData(n, i); - } - - m_nOctaveModifier = 9; - m_CbnOctaveModifier.SetCurSel(m_nOctaveModifier); - m_nOctaveLink = TRUE; - CheckDlgButton(IDC_PATTERN_OCTAVELINK, m_nOctaveLink ? MF_CHECKED : MF_UNCHECKED); - - m_CbnSplitVolume.AddString("--"); - m_CbnSplitVolume.SetItemData(0, 0); - for(int i = 1; i<65 ; i++){ - wsprintf(s,"%d",i); - int n = m_CbnSplitVolume.AddString(s); - m_CbnSplitVolume.SetItemData(n, i); - } - - m_nSplitVolume = 0; - m_CbnSplitVolume.SetCurSel(m_nSplitVolume); - - - -// -! NEW_FEATURE#0012 - m_bInitialized = TRUE; UnlockControls(); @@ -286,10 +230,6 @@ ::EnableWindow(::GetDlgItem(m_hWnd, IDC_PATINSTROPLUGGUI), true); else ::EnableWindow(::GetDlgItem(m_hWnd, IDC_PATINSTROPLUGGUI), false); - if (HasValidPlug(m_nSplitInstrument)) - ::EnableWindow(::GetDlgItem(m_hWnd, IDC_PATINSTROPLUGGUI2), true); - else - ::EnableWindow(::GetDlgItem(m_hWnd, IDC_PATINSTROPLUGGUI2), false); // Show/hide multisequence controls according the current modtype. GetDlgItem(IDC_STATIC_SEQUENCE_NAME_FRAME)->ShowWindow( (m_pSndFile->GetType() == MOD_TYPE_MPT) ? SW_SHOW : SW_HIDE); @@ -314,10 +254,7 @@ UINT nPos = 0; m_CbnInstrument.SetRedraw(FALSE); m_CbnInstrument.ResetContent(); - m_CbnInstrument.SetItemData(m_CbnInstrument.AddString(" None"), 0); - m_CbnSplitInstrument.SetRedraw(FALSE); - m_CbnSplitInstrument.ResetContent(); - m_CbnSplitInstrument.SetItemData(m_CbnSplitInstrument.AddString(" None"), 0); + m_CbnInstrument.SetItemData(m_CbnInstrument.AddString(" No Instrument"), 0); if (m_pSndFile->m_nInstruments) { for (UINT i=1; i<=m_pSndFile->m_nInstruments; i++) { if (m_pSndFile->Instruments[i] == NULL) { @@ -328,8 +265,6 @@ UINT n = m_CbnInstrument.AddString(displayName); if (n == m_nInstrument) nPos = n; m_CbnInstrument.SetItemData(n, i); - m_CbnSplitInstrument.AddString(displayName); - m_CbnSplitInstrument.SetItemData(n, i); } @@ -342,17 +277,10 @@ UINT n = m_CbnInstrument.AddString(s); if (n == m_nInstrument) nPos = n; m_CbnInstrument.SetItemData(n, i); - m_CbnSplitInstrument.AddString(s); - m_CbnSplitInstrument.SetItemData(n, i); } } m_CbnInstrument.SetCurSel(nPos); m_CbnInstrument.SetRedraw(TRUE); -// -> CODE#0012 -// -> DESC="midi keyboard split" - m_CbnSplitInstrument.SetCurSel(nPos); - m_CbnSplitInstrument.SetRedraw(TRUE); -// -! NEW_FEATURE#0012 } if (dwHintMask & (HINT_MODTYPE|HINT_PATNAMES)) { @@ -445,11 +373,6 @@ SendViewMessage(VIEWMSG_PATTERNLOOP, (SONG_PATTERNLOOP & m_pSndFile->m_dwSongFlags)); } OnSpacingChanged(); - SendViewMessage(VIEWMSG_SETSPLITINSTRUMENT, m_nSplitInstrument); - SendViewMessage(VIEWMSG_SETSPLITNOTE, m_nSplitNote); - SendViewMessage(VIEWMSG_SETOCTAVEMODIFIER, m_nOctaveModifier); - SendViewMessage(VIEWMSG_SETOCTAVELINK, m_nOctaveLink); - SendViewMessage(VIEWMSG_SETSPLITVOLUME, m_nSplitVolume); SendViewMessage(VIEWMSG_SETDETAIL, m_nDetailLevel); SendViewMessage(VIEWMSG_SETRECORD, m_bRecord); SendViewMessage(VIEWMSG_SETVUMETERS, m_bVUMeters); @@ -765,59 +688,7 @@ } } -// -> CODE#0012 -// -> DESC="midi keyboard split" -void CCtrlPatterns::OnSplitInstrumentChanged() -//--------------------------------------- -{ - int n = m_CbnSplitInstrument.GetCurSel(); - if ((m_pSndFile) && (n >= 0)) - { - n = m_CbnSplitInstrument.GetItemData(n); - int nmax = (m_pSndFile->m_nInstruments) ? m_pSndFile->m_nInstruments : m_pSndFile->m_nSamples; - if ((n >= 0) && (n <= nmax) && (n != (int)m_nSplitInstrument)) - { - m_nSplitInstrument = n; - } - SendViewMessage(VIEWMSG_SETSPLITINSTRUMENT, m_nSplitInstrument); - if (HasValidPlug(m_nSplitInstrument)) - ::EnableWindow(::GetDlgItem(m_hWnd, IDC_PATINSTROPLUGGUI2), true); - else - ::EnableWindow(::GetDlgItem(m_hWnd, IDC_PATINSTROPLUGGUI2), false); - SwitchToView(); - } -} -void CCtrlPatterns::OnSplitNoteChanged() -//-------------------------------------- -{ - m_nSplitNote = m_CbnSplitNote.GetCurSel(); - SendViewMessage(VIEWMSG_SETSPLITNOTE, m_nSplitNote); - SwitchToView(); -} -void CCtrlPatterns::OnOctaveModifierChanged() -//------------------------------------------- -{ - m_nOctaveModifier = m_CbnOctaveModifier.GetCurSel(); - SendViewMessage(VIEWMSG_SETOCTAVEMODIFIER, m_nOctaveModifier); - SwitchToView(); -} -void CCtrlPatterns::OnOctaveLink() -//-------------------------------- -{ - m_nOctaveLink = IsDlgButtonChecked(IDC_PATTERN_OCTAVELINK); - SendViewMessage(VIEWMSG_SETOCTAVELINK, m_nOctaveLink); - SwitchToView(); -} -void CCtrlPatterns::OnSplitVolumeChanged() -//---------------------------------------- -{ - m_nSplitVolume = m_CbnSplitVolume.GetCurSel(); - SendViewMessage(VIEWMSG_SETSPLITVOLUME, m_nSplitVolume); - SwitchToView(); -} -// -! NEW_FEATURE#0012 - void CCtrlPatterns::OnPrevInstrument() //------------------------------------ { @@ -1257,20 +1128,13 @@ SwitchToView(); } -//rewbs.introVST + void CCtrlPatterns::TogglePluginEditor() //-------------------------------------- { - TogglePluginEditor(false); -} - - -void CCtrlPatterns::TogglePluginEditor(bool split) -//------------------------------------------------ -{ if ((m_nInstrument) && (m_pModDoc)) { - UINT nPlug = m_pSndFile->Instruments[(split?m_nSplitInstrument:m_nInstrument)]->nMixPlug; + UINT nPlug = m_pSndFile->Instruments[m_nInstrument]->nMixPlug; if (nPlug) //if not no plugin { PSNDMIXPLUGIN pPlug = &(m_pSndFile->m_MixPlugins[nPlug-1]); @@ -1282,11 +1146,6 @@ } } -void CCtrlPatterns::ToggleSplitPluginEditor() -//------------------------------------------- -{ - TogglePluginEditor(true); -} bool CCtrlPatterns::HasValidPlug(UINT instr) //------------------------------------------ Modified: trunk/OpenMPT/mptrack/Ctrl_pat.h =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_pat.h 2009-12-04 19:30:31 UTC (rev 432) +++ trunk/OpenMPT/mptrack/Ctrl_pat.h 2009-12-05 00:31:41 UTC (rev 433) @@ -161,21 +161,12 @@ COrderList m_OrderList; CButton m_BtnPrev, m_BtnNext; CComboBox m_CbnInstrument; -// -> CODE#0012 -// -> DESC="midi keyboard split" - CComboBox m_CbnSplitInstrument,m_CbnSplitNote,m_CbnOctaveModifier,m_CbnSplitVolume; -// -! NEW_FEATURE#0012 CPatEdit m_EditSpacing, m_EditPatName, m_EditOrderListMargins; CSpinButtonCtrl m_SpinInstrument, m_SpinSpacing, m_SpinOrderListMargins; CModControlBar m_ToolBar; INSTRUMENTINDEX m_nInstrument; UINT m_nDetailLevel; BOOL m_bRecord, m_bVUMeters, m_bPluginNames; -// -> CODE#0012 -// -> DESC="midi keyboard split" - UINT m_nSplitInstrument,m_nSplitNote,m_nOctaveModifier,m_nSplitVolume; - BOOL m_nOctaveLink; -// -! NEW_FEATURE#0012 public: CCtrlPatterns(); @@ -227,14 +218,6 @@ afx_msg void OnChangeLoopStatus(); afx_msg void OnSwitchToView(); afx_msg void OnInstrumentChanged(); -// -> CODE#0012 -// -> DESC="midi keyboard split" - afx_msg void OnSplitInstrumentChanged(); - afx_msg void OnSplitNoteChanged(); - afx_msg void OnOctaveModifierChanged(); - afx_msg void OnOctaveLink(); - afx_msg void OnSplitVolumeChanged(); -// -! NEW_FEATURE#0012 afx_msg void OnPrevInstrument(); afx_msg void OnNextInstrument(); afx_msg void OnSpacingChanged(); @@ -249,14 +232,12 @@ afx_msg void OnEditUndo(); afx_msg void OnUpdateRecord(CCmdUI *pCmdUI); afx_msg void TogglePluginEditor(); //rewbs.instroVST - afx_msg void ToggleSplitPluginEditor(); //rewbs.instroVST afx_msg void OnToggleOverflowPaste(); afx_msg LRESULT OnCustomKeyMsg(WPARAM, LPARAM); //}}AFX_MSG DECLARE_MESSAGE_MAP() private: - void TogglePluginEditor(bool); //rewbs.instroVST bool HasValidPlug(UINT instr); public: afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt); Modified: trunk/OpenMPT/mptrack/Mainfrm.h =================================================================== --- trunk/OpenMPT/mptrack/Mainfrm.h 2009-12-04 19:30:31 UTC (rev 432) +++ trunk/OpenMPT/mptrack/Mainfrm.h 2009-12-05 00:31:41 UTC (rev 433) @@ -103,15 +103,6 @@ VIEWMSG_SETCURRENTSAMPLE, // Instrument-Specific VIEWMSG_SETCURRENTINSTRUMENT, -// -> CODE#0012 -// -> DESC="midi keyboard split" -// rewbs.merge: swapped message direction - VIEWMSG_SETSPLITINSTRUMENT, - VIEWMSG_SETSPLITNOTE, - VIEWMSG_SETOCTAVEMODIFIER, - VIEWMSG_SETOCTAVELINK, - VIEWMSG_SETSPLITVOLUME, -// -! CODE#0012 VIEWMSG_DOSCROLL, }; @@ -204,18 +195,6 @@ #define PATTERN_LIVEUPDATETREE 0x40000000 // update active sample / instr icons in treeview -// Keyboard Setup -enum { - KEYBOARD_CUSTOM=0, - KEYBOARD_FT2, - KEYBOARD_IT, - KEYBOARD_MPT, - KEYBOARD_MED -}; - -#define KEYBOARD_MASK 0x0F -#define KEYBOARD_FT2KEYS 0x10 - // Midi Setup #define MIDISETUP_RECORDVELOCITY 0x01 #define MIDISETUP_TRANSPOSEKEYBOARD 0x02 @@ -306,46 +285,7 @@ TIMAGE_PATTERN_OVERFLOWPASTE, }; -////////////////////////////////////////////////////////////////////////// -// MPT Hot Keys -enum { - MPTHOTKEY_TOGGLEEDIT=0, - MPTHOTKEY_PLAYROW, - MPTHOTKEY_CURSORCOPY, - MPTHOTKEY_CURSORPASTE, - MPTHOTKEY_MUTECHANNEL, - MPTHOTKEY_SOLOCHANNEL, - MPTHOTKEY_SELECTCOLUMN, - MPTHOTKEY_TRANSPOSEUP, - MPTHOTKEY_TRANSPOSEDOWN, - MPTHOTKEY_TRANSPOSEOCTUP, - MPTHOTKEY_TRANSPOSEOCTDOWN, - MPTHOTKEY_PATTERNAMPLIFY, - MPTHOTKEY_REPLACEINSTRUMENT, - MPTHOTKEY_INTERPOLATEVOLUME, - MPTHOTKEY_INTERPOLATEEFFECT, - MPTHOTKEY_VISUALIZEEFFECT, //rewbs.fxvis - MAX_MPTHOTKEYS -}; - -typedef struct MPTHOTKEY -{ - UINT nID; // WM_COMMAND Id - description is also loaded from the string id - DWORD nMPTHotKey; // Default hot key - DWORD nFT2HotKey; - DWORD nITHotKey; - LPCSTR pszName; -} MPTHOTKEY, *PMPTHOTKEY; - -#define MPTF_CTRL (HOTKEYF_CONTROL<<16) -#define MPTF_ALT (HOTKEYF_ALT<<16) -#define MPTF_SHIFT (HOTKEYF_SHIFT<<16) -#define MPTF_EXT (HOTKEYF_EXT<<16) - -extern MPTHOTKEY gDefaultHotKeys[MAX_MPTHOTKEYS]; - - ///////////////////////////////////////////////////////////////////////// // Player position notification @@ -400,7 +340,18 @@ }; +///////////////////////////////////////////////////////////////////////// +// Split Keyboard Settings (pattern editor) +#define SPLIT_OCTAVE_RANGE 9 +struct SplitKeyboardSettings +{ + UINT splitInstrument, splitNote, splitVolume; + int octaveModifier; // determines by how many octaves the notes should be transposed up or down + bool octaveLink; // apply octaveModifier +}; + + ///////////////////////////////////////////////////////////////////////// // Misc. Macros Modified: trunk/OpenMPT/mptrack/Moptions.cpp =================================================================== --- trunk/OpenMPT/mptrack/Moptions.cpp 2009-12-04 19:30:31 UTC (rev 432) +++ trunk/OpenMPT/mptrack/Moptions.cpp 2009-12-05 00:31:41 UTC (rev 433) @@ -8,84 +8,7 @@ #pragma warning(disable:4244) -///////////////////////////////////////////////////////// -// CEditKey -/* -BEGIN_MESSAGE_MAP(CEditKey, CEdit) - ON_WM_KEYDOWN() -END_MESSAGE_MAP() - -void CEditKey::OnKeyDown(UINT nChar, UINT, UINT nFlags) -//----------------------------------------------------- -{ - CHAR s[16]; - if (!m_pParent) return; - if (nChar == VK_TAB) - { - Default(); - } else - if (nChar == VK_LEFT) - { - m_pParent->ActivateEdit((m_nId) ? m_nId-1 : 11); - } else - if (nChar == VK_RIGHT) - { - m_pParent->ActivateEdit((m_nId < 11) ? m_nId+1 : 0); - } else - { - if (nFlags & 0x4000) return; - if (m_pParent->SetKey(m_nId, nChar, nFlags)) - { - s[0] = s[1] = 0; - if (nChar != VK_SPACE) CMainFrame::GetKeyName(nFlags << 16, s, sizeof(s)-1); - SetWindowText(s); - m_pParent->ActivateEdit((m_nId+1)%12); - } - } -} - - -BOOL CEditKey::PreTranslateMessage(MSG *pMsg) -//------------------------------------------- -{ - if ((pMsg) && (pMsg->message == WM_KEYDOWN) && (pMsg->wParam == VK_RETURN)) return TRUE; - return CEdit::PreTranslateMessage(pMsg); -} - -const UINT wEditId[12+2] = -{ - IDC_EDIT1, IDC_EDIT2, IDC_EDIT3, IDC_EDIT4, - IDC_EDIT5, IDC_EDIT6, IDC_EDIT7, IDC_EDIT8, - IDC_EDIT9, IDC_EDIT10, IDC_EDIT12, IDC_EDIT13, - IDC_EDIT14, IDC_EDIT15 -}; - - -*/ -// Id, MPT, FT2, IT -MPTHOTKEY gDefaultHotKeys[MAX_MPTHOTKEYS] = -{ - {IDC_PATTERN_RECORD, VK_SPACE|MPTF_CTRL, VK_SPACE, VK_SPACE|MPTF_CTRL, "Toggle record mode"}, - {ID_PATTERN_PLAYROW, VK_RETURN|MPTF_CTRL,VK_RETURN|MPTF_CTRL,'8', "Play current row"}, - {ID_CURSORCOPY, VK_RETURN, VK_RETURN, VK_RETURN, "Quick cursor copy"}, - {ID_CURSORPASTE, VK_SPACE, VK_RETURN|MPTF_SHIFT,VK_SPACE, "Quick cursor paste"}, - {ID_PATTERN_MUTE, 0xffff, 0xffff, VK_F9|MPTF_ALT, "Mute current channel"}, - {ID_PATTERN_SOLO, 0xffff, 0xffff, VK_F10|MPTF_ALT, "Solo current channel"}, - {ID_EDIT_SELECTCOLUMN2, 'L'|MPTF_CTRL, 'L'|MPTF_CTRL, 'L'|MPTF_ALT, "Select current column"}, - {ID_TRANSPOSE_UP, 'Q'|MPTF_CTRL, 'Q'|MPTF_CTRL, 'Q'|MPTF_ALT, "Transpose +1"}, - {ID_TRANSPOSE_DOWN, 'A'|MPTF_CTRL, 'A'|MPTF_CTRL, 'A'|MPTF_ALT, "Transpose -1"}, - {ID_TRANSPOSE_OCTUP, 'Q'|MPTF_CTRL|MPTF_SHIFT, 'Q'|MPTF_CTRL|MPTF_SHIFT, 'Q'|MPTF_CTRL|MPTF_ALT, "Transpose +12"}, - {ID_TRANSPOSE_OCTDOWN, 'A'|MPTF_CTRL|MPTF_SHIFT, 'A'|MPTF_CTRL|MPTF_SHIFT, 'A'|MPTF_CTRL|MPTF_ALT, "Transpose -12"}, - {ID_PATTERN_AMPLIFY, 'M'|MPTF_CTRL, 'M'|MPTF_CTRL, 'J'|MPTF_ALT, "Amplify selection"}, - {ID_PATTERN_SETINSTRUMENT, 'I'|MPTF_CTRL, 'I'|MPTF_CTRL, 'S'|MPTF_ALT, "Replace instrument"}, - {ID_PATTERN_INTERPOLATE_VOLUME,'J'|MPTF_CTRL, 'J'|MPTF_CTRL, 'K'|MPTF_ALT, "Interpolate volume"}, - {ID_PATTERN_INTERPOLATE_EFFECT,'K'|MPTF_CTRL, 'K'|MPTF_CTRL, 'X'|MPTF_ALT, "Interpolate effect"}, - {ID_PATTERN_VISUALIZE_EFFECT,'B'|MPTF_CTRL, 'B'|MPTF_CTRL, 'B'|MPTF_ALT, "Visualize effect"}, //rewbs.fxvis -}; - -//rewbs.customKeys: moved COptionsKeyboard to a separate file. -// removed CNotifyHotKey ////////////////////////////////////////////////////////////// // COptionsColors @@ -485,6 +408,9 @@ CustomColors[MODCOLOR_PANNING] = RGB(0x00, 0x80, 0x80); CustomColors[MODCOLOR_PITCH] = RGB(0x80, 0x80, 0x00); CustomColors[MODCOLOR_GLOBALS] = RGB(0x80, 0x00, 0x00); + CustomColors[MODCOLOR_VUMETER_LO] = RGB(0x00, 0xFF, 0x00); + CustomColors[MODCOLOR_VUMETER_MED] = RGB(0xFF, 0xFF, 0x00); + CustomColors[MODCOLOR_VUMETER_HI] = RGB(0xFF, 0x00, 0x00); CustomColors[MODCOLOR_SEPSHADOW] = GetSysColor(COLOR_BTNSHADOW); CustomColors[MODCOLOR_SEPFACE] = GetSysColor(COLOR_BTNFACE); CustomColors[MODCOLOR_SEPHILITE] = GetSysColor(COLOR_BTNHIGHLIGHT); @@ -513,6 +439,9 @@ CustomColors[MODCOLOR_GLOBALS] = RGB(0xFF, 0xFF, 0x82); CustomColors[MODCOLOR_SAMPLE] = RGB(0xFF, 0xFF, 0x82); CustomColors[MODCOLOR_ENVELOPES] = RGB(0xFF, 0xFF, 0x82); + CustomColors[MODCOLOR_VUMETER_LO] = RGB(0x4B, 0x7C, 0x89); + CustomColors[MODCOLOR_VUMETER_MED] = RGB(0x5F, 0x98, 0xA7); + CustomColors[MODCOLOR_VUMETER_HI] = RGB(0xEA, 0x1C, 0x78); CustomColors[MODCOLOR_SEPSHADOW] = RGB(0x18, 0x28, 0x2C); CustomColors[MODCOLOR_SEPFACE] = RGB(0x49, 0x75, 0x82); CustomColors[MODCOLOR_SEPHILITE] = RGB(0x8A, 0xDB, 0xF3); @@ -541,6 +470,9 @@ CustomColors[MODCOLOR_GLOBALS] = RGB(0x45, 0x9A, 0x49); CustomColors[MODCOLOR_SAMPLE] = RGB(0x8E, 0x14, 0x55); CustomColors[MODCOLOR_ENVELOPES] = RGB(0xA2, 0xA2, 0xA2); + CustomColors[MODCOLOR_VUMETER_LO] = RGB(0x25, 0x7D, 0x00); + CustomColors[MODCOLOR_VUMETER_MED] = RGB(0xEC, 0x99, 0x00); + CustomColors[MODCOLOR_VUMETER_HI] = RGB(0xE1, 0x00, 0x00); CustomColors[MODCOLOR_SEPSHADOW] = RGB(0xB6, 0x96, 0x79); CustomColors[MODCOLOR_SEPFACE] = RGB(0xB6, 0x96, 0x79); CustomColors[MODCOLOR_SEPHILITE] = RGB(0xB6, 0x96, 0x79); @@ -569,6 +501,9 @@ CustomColors[MODCOLOR_GLOBALS] = RGB(0x66, 0x00, 0x00); CustomColors[MODCOLOR_SAMPLE] = RGB(0x00, 0xFF, 0x00); CustomColors[MODCOLOR_ENVELOPES] = RGB(0xFF, 0x00, 0x00); + CustomColors[MODCOLOR_VUMETER_LO] = RGB(0x00, 0xC8, 0x00); + CustomColors[MODCOLOR_VUMETER_MED] = RGB(0xFF, 0xC8, 0x00); + CustomColors[MODCOLOR_VUMETER_HI] = RGB(0xE1, 0x00, 0x00); CustomColors[MODCOLOR_SEPSHADOW] = RGB(0xAC, 0xA8, 0xA1); CustomColors[MODCOLOR_SEPFACE] = RGB(0xD6, 0xD0, 0xC6); CustomColors[MODCOLOR_SEPHILITE] = RGB(0xEC, 0xE8, 0xE1); Modified: trunk/OpenMPT/mptrack/View_pat.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_pat.cpp 2009-12-04 19:30:31 UTC (rev 432) +++ trunk/OpenMPT/mptrack/View_pat.cpp 2009-12-05 00:31:41 UTC (rev 433) @@ -175,9 +175,16 @@ UpdateSizes(); UpdateScrollSize(); SetCurrentPattern(0); - m_nFoundInstrument=0; - m_nLastPlayedRow=0; + m_nFoundInstrument = 0; + m_nLastPlayedRow = 0; m_nLastPlayedOrder = 0; + + // Set up keyboard split + m_SplitKeyboardSettings.splitInstrument = 0; + m_SplitKeyboardSettings.splitNote = NOTE_MIDDLEC - 1; + m_SplitKeyboardSettings.splitVolume = 0; + m_SplitKeyboardSettings.octaveModifier = 0; + m_SplitKeyboardSettings.octaveLink = false; } @@ -3214,26 +3221,6 @@ switch(wParam) { -// -> CODE#0012 -// -> DESC="midi keyboard split" -//rewbs.merge: inverted message direction. - case VIEWMSG_SETSPLITINSTRUMENT: - m_nSplitInstrument = lParam; - break; - case VIEWMSG_SETSPLITNOTE: - m_nSplitNote = lParam; - break; - case VIEWMSG_SETOCTAVEMODIFIER: - m_nOctaveModifier = lParam; - break; - case VIEWMSG_SETOCTAVELINK: - m_bOctaveLink = lParam; - break; - case VIEWMSG_SETSPLITVOLUME: - m_nSplitVolume = lParam; - break; -// -! NEW_FEATURE#0012 - case VIEWMSG_SETCTRLWND: m_hWndCtrl = (HWND)lParam; SetCurrentPattern(SendCtrlMessage(CTRLMSG_GETCURRENTPATTERN)); @@ -3599,6 +3586,7 @@ case kcShowNoteProperties: ShowEditWindow(); return wParam; case kcShowPatternProperties: OnPatternProperties(); return wParam; case kcShowMacroConfig: SendCtrlMessage(CTRLMSG_SETUPMACROS); return wParam; + case kcShowSplitKeyboardSettings: SetSplitKeyboardSettings(); return wParam; case kcShowEditMenu: {CPoint pt = GetPointFromPosition((m_nRow << 16) | m_dwCursor); OnRButtonDown(0, pt); } return wParam; @@ -3933,14 +3921,14 @@ const UINT nTick = pSndFile->m_nTickCount; const PATTERNINDEX nPatPlayback = pSndFile->m_nPattern; - const bool isSplit = (note <= m_nSplitNote); + const bool isSplit = (note <= m_SplitKeyboardSettings.splitNote); UINT ins = 0; if (pModDoc) { if (isSplit) { - ins = m_nSplitInstrument; - if (m_bOctaveLink) note += 12*(m_nOctaveModifier-9); + ins = m_SplitKeyboardSettings.splitInstrument; + if (m_SplitKeyboardSettings.octaveLink) note += 12 * m_SplitKeyboardSettings.octaveModifier; if (note > NOTE_MAX && note < NOTE_NOTECUT) note = NOTE_MAX; if (note<0) note=1; } @@ -4197,13 +4185,16 @@ const bool isSplit = HandleSplit(p, note); // -- write vol data - if (vol>=0 && vol<=64 && !(isSplit && m_nSplitVolume)) { //write valid volume, as long as there's no split volume override. + if (vol >= 0 && vol <= 64 && !(isSplit && m_SplitKeyboardSettings.splitVolume)) //write valid volume, as long as there's no split volume override. + { p->volcmd=VOLCMD_VOLUME; p->vol = vol; - } else if (isSplit && m_nSplitVolume) { //cater for split volume override. - if (m_nSplitVolume>0 && m_nSplitVolume<=64) { + } else if (isSplit && m_SplitKeyboardSettings.splitVolume) //cater for split volume override. + { + if (m_SplitKeyboardSettings.splitVolume > 0 && m_SplitKeyboardSettings.splitVolume <= 64) + { p->volcmd=VOLCMD_VOLUME; - p->vol = m_nSplitVolume; + p->vol = m_SplitKeyboardSettings.splitVolume; } } @@ -4602,7 +4593,7 @@ bool CViewPattern::HandleSplit(MODCOMMAND* p, int note) //----------------------------------------------------- { - if (note>m_nSplitNote) + if (note > m_SplitKeyboardSettings.splitNote) { p->note = note; UINT nins = GetCurrentInstrument(); @@ -4612,12 +4603,12 @@ } else { - if (m_nSplitInstrument) - p->instr = m_nSplitInstrument; + if (m_SplitKeyboardSettings.splitInstrument) + p->instr = m_SplitKeyboardSettings.splitInstrument; else if(GetCurrentInstrument()) p->instr = GetCurrentInstrument(); - if (m_bOctaveLink) - note += 12*(m_nOctaveModifier-9); + if (m_SplitKeyboardSettings.octaveLink) + note += 12 * m_SplitKeyboardSettings.octaveModifier; if (note > NOTE_MAX && note < NOTE_NOTECUT) note = NOTE_MAX; if (note<0) note=1; @@ -5209,3 +5200,16 @@ strcpy(pSndFile->ChnSettings[nChn].szName, dlg.m_sName); pModDoc->UpdateAllViews(NULL, HINT_MODCHANNELS); } + + +void CViewPattern::SetSplitKeyboardSettings() +//------------------------------------------- +{ + CModDoc *pModDoc = GetDocument(); + if(pModDoc == nullptr) return; + CSoundFile *pSndFile = pModDoc->GetSoundFile(); + if(pSndFile == nullptr) return; + + CSplitKeyboadSettings dlg(CMainFrame::GetMainFrame(), pSndFile, &m_SplitKeyboardSettings); + dlg.DoModal(); +} Modified: trunk/OpenMPT/mptrack/View_pat.h =================================================================== --- trunk/OpenMPT/mptrack/View_pat.h 2009-12-04 19:30:31 UTC (rev 432) +++ trunk/OpenMPT/mptrack/View_pat.h 2009-12-05 00:31:41 UTC (rev 433) @@ -84,9 +84,9 @@ CPatternGotoDialog *m_pGotoWnd; SIZE m_szHeader, m_szCell; UINT m_nPattern, m_nRow, m_nMidRow, m_nPlayPat, m_nPlayRow, m_nSpacing, m_nAccelChar, m_nLastPlayedRow, m_nLastPlayedOrder; - UINT m_nSplitInstrument, m_nSplitNote, m_nOctaveModifier, m_nSplitVolume; - BOOL m_bOctaveLink; + SplitKeyboardSettings m_SplitKeyboardSettings; + int m_nXScroll, m_nYScroll; DWORD m_nDragItem, m_nMenuParam, m_nDetailLevel; BOOL m_bDragging, m_bInItemRect, m_bRecord, m_bContinueSearch, m_bWholePatternFitsOnScreen; @@ -308,6 +308,7 @@ afx_msg void OnInitMenu(CMenu* pMenu); private: + void SetSplitKeyboardSettings(); bool HandleSplit(MODCOMMAND* p, int note); bool BuildChannelControlCtxMenu(HMENU hMenu); bool BuildPluginCtxMenu(HMENU hMenu, UINT nChn, CSoundFile* pSndFile); Modified: trunk/OpenMPT/mptrack/dlg_misc.cpp =================================================================== --- trunk/OpenMPT/mptrack/dlg_misc.cpp 2009-12-04 19:30:31 UTC (rev 432) +++ trunk/OpenMPT/mptrack/dlg_misc.cpp 2009-12-05 00:31:41 UTC (rev 433) @@ -2674,6 +2674,120 @@ } +//////////////////////////////////////////////////////////////////////////////////////////// +// Keyboard Split Settings (pattern editor) + +BEGIN_MESSAGE_MAP(CSplitKeyboadSettings, CDialog) + ON_CBN_SELCHANGE(IDC_COMBO_OCTAVEMODIFIER, OnOctaveModifierChanged) +END_MESSAGE_MAP() + + +void CSplitKeyboadSettings::DoDataExchange(CDataExchange* pDX) +//------------------------------------------------------------ +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CSplitKeyboadSettings) + DDX_Control(pDX, IDC_COMBO_SPLITINSTRUMENT, m_CbnSplitInstrument); + DDX_Control(pDX, IDC_COMBO_SPLITNOTE, m_CbnSplitNote); + DDX_Control(pDX, IDC_COMBO_OCTAVEMODIFIER, m_CbnOctaveModifier); + DDX_Control(pDX, IDC_COMBO_SPLITVOLUME, m_CbnSplitVolume); + //}}AFX_DATA_MAP +} + + +BOOL CSplitKeyboadSettings::OnInitDialog() +//---------------------------------------- +{ + if(!m_pSndFile) return FALSE; + + CDialog::OnInitDialog(); + + CHAR s[64]; + + // Split Notes + AppendNotesToControl(m_CbnSplitNote, 0, NOTE_MAX - 1); + m_CbnSplitNote.SetCurSel(m_pOptions->splitNote); + + // Octave modifier + for(int i = -SPLIT_OCTAVE_RANGE; i < SPLIT_OCTAVE_RANGE + 1; i++){ + wsprintf(s,i < 0 ? "Octave -%d" : i > 0 ? "Octave +%d" : "No Change", abs(i)); + int n = m_CbnOctaveModifier.AddString(s); + m_CbnOctaveModifier.SetItemData(n, i); + } + + m_CbnOctaveModifier.SetCurSel(m_pOptions->octaveModifier + SPLIT_OCTAVE_RANGE); + CheckDlgButton(IDC_PATTERN_OCTAVELINK, (m_pOptions->octaveLink && m_pOptions->octaveModifier != 0) ? MF_CHECKED : MF_UNCHECKED); + + // Volume + m_CbnSplitVolume.AddString("No Change"); + m_CbnSplitVolume.SetItemData(0, 0); + for(int i = 1; i <= 64 ; i++){ + wsprintf(s,"%d",i); + int n = m_CbnSplitVolume.AddString(s); + m_CbnSplitVolume.SetItemData(n, i); + } + m_CbnSplitVolume.SetCurSel(m_pOptions->splitVolume); + + // Instruments + m_CbnSplitInstrument.ResetContent(); + m_CbnSplitInstrument.SetItemData(m_CbnSplitInstrument.AddString("No Instrument"), 0); + + if (m_pSndFile->m_nInstruments) { + for (INSTRUMENTINDEX nIns = 1; nIns <= m_pSndFile->m_nInstruments; nIns++) + { + if (m_pSndFile->Instruments[nIns] == nullptr) { + continue; + } + + CString displayName = m_pSndFile->GetPatternViewInstrumentName(nIns); + int n = m_CbnSplitInstrument.AddString(displayName); + m_CbnSplitInstrument.SetItemData(n, nIns); + } + } else + { + for (SAMPLEINDEX nSmp = 1; nSmp <= m_pSndFile->m_nSamples; nSmp++) + { + if ((m_pSndFile->m_szNames[nSmp][0]) || (m_pSndFile->Samples[nSmp].pSample)) + { + wsprintf(s, "%02d: %s", nSmp, m_pSndFile->m_szNames[nSmp]); + int n = m_CbnSplitInstrument.AddString(s); + m_CbnSplitInstrument.SetItemData(n, nSmp); + } + } + } + m_CbnSplitInstrument.SetCurSel(m_pOptions->splitInstrument); + + return TRUE; +} + + +void CSplitKeyboadSettings::OnOK() +//-------------------------------- +{ + CDialog::OnOK(); + + m_pOptions->splitNote = m_CbnSplitNote.GetCurSel(); + m_pOptions->octaveModifier = m_CbnOctaveModifier.GetCurSel() - SPLIT_OCTAVE_RANGE; + m_pOptions->octaveLink = (IsDlgButtonChecked(IDC_PATTERN_OCTAVELINK) == TRUE) ? true : false; + m_pOptions->splitVolume = m_CbnSplitVolume.GetCurSel(); + m_pOptions->splitInstrument = m_CbnSplitInstrument.GetItemData(m_CbnSplitInstrument.GetCurSel()); +} + + +void CSplitKeyboadSettings::OnCancel() +//------------------------------------ +{ + CDialog::OnCancel(); +} + + +void CSplitKeyboadSettings::OnOctaveModifierChanged() +//--------------------------------------------------- +{ + CheckDlgButton(IDC_PATTERN_OCTAVELINK, (m_CbnOctaveModifier.GetCurSel() != 9) ? MF_CHECKED : MF_UNCHECKED); +} + + //////////////////////////////////////////////////////////////////////////////// // // Sample Map Modified: trunk/OpenMPT/mptrack/dlg_misc.h =================================================================== --- trunk/OpenMPT/mptrack/dlg_misc.h 2009-12-04 19:30:31 UTC (rev 432) +++ trunk/OpenMPT/mptrack/dlg_misc.h 2009-12-05 00:31:41 UTC (rev 433) @@ -558,6 +558,38 @@ ///////////////////////////////////////////////////////////////////////// +// Keyboard Split Settings (pattern editor) + +//========================================= +class CSplitKeyboadSettings: public CDialog +//========================================= +{ +protected: + CComboBox m_CbnSplitInstrument,m_CbnSplitNote,m_CbnOctaveModifier,m_CbnSplitVolume; + CSoundFile *m_pSndFile; + +public: + SplitKeyboardSettings *m_pOptions; + + CSplitKeyboadSettings(CWnd *parent, CSoundFile *pSndFile, SplitKeyboardSettings *pOptions):CDialog(IDD_KEYBOARD_SPLIT, parent) + { + m_pSndFile = pSndFile; + m_pOptions = pOptions; + } + +protected: + virtual void DoDataExchange(CDataExchange* pDX); + virtual BOOL OnInitDialog(); + virtual void OnOK(); + virtual void OnCancel(); + + afx_msg void OnOctaveModifierChanged(); + + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////// // Sample Map //================================= Modified: trunk/OpenMPT/mptrack/mptrack.rc =================================================================== --- trunk/OpenMPT/mptrack/mptrack.rc 2009-12-04 19:30:31 UTC (rev 432) +++ trunk/OpenMPT/mptrack/mptrack.rc 2009-12-05 00:31:41 UTC (rev 433) @@ -81,7 +81,25 @@ PUSHBUTTON "Cancel",IDCANCEL,96,36,50,14 END +IDD_KEYBOARD_SPLIT DIALOGEX 0, 0, 184, 137 +STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Keyboard Split Settings" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + DEFPUSHBUTTON "OK",IDOK,72,114,50,14 + PUSHBUTTON "Cancel",IDCANCEL,126,114,50,14 + LTEXT "Split Note",IDC_STATIC,6,8,32,8 + COMBOBOX IDC_COMBO_SPLITNOTE,60,6,54,137,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Instrument",IDC_STATIC,6,26,42,8 + COMBOBOX IDC_COMBO_SPLITINSTRUMENT,60,24,114,125,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Volume",IDC_STATIC,6,44,24,8 + COMBOBOX IDC_COMBO_SPLITVOLUME,60,42,54,146,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + CONTROL "Transpose",IDC_PATTERN_OCTAVELINK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,61,49,10 + COMBOBOX IDC_COMBO_OCTAVEMODIFIER,60,60,54,137,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Enabling instrument, volume or octave change will enable the keyboard split feature. These options are applied to the lower section of the keyboard.",IDC_STATIC,6,78,174,24 +END + ///////////////////////////////////////////////////////////////////////////// // // DESIGNINFO @@ -113,6 +131,14 @@ TOPMARGIN, 7 BOTTOMMARGIN, 51 END + + IDD_KEYBOARD_SPLIT, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 177 + TOPMARGIN, 7 + BOTTOMMARGIN, 130 + END END #endif // APSTUDIO_INVOKED @@ -412,41 +438,30 @@ LTEXT "Song Message:",IDC_STATIC,4,2,76,8 END -IDD_CONTROL_PATTERNS DIALOGEX 0, 0, 585, 114 -STYLE DS_SETFONT | WS_CHILD +IDD_CONTROL_PATTERNS DIALOGEX 0, 0, 560, 86 +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN - CONTROL "Follow Song",IDC_PATTERN_FOLLOWSONG,"Button",BS_AUTOCHECKBOX | BS_FLAT,321,31,55,10 - COMBOBOX IDC_COMBO_INSTRUMENT,19,61,96,137,CBS_DROPDOWNLIST | WS_VSCROLL - CTEXT "Row spacing",IDC_STATIC,171,32,42,8,SS_CENTERIMAGE - EDITTEXT IDC_EDIT_SPACING,219,30,28,12,ES_AUTOHSCROLL | ES_NUMBER | NOT WS_TABSTOP - CONTROL "Spin1",IDC_SPIN_SPACING,"msctls_updown32",UDS_WRAP | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,239,30,11,11 - PUSHBUTTON "<<",IDC_BUTTON2,3,84,14,15,NOT WS_TABSTOP,WS_EX_STATICEDGE - PUSHBUTTON ">>",IDC_BUTTON1,15,84,14,15,NOT WS_TABSTOP,WS_EX_STATICEDGE - CTEXT "Pattern name",IDC_STATIC,9,32,43,8,SS_CENTERIMAGE - EDITTEXT IDC_EDIT_PATTERNNAME,57,30,107,12,ES_AUTOHSCROLL - CONTROL "Toolbar1",IDC_TOOLBAR1,"ToolbarWindow32",WS_GROUP | 0x4d,2,4,372,18 - CONTROL "Spin1",IDC_SPIN_INSTRUMENT,"msctls_updown32",0x0,7,61,11,12 - COMBOBOX IDC_COMBO_SPLITINSTRUMENT,243,60,96,125,CBS_DROPDOWNLIST | WS_VSCROLL - COMBOBOX IDC_COMBO_SPLITNOTE,189,60,32,137,CBS_DROPDOWNLIST | WS_VSCROLL - LTEXT "Note",IDC_STATIC,171,62,16,8 - LTEXT "Instr.",IDC_STATIC,225,62,16,8 - CONTROL "Transpose",IDC_PATTERN_OCTAVELINK,"Button",BS_AUTOCHECKBOX | BS_FLAT,513,61,49,10 - COMBOBOX IDC_COMBO_OCTAVEMODIFIER,465,60,44,137,CBS_DROPDOWNLIST | WS_VSCROLL - COMBOBOX IDC_COMBO_SPLITVOLUME,399,60,30,146,CBS_DROPDOWNLIST | WS_VSCROLL - LTEXT "Vol.",IDC_STATIC,381,62,13,8 - PUSHBUTTON "Plugin",IDC_PATINSTROPLUGGUI,121,61,33,13,0,WS_EX_STATICEDGE - PUSHBUTTON "Plugin",IDC_PATINSTROPLUGGUI2,345,60,30,13,0,WS_EX_STATICEDGE - GROUPBOX "Main instrument",IDC_STATIC,3,48,154,30 - GROUPBOX "Keyboard Split",IDC_STATIC,165,48,402,30 - LTEXT "Oct. shift",IDC_STATIC,435,62,29,8 - GROUPBOX "",IDC_STATIC,3,22,376,24 - CONTROL "Loop Pattern",IDC_PATTERN_LOOP,"Button",BS_AUTOCHECKBOX | BS_FLAT | WS_TABSTOP,261,31,57,10 - EDITTEXT IDC_EDIT_ORDERLIST_MARGINS,3,98,28,12,ES_AUTOHSCROLL | ES_READONLY - CONTROL "",IDC_SPIN_ORDERLIST_MARGINS,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,16,103,11,11 - EDITTEXT IDC_EDIT_SEQUENCE_NAME,453,30,108,12,ES_AUTOHSCROLL - CTEXT "Sequence name",IDC_STATIC_SEQUENCE_NAME,393,32,53,8,SS_CENTERIMAGE - GROUPBOX "",IDC_STATIC_SEQUENCE_NAME_FRAME,387,22,180,24 + CONTROL "Follow Song",IDC_PATTERN_FOLLOWSONG,"Button",BS_AUTOCHECKBOX | BS_FLAT,312,31,55,10 + COMBOBOX IDC_COMBO_INSTRUMENT,18,30,96,137,CBS_DROPDOWNLIST | WS_VSCROLL + CTEXT "Row Spacing",IDC_STATIC,162,32,42,8,SS_CENTERIMAGE + EDITTEXT IDC_EDIT_SPACING,210,30,28,12,ES_AUTOHSCROLL | ES_NUMBER | NOT WS_TABSTOP + CONTROL "Spin1",IDC_SPIN_SPACING,"msctls_updown32",UDS_WRAP | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,230,30,11,11 + PUSHBUTTON "<<",IDC_BUTTON2,3,51,14,15,NOT WS_TABSTOP,WS_EX_STATICEDGE + PUSHBUTTON ">>",IDC_BUTTON1,15,51,14,15,NOT WS_TABSTOP,WS_EX_STATICEDGE + LTEXT "Pattern Name",IDC_STATIC,384,32,48,8,SS_CENTERIMAGE + EDITTEXT IDC_EDIT_PATTERNNAME,439,29,108,12,ES_AUTOHSCROLL + CONTROL "Toolbar1",IDC_TOOLBAR1,"ToolbarWindow32",WS_GROUP | 0x4d,2,4,370,18 + CONTROL "Spin1",IDC_SPIN_INSTRUMENT,"msctls_updown32",0x0,6,30,11,12 + PUSHBUTTON "Plugin",IDC_PATINSTROPLUGGUI,120,30,33,13,0,WS_EX_STATICEDGE + GROUPBOX "",IDC_STATIC,3,22,369,24 + CONTROL "Loop Pattern",IDC_PATTERN_LOOP,"Button",BS_AUTOCHECKBOX | BS_FLAT | WS_TABSTOP,252,31,57,10 + EDITTEXT IDC_EDIT_ORDERLIST_MARGINS,3,65,28,12,ES_AUTOHSCROLL | ES_READONLY + CONTROL "",IDC_SPIN_ORDERLIST_MARGINS,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,16,70,11,11 + EDITTEXT IDC_EDIT_SEQUENCE_NAME,439,8,108,12,ES_AUTOHSCROLL + CTEXT "Sequence Name",IDC_STATIC_SEQUENCE_NAME,384,10,53,8,SS_CENTERIMAGE + GROUPBOX "",IDC_STATIC_SEQUENCE_NAME_FRAME,378,0,174,24 + GROUPBOX "",IDC_STATIC,378,22,174,24 END IDD_CONTROL_SAMPLES DIALOGEX 0, 0, 544, 106 @@ -1484,14 +1499,13 @@ IDD_CONTROL_PATTERNS, DIALOG BEGIN - RIGHTMARGIN, 573 + RIGHTMARGIN, 548 VERTGUIDE, 39 VERTGUIDE, 134 - BOTTOMMARGIN, 104 + BOTTOMMARGIN, 76 HORZGUIDE, 37 HORZGUIDE, 61 HORZGUIDE, 73 - HORZGUIDE, 87 END IDD_CONTROL_SAMPLES, DIALOG Modified: trunk/OpenMPT/mptrack/resource.h =================================================================== --- trunk/OpenMPT/mptrack/resource.h 2009-12-04 19:30:31 UTC (rev 432) +++ trunk/OpenMPT/mptrack/resource.h 2009-12-05 00:31:41 UTC (rev 433) @@ -116,6 +116,7 @@ #define IDR_BUILTIN_TUNINGS 520 #define IDD_CLEANUP_SONG 521 #define IDD_CHANNEL_NAME 522 +#define IDD_KEYBOARD_SPLIT 523 #define IDC_BUTTON1 1001 #define IDC_BUTTON2 1002 #define IDC_BUTTON3 1003 @@ -1151,18 +1152,18 @@ #define ID_ORDERLIST_EDIT_COPY 59231 #define ID_ORDERLIST_EDIT_CUT 59232 #define ID_ORDERLIST_EDIT_PASTE 59233 -#define ID_CHANNEL_RENAME 59234 -#define ID_EDIT_PASTEFLOOD 59235 +#define ID_CHANNEL_RENAME 59234 +#define ID_EDIT_PASTEFLOOD 59235 #define ID_MODTREE_DUPLICATE 59236 -#define ID_MODTREE_INSERT 59237 -#define ID_MODTREE_SWITCHTO 59238 +#define ID_MODTREE_INSERT 59237 +#define ID_MODTREE_SWITCHTO 59238 // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_3D_CONTROLS 1 -#define _APS_NEXT_RESOURCE_VALUE 523 +#define _APS_NEXT_RESOURCE_VALUE 524 #define _APS_NEXT_COMMAND_VALUE 59239 #define _APS_NEXT_CONTROL_VALUE 2412 #define _APS_NEXT_SYMED_VALUE 901 Modified: trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb =================================================================== --- trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb 2009-12-04 19:30:31 UTC (rev 432) +++ trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb 2009-12-05 00:31:41 UTC (rev 433) @@ -78,6 +78,7 @@ 2:1806:2:68:1 //Duplicate pattern: Ctrl+D (KeyDown) 2:1662:6:80:1 //Toggle channel's plugin editor: Ctrl+Alt+P (KeyDown) 2:1062:0:93:1 //Show note properties: ANWENDUNG (KeyDown) +2:1819:2:69:1 //Split Keyboard Settings dialog: Ctrl+E (KeyDown) 2:1780:2:80:1 //Show playback time at current row: Ctrl+P (KeyDown) 2:1786:2:82:1 //Reset channel: Ctrl+R (KeyDown) 2:1007:2:81:5 //Transpose +1: Ctrl+Q (KeyDown|KeyHold) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2009-12-06 15:56:40
|
Revision: 436 http://modplug.svn.sourceforge.net/modplug/?rev=436&view=rev Author: saga-games Date: 2009-12-06 15:56:30 +0000 (Sun, 06 Dec 2009) Log Message: ----------- [Fix] IT/MPTM Loader: "MPT extensions are making my life hard so they must be wrong" - Fixed again the combination of empty sample slots and the MPTX extension hack... [Fix] IMF Loader: Slightly wrong instrument loader (this for once didn't break anything, though) [Imp] Pattern editor: Grey out pattern name input field when in MOD/S3M mode [Imp] Added "split keyboard settings" dialog to the "edit" menu and updated the shortcuts there (goto was missing) Modified Paths: -------------- trunk/OpenMPT/mptrack/Ctrl_pat.cpp trunk/OpenMPT/mptrack/InputHandler.cpp trunk/OpenMPT/mptrack/mptrack.rc trunk/OpenMPT/mptrack/resource.h trunk/OpenMPT/soundlib/Load_imf.cpp trunk/OpenMPT/soundlib/Load_it.cpp Modified: trunk/OpenMPT/mptrack/Ctrl_pat.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_pat.cpp 2009-12-05 19:44:47 UTC (rev 435) +++ trunk/OpenMPT/mptrack/Ctrl_pat.cpp 2009-12-06 15:56:30 UTC (rev 436) @@ -231,9 +231,13 @@ else ::EnableWindow(::GetDlgItem(m_hWnd, IDC_PATINSTROPLUGGUI), false); - // Enable/disablemultisequence controls according the current modtype. + // Enable/disable multisequence controls according the current modtype. GetDlgItem(IDC_STATIC_SEQUENCE_NAME)->EnableWindow( (m_pSndFile->GetType() == MOD_TYPE_MPT) ? SW_SHOW : SW_HIDE); GetDlgItem(IDC_EDIT_SEQUENCE_NAME)->EnableWindow( (m_pSndFile->GetType() == MOD_TYPE_MPT) ? SW_SHOW : SW_HIDE); + + // Enable/disable pattern names + GetDlgItem(IDC_STATIC_PATTERNNAME)->EnableWindow( (m_pSndFile->GetType() & (MOD_TYPE_MPT|MOD_TYPE_IT|MOD_TYPE_XM)) ? SW_SHOW : SW_HIDE); + GetDlgItem(IDC_EDIT_PATTERNNAME)->EnableWindow( (m_pSndFile->GetType() & (MOD_TYPE_MPT|MOD_TYPE_IT|MOD_TYPE_XM)) ? SW_SHOW : SW_HIDE); } //end rewbs.instroVST if (dwHintMask & HINT_MPTOPTIONS) Modified: trunk/OpenMPT/mptrack/InputHandler.cpp =================================================================== --- trunk/OpenMPT/mptrack/InputHandler.cpp 2009-12-05 19:44:47 UTC (rev 435) +++ trunk/OpenMPT/mptrack/InputHandler.cpp 2009-12-06 15:56:30 UTC (rev 436) @@ -440,11 +440,13 @@ case ID_EDIT_COPY: s="&Copy\t"; c=kcEditCopy; break; case ID_EDIT_PASTE: s="&Paste\t"; c=kcEditPaste; break; case ID_EDIT_PASTE_SPECIAL: s="&Mix Paste\t"; c=kcEditMixPaste; break; - case ID_EDIT_PASTEFLOOD: s="&Paste Flood\t"; c=kcEditPasteFlood; break; - case ID_EDIT_PUSHFORWARDPASTE: s="&Push Forward Paste\t"; c=kcEditPushForwardPaste; break; + case ID_EDIT_PASTEFLOOD: s="Paste Fl&ood\t"; c=kcEditPasteFlood; break; + case ID_EDIT_PUSHFORWARDPASTE: s="Push For&ward Paste\t"; c=kcEditPushForwardPaste; break; case ID_EDIT_SELECT_ALL: s="&Select All\t"; c=kcEditSelectAll; break; case ID_EDIT_FIND: s="&Find\t"; c=kcEditFind; break; case ID_EDIT_FINDNEXT: s="Find &Next\t"; c=kcEditFindNext; break; + case ID_EDIT_GOTO_MENU: s="&Goto\t"; c=kcPatternGoto; break; + case ID_EDIT_SPLITKEYBOARDSETTINGS: s="Split &Keyboard Settings\t"; c=kcShowSplitKeyboardSettings; break; case ID_VIEW_GLOBALS: s="&General\t"; c=kcViewGeneral; break; case ID_VIEW_SAMPLES: s="&Samples\t"; c=kcViewSamples; break; @@ -461,7 +463,6 @@ case ID_VIEW_SONGPROPERTIES:s="Song P&roperties...\t"; c=kcViewSongProperties; break; //rewbs.graph case ID_VIEW_MIDIMAPPING: s="&MIDI mapping...\t"; c = kcViewMIDImapping; break; - /* case ID_WINDOW_NEW: s="&New Window\t"; c=kcWindowNew; break; case ID_WINDOW_CASCADE: s="&Cascade\t"; c=kcWindowCascade; break; @@ -512,6 +513,8 @@ pMenu->ModifyMenu(ID_EDIT_SELECT_ALL, MF_BYCOMMAND | MF_STRING, ID_EDIT_SELECT_ALL, GetMenuText(ID_EDIT_SELECT_ALL)); pMenu->ModifyMenu(ID_EDIT_FIND, MF_BYCOMMAND | MF_STRING, ID_EDIT_FIND, GetMenuText(ID_EDIT_FIND)); pMenu->ModifyMenu(ID_EDIT_FINDNEXT, MF_BYCOMMAND | MF_STRING, ID_EDIT_FINDNEXT, GetMenuText(ID_EDIT_FINDNEXT)); + pMenu->ModifyMenu(ID_EDIT_GOTO_MENU, MF_BYCOMMAND | MF_STRING, ID_EDIT_GOTO_MENU, GetMenuText(ID_EDIT_GOTO_MENU)); + pMenu->ModifyMenu(ID_EDIT_SPLITKEYBOARDSETTINGS, MF_BYCOMMAND | MF_STRING, ID_EDIT_SPLITKEYBOARDSETTINGS, GetMenuText(ID_EDIT_SPLITKEYBOARDSETTINGS)); pMenu->ModifyMenu(ID_VIEW_GLOBALS, MF_BYCOMMAND | MF_STRING, ID_VIEW_GLOBALS, GetMenuText(ID_VIEW_GLOBALS)); pMenu->ModifyMenu(ID_VIEW_SAMPLES, MF_BYCOMMAND | MF_STRING, ID_VIEW_SAMPLES, GetMenuText(ID_VIEW_SAMPLES)); Modified: trunk/OpenMPT/mptrack/mptrack.rc =================================================================== --- trunk/OpenMPT/mptrack/mptrack.rc 2009-12-05 19:44:47 UTC (rev 435) +++ trunk/OpenMPT/mptrack/mptrack.rc 2009-12-06 15:56:30 UTC (rev 436) @@ -449,7 +449,7 @@ CONTROL "Spin1",IDC_SPIN_SPACING,"msctls_updown32",UDS_WRAP | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,236,30,11,11 PUSHBUTTON "<<",IDC_BUTTON2,3,51,14,15,NOT WS_TABSTOP,WS_EX_STATICEDGE PUSHBUTTON ">>",IDC_BUTTON1,15,51,14,15,NOT WS_TABSTOP,WS_EX_STATICEDGE - LTEXT "Pattern Name",IDC_STATIC,384,32,48,8,SS_CENTERIMAGE + LTEXT "Pattern Name",IDC_STATIC_PATTERNNAME,384,32,48,8,SS_CENTERIMAGE EDITTEXT IDC_EDIT_PATTERNNAME,439,30,108,12,ES_AUTOHSCROLL CONTROL "Toolbar1",IDC_TOOLBAR1,"ToolbarWindow32",WS_GROUP | 0x4d,2,4,370,18 CONTROL "Spin1",IDC_SPIN_INSTRUMENT,"msctls_updown32",0x0,6,30,11,12 @@ -1845,6 +1845,7 @@ MENUITEM "&Find\tCtrl+F", ID_EDIT_FIND MENUITEM "Find Next\tF3", ID_EDIT_FINDNEXT MENUITEM "Go to...", ID_EDIT_GOTO_MENU + MENUITEM "Split Keyboard Settings", ID_EDIT_SPLITKEYBOARDSETTINGS END POPUP "&View" BEGIN Modified: trunk/OpenMPT/mptrack/resource.h =================================================================== --- trunk/OpenMPT/mptrack/resource.h 2009-12-05 19:44:47 UTC (rev 435) +++ trunk/OpenMPT/mptrack/resource.h 2009-12-06 15:56:30 UTC (rev 436) @@ -912,6 +912,7 @@ #define IDC_CHECK_PT1X 2409 #define IDC_STATIC_CHANNEL_NAME 2410 #define IDC_EDIT_CHANNEL_NAME 2411 +#define IDC_STATIC_PATTERNNAME 2412 #define ID_FILE_NEWMOD 32771 #define ID_FILE_NEWXM 32772 #define ID_FILE_NEWS3M 32773 @@ -1157,6 +1158,7 @@ #define ID_MODTREE_INSERT 59237 #define ID_MODTREE_SWITCHTO 59238 #define ID_EDIT_PUSHFORWARDPASTE 59239 +#define ID_EDIT_SPLITKEYBOARDSETTINGS 59240 // Next default values for new objects // @@ -1164,8 +1166,8 @@ #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_3D_CONTROLS 1 #define _APS_NEXT_RESOURCE_VALUE 524 -#define _APS_NEXT_COMMAND_VALUE 59240 -#define _APS_NEXT_CONTROL_VALUE 2412 +#define _APS_NEXT_COMMAND_VALUE 59241 +#define _APS_NEXT_CONTROL_VALUE 2413 #define _APS_NEXT_SYMED_VALUE 901 #endif #endif Modified: trunk/OpenMPT/soundlib/Load_imf.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_imf.cpp 2009-12-05 19:44:47 UTC (rev 435) +++ trunk/OpenMPT/soundlib/Load_imf.cpp 2009-12-06 15:56:30 UTC (rev 436) @@ -476,7 +476,7 @@ } pIns->nFadeOut = imfins.fadeout; - pIns->nGlobalVol = 128; + pIns->nGlobalVol = 64; load_imf_envelope(&pIns->VolEnv, &imfins, IMF_ENV_VOL); load_imf_envelope(&pIns->PanEnv, &imfins, IMF_ENV_PAN); Modified: trunk/OpenMPT/soundlib/Load_it.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_it.cpp 2009-12-05 19:44:47 UTC (rev 435) +++ trunk/OpenMPT/soundlib/Load_it.cpp 2009-12-06 15:56:30 UTC (rev 436) @@ -1246,6 +1246,9 @@ pSmp->nVibRate = pis->vis; pSmp->nVibDepth = pis->vid & 0x7F; pSmp->nVibSweep = pis->vir; //(pis->vir + 3) / 4; + + if(pis->samplepointer) lastSampleOffset = pis->samplepointer; // MPTX hack + if ((pis->samplepointer) && (pis->samplepointer < dwMemLength) && (pis->length)) { pSmp->nLength = pis->length; @@ -1268,8 +1271,7 @@ // -> CODE#0027 // -> DESC="per-instrument volume ramping setup (refered as attack)" // ReadSample(&Ins[nsmp+1], flags, (LPSTR)(lpStream+pis->samplepointer), dwMemLength - pis->samplepointer); - if(pis->samplepointer) - lastSampleOffset = pis->samplepointer + ReadSample(&Samples[nsmp+1], flags, (LPSTR)(lpStream+pis->samplepointer), dwMemLength - pis->samplepointer); + lastSampleOffset = pis->samplepointer + ReadSample(&Samples[nsmp+1], flags, (LPSTR)(lpStream+pis->samplepointer), dwMemLength - pis->samplepointer); // -! NEW_FEATURE#0027 } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2009-12-06 19:22:58
|
Revision: 437 http://modplug.svn.sourceforge.net/modplug/?rev=437&view=rev Author: saga-games Date: 2009-12-06 19:22:50 +0000 (Sun, 06 Dec 2009) Log Message: ----------- [Fix] Pattern Editor: Amplify acted VERY weird when it was applied on an instrument that's not assigned to any sample. Should be a bit better now. [Fix] Pattern Editor: Amplify doesn't use volume column in mod format anymore. [Ref] Small changes to playback engine Modified Paths: -------------- trunk/OpenMPT/mptrack/View_pat.cpp trunk/OpenMPT/soundlib/Snd_fx.cpp Modified: trunk/OpenMPT/mptrack/View_pat.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_pat.cpp 2009-12-06 15:56:30 UTC (rev 436) +++ trunk/OpenMPT/mptrack/View_pat.cpp 2009-12-06 19:22:50 UTC (rev 437) @@ -2699,115 +2699,145 @@ if (pSndFile->Patterns[m_nPattern]) { MODCOMMAND *p = pSndFile->Patterns[m_nPattern]; - for (UINT j=0; j<pSndFile->m_nChannels; j++) + + CHANNELINDEX firstChannel = (m_dwBeginSel & 0xFFFF) >> 3, lastChannel = (m_dwEndSel & 0xFFFF) >> 3; + ROWINDEX firstRow = (m_dwBeginSel >> 16), lastRow = (m_dwEndSel >> 16); + firstChannel = CLAMP(firstChannel, 0, pSndFile->m_nChannels - 1); + lastChannel = CLAMP(lastChannel, 0, pSndFile->m_nChannels - 1); + firstRow = CLAMP(firstRow, 0, pSndFile->PatternSize[m_nPattern] - 1); + lastRow = CLAMP(lastRow, 0, pSndFile->PatternSize[m_nPattern] - 1); + + for (CHANNELINDEX nChn = firstChannel; nChn <= lastChannel; nChn++) { - for (UINT i=0; i<pSndFile->PatternSize[m_nPattern]; i++) + for (ROWINDEX nRow = firstRow; nRow <= lastRow; nRow++) { - if ((i >= (m_dwBeginSel >> 16)) && (i <= (m_dwEndSel >> 16))) + MODCOMMAND *m = p + nRow * pSndFile->m_nChannels + nChn; + if ((m->command == CMD_VOLUME) && (m->param <= 64)) { - MODCOMMAND *m = p + i*pSndFile->m_nChannels+j; - if ((m->command == CMD_VOLUME) && (m->param <= 64)) + chvol[nChn] = m->param; + break; + } + if (m->volcmd == VOLCMD_VOLUME) + { + chvol[nChn] = m->vol; + break; + } + if ((m->note) && (m->note <= NOTE_MAX) && (m->instr)) + { + UINT nSmp = m->instr; + if (pSndFile->m_nInstruments) { - chvol[j] = m->param; - break; + if ((nSmp <= pSndFile->m_nInstruments) && (pSndFile->Instruments[nSmp])) + { + nSmp = pSndFile->Instruments[nSmp]->Keyboard[m->note]; + if(!nSmp) chvol[nChn] = 64; // hack for instruments without samples + } else + { + nSmp = 0; + } } - if (m->volcmd == VOLCMD_VOLUME) + if ((nSmp) && (nSmp <= pSndFile->m_nSamples)) { - chvol[j] = m->vol; + chvol[nChn] = (BYTE)(pSndFile->Samples[nSmp].nVolume >> 2); break; } - if ((m->note) && (m->note < 0x80) && (m->instr)) - { - UINT nSmp = m->instr; - if (pSndFile->m_nInstruments) + else + { //nonexistant sample and no volume present in patten? assume volume=64. + if(pSndFile->GetType() == MOD_TYPE_MOD) { - if ((nSmp <= pSndFile->m_nInstruments) && (pSndFile->Instruments[nSmp])) - { - nSmp = pSndFile->Instruments[nSmp]->Keyboard[m->note]; - } else - { - nSmp = 0; - } - } - if ((nSmp) && (nSmp <= pSndFile->m_nSamples)) + m->command = CMD_VOLUME; + m->param = 64; + } else { - chvol[j] = (BYTE)(pSndFile->Samples[nSmp].nVolume >> 2); - break; - } - else - { //nonexistant sample and no volume present in patten? assume volume=64. m->volcmd = VOLCMD_VOLUME; - chvol[j] = 64; m->vol = 64; - break; } + chvol[nChn] = 64; + break; } } } } - for (UINT y=0; y<pSndFile->PatternSize[m_nPattern]; y++) + + // adjust min/max channel if they're only partly selected (i.e. volume column is not covered) + if(((firstChannel << 3) | 2) < (m_dwBeginSel & 0xFFFF)) firstChannel++; + if(((lastChannel << 3) | 2) > (m_dwEndSel & 0xFFFF)) lastChannel--; + + for (ROWINDEX nRow = firstRow; nRow <= lastRow; nRow++) { - if ((y >= (m_dwBeginSel >> 16)) && (y <= (m_dwEndSel >> 16))) + p = pSndFile->Patterns[m_nPattern] + nRow * pSndFile->m_nChannels; + int cy = lastRow - firstRow + 1; // total rows (for fading) + for (CHANNELINDEX nChn = firstChannel; nChn <= lastChannel; nChn++) { - int cy = (m_dwEndSel>>16) - (m_dwBeginSel>>16) + 1; - int y0 = (m_dwBeginSel>>16); - for (UINT x=0; x<pSndFile->m_nChannels; x++) + if ((!p[nChn].volcmd) && (p[nChn].command != CMD_VOLUME) + && (p[nChn].note) && (p[nChn].note <= NOTE_MAX) && (p[nChn].instr)) { - UINT col = (x<<3) | 2; - if ((col >= (m_dwBeginSel & 0xFFFF)) && (col <= (m_dwEndSel & 0xFFFF))) + UINT nSmp = p[nChn].instr; + bool overrideSampleVol = false; + if (pSndFile->m_nInstruments) { - if ((!p[x].volcmd) && (p[x].command != CMD_VOLUME) - && (p[x].note) && (p[x].note < 0x80) && (p[x].instr)) + if ((nSmp <= pSndFile->m_nInstruments) && (pSndFile->Instruments[nSmp])) { - UINT nSmp = p[x].instr; - if (pSndFile->m_nInstruments) + nSmp = pSndFile->Instruments[nSmp]->Keyboard[p[nChn].note]; + // hack for instruments without samples + if(!nSmp) { - if ((nSmp <= pSndFile->m_nInstruments) && (pSndFile->Instruments[nSmp])) - { - nSmp = pSndFile->Instruments[nSmp]->Keyboard[p[x].note]; - } else - { - nSmp = 0; - } + nSmp = 1; + overrideSampleVol = true; } - if ((nSmp) && (nSmp <= pSndFile->m_nSamples)) - { - p[x].volcmd = VOLCMD_VOLUME; - p[x].vol = pSndFile->Samples[nSmp].nVolume >> 2; - } - } - if (p[x].volcmd == VOLCMD_VOLUME) chvol[x] = (BYTE)p[x].vol; - if (((dlg.m_bFadeIn) || (dlg.m_bFadeOut)) && (p[x].command != CMD_VOLUME) && (!p[x].volcmd)) + } else { - p[x].volcmd = VOLCMD_VOLUME; - p[x].vol = chvol[x]; + nSmp = 0; } - if (p[x].volcmd == VOLCMD_VOLUME) - { - int vol = p[x].vol * dlg.m_nFactor; - if (dlg.m_bFadeIn) vol = (vol * (y+1-y0)) / cy; - if (dlg.m_bFadeOut) vol = (vol * (cy+y0-y)) / cy; - vol = (vol+50) / 100; - if (vol > 64) vol = 64; - p[x].vol = (BYTE)vol; - } } - col = (x<<3) | 3; - if ((col >= (m_dwBeginSel & 0xFFFF)) && (col <= (m_dwEndSel & 0xFFFF))) + if ((nSmp) && (nSmp <= pSndFile->m_nSamples)) { - if ((p[x].command == CMD_VOLUME) && (p[x].param <= 64)) + if(pSndFile->GetType() == MOD_TYPE_MOD) { - int vol = p[x].param * dlg.m_nFactor; - if (dlg.m_bFadeIn) vol = (vol * (y+1-y0)) / cy; - if (dlg.m_bFadeOut) vol = (vol * (cy+y0-y)) / cy; - vol = (vol+50) / 100; - if (vol > 64) vol = 64; - p[x].param = (BYTE)vol; + p[nChn].command = CMD_VOLUME; + p[nChn].param = (overrideSampleVol) ? 64 : pSndFile->Samples[nSmp].nVolume >> 2; + } else + { + p[nChn].volcmd = VOLCMD_VOLUME; + p[nChn].vol = (overrideSampleVol) ? 64 : pSndFile->Samples[nSmp].nVolume >> 2; } } } + if (p[nChn].volcmd == VOLCMD_VOLUME) chvol[nChn] = (BYTE)p[nChn].vol; + if (((dlg.m_bFadeIn) || (dlg.m_bFadeOut)) && (p[nChn].command != CMD_VOLUME) && (!p[nChn].volcmd)) + { + if(pSndFile->GetType() == MOD_TYPE_MOD) + { + p[nChn].command = CMD_VOLUME; + p[nChn].param = chvol[nChn]; + } else + { + p[nChn].volcmd = VOLCMD_VOLUME; + p[nChn].vol = chvol[nChn]; + } + } + if (p[nChn].volcmd == VOLCMD_VOLUME) + { + int vol = p[nChn].vol * dlg.m_nFactor; + if (dlg.m_bFadeIn) vol = (vol * (nRow+1-firstRow)) / cy; + if (dlg.m_bFadeOut) vol = (vol * (cy+firstRow-nRow)) / cy; + vol = (vol+50) / 100; + if (vol > 64) vol = 64; + p[nChn].vol = (BYTE)vol; + } + if ((((nChn << 3) | 3) >= (m_dwBeginSel & 0xFFFF)) && (((nChn << 3) | 3) <= (m_dwEndSel & 0xFFFF))) + { + if ((p[nChn].command == CMD_VOLUME) && (p[nChn].param <= 64)) + { + int vol = p[nChn].param * dlg.m_nFactor; + if (dlg.m_bFadeIn) vol = (vol * (nRow + 1 - firstRow)) / cy; + if (dlg.m_bFadeOut) vol = (vol * (cy + firstRow - nRow)) / cy; + vol = (vol + 50) / 100; + if (vol > 64) vol = 64; + p[nChn].param = (BYTE)vol; + } + } } - p += pSndFile->m_nChannels; } } pModDoc->SetModified(); Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp =================================================================== --- trunk/OpenMPT/soundlib/Snd_fx.cpp 2009-12-06 15:56:30 UTC (rev 436) +++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2009-12-06 19:22:50 UTC (rev 437) @@ -1849,7 +1849,7 @@ // Midi Controller case CMD_MIDI: - if (m_nTickCount) break; + if(!(m_dwSongFlags & SONG_FIRSTTICK)) break; if (param < 0x80){ ProcessMidiMacro(nChn, &m_MidiCfg.szMidiSFXExt[pChn->nActiveMacro << 5], param); } else { @@ -3351,7 +3351,6 @@ void CSoundFile::SetSpeed(UINT param) //----------------------------------- { - UINT max = (m_nType & (MOD_TYPE_IT|MOD_TYPE_MPT|MOD_TYPE_S3M)) ? 256 : 128; // Modplug Tracker and Mod-Plugin don't do this check #ifndef MODPLUG_TRACKER #ifndef FASTSOUNDLIB @@ -3366,7 +3365,7 @@ #endif // FASTSOUNDLIB #endif // MODPLUG_TRACKER //if ((m_nType & MOD_TYPE_S3M) && (param > 0x80)) param -= 0x80; - if ((param) && (param <= max)) m_nMusicSpeed = param; + if ((param) && (param <= GetModSpecifications().speedMax)) m_nMusicSpeed = param; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2009-12-11 23:40:12
|
Revision: 440 http://modplug.svn.sourceforge.net/modplug/?rev=440&view=rev Author: saga-games Date: 2009-12-11 23:39:57 +0000 (Fri, 11 Dec 2009) Log Message: ----------- [Fix] XM Compatibility: A somewhat more compatible Rxy effect. Still needs more testing, as it's approximately the same algorithm as in Milky (which I know is not 100% correct). [Fix] Comments tab: The lower part of the tab was receiving update messages that were not even meaningful to this tab (f.e. speed changes), so it was updating quite often modules that have alternating speed... Only letting in important update messages now. [Fix] Wave Convert: The wave convert dialog had two default buttons, one of them (the "default default button") didn't make sense. Modified Paths: -------------- trunk/OpenMPT/mptrack/mptrack.rc trunk/OpenMPT/mptrack/view_com.cpp trunk/OpenMPT/soundlib/Snd_fx.cpp trunk/OpenMPT/soundlib/Sndfile.h Modified: trunk/OpenMPT/mptrack/mptrack.rc =================================================================== --- trunk/OpenMPT/mptrack/mptrack.rc 2009-12-08 19:42:46 UTC (rev 439) +++ trunk/OpenMPT/mptrack/mptrack.rc 2009-12-11 23:39:57 UTC (rev 440) @@ -220,7 +220,7 @@ END IDD_WAVECONVERT DIALOGEX 0, 0, 262, 197 -STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Wave Convert" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN @@ -229,7 +229,7 @@ GROUPBOX "Render",IDC_STATIC,6,6,192,90 COMBOBOX IDC_COMBO1,18,18,54,82,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_COMBO2,78,18,73,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - DEFPUSHBUTTON "Change Player Options",IDC_PLAYEROPTIONS,18,36,81,14,BS_CENTER + PUSHBUTTON "Change Player Options",IDC_PLAYEROPTIONS,18,36,81,14,BS_CENTER CONTROL "Channel mode (one file per channel)",IDC_CHECK4,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,54,168,8 CONTROL "Normalize Output",IDC_CHECK5,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,66,73,10 CONTROL "High quality resampling",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,102,66,84,10 Modified: trunk/OpenMPT/mptrack/view_com.cpp =================================================================== --- trunk/OpenMPT/mptrack/view_com.cpp 2009-12-08 19:42:46 UTC (rev 439) +++ trunk/OpenMPT/mptrack/view_com.cpp 2009-12-11 23:39:57 UTC (rev 440) @@ -180,7 +180,10 @@ m_ToolBar.UpdateStyle(); lHint &= ~HINT_MPTOPTIONS; } - lHint &= ~(HINT_SAMPLEDATA|HINT_PATTERNDATA|HINT_ENVELOPE); + lHint &= (HINT_MODTYPE + |HINT_SMPNAMES|HINT_SAMPLEINFO + |HINT_INSNAMES|HINT_INSTRUMENT + /*|HINT_PATNAMES|HINT_PATTERNROW*/); // pattern stuff currently unused if (!lHint) return; m_ItemList.SetRedraw(FALSE); // Add sample headers Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp =================================================================== --- trunk/OpenMPT/soundlib/Snd_fx.cpp 2009-12-08 19:42:46 UTC (rev 439) +++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2009-12-11 23:39:57 UTC (rev 440) @@ -3122,13 +3122,13 @@ } //end rewbs.volOffset: -void CSoundFile::RetrigNote(UINT nChn, UINT param, UINT offset) //rewbs.VolOffset: added offset param. -//------------------------------------------------------------- +void CSoundFile::RetrigNote(UINT nChn, int param, UINT offset) //rewbs.VolOffset: added offset param. +//------------------------------------------------------------ { // Retrig: bit 8 is set if it's the new XM retrig MODCHANNEL *pChn = &Chn[nChn]; - UINT nRetrigSpeed = param & 0x0F; - UINT nRetrigCount = pChn->nRetrigCount; + int nRetrigSpeed = param & 0x0F; + int nRetrigCount = pChn->nRetrigCount; bool bDoRetrig = false; if(IsCompatibleMode(TRK_IMPULSETRACKER)) @@ -3144,8 +3144,26 @@ bDoRetrig = true; } } - else + else if(IsCompatibleMode(TRK_FASTTRACKER2) && (param & 0x100)) { + // buggy-like-hell FT2 Rxy retrig! + + if(m_dwSongFlags & SONG_FIRSTTICK) + { + // FT2 bug: if a retrig (Rxy) occours together with a volume command, the first retrig interval is increased by one tick + if(pChn->nRowVolCmd == VOLCMD_VOLUME) nRetrigCount = -1; + if(pChn->nRowNote != NOTE_NONE && pChn->nRowNote <= GetModSpecifications().noteMax) nRetrigCount++; + } + if (nRetrigCount >= nRetrigSpeed) + { + if (!(m_dwSongFlags & SONG_FIRSTTICK) || (pChn->nRowNote == NOTE_NONE)) + { + bDoRetrig = true; + nRetrigCount = 0; + } + } + } else + { if (m_nType & (MOD_TYPE_S3M|MOD_TYPE_IT|MOD_TYPE_MPT)) { if (!nRetrigSpeed) nRetrigSpeed = 1; @@ -3153,9 +3171,10 @@ nRetrigCount++; } else { - UINT realspeed = nRetrigSpeed; + int realspeed = nRetrigSpeed; + // FT2 bug: if a retrig (Rxy) occours together with a volume command, the first retrig interval is increased by one tick if ((param & 0x100) && (pChn->nRowVolCmd == VOLCMD_VOLUME) && (pChn->nRowParam & 0xF0)) realspeed++; - if ((m_nTickCount) || (param & 0x100)) + if (!(m_dwSongFlags & SONG_FIRSTTICK) || (param & 0x100)) { if (!realspeed) realspeed = 1; if ((!(param & 0x100)) && (m_nMusicSpeed) && (!(m_nTickCount % realspeed))) bDoRetrig = true; @@ -3213,6 +3232,10 @@ SampleOffset(nChn, offset, false); } } + + // buggy-like-hell FT2 Rxy retrig! + if(IsCompatibleMode(TRK_FASTTRACKER2) && (param & 0x100)) nRetrigCount++; + if(!IsCompatibleMode(TRK_IMPULSETRACKER)) pChn->nRetrigCount = (BYTE)nRetrigCount; } Modified: trunk/OpenMPT/soundlib/Sndfile.h =================================================================== --- trunk/OpenMPT/soundlib/Sndfile.h 2009-12-08 19:42:46 UTC (rev 439) +++ trunk/OpenMPT/soundlib/Sndfile.h 2009-12-11 23:39:57 UTC (rev 440) @@ -220,7 +220,7 @@ BYTE nOldCmdEx, nOldVolParam, nOldTempo; BYTE nOldOffset, nOldHiOffset; BYTE nCutOff, nResonance; - BYTE nRetrigCount, nRetrigParam; + int nRetrigCount, nRetrigParam; BYTE nTremorCount, nTremorParam; BYTE nPatternLoop, nPatternLoopCount; BYTE nRowNote, nRowInstr; @@ -846,7 +846,7 @@ void FineVolumeDown(MODCHANNEL *pChn, UINT param); void Tremolo(MODCHANNEL *pChn, UINT param); void Panbrello(MODCHANNEL *pChn, UINT param); - void RetrigNote(UINT nChn, UINT param, UINT offset=0); //rewbs.volOffset: added last param + void RetrigNote(UINT nChn, int param, UINT offset=0); //rewbs.volOffset: added last param void SampleOffset(UINT nChn, UINT param, bool bPorta); //rewbs.volOffset: moved offset code to own method void NoteCut(UINT nChn, UINT nTick); int PatternLoop(MODCHANNEL *, UINT param); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2009-12-14 20:12:37
|
Revision: 442 http://modplug.svn.sourceforge.net/modplug/?rev=442&view=rev Author: saga-games Date: 2009-12-14 20:12:20 +0000 (Mon, 14 Dec 2009) Log Message: ----------- Added muParser (http://muparser.sourceforge.net/) to repository. To be used with upcoming new features. Added Paths: ----------- trunk/OpenMPT/muParser/ trunk/OpenMPT/muParser/License.txt trunk/OpenMPT/muParser/Makefile.in trunk/OpenMPT/muParser/build/ trunk/OpenMPT/muParser/build/autoconf/ trunk/OpenMPT/muParser/build/autoconf/aclocal.m4 trunk/OpenMPT/muParser/build/autoconf/acregen.sh trunk/OpenMPT/muParser/build/autoconf/autoconf_inc.m4 trunk/OpenMPT/muParser/build/autoconf/bakefile-presets.m4 trunk/OpenMPT/muParser/build/autoconf/config.guess trunk/OpenMPT/muParser/build/autoconf/config.sub trunk/OpenMPT/muParser/build/autoconf/configure.ac trunk/OpenMPT/muParser/build/autoconf/install-sh trunk/OpenMPT/muParser/build/autoconf/muparser.pc.in trunk/OpenMPT/muParser/build/makefile.bcc trunk/OpenMPT/muParser/build/makefile.mingw trunk/OpenMPT/muParser/build/makefile.vc trunk/OpenMPT/muParser/build/makefile.wat trunk/OpenMPT/muParser/build/msvc8/ trunk/OpenMPT/muParser/build/msvc8/muparser_dynamic.sln trunk/OpenMPT/muParser/build/msvc8/muparser_example1.dsp trunk/OpenMPT/muParser/build/msvc8/muparser_example1.vcproj trunk/OpenMPT/muParser/build/msvc8/muparser_example3.dsp trunk/OpenMPT/muParser/build/msvc8/muparser_example3.vcproj trunk/OpenMPT/muParser/build/msvc8/muparser_muParser.dsp trunk/OpenMPT/muParser/build/msvc8/muparser_muParser.vcproj trunk/OpenMPT/muParser/build/msvc8/muparser_static.sln trunk/OpenMPT/muParser/build/msvc9/ trunk/OpenMPT/muParser/build/msvc9/muparser_dynamic.sln trunk/OpenMPT/muParser/build/msvc9/muparser_example1.dsp trunk/OpenMPT/muParser/build/msvc9/muparser_example1.vcproj trunk/OpenMPT/muParser/build/msvc9/muparser_example3.dsp trunk/OpenMPT/muParser/build/msvc9/muparser_example3.vcproj trunk/OpenMPT/muParser/build/msvc9/muparser_muParser.dsp trunk/OpenMPT/muParser/build/msvc9/muparser_muParser.vcproj trunk/OpenMPT/muParser/build/msvc9/muparser_static.sln trunk/OpenMPT/muParser/build/obj/ trunk/OpenMPT/muParser/build/obj/Readme.txt trunk/OpenMPT/muParser/build/obj/bcc_obj/ trunk/OpenMPT/muParser/build/obj/bcc_obj/Readme.txt trunk/OpenMPT/muParser/configure trunk/OpenMPT/muParser/include/ trunk/OpenMPT/muParser/include/muParser.h trunk/OpenMPT/muParser/include/muParserBase.h trunk/OpenMPT/muParser/include/muParserBytecode.h trunk/OpenMPT/muParser/include/muParserCallback.h trunk/OpenMPT/muParser/include/muParserComplex.h trunk/OpenMPT/muParser/include/muParserDef.h trunk/OpenMPT/muParser/include/muParserError.h trunk/OpenMPT/muParser/include/muParserFixes.h trunk/OpenMPT/muParser/include/muParserInt.h trunk/OpenMPT/muParser/include/muParserStack.h trunk/OpenMPT/muParser/include/muParserTest.h trunk/OpenMPT/muParser/include/muParserToken.h trunk/OpenMPT/muParser/include/muParserTokenReader.h trunk/OpenMPT/muParser/lib/ trunk/OpenMPT/muParser/lib/Readme.txt trunk/OpenMPT/muParser/src/ trunk/OpenMPT/muParser/src/muParser.cpp trunk/OpenMPT/muParser/src/muParserBase.cpp trunk/OpenMPT/muParser/src/muParserBytecode.cpp trunk/OpenMPT/muParser/src/muParserCallback.cpp trunk/OpenMPT/muParser/src/muParserComplex.cpp trunk/OpenMPT/muParser/src/muParserError.cpp trunk/OpenMPT/muParser/src/muParserInt.cpp trunk/OpenMPT/muParser/src/muParserTest.cpp trunk/OpenMPT/muParser/src/muParserTokenReader.cpp Added: trunk/OpenMPT/muParser/License.txt =================================================================== --- trunk/OpenMPT/muParser/License.txt (rev 0) +++ trunk/OpenMPT/muParser/License.txt 2009-12-14 20:12:20 UTC (rev 442) @@ -0,0 +1,28 @@ + + __________ + _____ __ __\______ \_____ _______ ______ ____ _______ + / \ | | \| ___/\__ \ \_ __ \/ ___/_/ __ \\_ __ \ + | Y Y \| | /| | / __ \_| | \/\___ \ \ ___/ | | \/ + |__|_| /|____/ |____| (____ /|__| /____ > \___ >|__| + \/ \/ \/ \/ + + Version 1.27 + + Copyright (C) 2004-2006 Ingo Berg (ingo_berg{at}gmx.de) + + + Permission is hereby granted, free of charge, to any person obtaining a copy of this + software and associated documentation files (the "Software"), to deal in the Software + without restriction, including without limitation the rights to use, copy, modify, + merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT + NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + OR OTHER DEALINGS IN THE SOFTWARE. Added: trunk/OpenMPT/muParser/Makefile.in =================================================================== --- trunk/OpenMPT/muParser/Makefile.in (rev 0) +++ trunk/OpenMPT/muParser/Makefile.in 2009-12-14 20:12:20 UTC (rev 442) @@ -0,0 +1,345 @@ +# ========================================================================= +# This makefile was generated by +# Bakefile 0.2.1 (http://bakefile.sourceforge.net) +# Do not modify, all changes will be overwritten! +# ========================================================================= + + +@MAKE_SET@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ +INSTALL = @INSTALL@ +SHARED_LD_CXX = @SHARED_LD_CXX@ +LIBEXT = @LIBEXT@ +LIBPREFIX = @LIBPREFIX@ +SO_SUFFIX = @SO_SUFFIX@ +DLLIMP_SUFFIX = @DLLIMP_SUFFIX@ +EXEEXT = @EXEEXT@ +LN_S = @LN_S@ +SETFILE = @SETFILE@ +PIC_FLAG = @PIC_FLAG@ +SONAME_FLAG = @SONAME_FLAG@ +STRIP = @STRIP@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_DIR = @INSTALL_DIR@ +BK_DEPS = @BK_DEPS@ +srcdir = @srcdir@ +top_builddir = @top_builddir@ +libdir = @libdir@ +DLLPREFIX = @DLLPREFIX@ +LIBS = @LIBS@ +AR = @AR@ +AROPTIONS = @AROPTIONS@ +RANLIB = @RANLIB@ +CXX = @CXX@ +CXXFLAGS = @CXXFLAGS@ +CPPFLAGS = @CPPFLAGS@ +LDFLAGS = @LDFLAGS@ + +### Variables: ### + +DESTDIR = +MUPARSER_LIB_CXXFLAGS = $(____DEBUG) $(____SHARED) $(____SHARED_0) \ + -I$(srcdir)/include $(CPPFLAGS) $(CXXFLAGS) +MUPARSER_LIB_OBJECTS = \ + muParser_lib_muParserBytecode.o \ + muParser_lib_muParserTest.o \ + muParser_lib_muParser.o \ + muParser_lib_muParserDLL.o \ + muParser_lib_muParserInt.o \ + muParser_lib_muParserTokenReader.o \ + muParser_lib_muParserError.o \ + muParser_lib_muParserCallback.o \ + muParser_lib_muParserBase.o +MUPARSER_LIB_HEADERS = \ + include/muParserError.h \ + include/muParserFixes.h \ + include/muParserStack.h \ + include/muParserBytecode.h \ + include/muParserToken.h \ + include/muParserBase.h \ + include/muParserTest.h \ + include/muParserTokenReader.h \ + include/muParserCallback.h \ + include/muParser.h \ + include/muParserDLL.h \ + include/muParserDef.h \ + include/muParserInt.h +MUPARSER_DLL_CXXFLAGS = $(____DEBUG) $(____SHARED) $(____SHARED_0) \ + -I$(srcdir)/include $(PIC_FLAG) $(CPPFLAGS) $(CXXFLAGS) +MUPARSER_DLL_OBJECTS = \ + muParser_dll_muParserBytecode.o \ + muParser_dll_muParserTest.o \ + muParser_dll_muParser.o \ + muParser_dll_muParserDLL.o \ + muParser_dll_muParserInt.o \ + muParser_dll_muParserTokenReader.o \ + muParser_dll_muParserError.o \ + muParser_dll_muParserCallback.o \ + muParser_dll_muParserBase.o +MUPARSER_DLL_HEADERS = \ + include/muParserError.h \ + include/muParserFixes.h \ + include/muParserStack.h \ + include/muParserBytecode.h \ + include/muParserToken.h \ + include/muParserBase.h \ + include/muParserTest.h \ + include/muParserTokenReader.h \ + include/muParserCallback.h \ + include/muParser.h \ + include/muParserDLL.h \ + include/muParserDef.h \ + include/muParserInt.h +EXAMPLE1_CXXFLAGS = $(____DEBUG) -I$(srcdir)/include $(CPPFLAGS) $(CXXFLAGS) +EXAMPLE1_OBJECTS = \ + example1_Example1.o + +### Conditionally set variables: ### + +@COND_DEPS_TRACKING_0@CXXC = $(CXX) +@COND_DEPS_TRACKING_1@CXXC = $(BK_DEPS) $(CXX) +@COND_DEBUG_0@DEBUG_BUILD_POSTFIX = +@COND_DEBUG_1@DEBUG_BUILD_POSTFIX = d +@COND_SHARED_0@__muParser_lib___depname = \ +@COND_SHARED_0@ $(top_builddir)/lib/$(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(LIBEXT) +@COND_SHARED_0@__install_muParser_lib___depname = install_muParser_lib +@COND_SHARED_0@__uninstall_muParser_lib___depname = uninstall_muParser_lib +@COND_SHARED_0@__install_muParser_lib_headers___depname = \ +@COND_SHARED_0@ install_muParser_lib_headers +@COND_SHARED_0@__uninstall_muParser_lib_headers___depname = \ +@COND_SHARED_0@ uninstall_muParser_lib_headers +COND_SHARED_1___muParser_dll___depname = \ + $(top_builddir)/lib/$(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf3) +@COND_SHARED_1@__muParser_dll___depname = $(COND_SHARED_1___muParser_dll___depname) +@COND_SHARED_1@__install_muParser_dll___depname = install_muParser_dll +@COND_SHARED_1@__uninstall_muParser_dll___depname = uninstall_muParser_dll +COND_PLATFORM_MACOSX_1___muParser_dll___macinstnamecmd = -install_name \ + $(libdir)/$(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf2) +@COND_PLATFORM_MACOSX_1@__muParser_dll___macinstnamecmd = $(COND_PLATFORM_MACOSX_1___muParser_dll___macinstnamecmd) +@COND_SHARED_1@__install_muParser_dll_headers___depname = \ +@COND_SHARED_1@ install_muParser_dll_headers +@COND_SHARED_1@__uninstall_muParser_dll_headers___depname = \ +@COND_SHARED_1@ uninstall_muParser_dll_headers +COND_PLATFORM_OS2_1___muParser_dll___importlib = -import \ + $(top_builddir)/lib/$(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX).$(DLLIMP_SUFFIX) +@COND_PLATFORM_OS2_1@__muParser_dll___importlib = $(COND_PLATFORM_OS2_1___muParser_dll___importlib) +COND_WINDOWS_IMPLIB_1___muParser_dll___importlib = \ + -Wl,--out-implib=$(top_builddir)/lib/$(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX).$(DLLIMP_SUFFIX) +@COND_WINDOWS_IMPLIB_1@__muParser_dll___importlib = $(COND_WINDOWS_IMPLIB_1___muParser_dll___importlib) +@COND_PLATFORM_MACOSX_0_USE_SOVERSION_1@__muParser_dll___targetsuf2 \ +@COND_PLATFORM_MACOSX_0_USE_SOVERSION_1@ = .$(SO_SUFFIX).0 +@COND_PLATFORM_MACOSX_1_USE_SOVERSION_1@__muParser_dll___targetsuf2 \ +@COND_PLATFORM_MACOSX_1_USE_SOVERSION_1@ = .0.$(SO_SUFFIX) +@COND_USE_SOVERSION_0@__muParser_dll___targetsuf2 = .$(SO_SUFFIX) +@COND_PLATFORM_MACOSX_0_USE_SOVERCYGWIN_0_USE_SOVERSION_1@__muParser_dll___targetsuf3 \ +@COND_PLATFORM_MACOSX_0_USE_SOVERCYGWIN_0_USE_SOVERSION_1@ = \ +@COND_PLATFORM_MACOSX_0_USE_SOVERCYGWIN_0_USE_SOVERSION_1@ .$(SO_SUFFIX).0.0.0 +@COND_PLATFORM_MACOSX_1_USE_SOVERSION_1@__muParser_dll___targetsuf3 \ +@COND_PLATFORM_MACOSX_1_USE_SOVERSION_1@ = .0.0.0.$(SO_SUFFIX) +@COND_USE_SOVERCYGWIN_1_USE_SOVERSION_1@__muParser_dll___targetsuf3 \ +@COND_USE_SOVERCYGWIN_1_USE_SOVERSION_1@ = -0.$(SO_SUFFIX) +@COND_USE_SOVERSION_0@__muParser_dll___targetsuf3 = .$(SO_SUFFIX) +COND_USE_SOVERLINUX_1___muParser_dll___soname_flags = \ + $(SONAME_FLAG)$(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf2) +@COND_USE_SOVERLINUX_1@__muParser_dll___soname_flags = $(COND_USE_SOVERLINUX_1___muParser_dll___soname_flags) +COND_USE_SOVERSOLARIS_1___muParser_dll___soname_flags = \ + $(SONAME_FLAG)$(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf3) +@COND_USE_SOVERSOLARIS_1@__muParser_dll___soname_flags = $(COND_USE_SOVERSOLARIS_1___muParser_dll___soname_flags) +COND_USE_SOSYMLINKS_1___muParser_dll___so_symlinks_cmd = (cd \ + $(top_builddir)/lib/; rm -f \ + $(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX).$(DLLIMP_SUFFIX) \ + $(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf2); \ + $(LN_S) \ + $(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf3) \ + $(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf2); \ + $(LN_S) \ + $(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf2) \ + $(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX).$(DLLIMP_SUFFIX)) +@COND_USE_SOSYMLINKS_1@__muParser_dll___so_symlinks_cmd = $(COND_USE_SOSYMLINKS_1___muParser_dll___so_symlinks_cmd) +COND_USE_SOSYMLINKS_1___muParser_dll___so_symlinks_inst_cmd = rm -f \ + $(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX).$(DLLIMP_SUFFIX) \ + $(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf2); \ + $(LN_S) \ + $(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf3) \ + $(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf2); \ + $(LN_S) \ + $(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf2) \ + $(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX).$(DLLIMP_SUFFIX) +@COND_USE_SOSYMLINKS_1@__muParser_dll___so_symlinks_inst_cmd = $(COND_USE_SOSYMLINKS_1___muParser_dll___so_symlinks_inst_cmd) +COND_USE_SOSYMLINKS_1___muParser_dll___so_symlinks_uninst_cmd = rm -f \ + $(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf2) \ + $(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX).$(DLLIMP_SUFFIX) +@COND_USE_SOSYMLINKS_1@__muParser_dll___so_symlinks_uninst_cmd = $(COND_USE_SOSYMLINKS_1___muParser_dll___so_symlinks_uninst_cmd) +@COND_PLATFORM_MACOSX_1@__muParser_dll___macver = \ +@COND_PLATFORM_MACOSX_1@ -compatibility_version 1 -current_version 1 +@COND_SAMPLES_1@__example1___depname = \ +@COND_SAMPLES_1@ $(top_builddir)/samples/example1/example1$(EXEEXT) +@COND_PLATFORM_MAC_1@__example1___mac_setfilecmd = \ +@COND_PLATFORM_MAC_1@ $(SETFILE) -t APPL \ +@COND_PLATFORM_MAC_1@ $(top_builddir)/samples/example1/example1$(EXEEXT) +@COND_SHARED_0@____SHARED = +@COND_SHARED_1@____SHARED = -DMUPARSER_DLL +@COND_SHARED_0@____SHARED_0 = +@COND_SHARED_1@____SHARED_0 = -DMUPARSERLIB_EXPORTS +@COND_DEBUG_0@____DEBUG = -DNDEBUG +@COND_DEBUG_1@____DEBUG = + +### Targets: ### + +all: $(__muParser_lib___depname) $(__muParser_dll___depname) $(__example1___depname) + +install: all $(__install_muParser_lib___depname) $(__install_muParser_lib_headers___depname) $(__install_muParser_dll___depname) $(__install_muParser_dll_headers___depname) + $(INSTALL_DIR) $(libdir)/pkgconfig + $(INSTALL_DATA) build/autoconf/muparser.pc $(libdir)/pkgconfig + +uninstall: $(__uninstall_muParser_lib___depname) $(__uninstall_muParser_lib_headers___depname) $(__uninstall_muParser_dll___depname) $(__uninstall_muParser_dll_headers___depname) + +install-strip: install + $(STRIP) $(DESTDIR)$(libdir)/$(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf3) + +clean: + rm -rf ./.deps ./.pch + rm -f ./*.o + rm -f $(top_builddir)/lib/$(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(LIBEXT) + rm -f $(top_builddir)/lib/$(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf3) + rm -f $(top_builddir)/lib/$(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX).$(DLLIMP_SUFFIX) + rm -f $(top_builddir)/lib/$(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX).$(DLLIMP_SUFFIX) $(top_builddir)/lib/$(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf2) + rm -f $(top_builddir)/samples/example1/example1$(EXEEXT) + +distclean: clean + rm -f config.cache config.log config.status bk-deps bk-make-pch shared-ld-sh Makefile + rm -f build/autoconf/muparser.pc + +@COND_SHARED_0@$(top_builddir)/lib/$(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(LIBEXT): $(MUPARSER_LIB_OBJECTS) +@COND_SHARED_0@ rm -f $@ +@COND_SHARED_0@ $(AR) $(AROPTIONS) $@ $(MUPARSER_LIB_OBJECTS) +@COND_SHARED_0@ $(RANLIB) $@ + +@COND_SHARED_0@install_muParser_lib: +@COND_SHARED_0@ $(INSTALL_DIR) $(DESTDIR)$(libdir) +@COND_SHARED_0@ $(INSTALL_DATA) $(top_builddir)/lib/$(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(LIBEXT) $(DESTDIR)$(libdir) + +@COND_SHARED_0@uninstall_muParser_lib: +@COND_SHARED_0@ rm -f $(DESTDIR)$(libdir)/$(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(LIBEXT) + +@COND_SHARED_0@install_muParser_lib_headers: +@COND_SHARED_0@ $(INSTALL_DIR) $(DESTDIR)$(prefix) +@COND_SHARED_0@ for f in $(MUPARSER_LIB_HEADERS); do \ +@COND_SHARED_0@ if test ! -d $(DESTDIR)$(prefix)/`dirname $$f` ; then \ +@COND_SHARED_0@ $(INSTALL_DIR) $(DESTDIR)$(prefix)/`dirname $$f`; \ +@COND_SHARED_0@ fi; \ +@COND_SHARED_0@ $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(prefix)/$$f; \ +@COND_SHARED_0@ done + +@COND_SHARED_0@uninstall_muParser_lib_headers: +@COND_SHARED_0@ for f in $(MUPARSER_LIB_HEADERS); do \ +@COND_SHARED_0@ rm -f $(DESTDIR)$(prefix)/$$f; \ +@COND_SHARED_0@ done + +@COND_SHARED_1@$(top_builddir)/lib/$(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf3): $(MUPARSER_DLL_OBJECTS) +@COND_SHARED_1@ $(SHARED_LD_CXX) $@ $(MUPARSER_DLL_OBJECTS) $(LDFLAGS) $(__muParser_dll___macinstnamecmd) $(__muParser_dll___importlib) $(__muParser_dll___soname_flags) $(__muParser_dll___macver) $(LIBS) +@COND_SHARED_1@ +@COND_SHARED_1@ $(__muParser_dll___so_symlinks_cmd) + +@COND_SHARED_1@install_muParser_dll: +@COND_SHARED_1@ $(INSTALL_DIR) $(DESTDIR)$(libdir) +@COND_SHARED_1@ $(INSTALL_DATA) $(top_builddir)/lib/$(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX).$(DLLIMP_SUFFIX) $(DESTDIR)$(libdir) +@COND_SHARED_1@ $(INSTALL_PROGRAM) $(top_builddir)/lib/$(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf3) $(DESTDIR)$(libdir) +@COND_SHARED_1@ (cd $(DESTDIR)$(libdir) ; $(__muParser_dll___so_symlinks_inst_cmd)) + +@COND_SHARED_1@uninstall_muParser_dll: +@COND_SHARED_1@ rm -f $(DESTDIR)$(libdir)/$(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX).$(DLLIMP_SUFFIX) +@COND_SHARED_1@ rm -f $(DESTDIR)$(libdir)/$(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf3) +@COND_SHARED_1@ (cd $(DESTDIR)$(libdir) ; $(__muParser_dll___so_symlinks_uninst_cmd)) + +@COND_SHARED_1@install_muParser_dll_headers: +@COND_SHARED_1@ $(INSTALL_DIR) $(DESTDIR)$(prefix) +@COND_SHARED_1@ for f in $(MUPARSER_DLL_HEADERS); do \ +@COND_SHARED_1@ if test ! -d $(DESTDIR)$(prefix)/`dirname $$f` ; then \ +@COND_SHARED_1@ $(INSTALL_DIR) $(DESTDIR)$(prefix)/`dirname $$f`; \ +@COND_SHARED_1@ fi; \ +@COND_SHARED_1@ $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(prefix)/$$f; \ +@COND_SHARED_1@ done + +@COND_SHARED_1@uninstall_muParser_dll_headers: +@COND_SHARED_1@ for f in $(MUPARSER_DLL_HEADERS); do \ +@COND_SHARED_1@ rm -f $(DESTDIR)$(prefix)/$$f; \ +@COND_SHARED_1@ done + +@COND_SAMPLES_1@$(top_builddir)/samples/example1/example1$(EXEEXT): $(EXAMPLE1_OBJECTS) $(__muParser_lib___depname) +@COND_SAMPLES_1@ $(CXX) -o $@ $(EXAMPLE1_OBJECTS) -L$(top_builddir)/lib $(LDFLAGS) -L$(srcdir)/lib $(LIBS) -lmuparser$(DEBUG_BUILD_POSTFIX) +@COND_SAMPLES_1@ +@COND_SAMPLES_1@ $(__example1___mac_setfilecmd) + +lib: $(__muParser_lib___depname) $(__muParser_dll___depname) + +samples: $(__example1___depname) + +documentation: + ( cd $(srcdir)/docs && doxygen ) + +muParser_lib_muParserBytecode.o: $(srcdir)/src/muParserBytecode.cpp + $(CXXC) -c -o $@ $(MUPARSER_LIB_CXXFLAGS) $(srcdir)/src/muParserBytecode.cpp + +muParser_lib_muParserTest.o: $(srcdir)/src/muParserTest.cpp + $(CXXC) -c -o $@ $(MUPARSER_LIB_CXXFLAGS) $(srcdir)/src/muParserTest.cpp + +muParser_lib_muParser.o: $(srcdir)/src/muParser.cpp + $(CXXC) -c -o $@ $(MUPARSER_LIB_CXXFLAGS) $(srcdir)/src/muParser.cpp + +muParser_lib_muParserDLL.o: $(srcdir)/src/muParserDLL.cpp + $(CXXC) -c -o $@ $(MUPARSER_LIB_CXXFLAGS) $(srcdir)/src/muParserDLL.cpp + +muParser_lib_muParserInt.o: $(srcdir)/src/muParserInt.cpp + $(CXXC) -c -o $@ $(MUPARSER_LIB_CXXFLAGS) $(srcdir)/src/muParserInt.cpp + +muParser_lib_muParserTokenReader.o: $(srcdir)/src/muParserTokenReader.cpp + $(CXXC) -c -o $@ $(MUPARSER_LIB_CXXFLAGS) $(srcdir)/src/muParserTokenReader.cpp + +muParser_lib_muParserError.o: $(srcdir)/src/muParserError.cpp + $(CXXC) -c -o $@ $(MUPARSER_LIB_CXXFLAGS) $(srcdir)/src/muParserError.cpp + +muParser_lib_muParserCallback.o: $(srcdir)/src/muParserCallback.cpp + $(CXXC) -c -o $@ $(MUPARSER_LIB_CXXFLAGS) $(srcdir)/src/muParserCallback.cpp + +muParser_lib_muParserBase.o: $(srcdir)/src/muParserBase.cpp + $(CXXC) -c -o $@ $(MUPARSER_LIB_CXXFLAGS) $(srcdir)/src/muParserBase.cpp + +muParser_dll_muParserBytecode.o: $(srcdir)/src/muParserBytecode.cpp + $(CXXC) -c -o $@ $(MUPARSER_DLL_CXXFLAGS) $(srcdir)/src/muParserBytecode.cpp + +muParser_dll_muParserTest.o: $(srcdir)/src/muParserTest.cpp + $(CXXC) -c -o $@ $(MUPARSER_DLL_CXXFLAGS) $(srcdir)/src/muParserTest.cpp + +muParser_dll_muParser.o: $(srcdir)/src/muParser.cpp + $(CXXC) -c -o $@ $(MUPARSER_DLL_CXXFLAGS) $(srcdir)/src/muParser.cpp + +muParser_dll_muParserDLL.o: $(srcdir)/src/muParserDLL.cpp + $(CXXC) -c -o $@ $(MUPARSER_DLL_CXXFLAGS) $(srcdir)/src/muParserDLL.cpp + +muParser_dll_muParserInt.o: $(srcdir)/src/muParserInt.cpp + $(CXXC) -c -o $@ $(MUPARSER_DLL_CXXFLAGS) $(srcdir)/src/muParserInt.cpp + +muParser_dll_muParserTokenReader.o: $(srcdir)/src/muParserTokenReader.cpp + $(CXXC) -c -o $@ $(MUPARSER_DLL_CXXFLAGS) $(srcdir)/src/muParserTokenReader.cpp + +muParser_dll_muParserError.o: $(srcdir)/src/muParserError.cpp + $(CXXC) -c -o $@ $(MUPARSER_DLL_CXXFLAGS) $(srcdir)/src/muParserError.cpp + +muParser_dll_muParserCallback.o: $(srcdir)/src/muParserCallback.cpp + $(CXXC) -c -o $@ $(MUPARSER_DLL_CXXFLAGS) $(srcdir)/src/muParserCallback.cpp + +muParser_dll_muParserBase.o: $(srcdir)/src/muParserBase.cpp + $(CXXC) -c -o $@ $(MUPARSER_DLL_CXXFLAGS) $(srcdir)/src/muParserBase.cpp + +example1_Example1.o: $(srcdir)/samples/example1/Example1.cpp + $(CXXC) -c -o $@ $(EXAMPLE1_CXXFLAGS) $(srcdir)/samples/example1/Example1.cpp + + +# Include dependency info, if present: +@IF_GNU_MAKE@-include .deps/*.d + +.PHONY: all install uninstall clean distclean install_muParser_lib uninstall_muParser_lib install_muParser_lib_headers uninstall_muParser_lib_headers install_muParser_dll uninstall_muParser_dll install_muParser_dll_headers uninstall_muParser_dll_headers lib samples Added: trunk/OpenMPT/muParser/build/autoconf/aclocal.m4 =================================================================== --- trunk/OpenMPT/muParser/build/autoconf/aclocal.m4 (rev 0) +++ trunk/OpenMPT/muParser/build/autoconf/aclocal.m4 2009-12-14 20:12:20 UTC (rev 442) @@ -0,0 +1,1593 @@ +# generated automatically by aclocal 1.9.6 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005 Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +dnl --------------------------------------------------------------------------- +dnl Support macros for makefiles generated by BAKEFILE. +dnl --------------------------------------------------------------------------- + +dnl Lots of compiler & linker detection code contained here was taken from +dnl wxWindows configure.in script (see http://www.wxwindows.org) + + + +dnl --------------------------------------------------------------------------- +dnl AC_BAKEFILE_GNUMAKE +dnl +dnl Detects GNU make +dnl --------------------------------------------------------------------------- + +AC_DEFUN([AC_BAKEFILE_GNUMAKE], +[ + dnl does make support "-include" (only GNU make does AFAIK)? + AC_CACHE_CHECK([if make is GNU make], bakefile_cv_prog_makeisgnu, + [ + if ( ${SHELL-sh} -c "${MAKE-make} --version" 2> /dev/null | + egrep -s GNU > /dev/null); then + bakefile_cv_prog_makeisgnu="yes" + else + bakefile_cv_prog_makeisgnu="no" + fi + ]) + + if test "x$bakefile_cv_prog_makeisgnu" = "xyes"; then + IF_GNU_MAKE="" + else + IF_GNU_MAKE="#" + fi + AC_SUBST(IF_GNU_MAKE) +]) + +dnl --------------------------------------------------------------------------- +dnl AC_BAKEFILE_PLATFORM +dnl +dnl Detects platform and sets PLATFORM_XXX variables accordingly +dnl --------------------------------------------------------------------------- + +AC_DEFUN([AC_BAKEFILE_PLATFORM], +[ + PLATFORM_UNIX=0 + PLATFORM_WIN32=0 + PLATFORM_MSDOS=0 + PLATFORM_MAC=0 + PLATFORM_MACOS=0 + PLATFORM_MACOSX=0 + PLATFORM_OS2=0 + PLATFORM_BEOS=0 + + if test "x$BAKEFILE_FORCE_PLATFORM" = "x"; then + case "${BAKEFILE_HOST}" in + *-*-mingw32* ) + PLATFORM_WIN32=1 + ;; + *-pc-msdosdjgpp ) + PLATFORM_MSDOS=1 + ;; + *-pc-os2_emx | *-pc-os2-emx ) + PLATFORM_OS2=1 + ;; + *-*-darwin* ) + PLATFORM_MAC=1 + PLATFORM_MACOSX=1 + ;; + *-*-beos* ) + PLATFORM_BEOS=1 + ;; + powerpc-apple-macos* ) + PLATFORM_MAC=1 + PLATFORM_MACOS=1 + ;; + * ) + PLATFORM_UNIX=1 + ;; + esac + else + case "$BAKEFILE_FORCE_PLATFORM" in + win32 ) + PLATFORM_WIN32=1 + ;; + msdos ) + PLATFORM_MSDOS=1 + ;; + os2 ) + PLATFORM_OS2=1 + ;; + darwin ) + PLATFORM_MAC=1 + PLATFORM_MACOSX=1 + ;; + unix ) + PLATFORM_UNIX=1 + ;; + beos ) + PLATFORM_BEOS=1 + ;; + * ) + AC_MSG_ERROR([Unknown platform: $BAKEFILE_FORCE_PLATFORM]) + ;; + esac + fi + + AC_SUBST(PLATFORM_UNIX) + AC_SUBST(PLATFORM_WIN32) + AC_SUBST(PLATFORM_MSDOS) + AC_SUBST(PLATFORM_MAC) + AC_SUBST(PLATFORM_MACOS) + AC_SUBST(PLATFORM_MACOSX) + AC_SUBST(PLATFORM_OS2) + AC_SUBST(PLATFORM_BEOS) +]) + + +dnl --------------------------------------------------------------------------- +dnl AC_BAKEFILE_PLATFORM_SPECIFICS +dnl +dnl Sets misc platform-specific settings +dnl --------------------------------------------------------------------------- + +AC_DEFUN([AC_BAKEFILE_PLATFORM_SPECIFICS], +[ + AC_ARG_ENABLE([omf], AS_HELP_STRING([--enable-omf], + [use OMF object format (OS/2)]), + [bk_os2_use_omf="$enableval"]) + + case "${BAKEFILE_HOST}" in + *-*-darwin* ) + dnl For Unix to MacOS X porting instructions, see: + dnl http://fink.sourceforge.net/doc/porting/porting.html + if test "x$GCC" = "xyes"; then + CFLAGS="$CFLAGS -fno-common" + CXXFLAGS="$CXXFLAGS -fno-common" + fi + if test "x$XLCC" = "xyes"; then + CFLAGS="$CFLAGS -qnocommon" + CXXFLAGS="$CXXFLAGS -qnocommon" + fi + ;; + + *-pc-os2_emx | *-pc-os2-emx ) + if test "x$bk_os2_use_omf" = "xyes" ; then + AR=emxomfar + RANLIB=: + LDFLAGS="-Zomf $LDFLAGS" + CFLAGS="-Zomf $CFLAGS" + CXXFLAGS="-Zomf $CXXFLAGS" + OS2_LIBEXT="lib" + else + OS2_LIBEXT="a" + fi + ;; + + i*86-*-beos* ) + LDFLAGS="-L/boot/develop/lib/x86 $LDFLAGS" + ;; + esac +]) + +dnl --------------------------------------------------------------------------- +dnl AC_BAKEFILE_SUFFIXES +dnl +dnl Detects shared various suffixes for shared libraries, libraries, programs, +dnl plugins etc. +dnl --------------------------------------------------------------------------- + +AC_DEFUN([AC_BAKEFILE_SUFFIXES], +[ + SO_SUFFIX="so" + SO_SUFFIX_MODULE="so" + EXEEXT="" + LIBPREFIX="lib" + LIBEXT=".a" + DLLPREFIX="lib" + DLLPREFIX_MODULE="" + DLLIMP_SUFFIX="" + dlldir="$libdir" + + case "${BAKEFILE_HOST}" in + *-hp-hpux* ) + SO_SUFFIX="sl" + SO_SUFFIX_MODULE="sl" + ;; + *-*-aix* ) + dnl quoting from + dnl http://www-1.ibm.com/servers/esdd/articles/gnu.html: + dnl Both archive libraries and shared libraries on AIX have an + dnl .a extension. This will explain why you can't link with an + dnl .so and why it works with the name changed to .a. + SO_SUFFIX="a" + SO_SUFFIX_MODULE="a" + ;; + *-*-cygwin* ) + SO_SUFFIX="dll" + SO_SUFFIX_MODULE="dll" + DLLIMP_SUFFIX="dll.a" + EXEEXT=".exe" + DLLPREFIX="cyg" + dlldir="$bindir" + ;; + *-*-mingw32* ) + SO_SUFFIX="dll" + SO_SUFFIX_MODULE="dll" + DLLIMP_SUFFIX="dll.a" + EXEEXT=".exe" + DLLPREFIX="" + dlldir="$bindir" + ;; + *-pc-msdosdjgpp ) + EXEEXT=".exe" + DLLPREFIX="" + dlldir="$bindir" + ;; + *-pc-os2_emx | *-pc-os2-emx ) + SO_SUFFIX="dll" + SO_SUFFIX_MODULE="dll" + DLLIMP_SUFFIX=$OS2_LIBEXT + EXEEXT=".exe" + DLLPREFIX="" + LIBPREFIX="" + LIBEXT=".$OS2_LIBEXT" + dlldir="$bindir" + ;; + *-*-darwin* ) + SO_SUFFIX="dylib" + SO_SUFFIX_MODULE="bundle" + ;; + esac + + if test "x$DLLIMP_SUFFIX" = "x" ; then + DLLIMP_SUFFIX="$SO_SUFFIX" + fi + + AC_SUBST(SO_SUFFIX) + AC_SUBST(SO_SUFFIX_MODULE) + AC_SUBST(DLLIMP_SUFFIX) + AC_SUBST(EXEEXT) + AC_SUBST(LIBPREFIX) + AC_SUBST(LIBEXT) + AC_SUBST(DLLPREFIX) + AC_SUBST(DLLPREFIX_MODULE) + AC_SUBST(dlldir) +]) + + +dnl --------------------------------------------------------------------------- +dnl AC_BAKEFILE_SHARED_LD +dnl +dnl Detects command for making shared libraries, substitutes SHARED_LD_CC +dnl and SHARED_LD_CXX. +dnl --------------------------------------------------------------------------- + +AC_DEFUN([AC_BAKEFILE_SHARED_LD], +[ + dnl the extra compiler flags needed for compilation of shared library + PIC_FLAG="" + if test "x$GCC" = "xyes"; then + dnl the switch for gcc is the same under all platforms + PIC_FLAG="-fPIC" + fi + + dnl Defaults for GCC and ELF .so shared libs: + SHARED_LD_CC="\$(CC) -shared ${PIC_FLAG} -o" + SHARED_LD_CXX="\$(CXX) -shared ${PIC_FLAG} -o" + WINDOWS_IMPLIB=0 + + case "${BAKEFILE_HOST}" in + *-hp-hpux* ) + dnl default settings are good for gcc but not for the native HP-UX + if test "x$GCC" != "xyes"; then + dnl no idea why it wants it, but it does + LDFLAGS="$LDFLAGS -L/usr/lib" + + SHARED_LD_CC="${CC} -b -o" + SHARED_LD_CXX="${CXX} -b -o" + PIC_FLAG="+Z" + fi + ;; + + *-*-linux* ) + if test "x$GCC" != "xyes"; then + AC_CACHE_CHECK([for Intel compiler], bakefile_cv_prog_icc, + [ + AC_TRY_COMPILE([], + [ + #ifndef __INTEL_COMPILER + This is not ICC + #endif + ], + bakefile_cv_prog_icc=yes, + bakefile_cv_prog_icc=no + ) + ]) + if test "$bakefile_cv_prog_icc" = "yes"; then + PIC_FLAG="-KPIC" + fi + fi + ;; + + *-*-solaris2* ) + if test "x$GCC" != xyes ; then + SHARED_LD_CC="${CC} -G -o" + SHARED_LD_CXX="${CXX} -G -o" + PIC_FLAG="-KPIC" + fi + ;; + + *-*-darwin* ) + AC_BAKEFILE_CREATE_FILE_SHARED_LD_SH + chmod +x shared-ld-sh + + SHARED_LD_MODULE_CC="`pwd`/shared-ld-sh -bundle -headerpad_max_install_names -o" + SHARED_LD_MODULE_CXX="$SHARED_LD_MODULE_CC" + + dnl Most apps benefit from being fully binded (its faster and static + dnl variables initialized at startup work). + dnl This can be done either with the exe linker flag -Wl,-bind_at_load + dnl or with a double stage link in order to create a single module + dnl "-init _wxWindowsDylibInit" not useful with lazy linking solved + + dnl If using newer dev tools then there is a -single_module flag that + dnl we can use to do this for dylibs, otherwise we'll need to use a helper + dnl script. Check the version of gcc to see which way we can go: + AC_CACHE_CHECK([for gcc 3.1 or later], bakefile_cv_gcc31, [ + AC_TRY_COMPILE([], + [ + #if (__GNUC__ < 3) || \ + ((__GNUC__ == 3) && (__GNUC_MINOR__ < 1)) + This is old gcc + #endif + ], + [ + bakefile_cv_gcc31=yes + ], + [ + bakefile_cv_gcc31=no + ] + ) + ]) + if test "$bakefile_cv_gcc31" = "no"; then + dnl Use the shared-ld-sh helper script + SHARED_LD_CC="`pwd`/shared-ld-sh -dynamiclib -headerpad_max_install_names -o" + SHARED_LD_CXX="$SHARED_LD_CC" + else + dnl Use the -single_module flag and let the linker do it for us + SHARED_LD_CC="\${CC} -dynamiclib -single_module -headerpad_max_install_names -o" + SHARED_LD_CXX="\${CXX} -dynamiclib -single_module -headerpad_max_install_names -o" + fi + + if test "x$GCC" == "xyes"; then + PIC_FLAG="-dynamic -fPIC" + fi + if test "x$XLCC" = "xyes"; then + PIC_FLAG="-dynamic -DPIC" + fi + ;; + + *-*-aix* ) + if test "x$GCC" = "xyes"; then + dnl at least gcc 2.95 warns that -fPIC is ignored when + dnl compiling each and every file under AIX which is annoying, + dnl so don't use it there (it's useless as AIX runs on + dnl position-independent architectures only anyhow) + PIC_FLAG="" + + dnl -bexpfull is needed by AIX linker to export all symbols (by + dnl default it doesn't export any and even with -bexpall it + dnl doesn't export all C++ support symbols, e.g. vtable + dnl pointers) but it's only available starting from 5.1 (with + dnl maintenance pack 2, whatever this is), see + dnl http://www-128.ibm.com/developerworks/eserver/articles/gnu.html + case "${BAKEFILE_HOST}" in + *-*-aix5* ) + LD_EXPFULL="-Wl,-bexpfull" + ;; + esac + + SHARED_LD_CC="\$(CC) -shared $LD_EXPFULL -o" + SHARED_LD_CXX="\$(CXX) -shared $LD_EXPFULL -o" + else + dnl FIXME: makeC++SharedLib is obsolete, what should we do for + dnl recent AIX versions? + AC_CHECK_PROG(AIX_CXX_LD, makeC++SharedLib, + makeC++SharedLib, /usr/lpp/xlC/bin/makeC++SharedLib) + SHARED_LD_CC="$AIX_CC_LD -p 0 -o" + SHARED_LD_CXX="$AIX_CXX_LD -p 0 -o" + fi + ;; + + *-*-beos* ) + dnl can't use gcc under BeOS for shared library creation because it + dnl complains about missing 'main' + SHARED_LD_CC="${LD} -nostart -o" + SHARED_LD_CXX="${LD} -nostart -o" + ;; + + *-*-irix* ) + dnl default settings are ok for gcc + if test "x$GCC" != "xyes"; then + PIC_FLAG="-KPIC" + fi + ;; + + *-*-cygwin* | *-*-mingw32* ) + PIC_FLAG="" + SHARED_LD_CC="\$(CC) -shared -o" + SHARED_LD_CXX="\$(CXX) -shared -o" + WINDOWS_IMPLIB=1 + ;; + + *-pc-os2_emx | *-pc-os2-emx ) + SHARED_LD_CC="`pwd`/dllar.sh -libf INITINSTANCE -libf TERMINSTANCE -o" + SHARED_LD_CXX="`pwd`/dllar.sh -libf INITINSTANCE -libf TERMINSTANCE -o" + PIC_FLAG="" + AC_BAKEFILE_CREATE_FILE_DLLAR_SH + chmod +x dllar.sh + ;; + + powerpc-apple-macos* | \ + *-*-freebsd* | *-*-openbsd* | *-*-netbsd* | *-*-k*bsd*-gnu | \ + *-*-mirbsd* | \ + *-*-sunos4* | \ + *-*-osf* | \ + *-*-dgux5* | \ + *-*-sysv5* | \ + *-pc-msdosdjgpp ) + dnl defaults are ok + ;; + + *) + AC_MSG_ERROR(unknown system type $BAKEFILE_HOST.) + esac + + if test "x$PIC_FLAG" != "x" ; then + PIC_FLAG="$PIC_FLAG -DPIC" + fi + + if test "x$SHARED_LD_MODULE_CC" = "x" ; then + SHARED_LD_MODULE_CC="$SHARED_LD_CC" + fi + if test "x$SHARED_LD_MODULE_CXX" = "x" ; then + SHARED_LD_MODULE_CXX="$SHARED_LD_CXX" + fi + + AC_SUBST(SHARED_LD_CC) + AC_SUBST(SHARED_LD_CXX) + AC_SUBST(SHARED_LD_MODULE_CC) + AC_SUBST(SHARED_LD_MODULE_CXX) + AC_SUBST(PIC_FLAG) + AC_SUBST(WINDOWS_IMPLIB) +]) + + +dnl --------------------------------------------------------------------------- +dnl AC_BAKEFILE_SHARED_VERSIONS +dnl +dnl Detects linker options for attaching versions (sonames) to shared libs. +dnl --------------------------------------------------------------------------- + +AC_DEFUN([AC_BAKEFILE_SHARED_VERSIONS], +[ + USE_SOVERSION=0 + USE_SOVERLINUX=0 + USE_SOVERSOLARIS=0 + USE_SOVERCYGWIN=0 + USE_SOSYMLINKS=0 + USE_MACVERSION=0 + SONAME_FLAG= + + case "${BAKEFILE_HOST}" in + *-*-linux* | *-*-freebsd* | *-*-k*bsd*-gnu ) + SONAME_FLAG="-Wl,-soname," + USE_SOVERSION=1 + USE_SOVERLINUX=1 + USE_SOSYMLINKS=1 + ;; + + *-*-solaris2* ) + SONAME_FLAG="-h " + USE_SOVERSION=1 + USE_SOVERSOLARIS=1 + USE_SOSYMLINKS=1 + ;; + + *-*-darwin* ) + USE_MACVERSION=1 + USE_SOVERSION=1 + USE_SOSYMLINKS=1 + ;; + + *-*-cygwin* ) + USE_SOVERSION=1 + USE_SOVERCYGWIN=1 + ;; + esac + + AC_SUBST(USE_SOVERSION) + AC_SUBST(USE_SOVERLINUX) + AC_SUBST(USE_SOVERSOLARIS) + AC_SUBST(USE_SOVERCYGWIN) + AC_SUBST(USE_MACVERSION) + AC_SUBST(USE_SOSYMLINKS) + AC_SUBST(SONAME_FLAG) +]) + + +dnl --------------------------------------------------------------------------- +dnl AC_BAKEFILE_DEPS +dnl +dnl Detects available C/C++ dependency tracking options +dnl --------------------------------------------------------------------------- + +AC_DEFUN([AC_BAKEFILE_DEPS], +[ + AC_ARG_ENABLE([dependency-tracking], + AS_HELP_STRING([--disable-dependency-tracking], + [don't use dependency tracking even if the compiler can]), + [bk_use_trackdeps="$enableval"]) + + AC_MSG_CHECKING([for dependency tracking method]) + + BK_DEPS="" + if test "x$bk_use_trackdeps" = "xno" ; then + DEPS_TRACKING=0 + AC_MSG_RESULT([disabled]) + else + DEPS_TRACKING=1 + + if test "x$GCC" = "xyes"; then + DEPSMODE=gcc + case "${BAKEFILE_HOST}" in + *-*-darwin* ) + dnl -cpp-precomp (the default) conflicts with -MMD option + dnl used by bk-deps (see also http://developer.apple.com/documentation/Darwin/Conceptual/PortingUnix/compiling/chapter_4_section_3.html) + DEPSFLAG="-no-cpp-precomp -MMD" + ;; + * ) + DEPSFLAG="-MMD" + ;; + esac + AC_MSG_RESULT([gcc]) + elif test "x$MWCC" = "xyes"; then + DEPSMODE=mwcc + DEPSFLAG="-MM" + AC_MSG_RESULT([mwcc]) + elif test "x$SUNCC" = "xyes"; then + DEPSMODE=unixcc + DEPSFLAG="-xM1" + AC_MSG_RESULT([Sun cc]) + elif test "x$SGICC" = "xyes"; then + DEPSMODE=unixcc + DEPSFLAG="-M" + AC_MSG_RESULT([SGI cc]) + elif test "x$HPCC" = "xyes"; then + DEPSMODE=unixcc + DEPSFLAG="+make" + AC_MSG_RESULT([HP cc]) + elif test "x$COMPAQCC" = "xyes"; then + DEPSMODE=gcc + DEPSFLAG="-MD" + AC_MSG_RESULT([Compaq cc]) + else + DEPS_TRACKING=0 + AC_MSG_RESULT([none]) + fi + + if test $DEPS_TRACKING = 1 ; then + AC_BAKEFILE_CREATE_FILE_BK_DEPS + chmod +x bk-deps + dnl FIXME: make this $(top_builddir)/bk-deps once autoconf-2.60 + dnl is required (and so top_builddir is never empty): + BK_DEPS="`pwd`/bk-deps" + fi + fi + + AC_SUBST(DEPS_TRACKING) + AC_SUBST(BK_DEPS) +]) + +dnl --------------------------------------------------------------------------- +dnl AC_BAKEFILE_CHECK_BASIC_STUFF +dnl +dnl Checks for presence of basic programs, such as C and C++ compiler, "ranlib" +dnl or "install" +dnl --------------------------------------------------------------------------- + +AC_DEFUN([AC_BAKEFILE_CHECK_BASIC_STUFF], +[ + AC_PROG_RANLIB + AC_PROG_INSTALL + AC_PROG_LN_S + + AC_PROG_MAKE_SET + AC_SUBST(MAKE_SET) + + if test "x$SUNCXX" = "xyes"; then + dnl Sun C++ compiler requires special way of creating static libs; + dnl see here for more details: + dnl https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1229751&group_id=9863 + AR=$CXX + AC_SUBST(AR) + AROPTIONS="-xar -o" + else + AC_CHECK_TOOL(AR, ar, ar) + AROPTIONS=rcu + fi + AC_SUBST(AROPTIONS) + + AC_CHECK_TOOL(STRIP, strip, :) + AC_CHECK_TOOL(NM, nm, :) + + case ${BAKEFILE_HOST} in + *-hp-hpux* ) + dnl HP-UX install doesn't handle the "-d" switch so don't + dnl use it there + INSTALL_DIR="mkdir -p" + ;; + * ) + dnl we must refer to makefile's $(INSTALL) variable and not + dnl current value of shell variable, hence the single quoting: + INSTALL_DIR='$(INSTALL) -d' + ;; + esac + AC_SUBST(INSTALL_DIR) + + LDFLAGS_GUI= + case ${BAKEFILE_HOST} in + *-*-cygwin* | *-*-mingw32* ) + LDFLAGS_GUI="-mwindows" + esac + AC_SUBST(LDFLAGS_GUI) +]) + + +dnl --------------------------------------------------------------------------- +dnl AC_BAKEFILE_RES_COMPILERS +dnl +dnl Checks for presence of resource compilers for win32 or mac +dnl --------------------------------------------------------------------------- + +AC_DEFUN([AC_BAKEFILE_RES_COMPILERS], +[ + case ${BAKEFILE_HOST} in + *-*-cygwin* | *-*-mingw32* ) + dnl Check for win32 resources compiler: + AC_CHECK_TOOL(WINDRES, windres) + ;; + + *-*-darwin* | powerpc-apple-macos* ) + AC_CHECK_PROG(REZ, Rez, Rez, /Developer/Tools/Rez) + AC_CHECK_PROG(SETFILE, SetFile, SetFile, /Developer/Tools/SetFile) + ;; + esac + + AC_SUBST(WINDRES) + AC_SUBST(REZ) + AC_SUBST(SETFILE) +]) + +dnl --------------------------------------------------------------------------- +dnl AC_BAKEFILE_PRECOMP_HEADERS +dnl +dnl Check for precompiled headers support (GCC >= 3.4) +dnl --------------------------------------------------------------------------- + +AC_DEFUN([AC_BAKEFILE_PRECOMP_HEADERS], +[ + + AC_ARG_ENABLE([precomp-headers], + AS_HELP_STRING([--disable-precomp-headers], + [don't use precompiled headers even if compiler can]), + [bk_use_pch="$enableval"]) + + GCC_PCH=0 + ICC_PCH=0 + USE_PCH=0 + BK_MAKE_PCH="" + + case ${BAKEFILE_HOST} in + *-*-cygwin* ) + dnl PCH support is broken in cygwin gcc because of unportable + dnl assumptions about mmap() in gcc code which make PCH generation + dnl fail erratically; disable PCH completely until this is fixed + bk_use_pch="no" + ;; + esac + + if test "x$bk_use_pch" = "x" -o "x$bk_use_pch" = "xyes" ; then + if test "x$GCC" = "xyes"; then + dnl test if we have gcc-3.4: + AC_MSG_CHECKING([if the compiler supports precompiled headers]) + AC_TRY_COMPILE([], + [ + #if !defined(__GNUC__) || !defined(__GNUC_MINOR__) + There is no PCH support + #endif + #if (__GNUC__ < 3) + There is no PCH support + #endif + #if (__GNUC__ == 3) && \ + ((!defined(__APPLE_CC__) && (__GNUC_MINOR__ < 4)) || \ + ( defined(__APPLE_CC__) && (__GNUC_MINOR__ < 3))) || \ + ( defined(__INTEL_COMPILER) ) + There is no PCH support + #endif + ], + [ + AC_MSG_RESULT([yes]) + GCC_PCH=1 + ], + [ + AC_TRY_COMPILE([], + [ + #if !defined(__INTEL_COMPILER) || \ + (__INTEL_COMPILER < 800) + There is no PCH support + #endif + ], + [ + AC_MSG_RESULT([yes]) + ICC_PCH=1 + ], + [ + AC_MSG_RESULT([no]) + ]) + ]) + if test $GCC_PCH = 1 -o $ICC_PCH = 1 ; then + USE_PCH=1 + AC_BAKEFILE_CREATE_FILE_BK_MAKE_PCH + chmod +x bk-make-pch + dnl FIXME: make this $(top_builddir)/bk-make-pch once + dnl autoconf-2.60 is required (and so top_builddir is + dnl never empty): + BK_MAKE_PCH="`pwd`/bk-make-pch" + fi + fi + fi + + AC_SUBST(GCC_PCH) + AC_SUBST(ICC_PCH) + AC_SUBST(BK_MAKE_PCH) +]) + + + +dnl --------------------------------------------------------------------------- +dnl AC_BAKEFILE([autoconf_inc.m4 inclusion]) +dnl +dnl To be used in configure.in of any project using Bakefile-generated mks +dnl +dnl Behaviour can be modified by setting following variables: +dnl BAKEFILE_CHECK_BASICS set to "no" if you don't want bakefile to +dnl to perform check for basic tools like ranlib +dnl BAKEFILE_HOST set this to override host detection, defaults +dnl to ${host} +dnl BAKEFILE_FORCE_PLATFORM set to override platform detection +dnl +dnl Example usage: +dnl +dnl AC_BAKEFILE([FOO(autoconf_inc.m4)]) +dnl +dnl (replace FOO with m4_include above, aclocal would die otherwise) +dnl (yes, it's ugly, but thanks to a bug in aclocal, it's the only thing +dnl we can do...) +dnl --------------------------------------------------------------------------- + +AC_DEFUN([AC_BAKEFILE], +[ + AC_PREREQ([2.58]) + + if test "x$BAKEFILE_HOST" = "x"; then + if test "x${host}" = "x" ; then + AC_MSG_ERROR([You must call the autoconf "CANONICAL_HOST" macro in your configure.ac (or .in) file.]) + fi + + BAKEFILE_HOST="${host}" + fi + + if test "x$BAKEFILE_CHECK_BASICS" != "xno"; then + AC_BAKEFILE_CHECK_BASIC_STUFF + fi + AC_BAKEFILE_GNUMAKE + AC_BAKEFILE_PLATFORM + AC_BAKEFILE_PLATFORM_SPECIFICS + AC_BAKEFILE_SUFFIXES + AC_BAKEFILE_SHARED_LD + AC_BAKEFILE_SHARED_VERSIONS + AC_BAKEFILE_DEPS + AC_BAKEFILE_RES_COMPILERS + + BAKEFILE_BAKEFILE_M4_VERSION="0.2.1" + + dnl includes autoconf_inc.m4: + $1 + + if test "$BAKEFILE_AUTOCONF_INC_M4_VERSION" = "" ; then + AC_MSG_ERROR([No version found in autoconf_inc.m4 - bakefile macro was changed to take additional argument, perhaps configure.in wasn't updated (see the documentation)?]) + fi + + if test "$BAKEFILE_BAKEFILE_M4_VERSION" != "$BAKEFILE_AUTOCONF_INC_M4_VERSION" ; then + AC_MSG_ERROR([Versions of Bakefile used to generate makefiles ($BAKEFILE_AUTOCONF_INC_M4_VERSION) and configure ($BAKEFILE_BAKEFILE_M4_VERSION) do not match.]) + fi +]) + + +dnl --------------------------------------------------------------------------- +dnl Embedded copies of helper scripts follow: +dnl --------------------------------------------------------------------------- + +AC_DEFUN([AC_BAKEFILE_CREATE_FILE_DLLAR_SH], +[ +dnl ===================== dllar.sh begins here ===================== +dnl (Created by merge-scripts.py from dllar.sh +dnl file do not edit here!) +D='$' +cat <<EOF >dllar.sh +#!/bin/sh +# +# dllar - a tool to build both a .dll and an .a file +# from a set of object (.o) files for EMX/OS2. +# +# Written by Andrew Zabolotny, bi...@fr... +# Ported to Unix like shell by Stefan Neis, Ste...@t-... +# +# This script will accept a set of files on the command line. +# All the public symbols from the .o files will be exported into +# a .DEF file, then linker will be run (through gcc) against them to +# build a shared library consisting of all given .o files. All libraries +# (.a) will be first decompressed into component .o files then act as +# described above. You can optionally give a description (-d "description") +# which will be put into .DLL. To see the list of accepted options (as well +# as command-line format) simply run this program without options. The .DLL +# is built to be imported by name (there is no guarantee that new versions +# of the library you build will have same ordinals for same symbols). +# +# dllar is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# dllar is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with dllar; see the file COPYING. If not, write to the Free +# Software Foundation, 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# To successfuly run this program you will need: +# - Current drive should have LFN support (HPFS, ext2, network, etc) +# (Sometimes dllar generates filenames which won't fit 8.3 scheme) +# - gcc +# (used to build the .dll) +# - emxexp +# (used to create .def file from .o files) +# - emximp +# (used to create .a file from .def file) +# - GNU text utilites (cat, sort, uniq) +# used to process emxexp output +# - GNU file utilities (mv, rm) +# - GNU sed +# - lxlite (optional, see flag below) +# (used for general .dll cleanup) +# + +flag_USE_LXLITE=1; + +# +# helper functions +# basnam, variant of basename, which does _not_ remove the path, _iff_ +# second argument (suffix to remove) is given +basnam(){ + case ${D}# in + 1) + echo ${D}1 | sed 's/.*\\///' | sed 's/.*\\\\//' + ;; + 2) + echo ${D}1 | sed 's/'${D}2'${D}//' + ;; + *) + echo "error in basnam ${D}*" + exit 8 + ;; + esac +} + +# Cleanup temporary files and output +CleanUp() { + cd ${D}curDir + for i in ${D}inputFiles ; do + case ${D}i in + *!) + rm -rf \`basnam ${D}i !\` + ;; + *) + ;; + esac + done + + # Kill result in case of failure as there is just to many stupid make/nmake + # things out there which doesn't do this. + if @<:@ ${D}# -eq 0 @:>@; then + rm -f ${D}arcFile ${D}arcFile2 ${D}defFile ${D}dllFile + fi +} + +# Print usage and exit script with rc=1. +PrintHelp() { + echo 'Usage: dllar.sh @<:@-o@<:@utput@:>@ output_file@:>@ @<:@-i@<:@mport@:>@ importlib_name@:>@' + echo ' @<:@-name-mangler-script script.sh@:>@' + echo ' @<:@-d@<:@escription@:>@ "dll descrption"@:>@ @<:@-cc "CC"@:>@ @<:@-f@<:@lags@:>@ "CFLAGS"@:>@' + echo ' @<:@-ord@<:@inals@:>@@:>@ -ex@<:@clude@:>@ "symbol(s)"' + echo ' @<:@-libf@<:@lags@:>@ "{INIT|TERM}{GLOBAL|INSTANCE}"@:>@ @<:@-nocrt@<:@dll@:>@@:>@ @<:@-nolxl@<:@ite@:>@@:>@' + echo ' @<:@*.o@:>@ @<:@*.a@:>@' + echo '*> "output_file" should have no extension.' + echo ' If it has the .o, .a or .dll extension, it is automatically removed.' + echo ' The import library name is derived from this and is set to "name".a,' + echo ' unless overridden by -import' + echo '*> "importlib_name" should have no extension.' + echo ' If it has the .o, or .a extension, it is automatically removed.' + echo ' This name is used as the import library name and may be longer and' + echo ' more descriptive than the DLL name which has to follow the old ' + echo ' 8.3 convention of FAT.' + echo '*> "script.sh may be given to override the output_file name by a' + echo ' different name. It is mainly useful if the regular make process' + echo ' of some package does not take into account OS/2 restriction of' + echo ' DLL name lengths. It takes the importlib name as input and is' + echo ' supposed to procude a shorter name as output. The script should' + echo ' expect to get importlib_name without extension and should produce' + echo ' a (max.) 8 letter name without extension.' + echo '*> "cc" is used to use another GCC executable. (default: gcc.exe)' + echo '*> "flags" should be any set of valid GCC flags. (default: -s -Zcrtdll)' + echo ' These flags will be put at the start of GCC command line.' + echo '*> -ord@<:@inals@:>@ tells dllar to export entries by ordinals. Be careful.' + echo '*> -ex@<:@clude@:>@ defines symbols which will not be exported. You can define' + echo ' multiple symbols, for example -ex "myfunc yourfunc _GLOBAL*".' + echo ' If the last character of a symbol is "*", all symbols beginning' + echo ' with the prefix before "*" will be exclude, (see _GLOBAL* above).' + echo '*> -libf@<:@lags@:>@ can be used to add INITGLOBAL/INITINSTANCE and/or' + echo ' TERMGLOBAL/TERMINSTANCE flags to the dynamically-linked library.' + echo '*> -nocrt@<:@dll@:>@ switch will disable linking the library against emx''s' + echo ' C runtime DLLs.' + echo '*> -nolxl@<:@ite@:>@ switch will disable running lxlite on the resulting DLL.' + echo '*> All other switches (for example -L./ or -lmylib) will be passed' + echo ' unchanged to GCC at the end of command line.' + echo '*> If you create a DLL from a library and you do not specify -o,' + echo ' the basename for DLL and import library will be set to library name,' + echo ' the initial library will be renamed to 'name'_s.a (_s for static)' + echo ' i.e. "dllar gcc.a" will create gcc.dll and gcc.a, and the initial' + echo ' library will be renamed into gcc_s.a.' + echo '--------' + echo 'Example:' + echo ' dllar -o gcc290.dll libgcc.a -d "GNU C runtime library" -ord' + echo ' -ex "__main __ctordtor*" -libf "INITINSTANCE TERMINSTANCE"' + CleanUp + exit 1 +} + +# Execute a command. +# If exit code of the commnad <> 0 CleanUp() is called and we'll exit the script. +# @Uses Whatever CleanUp() uses. +doCommand() { + echo "${D}*" + eval ${D}* + rcCmd=${D}? + + if @<:@ ${D}rcCmd -ne 0 @:>@; then + echo "command failed, exit code="${D}rcCmd + CleanUp + exit ${D}rcCmd + fi +} + +# main routine +# setup globals +cmdLine=${D}* +outFile="" +outimpFile="" +inputFiles="" +renameScript="" +description="" +CC=gcc.exe +CFLAGS="-s -Zcrtdll" +EXTRA_CFLAGS="" +EXPORT_BY_ORDINALS=0 +exclude_symbols="" +library_flags="" +curDir=\`pwd\` +curDirS=curDir +case ${D}curDirS in +*/) + ;; +*) + curDirS=${D}{curDirS}"/" + ;; +esac +# Parse commandline +libsToLink=0 +omfLinking=0 +while @<:@ ${D}1 @:>@; do + case ${D}1 in + -ord*) + EXPORT_BY_ORDINALS=1; + ;; + -o*) + shift + outFile=${D}1 + ;; + -i*) + shift + outimpFile=${D}1 + ;; + -name-mangler-script) + shift + renameScript=${D}1 + ;; + -d*) + shift + description=${D}1 + ;; + -f*) + shift + CFLAGS=${D}1 + ;; + -c*) + shift + CC=${D}1 + ;; + -h*) + PrintHelp + ;; + -ex*) + shift + exclude_symbols=${D}{exclude_symbols}${D}1" " + ;; + -libf*) + shift + library_flags=${D}{library_flags}${D}1" " + ;; + -nocrt*) + CFLAGS="-s" + ;; + -nolxl*) + flag_USE_LXLITE=0 + ;; + -* | /*) + case ${D}1 in + -L* | -l*) + libsToLink=1 + ;; + -Zomf) + omfLinking=1 + ;; + *) + ;; + esac + EXTRA_CFLAGS=${D}{EXTRA_CFLAGS}" "${D}1 + ;; + *.dll) + EXTRA_CFLAGS="${D}{EXTRA_CFLAGS} \`basnam ${D}1 .dll\`" + if @<:@ ${D}omfLinking -eq 1 @:>@; then + EXTRA_CFLAGS="${D}{EXTRA_CFLAGS}.lib" + else + EXTRA_CFLAGS="${D}{EXTRA_CFLAGS}.a" + fi + ;; + *) + found=0; + if @<:@ ${D}libsToLink -ne 0 @:>@; then + EXTRA_CFLAGS=${D}{EXTRA_CFLAGS}" "${D}1 + else + for file in ${D}1 ; do + if @<:@ -f ${D}file @:>@; then + inputFiles="${D}{inputFiles} ${D}file" + found=1 + fi + done + if @<:@ ${D}found -eq 0 @:>@; then + echo "ERROR: No file(s) found: "${D}1 + exit 8 + fi + fi + ;; + esac + shift +done # iterate cmdline words + +# +if @<:@ -z "${D}inputFiles" @:>@; then + echo "dllar: no input files" + PrintHelp +fi + +# Now extract all .o files from .a files +newInputFiles="" +for file in ${D}inputFiles ; do + case ${D}file in + *.a | *.lib) + case ${D}file in + *.a) + suffix=".a" + AR="ar" + ;; + *.lib) + suffix=".lib" + AR="emxomfar" + EXTRA_CFLAGS="${D}EXTRA_CFLAGS -Zomf" + ;; + *) + ;; + esac + dirname=\`basnam ${D}file ${D}suffix\`"_%" + mkdir ${D}dirname + if @<:@ ${D}? -ne 0 @:>@; then + echo "Failed to create subdirectory ./${D}dirname" + CleanUp + exit 8; + fi + # Append '!' to indicate archive + newInputFiles="${D}newInputFiles ${D}{dirname}!" + doCommand "cd ${D}dirname; ${D}AR x ../${D}file" + cd ${D}curDir + found=0; + for subfile in ${D}dirname/*.o* ; do + if @<:@ -f ${D}subfile @:>@; then + found=1 + if @<:@ -s ${D}subfile @:>@; then + # FIXME: This should be: is file size > 32 byte, _not_ > 0! + newInputFiles="${D}newInputFiles ${D}subfile" + fi + fi + done + if @<:@ ${D}found -eq 0 @:>@; then + echo "WARNING: there are no files in archive \\'${D}file\\'" + fi + ;; + *) + newInputFiles="${D}{newInputFiles} ${D}file" + ;; + esac +done +inputFiles="${D}newInputFiles" + +# Output filename(s). +do_backup=0; +if @<:@ -z ${D}outFile @:>@; then + do_backup=1; + set outFile ${D}inputFiles; outFile=${D}2 +fi + +# If it is an archive, remove the '!' and the '_%' suffixes +case ${D}outFile in +*_%!) + outFile=\`basnam ${D}outFile _%!\` + ;; +*) + ;; +esac +case ${D}outFile in +*.dll) + outFile=\`basnam ${D}outFile .dll\` + ;; +*.DLL) + outFile=\`basnam ${D}outFile .DLL\` + ;; +*.o) + outFile=\`basnam ${D}outFile .o\` + ;; +*.obj) +... [truncated message content] |
From: <sag...@us...> - 2009-12-17 21:42:57
|
Revision: 443 http://modplug.svn.sourceforge.net/modplug/?rev=443&view=rev Author: saga-games Date: 2009-12-17 21:42:45 +0000 (Thu, 17 Dec 2009) Log Message: ----------- [Fix] Sample Editor: When going down close to 0 Hz in the sample editor, the sample freq wrapped around to the maximum value. [Fix] Pattern Editor: When in sample mode, samples were never stopped when in new-style note off mode, which lead to sample jam when using long/looped samples. [Ref] Some less important refactoring in soundlib Modified Paths: -------------- trunk/OpenMPT/mptrack/Ctrl_smp.cpp trunk/OpenMPT/mptrack/View_pat.cpp trunk/OpenMPT/soundlib/Snd_fx.cpp Modified: trunk/OpenMPT/mptrack/Ctrl_smp.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2009-12-14 20:12:20 UTC (rev 442) +++ trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2009-12-17 21:42:45 UTC (rev 443) @@ -2917,6 +2917,7 @@ { UINT d = pSmp->nC5Speed; if (d < 1) d = 8363; + if(d < m_nFinetuneStep) d = m_nFinetuneStep; d += (pos * m_nFinetuneStep); pSmp->nC5Speed = CLAMP(d, 1, 9999999); // 9999999 is max. in Impulse Tracker int transp = CSoundFile::FrequencyToTranspose(pSmp->nC5Speed) >> 7; Modified: trunk/OpenMPT/mptrack/View_pat.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_pat.cpp 2009-12-14 20:12:20 UTC (rev 442) +++ trunk/OpenMPT/mptrack/View_pat.cpp 2009-12-17 21:42:45 UTC (rev 443) @@ -3929,10 +3929,7 @@ } else { - if(CMainFrame::m_dwPatternSetup & PATTERN_NOTEFADE) - pModDoc->NoteOff(note, TRUE, ins, GetChanFromCursor(m_dwCursor)); - else - pModDoc->NoteOff(note, FALSE, ins, GetChanFromCursor(m_dwCursor)); + pModDoc->NoteOff(note, ((CMainFrame::m_dwPatternSetup & PATTERN_NOTEFADE) || pSndFile->GetNumInstruments() == 0) ? TRUE : FALSE, ins, GetChanFromCursor(m_dwCursor)); } } Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp =================================================================== --- trunk/OpenMPT/soundlib/Snd_fx.cpp 2009-12-14 20:12:20 UTC (rev 442) +++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2009-12-17 21:42:45 UTC (rev 443) @@ -1310,10 +1310,10 @@ // Note Cut/Off/Fade => ignore instrument if (note >= NOTE_MIN_SPECIAL) instr = 0; - if ((note) && (note <= 128)) pChn->nNewNote = note; + if ((note) && (note <= NOTE_MAX)) pChn->nNewNote = note; // New Note Action ? - if ((note) && (note <= 128) && (!bPorta)) + if ((note) && (note <= NOTE_MAX) && (!bPorta)) { CheckNNA(nChn, instr, note, FALSE); } @@ -2550,11 +2550,7 @@ if((m_nType & MOD_TYPE_MOD) != 0) // MOD: Invert Loop { pChn->nEFxSpeed = param; - if(m_dwSongFlags & SONG_FIRSTTICK) - { - //if((pChn->nRowInstr != 0) && (m_nTickCount == 0)) pChn->nEFxOffset = 0; // reset offset (except when in pattern delay) TODO - InvertLoop(pChn); - } + if(m_dwSongFlags & SONG_FIRSTTICK) InvertLoop(pChn); } else // XM: Set Active Midi Macro { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2009-12-20 18:17:26
|
Revision: 446 http://modplug.svn.sourceforge.net/modplug/?rev=446&view=rev Author: saga-games Date: 2009-12-20 18:17:16 +0000 (Sun, 20 Dec 2009) Log Message: ----------- [Fix] The S3M format actually knows muted channels. Added this to the S3M loader/saver and MuteChannel functions. Modified Paths: -------------- trunk/OpenMPT/mptrack/Moddoc.cpp trunk/OpenMPT/soundlib/Load_s3m.cpp Modified: trunk/OpenMPT/mptrack/Moddoc.cpp =================================================================== --- trunk/OpenMPT/mptrack/Moddoc.cpp 2009-12-20 01:10:47 UTC (rev 445) +++ trunk/OpenMPT/mptrack/Moddoc.cpp 2009-12-20 18:17:16 UTC (rev 446) @@ -1013,7 +1013,7 @@ bool CModDoc::MuteChannel(CHANNELINDEX nChn, bool doMute) -//---------------------------------------------- +//------------------------------------------------------- { DWORD muteType = (CMainFrame::m_dwPatternSetup&PATTERN_SYNCMUTE)? CHN_SYNCMUTE:CHN_MUTE; @@ -1057,8 +1057,8 @@ } } - //Mark IT as modified - if (m_SndFile.m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT)) { + //Mark IT/MPTM/S3M as modified + if (m_SndFile.m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT | MOD_TYPE_S3M)) { CMainFrame::GetMainFrame()->ThreadSafeSetModified(this); } Modified: trunk/OpenMPT/soundlib/Load_s3m.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_s3m.cpp 2009-12-20 01:10:47 UTC (rev 445) +++ trunk/OpenMPT/soundlib/Load_s3m.cpp 2009-12-20 18:17:16 UTC (rev 446) @@ -218,7 +218,7 @@ bool CSoundFile::ReadS3M(const BYTE *lpStream, DWORD dwMemLength) //--------------------------------------------------------------- { - if ((!lpStream) || (dwMemLength <= sizeof(S3MFILEHEADER)+sizeof(S3MSAMPLESTRUCT)+64)) return false; + if ((!lpStream) || (dwMemLength <= sizeof(S3MFILEHEADER)+64)) return false; UINT insnum,patnum,nins,npat; DWORD insfile[128]; @@ -282,16 +282,24 @@ m_nChannels = 4; for (UINT ich=0; ich<32; ich++) { - ChnSettings[ich].nPan = 128; ChnSettings[ich].nVolume = 64; - ChnSettings[ich].dwFlags = CHN_MUTE; - if (psfh.channels[ich] != 0xFF) + if(psfh.channels[ich] == 0xFF) { - m_nChannels = ich+1; - UINT b = psfh.channels[ich] & 0x0F; - ChnSettings[ich].nPan = (b & 8) ? 0xC0 : 0x40; - ChnSettings[ich].dwFlags = 0; + ChnSettings[ich].nPan = 128; + ChnSettings[ich].dwFlags = CHN_MUTE; + } else + { + m_nChannels = ich + 1; + ChnSettings[ich].nPan = (psfh.channels[ich] & 8) ? 0xC0 : 0x40; + if (psfh.channels[ich] & 0x80) + { + ChnSettings[ich].dwFlags = CHN_MUTE; + /* Detect Adlib channels: + c = channels[ich] ^ 0x80; + if(c >= 16 && c < 32) adlibChannel = true; + */ + } } } if (m_nChannels < 1) m_nChannels = 1; @@ -572,7 +580,9 @@ if (i < m_nChannels) { UINT tmp = (i & 0x0F) >> 1; - header[0x40+i] = (i & 0x10) | ((i & 1) ? 8+tmp : tmp); + tmp = (i & 0x10) | ((i & 1) ? 8 + tmp : tmp); + if((ChnSettings[i].dwFlags & CHN_MUTE) != 0) tmp |= 0x80; + header[0x40+i] = tmp; } else header[0x40+i] = 0xFF; } fwrite(header, 0x60, 1, f); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2009-12-21 18:56:42
|
Revision: 447 http://modplug.svn.sourceforge.net/modplug/?rev=447&view=rev Author: saga-games Date: 2009-12-21 18:56:25 +0000 (Mon, 21 Dec 2009) Log Message: ----------- [Fix] Sequence list: Shift+End didn't work. [Fix] Pattern editor: When pasting only partly copied channels, push forward paste failed. [Fix] Pattern editor: Push forward paste shortcut didn't work. [Ref] J2B Loader: Cleaned up command code translation a bit. Modified Paths: -------------- trunk/OpenMPT/mptrack/Ctrl_seq.cpp trunk/OpenMPT/mptrack/Modedit.cpp trunk/OpenMPT/mptrack/View_pat.cpp trunk/OpenMPT/soundlib/load_j2b.cpp Modified: trunk/OpenMPT/mptrack/Ctrl_seq.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_seq.cpp 2009-12-20 18:17:16 UTC (rev 446) +++ trunk/OpenMPT/mptrack/Ctrl_seq.cpp 2009-12-21 18:56:25 UTC (rev 447) @@ -381,7 +381,7 @@ case kcOrderlistNavigateLast: if((m_pModDoc != nullptr) && (m_pModDoc->GetSoundFile() != nullptr)) { - SetCurSelTo2ndSel(wParam == kcOrderlistNavigateLast); + SetCurSelTo2ndSel(wParam == kcOrderlistNavigateLastSelect); ORDERINDEX nLast = m_pModDoc->GetSoundFile()->Order.GetLengthTailTrimmed(); if(nLast > 0) nLast--; SetCurSel(nLast); Modified: trunk/OpenMPT/mptrack/Modedit.cpp =================================================================== --- trunk/OpenMPT/mptrack/Modedit.cpp 2009-12-20 18:17:16 UTC (rev 446) +++ trunk/OpenMPT/mptrack/Modedit.cpp 2009-12-21 18:56:25 UTC (rev 447) @@ -1178,7 +1178,6 @@ bool bS3MCommands = false, bOk = false; MODTYPE origFormat = MOD_TYPE_IT; UINT len = 0, startLen; - MODCOMMAND origModCmd; bool doOverflowPaste = (CMainFrame::m_dwPatternSetup & PATTERN_OVERFLOWPASTE) && (pasteMode != pm_pasteflood) && (pasteMode != pm_pushforwardpaste); bool doITStyleMix = (pasteMode == pm_mixpaste_it); @@ -1235,8 +1234,10 @@ // Paste columns while ((p[len] == '|') && (len + 11 < dwMemSize)) { - origModCmd = m[col]; // ITSyle mixpaste requires that we keep a copy of the thing we are about to paste on - // so that we can refer back to check if there was anything in e.g. the note column before we pasted. + // ITSyle mixpaste requires that we keep a copy of the thing we are about to paste on + // so that we can refer back to check if there was anything in e.g. the note column before we pasted. + MODCOMMAND origModCmd = m[col]; + LPSTR s = p+len+1; if (col < m_SndFile.m_nChannels) @@ -1248,6 +1249,7 @@ { m[col + nPushRow * m_SndFile.m_nChannels] = m[col + (nPushRow - 1) * m_SndFile.m_nChannels]; } + m[col].Clear(); } // Note Modified: trunk/OpenMPT/mptrack/View_pat.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_pat.cpp 2009-12-20 18:17:16 UTC (rev 446) +++ trunk/OpenMPT/mptrack/View_pat.cpp 2009-12-21 18:56:25 UTC (rev 447) @@ -3607,6 +3607,7 @@ case kcEditMixPaste: OnEditMixPaste(); return wParam; case kcEditMixPasteITStyle: OnEditMixPasteITStyle(); return wParam; case kcEditPasteFlood: OnEditPasteFlood(); return wParam; + case kcEditPushForwardPaste: OnEditPushForwardPaste(); return wParam; case kcEditSelectAll: OnEditSelectAll(); return wParam; case kcTogglePluginEditor: TogglePluginEditor((m_dwCursor & 0xFFFF) >> 3); return wParam; case kcToggleFollowSong: SendCtrlMessage(CTRLMSG_PAT_FOLLOWSONG); return wParam; Modified: trunk/OpenMPT/soundlib/load_j2b.cpp =================================================================== --- trunk/OpenMPT/soundlib/load_j2b.cpp 2009-12-20 18:17:16 UTC (rev 446) +++ trunk/OpenMPT/soundlib/load_j2b.cpp 2009-12-21 18:56:25 UTC (rev 447) @@ -94,6 +94,17 @@ #pragma pack() +static BYTE riffam_efftrans[26] = +{ + CMD_ARPEGGIO, CMD_PORTAMENTOUP, CMD_PORTAMENTODOWN, CMD_TONEPORTAMENTO, + CMD_VIBRATO, CMD_TONEPORTAVOL, CMD_VIBRATOVOL, CMD_TREMOLO, + CMD_PANNING8, CMD_OFFSET, CMD_VOLUMESLIDE, CMD_POSITIONJUMP, + CMD_VOLUME, CMD_PATTERNBREAK, CMD_MODCMDEX, CMD_TEMPO, + CMD_GLOBALVOLUME, CMD_GLOBALVOLSLIDE, CMD_KEYOFF, CMD_SETENVPOSITION, + CMD_CHANNELVOLUME, CMD_CHANNELVOLSLIDE, CMD_PANNINGSLIDE, CMD_RETRIG, + CMD_TREMOR, CMD_XFINEPORTAUPDOWN, +}; + bool CSoundFile::Convert_RIFF_AM_Pattern(PATTERNINDEX nPat, const LPCBYTE lpStream, DWORD dwMemLength, bool bIsAM) //---------------------------------------------------------------------------------------------------------------- { @@ -139,45 +150,53 @@ m->command = lpStream[dwMemPos + 1]; m->param = lpStream[dwMemPos]; dwMemPos += 2; - switch(m->command) + + if(m->command <= 25) { - case 0x00: if (m->param) m->command = CMD_ARPEGGIO; break; - case 0x01: m->command = CMD_PORTAMENTOUP; break; - case 0x02: m->command = CMD_PORTAMENTODOWN; break; - case 0x03: m->command = CMD_TONEPORTAMENTO; break; - case 0x04: m->command = CMD_VIBRATO; break; - case 0x05: m->command = CMD_TONEPORTAVOL; if (m->param & 0xF0) m->param &= 0xF0; break; - case 0x06: m->command = CMD_VIBRATOVOL; if (m->param & 0xF0) m->param &= 0xF0; break; - case 0x07: m->command = CMD_TREMOLO; break; - case 0x08: m->command = CMD_PANNING8; - if(m->param <= 0x80) m->param = min(m->param << 1, 0xFF); - else if(m->param == 0xA4) {m->command = CMD_S3MCMDEX; m->param = 0x91;} + // command translation + m->command = riffam_efftrans[m->command]; + + // handling special commands + switch(m->command) + { + case CMD_ARPEGGIO: + if(m->param == 0) m->command = CMD_NONE; + break; + case CMD_TONEPORTAVOL: + case CMD_VIBRATOVOL: + case CMD_VOLUMESLIDE: + case CMD_GLOBALVOLSLIDE: + case CMD_PANNINGSLIDE: + if (m->param & 0xF0) m->param &= 0xF0; + break; + case CMD_PANNING8: + if(m->param <= 0x80) m->param = min(m->param << 1, 0xFF); + else if(m->param == 0xA4) {m->command = CMD_S3MCMDEX; m->param = 0x91;} + break; + case CMD_PATTERNBREAK: + m->param = ((m->param >> 4) * 10) + (m->param & 0x0F); + break; + case CMD_MODCMDEX: + MODExx2S3MSxx(m); + break; + case CMD_TEMPO: + if(m->param <= 0x1F) m->command = CMD_SPEED; + break; + case CMD_XFINEPORTAUPDOWN: + switch(m->param & 0xF0) + { + case 0x10: + m->command = CMD_PORTAMENTOUP; break; - case 0x09: m->command = CMD_OFFSET; break; - case 0x0A: m->command = CMD_VOLUMESLIDE; if (m->param & 0xF0) m->param &= 0xF0; break; - case 0x0B: m->command = CMD_POSITIONJUMP; break; - case 0x0C: m->command = CMD_VOLUME; break; - case 0x0D: m->command = CMD_PATTERNBREAK; m->param = ((m->param >> 4) * 10) + (m->param & 0x0F); break; - case 0x0E: m->command = CMD_MODCMDEX; MODExx2S3MSxx(m); break; - case 0x0F: m->command = (m->param <= 0x1F) ? CMD_SPEED : CMD_TEMPO; break; - case 'G' - 55: m->command = CMD_GLOBALVOLUME; break; - case 'H' - 55: m->command = CMD_GLOBALVOLSLIDE; if (m->param & 0xF0) m->param &= 0xF0; break; - case 'K' - 55: m->command = CMD_KEYOFF; break; - case 'L' - 55: m->command = CMD_SETENVPOSITION; break; - case 'M' - 55: m->command = CMD_CHANNELVOLUME; break; - case 'N' - 55: m->command = CMD_CHANNELVOLSLIDE; break; - case 'P' - 55: m->command = CMD_PANNINGSLIDE; if (m->param & 0xF0) m->param &= 0xF0; break; - case 'R' - 55: m->command = CMD_RETRIG; break; - case 'T' - 55: m->command = CMD_TREMOR; break; - case 'X' - 55: - switch(m->param & 0xF0) - { - case 0x10: m->command = CMD_PORTAMENTOUP; m->param = (m->param & 0x0F) | 0xE0; break; - case 0x20: m->command = CMD_PORTAMENTODOWN; m->param = (m->param & 0x0F) | 0xE0; break; - default: m->command = CMD_S3MCMDEX; break; - } + case 0x20: + m->command = CMD_PORTAMENTODOWN; break; - default: + } + m->param = (m->param & 0x0F) | 0xE0; + break; + } + } else + { #ifdef DEBUG { CHAR s[64]; @@ -186,7 +205,6 @@ } #endif m->command = CMD_NONE; - break; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2009-12-23 19:56:29
|
Revision: 449 http://modplug.svn.sourceforge.net/modplug/?rev=449&view=rev Author: saga-games Date: 2009-12-23 19:56:16 +0000 (Wed, 23 Dec 2009) Log Message: ----------- [Fix] XM Compatibility: Perfect emulation of buggy Rxy behaviour. Thanks to Ian Luck for helping me with this. [Imp] Pattern Editor: When using Find&Replace, "follow song" will be disabled, because it's pointless and unusable with "follow song" on. Modified Paths: -------------- trunk/OpenMPT/mptrack/View_pat.cpp trunk/OpenMPT/soundlib/Snd_fx.cpp Modified: trunk/OpenMPT/mptrack/View_pat.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_pat.cpp 2009-12-23 13:43:29 UTC (rev 448) +++ trunk/OpenMPT/mptrack/View_pat.cpp 2009-12-23 19:56:16 UTC (rev 449) @@ -1817,6 +1817,10 @@ nFound++; if (bUpdPos) { + // turn off "follow song" + m_dwStatus &= ~PATSTATUS_FOLLOWSONG; + SendCtrlMessage(CTRLMSG_PAT_FOLLOWSONG, 0); + // go to place of finding SetCurrentPattern(nPat); SetCurrentRow(n / pSndFile->m_nChannels); } Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp =================================================================== --- trunk/OpenMPT/soundlib/Snd_fx.cpp 2009-12-23 13:43:29 UTC (rev 448) +++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2009-12-23 19:56:16 UTC (rev 449) @@ -3165,8 +3165,8 @@ if(m_dwSongFlags & SONG_FIRSTTICK) { // here are some really stupid things FT2 does + if(pChn->nRowVolCmd == VOLCMD_VOLUME) return; if(pChn->nRowInstr > 0 && pChn->nRowNote == NOTE_NONE) nRetrigCount = 1; - if(pChn->nRowVolCmd == VOLCMD_VOLUME) nRetrigCount = -1; // not correct yet if(pChn->nRowNote != NOTE_NONE && pChn->nRowNote <= GetModSpecifications().noteMax) nRetrigCount++; } if (nRetrigCount >= nRetrigSpeed) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2009-12-28 02:58:06
|
Revision: 451 http://modplug.svn.sourceforge.net/modplug/?rev=451&view=rev Author: saga-games Date: 2009-12-28 02:57:57 +0000 (Mon, 28 Dec 2009) Log Message: ----------- [Imp] VST: Further improvement to param mapping so that the midi dialog really only pops up when the VST window has the focus [Fix] IT Compatibility: Reset NNA actions on every note (tentative fix) Modified Paths: -------------- trunk/OpenMPT/mptrack/Vstplug.cpp trunk/OpenMPT/soundlib/Snd_fx.cpp Modified: trunk/OpenMPT/mptrack/Vstplug.cpp =================================================================== --- trunk/OpenMPT/mptrack/Vstplug.cpp 2009-12-25 12:00:26 UTC (rev 450) +++ trunk/OpenMPT/mptrack/Vstplug.cpp 2009-12-28 02:57:57 UTC (rev 451) @@ -669,7 +669,7 @@ pModDoc->RecordParamChange(pVstPlugin->GetSlot(), index); } - if (pModDoc && CMainFrame::GetInputHandler()->ShiftPressed() && pVstPlugin->GetEditor() && pVstPlugin->GetEditor()->m_hWnd) + if (pModDoc && CMainFrame::GetInputHandler()->ShiftPressed() && pVstPlugin->GetEditor() && (pVstPlugin->GetEditor()->m_hWnd == ::GetForegroundWindow())) { CMainFrame::GetInputHandler()->SetModifierMask(0); // Make sure that the dialog will open only once. CAbstractVstEditor *pVstEditor = pVstPlugin->GetEditor(); Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp =================================================================== --- trunk/OpenMPT/soundlib/Snd_fx.cpp 2009-12-25 12:00:26 UTC (rev 450) +++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2009-12-28 02:57:57 UTC (rev 451) @@ -777,6 +777,7 @@ pChn->nResSwing = pChn->nCutSwing = 0; if (pIns) { + if(IsCompatibleMode(TRK_IMPULSETRACKER)) pChn->nNNA = pIns->nNNA; if (!(pIns->VolEnv.dwFlags & ENV_CARRY)) pChn->nVolEnvPosition = 0; if (!(pIns->PanEnv.dwFlags & ENV_CARRY)) pChn->nPanEnvPosition = 0; if (!(pIns->PitchEnv.dwFlags & ENV_CARRY)) pChn->nPitchEnvPosition = 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rel...@us...> - 2009-12-30 21:54:27
|
Revision: 452 http://modplug.svn.sourceforge.net/modplug/?rev=452&view=rev Author: relabsoluness Date: 2009-12-30 21:54:16 +0000 (Wed, 30 Dec 2009) Log Message: ----------- [Imp] Pattern editor: If keyboard split is active, instrument drop list will show split instrument and split note. [Mod] Pattern c&p: Mix paste shouldn't anymore trigger conversion on modcommands that weren't changed at all (appeared in rev. 403). Now, however, partial conversion will not be done so this still needs further fixing. [Fix] Pattern c&p: Mix paste should behave better with parameter control notes. [Ref/Fix] Minor tweaks and fixes (fixes to use of CStrings in wsprintf parameters, cleaned compiler warnings, small adjustment to orderlist resizing after loading module...) Modified Paths: -------------- trunk/OpenMPT/mptrack/AbstractVstEditor.cpp trunk/OpenMPT/mptrack/Ctrl_pat.cpp trunk/OpenMPT/mptrack/Ctrl_seq.cpp trunk/OpenMPT/mptrack/Mod2wave.cpp trunk/OpenMPT/mptrack/Moddoc.cpp trunk/OpenMPT/mptrack/Moddoc.h trunk/OpenMPT/mptrack/Modedit.cpp trunk/OpenMPT/mptrack/View_pat.cpp trunk/OpenMPT/mptrack/dlg_misc.cpp trunk/OpenMPT/mptrack/fxp.cpp trunk/OpenMPT/mptrack/misc_util.cpp trunk/OpenMPT/mptrack/misc_util.h trunk/OpenMPT/mptrack/typedefs.h trunk/OpenMPT/soundlib/Sndfile.cpp trunk/OpenMPT/soundlib/Sndfile.h trunk/OpenMPT/soundlib/modcommand.h Modified: trunk/OpenMPT/mptrack/AbstractVstEditor.cpp =================================================================== --- trunk/OpenMPT/mptrack/AbstractVstEditor.cpp 2009-12-28 02:57:57 UTC (rev 451) +++ trunk/OpenMPT/mptrack/AbstractVstEditor.cpp 2009-12-30 21:54:16 UTC (rev 452) @@ -175,11 +175,11 @@ if(m_pVstPlugin->GetNumPrograms() > 0 && m_pMenu->GetMenuItemCount() < 5) { - m_pMenu->AppendMenu(MF_BYPOSITION, ID_VSTPRESETBACKWARDJUMP, (LPCTSTR)"<<"); - m_pMenu->AppendMenu(MF_BYPOSITION, ID_PREVIOUSVSTPRESET, (LPCTSTR)"<"); - m_pMenu->AppendMenu(MF_BYPOSITION, ID_NEXTVSTPRESET, (LPCTSTR)">"); - m_pMenu->AppendMenu(MF_BYPOSITION, ID_VSTPRESETFORWARDJUMP, (LPCTSTR)">>"); - m_pMenu->AppendMenu(MF_BYPOSITION|MF_DISABLED, 0, ""); + m_pMenu->AppendMenu(MF_BYPOSITION, ID_VSTPRESETBACKWARDJUMP, TEXT("<<")); + m_pMenu->AppendMenu(MF_BYPOSITION, ID_PREVIOUSVSTPRESET, TEXT("<")); + m_pMenu->AppendMenu(MF_BYPOSITION, ID_NEXTVSTPRESET, TEXT(">")); + m_pMenu->AppendMenu(MF_BYPOSITION, ID_VSTPRESETFORWARDJUMP, TEXT(">>")); + m_pMenu->AppendMenu(MF_BYPOSITION|MF_DISABLED, 0, TEXT("")); } long index = m_pVstPlugin->GetCurrentProgram(); @@ -470,7 +470,7 @@ m_pInputMenu->AppendMenu(MF_SEPARATOR); } name.Format("Ins%02d: %s", inputInstruments[nIns], pSndFile->Instruments[inputInstruments[nIns]]->name); - if (inputInstruments[nIns]==m_nInstrument) checked=true; + if (inputInstruments[nIns] == (UINT)m_nInstrument) checked=true; m_pInputMenu->AppendMenu(MF_STRING|(checked?MF_CHECKED:0), ID_SELECTINST+inputInstruments[nIns], name); } Modified: trunk/OpenMPT/mptrack/Ctrl_pat.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_pat.cpp 2009-12-28 02:57:57 UTC (rev 451) +++ trunk/OpenMPT/mptrack/Ctrl_pat.cpp 2009-12-30 21:54:16 UTC (rev 452) @@ -254,29 +254,47 @@ LockControls(); if (dwHintMask & (HINT_MODTYPE|HINT_INSNAMES|HINT_SMPNAMES)) { + static const TCHAR szSplitFormat[] = TEXT("%02u %s %02u: %s/%s"); UINT nPos = 0; m_CbnInstrument.SetRedraw(FALSE); m_CbnInstrument.ResetContent(); m_CbnInstrument.SetItemData(m_CbnInstrument.AddString(" No Instrument"), 0); - if (m_pSndFile->m_nInstruments) { - for (UINT i=1; i<=m_pSndFile->m_nInstruments; i++) { + const INSTRUMENTINDEX nSplitIns = m_pModDoc->GetSplitKeyboardSettings()->splitInstrument; + const MODCOMMAND::NOTE noteSplit = 1 + m_pModDoc->GetSplitKeyboardSettings()->splitNote; + const CString sSplitInsName = m_pModDoc->GetPatternViewInstrumentName(nSplitIns, true, false); + if (m_pSndFile->m_nInstruments) + { + for (UINT i=1; i<=m_pSndFile->m_nInstruments; i++) + { if (m_pSndFile->Instruments[i] == NULL) { continue; } - CString displayName = m_pSndFile->GetPatternViewInstrumentName(i); - UINT n = m_CbnInstrument.AddString(displayName); + CString sDisplayName; + if (m_pModDoc->GetSplitKeyboardSettings()->IsSplitActive()) + { + wsprintf(s, szSplitFormat, nSplitIns, GetNoteStr(noteSplit), i, + (LPCTSTR)sSplitInsName, (LPCTSTR)m_pModDoc->GetPatternViewInstrumentName(i, true, false)); + sDisplayName = s; + } + else + sDisplayName = m_pModDoc->GetPatternViewInstrumentName(i); + + UINT n = m_CbnInstrument.AddString(sDisplayName); if (n == m_nInstrument) nPos = n; m_CbnInstrument.SetItemData(n, i); - } - } else { UINT nmax = m_pSndFile->m_nSamples; while ((nmax > 1) && (m_pSndFile->Samples[nmax].pSample == NULL) && (!m_pSndFile->m_szNames[nmax][0])) nmax--; - for (UINT i=1; i<=nmax; i++) if ((m_pSndFile->m_szNames[i][0]) || (m_pSndFile->Samples[i].pSample)) { - wsprintf(s, "%02d: %s", i, m_pSndFile->m_szNames[i]); + for (UINT i=1; i<=nmax; i++) if ((m_pSndFile->m_szNames[i][0]) || (m_pSndFile->Samples[i].pSample)) + { + if (m_pModDoc->GetSplitKeyboardSettings()->IsSplitActive() && nSplitIns < ARRAYELEMCOUNT(m_pSndFile->m_szNames)) + wsprintf(s, szSplitFormat, nSplitIns, GetNoteStr(noteSplit), i, m_pSndFile->m_szNames[nSplitIns], m_pSndFile->m_szNames[i]); + else + wsprintf(s, "%02u: %s", i, m_pSndFile->m_szNames[i]); + UINT n = m_CbnInstrument.AddString(s); if (n == m_nInstrument) nPos = n; m_CbnInstrument.SetItemData(n, i); @@ -482,7 +500,7 @@ if (m_CbnInstrument.GetItemData(i) == nIns) { m_CbnInstrument.SetCurSel(i); - m_nInstrument = nIns; + m_nInstrument = static_cast<INSTRUMENTINDEX>(nIns); //rewbs.instroVST if (HasValidPlug(m_nInstrument)) ::EnableWindow(::GetDlgItem(m_hWnd, IDC_PATINSTROPLUGGUI), true); @@ -678,7 +696,7 @@ int nmax = (m_pSndFile->m_nInstruments) ? m_pSndFile->m_nInstruments : m_pSndFile->m_nSamples; if ((n >= 0) && (n <= nmax) && (n != (int)m_nInstrument)) { - m_nInstrument = n; + m_nInstrument = static_cast<INSTRUMENTINDEX>(n); if (m_pParent) m_pParent->InstrumentChanged(m_nInstrument); } SwitchToView(); Modified: trunk/OpenMPT/mptrack/Ctrl_seq.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_seq.cpp 2009-12-28 02:57:57 UTC (rev 451) +++ trunk/OpenMPT/mptrack/Ctrl_seq.cpp 2009-12-30 21:54:16 UTC (rev 452) @@ -674,12 +674,13 @@ s[0] = 0; if(CMainFrame::m_dwPatternSetup & PATTERN_HEXDISPLAY) { - wsprintf(s, "Position %02Xh of %02Xh", m_nScrollPos, pSndFile->GetNumPatterns()); + wsprintf(s, "Position %02Xh of %02Xh", m_nScrollPos, pSndFile->Order.GetLengthFirstEmpty()); } else { + const ORDERINDEX nLength = pSndFile->Order.GetLengthFirstEmpty(); wsprintf(s, "Position %d of %d (%02Xh of %02Xh)", - m_nScrollPos, pSndFile->GetNumPatterns(), m_nScrollPos, pSndFile->GetNumPatterns()); + m_nScrollPos, nLength, m_nScrollPos, nLength); } if (m_nScrollPos < pSndFile->Order.GetLength()) Modified: trunk/OpenMPT/mptrack/Mod2wave.cpp =================================================================== --- trunk/OpenMPT/mptrack/Mod2wave.cpp 2009-12-28 02:57:57 UTC (rev 451) +++ trunk/OpenMPT/mptrack/Mod2wave.cpp 2009-12-30 21:54:16 UTC (rev 452) @@ -667,7 +667,7 @@ ULONGLONG l = ((ULONGLONG)m_pSndFile->GetSongTime()) * m_pWaveFormat->nSamplesPerSec; if (m_nMaxPatterns > 0) { - DWORD dwOrds = m_pSndFile->GetNumPatterns(); + DWORD dwOrds = m_pSndFile->Order.GetLengthFirstEmpty(); if ((m_nMaxPatterns < dwOrds) && (dwOrds > 0)) l = (l*m_nMaxPatterns) / dwOrds; } if (l < max) max = l; Modified: trunk/OpenMPT/mptrack/Moddoc.cpp =================================================================== --- trunk/OpenMPT/mptrack/Moddoc.cpp 2009-12-28 02:57:57 UTC (rev 451) +++ trunk/OpenMPT/mptrack/Moddoc.cpp 2009-12-30 21:54:16 UTC (rev 452) @@ -22,12 +22,12 @@ static char THIS_FILE[] = __FILE__; #endif -const std::string FileFilterMOD = _T("ProTracker Modules (*.mod)|*.mod||"); -const std::string FileFilterXM = _T("FastTracker Modules (*.xm)|*.xm||"); -const std::string FileFilterS3M = _T("ScreamTracker Modules (*.s3m)|*.s3m||"); -const std::string FileFilterIT = _T("Impulse Tracker Modules (*.it)|*.it||"); -const std::string FileFilterITP = _T("Impulse Tracker Projects (*.itp)|*.itp||"); -const std::string FileFilterMPT = _T("OpenMPT Modules (*.mptm)|*.mptm||"); +const TCHAR FileFilterMOD[] = _T("ProTracker Modules (*.mod)|*.mod||"); +const TCHAR FileFilterXM[] = _T("FastTracker Modules (*.xm)|*.xm||"); +const TCHAR FileFilterS3M[] = _T("ScreamTracker Modules (*.s3m)|*.s3m||"); +const TCHAR FileFilterIT[] = _T("Impulse Tracker Modules (*.it)|*.it||"); +const TCHAR FileFilterITP[] = _T("Impulse Tracker Projects (*.itp)|*.itp||"); +const TCHAR FileFilterMPT[] = _T("OpenMPT Modules (*.mptm)|*.mptm||"); ///////////////////////////////////////////////////////////////////////////// // CModDoc @@ -366,7 +366,7 @@ if (m_SndFile.m_dwLastSavedWithVersion > MptVersion::num) { char s[256]; wsprintf(s, "Warning: this song was last saved with a more recent version of OpenMPT.\r\nSong saved with: v%s. Current version: v%s.\r\n", - MptVersion::ToStr(m_SndFile.m_dwLastSavedWithVersion), + (LPCTSTR)MptVersion::ToStr(m_SndFile.m_dwLastSavedWithVersion), MptVersion::str); ::AfxMessageBox(s); } @@ -3467,3 +3467,50 @@ pMainFrm->ResetElapsedTime(); } + +CString CModDoc::GetPatternViewInstrumentName(UINT nInstr, + bool bEmptyInsteadOfNoName /* = false*/, + bool bIncludeIndex /* = true*/) const +//----------------------------------------------------------------------------------- +{ + if(nInstr >= MAX_INSTRUMENTS || m_SndFile.GetNumInstruments() == 0 || m_SndFile.Instruments[nInstr] == nullptr) + return TEXT(""); + + CString displayName, instrumentName, pluginName; + + // Get instrument name. + instrumentName = m_SndFile.GetInstrumentName(nInstr); + + // If instrument name is empty, use name of the sample mapped to C-5. + if (instrumentName.IsEmpty()) + { + const SAMPLEINDEX nSmp = m_SndFile.Instruments[nInstr]->Keyboard[60]; + if (nSmp < ARRAYELEMCOUNT(m_SndFile.Samples) && m_SndFile.Samples[nSmp].pSample) + instrumentName.Format(TEXT("s: %s"), (LPCTSTR)m_SndFile.GetSampleName(nSmp)); //60 is C-5 + } + + // Get plugin name. + const PLUGINDEX nPlug = m_SndFile.Instruments[nInstr]->nMixPlug; + if (nPlug > 0 && nPlug < MAX_MIXPLUGINS) + pluginName = m_SndFile.m_MixPlugins[nPlug-1].GetName(); + + if (pluginName.IsEmpty()) + { + if(bEmptyInsteadOfNoName && instrumentName.IsEmpty()) + return TEXT(""); + if(instrumentName.IsEmpty()) + instrumentName = TEXT("(no name)"); + if (bIncludeIndex) + displayName.Format(TEXT("%02d: %s"), nInstr, (LPCTSTR)instrumentName); + else + displayName.Format(TEXT("%s"), (LPCTSTR)instrumentName); + } else + { + if (bIncludeIndex) + displayName.Format(TEXT("%02d: %s (%s)"), nInstr, (LPCTSTR)instrumentName, (LPCTSTR)pluginName); + else + displayName.Format(TEXT("%s (%s)"), (LPCTSTR)instrumentName, (LPCTSTR)pluginName); + } + return displayName; +} + Modified: trunk/OpenMPT/mptrack/Moddoc.h =================================================================== --- trunk/OpenMPT/mptrack/Moddoc.h 2009-12-28 02:57:57 UTC (rev 451) +++ trunk/OpenMPT/mptrack/Moddoc.h 2009-12-30 21:54:16 UTC (rev 452) @@ -118,9 +118,15 @@ // Split Keyboard Settings (pattern editor) #define SPLIT_OCTAVE_RANGE 9 + +//========================== struct SplitKeyboardSettings +//========================== { - UINT splitInstrument, splitNote, splitVolume; + bool IsSplitActive() {return (octaveLink && (octaveModifier != 0)) || (splitInstrument > 0) || (splitVolume != 0);} + MODCOMMAND::NOTE splitNote; + MODCOMMAND::INSTR splitInstrument; + MODCOMMAND::VOL splitVolume; int octaveModifier; // determines by how many octaves the notes should be transposed up or down bool octaveLink; // apply octaveModifier }; @@ -291,6 +297,12 @@ void OnFileWaveConvert(ORDERINDEX nMinOrder, ORDERINDEX nMaxOrder); + // Returns formatted MODINSTRUMENT name. + // [in] bEmptyInsteadOfNoName: In case of unnamed instrument string, "(no name)" is returned unless this + // parameter is true is case which an empty name is returned. + // [in] bIncludeIndex: True to include instrument index in front of the instrument name, false otherwise. + CString GetPatternViewInstrumentName(UINT nInstr, bool bEmptyInsteadOfNoName = false, bool bIncludeIndex = true) const; + // protected members protected: CSize m_szOldPatternScrollbarsPos; Modified: trunk/OpenMPT/mptrack/Modedit.cpp =================================================================== --- trunk/OpenMPT/mptrack/Modedit.cpp 2009-12-28 02:57:57 UTC (rev 451) +++ trunk/OpenMPT/mptrack/Modedit.cpp 2009-12-30 21:54:16 UTC (rev 452) @@ -1179,9 +1179,9 @@ MODTYPE origFormat = MOD_TYPE_IT; UINT len = 0, startLen; - bool doOverflowPaste = (CMainFrame::m_dwPatternSetup & PATTERN_OVERFLOWPASTE) && (pasteMode != pm_pasteflood) && (pasteMode != pm_pushforwardpaste); - bool doITStyleMix = (pasteMode == pm_mixpaste_it); - bool doMixPaste = ((pasteMode == pm_mixpaste) || doITStyleMix); + const bool doOverflowPaste = (CMainFrame::m_dwPatternSetup & PATTERN_OVERFLOWPASTE) && (pasteMode != pm_pasteflood) && (pasteMode != pm_pushforwardpaste); + const bool doITStyleMix = (pasteMode == pm_mixpaste_it); + const bool doMixPaste = ((pasteMode == pm_mixpaste) || doITStyleMix); ORDERINDEX oCurrentOrder; //jojo.echopaste ROWINDEX rTemp, startRow; @@ -1234,14 +1234,23 @@ // Paste columns while ((p[len] == '|') && (len + 11 < dwMemSize)) { - // ITSyle mixpaste requires that we keep a copy of the thing we are about to paste on - // so that we can refer back to check if there was anything in e.g. the note column before we pasted. - MODCOMMAND origModCmd = m[col]; - LPSTR s = p+len+1; - if (col < m_SndFile.m_nChannels) + // Check valid paste condition. Paste will be skipped if + // -col is not a valid channelindex or + // -doing mix paste and paste destination modcommand is a PCnote or + // -doing mix paste and trying to paste PCnote on non-empty modcommand. + const bool bSkipPaste = + (col >= m_SndFile.GetNumChannels()) || + (doMixPaste && m[col].IsPcNote()) || + (doMixPaste && s[0] == 'P' && !m[col].IsEmpty()); + + if (bSkipPaste == false) { + // ITSyle mixpaste requires that we keep a copy of the thing we are about to paste on + // so that we can refer back to check if there was anything in e.g. the note column before we pasted. + const MODCOMMAND origModCmd = m[col]; + // push channel data below paste point first. if(pasteMode == pm_pushforwardpaste) { @@ -1294,7 +1303,7 @@ { if (s[5] != '.') { - if(m[col].note == NOTE_PCS || m[col].note == NOTE_PC) + if(m[col].IsPcNote()) { char val[4]; memcpy(val, s+5, 3); @@ -1317,9 +1326,9 @@ } else m[col].volcmd = m[col].vol = 0; } - if(m[col].note == NOTE_PCS || m[col].note == NOTE_PC) + if (m[col].IsPcNote()) { - if(s[8] != '.' && s[8] > ' ') + if (s[8] != '.' && s[8] > ' ') { char val[4]; memcpy(val, s+8, 3); @@ -1382,9 +1391,14 @@ } } } + + // convert some commands, if necessary. With mix paste convert only + // if the original modcommand was empty as otherwise the unchanged parts + // of the old modcommand would falsely be interpreted being of type + // origFormat and ConvertCommand could change them. + if (origFormat != m_SndFile.m_nType && (doMixPaste == false || origModCmd.IsEmpty())) + m_SndFile.ConvertCommand(&(m[col]), origFormat, m_SndFile.m_nType); } - // convert some commands, if necessary. - if(origFormat != m_SndFile.m_nType) m_SndFile.ConvertCommand(&(m[col]), origFormat, m_SndFile.m_nType); len += 12; col++; Modified: trunk/OpenMPT/mptrack/View_pat.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_pat.cpp 2009-12-28 02:57:57 UTC (rev 451) +++ trunk/OpenMPT/mptrack/View_pat.cpp 2009-12-30 21:54:16 UTC (rev 452) @@ -3090,7 +3090,7 @@ // Need to convert to linear in [0;64] - see below BYTE event = GetFromMIDIMsg_Event(dwMidiData); - if ((event == 0x9) && !nVol) event = 0x8; //Convert event to note-off if req'd + if ((event == MIDIEVENT_NOTEON) && !nVol) event = MIDIEVENT_NOTEOFF; //Convert event to note-off if req'd // Handle MIDI mapping. @@ -3116,14 +3116,14 @@ switch(event) { - case 0x8: // Note Off + case MIDIEVENT_NOTEOFF: // Note Off // The following method takes care of: // . Silencing specific active notes (just setting nNote to 255 as was done before is not acceptible) // . Entering a note off in pattern if required TempStopNote(nNote, ((CMainFrame::m_dwMidiSetup & MIDISETUP_RECORDNOTEOFF) != 0)); break; - case 0x9: // Note On + case MIDIEVENT_NOTEON: // Note On nVol = ApplyVolumeRelatedMidiSettings(dwMidiData, midivolume); if(nVol < 0) nVol = -1; else nVol = (nVol + 3) / 4; //Value from [0,256] to [0,64] @@ -3135,10 +3135,10 @@ break; - case 0xB: //Controller change + case MIDIEVENT_CONTROLLERCHANGE: //Controller change switch(nByte1) { - case 0x7: //Volume + case MIDICC_Volume_Coarse: //Volume midivolume = nByte2; break; } @@ -4934,8 +4934,10 @@ HMENU instrumentChangeMenu = ::CreatePopupMenu(); AppendMenu(hMenu, MF_POPUP|greyed, (UINT)instrumentChangeMenu, "Change Instrument\t" + ih->GetKeyTextFromCommand(kcPatternSetInstrument)); - if(pSndFile == NULL) + if(pSndFile == nullptr || pSndFile->GetpModDoc() == nullptr) return false; + + CModDoc* const pModDoc = pSndFile->GetpModDoc(); if(!greyed) { @@ -4946,8 +4948,8 @@ if (pSndFile->Instruments[i] == NULL) continue; - CString instString = pSndFile->GetPatternViewInstrumentName(i, true); - if(instString.GetLength() > 0) AppendMenu(instrumentChangeMenu, MF_STRING, ID_CHANGE_INSTRUMENT+i, pSndFile->GetPatternViewInstrumentName(i)); + CString instString = pModDoc->GetPatternViewInstrumentName(i, true); + if(instString.GetLength() > 0) AppendMenu(instrumentChangeMenu, MF_STRING, ID_CHANGE_INSTRUMENT+i, pModDoc->GetPatternViewInstrumentName(i)); //Adding the entry to the list only if it has some name, since if the name is empty, //it likely is some non-used instrument. } @@ -5213,7 +5215,8 @@ if(pSndFile == nullptr) return; CSplitKeyboadSettings dlg(CMainFrame::GetMainFrame(), pSndFile, pModDoc->GetSplitKeyboardSettings()); - dlg.DoModal(); + if (dlg.DoModal() == IDOK) + pModDoc->UpdateAllViews(NULL, HINT_INSNAMES|HINT_SMPNAMES); } Modified: trunk/OpenMPT/mptrack/dlg_misc.cpp =================================================================== --- trunk/OpenMPT/mptrack/dlg_misc.cpp 2009-12-28 02:57:57 UTC (rev 451) +++ trunk/OpenMPT/mptrack/dlg_misc.cpp 2009-12-30 21:54:16 UTC (rev 452) @@ -1948,7 +1948,7 @@ end=NMACROS; } - for (UINT m=0; m<NMACROS; m++) { + for (int m=0; m<NMACROS; m++) { //SFx s.Format("SF%X", m); m_EditMacro[m].SetWindowText(s); @@ -1956,7 +1956,7 @@ //Macro value: CString macroText = &m_MidiCfg.szMidiSFXExt[m*32]; m_EditMacroValue[m].SetWindowText(macroText); - m_EditMacroValue[m].SetBackColor(m==selectedMacro?RGB(200,200,225) : RGB(245,245,245) ); + m_EditMacroValue[m].SetBackColor(m == selectedMacro ? RGB(200,200,225) : RGB(245,245,245) ); //Macro Type: macroType = m_pModDoc->GetMacroType(macroText); @@ -1977,7 +1977,7 @@ default: s = "Custom"; } m_EditMacroType[m].SetWindowText(s); - m_EditMacroType[m].SetBackColor(m==selectedMacro?RGB(200,200,225) : RGB(245,245,245) ); + m_EditMacroType[m].SetBackColor(m == selectedMacro ? RGB(200,200,225) : RGB(245,245,245) ); //Param details button: if (macroType == sfx_plug) @@ -2698,7 +2698,7 @@ BOOL CSplitKeyboadSettings::OnInitDialog() //---------------------------------------- { - if(!m_pSndFile) return FALSE; + if(!m_pSndFile || m_pSndFile->GetpModDoc() == nullptr) return FALSE; CDialog::OnInitDialog(); @@ -2739,7 +2739,7 @@ continue; } - CString displayName = m_pSndFile->GetPatternViewInstrumentName(nIns); + CString displayName = m_pSndFile->GetpModDoc()->GetPatternViewInstrumentName(nIns); int n = m_CbnSplitInstrument.AddString(displayName); m_CbnSplitInstrument.SetItemData(n, nIns); } @@ -2876,7 +2876,7 @@ } if (bUsed) { CString sampleName; - sampleName.Format("%d: %s", i, m_pSndFile->GetSampleName(i)); + sampleName.Format("%d: %s", i, (LPCTSTR)m_pSndFile->GetSampleName(i)); nInsertPos = m_CbnSample.AddString(sampleName); m_CbnSample.SetItemData(nInsertPos, i); Modified: trunk/OpenMPT/mptrack/fxp.cpp =================================================================== --- trunk/OpenMPT/mptrack/fxp.cpp 2009-12-28 02:57:57 UTC (rev 451) +++ trunk/OpenMPT/mptrack/fxp.cpp 2009-12-30 21:54:16 UTC (rev 452) @@ -232,7 +232,7 @@ { ::AfxMessageBox(e->m_strFileName); char s[256]; - wsprintf(s, "%lx: %d; %d; %s;", e, e->m_cause, e->m_lOsError, e->m_strFileName); + wsprintf(s, "%lx: %d; %d; %s;", e, e->m_cause, e->m_lOsError, (LPCTSTR)e->m_strFileName); ::AfxMessageBox(s); e->Delete(); } Modified: trunk/OpenMPT/mptrack/misc_util.cpp =================================================================== --- trunk/OpenMPT/mptrack/misc_util.cpp 2009-12-28 02:57:57 UTC (rev 451) +++ trunk/OpenMPT/mptrack/misc_util.cpp 2009-12-30 21:54:16 UTC (rev 452) @@ -3,10 +3,10 @@ /* * Loads resource. - * lpName and lpType: parameters passed to FindResource(). - * pData: Pointer to loaded resource data, nullptr if load not successful. - * nSize: Size of the data in bytes, zero if load not succesfull. - * hglob: HGLOBAL returned by LoadResource-function. + * [in] lpName and lpType: parameters passed to FindResource(). + * [out] pData: Pointer to loaded resource data, nullptr if load not successful. + * [out] nSize: Size of the data in bytes, zero if load not succesfull. + * [out] hglob: HGLOBAL returned by LoadResource-function. * Return: pData. */ LPCCH LoadResource(LPCTSTR lpName, LPCTSTR lpType, LPCCH& pData, size_t& nSize, HGLOBAL& hglob) Modified: trunk/OpenMPT/mptrack/misc_util.h =================================================================== --- trunk/OpenMPT/mptrack/misc_util.h 2009-12-28 02:57:57 UTC (rev 451) +++ trunk/OpenMPT/mptrack/misc_util.h 2009-12-30 21:54:16 UTC (rev 452) @@ -5,11 +5,6 @@ #include <string> #include <limits> -#define ARRAYELEMCOUNT(x) (sizeof(x)/sizeof(x[0])) - -//Compile time assert. -#define STATIC_ASSERT(expr) C_ASSERT(expr) - //Convert object(typically number) to string template<class T> inline std::string Stringify(const T& x) Modified: trunk/OpenMPT/mptrack/typedefs.h =================================================================== --- trunk/OpenMPT/mptrack/typedefs.h 2009-12-28 02:57:57 UTC (rev 451) +++ trunk/OpenMPT/mptrack/typedefs.h 2009-12-30 21:54:16 UTC (rev 452) @@ -2,7 +2,13 @@ #define TYPEDEFS_H #define nullptr 0 +#define ARRAYELEMCOUNT(x) (sizeof(x)/sizeof(x[0])) +//Compile time assert. +#define STATIC_ASSERT(expr) C_ASSERT(expr) +#define static_assert(expr, msg) C_ASSERT(expr) + + typedef __int8 int8; typedef __int16 int16; typedef __int32 int32; Modified: trunk/OpenMPT/soundlib/Sndfile.cpp =================================================================== --- trunk/OpenMPT/soundlib/Sndfile.cpp 2009-12-28 02:57:57 UTC (rev 451) +++ trunk/OpenMPT/soundlib/Sndfile.cpp 2009-12-30 21:54:16 UTC (rev 452) @@ -786,7 +786,9 @@ if (m_nType) { SetModSpecsPointer(m_pModSpecs, m_nType); - Order.resize(GetModSpecifications().ordersMax); + const ORDERINDEX nMinLength = (std::min)(ModSequenceSet::s_nCacheSize, GetModSpecifications().ordersMax); + if (Order.GetLength() < nMinLength) + Order.resize(nMinLength); return TRUE; } @@ -1056,14 +1058,6 @@ } -ORDERINDEX CSoundFile::GetNumPatterns() const -//------------------------------------- -{ - ORDERINDEX i = 0; - while ((i < Order.size()) && (Order[i] < Order.GetInvalidPatIndex())) i++; - return i; -} - /* UINT CSoundFile::GetNumInstruments() const //---------------------------------------- @@ -1422,12 +1416,18 @@ CString CSoundFile::GetInstrumentName(UINT nInstr) const -//----------------------------------------------------------- +//------------------------------------------------------ { - if ((nInstr >= MAX_INSTRUMENTS) || (!Instruments[nInstr])) { - return ""; - } - return Instruments[nInstr]->name; + if ((nInstr >= MAX_INSTRUMENTS) || (!Instruments[nInstr])) + return TEXT(""); + + const size_t nSize = ARRAYELEMCOUNT(Instruments[nInstr]->name); + CString str; + LPTSTR p = str.GetBuffer(nSize + 1); + ArrayCopy(p, Instruments[nInstr]->name, nSize); + p[nSize] = 0; + str.ReleaseBuffer(); + return str; } @@ -1669,42 +1669,6 @@ } -CString CSoundFile::GetPatternViewInstrumentName(UINT nInstr, bool returnEmptyInsteadOfNoName) const -//----------------------------------------------------------------- -{ - //Default: returnEmptyInsteadOfNoName = false; - if(nInstr >= MAX_INSTRUMENTS || m_nInstruments == 0 || Instruments[nInstr] == 0) return ""; - - CString displayName, instrumentName, pluginName = ""; - - // Use instrument name - instrumentName.Format("%s", Instruments[nInstr]->name); - - if (instrumentName == "") { - // if there's no instrument name, use name of sample associated with C-5. - //TODO: If there's no sample mapped to that note, we could check the other notes. - if (Instruments[nInstr]->Keyboard[60] && Samples[Instruments[nInstr]->Keyboard[60]].pSample) { - instrumentName.Format("s: %s", m_szNames[Instruments[nInstr]->Keyboard[60]]); //60 is C-5 - } - } - - //Get plugin name: - UINT nPlug=Instruments[nInstr]->nMixPlug; - if (nPlug>0 && nPlug<MAX_MIXPLUGINS) { - pluginName = m_MixPlugins[nPlug-1].Info.szName; - } - - if (pluginName == "") { - if(returnEmptyInsteadOfNoName && instrumentName == "") return ""; - if(instrumentName == "") instrumentName = "(no name)"; - displayName.Format("%02d: %s", nInstr, instrumentName); - } else { - displayName.Format("%02d: %s (%s)", nInstr, instrumentName, pluginName); - } - return displayName; -} - - #ifndef NO_PACKING UINT CSoundFile::PackSample(int &sample, int next) //------------------------------------------------ Modified: trunk/OpenMPT/soundlib/Sndfile.h =================================================================== --- trunk/OpenMPT/soundlib/Sndfile.h 2009-12-28 02:57:57 UTC (rev 451) +++ trunk/OpenMPT/soundlib/Sndfile.h 2009-12-30 21:54:16 UTC (rev 452) @@ -653,7 +653,6 @@ LPCSTR GetTitle() const { return m_szNames[0]; } CString GetSampleName(UINT nSample) const; CString GetInstrumentName(UINT nInstr) const; - CString GetPatternViewInstrumentName(UINT nInstr, bool returnEmptyInsteadOfNoName = false) const; UINT GetMusicSpeed() const { return m_nMusicSpeed; } UINT GetMusicTempo() const { return m_nMusicTempo; } @@ -746,7 +745,7 @@ void S3MSaveConvert(UINT *pcmd, UINT *pprm, BOOL bIT, BOOL bCompatibilityExport = false) const; WORD ModSaveCommand(const MODCOMMAND *m, const bool bXM, const bool bCompatibilityExport = false) const; - static void ConvertCommand(MODCOMMAND *m, MODTYPE nOldType, MODTYPE nNewType); // Convert a complete MODCHANNEL item from one format to another + static void ConvertCommand(MODCOMMAND *m, MODTYPE nOldType, MODTYPE nNewType); // Convert a complete MODCOMMAND item from one format to another static void MODExx2S3MSxx(MODCOMMAND *m); // Convert Exx to Sxx static void S3MSxx2MODExx(MODCOMMAND *m); // Convert Sxx to Exx Modified: trunk/OpenMPT/soundlib/modcommand.h =================================================================== --- trunk/OpenMPT/soundlib/modcommand.h 2009-12-28 02:57:57 UTC (rev 451) +++ trunk/OpenMPT/soundlib/modcommand.h 2009-12-30 21:54:16 UTC (rev 452) @@ -54,8 +54,11 @@ bool IsEmpty() const {return (*this == Empty());} // Returns true if instrument column represents plugin index. - bool IsInstrPlug() const {return note == NOTE_PC || note == NOTE_PCS;} + bool IsInstrPlug() const {return IsPcNote();} + // Returns true if and only if note is NOTE_PC or NOTE_PCS. + bool IsPcNote() const {return note == NOTE_PC || note == NOTE_PCS;} + public: BYTE note; BYTE instr; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2010-01-03 21:17:55
|
Revision: 454 http://modplug.svn.sourceforge.net/modplug/?rev=454&view=rev Author: saga-games Date: 2010-01-03 21:17:41 +0000 (Sun, 03 Jan 2010) Log Message: ----------- [Imp] Pattern Cleanup does now also work with multiple sequences [Ref] Minor changes to code (modedit/load_xm) Modified Paths: -------------- trunk/OpenMPT/mptrack/CleanupSong.cpp trunk/OpenMPT/mptrack/Modedit.cpp trunk/OpenMPT/soundlib/Load_xm.cpp Modified: trunk/OpenMPT/mptrack/CleanupSong.cpp =================================================================== --- trunk/OpenMPT/mptrack/CleanupSong.cpp 2010-01-02 01:23:14 UTC (rev 453) +++ trunk/OpenMPT/mptrack/CleanupSong.cpp 2010-01-03 21:17:41 UTC (rev 454) @@ -133,7 +133,7 @@ void CModCleanupDlg::OnCancel() -//------------------------- +//----------------------------- { CDialog::OnCancel(); } @@ -166,7 +166,7 @@ } void CModCleanupDlg::OnPresetCompoCleanup() -//---------------------------------------- +//----------------------------------------- { // patterns CheckDlgButton(IDC_CHK_CLEANUP_PATTERNS, MF_UNCHECKED); @@ -191,6 +191,7 @@ } BOOL CModCleanupDlg::OnToolTipNotify(UINT id, NMHDR* pNMHDR, LRESULT* pResult) +//---------------------------------------------------------------------------- { UNREFERENCED_PARAMETER(id); UNREFERENCED_PARAMETER(pResult); @@ -255,7 +256,7 @@ break; // misc case IDC_CHK_SAMPLEPACK: - strTipText = "Convert the module to .IT and reset song, sample and instrument variables"; + strTipText = "Convert the module to .IT and reset song / sample / instrument variables"; break; } @@ -279,61 +280,40 @@ // Actual cleanup implementations // Remove unused patterns / rearrange patterns +// If argument bRemove is true, unused patterns are removed. Else, patterns are only rearranged. bool CModCleanupDlg::RemoveUnusedPatterns(bool bRemove) //----------------------------------------------------- { CSoundFile *pSndFile = m_pModDoc->GetSoundFile(); if(pSndFile == nullptr) return false; - if(pSndFile->GetType() == MOD_TYPE_MPT && pSndFile->Order.GetNumSequences() > 1) - { // Multiple sequences are not taken into account in the code below. For now just make - // removing unused patterns disabled in this case. - AfxMessageBox(IDS_PATTERN_CLEANUP_UNAVAILABLE, MB_ICONINFORMATION); - return false; - } + const SEQUENCEINDEX maxSeqIndex = pSndFile->Order.GetNumSequences(); const PATTERNINDEX maxPatIndex = pSndFile->Patterns.Size(); - const ORDERINDEX maxOrdIndex = pSndFile->Order.size(); vector<PATTERNINDEX> nPatMap(maxPatIndex, 0); vector<ROWINDEX> nPatRows(maxPatIndex, 0); vector<MODCOMMAND*> pPatterns(maxPatIndex, nullptr); vector<bool> bPatUsed(maxPatIndex, false); - bool bSubtunesDetected = false; - // detect subtunes (separated by "---") - for(SEQUENCEINDEX nSeq = 0; nSeq < pSndFile->Order.GetNumSequences(); nSeq++) - { - if(pSndFile->Order.GetSequence(nSeq).GetLengthFirstEmpty() != pSndFile->Order.GetSequence(nSeq).GetLengthTailTrimmed()) - bSubtunesDetected = true; - } - - // Flag to tell whether keeping sequence items which are after the first empty('---') order. - bool bKeepSubSequences = false; - - if(bSubtunesDetected) - { // There are used sequence items after first '---'; ask user whether to remove those. - if (m_wParent->MessageBox( - _TEXT("Do you want to remove sequence items which are after the first '---' item?"), - _TEXT("Sequence Cleanup"), MB_YESNO) != IDYES - ) - bKeepSubSequences = true; - } - CHAR s[512]; - bool bEnd = false, bReordered = false; + bool bReordered = false; UINT nPatRemoved = 0, nMinToRemove; PATTERNINDEX nPats; BeginWaitCursor(); PATTERNINDEX maxpat = 0; - for (ORDERINDEX nOrd = 0; nOrd < maxOrdIndex; nOrd++) + for(SEQUENCEINDEX nSeq = 0; nSeq < maxSeqIndex; nSeq++) { - PATTERNINDEX n = pSndFile->Order[nOrd]; - if (n < maxPatIndex) + for (ORDERINDEX nOrd = 0; nOrd < pSndFile->Order.GetSequence(nSeq).GetLength(); nOrd++) { - if (n >= maxpat) maxpat = n + 1; - if (!bEnd || bKeepSubSequences) bPatUsed[n] = true; - } else if (n == pSndFile->Order.GetInvalidPatIndex()) bEnd = true; + PATTERNINDEX n = pSndFile->Order.GetSequence(nSeq)[nOrd]; + if (n < maxPatIndex) + { + if (n >= maxpat) maxpat = n + 1; + bPatUsed[n] = true; + } + } } + nMinToRemove = 0; if (!bRemove) { @@ -371,33 +351,43 @@ BeginWaitCursor(); } - for (UINT i = 0; i < maxPatIndex; i++) nPatMap[i] = PATTERNINDEX_INVALID; - nPats = 0; - ORDERINDEX imap = 0; - for (imap = 0; imap < maxOrdIndex; imap++) + for(PATTERNINDEX i = 0; i < maxPatIndex; i++) nPatMap[i] = PATTERNINDEX_INVALID; + + SEQUENCEINDEX oldSequence = pSndFile->Order.GetCurrentSequenceIndex(); // workaround, as GetSequence doesn't allow writing to sequences ATM + + for(SEQUENCEINDEX nSeq = 0; nSeq < maxSeqIndex; nSeq++) { - PATTERNINDEX n = pSndFile->Order[imap]; - if (n < maxPatIndex) + pSndFile->Order.SetSequence(nSeq); + nPats = 0; + ORDERINDEX imap = 0; + for (imap = 0; imap < pSndFile->Order.GetSequence(nSeq).GetLength(); imap++) { - if (nPatMap[n] > maxPatIndex) nPatMap[n] = nPats++; - pSndFile->Order[imap] = nPatMap[n]; - } else if (n == pSndFile->Order.GetInvalidPatIndex() && (bKeepSubSequences == false)) break; - } - // Add unused patterns at the end - if ((!bRemove) || (!bWaste)) - { - for (UINT iadd=0; iadd<maxPatIndex; iadd++) + PATTERNINDEX n = pSndFile->Order.GetSequence(nSeq)[imap]; + if (n < maxPatIndex) + { + if (nPatMap[n] == PATTERNINDEX_INVALID) nPatMap[n] = nPats++; + pSndFile->Order[imap] = nPatMap[n]; + } + } + // Add unused patterns at the end + if ((!bRemove) || (!bWaste)) { - if ((pSndFile->Patterns[iadd]) && (nPatMap[iadd] >= maxPatIndex)) + for(PATTERNINDEX iadd = 0; iadd < maxPatIndex; iadd++) { - nPatMap[iadd] = nPats++; + if((pSndFile->Patterns[iadd]) && (nPatMap[iadd] >= maxPatIndex)) + { + nPatMap[iadd] = nPats++; + } } } + while (imap < pSndFile->Order.GetSequence(nSeq).GetLength()) + { + pSndFile->Order[imap++] = pSndFile->Order.GetInvalidPatIndex(); + } } - while (imap < maxOrdIndex) - { - pSndFile->Order[imap++] = pSndFile->Order.GetInvalidPatIndex(); - } + + pSndFile->Order.SetSequence(oldSequence); + // Reorder patterns & Delete unused patterns BEGIN_CRITICAL(); { @@ -432,9 +422,9 @@ nPatRemoved++; } } - for (PATTERNINDEX j = 0; j < maxPatIndex;j++) + for (PATTERNINDEX nPat = 0; nPat < maxPatIndex; nPat++) { - pSndFile->Patterns[j].SetData(pPatterns[j], nPatRows[j]); + pSndFile->Patterns[nPat].SetData(pPatterns[nPat], nPatRows[nPat]); } } END_CRITICAL(); @@ -455,7 +445,7 @@ // Remove unused samples bool CModCleanupDlg::RemoveUnusedSamples() -//--------------------------------- +//---------------------------------------- { CSoundFile *pSndFile = m_pModDoc->GetSoundFile(); if(pSndFile == nullptr) return false; @@ -778,7 +768,7 @@ // Remove ununsed plugins bool CModCleanupDlg::RemoveUnusedPlugins() -//-------------------------------------- +//---------------------------------------- { CSoundFile *pSndFile = m_pModDoc->GetSoundFile(); if(pSndFile == nullptr) return false; @@ -846,7 +836,7 @@ m_pModDoc->ChangeModType(MOD_TYPE_IT); pSndFile->m_nMixLevels = mixLevels_original; pSndFile->m_nTempoMode = tempo_mode_classic; - pSndFile->m_dwSongFlags = SONG_LINEARSLIDES | SONG_EXFILTERRANGE; + pSndFile->m_dwSongFlags = SONG_LINEARSLIDES; // Global vars pSndFile->m_nDefaultTempo = 125; @@ -919,7 +909,7 @@ // Remove all samples bool CModCleanupDlg::RemoveAllSamples() -//------------------------------------ +//------------------------------------- { CSoundFile *pSndFile = m_pModDoc->GetSoundFile(); if(pSndFile == nullptr) return false; @@ -985,7 +975,7 @@ // Remove all plugins bool CModCleanupDlg::MergeSequences() -//------------------------------------- +//----------------------------------- { return m_pModDoc->MergeSequences(); } Modified: trunk/OpenMPT/mptrack/Modedit.cpp =================================================================== --- trunk/OpenMPT/mptrack/Modedit.cpp 2010-01-02 01:23:14 UTC (rev 453) +++ trunk/OpenMPT/mptrack/Modedit.cpp 2010-01-03 21:17:41 UTC (rev 454) @@ -433,7 +433,7 @@ // Change the number of channels BOOL CModDoc::ChangeNumChannels(UINT nNewChannels, const bool showCancelInRemoveDlg) -//------------------------------------------------ +//---------------------------------------------------------------------------------- { const CHANNELINDEX maxChans = m_SndFile.GetModSpecifications().channelsMax; @@ -507,7 +507,7 @@ BOOL CModDoc::RemoveChannels(BOOL m_bChnMask[MAX_CHANNELS]) -//-------------------------------------------------------- +//--------------------------------------------------------- //To remove all channels whose index corresponds to true value at m_bChnMask[] array. Code is almost non-modified copy of //the code which was in CModDoc::ChangeNumChannels(UINT nNewChannels) - the only differences are the lines before //BeginWaitCursor(), few lines in the end and that nNewChannels is renamed to nRemaningChannels. @@ -740,7 +740,7 @@ INSTRUMENTINDEX CModDoc::InsertInstrument(LONG lSample, LONG lDuplicate) -//----------------------------------------------------------- +//---------------------------------------------------------------------- { MODINSTRUMENT *pDup = NULL; INSTRUMENTINDEX nInstrumentMax = m_SndFile.GetModSpecifications().instrumentsMax - 1; @@ -845,7 +845,7 @@ void CModDoc::InitializeInstrument(MODINSTRUMENT *pIns, UINT nsample) -//---------------------------------------------------------------------- +//------------------------------------------------------------------- { memset(pIns, 0, sizeof(MODINSTRUMENT)); pIns->nFadeOut = 256; @@ -976,7 +976,7 @@ BOOL CModDoc::ExpandPattern(PATTERNINDEX nPattern) -//---------------------------------------- +//------------------------------------------------ { // -> CODE#0008 // -> DESC="#define to set pattern size" @@ -990,7 +990,7 @@ BOOL CModDoc::ShrinkPattern(PATTERNINDEX nPattern) -//---------------------------------------- +//------------------------------------------------ { if ((nPattern >= m_SndFile.Patterns.Size()) || (!m_SndFile.Patterns[nPattern])) return FALSE; if(m_SndFile.Patterns[nPattern].Shrink()) @@ -1605,7 +1605,7 @@ void CModDoc::CheckUnusedChannels(BOOL mask[MAX_CHANNELS], CHANNELINDEX maxRemoveCount) -//-------------------------------------------------------- +//------------------------------------------------------------------------------------- { // Checking for unused channels for (int iRst=m_SndFile.m_nChannels-1; iRst>=0; iRst--) //rewbs.removeChanWindowCleanup @@ -1632,7 +1632,7 @@ } } -// Merge multiple sequences +// Merge multiple sequences into one sequence bool CModDoc::MergeSequences() //---------------------------- { Modified: trunk/OpenMPT/soundlib/Load_xm.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_xm.cpp 2010-01-02 01:23:14 UTC (rev 453) +++ trunk/OpenMPT/soundlib/Load_xm.cpp 2010-01-03 21:17:41 UTC (rev 454) @@ -733,7 +733,7 @@ BYTE xmph[9]; FILE *f; int i; - BOOL bAddChannel = false; // avoid odd channel count for FT2 compatibility + bool bAddChannel = false; // avoid odd channel count for FT2 compatibility if(bCompatibilityExport) nPacking = false; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2010-01-04 20:01:38
|
Revision: 455 http://modplug.svn.sourceforge.net/modplug/?rev=455&view=rev Author: saga-games Date: 2010-01-04 20:01:28 +0000 (Mon, 04 Jan 2010) Log Message: ----------- [Imp] Envelope Editor: Mark currently envelope node yellow for better visibility [Fix] Envelope Editor: Not all keyboard actions marked the document as modified. [Imp] Pattern Editor: Added sequence selection edit control [Imp] Treeview: Don't show "switch to sequence" context menu item for current sequence [Mod] Updated keymaps DE_Jojo.mkb and FR_mpt_laptop_(legovitch).mkb Modified Paths: -------------- trunk/OpenMPT/mptrack/Ctrl_pat.cpp trunk/OpenMPT/mptrack/Ctrl_pat.h trunk/OpenMPT/mptrack/MainFrm.cpp trunk/OpenMPT/mptrack/Mainfrm.h trunk/OpenMPT/mptrack/View_ins.cpp trunk/OpenMPT/mptrack/View_tre.cpp trunk/OpenMPT/mptrack/Vstplug.cpp trunk/OpenMPT/mptrack/mptrack.rc trunk/OpenMPT/mptrack/resource.h trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb trunk/OpenMPT/packageTemplate/extraKeymaps/FR_mpt_laptop_(legovitch).mkb Modified: trunk/OpenMPT/mptrack/Ctrl_pat.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_pat.cpp 2010-01-03 21:17:41 UTC (rev 454) +++ trunk/OpenMPT/mptrack/Ctrl_pat.cpp 2010-01-04 20:01:28 UTC (rev 455) @@ -57,6 +57,7 @@ ON_EN_CHANGE(IDC_EDIT_SPACING, OnSpacingChanged) ON_EN_CHANGE(IDC_EDIT_PATTERNNAME, OnPatternNameChanged) ON_EN_CHANGE(IDC_EDIT_SEQUENCE_NAME, OnSequenceNameChanged) + ON_EN_CHANGE(IDC_EDIT_SEQNUM, OnSequenceNumChanged) ON_EN_KILLFOCUS(IDC_EDIT_ORDERLIST_MARGINS, OnOrderListMarginsChanged) ON_UPDATE_COMMAND_UI(IDC_PATTERN_RECORD,OnUpdateRecord) ON_NOTIFY_EX_RANGE(TTN_NEEDTEXTA, 0, 0xFFFF, OnToolTipText) @@ -75,9 +76,11 @@ DDX_Control(pDX, IDC_EDIT_SPACING, m_EditSpacing); DDX_Control(pDX, IDC_EDIT_ORDERLIST_MARGINS,m_EditOrderListMargins); DDX_Control(pDX, IDC_EDIT_PATTERNNAME, m_EditPatName); + DDX_Control(pDX, IDC_EDIT_SEQNUM, m_EditSequence); DDX_Control(pDX, IDC_SPIN_SPACING, m_SpinSpacing); DDX_Control(pDX, IDC_SPIN_ORDERLIST_MARGINS,m_SpinOrderListMargins); DDX_Control(pDX, IDC_SPIN_INSTRUMENT, m_SpinInstrument); + DDX_Control(pDX, IDC_SPIN_SEQNUM, m_SpinSequence); DDX_Control(pDX, IDC_TOOLBAR1, m_ToolBar); //}}AFX_DATA_MAP } @@ -143,6 +146,7 @@ m_ToolBar.AddButton(ID_OVERFLOWPASTE, TIMAGE_PATTERN_OVERFLOWPASTE, TBSTYLE_CHECK, ((CMainFrame::m_dwPatternSetup & PATTERN_OVERFLOWPASTE) ? TBSTATE_CHECKED : 0) | TBSTATE_ENABLED); // Special edit controls -> tab switch to view + m_EditSequence.SetParent(this); m_EditSpacing.SetParent(this); m_EditPatName.SetParent(this); m_EditPatName.SetLimitText(MAX_PATTERNNAME); @@ -171,7 +175,11 @@ SetDlgItemInt(IDC_EDIT_SPACING, CMainFrame::gnPatternSpacing); SetDlgItemInt(IDC_EDIT_ORDERLIST_MARGINS, m_OrderList.GetMargins()); CheckDlgButton(IDC_PATTERN_FOLLOWSONG, !(CMainFrame::m_dwPatternSetup & PATTERN_FOLLOWSONGOFF)); //rewbs.noFollow - set to unchecked + + m_SpinSequence.SetRange(0, m_pSndFile->Order.GetNumSequences() - 1); + m_SpinSequence.SetPos(m_pSndFile->Order.GetCurrentSequenceIndex()); SetDlgItemText(IDC_EDIT_SEQUENCE_NAME, m_pSndFile->Order.m_sName); + m_OrderList.SetFocus(); UpdateView(HINT_MODTYPE|HINT_PATNAMES, NULL); @@ -221,7 +229,14 @@ if (!m_pSndFile) return; if (dwHintMask & HINT_MODSEQUENCE) + { SetDlgItemText(IDC_EDIT_SEQUENCE_NAME, m_pSndFile->Order.m_sName); + } + if (dwHintMask & (HINT_MODSEQUENCE|HINT_MODTYPE)) + { + m_SpinSequence.SetRange(0, m_pSndFile->Order.GetNumSequences() - 1); + m_SpinSequence.SetPos(m_pSndFile->Order.GetCurrentSequenceIndex()); + } //rewbs.instroVST if (dwHintMask & (HINT_MIXPLUGINS|HINT_MODTYPE)) @@ -234,6 +249,8 @@ // Enable/disable multisequence controls according the current modtype. GetDlgItem(IDC_STATIC_SEQUENCE_NAME)->EnableWindow( (m_pSndFile->GetType() == MOD_TYPE_MPT) ? SW_SHOW : SW_HIDE); GetDlgItem(IDC_EDIT_SEQUENCE_NAME)->EnableWindow( (m_pSndFile->GetType() == MOD_TYPE_MPT) ? SW_SHOW : SW_HIDE); + GetDlgItem(IDC_EDIT_SEQNUM)->EnableWindow( (m_pSndFile->GetType() == MOD_TYPE_MPT) ? SW_SHOW : SW_HIDE); + GetDlgItem(IDC_SPIN_SEQNUM)->EnableWindow( (m_pSndFile->GetType() == MOD_TYPE_MPT) ? SW_SHOW : SW_HIDE); // Enable/disable pattern names GetDlgItem(IDC_STATIC_PATTERNNAME)->EnableWindow( (m_pSndFile->GetType() & (MOD_TYPE_MPT|MOD_TYPE_IT|MOD_TYPE_XM)) ? SW_SHOW : SW_HIDE); @@ -1221,3 +1238,18 @@ return FALSE; } +void CCtrlPatterns::OnSequenceNumChanged() +//---------------------------------------- +{ + if ((m_EditSequence.m_hWnd) && (m_EditSequence.GetWindowTextLength() > 0)) + { + SEQUENCEINDEX newSeq = (SEQUENCEINDEX)GetDlgItemInt(IDC_EDIT_SEQNUM); + + if (newSeq >= MAX_SEQUENCES) + { + newSeq = MAX_SEQUENCES - 1; + SetDlgItemInt(IDC_EDIT_SEQNUM, MAX_SEQUENCES - 1, FALSE); + } + m_OrderList.SelectSequence(newSeq); + } +} Modified: trunk/OpenMPT/mptrack/Ctrl_pat.h =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_pat.h 2010-01-03 21:17:41 UTC (rev 454) +++ trunk/OpenMPT/mptrack/Ctrl_pat.h 2010-01-04 20:01:28 UTC (rev 455) @@ -161,8 +161,8 @@ COrderList m_OrderList; CButton m_BtnPrev, m_BtnNext; CComboBox m_CbnInstrument; - CPatEdit m_EditSpacing, m_EditPatName, m_EditOrderListMargins; - CSpinButtonCtrl m_SpinInstrument, m_SpinSpacing, m_SpinOrderListMargins; + CPatEdit m_EditSpacing, m_EditPatName, m_EditOrderListMargins, m_EditSequence; + CSpinButtonCtrl m_SpinInstrument, m_SpinSpacing, m_SpinOrderListMargins, m_SpinSequence; CModControlBar m_ToolBar; INSTRUMENTINDEX m_nInstrument; UINT m_nDetailLevel; @@ -233,6 +233,7 @@ afx_msg void OnUpdateRecord(CCmdUI *pCmdUI); afx_msg void TogglePluginEditor(); //rewbs.instroVST afx_msg void OnToggleOverflowPaste(); + afx_msg void OnSequenceNumChanged(); afx_msg LRESULT OnCustomKeyMsg(WPARAM, LPARAM); //}}AFX_MSG Modified: trunk/OpenMPT/mptrack/MainFrm.cpp =================================================================== --- trunk/OpenMPT/mptrack/MainFrm.cpp 2010-01-03 21:17:41 UTC (rev 454) +++ trunk/OpenMPT/mptrack/MainFrm.cpp 2010-01-04 20:01:28 UTC (rev 455) @@ -237,6 +237,7 @@ HBRUSH CMainFrame::brushHighLight = NULL; HBRUSH CMainFrame::brushHighLightRed = NULL; HBRUSH CMainFrame::brushWindow = NULL; +HBRUSH CMainFrame::brushYellow = NULL; HCURSOR CMainFrame::curDragging = NULL; HCURSOR CMainFrame::curArrow = NULL; HCURSOR CMainFrame::curNoDrop = NULL; @@ -1755,6 +1756,8 @@ brushHighLight = CreateSolidBrush(GetSysColor(COLOR_HIGHLIGHT)); if (brushHighLightRed) DeleteObject(brushHighLightRed); brushHighLightRed = CreateSolidBrush(RGB(0xFF,0x00,0x00)); + if (brushYellow) DeleteObject(brushYellow); + brushYellow = CreateSolidBrush(RGB(0xFF,0xFF,0x00)); if (brushWindow) DeleteObject(brushWindow); brushWindow = CreateSolidBrush(crBkgnd); Modified: trunk/OpenMPT/mptrack/Mainfrm.h =================================================================== --- trunk/OpenMPT/mptrack/Mainfrm.h 2010-01-03 21:17:41 UTC (rev 454) +++ trunk/OpenMPT/mptrack/Mainfrm.h 2010-01-04 20:01:28 UTC (rev 455) @@ -432,7 +432,7 @@ // GDI static HICON m_hIcon; static HFONT m_hGUIFont, m_hFixedFont, m_hLargeFixedFont; - static HBRUSH brushGray, brushBlack, brushWhite, brushHighLight, brushHighLightRed, brushWindow; + static HBRUSH brushGray, brushBlack, brushWhite, brushHighLight, brushHighLightRed, brushWindow, brushYellow; // static CBrush *pbrushBlack, *pbrushWhite; static HPEN penBlack, penDarkGray, penLightGray, penWhite, penHalfDarkGray, penSample, penEnvelope, penEnvelopeHighlight, penSeparator, penScratch, penGray00, penGray33, penGray40, penGray55, penGray80, penGray99, penGraycc, penGrayff; static HCURSOR curDragging, curNoDrop, curArrow, curNoDrop2, curVSplit; Modified: trunk/OpenMPT/mptrack/View_ins.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_ins.cpp 2010-01-03 21:17:41 UTC (rev 454) +++ trunk/OpenMPT/mptrack/View_ins.cpp 2010-01-04 20:01:28 UTC (rev 455) @@ -936,7 +936,7 @@ } else if (i == m_nDragItem - 1) { // currently selected env point - m_dcMemMain.FrameRect(&rect, CBrush::FromHandle(CMainFrame::brushGray)); + m_dcMemMain.FrameRect(&rect, CBrush::FromHandle(CMainFrame::brushYellow)); } else { m_dcMemMain.FrameRect(&rect, CBrush::FromHandle(CMainFrame::brushWhite)); @@ -1597,6 +1597,11 @@ { SetCapture(); m_dwStatus |= INSSTATUS_DRAGGING; + // refrsh active node colour + if(GetDocument()) + { + GetDocument()->UpdateAllViews(NULL, (m_nInstrument << HINT_SHIFT_INS) | HINT_ENVELOPE, NULL); + } } else { @@ -2253,7 +2258,7 @@ m_nDragItem = pEnv->nNodes; else m_nDragItem--; - RedrawWindow(); + GetDocument()->UpdateAllViews(NULL, (m_nInstrument << HINT_SHIFT_INS) | HINT_ENVELOPE, NULL); } @@ -2266,7 +2271,7 @@ m_nDragItem = 1; else m_nDragItem++; - RedrawWindow(); + GetDocument()->UpdateAllViews(NULL, (m_nInstrument << HINT_SHIFT_INS) | HINT_ENVELOPE, NULL); // sanity checks are done in GetEnvelopePtr() already } @@ -2278,7 +2283,10 @@ if(m_nDragItem == 1 || pEnv->Ticks[m_nDragItem - 1] == pEnv->Ticks[m_nDragItem - 2]) return; pEnv->Ticks[m_nDragItem - 1]--; - RedrawWindow(); + + CModDoc *pModDoc = GetDocument(); // sanity checks are done in GetEnvelopePtr() already + pModDoc->SetModified(); + GetDocument()->UpdateAllViews(NULL, (m_nInstrument << HINT_SHIFT_INS) | HINT_ENVELOPE, NULL); // sanity checks are done in GetEnvelopePtr() already } @@ -2290,7 +2298,10 @@ if(m_nDragItem == 1 || (m_nDragItem < pEnv->nNodes && pEnv->Ticks[m_nDragItem - 1] == pEnv->Ticks[m_nDragItem])) return; pEnv->Ticks[m_nDragItem - 1]++; - RedrawWindow(); + + CModDoc *pModDoc = GetDocument(); // sanity checks are done in GetEnvelopePtr() already + pModDoc->SetModified(); + pModDoc->UpdateAllViews(NULL, (m_nInstrument << HINT_SHIFT_INS) | HINT_ENVELOPE, NULL); } @@ -2303,7 +2314,10 @@ pEnv->Values[m_nDragItem - 1] += stepsize; else pEnv->Values[m_nDragItem - 1] = 64; - RedrawWindow(); + + CModDoc *pModDoc = GetDocument(); // sanity checks are done in GetEnvelopePtr() already + pModDoc->SetModified(); + pModDoc->UpdateAllViews(NULL, (m_nInstrument << HINT_SHIFT_INS) | HINT_ENVELOPE, NULL); } @@ -2316,7 +2330,10 @@ pEnv->Values[m_nDragItem - 1] -= stepsize; else pEnv->Values[m_nDragItem - 1] = 0; - RedrawWindow(); + + CModDoc *pModDoc = GetDocument(); // sanity checks are done in GetEnvelopePtr() already + pModDoc->SetModified(); + pModDoc->UpdateAllViews(NULL, (m_nInstrument << HINT_SHIFT_INS) | HINT_ENVELOPE, NULL); } void CViewInstrument::EnvKbdInsertPoint() @@ -2336,7 +2353,6 @@ UINT newPoint = EnvInsertPoint(newTick, newVal); if(newPoint > 0) m_nDragItem = newPoint; - RedrawWindow(); } @@ -2358,7 +2374,7 @@ if(!EnvGetLoop()) EnvSetLoopStart(0); EnvSetLoopStart(m_nDragItem - 1); - RedrawWindow(); + GetDocument()->UpdateAllViews(NULL, (m_nInstrument << HINT_SHIFT_INS) | HINT_ENVELOPE, NULL); // sanity checks are done in GetEnvelopePtr() already } @@ -2373,7 +2389,7 @@ EnvSetLoopStart(0); } EnvSetLoopEnd(m_nDragItem - 1); - RedrawWindow(); + GetDocument()->UpdateAllViews(NULL, (m_nInstrument << HINT_SHIFT_INS) | HINT_ENVELOPE, NULL); // sanity checks are done in GetEnvelopePtr() already } @@ -2385,8 +2401,7 @@ if(!EnvGetSustain()) EnvSetSustain(true); EnvSetSustainStart(m_nDragItem - 1); - RedrawWindow(); - + GetDocument()->UpdateAllViews(NULL, (m_nInstrument << HINT_SHIFT_INS) | HINT_ENVELOPE, NULL); // sanity checks are done in GetEnvelopePtr() already } @@ -2401,8 +2416,7 @@ EnvSetSustainStart(0); } EnvSetSustainEnd(m_nDragItem - 1); - RedrawWindow(); - + GetDocument()->UpdateAllViews(NULL, (m_nInstrument << HINT_SHIFT_INS) | HINT_ENVELOPE, NULL); // sanity checks are done in GetEnvelopePtr() already } @@ -2412,7 +2426,7 @@ INSTRUMENTENVELOPE *pEnv = GetEnvelopePtr(); if(pEnv == nullptr || m_nDragItem == 0 || m_nDragItem > pEnv->nNodes) return; EnvToggleReleaseNode(m_nDragItem - 1); - RedrawWindow(); + GetDocument()->UpdateAllViews(NULL, (m_nInstrument << HINT_SHIFT_INS) | HINT_ENVELOPE, NULL); // sanity checks are done in GetEnvelopePtr() already } Modified: trunk/OpenMPT/mptrack/View_tre.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_tre.cpp 2010-01-03 21:17:41 UTC (rev 454) +++ trunk/OpenMPT/mptrack/View_tre.cpp 2010-01-04 20:01:28 UTC (rev 455) @@ -2310,17 +2310,26 @@ case MODITEM_SEQUENCE: { + bool isCurSeq = false; CModDoc *pModDoc = GetDocumentFromItem(hItem); CSoundFile *pSndFile = (pModDoc) ? pModDoc->GetSoundFile() : nullptr; - if(pModDoc && pSndFile && (pModDoc->GetModType() == MOD_TYPE_MPT) && pSndFile->Order.GetSequence((SEQUENCEINDEX)modItemID).GetLength() == 0) + if(pModDoc && pSndFile && (pModDoc->GetModType() == MOD_TYPE_MPT)) { - nDefault = ID_MODTREE_SWITCHTO; + if(pSndFile->Order.GetSequence((SEQUENCEINDEX)modItemID).GetLength() == 0) + { + nDefault = ID_MODTREE_SWITCHTO; + } + isCurSeq = (pSndFile->Order.GetCurrentSequenceIndex() == (SEQUENCEINDEX)modItemID); } + + if(!isCurSeq) + { + AppendMenu(hMenu, MF_STRING, ID_MODTREE_SWITCHTO, "&Switch to Seqeuence"); + } + AppendMenu(hMenu, MF_STRING, ID_MODTREE_INSERT, "&Insert Sequence"); + AppendMenu(hMenu, MF_STRING, ID_MODTREE_DUPLICATE, "D&uplicate Sequence"); + AppendMenu(hMenu, MF_STRING, ID_MODTREE_REMOVE, "&Delete Sequence"); } - AppendMenu(hMenu, MF_STRING, ID_MODTREE_SWITCHTO, "&Switch to Seqeuence"); - AppendMenu(hMenu, MF_STRING, ID_MODTREE_INSERT, "&Insert Sequence"); - AppendMenu(hMenu, MF_STRING, ID_MODTREE_DUPLICATE, "D&uplicate Sequence"); - AppendMenu(hMenu, MF_STRING, ID_MODTREE_REMOVE, "&Delete Sequence"); break; Modified: trunk/OpenMPT/mptrack/Vstplug.cpp =================================================================== --- trunk/OpenMPT/mptrack/Vstplug.cpp 2010-01-03 21:17:41 UTC (rev 454) +++ trunk/OpenMPT/mptrack/Vstplug.cpp 2010-01-04 20:01:28 UTC (rev 455) @@ -1402,11 +1402,6 @@ if (result) *result = 0; } -#define MAX_FILEOPEN_BUFSIZE 2048 -//Note: Above value might be the maximum size the buffer can be; -//it might be worthwhile to check the CFileDialog documentation -//if wanting the increase that. - VOID CSelectPluginDlg::OnAddPlugin() //---------------------------------- { Modified: trunk/OpenMPT/mptrack/mptrack.rc =================================================================== --- trunk/OpenMPT/mptrack/mptrack.rc 2010-01-03 21:17:41 UTC (rev 454) +++ trunk/OpenMPT/mptrack/mptrack.rc 2010-01-04 20:01:28 UTC (rev 455) @@ -450,7 +450,7 @@ PUSHBUTTON "<<",IDC_BUTTON2,3,51,14,15,NOT WS_TABSTOP,WS_EX_STATICEDGE PUSHBUTTON ">>",IDC_BUTTON1,15,51,14,15,NOT WS_TABSTOP,WS_EX_STATICEDGE LTEXT "Pattern Name",IDC_STATIC_PATTERNNAME,384,33,48,8,SS_CENTERIMAGE - EDITTEXT IDC_EDIT_PATTERNNAME,439,31,108,12,ES_AUTOHSCROLL + EDITTEXT IDC_EDIT_PATTERNNAME,438,31,109,12,ES_AUTOHSCROLL CONTROL "Toolbar1",IDC_TOOLBAR1,"ToolbarWindow32",WS_GROUP | 0x4d,2,4,370,18 CONTROL "Spin1",IDC_SPIN_INSTRUMENT,"msctls_updown32",0x0,6,31,11,12 PUSHBUTTON "Plugin",IDC_PATINSTROPLUGGUI,126,31,33,13,0,WS_EX_STATICEDGE @@ -458,10 +458,12 @@ CONTROL "Loop Pattern",IDC_PATTERN_LOOP,"Button",BS_AUTOCHECKBOX | BS_FLAT | WS_TABSTOP,252,33,57,8 EDITTEXT IDC_EDIT_ORDERLIST_MARGINS,3,65,28,12,ES_AUTOHSCROLL | ES_READONLY CONTROL "",IDC_SPIN_ORDERLIST_MARGINS,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,16,70,11,11 - EDITTEXT IDC_EDIT_SEQUENCE_NAME,439,8,108,12,ES_AUTOHSCROLL - CTEXT "Sequence Name",IDC_STATIC_SEQUENCE_NAME,384,10,53,8,SS_CENTERIMAGE + EDITTEXT IDC_EDIT_SEQUENCE_NAME,450,8,97,12,ES_AUTOHSCROLL + LTEXT "Sequence",IDC_STATIC_SEQUENCE_NAME,384,10,36,8 GROUPBOX "",IDC_STATIC_SEQUENCE_NAME_FRAME,378,0,174,24 GROUPBOX "",IDC_STATIC,378,23,174,24 + EDITTEXT IDC_EDIT_SEQNUM,420,8,28,12,ES_AUTOHSCROLL | ES_NUMBER | NOT WS_TABSTOP + CONTROL "",IDC_SPIN_SEQNUM,"msctls_updown32",UDS_WRAP | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,438,6,11,11 END IDD_CONTROL_SAMPLES DIALOGEX 0, 0, 544, 106 Modified: trunk/OpenMPT/mptrack/resource.h =================================================================== --- trunk/OpenMPT/mptrack/resource.h 2010-01-03 21:17:41 UTC (rev 454) +++ trunk/OpenMPT/mptrack/resource.h 2010-01-04 20:01:28 UTC (rev 455) @@ -579,7 +579,9 @@ #define IDC_SPIN_SPACING 2032 #define IDC_EDIT_SPACING 2033 #define IDC_SAMPLE_NAME 2034 +#define IDC_EDIT_SEQNUM 2034 #define IDC_SAMPLE_FILENAME 2035 +#define IDC_SPIN_SEQNUM 2035 #define IDC_SAMPLE_NEW 2036 #define IDC_SAMPLE_OPEN 2037 #define IDC_SAMPLE_SAVEAS 2038 Modified: trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb =================================================================== --- trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb 2010-01-03 21:17:41 UTC (rev 454) +++ trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb 2010-01-04 20:01:28 UTC (rev 455) @@ -26,6 +26,7 @@ 0:1362:2:86:1 //Paste: Ctrl+V (KeyDown) 0:1363:3:86:1 //Mix Paste: Shift+Ctrl+V (KeyDown) 0:1793:1:86:1 //Paste Flood: Shift+V (KeyDown) +0:1820:6:86:1 //Push Forward Paste: Ctrl+Alt+V (KeyDown) 0:1364:2:53:1 //SelectAll: Ctrl+5 (KeyDown) 0:1365:2:70:1 //Find: Ctrl+F (KeyDown) 0:1366:0:114:1 //Find Next: F3 (KeyDown) @@ -34,6 +35,7 @@ 0:1023:4:83:1 //View Samples: Alt+S (KeyDown) 0:1024:4:78:1 //View Instruments: Alt+N (KeyDown) 0:1025:1:120:1 //View Comments: Shift+F9 (KeyDown) +0:1025:4:67:1 //View Comments: Alt+C (KeyDown) 0:1368:2:113:1 //Toggle Tree View: Ctrl+F2 (KeyDown) 0:1369:2:112:1 //View Options: Ctrl+F1 (KeyDown) 0:1781:2:114:1 //View MIDI mapping: Ctrl+F3 (KeyDown) @@ -272,6 +274,21 @@ 8:1790:2:68:1 //Remove DC Offset: Ctrl+D (KeyDown) //----( Instrument Context [bottom] (9) )------------ +9:1825:1:9:5 //Select previous envelope point: Shift+TABULATOR (KeyDown|KeyHold) +9:1826:0:9:5 //Select next envelope point: TABULATOR (KeyDown|KeyHold) +9:1821:0:37:5 //Move envelope point left: NACH-LINKS (KeyDown|KeyHold) +9:1822:0:39:5 //Move envelope point right: NACH-RECHTS (KeyDown|KeyHold) +9:1823:0:38:5 //Move envelope point up: NACH-OBEN (KeyDown|KeyHold) +9:1834:0:33:5 //Move envelope point up (big step): BILD-NACH-OBEN (KeyDown|KeyHold) +9:1824:0:40:5 //Move envelope point down: NACH-UNTEN (KeyDown|KeyHold) +9:1835:0:34:5 //Move envelope point down (big step): BILD-NACH-UNTEN (KeyDown|KeyHold) +9:1827:0:45:5 //Insert envelope point: EINFG (KeyDown|KeyHold) +9:1828:0:46:5 //Remove envelope point: ENTF (KeyDown|KeyHold) +9:1829:0:36:1 //Set loop start: POS1 (KeyDown) +9:1830:0:35:1 //Set loop end: ENDE (KeyDown) +9:1831:2:36:1 //Set sustain loop start: Ctrl+POS1 (KeyDown) +9:1832:2:35:1 //Set sustain loop end: Ctrl+ENDE (KeyDown) +9:1833:2:82:1 //Toggle release node: Ctrl+R (KeyDown) //----( Comments Context [bottom] (10) )------------ Modified: trunk/OpenMPT/packageTemplate/extraKeymaps/FR_mpt_laptop_(legovitch).mkb =================================================================== --- trunk/OpenMPT/packageTemplate/extraKeymaps/FR_mpt_laptop_(legovitch).mkb 2010-01-03 21:17:41 UTC (rev 454) +++ trunk/OpenMPT/packageTemplate/extraKeymaps/FR_mpt_laptop_(legovitch).mkb 2010-01-04 20:01:28 UTC (rev 455) @@ -31,7 +31,6 @@ 0:1023:0:118:1 //View Samples: F7 (KeyDown) 0:1024:0:119:1 //View Instruments: F8 (KeyDown) 0:1025:0:120:1 //View Comments: F9 (KeyDown) -0:1769:1:121:1 //View Graph: Shift+F10 (KeyDown) 0:1367:6:87:1 //Toggle Main View: Ctrl+Alt+W (KeyDown) 0:1368:0:112:1 //Toggle Tree View: F1 (KeyDown) 0:1369:2:112:1 //View Options: Ctrl+F1 (KeyDown) @@ -268,6 +267,23 @@ 8:1790:6:68:1 //Remove DC Offset: Ctrl+Alt+D (KeyDown) //----( Instrument Context [bottom] (9) )------------ +9:1825:1:9:5 //Select previous envelope point: Shift+TAB (KeyDown|KeyHold) +9:1825:0:166:5 //Select previous envelope point: (KeyDown|KeyHold) +9:1826:0:9:5 //Select next envelope point: TAB (KeyDown|KeyHold) +9:1826:0:167:5 //Select next envelope point: (KeyDown|KeyHold) +9:1821:0:37:5 //Move envelope point left: GAUCHE (KeyDown|KeyHold) +9:1822:0:39:5 //Move envelope point right: DROITE (KeyDown|KeyHold) +9:1823:0:38:5 //Move envelope point up: HAUT (KeyDown|KeyHold) +9:1834:0:33:5 //Move envelope point up (big step): PG.PREC (KeyDown|KeyHold) +9:1824:0:40:5 //Move envelope point down: BAS (KeyDown|KeyHold) +9:1835:0:34:5 //Move envelope point down (big step): PG.SUIV (KeyDown|KeyHold) +9:1827:0:45:5 //Insert envelope point: INS (KeyDown|KeyHold) +9:1828:0:46:5 //Remove envelope point: SUPPR (KeyDown|KeyHold) +9:1829:0:36:1 //Set loop start: ORIGINE (KeyDown) +9:1830:0:35:1 //Set loop end: FIN (KeyDown) +9:1831:2:36:1 //Set sustain loop start: Ctrl+ORIGINE (KeyDown) +9:1832:2:35:1 //Set sustain loop end: Ctrl+FIN (KeyDown) +9:1833:2:82:1 //Toggle release node: Ctrl+R (KeyDown) //----( Comments Context [bottom] (10) )------------ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rel...@us...> - 2010-01-07 17:10:27
|
Revision: 456 http://modplug.svn.sourceforge.net/modplug/?rev=456&view=rev Author: relabsoluness Date: 2010-01-07 17:10:05 +0000 (Thu, 07 Jan 2010) Log Message: ----------- [New] Tuning: Can import scl-files. Upper limit for note count is 64. [Imp] SoundTouch: Update to version 1.5.0. [Mod] XM/MOD: Allow extended XM/MOD files to use '+++'-items again. [Fix] Orderlist: Deleting orders didn't set document modified (appeared in rev. 406). [Fix] GUI: Fixes to handling of 32 chars long instrument name. [Ref/Fix/Mod] Minor tweaks and fixes (changed some "modplug tracker" strings to "OpenMPT", added a couple of utility functions, added tuning directory to existing default/working directory system...). Modified Paths: -------------- trunk/OpenMPT/mptrack/AbstractVstEditor.cpp trunk/OpenMPT/mptrack/Ctrl_seq.cpp trunk/OpenMPT/mptrack/MainFrm.cpp trunk/OpenMPT/mptrack/Mainfrm.h trunk/OpenMPT/mptrack/Moddoc.cpp trunk/OpenMPT/mptrack/Mptrack.cpp trunk/OpenMPT/mptrack/Mptrack.h trunk/OpenMPT/mptrack/TuningDialog.cpp trunk/OpenMPT/mptrack/TuningDialog.h trunk/OpenMPT/mptrack/View_tre.cpp trunk/OpenMPT/mptrack/dlg_misc.cpp trunk/OpenMPT/mptrack/misc_util.cpp trunk/OpenMPT/mptrack/misc_util.h trunk/OpenMPT/mptrack/mptrack.rc trunk/OpenMPT/mptrack/resource.h trunk/OpenMPT/mptrack/test/test.cpp trunk/OpenMPT/packageTemplate/SoundTouch/README.html trunk/OpenMPT/soundlib/Sndfile.cpp trunk/OpenMPT/soundlib/Sndfile.h trunk/OpenMPT/soundlib/mod_specifications.h trunk/OpenMPT/soundlib/tuningCollection.cpp trunk/OpenMPT/soundlib/tuningbase.cpp trunk/OpenMPT/soundlib/tuningbase.h trunk/OpenMPT/soundlib/tuningcollection.h trunk/OpenMPT/soundtouch/3dnow_win.cpp trunk/OpenMPT/soundtouch/BPMDetect.cpp trunk/OpenMPT/soundtouch/BPMDetect.h trunk/OpenMPT/soundtouch/FIFOSampleBuffer.cpp trunk/OpenMPT/soundtouch/FIFOSampleBuffer.h trunk/OpenMPT/soundtouch/FIFOSamplePipe.h trunk/OpenMPT/soundtouch/FIRFilter.cpp trunk/OpenMPT/soundtouch/FIRFilter.h trunk/OpenMPT/soundtouch/PeakFinder.cpp trunk/OpenMPT/soundtouch/PeakFinder.h trunk/OpenMPT/soundtouch/README.html trunk/OpenMPT/soundtouch/RateTransposer.cpp trunk/OpenMPT/soundtouch/RateTransposer.h trunk/OpenMPT/soundtouch/STTypes.h trunk/OpenMPT/soundtouch/SoundTouch.cpp trunk/OpenMPT/soundtouch/SoundTouch.h trunk/OpenMPT/soundtouch/TDStretch.cpp trunk/OpenMPT/soundtouch/TDStretch.h trunk/OpenMPT/soundtouch/cpu_detect_x86_win.cpp trunk/OpenMPT/soundtouch/mmx_optimized.cpp trunk/OpenMPT/soundtouch/sse_optimized.cpp Modified: trunk/OpenMPT/mptrack/AbstractVstEditor.cpp =================================================================== --- trunk/OpenMPT/mptrack/AbstractVstEditor.cpp 2010-01-04 20:01:28 UTC (rev 455) +++ trunk/OpenMPT/mptrack/AbstractVstEditor.cpp 2010-01-07 17:10:05 UTC (rev 456) @@ -469,7 +469,7 @@ if (nIns==0 && (inputPlugs.GetSize() || inputChannels.GetSize())) { m_pInputMenu->AppendMenu(MF_SEPARATOR); } - name.Format("Ins%02d: %s", inputInstruments[nIns], pSndFile->Instruments[inputInstruments[nIns]]->name); + name.Format("Ins%02d: %s", inputInstruments[nIns], (LPCTSTR)pSndFile->GetInstrumentName(inputInstruments[nIns])); if (inputInstruments[nIns] == (UINT)m_nInstrument) checked=true; m_pInputMenu->AppendMenu(MF_STRING|(checked?MF_CHECKED:0), ID_SELECTINST+inputInstruments[nIns], name); } Modified: trunk/OpenMPT/mptrack/Ctrl_seq.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_seq.cpp 2010-01-04 20:01:28 UTC (rev 455) +++ trunk/OpenMPT/mptrack/Ctrl_seq.cpp 2010-01-07 17:10:05 UTC (rev 456) @@ -1192,6 +1192,7 @@ pSndFile->Order.Remove(selection.nOrdLo, selection.nOrdHi); + m_pModDoc->SetModified(); InvalidateRect(NULL, FALSE); m_pModDoc->UpdateAllViews(NULL, HINT_MODSEQUENCE, this); Modified: trunk/OpenMPT/mptrack/MainFrm.cpp =================================================================== --- trunk/OpenMPT/mptrack/MainFrm.cpp 2010-01-04 20:01:28 UTC (rev 455) +++ trunk/OpenMPT/mptrack/MainFrm.cpp 2010-01-07 17:10:05 UTC (rev 456) @@ -310,6 +310,8 @@ for(UINT i = 0; i < NUM_DIRS; i++) { + if (i == DIR_TUNING) // Hack: Tuning folder is set already so don't reset it. + continue; m_szDefaultDirectory[i][0] = 0; m_szWorkingDirectory[i][0] = 0; } Modified: trunk/OpenMPT/mptrack/Mainfrm.h =================================================================== --- trunk/OpenMPT/mptrack/Mainfrm.h 2010-01-04 20:01:28 UTC (rev 455) +++ trunk/OpenMPT/mptrack/Mainfrm.h 2010-01-07 17:10:05 UTC (rev 456) @@ -372,6 +372,7 @@ DIR_PLUGINS, DIR_PLUGINPRESETS, DIR_EXPORT, + DIR_TUNING, NUM_DIRS }; Modified: trunk/OpenMPT/mptrack/Moddoc.cpp =================================================================== --- trunk/OpenMPT/mptrack/Moddoc.cpp 2010-01-04 20:01:28 UTC (rev 455) +++ trunk/OpenMPT/mptrack/Moddoc.cpp 2010-01-07 17:10:05 UTC (rev 456) @@ -3486,7 +3486,7 @@ { const SAMPLEINDEX nSmp = m_SndFile.Instruments[nInstr]->Keyboard[60]; if (nSmp < ARRAYELEMCOUNT(m_SndFile.Samples) && m_SndFile.Samples[nSmp].pSample) - instrumentName.Format(TEXT("s: %s"), (LPCTSTR)m_SndFile.GetSampleName(nSmp)); //60 is C-5 + instrumentName.Format(TEXT("s: %s"), m_SndFile.GetSampleName(nSmp)); //60 is C-5 } // Get plugin name. Modified: trunk/OpenMPT/mptrack/Mptrack.cpp =================================================================== --- trunk/OpenMPT/mptrack/Mptrack.cpp 2010-01-04 20:01:28 UTC (rev 455) +++ trunk/OpenMPT/mptrack/Mptrack.cpp 2010-01-07 17:10:05 UTC (rev 456) @@ -790,12 +790,13 @@ } // Create tunings dir - strcpy(m_szTuningsDirectory, m_szConfigDirectory); - strcat(m_szTuningsDirectory, "tunings\\"); + CString sTuningPath; + sTuningPath.Format(TEXT("%stunings\\"), m_szConfigDirectory); + CMainFrame::SetDefaultDirectory(sTuningPath, DIR_TUNING); - if(PathIsDirectory(m_szTuningsDirectory) == 0) + if(PathIsDirectory(CMainFrame::GetDefaultDirectory(DIR_TUNING)) == 0) { - CreateDirectory(m_szTuningsDirectory, 0); + CreateDirectory(CMainFrame::GetDefaultDirectory(DIR_TUNING), 0); } if(!bIsAppDir) Modified: trunk/OpenMPT/mptrack/Mptrack.h =================================================================== --- trunk/OpenMPT/mptrack/Mptrack.h 2010-01-04 20:01:28 UTC (rev 455) +++ trunk/OpenMPT/mptrack/Mptrack.h 2010-01-07 17:10:05 UTC (rev 456) @@ -155,7 +155,6 @@ MODMIDICFG m_MidiCfg; TCHAR m_szExePath[_MAX_PATH]; TCHAR m_szConfigDirectory[_MAX_PATH]; - TCHAR m_szTuningsDirectory[_MAX_PATH]; TCHAR m_szConfigFileName[_MAX_PATH]; TCHAR m_szPluginCacheFileName[_MAX_PATH]; TCHAR m_szStringsFileName[_MAX_PATH]; @@ -202,7 +201,6 @@ BOOL IsDebug() const { return m_bDebugMode; } LPCSTR GetConfigFileName() const { return m_szConfigFileName; } LPCSTR GetPluginCacheFileName() const { return m_szPluginCacheFileName; } - LPCSTR GetTuningsPath() const { return m_szTuningsDirectory; } LPCSTR GetConfigPath() const { return m_szConfigDirectory; } void SetupPaths(); @@ -439,6 +437,7 @@ const LPCSTR gszModCommands = " 0123456789ABCDRFFTE???GHK?YXPLZ\\:#??"; //rewbs.smoothVST: added last \ (written as \\); rewbs.velocity: added last : const LPCSTR gszS3mCommands = " JFEGHLKRXODB?CQATI?SMNVW?UY?P?Z\\:#??"; //rewbs.smoothVST: added last \ (written as \\); rewbs.velocity: added last : const LPCSTR gszVolCommands = " vpcdabuhlrgfe:o"; //rewbs.velocity: added last : ; rewbs.volOff added last o +const TCHAR gszEmpty[] = TEXT(""); // Defined in load_mid.cpp extern const LPCSTR szMidiProgramNames[128]; Modified: trunk/OpenMPT/mptrack/TuningDialog.cpp =================================================================== --- trunk/OpenMPT/mptrack/TuningDialog.cpp 2010-01-04 20:01:28 UTC (rev 455) +++ trunk/OpenMPT/mptrack/TuningDialog.cpp 2010-01-07 17:10:05 UTC (rev 456) @@ -1,6 +1,7 @@ #include "stdafx.h" #include "mptrack.h" #include "TuningDialog.h" +#include "MainFrm.h" #include <algorithm> #include "misc_util.h" #include ".\tuningdialog.h" @@ -627,7 +628,7 @@ FileDlgResult files = CTrackApp::ShowOpenSaveFileDialog(false, CTuning::s_FileExtension, "", filter, - theApp.GetTuningsPath()); + CMainFrame::GetWorkingDirectory(DIR_TUNING)); if(files.abort) return; BeginWaitCursor(); @@ -655,67 +656,141 @@ ErrorBox(IDS_ERR_EXPORT_TUNING, this); } + void CTuningDialog::OnBnClickedButtonImport() //------------------------------------------- { - //TODO: Ability to import ratios from text file. - string filter = string("Tuning files (*") + CTuning::s_FileExtension + string(", *") + CTuningCollection::s_FileExtension + string(")|*") + - CTuning::s_FileExtension + string(";*") + CTuningCollection::s_FileExtension + string("|"); + CString sFilter; + sFilter.Format(TEXT("Tuning files (*%s, *%s, *.scl)|*%s;*%s;*.scl|"), + CTuning::s_FileExtension, + CTuningCollection::s_FileExtension, + CTuning::s_FileExtension, + CTuningCollection::s_FileExtension); - FileDlgResult files = CTrackApp::ShowOpenSaveFileDialog(true, "", "", - filter, - theApp.GetTuningsPath()); - if(files.abort) return; + FileDlgResult files = CTrackApp::ShowOpenSaveFileDialog(true, TEXT(""), TEXT(""), + (LPCTSTR)sFilter, + CMainFrame::GetWorkingDirectory(DIR_TUNING), + true); + if(files.abort) + return; - const string ext = string(".") + files.extension; + CMainFrame::SetWorkingDirectory(files.workingDirectory.c_str(), DIR_TUNING, true); - bool failure = true; + CString sLoadReport; - if(ext == CTuning::s_FileExtension) + const size_t nFiles = files.filenames.size(); + for(size_t counter = 0; counter < nFiles; counter++) { - ifstream fin(files.first_file.c_str(), ios::binary); - CTuning* pT = CTuningRTI::DeserializeOLD(fin); - if(pT == 0) {fin.clear(); fin.seekg(0); pT = CTuningRTI::Deserialize(fin);} - fin.close(); - if(pT) + TCHAR szFileName[_MAX_FNAME], szExt[_MAX_EXT]; + _tsplitpath(files.filenames[counter].c_str(), nullptr, nullptr, szFileName, szExt); + + _tcslwr(szExt); // Convert extension to lower case. + + const bool bIsTun = (_tcscmp(szExt, CTuning::s_FileExtension) == 0); + const bool bIsScl = (_tcscmp(szExt, TEXT(".scl")) == 0); + + if (bIsTun || bIsScl) { - failure = false; - m_TempTunings.AddTuning(pT); - m_pActiveTuning = pT; + CTuning* pT = nullptr; - AddTreeItem(m_pActiveTuning, m_TreeItemTuningItemMap.GetMapping_21(TUNINGTREEITEM(&m_TempTunings)), NULL); - UpdateView(); + if (bIsTun) + { + std::ifstream fin(files.filenames[counter].c_str(), ios::binary); + pT = CTuningRTI::DeserializeOLD(fin); + if(pT == 0) + {fin.clear(); fin.seekg(0); pT = CTuningRTI::Deserialize(fin);} + fin.close(); + if (pT) + { + if (m_TempTunings.AddTuning(pT) == true) + { + delete pT; pT = nullptr; + if (m_TempTunings.GetNumTunings() >= CTuningCollection::s_nMaxTuningCount) + { + CString sFormat, sMsg; + sFormat.LoadString(IDS_TUNING_IMPORT_LIMIT); + sMsg.FormatMessage(sFormat, szFileName, szExt, CTuningCollection::s_nMaxTuningCount); + sLoadReport += sMsg; + } + else // Case: Can't add tuning to tuning collection for unknown reason. + { + CString sMsg; + AfxFormatString2(sMsg, IDS_TUNING_IMPORT_UNKNOWN_FAILURE, szFileName, szExt); + sLoadReport += sMsg; + } + } + } + else // pT == nullptr + { + CString sMsg; + AfxFormatString2(sMsg, IDS_TUNING_IMPORT_UNRECOGNIZED_FILE, szFileName, szExt); + sLoadReport += sMsg; + } + } + else // scl import. + { + EnSclImport a = ImportScl(files.filenames[counter].c_str(), szFileName); + if (a != enSclImportOk) + { + if (a == enSclImportAddTuningFailure && m_TempTunings.GetNumTunings() >= CTuningCollection::s_nMaxTuningCount) + { + CString sFormat, sMsg; + sFormat.LoadString(IDS_TUNING_IMPORT_LIMIT); + sMsg.FormatMessage(sFormat, szFileName, szExt, CTuningCollection::s_nMaxTuningCount); + sLoadReport += sMsg; + } + else + { + CString sFormat, sMsg; + sFormat.LoadString(IDS_TUNING_IMPORT_SCL_FAILURE); + sMsg.FormatMessage(sFormat, szFileName, szExt, (LPCTSTR)GetSclImportFailureMsg(a)); + sLoadReport += sMsg; + } + } + else // scl import successful. + pT = &m_TempTunings.GetTuning(m_TempTunings.GetNumTunings() - 1); + } + + if (pT) + { + m_pActiveTuning = pT; + AddTreeItem(m_pActiveTuning, m_TreeItemTuningItemMap.GetMapping_21(TUNINGTREEITEM(&m_TempTunings)), NULL); + } } - } - else - { - if(ext == CTuningCollection::s_FileExtension) + else if (_tcscmp(szExt, CTuningCollection::s_FileExtension) == 0) { - //For now only loading tuning collection as - //a separate collection - no possibility to - //directly replace some collection. + // For now only loading tuning collection as + // a separate collection - no possibility to + // directly replace some collection. CTuningCollection* pNewTCol = new CTuningCollection; - pNewTCol->SetSavefilePath(static_cast<LPCTSTR>(files.first_file.c_str())); - failure = pNewTCol->Deserialize(); - if(failure) + pNewTCol->SetSavefilePath(files.filenames[counter].c_str()); + if (pNewTCol->Deserialize()) { delete pNewTCol; pNewTCol = 0; + CString sMsg; + AfxFormatString2(sMsg, IDS_TUNING_IMPORT_UNKNOWN_TC_FAILURE, szFileName, szExt); + sLoadReport += sMsg; } else { m_TuningCollections.push_back(pNewTCol); m_DeletableTuningCollections.push_back(pNewTCol); AddTreeItem(pNewTCol, NULL, NULL); - UpdateView(); } - - } + else // Case: Unknown extension (should not happen). + { + CString sMsg; + AfxFormatString2(sMsg, IDS_TUNING_IMPORT_UNRECOGNIZED_FILE_EXT, szFileName, szExt); + sLoadReport += sMsg; + } } - if(failure) - ErrorBox(IDS_OPERATION_FAIL, this); + if (sLoadReport.GetLength() > 0) + AfxMessageBox(sLoadReport, MB_ICONINFORMATION); + UpdateView(); } + void CTuningDialog::OnEnChangeEditFinetunesteps() //----------------------------------------------- { @@ -1325,3 +1400,187 @@ } +//////////////////////////////////////////////////////// +// +// scl import +// +//////////////////////////////////////////////////////// + +typedef double SclFloat; + +CString CTuningDialog::GetSclImportFailureMsg(EnSclImport id) +//---------------------------------------------------------- +{ + CString sMsg; + switch(id) + { + case enSclImportFailTooManyNotes: + AfxFormatString1(sMsg, IDS_SCL_IMPORT_FAIL_8, Stringify(s_nSclImportMaxNoteCount).c_str()); + return sMsg; + + case enSclImportFailTooLargeNumDenomIntegers: + sMsg.LoadString(IDS_SCL_IMPORT_FAIL_1); return sMsg; + + case enSclImportFailZeroDenominator: + sMsg.LoadString(IDS_SCL_IMPORT_FAIL_2); return sMsg; + + case enSclImportFailNegativeRatio: + sMsg.LoadString(IDS_SCL_IMPORT_FAIL_3); return sMsg; + + case enSclImportFailUnableToOpenFile: + sMsg.LoadString(IDS_SCL_IMPORT_FAIL_4); return sMsg; + + case enSclImportLineCountMismatch: + sMsg.LoadString(IDS_SCL_IMPORT_FAIL_5); return sMsg; + + case enSclImportTuningCreationFailure: + sMsg.LoadString(IDS_SCL_IMPORT_FAIL_6); return sMsg; + + case enSclImportAddTuningFailure: + sMsg.LoadString(IDS_SCL_IMPORT_FAIL_7); return sMsg; + + default: + return sMsg; + } +} + + +static void SkipCommentLines(std::istream& iStrm, std::string& str) +//----------------------------------------------------------------- +{ + while(std::getline(iStrm, str)) + { + LPCSTR psz = str.c_str(); + for(; *psz != 0; psz++) + { + if (*psz == ' ' || *psz == '\t') + continue; + else + { + if (*psz != '!') + return; + else // Found comment line: break for loop and get another line. + break; + } + } + } +} + + +static inline SclFloat CentToRatio(const SclFloat& val) +//----------------------------------------------------- +{ + return pow(2.0, val / 1200.0); +} + + +CTuningDialog::EnSclImport CTuningDialog::ImportScl(LPCTSTR pszPath, LPCTSTR pszName) +//----------------------------------------------------------------------------------- +{ + CFile file; + if (file.Open(pszPath, CFile::modeRead) == 0) + return enSclImportFailUnableToOpenFile; + + size_t nSize = static_cast<size_t>(file.GetLength()); + + std::vector<char> data(nSize + 1, 0); + nSize = file.Read(&data[0], nSize); + file.Close(); + + std::istrstream iStrm(&data[0], nSize); + return ImportScl(iStrm, pszName); +} + + +CTuningDialog::EnSclImport CTuningDialog::ImportScl(std::istream& iStrm, LPCTSTR pszName) +//--------------------------------------------------------------------------------------- +{ + std::string str; + SkipCommentLines(iStrm, str); + // str should now contain comment line. + SkipCommentLines(iStrm, str); + // str should now contain number of notes. + const size_t nNotes = 1 + ConvertStrTo<size_t>(str.c_str()); + if (nNotes > s_nSclImportMaxNoteCount) + return enSclImportFailTooManyNotes; + + std::vector<CTuningRTI::RATIOTYPE> fRatios; + fRatios.reserve(nNotes); + fRatios.push_back(1); + + char buffer[128]; + MemsetZero(buffer); + + while (iStrm.getline(buffer, sizeof(buffer))) + { + LPSTR psz = buffer; + LPSTR const pEnd = psz + strlen(buffer); + + // Skip tabs and spaces. + while(psz != pEnd && (*psz == ' ' || *psz == '\t')) + psz++; + + // Skip empty lines, comment lines and non-text. + if (*psz == 0 || *psz == '!' || *psz < 32) + continue; + + char* pNonDigit = pEnd; + + // Check type of first non digit. This tells whether to read cent, ratio or plain number. + for (pNonDigit = psz; pNonDigit != pEnd; pNonDigit++) + { + if (isdigit(*pNonDigit) == 0) + break; + } + + if (*pNonDigit == '.') // Reading cents + { + SclFloat fCent = ConvertStrTo<SclFloat>(psz); + fRatios.push_back(static_cast<CTuningRTI::RATIOTYPE>(CentToRatio(fCent))); + } + else if (*pNonDigit == '/') // Reading ratios + { + *pNonDigit = 0; // Replace '/' with null. + int64 nNum = ConvertStrTo<int64>(psz); + psz = pNonDigit + 1; + int64 nDenom = ConvertStrTo<int64>(psz); + + if (nNum > int32_max || nDenom > int32_max) + return enSclImportFailTooLargeNumDenomIntegers; + if (nDenom == 0) + return enSclImportFailZeroDenominator; + + fRatios.push_back(static_cast<CTuningRTI::RATIOTYPE>((SclFloat)nNum / (SclFloat)nDenom)); + } + else // Plain numbers. + fRatios.push_back(static_cast<CTuningRTI::RATIOTYPE>(ConvertStrTo<int32>(psz))); + } + + if (nNotes != fRatios.size()) + return enSclImportLineCountMismatch; + + for(size_t i = 0; i < fRatios.size(); i++) + { + if (fRatios[i] < 0) + return enSclImportFailNegativeRatio; + } + + CTuning* pT = new CTuningRTI; + if (pT->CreateGroupGeometric(fRatios, 1, pT->GetValidityRange(), 0) != false) + { + delete pT; + return enSclImportTuningCreationFailure; + } + + if (m_TempTunings.AddTuning(pT) != false) + { + delete pT; + return enSclImportAddTuningFailure; + } + + pT->SetName(pszName); + + return enSclImportOk; +} + + Modified: trunk/OpenMPT/mptrack/TuningDialog.h =================================================================== --- trunk/OpenMPT/mptrack/TuningDialog.h 2010-01-04 20:01:28 UTC (rev 455) +++ trunk/OpenMPT/mptrack/TuningDialog.h 2010-01-07 17:10:05 UTC (rev 456) @@ -187,6 +187,19 @@ friend class CTuningTreeCtrl; + enum EnSclImport + { + enSclImportOk, + enSclImportFailTooLargeNumDenomIntegers, + enSclImportFailZeroDenominator, + enSclImportFailNegativeRatio, + enSclImportFailUnableToOpenFile, + enSclImportLineCountMismatch, + enSclImportTuningCreationFailure, + enSclImportAddTuningFailure, + enSclImportFailTooManyNotes + }; + public: typedef vector<CTuningCollection*> TUNINGVECTOR; @@ -233,6 +246,10 @@ //Checks whether tuning collection can be deleted. bool IsDeletable(const CTuningCollection* const pTC) const; + + // Scl-file import. + EnSclImport ImportScl(LPCTSTR pszPath, LPCTSTR pszName); + EnSclImport ImportScl(std::istream& iStrm, LPCTSTR pszName); private: @@ -297,6 +314,8 @@ TT_TUNING }; + static CString GetSclImportFailureMsg(EnSclImport); + static const size_t s_nSclImportMaxNoteCount = 64; //To indicate whether to apply changes made to //those edit boxes(they are modified by certain activities Modified: trunk/OpenMPT/mptrack/View_tre.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_tre.cpp 2010-01-04 20:01:28 UTC (rev 455) +++ trunk/OpenMPT/mptrack/View_tre.cpp 2010-01-07 17:10:05 UTC (rev 456) @@ -965,10 +965,10 @@ // path info for ITP instruments BOOL pathOk = pSndFile->m_szInstrumentPath[nIns-1][0] != '\0'; BOOL instOk = pSndFile->instrumentModified[nIns-1] == FALSE; - wsprintf(s, pathOk ? (instOk ? "%3d: %s" : "%3d: * %s") : "%3d: ? %s", nIns, pSndFile->Instruments[nIns]->name); + wsprintf(s, pathOk ? (instOk ? "%3d: %s" : "%3d: * %s") : "%3d: ? %s", nIns, (LPCTSTR)pSndFile->GetInstrumentName(nIns)); } else { - wsprintf(s, "%3d: %s", nIns, pSndFile->Instruments[nIns]->name); + wsprintf(s, "%3d: %s", nIns, (LPCTSTR)pSndFile->GetInstrumentName(nIns)); } int nImage = IMAGE_INSTRUMENTS; Modified: trunk/OpenMPT/mptrack/dlg_misc.cpp =================================================================== --- trunk/OpenMPT/mptrack/dlg_misc.cpp 2010-01-04 20:01:28 UTC (rev 455) +++ trunk/OpenMPT/mptrack/dlg_misc.cpp 2010-01-07 17:10:05 UTC (rev 456) @@ -746,7 +746,7 @@ { if (pSndFile->m_nInstruments) { - wsprintf(s, "%03d:%s", n, (pSndFile->Instruments[n]) ? pSndFile->Instruments[n]->name : ""); + wsprintf(s, "%03d:%s", n, (pSndFile->Instruments[n]) ? (LPCTSTR)pSndFile->GetInstrumentName(n) : ""); } else { wsprintf(s, "%03d:%s", n, pSndFile->m_szNames[n]); @@ -2876,7 +2876,7 @@ } if (bUsed) { CString sampleName; - sampleName.Format("%d: %s", i, (LPCTSTR)m_pSndFile->GetSampleName(i)); + sampleName.Format("%d: %s", i, m_pSndFile->GetSampleName(i)); nInsertPos = m_CbnSample.AddString(sampleName); m_CbnSample.SetItemData(nInsertPos, i); Modified: trunk/OpenMPT/mptrack/misc_util.cpp =================================================================== --- trunk/OpenMPT/mptrack/misc_util.cpp 2010-01-04 20:01:28 UTC (rev 455) +++ trunk/OpenMPT/mptrack/misc_util.cpp 2010-01-07 17:10:05 UTC (rev 456) @@ -29,3 +29,25 @@ return pData; } + +// Returns error message corresponding to error code returned by GetLastError(). +CString GetErrorMessage(DWORD nErrorCode) +//--------------------------------------- +{ + const size_t nBufferSize = 256; + CString sMsg; + LPTSTR pszBuf = sMsg.GetBuffer(nBufferSize); + + FormatMessage( FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, + NULL, + nErrorCode, + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + pszBuf, + nBufferSize, + NULL ); + + sMsg.ReleaseBuffer(); + + return sMsg; +} + Modified: trunk/OpenMPT/mptrack/misc_util.h =================================================================== --- trunk/OpenMPT/mptrack/misc_util.h 2010-01-04 20:01:28 UTC (rev 455) +++ trunk/OpenMPT/mptrack/misc_util.h 2010-01-07 17:10:05 UTC (rev 456) @@ -17,23 +17,19 @@ //Convert string to number. template<class T> -inline T ConvertStrTo(const char* str) -//---------------------------------- +inline T ConvertStrTo(LPCSTR psz) +//------------------------------- { - //Is implemented like this because the commented code below caused link errors. if(std::numeric_limits<T>::is_integer) - return static_cast<T>(atoi(str)); + return static_cast<T>(atoi(psz)); else - return static_cast<T>(atof(str)); - - /* - std::istringstream i(str); - T t; - i >> t; - return t; - */ + return static_cast<T>(atof(psz)); } +template<> inline uint32 ConvertStrTo(LPCSTR psz) {return strtoul(psz, nullptr, 10);} +template<> inline int64 ConvertStrTo(LPCSTR psz) {return _strtoi64(psz, nullptr, 10);} +template<> inline uint64 ConvertStrTo(LPCSTR psz) {return _strtoui64(psz, nullptr, 10);} + // Sets last character to null in given char array. // Size of the array must be known at compile time. template <size_t size> @@ -45,6 +41,11 @@ } +// Memset given object to zero. +template <class T> +inline void MemsetZero(T& a) {memset(&a, 0, sizeof(T));} + + // Limits 'val' to given range. If 'val' is less than 'lowerLimit', 'val' is set to value 'lowerLimit'. // Similarly if 'val' is greater than 'upperLimit', 'val' is set to value 'upperLimit'. // If 'lowerLimit' > 'upperLimit', 'val' won't be modified. @@ -75,6 +76,7 @@ LPCCH LoadResource(LPCTSTR lpName, LPCTSTR lpType, LPCCH& pData, size_t& nSize, HGLOBAL& hglob); +CString GetErrorMessage(DWORD nErrorCode); namespace utilImpl { Modified: trunk/OpenMPT/mptrack/mptrack.rc =================================================================== --- trunk/OpenMPT/mptrack/mptrack.rc 2010-01-04 20:01:28 UTC (rev 455) +++ trunk/OpenMPT/mptrack/mptrack.rc 2010-01-07 17:10:05 UTC (rev 456) @@ -13,7 +13,7 @@ #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// -// Deutsch (Deutschland) resources +// German (Germany) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU) #ifdef _WIN32 @@ -142,12 +142,12 @@ END #endif // APSTUDIO_INVOKED -#endif // Deutsch (Deutschland) resources +#endif // German (Germany) resources ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// -// Englisch (USA) resources +// English (U.S.) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 @@ -162,7 +162,7 @@ IDD_ABOUTBOX DIALOGEX 0, 0, 267, 254 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "About ModPlug Tracker" +CAPTION "About OpenMPT" FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN CONTROL "",IDC_BITMAP1,"Static",SS_BLACKRECT | SS_NOTIFY | SS_CENTERIMAGE,5,3,256,81,WS_EX_CLIENTEDGE @@ -1966,7 +1966,7 @@ STRINGTABLE BEGIN - AFX_IDS_APP_TITLE "Modplug Tracker" + AFX_IDS_APP_TITLE "OpenMPT" AFX_IDS_IDLEMESSAGE "Ready" END @@ -2012,8 +2012,8 @@ STRINGTABLE BEGIN - ID_APP_ABOUT "About ModPlug Tracker\nAbout" - ID_APP_EXIT "Exit ModPlug Tracker\nExit" + ID_APP_ABOUT "About OpenMPT\nAbout" + ID_APP_EXIT "Exit OpenMPT\nExit" ID_HELP_INDEX "Opens Help\nHelp Topics" ID_HELP_FINDER "List Help topics\nHelp Topics" ID_HELP_USING "Display instructions about how to use help\nHelp" @@ -2286,14 +2286,36 @@ IDS_CONFIRM_SEQUENCE_DELETE "Delete sequence %1?" IDS_PATTERN_CLEANUP_UNAVAILABLE "Removing unused patterns is not available when using multiple sequences." + IDS_SCL_IMPORT_FAIL_1 "Invalid numerator or denominator" + IDS_SCL_IMPORT_FAIL_2 "Zero denominator" + IDS_SCL_IMPORT_FAIL_3 "Negative ratio" + IDS_SCL_IMPORT_FAIL_4 "Unable to open file" + IDS_SCL_IMPORT_FAIL_5 "Note count error" + IDS_SCL_IMPORT_FAIL_6 "Unknown tuning creation error" + IDS_SCL_IMPORT_FAIL_7 "Can't add tuning to tuning collection" + IDS_SCL_IMPORT_FAIL_8 "OpenMPT supports importing scl-files with at most %1 notes" END -#endif // Englisch (USA) resources +STRINGTABLE +BEGIN + IDS_TUNING_IMPORT_LIMIT "-Failed to load file %1%2: maximum number(=%3!u!) of temporary tunings is already open.\n" + IDS_TUNING_IMPORT_UNKNOWN_FAILURE + "-Unable to import file ""%1%2"": unknown reason.\n" + IDS_TUNING_IMPORT_UNRECOGNIZED_FILE_EXT + "-Unable to load ""%1%2"": unrecognized file extension.\n" + IDS_TUNING_IMPORT_UNKNOWN_TC_FAILURE + "-Unable to import tuning collection ""%1%2"": unrecognized file.\n" + IDS_TUNING_IMPORT_SCL_FAILURE "-Unable to import ""%1%2"": %3.\n" + IDS_TUNING_IMPORT_UNRECOGNIZED_FILE + "-Unable to import file ""%1%2"": unrecognized file.\n" +END + +#endif // English (U.S.) resources ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// -// Englisch (GB) resources +// English (U.K.) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG) #ifdef _WIN32 @@ -2662,7 +2684,7 @@ // IDR_BUILTIN_TUNINGS TUNING "res\\built-inTunings.tc" -#endif // Englisch (GB) resources +#endif // English (U.K.) resources ///////////////////////////////////////////////////////////////////////////// Modified: trunk/OpenMPT/mptrack/resource.h =================================================================== --- trunk/OpenMPT/mptrack/resource.h 2010-01-04 20:01:28 UTC (rev 455) +++ trunk/OpenMPT/mptrack/resource.h 2010-01-07 17:10:05 UTC (rev 456) @@ -52,6 +52,20 @@ #define IDS_CANT_OPEN_FILE_FOR_WRITING 213 #define IDS_CONFIRM_SEQUENCE_DELETE 214 #define IDS_PATTERN_CLEANUP_UNAVAILABLE 215 +#define IDS_SCL_IMPORT_FAIL_1 216 +#define IDS_SCL_IMPORT_FAIL_2 217 +#define IDS_SCL_IMPORT_FAIL_3 218 +#define IDS_SCL_IMPORT_FAIL_4 219 +#define IDS_SCL_IMPORT_FAIL_5 220 +#define IDS_SCL_IMPORT_FAIL_6 221 +#define IDS_SCL_IMPORT_FAIL_7 222 +#define IDS_SCL_IMPORT_FAIL_8 223 +#define IDS_TUNING_IMPORT_LIMIT 224 +#define IDS_TUNING_IMPORT_UNKNOWN_FAILURE 225 +#define IDS_TUNING_IMPORT_UNRECOGNIZED_FILE_EXT 226 +#define IDS_TUNING_IMPORT_UNKNOWN_TC_FAILURE 227 +#define IDS_TUNING_IMPORT_SCL_FAILURE 228 +#define IDS_TUNING_IMPORT_UNRECOGNIZED_FILE 229 #define IDB_MAINBAR 300 #define IDB_IMAGELIST 301 #define IDB_PATTERNS 302 @@ -579,9 +593,7 @@ #define IDC_SPIN_SPACING 2032 #define IDC_EDIT_SPACING 2033 #define IDC_SAMPLE_NAME 2034 -#define IDC_EDIT_SEQNUM 2034 #define IDC_SAMPLE_FILENAME 2035 -#define IDC_SPIN_SEQNUM 2035 #define IDC_SAMPLE_NEW 2036 #define IDC_SAMPLE_OPEN 2037 #define IDC_SAMPLE_SAVEAS 2038 @@ -604,6 +616,8 @@ #define IDC_SAMPLE_SILENCE 2054 #define IDC_SAMPLE_INVERT 2055 #define IDC_SAMPLE_SIGN_UNSIGN 2056 +#define IDC_EDIT_SEQNUM 2057 +#define IDC_SPIN_SEQNUM 2058 #define IDC_INSTRUMENT_NEW 2060 #define IDC_INSTRUMENT_OPEN 2061 #define IDC_INSTRUMENT_SAVEAS 2062 Modified: trunk/OpenMPT/mptrack/test/test.cpp =================================================================== --- trunk/OpenMPT/mptrack/test/test.cpp 2010-01-04 20:01:28 UTC (rev 455) +++ trunk/OpenMPT/mptrack/test/test.cpp 2010-01-07 17:10:05 UTC (rev 456) @@ -65,6 +65,7 @@ void TestVersion(); void TestTypes(); void TestPCnoteSerialization(); +void TestMisc(); @@ -75,6 +76,7 @@ DO_TEST(TestVersion); DO_TEST(TestTypes); //DO_TEST(TestPCnoteSerialization); + DO_TEST(TestMisc); Log(TEXT("Tests were run\n")); } @@ -169,6 +171,27 @@ } +void TestMisc() +//------------- +{ + VERIFY_EQUAL(ConvertStrTo<uint32>("586"), 586); + VERIFY_EQUAL(ConvertStrTo<uint32>("2147483647"), int32_max); + VERIFY_EQUAL(ConvertStrTo<uint32>("4294967295"), uint32_max); + + VERIFY_EQUAL(ConvertStrTo<int64>("-9223372036854775808"), int64_min); + VERIFY_EQUAL(ConvertStrTo<int64>("-159"), -159); + VERIFY_EQUAL(ConvertStrTo<int64>("9223372036854775807"), int64_max); + + VERIFY_EQUAL(ConvertStrTo<uint64>("85059"), 85059); + VERIFY_EQUAL(ConvertStrTo<uint64>("9223372036854775807"), int64_max); + VERIFY_EQUAL(ConvertStrTo<uint64>("18446744073709551615"), uint64_max); + + VERIFY_EQUAL(ConvertStrTo<float>("-87.0"), -87.0); + VERIFY_EQUAL(ConvertStrTo<double>("-0.5e-6"), -0.5e-6); + VERIFY_EQUAL(ConvertStrTo<double>("58.65403492763"), 58.65403492763); +} + + template<class T> T Round(double a) {return static_cast<T>(floor(a + 0.5));} Modified: trunk/OpenMPT/packageTemplate/SoundTouch/README.html =================================================================== --- trunk/OpenMPT/packageTemplate/SoundTouch/README.html 2010-01-04 20:01:28 UTC (rev 455) +++ trunk/OpenMPT/packageTemplate/SoundTouch/README.html 2010-01-07 17:10:05 UTC (rev 456) @@ -12,9 +12,9 @@ <hr> <font color=red><h5>Note: This readme is shortened version of the original SoundTouch readme providing documentation for the time stretching feature.<br> -SoundTouch WWW page: http://www.surina.net/soundtouch +SoundTouch WWW page: <a href="http://www.surina.net/soundtouch">www.surina.net/soundtouch</a> </h5></font> -<h1>SoundTouch audio processing library v1.4.0 +<h1>SoundTouch audio processing library v1.5.0 </h1> <p class="normal">SoundTouch library Copyright (c) Olli Parviainen 2002-2009 </p> @@ -40,11 +40,11 @@ sound the default parameter set may result into a sub-optimal result.</p> <p>The time-stretch algorithm default -parameter values are set by these #defines in file "TDStretch.h":</p> +parameter values are set by the following #defines in file "TDStretch.h":</p> <blockquote> <pre>#define DEFAULT_SEQUENCE_MS AUTOMATIC #define DEFAULT_SEEKWINDOW_MS AUTOMATIC -#define DEFAULT_OVERLAP_MS 12</pre> +#define DEFAULT_OVERLAP_MS 8</pre> </blockquote> <p>These parameters affect to the time-stretch algorithm as follows:</p> @@ -148,6 +148,37 @@ <h2>5. Change History</h2> <h3>5.1. SoundTouch library Change History </h3> +<p><strong>1.5.0:</strong></p> +<ul> +<li>Added normalization to correlation calculation and improvement automatic seek/sequence parameter calculation to improve sound quality</li> + +<li>Bugfixes: + <ul> + <li>Fixed negative array indexing in quick seek algorithm</li> + <li>FIR autoalias filter running too far in processing buffer</li> + <li>Check against zero sample count in rate transposing</li> + <li>Fix for x86-64 support: Removed pop/push instructions from the cpu detection algorithm. </li> + <li>Check against empty buffers in FIFOSampleBuffer</li> + <li>Other minor fixes & code cleanup</li> + </ul> +</li> + +<li>Fixes in compilation scripts for non-Intel platforms</li> +<li>Added Dynamic-Link-Library (DLL) version of SoundTouch library build, + provided with Delphi/Pascal wrapper for calling the dll routines</li> +<li>Added #define PREVENT_CLICK_AT_RATE_CROSSOVER that prevents a click artifact + when crossing the nominal pitch from either positive to negative side or vice + versa</li> + +</ul> + +<p><strong>1.4.1:</strong></p> +<ul> +<li>Fixed a buffer overflow bug in BPM detect algorithm routines if processing + more than 2048 samples at one call </li> + +</ul> + <p><strong>1.4.0:</strong></p> <ul> <li>Improved sound quality by automatic calculation of time stretch algorithm @@ -237,25 +268,32 @@ <p> </p> <hr> <h2 >6. Acknowledgements </h2> -<p >Kudos for these people who have submitted bugfixed since +<p >Kudos for these people who have contributed to development or submitted +bugfixes since SoundTouch v1.3.1: </p> <ul> <li>Arthur A</li> <li>Richard Ash</li> <li>Stanislav Brabec</li> + <li>Christian Budde</li> <li>Brian Cameron</li> + <li>Jason Champion</li> + <li>Patrick Colis</li> <li>Justin Frankel</li> <li>Jason Garland</li> <li>Takashi Iwai</li> + <li>Paulo Pizarro</li> + <li>RJ Ryan</li> + <li>John Sheehy</li> </ul> -<p >Moral greetings to all other contributors as well!</p> +<p >Moral greetings to all other contributors and users also!</p> <hr> <h2 >7. LICENSE </h2> <p>SoundTouch audio processing library<br> Copyright (c) Olli Parviainen</p> <p>This library is free software; you can redistribute it and/or modify it under the terms of the GNU -Lesser General Public License vesrion 2.1 as published by the Free Software +Lesser General Public License version 2.1 as published by the Free Software Foundation.</p> <p>This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even Modified: trunk/OpenMPT/soundlib/Sndfile.cpp =================================================================== --- trunk/OpenMPT/soundlib/Sndfile.cpp 2010-01-04 20:01:28 UTC (rev 455) +++ trunk/OpenMPT/soundlib/Sndfile.cpp 2010-01-07 17:10:05 UTC (rev 456) @@ -1404,13 +1404,13 @@ } -CString CSoundFile::GetSampleName(UINT nSample) const -//-------------------------------------------------------- +LPCTSTR CSoundFile::GetSampleName(UINT nSample) const +//--------------------------------------------------- { if (nSample<MAX_SAMPLES) { return m_szNames[nSample]; } else { - return ""; + return gszEmpty; } } @@ -2875,7 +2875,9 @@ } // Load local tunings. - s_pTuningsSharedLocal->SetSavefilePath(std::string(std::string(theApp.GetTuningsPath()) + "local_tunings" + CTuningCollection::s_FileExtension.c_str())); + CString sPath; + sPath.Format(TEXT("%slocal_tunings%s"), CMainFrame::GetDefaultDirectory(DIR_TUNING), CTuningCollection::s_FileExtension); + s_pTuningsSharedLocal->SetSavefilePath(sPath); s_pTuningsSharedLocal->Deserialize(); // Enabling adding/removing of tunings for standard collection Modified: trunk/OpenMPT/soundlib/Sndfile.h =================================================================== --- trunk/OpenMPT/soundlib/Sndfile.h 2010-01-04 20:01:28 UTC (rev 455) +++ trunk/OpenMPT/soundlib/Sndfile.h 2010-01-07 17:10:05 UTC (rev 456) @@ -116,7 +116,7 @@ signed char nPPS; //Pitch to Pan Separator? unsigned char nPPC; //Pitch Centre? - CHAR name[32]; + CHAR name[32]; // Note: not guaranteed to be null-terminated. CHAR filename[32]; BYTE nMixPlug; //rewbs.instroVSTi @@ -651,7 +651,7 @@ void SetCurrentOrder(ORDERINDEX nOrder); void GetTitle(LPSTR s) const { lstrcpyn(s,m_szNames[0],32); } LPCSTR GetTitle() const { return m_szNames[0]; } - CString GetSampleName(UINT nSample) const; + LPCTSTR GetSampleName(UINT nSample) const; CString GetInstrumentName(UINT nInstr) const; UINT GetMusicSpeed() const { return m_nMusicSpeed; } UINT GetMusicTempo() const { return m_nMusicTempo; } Modified: trunk/OpenMPT/soundlib/mod_specifications.h =================================================================== --- trunk/OpenMPT/soundlib/mod_specifications.h 2010-01-04 20:01:28 UTC (rev 455) +++ trunk/OpenMPT/soundlib/mod_specifications.h 2010-01-07 17:10:05 UTC (rev 456) @@ -146,7 +146,7 @@ 0, //No instrument envelopes " 0123456789ABCD?FF?E???????????????", // Supported Effects " ???????????????", // Supported Volume Column commands - false, // Doesn't have "+++" pattern + true, // Has "+++" pattern }; const CModSpecifications xm = @@ -209,7 +209,7 @@ 12, //Envelope point count " 0123456789ABCDRFFTE???GHK?YXPLZ\\:#", // Supported Effects " vpcdabuhlrgfe:o", // Supported Volume Column commands - false, // Doesn't have "+++" pattern + true, // Has "+++" pattern }; const CModSpecifications s3m = Modified: trunk/OpenMPT/soundlib/tuningCollection.cpp =================================================================== --- trunk/OpenMPT/soundlib/tuningCollection.cpp 2010-01-04 20:01:28 UTC (rev 455) +++ trunk/OpenMPT/soundlib/tuningCollection.cpp 2010-01-07 17:10:05 UTC (rev 456) @@ -18,7 +18,7 @@ using namespace std; -const string CTuningCollection::s_FileExtension = ".tc"; +const TCHAR CTuningCollection::s_FileExtension[4] = TEXT(".tc"); namespace CTuningS11n { @@ -277,7 +277,7 @@ bool CTuningCollection::AddTuning(CTuning* const pT) //-------------------------------------------------- { - if((m_EditMask & EM_ADD) == 0 || m_Tunings.size() >= 255) + if((m_EditMask & EM_ADD) == 0 || m_Tunings.size() >= s_nMaxTuningCount) return true; if(pT == NULL) @@ -292,7 +292,7 @@ bool CTuningCollection::AddTuning(istream& inStrm, const bool ignoreEditmask) //------------------------------------------------- { - if(!ignoreEditmask && (m_EditMask & EM_ADD) == 0 || m_Tunings.size() >= 255) + if(!ignoreEditmask && (m_EditMask & EM_ADD) == 0 || m_Tunings.size() >= s_nMaxTuningCount) return true; if(!inStrm.good()) return true; Modified: trunk/OpenMPT/soundlib/tuningbase.cpp =================================================================== --- trunk/OpenMPT/soundlib/tuningbase.cpp 2010-01-04 20:01:28 UTC (rev 455) +++ trunk/OpenMPT/soundlib/tuningbase.cpp 2010-01-07 17:10:05 UTC (rev 456) @@ -44,7 +44,7 @@ const TYPENAME CTUNINGBASE::SERIALIZATION_RETURN_TYPE CTUNINGBASE::SERIALIZATION_FAILURE = true; TEMPLATEDEC -const string CTUNINGBASE::s_FileExtension = ".tun"; +const TCHAR CTUNINGBASE::s_FileExtension[5] = TEXT(".tun"); TEMPLATEDEC const TYPENAME CTUNINGBASE::EDITMASK CTUNINGBASE::EM_RATIOS = 1; //1b @@ -290,8 +290,8 @@ if(MayEdit(EM_RATIOS) && (MayEdit(EM_TYPE) || GetType() == TT_GROUPGEOMETRIC)) { - if(vr.first > vr.second) return true; - if(ratiostartpos < vr.first || vr.second < ratiostartpos || static_cast<UNOTEINDEXTYPE>(vr.second - ratiostartpos) < static_cast<UNOTEINDEXTYPE>(v.size())) return true; + if(vr.first > vr.second || v.size() == 0) return true; + if(ratiostartpos < vr.first || vr.second < ratiostartpos || static_cast<UNOTEINDEXTYPE>(vr.second - ratiostartpos) < static_cast<UNOTEINDEXTYPE>(v.size() - 1)) return true; if(!IsStepCountRangeSufficient(GetFineStepCount(), vr)) return true; for(size_t i = 0; i<v.size(); i++) {if(v[i] < 0) return true;} if(ProCreateGroupGeometric(v,r, vr, ratiostartpos)) Modified: trunk/OpenMPT/soundlib/tuningbase.h =================================================================== --- trunk/OpenMPT/soundlib/tuningbase.h 2010-01-04 20:01:28 UTC (rev 455) +++ trunk/OpenMPT/soundlib/tuningbase.h 2010-01-07 17:10:05 UTC (rev 456) @@ -95,7 +95,7 @@ static const SERIALIZATION_RETURN_TYPE SERIALIZATION_SUCCESS; static const SERIALIZATION_RETURN_TYPE SERIALIZATION_FAILURE; - static const string s_FileExtension; + static const TCHAR s_FileExtension[5]; static const EDITMASK EM_RATIOS; static const EDITMASK EM_NOTENAME; Modified: trunk/OpenMPT/soundlib/tuningcollection.h =================================================================== --- trunk/OpenMPT/soundlib/tuningcollection.h 2010-01-04 20:01:28 UTC (rev 455) +++ trunk/OpenMPT/soundlib/tuningcollection.h 2010-01-07 17:10:05 UTC (rev 456) @@ -50,7 +50,8 @@ SERIALIZATION_FAILURE = true }; - static const string s_FileExtension; + static const TCHAR s_FileExtension[4]; + static const size_t s_nMaxTuningCount = 255; //END PUBLIC STATIC CONSTS @@ -84,7 +85,7 @@ const string& GetName() const {return m_Name;} - void SetSavefilePath(const string& str) {m_SavefilePath = str;} + void SetSavefilePath(LPCTSTR psz) {m_SavefilePath = psz;} const string& GetSaveFilePath() const {return m_SavefilePath;} string GetVersionString() const {return Stringify(s_SerializationVersion);} Modified: trunk/OpenMPT/soundtouch/3dnow_win.cpp =================================================================== --- trunk/OpenMPT/soundtouch/3dnow_win.cpp 2010-01-04 20:01:28 UTC (rev 455) +++ trunk/OpenMPT/soundtouch/3dnow_win.cpp 2010-01-07 17:10:05 UTC (rev 456) @@ -35,10 +35,10 @@ /// //////////////////////////////////////////////////////////////////////////////// // -// Last changed : $Date: 2009-01-25 16:13:39 +0200 (Sun, 25 Jan 2009) $ +// Last changed : $Date: 2009-02-21 18:00:14 +0200 (Sat, 21 Feb 2009) $ // File revision : $Revision: 4 $ // -// $Id: 3dnow_win.cpp 51 2009-01-25 14:13:39Z oparviai $ +// $Id: 3dnow_win.cpp 63 2009-02-21 16:00:14Z oparviai $ // //////////////////////////////////////////////////////////////////////////////// // @@ -82,17 +82,13 @@ ////////////////////////////////////////////////////////////////////////////// #include "TDStretch.h" -//#include <limits.h> -// these are declared in 'TDStretch.cpp' -// extern int scanOffsets[4][24]; - // Calculates cross correlation of two buffers double TDStretch3DNow::calcCrossCorrStereo(const float *pV1, const float *pV2) const { - uint overlapLengthLocal = overlapLength; - float corr; + int overlapLengthLocal = overlapLength; + float corr = 0; // Calculates the cross-correlation value between 'pV1' and 'pV2' vectors /* Modified: trunk/OpenMPT/soundtouch/BPMDetect.cpp =================================================================== --- trunk/OpenMPT/soundtouch/BPMDetect.cpp 2010-01-04 20:01:28 UTC (rev 455) +++ trunk/OpenMPT/soundtouch/BPMDetect.cpp 2010-01-07 17:10:05 UTC (rev 456) @@ -26,10 +26,10 @@ /// //////////////////////////////////////////////////////////////////////////////// // -// Last changed : $Date: 2008-12-25 19:54:41 +0200 (Thu, 25 Dec 2008) $ +// Last changed : $Date: 2009-02-21 18:00:14 +0200 (Sat, 21 Feb 2009) $ // File revision : $Revision: 4 $ // -// $Id: BPMDetect.cpp 43 2008-12-25 17:54:41Z oparviai $ +// $Id: BPMDetect.cpp 63 2009-02-21 16:00:14Z oparviai $ // //////////////////////////////////////////////////////////////////////////////// // @@ -66,8 +66,6 @@ #define INPUT_BLOCK_SAMPLES 2048 #define DECIMATED_BLOCK_SAMPLES 256 -typedef unsigned short ushort; - /// decay constant for calculating RMS volume sliding average approximation /// (time constant is about 10 sec) const float avgdecay = 0.99986f; @@ -77,19 +75,14 @@ -BPMDetect::BPMDetect(int numChannels, int sampleRate) +BPMDetect::BPMDetect(int numChannels, int aSampleRate) { - xcorr = NULL; + this->sampleRate = aSampleRate; + this->channels = numChannels; - buffer = new FIFOSampleBuffer(); - decimateSum = 0; decimateCount = 0; - decimateBy = 0; - this->sampleRate = sampleRate; - this->channels = numChannels; - envelopeAccu = 0; // Initialize RMS volume accumulator to RMS level of 3000 (out of 32768) that's @@ -103,7 +96,26 @@ RMSVolumeAccu = (0.092f * 0.092f) / avgnorm; #endif - init(numChannels, sampleRate); + // choose decimation factor so that result is approx. 500 Hz + decimateBy = sampleRate / 500; + assert(decimateBy > 0); + assert(INPUT_BLOCK_SAMPLES < decimateBy * DECIMATED_BLOCK_SAMPLES); + + // Calculate window length & starting item according to desired min & max bpms + windowLen = (60 * sampleRate) / (decimateBy * MIN_BPM); + windowStart = (60 * sampleRate) / (decimateBy * MAX_BPM); + + assert(windowLen > windowStart); + + // allocate new working objects + xcorr = new float[windowLen]; + memset(xcorr, 0, windowLen * sizeof(float)); + + // allocate processing buffer + buffer = new FIFOSampleBuffer(); + // we do processing in mono mode + buffer->setChannels(1); + buffer->clear(); } @@ -115,7 +127,9 @@ } -/// low-pass filter & decimate to about 500 Hz. return number of outputted samples. + +/// convert to mono, low-pass filter & decimate to about 500 Hz. +/// return number of outputted samples. /// /// Decimation is used to remove the unnecessary frequencies and thus to reduce /// the amount of data needed to be processed as calculating autocorrelation @@ -130,17 +144,25 @@ int count, outcount; LONG_SAMPLETYPE out; - assert(decimateBy != 0); + assert(channels > 0); + assert(decimateBy > 0); outcount = 0; for (count = 0; count < numsamples; count ++) { - decimateSum += src[count]; + int j; + // convert to mono and accumulate + for (j = 0; j < channels; j ++) + { + decimateSum += src[j]; + } + src += j; + decimateCount ++; if (decimateCount >= decimateBy) { // Store every Nth sample only - out = (LONG_SAMPLETYPE)(decimateSum / decimateBy); + out = (LONG_SAMPLETYPE)(decimateSum / (decimateBy * channels)); decimateSum = 0; decimateCount = 0; #ifdef INTEGER_SAMPLES @@ -231,35 +253,35 @@ -void BPMDetect::inputSamples(SAMPLETYPE *samples, int numSamples) +void BPMDetect::inputSamples(const SAMPLETYPE *samples, int numSamples) { SAMPLETYPE decimated[DECIMATED_BLOCK_SAMPLES]; - // convert from stereo to mono if necessary - if (channels == 2) + // iterate so that max INPUT_BLOCK_SAMPLES processed per iteration + while (numSamples > 0) { - int i; + int block; + int decSamples; - for (i = 0; i < numSamples; i ++) - { - samples[i] = (samples[i * 2] + samples[i * 2 + 1]) / 2; - } - } - - // decimate - numSamples = decimate(decimated, samples, numSamples); + block = (numSamples > INPUT_BLOCK_SAMPLES) ? INPUT_BLOCK_SAMPLES : numSamples; - // envelope new samples and add them to buffer - calcEnvelope(decimated, numSamples); - buffer->putSamples(decimated, numSamples); + // decimate. note that converts to mono at the same time + decSamples = decimate(decimated, samples, block); + samples += block * channels; + numSamples -= block; + // envelope new samples and add them to buffer + calcEnvelope(decimated, decSamples); + buffer->putSamples(decimated, decSamples); + } + // when the buffer has enought samples for processing... if ((int)buffer->numSamples() > windowLen) { int processLength; // how many samples are processed - processLength = buffer->numSamples() - windowLen; + processLength = (int)buffer->numSamples() - windowLen; // ... calculate autocorrelations for oldest samples... updateXCorr(processLength); @@ -269,32 +291,7 @@ } -void BPMDetect::init(int numChannels, int sampleRate) -{ - this->sampleRate = sampleRate; - // choose decimation factor so that result is approx. 500 Hz - decimateBy = sampleRate / 500; - assert(decimateBy > 0); - assert(INPUT_BLOCK_SAMPLES < decimateBy * DECIMATED_BLOCK_SAMPLES); - - // Calculate window length & starting item according to desired min & max bpms - windowLen = (60 * sampleRate) / (decimateBy * MIN_BPM); - windowStart = (60 * sampleRate) / (decimateBy * MAX_BPM); - - assert(windowLen > windowStart); - - // allocate new working objects - xcorr = new float[windowLen]; - memset(xcorr, 0, windowLen * sizeof(float)); - - // we do processing in mono mode - buffer->setChannels(1); - buffer->clear(); -} - - - float BPMDetect::getBpm() { double peakPos; Modified: trunk/OpenMPT/soundtouch/BPMDetect.h =================================================================== --- trunk/OpenMPT/soundtouch/BPMDetect.h 2010-01-04 20:01:28 UTC (rev 455) +++ trunk/OpenMPT/soundtouch/BPMDetect.h 2010-01-07 17:10:05 UTC (rev 456) @@ -26,10 +26,10 @@ /// //////////////////////////////////////////////////////////////////////////////// // -// Last changed : $Date: 2008-12-25 14:20:01 +0200 (Thu, 25 Dec 2008) $ +// Last changed : $Date: 2009-02-21 18:00:14 +0200 (Sat, 21 Feb 2009) $ // File revision : $Revision: 4 $ // -// $Id: BPMDetect.h 33 2008-12-25 12:20:01Z oparviai $ +// $Id: BPMDetect.h 63 2009-02-21 16:00:14Z oparviai $ // //////////////////////////////////////////////////////////////////////////////// // @@ -108,9 +108,6 @@ /// FIFO-buffer for decimated processing samples. soundtouch::FIFOSampleBuffer *buffer; - /// Initialize the class for processing. - void init(int numChannels, int sampleRate); - /// Updates auto-correlation function for given number of decimated samples that /// are read from the internal 'buffer' pipe (samples aren't removed from the pipe /// though). @@ -146,8 +143,8 @@ /// function. /// /// Notice that data in 'samples' array can be disrupted in processing. - void inputSamples(soundtouch::SAMPLETYPE *samples, ///< Pointer to input/working data buffer - int numSamples ///< Number of samples in buffer + void inputSamples(const soundtouch::SAMPLETYPE *samples, ///< Pointer to input/working data buffer + int numSamples ///< Number of samples in buffer ); Modified: trunk/OpenMPT/soundtouch/FIFOSampleBuffer.cpp =================================================================== --- trunk/OpenMPT/soundtouch/FIFOSampleBuffer.cpp 2010-01-04 20:01:28 UTC (rev 455) +++ trunk/OpenMPT/soundtouch/FIFOSampleBuffer.cpp 2010-01-07 17:10:05 UTC (rev 456) @@ -15,10 +15,10 @@ /// //////////////////////////////////////////////////////////////////////////////// // -// Last changed : $Date: 2008-02-10 18:26:55 +0200 (Sun, 10 Feb 2008) $ +// Last changed : $Date: 2009-02-27 19:24:42 +0200 (Fri, 27 Feb 2009) $ // File revision : $Revision: 4 $ // -// $Id: FIFOSampleBuffer.cpp 11 2008-02-10 16:26:55Z oparviai $ +// $Id: FIFOSampleBuffer.cpp 68 2009-02-27 17:24:42Z oparviai $ // //////////////////////////////////////////////////////////////////////////////// // @@ -63,6 +63,7 @@ samplesInBuffer = 0; bufferPos = 0; channels = (uint)numChannels; + ensureCapacity(32); // allocate initial capacity } @@ -151,8 +152,9 @@ // When using this function to output samples, also remember to 'remove' the // outputted samples from the buffer by calling the // 'receiveSamples(numSamples)' function -SAMPLETYPE *FIFOSampleBuffer::ptrBegin() const +SAMPLETYPE *FIFOSampleBuffer::ptrBegin() { + assert(buffer); return buffer + bufferPos * channels; } @@ -175,8 +177,12 @@ { throw std::runtime_error("Couldn't allocate memory!\n"); } + // Align the buffer to begin at 16byte cache line boundary for optimal performance temp = (SAMPLETYPE *)(((ulong)tempUnaligned + 15) & (ulong)-16); - memcpy(temp, ptrBegin(), samplesInBuffer * channels * sizeof(SAMPLETYPE)); + if (samplesInBuffer) + { + memcpy(temp, ptrBegin(), samplesInBuffer * channels * sizeof(SAMPLETYPE)); + } delete[] bufferUnaligned; buffer = temp; bufferUnaligned = tempUnaligned; Modified: trunk/OpenMPT/soundtouch/FIFOSampleBuffer.h =================================================================== --- trunk/OpenMPT/soundtouch/FIFOSampleBuffer.h 2010-01-04 20:01:28 UTC (rev 455) +++ trunk/OpenMPT/soundtouch/FIFOSampleBuffer.h 2010-01-07 17:10:05 UTC (rev 456) @@ -15,10 +15,10 @@ /// //////////////////////////////////////////////////////////////////////////////// // -// Last changed : $Date: 2008-02-10 18:26:55 +0200 (Sun, 10 Feb 2008) $ +// Last changed : $Date: 2009-02-21 18:00:14 +0200 (Sat, 21 Feb 2009) $ // File revision : $Revision: 4 $ // -// $Id: FIFOSampleBuffer.h 11 2008-02-10 16:26:55Z oparviai $ +// $Id: FIFOSampleBuffer.h 63 2009-02-21 16:00:14Z oparviai $ // //////////////////////////////////////////////////////////////////////////////// // @@ -107,7 +107,7 @@ /// When using this function to output samples, also remember to 'remove' the /// output samples from the buffer by calling the /// 'receiveSamples(numSamples)' function - virtual SAMPLETYPE *ptrBegin() const; + virtual SAMPLETYPE *ptrBegin(); /// Returns a pointer to the end of the used part of the sample buffer (i.e. /// where the new samples are to be inserted). This function may be used for Modified: trunk/OpenMPT/soundtouch/FIFOSamplePipe.h =================================================================== --- trunk/OpenMPT/soundtouch/FIFOSamplePipe.h 2010-01-04 20:01:28 UTC (rev 455) +++ trunk/OpenMPT/soundtouch/FIFOSamplePipe.h 2010-01-07 17:10:05 UTC (rev 456) @@ -65,6 +65,10 @@ class SOUNDTOUCH_DLLEXPORT FIFOSamplePipe { public: + // virtual default destructor + virtual ~FIFOSamplePipe() {} + + /// Returns a pointer to the beginning of the output samples. /// This function is provided for accessing the output samples directly. /// Please be careful for not to corrupt the book-keeping! @@ -72,7 +76,7 @@ /// When using this function to output samples, also remember to 'remove' the /// output samples from the buffer by calling the /// 'receiveSamples(numSamples)' function - virtual SAMPLETYPE *ptrBegin() const = 0; + virtual SAMPLETYPE *ptrBegin() = 0; /// Adds 'numSamples' pcs of samples from the 'samples' memory position to /// the sample buffer. @@ -173,7 +177,7 @@ /// When using this function to output samples, also remember to 'remove' the /// output samples from the buffer by calling the /// 'receiveSamples(numSamples)' function - virtual SAMPLETYPE *ptrBegin() const + virtual SAMPLETYPE *ptrBegin() { return output->ptrBegin(); } Modified: trunk/OpenMPT/soundtouch/FIRFilter.cpp =================================================================== --- trunk/OpenMPT/soundtouch/FIRFilter.cpp 2010-01-04 20:01:28 UTC (rev 455) +++ trunk/OpenMPT/soundtouch/FIRFilter.cpp 2010-01-07 17:10:05 UTC (rev 456) @@ -1,12 +1,3 @@ -/*********************************************** - * - * ------------- NOTE ------------- - * - * This file is modified version of the original SoundTouch file. - * Search for "OpenMPT_change" to see the modifications. - * -*/ - //////////////////////////////////////////////////////////////////////////////// /// /// General FIR digital filter routines with MMX optimization. @@ -20,7 +11,11 @@ /// //////////////////////////////////////////////////////////////////////////////// // +// Last changed : $Date: 2009-02-25 19:13:51 +0200 (Wed, 25 Feb 2009) $ +// File revision : $Revision: 4 $ // +// $Id: FIRFilter.cpp 67 2009-02-25 17:13:51Z oparviai $ +// //////////////////////////////////////////////////////////////////////////////// // // License : @@ -186,10 +181,7 @@ assert(length == newLength); resultDivFactor = uResultDivFactor; - //OpenMPT_change--> - //resultDivider = (SAMPLETYPE)::pow(2, resultDivFactor); - resultDivider = (1 << resultDivFactor); // == 2^resultDivFactor - //<-- + resultDivider = (SAMPLETYPE)::pow(2.0, (int)resultDivFactor); delete[] filterCoeffs; filterCoeffs = new SAMPLETYPE[length]; Modified: trunk/OpenMPT/soundtouch/FIRFilter.h =================================================================== --- trunk/OpenMPT/soundtouch/FIRFilter.h 2010-01-04 20:01:28 UTC (rev 455) +++ trunk/OpenMPT/soundtouch/FIRFilter.h 2010-01-07 17:10:05 UTC (rev 456) @@ -11,10 +11,10 @@ /// //////////////////////////////////////////////////////////////////////////////// // -// Last changed : $Date: 2008-02-10 18:26:55 +0200 (Sun, 10 Feb 2008) $ +// Last changed : $Date: 2009-02-21 18:00:14 +0200 (Sat, 21 Feb 2009) $ // File revision : $Revision: 4 $ // -// $Id: FIRFilter.h 11 2008-02-10 16:26:55Z oparviai $ +// $Id: FIRFilter.h 63 2009-02-21 16:00:14Z oparviai $ // //////////////////////////////////////////////////////////////////////////////// // @@ -42,6 +42,7 @@ #ifndef FIRFilter_H #define FIRFilter_H +#include <stddef.h> #include "STTypes.h" namespace soundtouch @@ -103,7 +104,7 @@ #ifdef ALLOW_MMX - /// Class that implements MMX optimized functions exclusive for 16bit integer samples type. +/// Class that implements MMX optimized functions exclusive for 16bit integer samples type. class FIRFilterMMX : public FIRFilter { protected: Modified: trunk/OpenMPT/soundtouch/PeakFinder.cpp =================================================================== --- trunk/OpenMPT/soundtouch/PeakFinder.cpp 2010-01-04 20:01:28 UTC (rev 455) +++ trunk/OpenMPT/soundtouch/PeakFinder.cpp 2010-01-07 17:10:05 UTC (r... [truncated message content] |
From: <sag...@us...> - 2010-01-09 20:06:39
|
Revision: 460 http://modplug.svn.sourceforge.net/modplug/?rev=460&view=rev Author: saga-games Date: 2010-01-09 20:06:18 +0000 (Sat, 09 Jan 2010) Log Message: ----------- [Fix] Mod Loaders: Very short sample sustain loops are now also accepted (similar fix to normal loop points) [Fix] Order list: Fixed display error when selecting multiple orders, inserting them and clicking on another order (only first order of previous selection was un-highlighted) [Imp] VST Editor: When dealing with midi learn in vst editors (with Shift key), also accept child windows of the VST editor as valid window. This still doesn't fix the Shift+clicking sliders issue in Synth1, but might help with other plugins. Modified Paths: -------------- trunk/OpenMPT/mptrack/Ctrl_pat.h trunk/OpenMPT/mptrack/Ctrl_seq.cpp trunk/OpenMPT/mptrack/Vstplug.cpp trunk/OpenMPT/soundlib/Sndfile.cpp Modified: trunk/OpenMPT/mptrack/Ctrl_pat.h =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_pat.h 2010-01-08 20:56:53 UTC (rev 459) +++ trunk/OpenMPT/mptrack/Ctrl_pat.h 2010-01-09 20:06:18 UTC (rev 460) @@ -44,7 +44,6 @@ BOOL Init(const CRect&, CCtrlPatterns *pParent, CModDoc *, HFONT hFont); void InvalidateSelection() const; UINT GetCurrentPattern() const; - ORD_SELECTION GetCurSel(bool bIgnoreSelection) const; // make the current selection the secondary selection (used for keyboard orderlist navigation) inline void SetCurSelTo2ndSel(bool isSelectionKeyPressed) { if(isSelectionKeyPressed && m_nScrollPos2nd == ORDERINDEX_INVALID) m_nScrollPos2nd = m_nScrollPos; @@ -58,6 +57,10 @@ ORDERINDEX GetOrderFromPoint(const CRect& rect, const CPoint& pt) const; + // Get the currently selected pattern(s). + // Set bIgnoreSelection to true if only the first selected point is important. + ORD_SELECTION GetCurSel(bool bIgnoreSelection) const; + // Sets target margin value and returns the effective margin value. BYTE SetMargins(int); @@ -83,6 +86,9 @@ // is not interpreted to be in margins regardless of the margin value. bool IsOrderInMargins(int order, int startOrder); + // Ensure that a given order index is visible in the orderlist view. + void EnsureVisible(ORDERINDEX order); + // Set given sqeuence and update orderlist display. void SelectSequence(const SEQUENCEINDEX nSeq); Modified: trunk/OpenMPT/mptrack/Ctrl_seq.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_seq.cpp 2010-01-08 20:56:53 UTC (rev 459) +++ trunk/OpenMPT/mptrack/Ctrl_seq.cpp 2010-01-09 20:06:18 UTC (rev 460) @@ -71,7 +71,7 @@ BYTE COrderList::s_nDefaultMargins = 0; bool COrderList::IsOrderInMargins(int order, int startOrder) -//----------------------------------------------------- +//---------------------------------------------------------- { const BYTE nMargins = GetMargins(); return ((startOrder != 0 && order - startOrder < nMargins) || @@ -79,6 +79,29 @@ } +void COrderList::EnsureVisible(ORDERINDEX order) +//---------------------------------------------- +{ + // nothing needs to be done + if(!IsOrderInMargins(order, m_nXScroll) || order == ORDERINDEX_INVALID) return; + + if(order < m_nXScroll) + { + if(order < GetMargins()) + m_nXScroll = 0; + else + m_nXScroll = order - GetMargins(); + } else + { + m_nXScroll = order + 2 * GetMargins() - 1; + if(m_nXScroll < GetLength()) + m_nXScroll = 0; + else + m_nXScroll -= GetLength(); + } +} + + COrderList::COrderList() //---------------------- { @@ -235,6 +258,7 @@ return result; } + bool COrderList::SetCurSel(ORDERINDEX sel, bool bEdit, bool bShiftClick, bool bIgnoreCurSel) //------------------------------------------------------------------------------------------ { @@ -1165,6 +1189,12 @@ m_nScrollPos2nd = min(m_nScrollPos + nInsertCount, pSndFile->Order.GetLastIndex()); else m_nScrollPos2nd = ORDERINDEX_INVALID; + + InvalidateSelection(); + EnsureVisible(m_nScrollPos2nd); + // first inserted order has higher priority than the last one + EnsureVisible(m_nScrollPos); + InvalidateRect(NULL, FALSE); m_pModDoc->SetModified(); m_pModDoc->UpdateAllViews(NULL, HINT_MODSEQUENCE, this); @@ -1324,7 +1354,7 @@ BYTE COrderList::SetMargins(int i) -//---------------------------------------------- +//-------------------------------- { m_nOrderlistMargins = static_cast<BYTE>(i); return GetMargins(); Modified: trunk/OpenMPT/mptrack/Vstplug.cpp =================================================================== --- trunk/OpenMPT/mptrack/Vstplug.cpp 2010-01-08 20:56:53 UTC (rev 459) +++ trunk/OpenMPT/mptrack/Vstplug.cpp 2010-01-09 20:06:18 UTC (rev 460) @@ -669,7 +669,7 @@ pModDoc->RecordParamChange(pVstPlugin->GetSlot(), index); } - if (pModDoc && CMainFrame::GetInputHandler()->ShiftPressed() && pVstPlugin->GetEditor() && (pVstPlugin->GetEditor()->m_hWnd == ::GetForegroundWindow())) + if (pModDoc && CMainFrame::GetInputHandler()->ShiftPressed() && pVstPlugin->GetEditor() && (pVstPlugin->GetEditor()->m_hWnd == ::GetForegroundWindow() || ::IsChild(pVstPlugin->GetEditor()->m_hWnd, ::GetForegroundWindow()))) { CMainFrame::GetInputHandler()->SetModifierMask(0); // Make sure that the dialog will open only once. CAbstractVstEditor *pVstEditor = pVstPlugin->GetEditor(); Modified: trunk/OpenMPT/soundlib/Sndfile.cpp =================================================================== --- trunk/OpenMPT/soundlib/Sndfile.cpp 2010-01-08 20:56:53 UTC (rev 459) +++ trunk/OpenMPT/soundlib/Sndfile.cpp 2010-01-09 20:06:18 UTC (rev 460) @@ -667,7 +667,7 @@ pSmp->nLoopEnd = 0; } if (pSmp->nSustainEnd > pSmp->nLength) pSmp->nSustainEnd = pSmp->nLength; - if (pSmp->nSustainStart + 3 >= pSmp->nSustainEnd) + if (pSmp->nSustainStart >= pSmp->nSustainEnd) { pSmp->nSustainStart = 0; pSmp->nSustainEnd = 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rel...@us...> - 2010-01-10 17:21:35
|
Revision: 462 http://modplug.svn.sourceforge.net/modplug/?rev=462&view=rev Author: relabsoluness Date: 2010-01-10 17:21:21 +0000 (Sun, 10 Jan 2010) Log Message: ----------- [Mod] Pattern editor: In parameter control note interpolation, overwrite parameter control notes which have zero in instrument column. [Mod] SoundTouch: Now using its own DLL interface. [Mod] Wav export: Added "experimental"-note to normalization. [Mod] General: Updated about box and added Changes-message box. [Mod] Package template: Update to history.txt. [Fix] Sample tab: Actions such as time stretching and undo could trigger sample play due to a bug in ctrlChn::ReplaceSample. Modified Paths: -------------- trunk/OpenMPT/mptrack/Ctrl_smp.cpp trunk/OpenMPT/mptrack/MainFrm.cpp trunk/OpenMPT/mptrack/Mptrack.cpp trunk/OpenMPT/mptrack/View_pat.cpp trunk/OpenMPT/mptrack/mptrack.rc trunk/OpenMPT/mptrack/mptrack.vcproj trunk/OpenMPT/mptrack/res/MPTRACK.RC2 trunk/OpenMPT/mptrack/resource.h trunk/OpenMPT/packageTemplate/History.txt trunk/OpenMPT/soundlib/modsmp_ctrl.cpp trunk/OpenMPT/soundtouch/FIFOSamplePipe.h trunk/OpenMPT/soundtouch/STTypes.h trunk/OpenMPT/soundtouch/SoundTouch.h trunk/OpenMPT/soundtouch/soundtouch.vcproj trunk/OpenMPT/soundtouch/soundtouch_08.vcproj Added Paths: ----------- trunk/OpenMPT/soundtouch/SoundTouchDLL.cpp trunk/OpenMPT/soundtouch/SoundTouchDLL.h Modified: trunk/OpenMPT/mptrack/Ctrl_smp.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2010-01-10 14:50:33 UTC (rev 461) +++ trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2010-01-10 17:21:21 UTC (rev 462) @@ -11,6 +11,7 @@ #include "mpdlgs.h" #include "soundtouch/SoundTouch.h" #include "soundtouch/TDStretch.h" +#include "soundtouch/SoundTouchDLL.h" #pragma warning(disable:4244) //"conversion from 'type1' to 'type2', possible loss of data" #include "smbPitchShift.cpp" #pragma warning(default:4244) //"conversion from 'type1' to 'type2', possible loss of data" @@ -1772,6 +1773,7 @@ int CCtrlSamples::TimeStretch(double ratio) //----------------------------------------- { + static HANDLE handleSt = NULL; // Handle to SoundTouch object. if((!m_pSndFile) || (!m_pSndFile->Samples[m_nSample].pSample)) return -1; MODSAMPLE *pSmp = &m_pSndFile->Samples[m_nSample]; if(!pSmp) return -1; @@ -1792,14 +1794,16 @@ if(pitch < 0.5f) return 2 + (1<<8); if(pitch > 2.0f) return 2 + (2<<8); - soundtouch::SoundTouch* pSoundTouch = 0; - try + if (handleSt != NULL && soundtouch_isEmpty(handleSt) == 0) + return 10; + + if (handleSt == NULL) { - pSoundTouch = new soundtouch::SoundTouch; + handleSt = soundtouch_createInstance(); } - catch(...) - { // Assuming that thrown exception means that soundtouch library could not be loaded. - MessageBox("Failed to load soundtouch library.", 0, MB_ICONERROR); + if (handleSt == NULL) + { + AfxMessageBox(IDS_SOUNDTOUCH_LOADFAILURE); return -1; } @@ -1833,10 +1837,7 @@ //const DWORD nNewSampleLength = (DWORD)(0.5 + ratio * (double)pSmp->nLength); PVOID pNewSample = CSoundFile::AllocateSample(nNewSampleLength * nChn * smpsize); if(pNewSample == NULL) - { - delete pSoundTouch; return 3; - } // Save process button text (to be used as "progress bar" indicator while processing) CHAR oldText[255]; @@ -1866,16 +1867,15 @@ { if(nSampleRate < 300) // Too low samplerate crashes soundtouch. { // Limiting it to value 300(quite arbitrarily chosen). - delete pSoundTouch; return 5; } - pSoundTouch->setSampleRate(nSampleRate); - pSoundTouch->setChannels(nChn); + soundtouch_setSampleRate(handleSt, nSampleRate); + soundtouch_setChannels(handleSt, nChn); // Given ratio is time stretch ratio, and must be converted to // tempo change ratio: for example time stretch ratio 2 means // tempo change ratio 0.5. - pSoundTouch->setTempoChange( (1.0f / ratio - 1.0f) * 100.0f); - pSoundTouch->setSetting(SETTING_USE_QUICKSEEK, 0); + soundtouch_setTempoChange(handleSt, (1.0f / ratio - 1.0f) * 100.0f); + soundtouch_setSetting(handleSt, SETTING_USE_QUICKSEEK, 0); // Read settings from GUI. ReadTimeStretchParameters(); @@ -1887,16 +1887,16 @@ // Set settings to soundtouch. Zero value means 'use default', and // setting value is read back after setting because not all settings are accepted. if(m_nSequenceMs == 0) m_nSequenceMs = DEFAULT_SEQUENCE_MS; - pSoundTouch->setSetting(SETTING_SEQUENCE_MS, m_nSequenceMs); - m_nSequenceMs = pSoundTouch->getSetting(SETTING_SEQUENCE_MS); + soundtouch_setSetting(handleSt, SETTING_SEQUENCE_MS, m_nSequenceMs); + m_nSequenceMs = soundtouch_getSetting(handleSt, SETTING_SEQUENCE_MS); if(m_nSeekWindowMs == 0) m_nSeekWindowMs = DEFAULT_SEEKWINDOW_MS; - pSoundTouch->setSetting(SETTING_SEEKWINDOW_MS, m_nSeekWindowMs); - m_nSeekWindowMs = pSoundTouch->getSetting(SETTING_SEEKWINDOW_MS); + soundtouch_setSetting(handleSt, SETTING_SEEKWINDOW_MS, m_nSeekWindowMs); + m_nSeekWindowMs = soundtouch_getSetting(handleSt, SETTING_SEEKWINDOW_MS); if(m_nOverlapMs == 0) m_nOverlapMs = DEFAULT_OVERLAP_MS; - pSoundTouch->setSetting(SETTING_OVERLAP_MS, m_nOverlapMs); - m_nOverlapMs = pSoundTouch->getSetting(SETTING_OVERLAP_MS); + soundtouch_setSetting(handleSt, SETTING_OVERLAP_MS, m_nOverlapMs); + m_nOverlapMs = soundtouch_getSetting(handleSt, SETTING_OVERLAP_MS); // Update GUI with the actual SoundTouch parameters in effect. UpdateTimeStretchParameterString(); @@ -1926,22 +1926,23 @@ ::GdiFlush(); // Send sampledata for processing. - pSoundTouch->putSamples(reinterpret_cast<int16*>(pSmp->pSample + pos * smpsize * nChn), len); + soundtouch_putSamples(handleSt, reinterpret_cast<int16*>(pSmp->pSample + pos * smpsize * nChn), len); // Receive some processed samples (it's not guaranteed that there is any available). - nLengthCounter += pSoundTouch->receiveSamples(reinterpret_cast<int16*>(pNewSample) + nChn * nLengthCounter, nNewSampleLength - nLengthCounter); + nLengthCounter += soundtouch_receiveSamples(handleSt, reinterpret_cast<int16*>(pNewSample) + nChn * nLengthCounter, nNewSampleLength - nLengthCounter); // Next buffer chunk pos += len; } // The input sample should now be processed. Receive remaining samples. - pSoundTouch->flush(); - while(pSoundTouch->numSamples() > 0 && nNewSampleLength > nLengthCounter) + soundtouch_flush(handleSt); + while(soundtouch_numSamples(handleSt) > 0 && nNewSampleLength > nLengthCounter) { - nLengthCounter += pSoundTouch->receiveSamples(reinterpret_cast<int16*>(pNewSample) + nChn * nLengthCounter, nNewSampleLength - nLengthCounter); + nLengthCounter += soundtouch_receiveSamples(handleSt, reinterpret_cast<int16*>(pNewSample) + nChn * nLengthCounter, nNewSampleLength - nLengthCounter); } - delete pSoundTouch; pSoundTouch = 0; + soundtouch_clear(handleSt); + ASSERT(soundtouch_isEmpty(handleSt) != 0); ASSERT(nNewSampleLength >= nLengthCounter); Modified: trunk/OpenMPT/mptrack/MainFrm.cpp =================================================================== --- trunk/OpenMPT/mptrack/MainFrm.cpp 2010-01-10 14:50:33 UTC (rev 461) +++ trunk/OpenMPT/mptrack/MainFrm.cpp 2010-01-10 17:21:21 UTC (rev 462) @@ -2724,7 +2724,7 @@ // case ID_NETLINK_UT: pszURL = "http://www.united-trackers.org"; break; // case ID_NETLINK_OSMUSIC: pszURL = "http://www.osmusic.net/"; break; // case ID_NETLINK_HANDBOOK: pszURL = "http://www.modplug.com/mods/handbook/handbook.htm"; break; -// case ID_NETLINK_MPTFR: pszURL = "http://mpt.new.fr/"; break; + case ID_NETLINK_MPTFR: pszURL = "http://mpt.new.fr/"; break; case ID_NETLINK_FORUMS: pszURL = "http://www.lpchip.com/modplug"; break; case ID_NETLINK_PLUGINS: pszURL = "http://www.kvraudio.com"; break; case ID_NETLINK_MODARCHIVE: pszURL = "http://modarchive.org/"; break; Modified: trunk/OpenMPT/mptrack/Mptrack.cpp =================================================================== --- trunk/OpenMPT/mptrack/Mptrack.cpp 2010-01-10 14:50:33 UTC (rev 461) +++ trunk/OpenMPT/mptrack/Mptrack.cpp 2010-01-10 17:21:21 UTC (rev 462) @@ -227,24 +227,29 @@ static void ShowChangesDialog() //----------------------------- { - /* - const char* const firstOpenMessage = "OpenMPT development build " MPT_VERSION_STR ".\n\n" - "Some notable changes since version 1.17.02.48:\n\n" - " [New] Name filter in plugin selection dialog.\n" - " [New] Behavior of vxx command when used with plugin instruments can now be configured in instrument tab.\n" - " [New] MIDI controllers can be used to control plugin parameters(View->MIDI mapping).\n" - " [New] Possibility to use more Impulse Tracker compatible playback with IT-files. Is used\n " - " automatically if loaded IT-file doesn't seem to be Modplug made.\n" - " [New/Fix] A couple of new sample editing functions and various modifications/fixes in sample tab.\n" - " [Mod] mptm files made with this version will be recognized as IT in 1.17.02.48.\n" - " [Mod] Automatic update check on startup is no longer available.\n" - " [Fix] Copy/Paste in pattern was partly broken when working with MOD format.\n" - " [Fix] Fixed wrong version in IT files saved with compatibility export.\n" + const char* const firstOpenMessage = "OpenMPT build " MPT_VERSION_STR ".\n\n" + "Some changes since version 1.17.02.54:\n\n" + " [New] Pattern tab: New paste modes: overflow, push forward and flood.\n" + " [Mod] Pattern tab: Keyboard split is now accessible from keyshortcut or menu.\n" + " [Imp] Pattern tab: Numerous improvements including better effect descriptions in note properties.\n" + " [New] Sequence editor: Can now handle order selections including delete/copy/cut/paste functionality.\n" + " [New] Sequence editor: Can render selected patterns to wave directly from orderlist.\n" + " [New] Envelope editor: Numerous improvements including ability to insert and remove points easily.\n" + " [New] Sample tab: sample undo, sample draw, resize sample, DC offset removal, batch export, better loop...\n" + " ...point handling when deleting selections. Play sample from given position with Ctrl + left mouse button.\n" + " [New] MPTM: New parameter controls for controlling plug params from pattern.\n" + " [New] MPTM: Can have envelope points up to 240 and multiple sequences.\n" + " [New] MIDI mapping: Editing a plug param in its editor while holding shift key will now open MIDI mapping dialog.\n" + " [New] MIDI mapping: Can now record MIDI mapping changes to pattern.\n" + " [Imp] MOD/S3M/XM/IT: Numerous improvements to load, save and playback compatibility.\n" + " [New] Input: Can import RIFF AM, RIFF AMFF, J2B, PSM16, IMF, GDM and SCL files. Improved PSM import.\n" + " [New] Setup: New default directories: plugins and plugin presets, sharable colour schemes\n" + " [New] Cleanup: New option compo cleanup, rearrange samples is back, can merge sequences.\n" + " [Mod] Misc: Program settings are now by default stored in %APPDATA%\\OpenMPT\n" "\n" - " For more detailed list of changes, see history.txt."; + " and many more. See history.txt for more details."; CMainFrame::GetMainFrame()->MessageBox(firstOpenMessage, "OpenMPT " MPT_VERSION_STR, MB_ICONINFORMATION); - */ } @@ -1839,12 +1844,12 @@ const char* const pArrCredit = { "OpenMPT / Modplug Tracker|" - "Copyright \xA9 2004-2009 Contributors|" + "Copyright \xA9 2004-2010 Contributors|" "Copyright \xA9 1997-2003 Olivier Lapicque (ol...@mo...)|" "|" "Contributors:|" - "Ahti Lepp\xE4nen (2005-2009)|" - "Johannes Schultz (2008-2009)|" + "Ahti Lepp\xE4nen (2005-2010)|" + "Johannes Schultz (2008-2010)|" "Robin Fernandes (2004-2007)|" "Sergiy Pylypenko (2007)|" "Eric Chavanon (2004-2005)|" Modified: trunk/OpenMPT/mptrack/View_pat.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_pat.cpp 2010-01-10 14:50:33 UTC (rev 461) +++ trunk/OpenMPT/mptrack/View_pat.cpp 2010-01-10 17:21:21 UTC (rev 462) @@ -2214,10 +2214,10 @@ break; case PARAM_COLUMN: case EFFECT_COLUMN: - if(srcCmd.note == NOTE_PC || srcCmd.note == NOTE_PCS || destCmd.note == NOTE_PCS || destCmd.note == NOTE_PC) + if(srcCmd.IsPcNote() || destCmd.IsPcNote()) { doPCinterpolation = true; - PCnote = (srcCmd.note == NOTE_PC || srcCmd.note == NOTE_PCS) ? srcCmd.note : destCmd.note; + PCnote = (srcCmd.IsPcNote()) ? srcCmd.note : destCmd.note; vsrc = srcCmd.GetValueEffectCol(); vdest = destCmd.GetValueEffectCol(); PCparam = srcCmd.GetValueVolCol(); @@ -2263,9 +2263,9 @@ case EFFECT_COLUMN: if(doPCinterpolation) { // With PC/PCs notes, copy PCs note and plug index to all rows where - // effect interpolation is done, if no PC note is there. + // effect interpolation is done if no PC note with non-zero instrument is there. const uint16 val = static_cast<uint16>(vsrc + ((vdest - vsrc) * (int)i + verr) / distance); - if(pcmd->note != NOTE_PC && pcmd->note != NOTE_PCS) + if (pcmd->IsPcNote() == false || pcmd->instr == 0) { pcmd->note = PCnote; pcmd->instr = PCinst; Modified: trunk/OpenMPT/mptrack/mptrack.rc =================================================================== --- trunk/OpenMPT/mptrack/mptrack.rc 2010-01-10 14:50:33 UTC (rev 461) +++ trunk/OpenMPT/mptrack/mptrack.rc 2010-01-10 17:21:21 UTC (rev 462) @@ -231,8 +231,8 @@ COMBOBOX IDC_COMBO2,78,18,73,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "Change Player Options",IDC_PLAYEROPTIONS,18,36,81,14,BS_CENTER CONTROL "Channel mode (one file per channel)",IDC_CHECK4,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,54,168,8 - CONTROL "Normalize Output",IDC_CHECK5,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,66,73,10 - CONTROL "High quality resampling",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,102,66,84,10 + CONTROL "Normalize Output (experimental)",IDC_CHECK5,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,66,119,10 + CONTROL "High quality resampling",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,112,36,84,10 CONTROL "Slow render (for Kontakt+DFD)",IDC_GIVEPLUGSIDLETIME, "Button",BS_AUTOCHECKBOX | BS_LEFT | BS_MULTILINE | WS_TABSTOP,18,78,133,8 GROUPBOX "Limit",IDC_STATIC,6,102,192,90 @@ -2308,6 +2308,7 @@ IDS_TUNING_IMPORT_SCL_FAILURE "-Unable to import ""%1%2"": %3.\n" IDS_TUNING_IMPORT_UNRECOGNIZED_FILE "-Unable to import file ""%1%2"": unrecognized file.\n" + IDS_SOUNDTOUCH_LOADFAILURE "Unable to load OpenMPT_soundtouch_i16.dll." END #endif // English (U.S.) resources Modified: trunk/OpenMPT/mptrack/mptrack.vcproj =================================================================== --- trunk/OpenMPT/mptrack/mptrack.vcproj 2010-01-10 14:50:33 UTC (rev 461) +++ trunk/OpenMPT/mptrack/mptrack.vcproj 2010-01-10 17:21:21 UTC (rev 462) @@ -54,7 +54,7 @@ LinkIncremental="2" SuppressStartupBanner="TRUE" AdditionalLibraryDirectories="" - DelayLoadDLLs="OpenMPT_soundtouch.dll" + DelayLoadDLLs="OpenMPT_soundtouch_i16.dll" GenerateDebugInformation="TRUE" AssemblyDebug="1" ProgramDatabaseFile=".\Debug/mptrack.pdb" @@ -132,7 +132,7 @@ LinkIncremental="1" SuppressStartupBanner="TRUE" AdditionalLibraryDirectories="" - DelayLoadDLLs="OpenMPT_soundtouch.dll" + DelayLoadDLLs="OpenMPT_soundtouch_i16.dll" GenerateDebugInformation="TRUE" GenerateMapFile="FALSE" MapFileName=".\Release/mptrack.map" Modified: trunk/OpenMPT/mptrack/res/MPTRACK.RC2 =================================================================== --- trunk/OpenMPT/mptrack/res/MPTRACK.RC2 2010-01-10 14:50:33 UTC (rev 461) +++ trunk/OpenMPT/mptrack/res/MPTRACK.RC2 2010-01-10 17:21:21 UTC (rev 462) @@ -43,7 +43,7 @@ VALUE "FileDescription", "OpenMPT / ModPlug Tracker" VALUE "FileVersion", VER_FILEVERSION_STR VALUE "InternalName", "Modplug Tracker" - VALUE "LegalCopyright", "Copyright \xA91997-2003 Olivier Lapicque; \xA92004-2009 contributors." + VALUE "LegalCopyright", "Copyright \xA91997-2003 Olivier Lapicque; \xA92004-2010 contributors." VALUE "LegalTrademarks", "M.O.D.P.L.U.G" VALUE "OriginalFilename", "mptrack.exe" VALUE "PrivateBuild", "" Modified: trunk/OpenMPT/mptrack/resource.h =================================================================== --- trunk/OpenMPT/mptrack/resource.h 2010-01-10 14:50:33 UTC (rev 461) +++ trunk/OpenMPT/mptrack/resource.h 2010-01-10 17:21:21 UTC (rev 462) @@ -66,6 +66,7 @@ #define IDS_TUNING_IMPORT_UNKNOWN_TC_FAILURE 227 #define IDS_TUNING_IMPORT_SCL_FAILURE 228 #define IDS_TUNING_IMPORT_UNRECOGNIZED_FILE 229 +#define IDS_SOUNDTOUCH_LOADFAILURE 230 #define IDB_MAINBAR 300 #define IDB_IMAGELIST 301 #define IDB_PATTERNS 302 Modified: trunk/OpenMPT/packageTemplate/History.txt =================================================================== --- trunk/OpenMPT/packageTemplate/History.txt 2010-01-10 14:50:33 UTC (rev 461) +++ trunk/OpenMPT/packageTemplate/History.txt 2010-01-10 17:21:21 UTC (rev 462) @@ -3,12 +3,539 @@ .: bug fix +: new feature +^: Improvement -: known issue / regression /: change ?: other (tx XYZ): thanks to XYZ for telling us about the bug +-------------------- + +General tab + . <Jojo> Channel name input field was not limited properly. + +Sequence editor + + <re> Can now copy/cut/paste order selections. + ^ <Jojo> Using the keyboard manager for shortcuts. 0...9, + and - keys are now also configurable. + ^ <Jojo> Duplicate / Create new pattern shortcuts do also work now here. + ^ <Jojo> Show cut/copy/paste orders in context menu. + ^ <Jojo> Middle click can now also be used for queuing patterns. + . <Jojo> Show correct shortcuts in context menus + . <Jojo> Pasting orders now removes "+++" items if they are not supported by the current format. + . <Jojo> Fixed display error when selecting multiple orders, inserting them and clicking on another order (only first order of previous selection was un-highlighted). + +Pattern tab::Pattern editing + + <Jojo> New paste mode "push forward paste", which resembles the default paste behaviour of Impulse Tracker. Includes new shortcut. + + <Jojo> The "paste flood" command pastes the clipboard content again and again until it hits the bottom of the pattern (overflow paste will be disabled automatically if paste flood is used, for obvious reasons). + ^ <Jojo> When using the MPTM format, plugin param changes are written to the pattern as PC Notes. + ^ <Jojo> Assume that the clipboard pattern format is IT (instead of MOD) if no information about the format is available. + ^ <Jojo> Pattern c&p: convert pasted commands if necessary. + / <re> Pattern c&p: Mix paste shouldn't anymore trigger conversion on modcommands that weren't changed at all. Now, however, partial conversion will not be done so this still needs further fixing. + ^ <Jojo> If "record note off" is enabled and Note Off commands are not supported by the current format, try Note Cut and volume commands. + / <Jojo> It is impossible to enter something into the volume column in mod format now. + / <Jojo> When interpolating PC notes, the plugin number and note type won't get overriden if the note type is already PC or PCs. I find this more logical. + . <re> Pattern c&p: Mix paste should behave better with parameter control notes. + . <Jojo> PCNote handling was missing in OnClearSelection, so it was possible to delete the effect column only partly + . <Jojo> Amplify acted VERY weird when it was applied on an instrument that's not assigned to any sample. Should be a bit better now. + . <Jojo> Amplify doesn't use volume column in mod format anymore. + . <Jojo> When recording live from the keyboard, SDx shouldn't exceed the song speed anymore. + . <Jojo> Got rid of possible redundant undo points. + . <Jojo> Pattern c&p: invalid commands are not pasted anymore. + . <Jojo> PC Notes are now deleted properly (last column). + . <Jojo> Copying only the param column of PC notes overwrote the value column when pasting them. + . <Jojo> Entering Note Fade notes didn't work the "old style" way. + . <Jojo> PCNote handling was missing in OnClearSelection, so it was possible to delete the effect column only partly. + +Pattern tab::GUI + + <Jojo> Channel rename dialog in channel header context menu. + ^ <Jojo> Tidied up the upper panel. It fits perfectly on a 1024x768 screen with treeview enabled and also works on 800x600 with treeview disabled. With the new layout, about 8 more pattern rows can be seen. + / <Jojo> Due to this cleanup, the "split keyboard" feature has been removed from the interface. The split keyboard settings dialog can now be accessed by using a shortcut, which should be even faster than the old method. + ^ <re> If keyboard split is active, instrument drop list will show split instrument and split note. + ^ <Jojo> Grey out pattern name input field when in MOD/S3M mode. + ^ <Jojo> Added sequence selection edit control. + / <Jojo> Instead of hiding the sequence name control, just disable it (looks better). + . <Jojo> If the current pattern is the last possible pattern in the sequence, no "next pattern" is displayed. + +Pattern tab::Note properties + ^ <Jojo> Hopefully correct limitation and explanation of "Set * waveform" parameters... + ^ <Jojo> Better explanation of "Invert Loop" parameter. + +Pattern tab::Find/replace + ^ <Jojo> When using Find&Replace, "follow song" will be disabled, because it's pointless and unusable with "follow song" on. + . <Jojo> Search&Replace didn't create an undo point. + +Pattern tab::Misc + + <Jojo> New keyboard shortcut in pattern context: Duplicate pattern. + . <Jojo> When in sample mode, samples were never stopped when in new-style note off mode, which lead to sample jam when using long/looped samples. + +Sample tab + + <Jojo> Sample Undo. 100 steps per sample (independent), undo buffer is cut off at a tenth of physical memory (that would be 400 MB for a system with 4 GB of RAM). Cutoff size can be specified by setting UndoBufferSize (in Megabytes) in section [Sample Editor] <Jojo> of mptrack.ini. + ^ <Jojo> When creating a new sample using "resize", sample loop is activated automatically. + ^ <Jojo> When sample is 8-bit, it will automatically be converted to 16-bit when applying time stretching / pitch shifting. + ^ <Jojo> Can now enter insanely high values into sample frequency input field (as they are supported by Impulse Tracker), allow only 65536 Hz for S3M files. + / <Jojo> Removed time stretcher's / pitch shifter's preview function as it's unnecessary now. + . <Jojo> When going down close to 0 Hz in the sample editor, the sample freq wrapped around to the maximum value. + . <Jojo> Insert Silence: Loop points were not updated when adding silence at the beginning of the sample + . <Jojo> Pitch shift: Was slightly broken for 8-bit samples. + . <Jojo> Time Stretch / Pitch Shift button's caption was not updated properly. + +Instrument tab + . <Jojo> When playing an instrument and disabling its envelopes at the same time, they're stopped (prevents filter envelope from turning into a pitch envelope). + . <re> Sample map was broken when dealing with sample indexes greater than 255. + . <Jojo> Update plugin list properly when cleaning up plugins while being on the instrument tab (possibly also improves instrument tab behaviour when working with multiple windows). + +Instrument tab::Envelope editor + + <Jojo> Envelopes can be edited using keyboard. Various keyboard shortcuts have been added to move and edit envelope points. This uses a common "drag and drop" node with mouse editing, so a point can first be clicked and the be moved with f.e. cursor keys. + ^ <Jojo> When creating a new envelope, automatically enable it as well. + ^ <Jojo> Mark currently selected envelope node yellow for better visibility. + / <Jojo> Middle line is also shown for volume envelope. + . <Jojo> When pasting envelopes, the enabled and filter flags were lost. + +Comments tab + ^ <Jojo> If sample size is < 1 KB, amount of bytes is shown instead of "0 KB". + . <Jojo> The lower part of the tab was receiving update messages that were not even meaningful to this tab (f.e. speed changes), so it was updating quite often modules that have alternating speed... Only letting in important update messages now. + +Treeview + + <Jojo> Show sequences in song treeview. Sequences can be inserted, duplicated and deleted by right-clicking the sequence items. + + <Jojo> Clicking on a mod item (only filename node) switches to the corresponding window. + + <Jojo> Display playing samples / instruments (only those that are assigned to a sample). Can be enabled from setup screen. + + <Jojo> Muted samples and instruments are shown with a different icon. + ^ <Jojo> Can now dragondrop orders, even between sequences. + ^ <Jojo> Double-clicking order items and pattern items should work now. + ^ <Jojo> Show whole sequence (don't stop on first "---" item). + ^ <Jojo> Switching between sequences should be easier now. There's a context menu entry for it and double-clicking on an empty sequence will switch to it (as there are no orderlist item to click on). + ^ <Jojo> Different icons for effects / instruments + +VST / MIDI mapping + ^ <Jojo> VST Editor: When dealing with midi learn in vst editors (with Shift key), also accept child windows of the VST editor as valid window. This still doesn't fix the Shift+clicking sliders issue in Synth1, but might help with other plugins. + ^ <Jojo> Further improvement to param mapping so that the midi dialog really only pops up when the VST window has the focus. + ^ <Jojo> VST Selector: Different icons for effects / instruments. + . <Jojo> When moving around plugins, param control notes are now also updated. + . <re> MIDI mapping: Pattern record checkbox wasn't updated properly. + . <re> MIDI mapping: Shift key erroneously opened MIDI mapping dialog in some cases. + +Mod conversion + ^ <Jojo> When converting a song that has subsongs to MPTM format, the user is asked if those subsongs should be converted into multiple sequences. + ^ <Jojo> Better conversion of MOD/XM E4x / E7x command. + ^ <Jojo> Better conversion of note off commands when converting to .mod. + ^ <Jojo> Removing channel features (pan/vol) in formats where they're not supported. + ^ <Jojo> Insert pattern break commands when resizing patterns to 64 rows that were smaller. + ^ <Jojo> Changing between MOD and XM format limits CMD_SPEED/CMD_TEMPO properly now. + ^ <Jojo> Trim sequence if it's too long. + ^ <Jojo> Detect and fix patterns with Bxx effect properly when merging sequences. + ^ <Jojo> If possible, all MPTM sequences will be merged into the first sequence. + ^ <Jojo> Remove sample vibrato and sustain loops for MOD/S3M. + ^ <Jojo> When converting to .MOD, order list won't be too long anymore. + +Playback (see also format-specific changes below) + ^ <Jojo> Added some more standard playback frequencies (176KHz, 192KHz). + . <Jojo> When jumping around in a module, high offset value is also memorized. + +IT::Saving + . <Jojo> Original IT specs concerning max orders/patterns were wrong. IT can handle up to 257 orders (as the last order is always ---, so it's actually 256 accessible orders), so the saving routines were also updated a bit. + . <Jojo> Save at least 2 order items. + . <Jojo> IT files with empty sample slots will now FINALLY save correctly in Impulse Tracker. + . <Jojo> Compatibility Export: Don't store "extended filter range" flag. + +IT::Loading + ^ <Jojo> Removed unnecessary / wrong pre-amp limits. + . <Jojo> IT files with global volume 0 are now loaded correctly. + . <Jojo> Use correct header size (1.xx or 2.xx header) for comparison when checking instrument headers. + +IT::Playback compatibility + . <Jojo> Reset NNA actions on every note (tentative fix). + . <Jojo> Fixes from SchismTracker: VolSwing, PanSwing, PPS. + . <Jojo> Out of range offset command with Old FX on. + +S3M + . <Jojo> ST3 compatibility: Only allow waveforms 0 to 3 for S3x / S4x / S5x. + . <Jojo> The S3M format actually knows muted channels. Added this to the S3M loader/saver and MuteChannel functions. + +XM::Loading + ^ <Jojo> Allow to load modules with an empty order list (as they are, in fact, valid XM files). + +XM::Playback compatibility + . <Jojo> A somewhat more compatible Rxy effect. Still needs more testing, as it's approximately the same algorithm as in Milky (which I know is not 100% correct). + . <Jojo> Almost perfect arpeggio emulation (only a few notes are still wrong). + . <Jojo> Rogue note delays. + . <Jojo> Perfect emulation of buggy Rxy behaviour. Thanks to Ian Luck for helping me with this. + . <Jojo> Slightly improved Rxy behaviour. + . <Jojo> Command X modplug extensions are now ignored in FT2 compat mode. + +MOD + ^ <Jojo> Mod Creation: Ensure that the order length fits the current mod specifications (this was problematic when creating .MOD files). + . <Jojo> Mod Creation: MOD Panning scheme is set up correctly now. + . <Jojo> MOD Loader: 8Chn Startrekker modules ("FLT8") are loaded correctly now. + +MOD::Playback compatibility + + <Jojo> Added song flag "PT 1.x Mode" (for .MOD files) that enabled on-the-fly sample swapping as ProTracker did it. + + <Jojo> Support for the EFx command (Invert Loop). One has to pay attention when working with this command as it effictively trashes samples. + ^ <Jojo> MOD Playback: if PT1.x playback flag is set, 8xx and E8x panning commands are now ignored. + ^ <Jojo> MOD Playing: Some more (minor) tweaks for Invert Loop. Thanks again, bubsy!. + . <Jojo> Further fixes to "Invert Loop" command (thanks, bubsy). + . <Jojo> Improvements to the "Invert Loop" effect (was only applied on rows with EFx). + +Module cleanup + + <Jojo> New cleanup feature: Merge sequences. + ^ <Jojo> Pattern Cleanup does now also work with multiple sequences. + ^ <Jojo> Improved cleanup dialog, with new options (remove all *, optimize samples). + +MP3/Wav export + + <Jojo> Wave Convert: Normalization is back as experimental feature. + + <Jojo> Wav/Mp3 export: Show estimated remaining time. + ^ <Jojo> Mp3 export: Removed 60 minutes limit. + . <Jojo> Mp3 export: use uint64 like in wav export (instead of uint32), to prevent wraparounds with very long modules like Skaven's "Beyond the Network". + . <Jojo> Wave Convert: The wave convert dialog had two default buttons, one of them (the "default default button") didn't make sense. + +Colour setup + + <Jojo> Channel separators can now have custom colors. + + <Jojo> Can now specify the blend colour for prev/next patterns. + / <Jojo> Changed FT2 and IT presets to resemble those two trackers as much as possible. + / <Jojo> Added VU Meter colours for the pattern colour presets. + / <Jojo> Changed the "Buzz" colour scheme a bit. + . <Jojo> When loading colour presets that have less colours are defined than required, the missing colours will be replaced by those from the "MPT" preset. + . <Jojo> When no INI file was present, channel separators were completely black. + +Keymaps + + <Jojo> Two new keymaps: French Laptop by Paul Legovitch, Norwegian MPT Classic by Rakib. + ^ <Jojo> When loading a keymap file and unrecognized lines are found, only one messagebox is shown. + / <Jojo> All keymaps have been updated to version 1 and updated to contain the orderlist shortcuts. + . <Jojo> Keymap files have a version number now (currently version 1). If keymap file doesn't have a version number (that's version 0), the orderlist keys will be added automatically so that orderlist remains usable in new builds. + +Tuning + + <re> Can import scl-files. Upper limit for note count is 64. + ^ <Jojo> Tuning dialog: Using the default tuning path as default path for Import/Export dialog + +Module format support + + <Jojo> Can now import RIFF AM and RIFF AMFF files, as well as J2B files, which are compressed AM(FF) files. Added zlib 1.2.3 for J2B support. + + <Jojo> Can now import PSM16 files. + . <Jojo> MED Loader: Possible error when loading orderlist. + . <Jojo> PSM16 Loader: It was possible to load corrupted modules with > MAX_BASECHANNELS channels (up to 0xFFFF). + . <Jojo> MDL Loader: Various fixes (taken from Schism Tracker). + . <Jojo> IMF Loader: Slightly wrong instrument loader (this for once didn't break anything, though). + . <Jojo> AMF Loader: Missing break command. + +Misc + ^ <Jojo> All Loaders: Using a new template, SpaceToNullStringFixed, which filters out all null chars in song/sample/instrument/etc. names. This avoids "empty" instrument names that occured in a couple of .IT files before. + ^ <Jojo> Mainframe: Extended paste mechanisms (mix, flood, push forward) have been moved into a sub menu. + ^ <Jojo> Mainframe: Improved accelerator keys in the edit menu. + ^ <Jojo> Added "split keyboard settings" dialog to the "edit" menu and updated the shortcuts there (goto was missing). + ^ <re> SoundTouch: Update to version 1.5.0. + / <Jojo> Store configuration and tuning files in %APPDATA% if possible. Can be disabled by adding UseAppDataDirectory=0 to [Paths] in mptrack.ini. + / <Jojo> Mod Creation: When clicking on the "new" button, the newly created module will be of the same type as the currently active document. Should probably be an option. + / <Jojo> Made Graph and Pattern Randomizer shortcuts invisible. + / <Jojo> Compatibility Export: Use module working directory in "save as" dialog. + / <Jojo> Using MS Shell Dlg font instead of MS Sans Serif in resource file. + / <re> Changed some "modplug tracker" strings to "OpenMPT". + . <Jojo> When using a Load/Save dialog, MPT's key handler will be disabled so that common shortcuts like F2, Ctrl+C, Ctrl+V, Esc. etc. can still be used. + . <Jojo> Mod Loaders: Very short sample sustain loops are now also accepted (similar fix to normal loop points). + . <Jojo> Mod Creation: Filling the whole mod title field with null bytes on creation to avoid funky characters in other programs. + . <Jojo> When moving program files to %APPDATA%, take care of the keyboard settings path in the INI file. + . <Jojo> Increased "filename" string in instrument header field to 32, since CHAR[12] is not really enough for 12 letters... + . <re> Autosave: 'Modified since last autosave'-flag wasn't updated when document was set modified using ThreadSafeSetModified. + . <re> Fixes to handling of 32 chars long instrument name. + + +v1.17.03.02 (test build) (September 2009, revision 371) +------------------------------------------------------- + +General tab + ^ <Jojo> "Modtype" dialog will revert mod flags to previous values if user presses the Cancel button. + ^ <Jojo> Modtype Dialog: Added suffixes IT and S3M to some mod flags for more clarity. + . <Jojo> VSTi / Sample volume sliders only go up to 255 instead of 256. + . <Jojo> Document will now be set modified when moving or inserting plugins. + +Sequence editor + + <Jojo> Multiple orders can be selected in the pattern sequence. At the moment, it is possible to insert, delete, duplicate and dragondrop multiple orders. + + <Jojo> Added context menu item "Render to wave", to render one or more patterns to wave. + +Pattern tab + + <Jojo> Paste will now optionally continue on next pattern (overflow paste). + + <re> Channel reset(stops note, sets initial chn settings). Available from channel header context menu and new key binding. + + <Jojo> When shift-clicking somewhere, a selection will be drawn from the previous cursor position to the new position. + ^ <Jojo> Showing descriptions of "special" notes in the statusbar, like it's done for effects. + ^ <Jojo> Shrinking patterns is now also possible with patterns < 32 rows. + ^ <Jojo> Solo/Unmute context menu has a bit more dynamical transition menu points (experimental). + ^ <re> Added some checks to prevent entering notes which are not supported by the module type. + / <Jojo> Entering note with row spacing enabled can now move cursor to next pattern if continuous scroll is enabled. + . <Jojo> Inserting a new pattern won't resize it to 32 rows anymore if the current pattern has less than 32 rows. + . <Jojo> Show "offset" and "velocity" volume commands in default color instead of "pitch" color. + . <Jojo> Weird combination of context menu shortcut and "always center active row" being disabled (http://lpchip.com/modplug/viewtopic.php?t=3203). + . <Jojo> Keyboard split note was off by one. + . <Jojo> Set max. row spacing / skipping value to 64, visibly clamp values > 64 to 64 in the edit box. + +Pattern tab::Note properties + ^ <Jojo> Added description to high offset command in note properties dialog. + ^ <Jojo> 8-Bit Panning slider also has the "Surround" state in S3M format now. + ^ <Jojo> Proper display of Pxy effect in the note editor window. + ^ <Jojo> Explanation for Tremor effect. + ^ <Jojo> Completed descriptions for extended MOD/XM, fixed display of several effects. + ^ <Jojo> Added description for S1x - Glissando Control. + . <Jojo> When double-clicking on a note in the pattern editor, the noteMin offset was not taken into consideration, which lead to wrong information for some formats. + +Pattern tab::Find/replace + ^ <Jojo> Don't reset "replace all" flag after every search. + / <Jojo> "Search in whole song" and "Replace all" are now enabled by default. + . <Jojo> Works now also with high instrument numbers. Also, empty instrument numbers won't be affected by "ins+1" anymore. + . <Jojo> Notes that cannot be used in the given format are not shown in the dropdown combo. + . <Jojo> Made comboboxes more convenient to use. + +Pattern tab::Macro config + ^ <Jojo> Also show the current preset for Zxx config (Z80 - ZFF). + . <Jojo> "Show All" FX display starts at 1 instead of 0, like all other FX enumerations. + +Sample tab + + <coda> Sample drawing. + + <coda> Add silence to sample. + + <Jojo> Can now play sample from given position with Ctrl + left mouse button. + + <Jojo> DC offset removal. + + <Jojo> Batch export samples (shift + click on "save sample" icon). + + <Jojo> Added setting "FinetuneStep" to INI section "Sample Editor". + ^ <Jojo> It is now possible to resize samples to a given sample size. You can do this using the already existing "add silence" dialog. + ^ <Jojo> Better loop point handling when deleting sample selections. + . <Jojo> Limit sample vibrato fields properly. Vibrato Sweep ranges from 0 to 255 now. + . <Jojo> Remove special chars from sample filenames so the "save as" dialog will show up on OSs < Vista. + . <Jojo> When using the spin control, frequency is not clamped to [2000, 96000] anymore. + . <Jojo> Removed tuning from up/downsampling for MOD files which detuned them when saving. + . <Jojo> Global volume is now also being adjusted for stereo and 16-Bit samples. + . <Jojo> Transpose is now disabled when using MOD format. + +Instrument tab + + <Jojo> Envelope points can now be added by shift-clicking somewhere in the envelope editor. Middle mouse button click removes the nearest point. + ^ <Jojo> Sample map shows tuning-specific notename on context menu. + ^ <Jojo> Added "Map all notes to <note name>" to instrument mapping context menu. + / <Jojo> Also show values from 0 to 64 for filter envelope (instead of -32 to 32). + . <Jojo> Pitch/Pan input field allows negative values. + . <Jojo> Proper limits for IT/XM fadeout values. + . <Jojo> Playing correct note in the instrument mapping control (notable difference when editing the scale from bottom to top). + . <Jojo> No relative values are shown for envelopes with no release node (status bar). + . <Jojo> Remove special chars from sample filenames so the "save as" dialog will show up on OSs < Vista. + . <Jojo> Fixed crash in instrument view that occured if RowsPerBeat was 0. + . <re> Fix to crash that occurred when multiple windows had instrument tab of the same document open. + +Comments tab + ^ <Jojo> Default view mode is instruments instead of samples for XM files. + ^ <Jojo> Instrument / Sample list: Double click will switch to instrument / sample. + +Treeview + . <Jojo> Playing sounds from a soundfont was broken. + . <Jojo> Deleting patterns from a module will also reset their names. + +VST / MIDI mapping + + <re> Editing a plug param in its editor while holding shift key will now open MIDI mapping dialog. + + <re> Can now record MIDI mapping changes to pattern. + / <re> Changed host IDs and a couple of related return values. If compatibility problems occur, old IDs can be set with ini-settings. + . <Jojo> Some minor tweaks and fixes to the MIDI mapping dialog. + +Mod conversion + ^ <Jojo> Convert E9x to Q8x as Q0x actually means "continue" and note "no change" for the volume change. + ^ <Jojo> Even better conversion of various pattern effects, including 8-Bit Panning, Arpeggio (XM swaps the two parameters) including Surround, Note Cut/Off/Fade conversion, MOD retrigger, XM->IT volume column limitations, illegal notes). + ^ <Jojo> Proper conversion of Pxy effect. + ^ <Jojo> Full volume column conversion, resetting default global volume / tempo / speed for MOD files. + ^ <Jojo> \xx is converted to Zxx when converting to / saving S3M files or "compatible" IT files. + ^ <Jojo> Somewhat decent conversion of Kxx (Key Off) from XM to S3M/IT. + ^ <Jojo> Trim instrument envelopes if they're too long for the new format. + ^ <Jojo> Convert 500/600 commands properly from MOD to any format, Adjust sustain loops for XM files, removed XM arpeggio conversion (it might be unwanted). + ^ <Jojo> Try to use fix commands that don't have cache (00 value) in XM (Arpeggio) and MOD format (Arpeggio and a few others) by using the previous value. + . <Jojo> Proper conversion between IT 8-Bit panning effect and S3M 7-Bit panning effect with surround. + . <Jojo> Unset release nodes were corrupted when converting modules. + +Playback (see also format-specific changes below) + ^ <Jojo> Mixing: It's now possible to go down to 1ms latency (works with ASIO). + ^ <Jojo> If restart position is 0 and a subtune is played (i.e. a tune separated with a "---" pattern), OpenMPT will now try to jump back to the first order of this subtune instead. + ^ <Jojo> Added option to not reset all channels and variables when looping a module. + . <Jojo> 4-Bit panning didn't disable surround sound (fixed in compatibility mode in IT/MPTM/XM). + . <Jojo> Process pattern break commands on last pattern properly. + +MPTM + + <re> New experimental parameter controls for controlling plug params. + + <re> Can now have multiple sequences in a module (access from orderlist context menu). + + <Jojo> Allow up to 240 envelope points. + + <Jojo> IT "Note Fade" command: This existed in IT's player routines already, but there was no way to actually use it in the editor. Triggering an invalid note would cause a note fade, so this is a new note type. + + <re> Channel settings(vol&pan) for channels after 64 will now be saved in the file. + +IT + + <Jojo> IT "Note Fade" command: This existed in IT's player routines already, but there was no way to actually use it in the editor. Triggering an invalid note would cause a note fade, so this is a new note type. + + <re> Channel settings(vol&pan) for channels after 64 will now be saved in the file. + +IT::Saving + ^ <Jojo> Compatibility Export: Save with custom "tracker version" header field (same as for S3M). + ^ <Jojo> Compatibility Export: Removed stereo sample support. + ^ <Jojo> Use row highlighting places in IT header. + . <Jojo> Compatibility Export: Ignore new MPT effects. + . <Jojo> Compatibility Export: doesn't screw up patterns anymore if the module has more than 64 channels. + . <Jojo> Compatibility Export: Changes various version numbers and settings in compatibility export to better match Impulse Tracker made IT files. + . <Jojo> Limit fadeout values properly. + +IT::Loading + ^ <Jojo> Can now load IT files with very small patterns (< 4 rows). + ^ <Jojo> Setting the "last saved with" version to 1.16 (instead of "created with") if module seems to be made with the old MPT. + ^ <Jojo> Reading our custom tracker version now as well. + ^ <Jojo> Detect more version of MPT that did stupid things. + ^ <Jojo> Row highlighting in IT header is now recognized. + . <Jojo> Unset release env nodes for IT files made with IT 1.x, fix fadeout values. + . <Jojo> Don't set "made with modplug" flag for IT files that were made with compatibility export. + . <Jojo> Proper adjustment of sample pre-amp. + . <Jojo> It is now possible to load IT files that have no samples. + . <Jojo> 31 BPM is an allowed default tempo. Tentative fix: Clamp to 32 (instead of 125). + . <Jojo> OpenMPT was loading the volume column command hx (vibrato depth) as ux (vibrato speed) and also saving it like this. In the pattern editor, ux was allowed, hx was not but it should be the other way around. Now, hx is always used but ux is still loaded correctly for old modules made with MPT/OpenMPT. + +IT::Playback compatibility + ^ <Jojo> More improvements to Vibrato, Tremolo and Panbrello. Using the tables from IT_TECH.TXT. + ^ <Jojo> Improved IT compatible retrigger (didn't work if the retrigger didn't start together with a new note). + . <Jojo> Better sample vibrato compatibility. Vibrato Sweep isn't perfect yet, though. + . <Jojo> Special case of Retrigger + Envelopes. + . <Jojo> Offset beyond sample range. + . <Jojo> Removed a "fix" again that was causing to completely destroy panbrello. + . <Jojo> Don't reset channel panning if panbrello ends (experimental). + . <Jojo> Don't reset Tremolo on new note, don't ignore tremolo if note volume is 0. + . <Jojo> Fixed Tremolo, Vibrato and Panbrello tables. + . <Jojo> Ignore S [345]x with x > 3. + . <Jojo> Multisample instruments change with no entry in the instrument column (fixes spx-shuttledeparture.it) (test me). + . <Jojo> Tremor also works properly with "old effects" on. + . <Jojo> Fixed retrigger for Qxx when not being triggered together with a note. + . <Jojo> Pattern loop count won't be reset on pattern transition (fixes gm-trippy01.it). + . <Jojo> Tempo slides won't exceed 255 BPM in compatible mode. + . <Jojo> Allow OpenMPT's new volume colum commands (offset etc.) to be used together with Retrigger in compatible mode again. + . <Jojo> Random waveforms (vibrato, tremolo, panbrello) (test #19). + . <Jojo> Fixed handling of very short pitch / filter envelopes (test #24). + . <Jojo> Panning fx (Xxx, S8x, pxx) override pan swing (test #20). + . <Jojo> Improved retrigger compatibility even more (#15) + . <Jojo> SD0 / SC0 is now interpreted as SD1 / SC1 in compatibility mode (test #22). + . <Jojo> Portamento up / down resets the destination of tone portamento (test #23). + . <Jojo> Tremor: Sounds like in IT when compatible playback mode is turned on. + . <Jojo> Out of range global volume, local global volume slides. + . <Jojo> Retrigger effect behaved slightly wrong. + +S3M::Saving + ^ <Jojo> Orderlist is now as small as possible (multiple of 2 instead of multiple of 16); Using ST3's default UltraClick value. + ^ <Jojo> Using an own version number in the header now, just like all the other trackers. + ^ <Jojo> Don't write unnecessary invalid order items in the order table. + . <Jojo> Set the stereo flag. + . <Jojo> Ignore new MPT effects. + . <Jojo> Patterns are now saved correctly. Previously, the last few rows might have come up as garbage in ST3, especially (only?) when they were empty. + . <Jojo> Clamp sample pre-amp to [32;127] instead of just taking the lower 7 bits. (Default pre-amp value as 128, which resulted in pre-amp 0 when saving). + +S3M::Loading + ^ <Jojo> Recognize OpenMPT version in S3M header. + . <Jojo> Limit min sample preamp value to 0x10. + . <Jojo> Small modifications to pattern loader to load somewhat broken S3M files. + . <Jojo> Don't reset global volume to max if it is min for "new" modules. + . <Jojo> Smarter Zxx conversion. + . <Jojo> Disable loop for files with very short loop at the beginning of the sample. + . <Jojo> Samples with very short loops (2 bytes) will now load correctly. This fixes for example 94hitmix.s3m and spectral.s3m. + . <Jojo> Short loops in S3M samples are now recognized. + +S3M::Misc + . <Jojo> Module Creation / Loading: Sane default volume settings for MOD / S3M files again(128 global volume, 48 sample volume) + . <Jojo> S3M compatibility: Notes with SD0 are now ignored, SC0 is completely ignored + +XM + + <Jojo> Compatibility Export. + + <Jojo> Compatibility play-mode. + +XM::Loading + + <Jojo> Detects compatibility mode automatically when loading XM-file. + ^ <Jojo> Detect non-mpt modules more reliably. + ^ <Jojo> Advanced "made with MPT" detection. + ^ <Jojo> Detect a very old MPT version. + ^ <Jojo> Make XMs with strange pattern header sizes load correctly (removed some code that was there to make really, really broken XMs load - would this work at all?). + ^ <Jojo> Setting the "last saved with" version to 1.16 (instead of "created with") if module seems to be made with the old MPT. + ^ <Jojo> Less hacky implementation of the instrument loader. Still works correctly with "normal" XM modules and BoobieSqueezed XMs. + . <Jojo> Various changes to make XMs that have been compressed with BoobieSqueezer load correctly. Should not break anything, but I call it "experimental". + . <Jojo> Can now load XM Version 1.02 and 1.03. + . <Jojo> More intelligent conversion of Speed / Tempo commands. + . <Jojo> Don't ignore last pattern if XM has no instruments. + +XM::Saving + ^ <Jojo> Compatibility export: Export cuts off channels > 32. + ^ <Jojo> Setting "Open ModPlug Tracker" in the "made with" field (as any other tracker put their signature in here as well). + ^ <Jojo> Include version number in "made with" string. + ^ <Jojo> When channel count is odd, the empty channel is now always the last one. + . <Jojo> Always save with a channel number that's a multiple of two so FT2 will load the file correctly. + . <Jojo> F20 won't turn into G20. + . <Jojo> Limit fadeout values properly. + . <Jojo> More intelligent conversion of Speed / Tempo commands. + +XM::Playback compatibility + . <Jojo> Portamento + New Note with no previous note (tentative fix), Offset beyond sample range. + . <Jojo> Compatible Arpeggio was done wrong. + . <Jojo> More compatible "Note Off + Something". + . <Jojo> Note Off with instrument number causes fadeout for samples that have no envelope. + . <Jojo> Volume command Ux should not enable Vibrato at all, it only sets the vibrato speed. + . <Jojo> Pxy effect was too deep. + . <Jojo> Using MilkyTracker's arpeggio logic for better XM arpeggio compatibility - still not perfect! + . <Jojo> Tempo slides won't exceed 255 BPM in compatible mode. + . <Jojo> In compatible mode, old retrigger routines are used again (as MPT's default retrigger algorithm actually represents FT2's retrigger algorithm). Additionally, a retrigger bug from FT2 is emulated (retrigger with vxx on the same channel would always reset the retriggered note's volume). + . <Jojo> More compatible handling of Kxx effect. + . <Jojo> Pattern loops are now handeled correctly in XM (using compatibility switch) and MOD files. + . <Jojo> Out of range global volume, local global volume slides. + . <Jojo> Arpeggio was played wrong (0xy should play base note - y - x, not base note - x - y). + +MOD + ^ <Jojo> Module Creation: MOD files have 4 channels by default. + ^ <Jojo> Moved loop length check from compatibility export to normal save, as it does not break/change any MPT-made MOD file. + . <Jojo> Module Creation / Loading: Sane default volume settings for MOD / S3M files again(128 global volume, 48 sample volume). + . <Jojo> Inserting more than 128 orders in MOD format is not possible anymore. + +MOD::Loading + . <Jojo> More intelligent conversion of Speed / Tempo commands. + . <Jojo> Last pattern was not loading in .MODs that have no samples. + +MOD::Saving + . <Jojo> The compatibility export was only working properly for 8-bit mono samples. Everything else is going to be downsampled later, so the sample "fixing" has to be done before. + . <Jojo> More intelligent conversion of Speed / Tempo commands. + . <Jojo> F20 won't turn into G20. + +MOD::Playback compatibility + . <Jojo> 8-Bit Panning is not 7-Bit panning (using 800...8FF instead of 800...880 - fixes f.e. DOPE.MOD). + . <Jojo> Pattern loops are now handeled correctly in XM (using compatibility switch) and MOD files. + +Setup + + <Jojo> New default directories: plugins and plugin presets. + + <Jojo> Option reset ramping and resampling to default values. + + <Jojo> Shareable color schemes (via config dialog). + ^ <Jojo> Added note to "always center active row" hint that this is required to be enabled for greyed out patterns. + ^ <Jojo> Slight redesign of the WAV / MP3 export dialogs. + / <Jojo> Changes to default general options configuration. + +Module format support + + <Jojo> Can now import IMF (Imago Orpheus) modules. + + <Jojo> Can now import GDM files. + . <Jojo> A brand new PSM loader! Ditched the old and buggy loader as the new loader works way better, it can even handle modules from Extreme Pinball. + . <Jojo> 669 Loader: Small modification so corehop.669 can be loaded; Note: Loader is still buggy like hell + +Misc + + <Jojo> Compo cleanup. + + <Jojo> Rearrange samples is back! And this time, it's even fully functional!. + ^ <Jojo> XI Saver: Fill out the "created with" field properly (OpenMPT instead of FastTracker 2). + ^ <Jojo> Write ID3v2.4 instead of ID3v1 tags. Includes various changes to length limits, genre limitations and what's written in the tags. + ^ <Jojo> Mod Specs: Decreased minimum pattern size for XM and IT format to 1 row. Experimental, but should not break anything (needs more testing). + ^ <Jojo> Mod Specs: It is now possible to have modules with 1-3 channels, as this only seems to cause trouble with MOD files (so they still have 4 channels minimum of course). + ^ <Jojo> Autosave: If a module has not been changed since the last autosave, it will not be autosaved. + ^ <Jojo> Module loader: If plugins are missing, a single MessageBox is shown. + ^ <kode54> LHA Decoder: Several fixes (patch by kode54). + / <re> Default keybings are now included in the executable -> default keybindings are available even without external keybinding file. + . <Jojo> Menus: Added the correct shortcut keys again and replaced the last(?) remaining "Midi" labels by "MIDI". + . <Jojo> Wav Export / Channel Manager / Pattern Editor: Pattern names with leading space char are now accepted. + . <Jojo> General tab / Main bar / Loaders / Conversion: Fixed arbitrary speed limits (64 on general tab, 127 on main bar). + . <Jojo> Keyboard manager: Octave offset for key descriptions is now C, not A. + . <Jojo> Patterns: Reset pattern name when deleting pattern. + +Internal + ? There are now project files for Visual Studio 2008. + ? Notable refactoring including renaming of MODINSTRUMENT to MODSAMPLE and INSTRUMENTHEADER to MODINSTRUMENT. + + +v1.17.02.54 (June 2009, revision 274) +------------------------------------- + + . <re> Pattern tab: It's now possible to use the old note fade behaviour when playing notes (see setup->general). (rev. 267) + . <re> Pattern tab: Fixed wrong interpretations of "Old style pattern context menu"-option. (rev. 267) + . <re> Misc: Some internal fixes. (rev. 267) + + v1.17.02.53 (May 2009, revision 259) ------------------------------------ Modified: trunk/OpenMPT/soundlib/modsmp_ctrl.cpp =================================================================== --- trunk/OpenMPT/soundlib/modsmp_ctrl.cpp 2010-01-10 14:50:33 UTC (rev 461) +++ trunk/OpenMPT/soundlib/modsmp_ctrl.cpp 2010-01-10 17:21:21 UTC (rev 462) @@ -496,10 +496,12 @@ if (Chn[i].pSample == pOldSample) { Chn[i].pSample = pNewSample; - Chn[i].pCurrentSample = pNewSample; + if (Chn[i].pCurrentSample != nullptr) + Chn[i].pCurrentSample = pNewSample; if (Chn[i].nPos > nNewLength) Chn[i].nPos = 0; - Chn[i].nLength = nNewLength; + if (Chn[i].nLength > 0) + Chn[i].nLength = nNewLength; Chn[i].dwFlags |= orFlags; Chn[i].dwFlags &= andFlags; } Modified: trunk/OpenMPT/soundtouch/FIFOSamplePipe.h =================================================================== --- trunk/OpenMPT/soundtouch/FIFOSamplePipe.h 2010-01-10 14:50:33 UTC (rev 461) +++ trunk/OpenMPT/soundtouch/FIFOSamplePipe.h 2010-01-10 17:21:21 UTC (rev 462) @@ -1,12 +1,3 @@ -/*********************************************** - * - * ------------- NOTE ------------- - * - * This file is modified version of the original SoundTouch file. - * Search for "OpenMPT_change" to see the modifications. - * -*/ - //////////////////////////////////////////////////////////////////////////////// /// /// 'FIFOSamplePipe' : An abstract base class for classes that manipulate sound @@ -26,7 +17,11 @@ /// //////////////////////////////////////////////////////////////////////////////// // +// Last changed : $Date: 2009-04-13 16:18:48 +0300 (Mon, 13 Apr 2009) $ +// File revision : $Revision: 4 $ // +// $Id: FIFOSamplePipe.h 69 2009-04-13 13:18:48Z oparviai $ +// //////////////////////////////////////////////////////////////////////////////// // // License : @@ -61,8 +56,7 @@ { /// Abstract base class for FIFO (first-in-first-out) sample processing classes. -// OpenMPT_change: Added SOUNDTOUCH_DLLEXPORT. -class SOUNDTOUCH_DLLEXPORT FIFOSamplePipe +class FIFOSamplePipe { public: // virtual default destructor @@ -132,8 +126,7 @@ /// When samples are input to this class, they're first processed and then put to /// the FIFO pipe that's defined as output of this class. This output pipe can be /// either other processing stage or a FIFO sample buffer. -// OpenMPT_change: Added SOUNDTOUCH_DLLEXPORT. -class SOUNDTOUCH_DLLEXPORT FIFOProcessor :public FIFOSamplePipe +class FIFOProcessor :public FIFOSamplePipe { protected: /// Internal pipe where processed samples are put. Modified: trunk/OpenMPT/soundtouch/STTypes.h =================================================================== --- trunk/OpenMPT/soundtouch/STTypes.h 2010-01-10 14:50:33 UTC (rev 461) +++ trunk/OpenMPT/soundtouch/STTypes.h 2010-01-10 17:21:21 UTC (rev 462) @@ -1,12 +1,3 @@ -/*********************************************** - * - * ------------- NOTE ------------- - * - * This file is modified version of the original SoundTouch file. - * Search for "OpenMPT_change" to see the modifications. - * -*/ - //////////////////////////////////////////////////////////////////////////////// /// /// Common type definitions for SoundTouch audio processing library. @@ -17,6 +8,11 @@ /// //////////////////////////////////////////////////////////////////////////////// // +// Last changed : $Date: 2009-05-17 14:30:57 +0300 (Sun, 17 May 2009) $ +// File revision : $Revision: 3 $ +// +// $Id: STTypes.h 70 2009-05-17 11:30:57Z oparviai $ +// //////////////////////////////////////////////////////////////////////////////// // // License : @@ -46,16 +42,6 @@ typedef unsigned int uint; typedef unsigned long ulong; -// OpenMPT_change-->: Added SOUNDTOUCH_DLLEXPORT definition, Defined INTEGER_SAMPLES definition. -#ifdef SOUNDTOUCH_EXPORTS - #define SOUNDTOUCH_DLLEXPORT __declspec(dllexport) -#else - #define SOUNDTOUCH_DLLEXPORT __declspec(dllimport) -#endif - -#define INTEGER_SAMPLES 1 -// <-- OpenMPT_change - #ifdef __GNUC__ // In GCC, include soundtouch_config.h made by config scritps #include "soundtouch_config.h" Modified: trunk/OpenMPT/soundtouch/SoundTouch.h =================================================================== --- trunk/OpenMPT/soundtouch/SoundTouch.h 2010-01-10 14:50:33 UTC (rev 461) +++ trunk/OpenMPT/soundtouch/SoundTouch.h 2010-01-... [truncated message content] |
From: <sag...@us...> - 2010-01-10 21:54:51
|
Revision: 464 http://modplug.svn.sourceforge.net/modplug/?rev=464&view=rev Author: saga-games Date: 2010-01-10 21:54:41 +0000 (Sun, 10 Jan 2010) Log Message: ----------- [Fix] Sample editor: Using "resize sample" created an invalid undo point which could lead to broken samples and even crashes. [Mod] Updated the "what's new" dialog a bit (removed leading spaces, as they look ugly in Vista/Win7 messageboxes anyway (those have a slightly different format, so every line was too long)) [Mod] Changed history... (Ok, I just changed history.txt) Modified Paths: -------------- trunk/OpenMPT/mptrack/Mptrack.cpp trunk/OpenMPT/mptrack/View_smp.cpp trunk/OpenMPT/packageTemplate/History.txt Modified: trunk/OpenMPT/mptrack/Mptrack.cpp =================================================================== --- trunk/OpenMPT/mptrack/Mptrack.cpp 2010-01-10 18:21:30 UTC (rev 463) +++ trunk/OpenMPT/mptrack/Mptrack.cpp 2010-01-10 21:54:41 UTC (rev 464) @@ -228,26 +228,25 @@ //----------------------------- { const char* const firstOpenMessage = "OpenMPT build " MPT_VERSION_STR ".\n\n" - "Some changes since version 1.17.02.54:\n\n" - " [New] Pattern tab: New paste modes: overflow, push forward and flood.\n" - " [Mod] Pattern tab: Keyboard split is now accessible from keyshortcut or menu.\n" - " [Imp] Pattern tab: Numerous improvements including better effect descriptions in note properties.\n" - " [New] Sequence editor: Can now handle order selections including delete/copy/cut/paste functionality.\n" - " [New] Sequence editor: Can render selected patterns to wave directly from orderlist.\n" - " [New] Envelope editor: Numerous improvements including ability to insert and remove points easily.\n" - " [New] Sample tab: sample undo, sample draw, resize sample, DC offset removal, batch export, better loop...\n" - " ...point handling when deleting selections. Play sample from given position with Ctrl + left mouse button.\n" - " [New] MPTM: New parameter controls for controlling plug params from pattern.\n" - " [New] MPTM: Can have envelope points up to 240 and multiple sequences.\n" - " [New] MIDI mapping: Editing a plug param in its editor while holding shift key will now open MIDI mapping dialog.\n" - " [New] MIDI mapping: Can now record MIDI mapping changes to pattern.\n" - " [Imp] MOD/S3M/XM/IT: Numerous improvements to load, save and playback compatibility.\n" - " [New] Input: Can import RIFF AM, RIFF AMFF, J2B, PSM16, IMF, GDM and SCL files. Improved PSM import.\n" - " [New] Setup: New default directories: plugins and plugin presets, sharable colour schemes\n" - " [New] Cleanup: New option compo cleanup, rearrange samples is back, can merge sequences.\n" - " [Mod] Misc: Program settings are now by default stored in %APPDATA%\\OpenMPT\n" - "\n" - " and many more. See history.txt for more details."; + "Some changes since version 1.17.02.54:\n\n" + "[New] Pattern tab: New paste modes: overflow, push forward and flood.\n" + "[Mod] Pattern tab: Keyboard split is now accessible from key shortcut or menu.\n" + "[Imp] Pattern tab: Numerous improvements including better effect descriptions in note properties.\n" + "[New] Sequence editor: Can now handle order selections including delete/copy/cut/paste functionality.\n" + "[New] Sequence editor: Can render selected patterns to wave directly from orderlist.\n" + "[New] Envelope editor: Numerous improvements including ability to insert and remove points easily and editing envelopes with the keyboard.\n" + "[New] Sample tab: sample undo, sample draw, resize sample, DC offset removal, batch export, better loop point handling when deleting selections. Play sample from given position with Ctrl + left mouse button.\n" + "[New] MPTM: New parameter controls for controlling plug params from pattern.\n" + "[New] MPTM: Can have envelope points up to 240 and multiple sequences.\n" + "[New] MIDI mapping: Editing a plug param in its editor while holding shift key will now open MIDI mapping dialog.\n" + "[New] MIDI mapping: Can now record MIDI mapping changes to pattern.\n" + "[Imp] MOD/S3M/XM/IT: Numerous improvements to load, save and playback compatibility.\n" + "[New] Input: Can import J2B (RIFF AM / RIFF AMFF), PSM16, IMF, GDM and SCL files. Improved PSM import.\n" + "[New] Setup: New default directories: plugins and plugin presets, sharable colour schemes\n" + "[New] Cleanup: New option compo cleanup, rearrange samples is back, can merge sequences.\n" + "[Mod] Misc: Program settings are now by default stored in %APPDATA%\\OpenMPT\n" + "\n" + "and many more. See history.txt for more details."; CMainFrame::GetMainFrame()->MessageBox(firstOpenMessage, "OpenMPT " MPT_VERSION_STR, MB_ICONINFORMATION); } @@ -3279,7 +3278,7 @@ * - load: true: load dialog. false: save dialog. * - defaultExtension: dialog should use this as the default extension for the file(s) * - defaultFilename: dialog should use this as the default filename - * - extFilter: list of possible extensions. format: "description|extensions|description|extensions|..." + * - extFilter: list of possible extensions. format: "description|extensions|...|description|extensions||" * - workingDirectory: default directory of the dialog * - allowMultiSelect: allow the user to select multiple files? (will be ignored if load == false) * - filterIndex: pointer to a variable holding the index of the last extension filter used. Modified: trunk/OpenMPT/mptrack/View_smp.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_smp.cpp 2010-01-10 18:21:30 UTC (rev 463) +++ trunk/OpenMPT/mptrack/View_smp.cpp 2010-01-10 21:54:41 UTC (rev 464) @@ -2467,9 +2467,9 @@ // resize - dlg.m_nSamples = new size if(dlg.m_nSamples != pSmp->nLength) { - if(dlg.m_nSamples < pSmp->nLength) - pModDoc->GetSampleUndo()->PrepareUndo(m_nSample, sundo_delete, dlg.m_nSamples, pSmp->nLength - dlg.m_nSamples); - else + if(dlg.m_nSamples < pSmp->nLength) // make it shorter! + pModDoc->GetSampleUndo()->PrepareUndo(m_nSample, sundo_delete, dlg.m_nSamples, pSmp->nLength); + else // make it longer! pModDoc->GetSampleUndo()->PrepareUndo(m_nSample, sundo_insert, pSmp->nLength, dlg.m_nSamples); ctrlSmp::ResizeSample(pSndFile->Samples[m_nSample], dlg.m_nSamples, pSndFile); } Modified: trunk/OpenMPT/packageTemplate/History.txt =================================================================== --- trunk/OpenMPT/packageTemplate/History.txt 2010-01-10 18:21:30 UTC (rev 463) +++ trunk/OpenMPT/packageTemplate/History.txt 2010-01-10 21:54:41 UTC (rev 464) @@ -21,35 +21,34 @@ ^ <Jojo> Duplicate / Create new pattern shortcuts do also work here now. ^ <Jojo> Show cut/copy/paste orders in context menu. ^ <Jojo> Middle click can now also be used for queuing patterns. - . <Jojo> Show correct shortcuts in context menus . <Jojo> Pasting orders now removes "+++" items if they are not supported by the current format. . <Jojo> Fixed display error when selecting multiple orders, inserting them and clicking on another order (only first order of previous selection was un-highlighted). Pattern tab::Pattern editing + <Jojo> New paste mode "push forward paste", which resembles the default paste behaviour of Impulse Tracker. Includes new shortcut. + <Jojo> The "paste flood" command pastes the clipboard content again and again until it hits the bottom of the pattern (overflow paste will be disabled automatically if paste flood is used, for obvious reasons). - ^ <Jojo> When using the MPTM format, plugin param changes are written to the pattern as PC Notes. + ^ <Jojo> When using the MPTM format, plugin param changes are written to the pattern as PC Notes (instead of smooth midi macros). ^ <Jojo> Assume that the clipboard pattern format is IT (instead of MOD) if no information about the format is available. ^ <Jojo> Pattern c&p: convert pasted commands if necessary. / <re> Pattern c&p: Mix paste shouldn't anymore trigger conversion on modcommands that weren't changed at all. Now, however, partial conversion will not be done so this still needs further fixing. + . <Jojo> Pattern c&p: invalid commands are not pasted anymore. ^ <Jojo> If "record note off" is enabled and Note Off commands are not supported by the current format, try Note Cut and volume commands. - / <Jojo> It is impossible to enter something into the volume column in mod format now. - / <Jojo> When interpolating PC notes, the plugin number and note type won't get overriden if the note type is already PC or PCs. I find this more logical. + / <Jojo> It is impossible to enter something into the volume column in MOD format now. + / <Jojo> When interpolating PC notes, the plugin number and note type won't get overriden if the note type is already PC or PCs. . <re> Pattern c&p: Mix paste should behave better with parameter control notes. - . <Jojo> PCNote handling was missing in OnClearSelection, so it was possible to delete the effect column only partly + . <Jojo> PC note handling was missing in OnClearSelection, so it was possible to delete the "effect column" (parameter value) only partly . <Jojo> Amplify acted VERY weird when it was applied on an instrument that's not assigned to any sample. Should be a bit better now. - . <Jojo> Amplify doesn't use volume column in mod format anymore. + . <Jojo> Amplify doesn't use volume column in MOD format anymore. . <Jojo> When recording live from the keyboard, SDx shouldn't exceed the song speed anymore. . <Jojo> Got rid of possible redundant undo points. - . <Jojo> Pattern c&p: invalid commands are not pasted anymore. - . <Jojo> PC Notes are now deleted properly (last column). + . <Jojo> PC notes are now deleted properly (last column). . <Jojo> Copying only the param column of PC notes overwrote the value column when pasting them. . <Jojo> Entering Note Fade notes didn't work the "old style" way. - . <Jojo> PCNote handling was missing in OnClearSelection, so it was possible to delete the effect column only partly. + . <Jojo> PC note handling was missing in OnClearSelection, so it was possible to delete the effect column only partly. Pattern tab::GUI + <Jojo> Channel rename dialog in channel header context menu. - ^ <Jojo> Tidied up the upper panel. It fits perfectly on a 1024x768 screen with treeview enabled and also works on 800x600 with treeview disabled. With the new layout, about 8 more pattern rows can be seen. + ^ <Jojo> Tidied up the upper panel. It fits perfectly on a 1024x768 screen with treeview enabled and also works on 800x600 with treeview disabled. With the new layout, about 8 more pattern rows can be seen in comparison to the old, bloated 1.17.02.* interface. / <Jojo> Due to this cleanup, the "split keyboard" feature has been removed from the interface. The split keyboard settings dialog can now be accessed by using a shortcut, which should be even faster than the old method. ^ <re> If keyboard split is active, instrument drop list will show split instrument and split note. ^ <Jojo> Grey out pattern name input field when in MOD/S3M mode. @@ -77,7 +76,6 @@ / <Jojo> Removed time stretcher's / pitch shifter's preview function as it's unnecessary now. . <Jojo> When going down close to 0 Hz in the sample editor, the sample freq wrapped around to the maximum value. . <Jojo> Insert Silence: Loop points were not updated when adding silence at the beginning of the sample - . <Jojo> Time Stretch / Pitch Shift button's caption was not updated properly. Instrument tab . <Jojo> When playing an instrument and disabling its envelopes at the same time, the toggled envelopes are stopped (prevents filter envelope from turning into a pitch envelope). @@ -92,36 +90,35 @@ Comments tab ^ <Jojo> If sample size is < 1 KB, amount of bytes is shown instead of "0 KB". - . <Jojo> The lower part of the tab was receiving update messages that were not even meaningful to this tab (f.e. speed changes), so it was updating quite often modules that have alternating speed... Only letting in important update messages now. + . <Jojo> The lower part of the tab was receiving update messages that were not even meaningful to this tab (f.e. speed changes), so it was updating quite often modules that have alternating speed and the toolbar was "blinking"... Only letting in important update messages now. Treeview + <Jojo> Show sequences in song treeview. Sequences can be inserted, duplicated and deleted by right-clicking the sequence items. - + <Jojo> Clicking on a mod item (only filename node) switches to the corresponding window. + + <Jojo> Clicking on a mod item (i.e. a filename node) switches to the corresponding window. + <Jojo> Display playing samples / instruments (only those that are assigned to a sample) using green triangles. Can be enabled from setup screen. + <Jojo> Muted samples and instruments are shown with a different icon. ^ <Jojo> Can now dragondrop orders, even between sequences. ^ <Jojo> Double-clicking order items and pattern items should work now. ^ <Jojo> Show whole sequence (don't stop on first "---" item). ^ <Jojo> Switching between sequences should be easier now. There's a context menu entry for it and double-clicking on an empty sequence will switch to it (as there are no orderlist item to click on). - ^ <Jojo> Different icons for effects / instruments + ^ <Jojo> Different icons for VST effects / instruments VST / MIDI mapping - ^ <Jojo> Further improvement to param mapping so that the midi dialog really only pops up when the VST window has the focus. ^ <Jojo> VST Selector: Different icons for effects / instruments. - . <Jojo> When moving around plugins, param control notes are now also updated. + . <re/Jojo> When moving around plugins, param control notes are now also updated. . <re> MIDI mapping: Pattern record checkbox wasn't updated properly. . <re/Jojo> MIDI mapping: Shift key erroneously opened MIDI mapping dialog in some cases. However, it does not work properly with all plugins anymore (e.g. sliders in Synth1 are not shift-clickable anymore) Mod conversion ^ <Jojo> When converting a song that has subsongs to MPTM format, the user is asked if those subsongs should be converted into multiple sequences. - ^ <Jojo> Better conversion of MOD/XM E4x / E7x command. + ^ <Jojo> If possible, all MPTM sequences will be merged into the first sequence. This also tries to fix patterns with Bxx effects. + ^ <Jojo> Better conversion of MOD / XM E4x / E7x command. ^ <Jojo> Better conversion of note off commands when converting to .mod. ^ <Jojo> Removing channel features (pan/vol) in formats where they're not supported. ^ <Jojo> Insert pattern break commands when resizing patterns to 64 rows that were smaller. - ^ <Jojo> Changing between MOD and XM format limits speed/tempo commands (Fxx) now. + ^ <Jojo> Changing between MOD and XM format limits speed / tempo commands (Fxx) properly now. ^ <Jojo> Trim sequence if it's too long (f.e. in MOD format). - ^ <Jojo> If possible, all MPTM sequences will be merged into the first sequence. This also tries to fix patterns with Bxx effects. - ^ <Jojo> Remove sample vibrato and sustain loops for MOD/S3M. + ^ <Jojo> Remove sample vibrato and sustain loops for MOD / S3M. Playback (see also format-specific changes below) ^ <Jojo> Added some more standard playback frequencies (176KHz, 192KHz). @@ -130,7 +127,7 @@ IT::Saving . <Jojo> Original IT specs concerning max orders/patterns were wrong. IT can handle up to 257 orders (as the last order is always ---, so it's actually 256 accessible orders), so the saving routines were also updated a bit. . <Jojo> Save at least 2 order items. - . <Jojo> IT files with empty sample slots will now FINALLY save correctly in Impulse Tracker. + . <Jojo> IT files with empty sample slots made with MPT will now FINALLY save correctly in Impulse Tracker. . <Jojo> Compatibility Export: Don't store "extended filter range" flag. IT::Loading @@ -139,19 +136,20 @@ . <Jojo> In some very rare (almost only theoretical) cases, the last IT instrument would not be loaded in previous versions. Use correct instrument header size (1.xx or 2.xx header) for comparison when loading instrument headers. IT::Playback compatibility - . <Jojo> Reset NNA actions on every note (tentative fix). + . <Jojo> Reset NNA actions on every note (tentative fix, fixes spx-farspacedance.it). . <Jojo> Fixes from SchismTracker: VolSwing, PanSwing, PPS. . <Jojo> Out of range offset command with Old FX on. + . <Jojo> Impvored S3x / S4x / S5x handling. S3M . <Jojo> ST3 compatibility: Only allow waveforms 0 to 3 for S3x / S4x / S5x. - . <Jojo> The S3M format actually knows muted channels. Added this to the S3M loader/saver. + . <Jojo> The S3M format actually knows muted channels. This was not taking into account before. XM::Loading ^ <Jojo> Allow to load modules with an empty order list (as they are, in fact, valid XM files). XM::Playback compatibility - . <Jojo> Almost perfect arpeggio emulation (only a few notes are still wrong). + . <Jojo> Almost perfect arpeggio emulation (only a few notes are still wrong). Thanks, Ian Luck! . <Jojo> Rogue note delays are now retriggering the instrument. . <Jojo> Perfect emulation of buggy Rxy behaviour. Thanks to Ian Luck for helping me with this. . <Jojo> Command X modplug extensions are now ignored in FT2 compat mode. @@ -175,7 +173,7 @@ + <Jojo> Wave Convert: Normalization is back as experimental feature. + <Jojo> Wav/Mp3 export: Show estimated remaining time. ^ <Jojo> Mp3 export: Removed 60 minutes limit. - . <Jojo> Mp3 export: use uint64 like in wav export (instead of uint32), to prevent wraparounds with very long modules like Skaven's "Beyond the Network". + . <Jojo> Mp3 export: Fixed possible issue with very long mod files (such as Skaven's "Beyond the Network"). . <Jojo> Wave Convert: The wave convert dialog had two default buttons, one of them (the "default default button") didn't make sense. Colour setup @@ -199,31 +197,31 @@ ^ <Jojo> Tuning dialog: Using the default tuning path as default path for Import/Export dialog Module format support - + <Jojo> Can now import RIFF AM and RIFF AMFF files, as well as J2B files, which are compressed AM(FF) files. Added zlib 1.2.3 for J2B support. - + <Jojo> Can now import PSM16 files. + + <Jojo> Can now import RIFF AM and RIFF AMFF files, as well as J2B (Jazz Jackrabbit 2 music) files, which are compressed AM(FF) files. + + <Jojo> Can now import PSM16 files (Silverball, early versions of Epic Pinball). . <Jojo> MED Loader: Possible error when loading orderlist. . <Jojo> MDL Loader: Various fixes (taken from Schism Tracker). . <Jojo> IMF Loader: Slightly wrong instrument loader (this for once didn't break anything, though). . <Jojo> AMF Loader: Missing break command. Misc - ^ <Jojo> All Loaders: Using a new template, SpaceToNullStringFixed, which filters out all null chars in song/sample/instrument/etc. names. This avoids "empty" instrument names that occured in a couple of .IT files before. - ^ <Jojo> Mainframe: Extended paste mechanisms (mix, flood, push forward) have been moved into a sub menu. - ^ <Jojo> Mainframe: Improved accelerator keys in the edit menu. + ^ <Jojo> All Loaders: Fixed string handling to filter out all null chars in song/sample/instrument/etc. names. This avoids "empty" instrument names that occured in a couple of .IT files before. + ^ <Jojo> Main window: Extended paste mechanisms (mix, flood, push forward) have been moved into a sub menu. + ^ <Jojo> Main window: Improved accelerator keys in the edit menu. ^ <Jojo> Added "split keyboard settings" dialog to the "edit" menu and updated the shortcuts there (goto was missing). ^ <re> SoundTouch: Update to version 1.5.0. - / <Jojo> Store configuration and tuning files in %APPDATA% if possible. Can be disabled by adding UseAppDataDirectory=0 to [Paths] in mptrack.ini. + / <Jojo> Store configuration and tuning files in %APPDATA% if possible. Can be disabled by adding UseAppDataDirectory=0 to [Paths] in mptrack.ini ("portable mode"). / <Jojo> Mod Creation: When clicking on the "new" button, the newly created module will be of the same type as the currently active document. Should probably be an option. - / <Jojo> Made Graph and Pattern Randomizer shortcuts invisible. + / <Jojo> Made Graph and Pattern Randomizer shortcuts invisible, as they are usless. / <Jojo> Compatibility Export: Use module working directory in "save as" dialog. / <Jojo> Using MS Shell Dlg font instead of MS Sans Serif in resource file. / <re> Changed some "modplug tracker" strings to "OpenMPT". . <Jojo> When using a Load/Save dialog, MPT's key handler will be disabled so that common shortcuts like F2, Ctrl+C, Ctrl+V, Esc. etc. can still be used. - . <Jojo> Mod Loaders: Very short sample sustain loops are now also accepted (similar fix to normal loop points - fixes ckabsenc.it). + . <Jojo> Mod Loaders: Very short sample sustain loops are now also accepted (fixes ckabsenc.it). . <Jojo> Mod Creation: Filling the whole mod title field with null bytes on creation to avoid funky characters in other programs. . <Jojo> When moving program files to %APPDATA%, take care of the keyboard settings path in the INI file. - . <Jojo> Increased "filename" string in instrument header field to 32, since CHAR[12] is not really enough for 12 letters... - . <re> Autosave: 'Modified since last autosave'-flag wasn't updated when document was set modified using ThreadSafeSetModified. + . <Jojo> Fixed possible issue with long (12 chars) instrument filenames. + . <re> Autosave: 'Modified since last autosave'-flag wasn't always updated. . <re> Fixes to handling of 32 chars long instrument name. @@ -267,28 +265,27 @@ Pattern tab::Find/replace ^ <Jojo> Don't reset "replace all" flag after every search. / <Jojo> "Search in whole song" and "Replace all" are now enabled by default. - . <Jojo> Works now also with high instrument numbers. Also, empty instrument numbers won't be affected by "ins+1" anymore. + . <Jojo> Replacing also works with high instrument numbers now. Also, empty instrument numbers won't be affected by "ins+1" anymore. . <Jojo> Notes that cannot be used in the given format are not shown in the dropdown combo. . <Jojo> Made comboboxes more convenient to use. Pattern tab::Macro config ^ <Jojo> Also show the current preset for Zxx config (Z80 - ZFF). - . <Jojo> "Show All" FX display starts at 1 instead of 0, like all other FX enumerations. + . <Jojo> "Show All" FX display starts at 1 instead of 0, like all other FX enumerations. (tx Rakib) Sample tab + <coda> Sample drawing. + <coda> Add silence to sample. + + <Jojo> Resize sample (same dialog as "add silence") + <Jojo> Can now play sample from given position with Ctrl + left mouse button. + <Jojo> DC offset removal. + <Jojo> Batch export samples (shift + click on "save sample" icon). - + <Jojo> Added setting "FinetuneStep" to INI section "Sample Editor". - ^ <Jojo> It is now possible to resize samples to a given sample size. You can do this using the already existing "add silence" dialog. + + <Jojo> Added setting "FinetuneStep" to mptrack.ini section "[Sample Editor]". ^ <Jojo> Better loop point handling when deleting sample selections. . <Jojo> Limit sample vibrato fields properly. Vibrato Sweep ranges from 0 to 255 now. . <Jojo> Remove special chars from sample filenames so the "save as" dialog will show up on OSs < Vista. . <Jojo> When using the spin control, frequency is not clamped to [2000, 96000] anymore. . <Jojo> Removed tuning from up/downsampling for MOD files which detuned them when saving. - . <Jojo> Global volume is now also being adjusted for stereo and 16-Bit samples. . <Jojo> Transpose is now disabled when using MOD format. Instrument tab @@ -299,7 +296,7 @@ . <Jojo> Pitch/Pan input field allows negative values. . <Jojo> Proper limits for IT/XM fadeout values. . <Jojo> Playing correct note in the instrument mapping control (notable difference when editing the scale from bottom to top). - . <Jojo> No relative values are shown for envelopes with no release node (status bar). + . <Jojo> No relative values are shown for envelopes with no release node (status bar). (tx xaimus) . <Jojo> Remove special chars from sample filenames so the "save as" dialog will show up on OSs < Vista. . <Jojo> Fixed crash in instrument view that occured if RowsPerBeat was 0. . <re> Fix to crash that occurred when multiple windows had instrument tab of the same document open. @@ -315,7 +312,7 @@ VST / MIDI mapping + <re> Editing a plug param in its editor while holding shift key will now open MIDI mapping dialog. + <re> Can now record MIDI mapping changes to pattern. - / <re> Changed host IDs and a couple of related return values. If compatibility problems occur, old IDs can be set with ini-settings. + / <re> Changed host IDs and a couple of related return values. If compatibility problems occur, old IDs can be set with ini-settings ("HostProductString", "HostVendorString", "HostVendorVersion" in section "[VST Plugins]"). . <Jojo> Some minor tweaks and fixes to the MIDI mapping dialog. Mod conversion @@ -336,10 +333,10 @@ ^ <Jojo> If restart position is 0 and a subtune is played (i.e. a tune separated with a "---" pattern), OpenMPT will now try to jump back to the first order of this subtune instead. ^ <Jojo> Added option to not reset all channels and variables when looping a module. . <Jojo> 4-Bit panning didn't disable surround sound (fixed in compatibility mode in IT/MPTM/XM). - . <Jojo> Process pattern break commands on last pattern properly. + . <Jojo> Don't ignore value of pattern break commands on last pattern anymore. MPTM - + <re> New experimental parameter controls for controlling plug params. + + <re> New experimental parameter controls (PC notes) for controlling plug params. + <re> Can now have multiple sequences in a module (access from orderlist context menu). + <Jojo> Allow up to 240 envelope points. + <Jojo> IT "Note Fade" command: This existed in IT's player routines already, but there was no way to actually use it in the editor. Triggering an invalid note would cause a note fade, so this is a new note type. @@ -362,7 +359,7 @@ ^ <Jojo> Can now load IT files with very small patterns (< 4 rows). ^ <Jojo> Setting the "last saved with" version to 1.16 (instead of "created with") if module seems to be made with the old MPT. ^ <Jojo> Reading our custom tracker version in the header now as well. - ^ <Jojo> Detect more versions of MPT that did stupid things. + ^ <Jojo> Detect more versions of MPT that did stupid things (can be seen in the "last saved with" field). ^ <Jojo> Row highlighting in IT header is now recognized. . <Jojo> Unset release env nodes for IT files made with IT 1.x, fix fadeout values. . <Jojo> Don't set "made with modplug" flag for IT files that were made with compatibility export. @@ -372,50 +369,42 @@ . <Jojo> OpenMPT was loading the volume column command hx (vibrato depth) as ux (vibrato speed) and also saving it like this. In the pattern editor, ux was allowed, hx was not but it should be the other way around. Now, hx is always used but ux is still loaded correctly for old modules made with MPT/OpenMPT. IT::Playback compatibility - ^ <Jojo> More improvements to Vibrato, Tremolo and Panbrello. Using the tables from IT_TECH.TXT. - ^ <Jojo> Improved IT compatible retrigger (didn't work if the retrigger didn't start together with a new note). + ^ <Jojo> More improvements to Vibrato, Tremolo and Panbrello. + ^ <Jojo> Retrigger (Qxy) works like in Impulse Tracker now (when in compatible mode) (test #15) + ^ <Jojo> Tremor (Ixy) works like in Impulse Tracker now (when in compatible mode) . <Jojo> Better sample vibrato compatibility. Vibrato Sweep isn't perfect yet, though. - . <Jojo> Special case of Retrigger + Envelopes. . <Jojo> Offset beyond sample range. . <Jojo> Don't reset Tremolo on new note, don't ignore tremolo if note volume is 0. . <Jojo> Ignore S[345]x with x > 3. . <Jojo> Multisample instruments change with no entry in the instrument column (fixes spx-shuttledeparture.it) (test me). - . <Jojo> Tremor also works properly with "old effects" on. - . <Jojo> Fixed retrigger for Qxx when not being triggered together with a note. . <Jojo> Pattern loop count won't be reset on pattern transition (fixes gm-trippy01.it). . <Jojo> Tempo slides won't exceed 255 BPM in compatible mode. - . <Jojo> Allow OpenMPT's new volume colum commands (offset etc.) to be used together with Retrigger in compatible mode again. . <Jojo> Random waveforms (vibrato, tremolo, panbrello) (test #19). . <Jojo> Fixed handling of very short pitch / filter envelopes (test #24). . <Jojo> Panning fx (Xxx, S8x, pxx) override pan swing (test #20). - . <Jojo> Improved retrigger compatibility even more (#15) . <Jojo> SD0 / SC0 is now interpreted as SD1 / SC1 in compatibility mode (test #22). . <Jojo> Portamento up / down resets the destination of tone portamento (test #23). - . <Jojo> Tremor: Sounds like in IT when compatible playback mode is turned on. . <Jojo> Out of range global volume, local global volume slides. - . <Jojo> Retrigger effect behaved slightly wrong. S3M::Saving ^ <Jojo> Orderlist is now as small as possible (multiple of 2 instead of multiple of 16); Using ST3's default UltraClick value. ^ <Jojo> Using an own version number in the header now, just like all the other trackers. ^ <Jojo> Don't write unnecessary invalid order items in the order table. - . <Jojo> Set the stereo flag. . <Jojo> Ignore new MPT effects. - . <Jojo> Patterns are now saved correctly. Previously, the last few rows might have come up as garbage in ST3, especially (only?) when they were empty. + . <Jojo> Patterns are now saved correctly. Previously, the last few rows might have come up as garbage in ST3 when they were empty. . <Jojo> Clamp sample pre-amp to [32;127] instead of just taking the lower 7 bits. (Default pre-amp value was 128, which resulted in pre-amp 0 when saving). S3M::Loading ^ <Jojo> Recognize OpenMPT version in S3M header. - . <Jojo> Limit min sample preamp value to 0x10. + . <Jojo> Limit min sample preamp value to 16. . <Jojo> Small modifications to pattern loader to load somewhat broken S3M files (fix from xmp). - . <Jojo> Don't reset global volume to max if it is min for "new" modules. - . <Jojo> Smarter Zxx conversion. + . <Jojo> Don't reset global volume to max if it is 0 for "new" S3M modules. + . <Jojo> Smarter Zxx conversion without message box. . <Jojo> Disable loop for sample with very short loop at the beginning. . <Jojo> Samples with very short loops (2 bytes) will now load correctly. This fixes for example 94hitmix.s3m and spectral.s3m. - . <Jojo> Short loops in S3M samples are now recognized. S3M::Misc - . <Jojo> Module Creation / Loading: Sane default volume settings for MOD / S3M files again(128 global volume, 48 sample volume) + . <Jojo> Module Creation / Loading: Sane default volume settings for MOD / S3M files again (128 global volume, 48 sample volume) . <Jojo> S3M compatibility: Notes with SD0 are now ignored, SC0 is completely ignored XM @@ -423,13 +412,9 @@ + <Jojo> Compatibility play-mode. XM::Loading - + <Jojo> Detects compatibility mode automatically when loading XM-file. - ^ <Jojo> Detect non-mpt modules more reliably. - ^ <Jojo> Advanced "made with MPT" detection. - ^ <Jojo> Detect a very old MPT version. + + <Jojo> Detects compatibility (i.e. modules not made with mpt) mode automatically when loading XM-file. ^ <Jojo> Make XMs with strange pattern header sizes load correctly (removed some code that was there to make really, really broken XMs load - would this work at all?). ^ <Jojo> Setting the "last saved with" version to 1.16 (instead of "created with") if module seems to be made with the old MPT. - ^ <Jojo> Less hacky implementation of the instrument loader. Still works correctly with "normal" XM modules and BoobieSqueezed XMs. . <Jojo> Various changes to make XMs that have been compressed with BoobieSqueezer load correctly. . <Jojo> Can now load XM Version 1.02 and 1.03. . <Jojo> More intelligent conversion of Speed / Tempo commands. @@ -445,21 +430,20 @@ XM::Playback compatibility . <Jojo> Portamento + New Note with no previous note (tentative fix), Offset beyond sample range. - . <Jojo> Compatible Arpeggio was done wrong. - . <Jojo> More compatible "Note Off + Something". + . <Jojo> More compatible "Note Off + Something" actions. . <Jojo> Note Off with instrument number causes fadeout for samples that have no envelope. . <Jojo> Volume command Ux should not enable Vibrato at all, it only sets the vibrato speed. . <Jojo> Pxy effect was too deep. . <Jojo> Using MilkyTracker's arpeggio logic for better XM arpeggio compatibility - still not perfect! . <Jojo> Tempo slides won't exceed 255 BPM in compatible mode. - . <Jojo> In compatible mode, old retrigger routines are used again (as MPT's default retrigger algorithm actually represents FT2's retrigger algorithm). Additionally, a retrigger bug from FT2 is emulated (retrigger with vxx on the same channel would always reset the retriggered note's volume). + . <Jojo> In compatibility mode, retrigger with vxx on the same channel will always reset the retriggered note's volume. . <Jojo> More compatible handling of Kxx effect. . <Jojo> Pattern loops are now handeled correctly (using compatibility switch). . <Jojo> Out of range global volume, local global volume slides. MOD ^ <Jojo> Module Creation: MOD files have 4 channels by default. - ^ <Jojo> Moved loop length check from compatibility export to normal save, as it does not break/change any MPT-made MOD file. + ^ <Jojo> Moved loop length check from compatibility export to normal save. There you go, Amiga users! :) . <Jojo> Module Creation / Loading: Sane default volume settings for MOD / S3M files again (128 global volume, 48 sample volume). . <Jojo> Inserting more than 128 orders in MOD format is not possible anymore. @@ -468,7 +452,7 @@ . <Jojo> Last pattern was not loading in .MODs that have no samples. MOD::Saving - . <Jojo> The compatibility export was only working properly for 8-bit mono samples. Everything else is going to be downsampled later, so the sample "fixing" has to be done before. + . <Jojo> The compatibility export was only working properly for 8-bit mono samples. . <Jojo> More intelligent conversion of Speed / Tempo commands. . <Jojo> F20 won't turn into G20. @@ -478,17 +462,17 @@ Setup + <Jojo> New default directories: plugins and plugin presets. - + <Jojo> Option reset ramping and resampling to default values. - + <Jojo> Shareable color schemes (via config dialog). + + <Jojo> Button to reset ramping and resampling to default values. + + <Jojo> Shareable colour schemes (via config dialog). ^ <Jojo> Added note to "always center active row" hint that this is required to be enabled for greyed out patterns. ^ <Jojo> Slight redesign of the WAV / MP3 export dialogs. / <Jojo> Changes to default general options configuration. Module format support + <Jojo> Can now import IMF (Imago Orpheus) modules. - + <Jojo> Can now import GDM files. + + <Jojo> Can now import GDM (General Digital Music / BWSB sound system) files. . <Jojo> A brand new PSM loader! Ditched the old and buggy loader as the new loader works way better, it can even handle modules from Extreme Pinball. - . <Jojo> 669 Loader: Small modification so corehop.669 can be loaded; Note: Loader is still buggy like hell + . <Jojo> 669 Loader: Small modification so corehop.669 can be loaded; Note: Loader is still buggy like hell. Misc + <Jojo> Compo cleanup. @@ -502,7 +486,7 @@ ^ <kode54> LHA Decoder: Several fixes (patch by kode54). / <re> Default keybings are now included in the executable -> default keybindings are available even without external keybinding file. . <Jojo> Menus: Added the correct shortcut keys again and replaced the last(?) remaining "Midi" labels by "MIDI". - . <Jojo> Wav Export / Channel Manager / Pattern Editor: Pattern names with leading space char are now accepted. + . <Jojo> Wav Export / Channel Manager / Pattern Editor: Channel names with leading space char are now accepted. . <Jojo> General tab / Main bar / Loaders / Conversion: Fixed arbitrary speed limits (64 on general tab, 127 on main bar). . <Jojo> Keyboard manager: Octave offset for key descriptions is now C, not A. . <Jojo> Patterns: Reset pattern name when deleting pattern. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rel...@us...> - 2010-01-14 20:46:42
|
Revision: 465 http://modplug.svn.sourceforge.net/modplug/?rev=465&view=rev Author: relabsoluness Date: 2010-01-14 20:46:32 +0000 (Thu, 14 Jan 2010) Log Message: ----------- [Fix] Sample tab: Fix to possible crash if trying to use time stretching without SoundTouch DLL available. [Fix] Internal: mptrack_08.vcproj wasn't updated in rev. 462. [Imp] Keymaps: Updated default keybindings. [Mod] Version: Changed version to 1.18. [Mod] PackageTemplate: Update to history.txt. [Mod] Misc: Removed unused DLL from version control, added version resource to SoundTouch DLL. Modified Paths: -------------- trunk/OpenMPT/mptrack/Ctrl_smp.cpp trunk/OpenMPT/mptrack/Mptrack.cpp trunk/OpenMPT/mptrack/Mptrack.h trunk/OpenMPT/mptrack/mptrack.vcproj trunk/OpenMPT/mptrack/mptrack_08.vcproj trunk/OpenMPT/mptrack/res/defaultKeybindings.mkb trunk/OpenMPT/mptrack/version.h trunk/OpenMPT/packageTemplate/History.txt trunk/OpenMPT/soundtouch/soundtouch.vcproj trunk/OpenMPT/soundtouch/soundtouch_08.vcproj Added Paths: ----------- trunk/OpenMPT/soundtouch/SoundTouchDLL.rc Removed Paths: ------------- trunk/OpenMPT/mptrack/bin/OpenMPT_SoundTouch.dll Modified: trunk/OpenMPT/mptrack/Ctrl_smp.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2010-01-10 21:54:41 UTC (rev 464) +++ trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2010-01-14 20:46:32 UTC (rev 465) @@ -16,6 +16,7 @@ #include "smbPitchShift.cpp" #pragma warning(default:4244) //"conversion from 'type1' to 'type2', possible loss of data" #include "modsmp_ctrl.h" +#include <Shlwapi.h> #ifdef _DEBUG #define new DEBUG_NEW @@ -1799,7 +1800,11 @@ if (handleSt == NULL) { - handleSt = soundtouch_createInstance(); + // Check whether the DLL file exists. + CString sPath; + sPath.Format(TEXT("%s%s"), CTrackApp::GetAppDirPath(), TEXT("OpenMPT_SoundTouch_i16.dll")); + if (sPath.GetLength() <= _MAX_PATH && PathFileExists(sPath) == TRUE) + handleSt = soundtouch_createInstance(); } if (handleSt == NULL) { Modified: trunk/OpenMPT/mptrack/Mptrack.cpp =================================================================== --- trunk/OpenMPT/mptrack/Mptrack.cpp 2010-01-10 21:54:41 UTC (rev 464) +++ trunk/OpenMPT/mptrack/Mptrack.cpp 2010-01-14 20:46:32 UTC (rev 465) @@ -252,6 +252,8 @@ } +TCHAR CTrackApp::m_szExePath[_MAX_PATH] = TEXT(""); + ///////////////////////////////////////////////////////////////////////////// // MPTRACK Command Line options Modified: trunk/OpenMPT/mptrack/Mptrack.h =================================================================== --- trunk/OpenMPT/mptrack/Mptrack.h 2010-01-10 21:54:41 UTC (rev 464) +++ trunk/OpenMPT/mptrack/Mptrack.h 2010-01-14 20:46:32 UTC (rev 465) @@ -153,7 +153,7 @@ HANDLE m_hAlternateResourceHandle; // Default macro configuration MODMIDICFG m_MidiCfg; - TCHAR m_szExePath[_MAX_PATH]; + static TCHAR m_szExePath[_MAX_PATH]; TCHAR m_szConfigDirectory[_MAX_PATH]; TCHAR m_szConfigFileName[_MAX_PATH]; TCHAR m_szPluginCacheFileName[_MAX_PATH]; @@ -175,6 +175,7 @@ static VOID SetAsProject(BOOL n) { m_nProject = n; } // -! NEW_FEATURE#0023 + static LPCTSTR GetAppDirPath() {return m_szExePath;} // Returns '\'-ended executable directory path. static UINT GetDefaultDocType() { return m_nDefaultDocType; } static VOID SetDefaultDocType(UINT n) { m_nDefaultDocType = n; } static LPMIDILIBSTRUCT GetMidiLibrary() { return glpMidiLibrary; } Deleted: trunk/OpenMPT/mptrack/bin/OpenMPT_SoundTouch.dll =================================================================== (Binary files differ) Modified: trunk/OpenMPT/mptrack/mptrack.vcproj =================================================================== --- trunk/OpenMPT/mptrack/mptrack.vcproj 2010-01-10 21:54:41 UTC (rev 464) +++ trunk/OpenMPT/mptrack/mptrack.vcproj 2010-01-14 20:46:32 UTC (rev 465) @@ -54,7 +54,7 @@ LinkIncremental="2" SuppressStartupBanner="TRUE" AdditionalLibraryDirectories="" - DelayLoadDLLs="OpenMPT_soundtouch_i16.dll" + DelayLoadDLLs="OpenMPT_SoundTouch_i16.dll" GenerateDebugInformation="TRUE" AssemblyDebug="1" ProgramDatabaseFile=".\Debug/mptrack.pdb" @@ -132,7 +132,7 @@ LinkIncremental="1" SuppressStartupBanner="TRUE" AdditionalLibraryDirectories="" - DelayLoadDLLs="OpenMPT_soundtouch_i16.dll" + DelayLoadDLLs="OpenMPT_SoundTouch_i16.dll" GenerateDebugInformation="TRUE" GenerateMapFile="FALSE" MapFileName=".\Release/mptrack.map" Modified: trunk/OpenMPT/mptrack/mptrack_08.vcproj =================================================================== --- trunk/OpenMPT/mptrack/mptrack_08.vcproj 2010-01-10 21:54:41 UTC (rev 464) +++ trunk/OpenMPT/mptrack/mptrack_08.vcproj 2010-01-14 20:46:32 UTC (rev 465) @@ -89,7 +89,7 @@ LinkIncremental="2" SuppressStartupBanner="true" AdditionalLibraryDirectories="" - DelayLoadDLLs="OpenMPT_soundtouch.dll" + DelayLoadDLLs="OpenMPT_SoundTouch_i16.dll" GenerateDebugInformation="true" AssemblyDebug="1" ProgramDatabaseFile=".\Debug/mptrack.pdb" @@ -195,7 +195,7 @@ LinkIncremental="1" SuppressStartupBanner="true" AdditionalLibraryDirectories="" - DelayLoadDLLs="OpenMPT_soundtouch.dll" + DelayLoadDLLs="OpenMPT_SoundTouch_i16.dll" GenerateDebugInformation="true" GenerateMapFile="false" MapFileName=".\Release/mptrack.map" Modified: trunk/OpenMPT/mptrack/res/defaultKeybindings.mkb =================================================================== --- trunk/OpenMPT/mptrack/res/defaultKeybindings.mkb 2010-01-10 21:54:41 UTC (rev 464) +++ trunk/OpenMPT/mptrack/res/defaultKeybindings.mkb 2010-01-14 20:46:32 UTC (rev 465) @@ -8,6 +8,7 @@ 0:1347:2:78:1 //File/New: Ctrl+N (KeyDown) 0:1346:2:79:1 //File/Open: Ctrl+O (KeyDown) 0:1349:2:83:1 //File/Save: Ctrl+S (KeyDown) +0:1350:3:83:1 //File/Save As: Shift+Ctrl+S (KeyDown) 0:1030:0:116:1 //Play song/Pause song: F5 (KeyDown) 0:1031:0:119:1 //Pause song: F8 (KeyDown) 0:1375:0:27:1 //Stop Song: ESC (KeyDown) @@ -21,6 +22,9 @@ 0:1361:2:45:1 //Copy: Ctrl+INSERT (KeyDown) 0:1362:2:86:1 //Paste: Ctrl+V (KeyDown) 0:1362:1:45:1 //Paste: Shift+INSERT (KeyDown) +0:1363:1:86:1 //Mix Paste: Shift+V (KeyDown) +0:1793:3:86:1 //Paste Flood: Shift+Ctrl+V (KeyDown) +0:1820:6:86:1 //Push Forward Paste: Ctrl+Alt+V (KeyDown) 0:1364:2:53:1 //SelectAll: Ctrl+5 (KeyDown) 0:1365:2:70:1 //Find: Ctrl+F (KeyDown) 0:1366:0:114:1 //Find Next: F3 (KeyDown) @@ -31,6 +35,7 @@ 0:1025:1:120:1 //View Comments: Shift+F9 (KeyDown) 0:1368:2:113:1 //Toggle Tree View: Ctrl+F2 (KeyDown) 0:1369:2:112:1 //View Options: Ctrl+F1 (KeyDown) +0:1781:2:114:1 //View MIDI mapping: Ctrl+F3 (KeyDown) 0:1370:0:112:1 //Help (to do): F1 (KeyDown) 0:1032:2:111:5 //Previous instrument: Ctrl+NUM DIVIDE (KeyDown|KeyHold) 0:1032:2:38:5 //Previous instrument: Ctrl+UP (KeyDown|KeyHold) @@ -76,8 +81,12 @@ 2:1685:2:9:1 //Switch to order list: Ctrl+TAB (KeyDown) 2:1662:6:80:1 //Toggle channel's plugin editor: Ctrl+Alt+P (KeyDown) 2:1062:0:93:1 //Show note properties: Application (KeyDown) +2:1819:2:69:1 //Split Keyboard Settings dialog: Ctrl+E (KeyDown) +2:1776:6:32:1 //Toggle loop pattern: Ctrl+Alt+SPACE (KeyDown) +2:1780:2:84:1 //Show playback time at current row: Ctrl+T (KeyDown) 2:1005:0:121:5 //Mute current channel: F10 (KeyDown|KeyHold) 2:1006:2:121:5 //Solo current channel: Ctrl+F10 (KeyDown|KeyHold) +2:1786:2:82:1 //Reset channel: Ctrl+R (KeyDown) 2:1007:2:81:5 //Transpose +1: Ctrl+Q (KeyDown|KeyHold) 2:1008:2:65:5 //Transpose -1: Ctrl+A (KeyDown|KeyHold) 2:1009:3:81:5 //Transpose +12: Shift+Ctrl+Q (KeyDown|KeyHold) @@ -159,6 +168,8 @@ 3:1316:1:16:1 //Chord Modifier: Shift (KeyDown) 3:1200:0:192:1 //Note cut: ' (KeyDown) 3:1201:0:187:1 //Note off: = (KeyDown) +3:1788:1:226:1 //Parameter control(MPTm only): Shift+< (KeyDown) +3:1789:0:226:1 //Parameter control(smooth)(MPTm only): < (KeyDown) //----( Pattern Context [bottom] - Ins Col (4) )------------ 4:1202:0:96:1 //Set instrument digit 0: NUM 0 (KeyDown) @@ -219,7 +230,6 @@ //----( Pattern Context [bottom] - FX Col (6) )------------ 6:1294:0:220:1 //FX midi macro slide: \ (KeyDown) -6:1295:1:186:1 //FX pseudo-velocity (experimental): Shift+; (KeyDown) //----( Pattern Context [bottom] - Param Col (7) )------------ 7:1247:0:48:1 //FX Param digit 0: 0 (KeyDown) @@ -252,13 +262,32 @@ //----( Sample Context [bottom] (8) )------------ 8:1380:2:84:1 //Trim sample around loop points: Ctrl+T (KeyDown) 8:1383:0:8:1 //Silence sample selection: BACKSPACE (KeyDown) +8:1384:1:78:1 //Normalise Sample: Shift+N (KeyDown) 8:1385:3:65:1 //Amplify Sample: Shift+Ctrl+A (KeyDown) 8:1381:3:82:1 //Reverse sample: Shift+Ctrl+R (KeyDown) 8:1382:0:46:1 //Delete sample selection: DELETE (KeyDown) 8:1386:0:107:1 //Zoom Out: NUM PLUS (KeyDown) 8:1387:0:109:1 //Zoom In: NUM SUB (KeyDown) +8:1784:2:73:1 //Invert sample phase: Ctrl+I (KeyDown) +8:1785:2:85:1 //Signed/Unsigned conversion: Ctrl+U (KeyDown) +8:1790:2:68:1 //Remove DC Offset: Ctrl+D (KeyDown) //----( Instrument Context [bottom] (9) )------------ +9:1825:1:9:5 //Select previous envelope point: Shift+TAB (KeyDown|KeyHold) +9:1826:0:9:5 //Select next envelope point: TAB (KeyDown|KeyHold) +9:1821:0:37:5 //Move envelope point left: LEFT (KeyDown|KeyHold) +9:1822:0:39:5 //Move envelope point right: RIGHT (KeyDown|KeyHold) +9:1823:0:38:5 //Move envelope point up: UP (KeyDown|KeyHold) +9:1834:0:33:5 //Move envelope point up (big step): PG UP (KeyDown|KeyHold) +9:1824:0:40:5 //Move envelope point down: DOWN (KeyDown|KeyHold) +9:1835:0:34:5 //Move envelope point down (big step): PG DN (KeyDown|KeyHold) +9:1827:0:45:5 //Insert envelope point: INSERT (KeyDown|KeyHold) +9:1828:0:46:5 //Remove envelope point: DELETE (KeyDown|KeyHold) +9:1829:0:36:1 //Set loop start: HOME (KeyDown) +9:1830:0:35:1 //Set loop end: END (KeyDown) +9:1831:2:36:1 //Set sustain loop start: Ctrl+HOME (KeyDown) +9:1832:2:35:1 //Set sustain loop end: Ctrl+END (KeyDown) +9:1833:2:82:1 //Toggle release node: Ctrl+R (KeyDown) //----( Comments Context [bottom] (10) )------------ @@ -267,6 +296,11 @@ //----( Unknown Context (12) )------------ //----( Plugin GUI Context (13) )------------ +13:1763:2:109:5 //Previous plugin preset: Ctrl+NUM SUB (KeyDown|KeyHold) +13:1764:2:107:5 //Next plugin preset: Ctrl+NUM PLUS (KeyDown|KeyHold) +13:1782:0:109:5 //Plugin preset backward jump: NUM SUB (KeyDown|KeyHold) +13:1783:0:107:5 //Plugin preset forward jump: NUM PLUS (KeyDown|KeyHold) +13:1765:2:82:5 //Randomize plugin parameters: Ctrl+R (KeyDown|KeyHold) //----( General Context [top] (14) )------------ Modified: trunk/OpenMPT/mptrack/version.h =================================================================== --- trunk/OpenMPT/mptrack/version.h 2010-01-10 21:54:41 UTC (rev 464) +++ trunk/OpenMPT/mptrack/version.h 2010-01-14 20:46:32 UTC (rev 465) @@ -13,9 +13,9 @@ //Version definitions. The only thing that needs to be changed when changing version number. #define VER_MAJORMAJOR 1 -#define VER_MAJOR 17 -#define VER_MINOR 03 -#define VER_MINORMINOR 03 +#define VER_MAJOR 18 +#define VER_MINOR 00 +#define VER_MINORMINOR 00 //Creates version number from version parts that appears in version string. //For example MAKE_VERSION_NUMERIC(1,17,02,28) gives version number of Modified: trunk/OpenMPT/packageTemplate/History.txt =================================================================== --- trunk/OpenMPT/packageTemplate/History.txt 2010-01-10 21:54:41 UTC (rev 464) +++ trunk/OpenMPT/packageTemplate/History.txt 2010-01-14 20:46:32 UTC (rev 465) @@ -76,6 +76,7 @@ / <Jojo> Removed time stretcher's / pitch shifter's preview function as it's unnecessary now. . <Jojo> When going down close to 0 Hz in the sample editor, the sample freq wrapped around to the maximum value. . <Jojo> Insert Silence: Loop points were not updated when adding silence at the beginning of the sample + . <re> Actions such as time stretching and undo could trigger sample play. Instrument tab . <Jojo> When playing an instrument and disabling its envelopes at the same time, the toggled envelopes are stopped (prevents filter envelope from turning into a pitch envelope). Added: trunk/OpenMPT/soundtouch/SoundTouchDLL.rc =================================================================== --- trunk/OpenMPT/soundtouch/SoundTouchDLL.rc (rev 0) +++ trunk/OpenMPT/soundtouch/SoundTouchDLL.rc 2010-01-14 20:46:32 UTC (rev 465) @@ -0,0 +1,114 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// Finnish resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FIN) +#ifdef _WIN32 +LANGUAGE LANG_FINNISH, SUBLANG_DEFAULT +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,5,0,0 + PRODUCTVERSION 1,5,0,0 + FILEFLAGSMASK 0x17L +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "000004b0" + BEGIN + VALUE "Comments", "This is a slightly customized build of SoundTouch DLL for OpenMPT using INTEGER_SAMPLES." + VALUE "FileDescription", "SoundTouch Dynamic Link Library" + VALUE "FileVersion", "1, 5, 0, 0" + VALUE "InternalName", "SoundTouch" + VALUE "LegalCopyright", "Copyright (C) Olli Parviainen 1999-2009" + VALUE "OriginalFilename", "OpenMPT_SoundTouch_i16.dll" + VALUE "ProductName", " SoundTouch Dynamic Link Library" + VALUE "ProductVersion", "1, 5, 0, 0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0, 1200 + END +END + +#endif // Finnish resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + Modified: trunk/OpenMPT/soundtouch/soundtouch.vcproj =================================================================== --- trunk/OpenMPT/soundtouch/soundtouch.vcproj 2010-01-10 21:54:41 UTC (rev 464) +++ trunk/OpenMPT/soundtouch/soundtouch.vcproj 2010-01-14 20:46:32 UTC (rev 465) @@ -207,6 +207,9 @@ Name="Resource Files" Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"> + <File + RelativePath=".\SoundTouchDLL.rc"> + </File> </Filter> </Files> <Globals> Modified: trunk/OpenMPT/soundtouch/soundtouch_08.vcproj =================================================================== --- trunk/OpenMPT/soundtouch/soundtouch_08.vcproj 2010-01-10 21:54:41 UTC (rev 464) +++ trunk/OpenMPT/soundtouch/soundtouch_08.vcproj 2010-01-14 20:46:32 UTC (rev 465) @@ -298,6 +298,10 @@ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" > + <File + RelativePath=".\SoundTouchDLL.rc" + > + </File> </Filter> </Files> <Globals> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |