You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
(1) |
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
(10) |
Sep
|
Oct
|
Nov
|
Dec
(3) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(1) |
Feb
(2) |
Mar
(3) |
Apr
(2) |
May
(10) |
Jun
(2) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
|
| 2008 |
Jan
(6) |
Feb
(4) |
Mar
(5) |
Apr
(2) |
May
(1) |
Jun
(1) |
Jul
(4) |
Aug
(6) |
Sep
(2) |
Oct
(9) |
Nov
(1) |
Dec
(4) |
| 2009 |
Jan
(9) |
Feb
(2) |
Mar
(2) |
Apr
(2) |
May
(6) |
Jun
(18) |
Jul
(33) |
Aug
(39) |
Sep
(33) |
Oct
(24) |
Nov
(23) |
Dec
(22) |
| 2010 |
Jan
(29) |
Feb
(32) |
Mar
(51) |
Apr
(17) |
May
(31) |
Jun
(21) |
Jul
(32) |
Aug
(28) |
Sep
(35) |
Oct
(27) |
Nov
(11) |
Dec
(13) |
| 2011 |
Jan
(14) |
Feb
(13) |
Mar
(27) |
Apr
(27) |
May
(28) |
Jun
(20) |
Jul
(43) |
Aug
(52) |
Sep
(66) |
Oct
(61) |
Nov
(11) |
Dec
(8) |
| 2012 |
Jan
(20) |
Feb
(30) |
Mar
(38) |
Apr
(21) |
May
(33) |
Jun
(21) |
Jul
(25) |
Aug
(9) |
Sep
(24) |
Oct
(42) |
Nov
(27) |
Dec
(41) |
| 2013 |
Jan
(20) |
Feb
(35) |
Mar
(156) |
Apr
(298) |
May
(258) |
Jun
(201) |
Jul
(105) |
Aug
(60) |
Sep
(193) |
Oct
(245) |
Nov
(280) |
Dec
(194) |
| 2014 |
Jan
(63) |
Feb
(202) |
Mar
(200) |
Apr
(23) |
May
(53) |
Jun
(105) |
Jul
(18) |
Aug
(26) |
Sep
(110) |
Oct
(187) |
Nov
(97) |
Dec
(74) |
| 2015 |
Jan
(45) |
Feb
(55) |
Mar
(116) |
Apr
(116) |
May
(193) |
Jun
(164) |
Jul
(50) |
Aug
(111) |
Sep
(98) |
Oct
(71) |
Nov
(103) |
Dec
(63) |
| 2016 |
Jan
(33) |
Feb
(101) |
Mar
(182) |
Apr
(139) |
May
(140) |
Jun
(103) |
Jul
(165) |
Aug
(286) |
Sep
(208) |
Oct
(127) |
Nov
(97) |
Dec
(54) |
| 2017 |
Jan
(64) |
Feb
(335) |
Mar
(202) |
Apr
(212) |
May
(139) |
Jun
(127) |
Jul
(294) |
Aug
(154) |
Sep
(170) |
Oct
(152) |
Nov
(156) |
Dec
(62) |
| 2018 |
Jan
(168) |
Feb
(237) |
Mar
(196) |
Apr
(174) |
May
(174) |
Jun
(161) |
Jul
(127) |
Aug
(88) |
Sep
(149) |
Oct
(66) |
Nov
(52) |
Dec
(135) |
| 2019 |
Jan
(146) |
Feb
(126) |
Mar
(104) |
Apr
(58) |
May
(60) |
Jun
(28) |
Jul
(197) |
Aug
(129) |
Sep
(141) |
Oct
(148) |
Nov
(63) |
Dec
(100) |
| 2020 |
Jan
(74) |
Feb
(37) |
Mar
(59) |
Apr
(154) |
May
(194) |
Jun
(133) |
Jul
(313) |
Aug
(197) |
Sep
(49) |
Oct
(162) |
Nov
(143) |
Dec
(57) |
| 2021 |
Jan
(120) |
Feb
(107) |
Mar
(314) |
Apr
(157) |
May
(524) |
Jun
(169) |
Jul
(72) |
Aug
(133) |
Sep
(135) |
Oct
(146) |
Nov
(198) |
Dec
(325) |
| 2022 |
Jan
(409) |
Feb
(249) |
Mar
(138) |
Apr
(95) |
May
(102) |
Jun
(221) |
Jul
(66) |
Aug
(120) |
Sep
(192) |
Oct
(131) |
Nov
(53) |
Dec
(171) |
| 2023 |
Jan
(357) |
Feb
(82) |
Mar
(168) |
Apr
(218) |
May
(196) |
Jun
(86) |
Jul
(115) |
Aug
(49) |
Sep
(190) |
Oct
(102) |
Nov
(45) |
Dec
(76) |
| 2024 |
Jan
(86) |
Feb
(50) |
Mar
(324) |
Apr
(209) |
May
(197) |
Jun
(232) |
Jul
(194) |
Aug
(247) |
Sep
(219) |
Oct
(266) |
Nov
(328) |
Dec
(304) |
| 2025 |
Jan
(191) |
Feb
(115) |
Mar
(137) |
Apr
(32) |
May
(126) |
Jun
(403) |
Jul
(213) |
Aug
(203) |
Sep
(148) |
Oct
(109) |
Nov
(191) |
Dec
(209) |
| 2026 |
Jan
(127) |
Feb
(123) |
Mar
(160) |
Apr
(141) |
May
(45) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <sag...@us...> - 2009-07-23 21:52:03
|
Revision: 301
http://modplug.svn.sourceforge.net/modplug/?rev=301&view=rev
Author: saga-games
Date: 2009-07-23 21:51:50 +0000 (Thu, 23 Jul 2009)
Log Message:
-----------
[Ref] Misc: Cleaned up a few dialogs (mptrack.rc has been changed drastically due to VS2008)
[New] Setup: Option reset ramping and resampling to default values
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Mpdlgs.cpp
trunk/OpenMPT/mptrack/Mpdlgs.h
trunk/OpenMPT/mptrack/Vstplug.cpp
trunk/OpenMPT/mptrack/dlg_misc.cpp
trunk/OpenMPT/mptrack/mptrack.rc
trunk/OpenMPT/mptrack/resource.h
trunk/OpenMPT/soundlib/Load_mt2.cpp
trunk/OpenMPT/soundlib/Sndfile.cpp
Modified: trunk/OpenMPT/mptrack/Mpdlgs.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Mpdlgs.cpp 2009-07-23 13:05:32 UTC (rev 300)
+++ trunk/OpenMPT/mptrack/Mpdlgs.cpp 2009-07-23 21:51:50 UTC (rev 301)
@@ -389,6 +389,7 @@
ON_COMMAND(IDC_CHECK5, OnSettingsChanged)
ON_COMMAND(IDC_CHECK6, OnSettingsChanged)
ON_COMMAND(IDC_CHECK7, OnSettingsChanged)
+ ON_COMMAND(IDC_BUTTON_DEFAULT_RESAMPLING, OnDefaultResampling)
END_MESSAGE_MAP()
@@ -561,6 +562,19 @@
OnSettingsChanged();
}
+void COptionsPlayer::OnDefaultResampling()
+{
+ //CMainFrame::gbWFIRType = 7; //WFIR_KAISER4T
+ //CMainFrame::gdWFIRCutoff = 0.97;
+ //CMainFrame::m_nSrcMode = SRCMODE_POLYPHASE
+ //CMainFrame::glVolumeRampSamples = 42;
+ m_CbnResampling.SetCurSel(SRCMODE_POLYPHASE);
+ OnResamplerChanged();
+ m_CEditWFIRCutoff.SetWindowText("97");
+ m_CEditRamping.SetWindowText("42");
+
+}
+
extern VOID SndMixInitializeTables();
//end rewbs.resamplerConf
void COptionsPlayer::OnOK()
Modified: trunk/OpenMPT/mptrack/Mpdlgs.h
===================================================================
--- trunk/OpenMPT/mptrack/Mpdlgs.h 2009-07-23 13:05:32 UTC (rev 300)
+++ trunk/OpenMPT/mptrack/Mpdlgs.h 2009-07-23 21:51:50 UTC (rev 301)
@@ -65,6 +65,7 @@
//rewbs.resamplerConf
afx_msg void OnWFIRTypeChanged();
afx_msg void OnResamplerChanged();
+ afx_msg void OnDefaultResampling();
//end rewbs.resamplerConf
DECLARE_MESSAGE_MAP()
Modified: trunk/OpenMPT/mptrack/Vstplug.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Vstplug.cpp 2009-07-23 13:05:32 UTC (rev 300)
+++ trunk/OpenMPT/mptrack/Vstplug.cpp 2009-07-23 21:51:50 UTC (rev 301)
@@ -571,18 +571,10 @@
return bOk;
} else
{
- // MOVED to CSoundFile::Create
- /*CString message;
- message.Format("This track uses the plugin \"%s\", which could not be found.\n\rSearch for this plug on kvraudio?", pMixPlugin->Info.szLibraryName);
- if (AfxMessageBox(message, MB_YESNO|MB_ICONQUESTION) == IDYES ) {
- CString url;
- url.Format("http://www.kvraudio.com/search.php?q=%s&lq=db", pMixPlugin->Info.szLibraryName);
- CTrackApp::OpenURL(url);
- }*/
-
- #ifdef VST_LOG
- Log("Unknown plugin\n");
- #endif
+ // "plug not found" notification code MOVED to CSoundFile::Create
+ #ifdef VST_LOG
+ Log("Unknown plugin\n");
+ #endif
}
return FALSE;
}
@@ -1356,10 +1348,10 @@
PVSTPLUGINLIB pPlug = (PVSTPLUGINLIB)m_treePlugins.GetItemData(m_treePlugins.GetSelectedItem());
if ((pManager) && (pManager->IsValidPlugin(pPlug)))
{
- SetDlgItemText(IDC_TEXT1, pPlug->szDllPath);
+ SetDlgItemText(IDC_TEXT_CURRENT_VSTPLUG, pPlug->szDllPath);
} else
{
- SetDlgItemText(IDC_TEXT1, "");
+ SetDlgItemText(IDC_TEXT_CURRENT_VSTPLUG, "");
}
if (result) *result = 0;
}
@@ -1443,13 +1435,16 @@
CDialog::OnSize(nType, cx, cy);
if (m_treePlugins) {
- m_treePlugins.MoveWindow(11, 33, cx-105, cy-63, FALSE);
- ::MoveWindow(GetDlgItem(IDC_NAMEFILTER)->m_hWnd, 50, 11, cx-145, 21, FALSE);
- ::MoveWindow(GetDlgItem(IDC_TEXT1)->m_hWnd, 11,cy-25, cx-22, 25, FALSE);
- ::MoveWindow(GetDlgItem(IDOK)->m_hWnd, cx-85, 11, 75, 23, FALSE);
- ::MoveWindow(GetDlgItem(IDCANCEL)->m_hWnd, cx-85, 39, 75, 23, FALSE);
- ::MoveWindow(GetDlgItem(IDC_BUTTON1)->m_hWnd , cx-85, cy-80, 75, 23, FALSE);
- ::MoveWindow(GetDlgItem(IDC_BUTTON2)->m_hWnd, cx-85, cy-52, 75, 23, FALSE);
+ m_treePlugins.MoveWindow(8, 36, cx - 104, cy - 63, FALSE);
+
+ ::MoveWindow(GetDlgItem(IDC_STATIC_VSTNAMEFILTER)->m_hWnd, 8, 11, 40, 21, FALSE);
+ ::MoveWindow(GetDlgItem(IDC_NAMEFILTER)->m_hWnd, 40, 8, cx - 136, 21, FALSE);
+
+ ::MoveWindow(GetDlgItem(IDC_TEXT_CURRENT_VSTPLUG)->m_hWnd, 8, cy - 20, cx - 22, 25, FALSE);
+ ::MoveWindow(GetDlgItem(IDOK)->m_hWnd, cx-85, 8, 75, 23, FALSE);
+ ::MoveWindow(GetDlgItem(IDCANCEL)->m_hWnd, cx-85, 39, 75, 23, FALSE);
+ ::MoveWindow(GetDlgItem(IDC_BUTTON1)->m_hWnd , cx-85, cy-80, 75, 23, FALSE);
+ ::MoveWindow(GetDlgItem(IDC_BUTTON2)->m_hWnd, cx-85, cy-52, 75, 23, FALSE);
Invalidate();
}
}
Modified: trunk/OpenMPT/mptrack/dlg_misc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/dlg_misc.cpp 2009-07-23 13:05:32 UTC (rev 300)
+++ trunk/OpenMPT/mptrack/dlg_misc.cpp 2009-07-23 21:51:50 UTC (rev 301)
@@ -196,8 +196,8 @@
default: m_PlugMixBox.SetCurSel(0); break;
}
- SetDlgItemText(IDC_EDIT5, "Created with:");
- SetDlgItemText(IDC_EDIT6, "Last saved with:");
+ SetDlgItemText(IDC_STATIC_CREATEDWITH, "Created with:");
+ SetDlgItemText(IDC_STATIC_SAVEDWITH, "Last saved with:");
SetDlgItemText(IDC_EDIT1, MptVersion::ToStr(m_pSndFile->m_dwCreatedWithVersion));
SetDlgItemText(IDC_EDIT2, MptVersion::ToStr(m_pSndFile->m_dwLastSavedWithVersion));
@@ -280,7 +280,7 @@
p->SetWindowText("1. Enable more IT compatible playback.\n"
"2. Use old random variation behavior for instruments.\n"
"3. Enable plugin volume command bug emulation.");
- else if(XM) p->SetWindowText("1. Enable more XM compatible playback.\n"
+ else if(XM) p->SetWindowText("1. Enable more FT2 compatible playback.\n"
"2. Unused\n"
"3. Plugin volume command bug");
}
@@ -530,11 +530,15 @@
BOOL CRemoveChannelsDlg::OnInitDialog()
//-------------------------------------
{
- CHAR label[128];
+ CHAR label[20 + MAX_CHANNELNAME];
CDialog::OnInitDialog();
- for (UINT n=0; n<m_nChannels; n++)
+ for (UINT n = 0; n < m_nChannels; n++)
{
- wsprintf(label,"Channel %d", n+1);
+ if(m_pSndFile->ChnSettings[n].szName[0] > 0x20)
+ wsprintf(label, "Channel %d: %s", (n + 1), m_pSndFile->ChnSettings[n].szName);
+ else
+ wsprintf(label, "Channel %d", n + 1);
+
m_RemChansList.SetItemData(m_RemChansList.AddString(label), n);
if (m_bChnMask[n]) m_RemChansList.SetSel(n);
}
Modified: trunk/OpenMPT/mptrack/mptrack.rc
===================================================================
--- trunk/OpenMPT/mptrack/mptrack.rc 2009-07-23 13:05:32 UTC (rev 300)
+++ trunk/OpenMPT/mptrack/mptrack.rc 2009-07-23 21:51:50 UTC (rev 301)
@@ -13,7 +13,7 @@
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
+// Englisch (USA) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
@@ -194,7 +194,6 @@
MENUITEM "Modplug Central &Forums", ID_NETLINK_FORUMS
MENUITEM "OpenMPT Wiki", ID_NETLINK_OPENMPTWIKI
MENUITEM "OpenMPT Wiki (German)", ID_NETLINK_OPENMPTWIKI_GERMAN
-
MENUITEM "MPT-FR", ID_NETLINK_MPTFR
MENUITEM "&Kvr Audio (plugins)", ID_NETLINK_PLUGINS
MENUITEM "The Mod Archive", ID_NETLINK_MODARCHIVE
@@ -223,7 +222,6 @@
MENUITEM "&Insert Point", ID_ENVELOPE_INSERTPOINT
MENUITEM "&Remove Point", ID_ENVELOPE_REMOVEPOINT
MENUITEM "&Toggle Release Node", ID_ENVELOPE_TOGGLERELEASENODE
-
MENUITEM SEPARATOR
MENUITEM "&Copy envelope", ID_EDIT_COPY
MENUITEM "&Paste envelope", ID_EDIT_PASTE
@@ -239,22 +237,16 @@
//
IDD_ABOUTBOX DIALOGEX 0, 0, 267, 254
-STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE |
- WS_CAPTION | WS_SYSMENU
+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
BEGIN
- CONTROL "",IDC_BITMAP1,"Static",SS_BLACKRECT | SS_NOTIFY |
- SS_CENTERIMAGE,5,3,256,81,WS_EX_CLIENTEDGE
+ 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
DEFPUSHBUTTON "OK",IDOK,229,235,32,14,WS_GROUP
- EDITTEXT IDC_EDIT1,5,194,221,55,ES_CENTER | ES_MULTILINE |
- ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_READONLY | NOT
- WS_BORDER | WS_VSCROLL,WS_EX_STATICEDGE
- EDITTEXT IDC_EDIT2,15,100,233,12,ES_CENTER | ES_AUTOHSCROLL |
- ES_READONLY | NOT WS_BORDER
- EDITTEXT IDC_EDIT3,26,87,212,12,ES_CENTER | ES_AUTOHSCROLL |
- ES_READONLY | NOT WS_BORDER
+ EDITTEXT IDC_EDIT1,5,194,221,55,ES_CENTER | ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | WS_VSCROLL,WS_EX_STATICEDGE
+ EDITTEXT IDC_EDIT2,15,100,233,12,ES_CENTER | ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER
+ EDITTEXT IDC_EDIT3,26,87,212,12,ES_CENTER | ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER
END
IDD_OPTIONS_PLAYER DIALOGEX 0, 0, 272, 279
@@ -262,112 +254,82 @@
CAPTION "Player"
FONT 8, "MS Sans Serif", 0, 0, 0x0
BEGIN
- GROUPBOX "Sound Quality",IDC_STATIC,5,165,256,97
- CONTROL "Automatic Gain Control",IDC_CHECK2,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,15,20,97,10
- CONTROL "Noise reduction",IDC_CHECK5,"Button",BS_AUTOCHECKBOX |
- WS_TABSTOP,15,32,82,10
- LTEXT "Resampling:",IDC_STATIC,11,179,41,8
- COMBOBOX IDC_COMBO1,54,177,120,56,CBS_DROPDOWNLIST | WS_VSCROLL |
- WS_TABSTOP
- CONTROL "Bass Expansion",IDC_CHECK1,"Button",BS_AUTOCHECKBOX |
- WS_TABSTOP,15,53,81,10
+ GROUPBOX "Control",IDC_STATIC,6,6,257,150
+ CONTROL "Automatic Gain Control",IDC_CHECK2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,20,97,10
+ CONTROL "Enable Graphic Equalizer",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,135,20,107,10
+ CONTROL "Noise reduction",IDC_CHECK5,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,32,82,10
+ CONTROL "Bass Expansion",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,53,81,10
+ CONTROL "Slider1",IDC_SLIDER1,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,33,65,62,15
LTEXT "Low",IDC_STATIC,17,67,14,8
- CONTROL "Slider1",IDC_SLIDER1,"msctls_trackbar32",TBS_BOTH |
- TBS_NOTICKS | WS_TABSTOP,33,65,62,15
LTEXT "High",IDC_STATIC,95,67,16,8
- LTEXT "10Hz",IDC_STATIC,131,67,18,8
LTEXT "Range:",IDC_STATIC,169,53,24,8
- CONTROL "Slider2",IDC_SLIDER2,"msctls_trackbar32",TBS_BOTH |
- TBS_NOTICKS | WS_TABSTOP,149,64,62,15
+ CONTROL "Slider2",IDC_SLIDER2,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,149,64,62,15
+ LTEXT "10Hz",IDC_STATIC,131,67,18,8
LTEXT "100Hz",IDC_STATIC,211,66,23,8
- CONTROL "Reverb",IDC_CHECK6,"Button",BS_AUTOCHECKBOX |
- WS_TABSTOP,15,84,62,10
+ CONTROL "Reverb",IDC_CHECK6,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,84,62,10
+ CONTROL "Slider1",IDC_SLIDER3,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,33,96,62,15
LTEXT "Low",IDC_STATIC,17,100,14,8
- CONTROL "Slider1",IDC_SLIDER3,"msctls_trackbar32",TBS_BOTH |
- TBS_NOTICKS | WS_TABSTOP,33,96,62,15
LTEXT "High",IDC_STATIC,95,100,16,8
CTEXT "Reverb Preset:",IDC_STATIC,149,90,62,8
- CONTROL "Pro-Logic Surround",IDC_CHECK4,"Button",BS_AUTOCHECKBOX |
- WS_TABSTOP,15,116,99,10
+ COMBOBOX IDC_COMBO2,135,97,100,100,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ CONTROL "Pro-Logic Surround",IDC_CHECK4,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,116,99,10
+ CONTROL "Slider1",IDC_SLIDER5,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,33,129,62,15
LTEXT "Low",IDC_STATIC,17,132,14,8
- CONTROL "Slider1",IDC_SLIDER5,"msctls_trackbar32",TBS_BOTH |
- TBS_NOTICKS | WS_TABSTOP,33,129,62,15
LTEXT "High",IDC_STATIC,95,132,16,8
- LTEXT "5ms",IDC_STATIC,131,131,18,8
CTEXT "Front/Rear Delay:",IDC_STATIC,147,118,65,8
- CONTROL "Slider2",IDC_SLIDER6,"msctls_trackbar32",TBS_BOTH |
- TBS_NOTICKS | WS_TABSTOP,149,128,62,15
+ CONTROL "Slider2",IDC_SLIDER6,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,149,128,62,15
+ LTEXT "5ms",IDC_STATIC,131,131,18,8
LTEXT "50ms",IDC_STATIC,211,131,23,8
- COMBOBOX IDC_COMBO2,135,97,100,100,CBS_DROPDOWNLIST | WS_VSCROLL |
- WS_TABSTOP
- GROUPBOX "Control",IDC_STATIC,5,5,257,150
- EDITTEXT IDC_WFIRCUTOFF,154,215,19,14,ES_AUTOHSCROLL | ES_NUMBER
- COMBOBOX IDC_WFIRTYPE,54,196,119,64,CBS_DROPDOWN | WS_VSCROLL |
- WS_TABSTOP
- LTEXT "WFIR type:",IDC_STATIC,11,198,37,8
- LTEXT "WFIR cutoff factor:",IDC_STATIC,12,218,62,8
- LTEXT "%",IDC_STATIC,177,218,8,8
- LTEXT "Sample ramping (click avoidance):",IDC_STATIC,12,238,
- 109,8
- EDITTEXT IDC_RAMPING,149,235,24,14,ES_AUTOHSCROLL | ES_NUMBER
- LTEXT "Samples",IDC_STATIC,176,238,29,8
- LTEXT "(can be overridden by instrument setting)",IDC_STATIC,
- 13,248,128,8
- CONTROL "Enable Graphic Equalizer",IDC_CHECK3,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,135,20,107,10
+ GROUPBOX "Sound Quality",IDC_STATIC,6,162,256,108
+ LTEXT "Resampling:",IDC_STATIC,18,182,42,8
+ COMBOBOX IDC_COMBO1,66,180,114,56,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ LTEXT "WFIR type:",IDC_STATIC,18,200,42,8
+ COMBOBOX IDC_WFIRTYPE,66,198,114,64,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
+ LTEXT "WFIR cutoff factor:",IDC_STATIC,18,219,63,8
+ EDITTEXT IDC_WFIRCUTOFF,156,216,24,14,ES_AUTOHSCROLL | ES_NUMBER
+ LTEXT "%",IDC_STATIC,186,219,8,8
+ LTEXT "Sample ramping (click avoidance):",IDC_STATIC,18,238,109,8
+ LTEXT "(can be overridden by instrument setting)",IDC_STATIC,18,248,128,8
+ EDITTEXT IDC_RAMPING,156,235,24,14,ES_AUTOHSCROLL | ES_NUMBER
+ LTEXT "Samples",IDC_STATIC,182,238,29,8
+ PUSHBUTTON "Default Settings",IDC_BUTTON_DEFAULT_RESAMPLING,186,180,66,12
END
IDD_WAVECONVERT DIALOGEX 0, 0, 211, 166
-STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE |
- WS_CAPTION | WS_SYSMENU
+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
BEGIN
DEFPUSHBUTTON "OK",IDOK,155,8,50,14
PUSHBUTTON "Cancel",IDCANCEL,155,28,50,14
GROUPBOX "",IDC_STATIC,4,4,146,157
- CONTROL "Limit file size to: (KBytes)",IDC_CHECK1,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,10,13,111,10
+ CONTROL "Limit file size to: (KBytes)",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,13,111,10
EDITTEXT IDC_EDIT1,21,24,50,12,ES_AUTOHSCROLL
- CONTROL "Limit song length to: (seconds)",IDC_CHECK2,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,10,40,111,10
+ CONTROL "Limit song length to: (seconds)",IDC_CHECK2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,40,111,10
EDITTEXT IDC_EDIT2,21,51,50,12,ES_AUTOHSCROLL
LTEXT "Play:",IDC_STATIC,10,67,37,8
- CONTROL "Entire song",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON,15,
- 78,104,10
- CONTROL "From position",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON,
- 15,91,58,10
- CONTROL "Normalize Output",IDC_CHECK5,"Button",BS_AUTOCHECKBOX |
- NOT WS_VISIBLE | WS_TABSTOP,76,133,73,10
- COMBOBOX IDC_COMBO1,10,106,54,82,CBS_DROPDOWNLIST | WS_VSCROLL |
- WS_TABSTOP
- COMBOBOX IDC_COMBO2,70,106,73,75,CBS_DROPDOWNLIST | WS_VSCROLL |
- WS_TABSTOP
- CONTROL "High quality resampling",IDC_CHECK3,"Button",
- BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,76,122,104,
- 10
+ CONTROL "Entire song",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON,15,78,104,10
+ CONTROL "From position",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON,15,91,58,10
+ CONTROL "Normalize Output",IDC_CHECK5,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,76,133,73,10
+ COMBOBOX IDC_COMBO1,10,106,54,82,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ COMBOBOX IDC_COMBO2,70,106,73,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ CONTROL "High quality resampling",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,76,122,104,10
EDITTEXT IDC_EDIT3,75,90,19,12,ES_AUTOHSCROLL | ES_NUMBER
CTEXT "to",IDC_STATIC,99,91,8,8
EDITTEXT IDC_EDIT4,109,90,19,12,ES_AUTOHSCROLL | ES_NUMBER
- CONTROL "Channel mode",IDC_CHECK4,"Button",BS_AUTOCHECKBOX |
- BS_LEFTTEXT | WS_TABSTOP,82,66,60,12
- DEFPUSHBUTTON "Change Player Options",IDC_PLAYEROPTIONS,10,124,81,14,
- BS_CENTER
+ CONTROL "Channel mode",IDC_CHECK4,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_TABSTOP,82,66,60,12
+ DEFPUSHBUTTON "Change Player Options",IDC_PLAYEROPTIONS,10,124,81,14,BS_CENTER
CONTROL "Slow render (for Kontakt+DFD)",IDC_GIVEPLUGSIDLETIME,
- "Button",BS_AUTOCHECKBOX | BS_LEFT | BS_MULTILINE |
- WS_TABSTOP,10,142,133,17
+ "Button",BS_AUTOCHECKBOX | BS_LEFT | BS_MULTILINE | WS_TABSTOP,10,142,133,17
END
IDD_PROGRESS DIALOG 0, 0, 186, 55
-STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE |
- WS_CAPTION | WS_SYSMENU
+STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Saving Wave File"
FONT 8, "MS Sans Serif"
BEGIN
PUSHBUTTON "Stop",IDCANCEL,68,34,50,14
- CONTROL "Progress1",IDC_PROGRESS1,"msctls_progress32",WS_BORDER,
- 4,19,178,12
+ CONTROL "Progress1",IDC_PROGRESS1,"msctls_progress32",WS_BORDER,4,19,178,12
CTEXT "Writing file...",IDC_TEXT1,4,4,178,9
END
@@ -376,33 +338,24 @@
CAPTION "Keyboard"
FONT 8, "MS Sans Serif", 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
- COMBOBOX IDC_CHOICECOMBO,147,16,79,51,CBS_DROPDOWN | WS_VSCROLL |
- WS_TABSTOP
+ 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
+ COMBOBOX IDC_CHOICECOMBO,147,16,79,51,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
EDITTEXT IDC_CUSTHOTKEY,163,31,98,13,ES_AUTOHSCROLL
- CONTROL "On Key Down",IDC_CHECKKEYDOWN,"Button",BS_AUTOCHECKBOX |
- WS_TABSTOP,147,44,66,14
- CONTROL "On Key Hold",IDC_CHECKKEYHOLD,"Button",BS_AUTOCHECKBOX |
- WS_TABSTOP,147,57,66,10
- CONTROL "On Key Up",IDC_CHECKKEYUP,"Button",BS_AUTOCHECKBOX |
- WS_TABSTOP,147,68,66,8
+ CONTROL "On Key Down",IDC_CHECKKEYDOWN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,147,44,66,14
+ CONTROL "On Key Hold",IDC_CHECKKEYHOLD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,147,57,66,10
+ CONTROL "On Key Up",IDC_CHECKKEYUP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,147,68,66,8
PUSHBUTTON "Restore",IDC_RESTORE,217,46,43,13
PUSHBUTTON "Delete",IDC_DELETE,217,64,43,13
- EDITTEXT IDC_KEYREPORT,141,94,125,70,ES_MULTILINE |
- ES_AUTOVSCROLL | ES_READONLY | WS_VSCROLL
+ EDITTEXT IDC_KEYREPORT,141,94,125,70,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | WS_VSCROLL
PUSHBUTTON "Y",IDC_NOTESREPEAT,235,176,12,9
PUSHBUTTON "N",IDC_NONOTESREPEAT,251,176,12,9
- EDITTEXT IDC_CHORDDETECTWAITTIME,235,189,28,12,ES_AUTOHSCROLL |
- ES_NUMBER,WS_EX_RIGHT
+ EDITTEXT IDC_CHORDDETECTWAITTIME,235,189,28,12,ES_AUTOHSCROLL | ES_NUMBER,WS_EX_RIGHT
PUSHBUTTON "it",IDC_EFFECTLETTERSIT,103,184,12,9,NOT WS_VISIBLE
PUSHBUTTON "xm",IDC_EFFECTLETTERSXM,119,184,12,9,NOT WS_VISIBLE
PUSHBUTTON "Load Keys...",IDC_LOAD,145,221,54,13
PUSHBUTTON "Save Keys As...",IDC_SAVE,205,221,54,13
- CONTROL "Debug Save",IDC_DEBUGSAVE,"Button",BS_AUTOCHECKBOX |
- NOT WS_VISIBLE | WS_TABSTOP,59,199,56,10
+ CONTROL "Debug Save",IDC_DEBUGSAVE,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,59,199,56,10
EDITTEXT IDC_KEYMAPFILE,145,249,114,13,ES_AUTOHSCROLL
LTEXT "Select category:",IDC_STATIC,7,5,74,11
PUSHBUTTON "Set",IDC_SET,225,45,43,13,NOT WS_VISIBLE
@@ -411,12 +364,9 @@
GROUPBOX "Misc",IDC_STATIC,139,167,126,40
GROUPBOX "Multi Config Handling",IDC_STATIC,139,209,126,66
LTEXT "Repeat notes on hold?",IDC_STATIC,143,176,74,11
- LTEXT "Effect letters like:",IDC_STATIC,11,185,73,11,NOT
- WS_VISIBLE
+ LTEXT "Effect letters like:",IDC_STATIC,11,185,73,11,NOT WS_VISIBLE
LTEXT "Chord detect interval (ms):",IDC_STATIC,143,190,88,11
- CONTROL "Save to this file on OK/Apply?",IDC_AUTOSAVE,"Button",
- BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_TABSTOP,153,262,106,
- 10
+ CONTROL "Save to this file on OK/Apply?",IDC_AUTOSAVE,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_TABSTOP,153,262,106,10
LTEXT "Config to load on startup:",IDC_STATIC,145,239,80,8
LTEXT "Log:",IDC_STATIC,141,84,19,10
PUSHBUTTON "Clear Log",IDC_CLEARLOG,227,85,37,9
@@ -427,20 +377,13 @@
CAPTION "Colors"
FONT 8, "MS Sans Serif", 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,20,91,74,10
- EDITTEXT IDC_PRIMARYHILITE,101,90,21,12,ES_AUTOHSCROLL |
- ES_NUMBER
- CONTROL "Secondary highlight",IDC_CHECK4,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,20,103,80,10
- EDITTEXT IDC_SECONDARYHILITE,101,102,21,12,ES_AUTOHSCROLL |
- ES_NUMBER
- CONTROL "Enable effect highlighting",IDC_CHECK2,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,15,60,114,10
- CONTROL "Use small font",IDC_CHECK3,"Button",BS_AUTOCHECKBOX |
- WS_TABSTOP,15,45,102,10
+ COMBOBOX IDC_COMBO1,15,25,134,109,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ CONTROL "Primary highlight",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,20,91,74,10
+ EDITTEXT IDC_PRIMARYHILITE,101,90,21,12,ES_AUTOHSCROLL | ES_NUMBER
+ CONTROL "Secondary highlight",IDC_CHECK4,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,20,103,80,10
+ EDITTEXT IDC_SECONDARYHILITE,101,102,21,12,ES_AUTOHSCROLL | ES_NUMBER
+ CONTROL "Enable effect highlighting",IDC_CHECK2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,60,114,10
+ CONTROL "Use small font",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,45,102,10
PUSHBUTTON "MPT",IDC_BUTTON5,159,26,22,12
PUSHBUTTON "FT2",IDC_BUTTON6,185,26,22,12
PUSHBUTTON "IT",IDC_BUTTON7,210,25,22,12
@@ -456,8 +399,7 @@
LTEXT "rows",IDC_STATIC,125,92,16,8
LTEXT "Presets:",IDC_STATIC,159,15,28,8
LTEXT "rows",IDC_STATIC,125,104,16,8
- CONTROL "",IDC_BUTTON4,"Button",BS_OWNERDRAW | BS_FLAT,65,130,
- 114,43
+ CONTROL "",IDC_BUTTON4,"Button",BS_OWNERDRAW | BS_FLAT,65,130,114,43
CONTROL "Set highlights to songs' time signatures",IDC_CHECK5,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,75,136,10
END
@@ -469,73 +411,50 @@
BEGIN
GROUPBOX "MIDI Recording",IDC_STATIC,5,5,260,200
LTEXT "MIDI Input Device:",IDC_STATIC,15,20,67,8
- COMBOBOX IDC_COMBO1,15,30,120,74,CBS_DROPDOWNLIST | WS_VSCROLL |
- WS_TABSTOP
- LTEXT "MIDI Output Device:",IDC_STATIC,140,20,65,8,NOT
- WS_VISIBLE
- COMBOBOX IDC_COMBO2,140,30,120,73,CBS_DROPDOWNLIST | NOT
- WS_VISIBLE | WS_VSCROLL | WS_TABSTOP
- CONTROL "Apply Octave Transpose on external MIDI keyboard",
- IDC_CHECK4,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,55,
- 185,9
- CONTROL "Amplify MIDI velocity",IDC_CHECK3,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,15,90,100,9
- CONTROL "Record note velocity",IDC_CHECK1,"Button",
- BS_AUTOCHECKBOX | BS_TOP | WS_TABSTOP,15,75,100,9
- CONTROL "Record Note Off (Instruments Only)",IDC_CHECK2,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,15,120,130,9
+ COMBOBOX IDC_COMBO1,15,30,120,74,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ LTEXT "MIDI Output Device:",IDC_STATIC,140,20,65,8,NOT WS_VISIBLE
+ COMBOBOX IDC_COMBO2,140,30,120,73,CBS_DROPDOWNLIST | NOT WS_VISIBLE | WS_VSCROLL | WS_TABSTOP
+ CONTROL "Apply Octave Transpose on external MIDI keyboard",IDC_CHECK4,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,55,185,9
+ CONTROL "Record note velocity",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | BS_TOP | WS_TABSTOP,15,75,100,9
+ CONTROL "Amplify MIDI velocity",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,90,100,9
+ CONTROL "Combine MIDI volume to note velocity",IDC_MIDIVOL_TO_NOTEVOL,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,105,139,9
+ CONTROL "Record Note Off (Instruments Only)",IDC_CHECK2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,120,130,9
+ CONTROL "Record MIDI controller changes as MIDI macro changes (in pattern)",IDC_MIDI_MACRO_CONTROL,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,140,226,9
+ CONTROL "Pass MIDI to active instrument plugin (experimental)",IDC_MIDI_TO_PLUGIN,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,155,180,9
+ CONTROL "Respond to play/continue/stop song messages (untested)",IDC_MIDIPLAYCONTROL,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,170,200,9
+ CONTROL "Continue song as soon as MIDI notes are being received",IDC_MIDIPLAYPATTERNONMIDIIN,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,185,195,10
GROUPBOX "MIDI file import",IDC_STATIC,5,210,260,45
LTEXT "Speed:",IDC_STATIC,15,230,24,8
EDITTEXT IDC_EDIT1,45,230,39,12,ES_AUTOHSCROLL | ES_NUMBER
- CONTROL "Spin1",IDC_SPIN1,"msctls_updown32",UDS_SETBUDDYINT |
- UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,79,235,
- 11,14
+ CONTROL "Spin1",IDC_SPIN1,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,79,235,11,14
LTEXT "Pattern size:",IDC_STATIC,115,230,40,8
EDITTEXT IDC_EDIT2,165,230,39,12,ES_AUTOHSCROLL | ES_NUMBER
- CONTROL "Spin1",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT |
- UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,196,232,
- 11,14
- CONTROL "Pass MIDI to active instrument plugin (experimental)",
- IDC_MIDI_TO_PLUGIN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,
- 15,155,180,9
- CONTROL "Combine MIDI volume to note velocity",
- IDC_MIDIVOL_TO_NOTEVOL,"Button",BS_AUTOCHECKBOX |
- WS_TABSTOP,15,105,139,9
- CONTROL "Respond to play/continue/stop song messages (untested)",
- IDC_MIDIPLAYCONTROL,"Button",BS_AUTOCHECKBOX |
- WS_TABSTOP,15,170,200,9
- CONTROL "Record MIDI controller changes as MIDI macro changes (in pattern)",
- IDC_MIDI_MACRO_CONTROL,"Button",BS_AUTOCHECKBOX |
- WS_TABSTOP,15,140,226,9
- CONTROL "Continue song as soon as MIDI notes are being received",
- IDC_MIDIPLAYPATTERNONMIDIIN,"Button",BS_AUTOCHECKBOX |
- WS_TABSTOP,15,185,195,10
+ CONTROL "Spin1",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,196,232,11,14
END
-IDD_LOADRAWSAMPLE DIALOG 0, 0, 168, 84
+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"
+FONT 8, "MS Sans Serif", 0, 0, 0x0
BEGIN
- DEFPUSHBUTTON "OK",IDOK,59,65,50,14
- PUSHBUTTON "Cancel",IDCANCEL,114,65,50,14
- GROUPBOX "",IDC_STATIC,4,26,48,34,WS_GROUP
- LTEXT "Load it as a raw sample\nof the following format:",
- IDC_STATIC,10,10,81,17
- CONTROL "8-bit",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON,10,34,29,
- 10
- CONTROL "16-bit",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON,10,46,33,
- 10
- GROUPBOX "",IDC_STATIC,55,26,54,34,WS_GROUP
- CONTROL "Unsigned",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON,59,34,
- 46,10
- CONTROL "Signed",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON,59,46,38,
- 10
- GROUPBOX "",IDC_STATIC,113,26,51,34,WS_GROUP
- CONTROL "Mono",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON,119,34,34,
- 10
- CONTROL "Stereo",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON,119,46,
- 37,10
+ DEFPUSHBUTTON "OK",IDOK,66,66,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,120,66,50,14
+ GROUPBOX "",IDC_STATIC,6,24,48,34,WS_GROUP
+ LTEXT "Load it as a raw sample of the following format:",IDC_STATIC,6,6,156,12
+ CONTROL "8-bit",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON,12,32,29,10
+ CONTROL "16-bit",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON,12,44,33,10
+ GROUPBOX "",IDC_STATIC,60,24,54,34,WS_GROUP
+ CONTROL "Unsigned",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON,64,32,46,10
+ CONTROL "Signed",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON,64,44,38,10
+ GROUPBOX "",IDC_STATIC,120,24,51,34,WS_GROUP
+ CONTROL "Mono",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON,126,32,34,10
+ CONTROL "Stereo",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON,126,44,37,10
END
IDD_CONTROL_GLOBALS DIALOGEX 0, 0, 561, 94
@@ -543,84 +462,52 @@
FONT 8, "MS Sans Serif", 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
+ CTEXT "Type EXT, ## channels",IDC_EDIT_MODTYPE,173,3,149,12,SS_CENTERIMAGE,WS_EX_STATICEDGE
GROUPBOX "",IDC_STATIC,1,14,83,78
LTEXT "Initial tempo:",IDC_STATIC,4,20,44,8
- CONTROL "",IDC_SLIDER_SONGTEMPO,"msctls_trackbar32",TBS_VERT |
- TBS_BOTH | TBS_NOTICKS,11,28,15,50
+ CONTROL "",IDC_SLIDER_SONGTEMPO,"msctls_trackbar32",TBS_VERT | TBS_BOTH | TBS_NOTICKS,11,28,15,50
EDITTEXT IDC_EDIT_TEMPO,5,78,29,12,ES_NUMBER
- CONTROL "",IDC_SPIN_TEMPO,"msctls_updown32",UDS_SETBUDDYINT |
- UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,27,76,
- 11,14
+ CONTROL "",IDC_SPIN_TEMPO,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,27,76,11,14
LTEXT "Ticks/row:",IDC_STATIC,44,40,35,8
EDITTEXT IDC_EDIT_SPEED,44,51,30,12,ES_NUMBER
- CONTROL "Spin1",IDC_SPIN_SPEED,"msctls_updown32",UDS_SETBUDDYINT |
- UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,67,50,
- 11,14
+ CONTROL "Spin1",IDC_SPIN_SPEED,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,67,50,11,14
LTEXT "Restart:",IDC_STATIC,44,70,26,8
EDITTEXT IDC_EDIT_RESTARTPOS,44,78,30,12,ES_NUMBER
- CONTROL "Spin1",IDC_SPIN_RESTARTPOS,"msctls_updown32",
- UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY |
- UDS_NOTHOUSANDS,65,77,11,14
+ CONTROL "Spin1",IDC_SPIN_RESTARTPOS,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,65,77,11,14
GROUPBOX "",IDC_STATIC,83,14,175,78
LTEXT "Initial global vol:",IDC_STATIC,90,20,52,8
- CONTROL "",IDC_SLIDER_GLOBALVOL,"msctls_trackbar32",TBS_VERT |
- TBS_BOTH | TBS_NOTICKS | TBS_TOOLTIPS,105,28,15,50
+ CONTROL "",IDC_SLIDER_GLOBALVOL,"msctls_trackbar32",TBS_VERT | TBS_BOTH | TBS_NOTICKS | TBS_TOOLTIPS,105,28,15,50
EDITTEXT IDC_EDIT_GLOBALVOL,95,78,36,12,ES_NUMBER
- CONTROL "",IDC_SPIN_GLOBALVOL,"msctls_updown32",UDS_SETBUDDYINT |
- UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,120,76,
- 11,14
+ CONTROL "",IDC_SPIN_GLOBALVOL,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,120,76,11,14
LTEXT "VSTi vol:",IDC_STATIC,159,20,33,8
- CONTROL "",IDC_SLIDER_VSTIVOL,"msctls_trackbar32",TBS_VERT |
- TBS_BOTH | TBS_NOTICKS | TBS_TOOLTIPS,164,28,15,50
+ CONTROL "",IDC_SLIDER_VSTIVOL,"msctls_trackbar32",TBS_VERT | TBS_BOTH | TBS_NOTICKS | TBS_TOOLTIPS,164,28,15,50
EDITTEXT IDC_EDIT_VSTIVOL,156,78,36,12,ES_NUMBER
- CONTROL "",IDC_SPIN_VSTIVOL,"msctls_updown32",UDS_SETBUDDYINT |
- UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,180,76,
- 11,14
+ CONTROL "",IDC_SPIN_VSTIVOL,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,180,76,11,14
LTEXT "Sample vol:",IDC_STATIC,212,20,38,8
- CONTROL "Slider1",IDC_SLIDER_SAMPLEPREAMP,"msctls_trackbar32",
- TBS_VERT | TBS_BOTH | TBS_NOTICKS | TBS_TOOLTIPS,221,28,
- 15,50
+ CONTROL "Slider1",IDC_SLIDER_SAMPLEPREAMP,"msctls_trackbar32",TBS_VERT | TBS_BOTH | TBS_NOTICKS | TBS_TOOLTIPS,221,28,15,50
EDITTEXT IDC_EDIT_SAMPLEPA,212,78,36,12,ES_NUMBER
- CONTROL "",IDC_SPIN_SAMPLEPA,"msctls_updown32",UDS_SETBUDDYINT |
- UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,238,75,
- 11,14
- PUSHBUTTON "Song Properties...",IDC_BUTTON_MODTYPE,262,18,60,12,NOT
- WS_TABSTOP
- CONTROL "Loop Song",IDC_CHECK_LOOPSONG,"Button",BS_AUTOCHECKBOX |
- BS_FLAT | WS_TABSTOP,263,48,50,10
- PUSHBUTTON "Player Settings...",IDC_BUTTON_PLAYERPROPS,262,59,60,12,
- NOT WS_TABSTOP
+ CONTROL "",IDC_SPIN_SAMPLEPA,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,238,75,11,14
+ PUSHBUTTON "Song Properties...",IDC_BUTTON_MODTYPE,262,18,60,12,NOT WS_TABSTOP
+ CONTROL "Loop Song",IDC_CHECK_LOOPSONG,"Button",BS_AUTOCHECKBOX | BS_FLAT | WS_TABSTOP,263,48,50,10
+ PUSHBUTTON "Player Settings...",IDC_BUTTON_PLAYERPROPS,262,59,60,12,NOT WS_TABSTOP
CTEXT "Not saved with song!",IDC_STATIC,262,73,60,17
- CONTROL "",IDC_VUMETER_LEFT,"Static",SS_BLACKRECT | SS_SUNKEN,
- 325,1,15,91
- CONTROL "",IDC_VUMETER_RIGHT,"Static",SS_BLACKRECT | SS_SUNKEN,
- 343,1,15,91
- GROUPBOX "Player Settings (not saved in song!)",IDC_STATIC,414,31,
- 147,63,NOT WS_VISIBLE
- CONTROL "Bass Expansion",IDC_CHECK_BASS,"Button",BS_AUTOCHECKBOX |
- BS_FLAT | NOT WS_VISIBLE | WS_TABSTOP,420,43,65,10
- CONTROL "Reverb",IDC_CHECK_REVERB,"Button",BS_AUTOCHECKBOX |
- BS_FLAT | NOT WS_VISIBLE | WS_TABSTOP,420,55,46,10
- CONTROL "Surround",IDC_CHECK_SURROUND,"Button",BS_AUTOCHECKBOX |
- BS_FLAT | NOT WS_VISIBLE | WS_TABSTOP,420,67,48,10
- COMBOBOX IDC_COMBO_RESAMPLING,490,76,67,74,CBS_DROPDOWNLIST | NOT
- WS_VISIBLE | WS_TABSTOP
+ CONTROL "",IDC_VUMETER_LEFT,"Static",SS_BLACKRECT | SS_SUNKEN,325,1,15,91
+ CONTROL "",IDC_VUMETER_RIGHT,"Static",SS_BLACKRECT | SS_SUNKEN,343,1,15,91
+ GROUPBOX "Player Settings (not saved in song!)",IDC_STATIC,414,31,147,63,NOT WS_VISIBLE
+ CONTROL "Bass Expansion",IDC_CHECK_BASS,"Button",BS_AUTOCHECKBOX | BS_FLAT | NOT WS_VISIBLE | WS_TABSTOP,420,43,65,10
+ CONTROL "Reverb",IDC_CHECK_REVERB,"Button",BS_AUTOCHECKBOX | BS_FLAT | NOT WS_VISIBLE | WS_TABSTOP,420,55,46,10
+ CONTROL "Surround",IDC_CHECK_SURROUND,"Button",BS_AUTOCHECKBOX | BS_FLAT | NOT WS_VISIBLE | WS_TABSTOP,420,67,48,10
+ COMBOBOX IDC_COMBO_RESAMPLING,490,76,67,74,CBS_DROPDOWNLIST | NOT WS_VISIBLE | WS_TABSTOP
LTEXT "Resampling:",IDC_STATIC,491,67,43,8,NOT WS_VISIBLE
- CONTROL "Graphic EQ",IDC_CHECK_EQ,"Button",BS_AUTOCHECKBOX |
- BS_FLAT | NOT WS_VISIBLE | WS_TABSTOP,420,79,58,10
- CONTROL "AGC",IDC_CHECK_AGC,"Button",BS_AUTOCHECKBOX | BS_FLAT |
- NOT WS_VISIBLE | WS_TABSTOP,491,43,31,10
+ CONTROL "Graphic EQ",IDC_CHECK_EQ,"Button",BS_AUTOCHECKBOX | BS_FLAT | NOT WS_VISIBLE | WS_TABSTOP,420,79,58,10
+ CONTROL "AGC",IDC_CHECK_AGC,"Button",BS_AUTOCHECKBOX | BS_FLAT | NOT WS_VISIBLE | WS_TABSTOP,491,43,31,10
END
IDD_CONTROL_COMMENTS DIALOGEX 0, 0, 435, 119
STYLE DS_SETFONT | WS_CHILD
FONT 8, "MS Sans Serif", 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
+ 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
END
@@ -628,150 +515,92 @@
STYLE DS_SETFONT | WS_CHILD
FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
- CONTROL "Follow Song",IDC_PATTERN_FOLLOWSONG,"Button",
- BS_AUTOCHECKBOX | BS_LEFTTEXT | BS_FLAT,432,34,55,10
- COMBOBOX IDC_COMBO_INSTRUMENT,22,74,95,137,CBS_DROPDOWNLIST |
- WS_VSCROLL
- CTEXT "Row spacing",IDC_STATIC,172,32,54,12,SS_CENTERIMAGE,
- WS_EX_STATICEDGE
- EDITTEXT IDC_EDIT_SPACING,225,32,40,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,256,33,9,11
- PUSHBUTTON "<<",IDC_BUTTON2,2,99,14,15,NOT WS_TABSTOP,
- WS_EX_STATICEDGE
- PUSHBUTTON ">>",IDC_BUTTON1,14,99,14,15,NOT WS_TABSTOP,
- WS_EX_STATICEDGE
- CTEXT "Pattern name",IDC_STATIC,9,32,52,12,SS_CENTERIMAGE,
- WS_EX_STATICEDGE
+ CONTROL "Follow Song",IDC_PATTERN_FOLLOWSONG,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | BS_FLAT,432,34,55,10
+ COMBOBOX IDC_COMBO_INSTRUMENT,22,74,95,137,CBS_DROPDOWNLIST | WS_VSCROLL
+ CTEXT "Row spacing",IDC_STATIC,172,32,54,12,SS_CENTERIMAGE,WS_EX_STATICEDGE
+ EDITTEXT IDC_EDIT_SPACING,225,32,40,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,256,33,9,11
+ PUSHBUTTON "<<",IDC_BUTTON2,2,99,14,15,NOT WS_TABSTOP,WS_EX_STATICEDGE
+ PUSHBUTTON ">>",IDC_BUTTON1,14,99,14,15,NOT WS_TABSTOP,WS_EX_STATICEDGE
+ CTEXT "Pattern name",IDC_STATIC,9,32,52,12,SS_CENTERIMAGE,WS_EX_STATICEDGE
EDITTEXT IDC_EDIT_PATTERNNAME,60,32,107,12,ES_AUTOHSCROLL
- CONTROL "Toolbar1",IDC_TOOLBAR1,"ToolbarWindow32",WS_GROUP |
- 0x4d,2,4,372,18
- CONTROL "Spin1",IDC_SPIN_INSTRUMENT,"msctls_updown32",0x0,9,74,9,
- 12
- COMBOBOX IDC_COMBO_SPLITINSTRUMENT,209,74,95,125,CBS_DROPDOWNLIST |
- WS_VSCROLL
- COMBOBOX IDC_COMBO_SPLITNOTE,173,74,32,137,CBS_DROPDOWNLIST |
- WS_VSCROLL
+ CONTROL "Toolbar1",IDC_TOOLBAR1,"ToolbarWindow32",WS_GROUP | 0x4d,2,4,372,18
+ CONTROL "Spin1",IDC_SPIN_INSTRUMENT,"msctls_updown32",0x0,9,74,9,12
+ COMBOBOX IDC_COMBO_SPLITINSTRUMENT,209,74,95,125,CBS_DROPDOWNLIST | WS_VSCROLL
+ COMBOBOX IDC_COMBO_SPLITNOTE,173,74,32,137,CBS_DROPDOWNLIST | WS_VSCROLL
LTEXT "Note",IDC_STATIC,173,65,35,8
LTEXT "Instrument",IDC_STATIC,209,65,58,8
- CONTROL "Transpose",IDC_PATTERN_OCTAVELINK,"Button",
- BS_AUTOCHECKBOX | BS_LEFTTEXT | BS_FLAT,438,76,49,10
- COMBOBOX IDC_COMBO_OCTAVEMODIFIER,382,74,52,137,CBS_DROPDOWNLIST |
- WS_VSCROLL
- COMBOBOX IDC_COMBO_SPLITVOLUME,342,74,36,146,CBS_DROPDOWNLIST |
- WS_VSCROLL
+ CONTROL "Transpose",IDC_PATTERN_OCTAVELINK,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | BS_FLAT,438,76,49,10
+ COMBOBOX IDC_COMBO_OCTAVEMODIFIER,382,74,52,137,CBS_DROPDOWNLIST | WS_VSCROLL
+ COMBOBOX IDC_COMBO_SPLITVOLUME,342,74,36,146,CBS_DROPDOWNLIST | WS_VSCROLL
LTEXT "Volume",IDC_STATIC,342,65,25,8
- PUSHBUTTON "Plugin",IDC_PATINSTROPLUGGUI,122,74,33,13,0,
- WS_EX_STATICEDGE
- PUSHBUTTON "Plugin",IDC_PATINSTROPLUGGUI2,308,74,30,13,0,
- WS_EX_STATICEDGE
+ PUSHBUTTON "Plugin",IDC_PATINSTROPLUGGUI,122,74,33,13,0,WS_EX_STATICEDGE
+ PUSHBUTTON "Plugin",IDC_PATINSTROPLUGGUI2,308,74,30,13,0,WS_EX_STATICEDGE
GROUPBOX "Main instrument",IDC_STATIC,2,53,160,40
GROUPBOX "Keyboard Split",IDC_STATIC,167,53,328,40
LTEXT "Octave shift",IDC_STATIC,382,65,52,8
GROUPBOX "",IDC_STATIC,2,22,493,27
- CONTROL "Loop Pattern",IDC_PATTERN_LOOP,"Button",BS_AUTOCHECKBOX |
- BS_LEFTTEXT | BS_FLAT | WS_TABSTOP,355,34,57,10
- EDITTEXT IDC_EDIT_ORDERLIST_MARGINS,2,113,28,12,ES_AUTOHSCROLL |
- ES_READONLY
- CONTROL "",IDC_SPIN_ORDERLIST_MARGINS,"msctls_updown32",
- UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY |
- UDS_NOTHOUSANDS,15,118,11,11
+ CONTROL "Loop Pattern",IDC_PATTERN_LOOP,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | BS_FLAT | WS_TABSTOP,355,34,57,10
+ EDITTEXT IDC_EDIT_ORDERLIST_MARGINS,2,113,28,12,ES_AUTOHSCROLL | ES_READONLY
+ CONTROL "",IDC_SPIN_ORDERLIST_MARGINS,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,15,118,11,11
END
IDD_CONTROL_SAMPLES DIALOGEX 0, 0, 544, 106
STYLE DS_SETFONT | WS_CHILD
FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
- CONTROL "Toolbar1",IDC_TOOLBAR1,"ToolbarWindow32",WS_GROUP |
- 0x4d,4,4,55,17
+ CONTROL "Toolbar1",IDC_TOOLBAR1,"ToolbarWindow32",WS_GROUP | 0x4d,4,4,55,17
EDITTEXT IDC_EDIT_SAMPLE,90,6,35,12,ES_AUTOHSCROLL | ES_NUMBER
- CONTROL "Spin6",IDC_SPIN_SAMPLE,"msctls_updown32",UDS_WRAP |
- UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY |
- UDS_NOTHOUSANDS,118,4,11,14
+ CONTROL "Spin6",IDC_SPIN_SAMPLE,"msctls_updown32",UDS_WRAP | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,118,4,11,14
COMBOBOX IDC_COMBO_ZOOM,131,6,41,89,CBS_DROPDOWNLIST | WS_VSCROLL
EDITTEXT IDC_EDIT7,57,30,36,12,ES_NUMBER
- CONTROL "Spin1",IDC_SPIN7,"msctls_updown32",UDS_SETBUDDYINT |
- UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,87,29,
- 11,11
+ CONTROL "Spin1",IDC_SPIN7,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,87,29,11,11
EDITTEXT IDC_EDIT8,57,43,36,12,ES_NUMBER
- CONTROL "Spin1",IDC_SPIN8,"msctls_updown32",UDS_SETBUDDYINT |
- UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,87,42,
- 11,11
- CONTROL "Set Pan",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | BS_FLAT |
- WS_TABSTOP,9,58,42,10
+ CONTROL "Spin1",IDC_SPIN8,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,87,42,11,11
+ CONTROL "Set Pan",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | BS_FLAT | WS_TABSTOP,9,58,42,10
EDITTEXT IDC_EDIT9,57,56,36,12,ES_NUMBER
- CONTROL "Spin1",IDC_SPIN9,"msctls_updown32",UDS_SETBUDDYINT |
- UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,87,56,
- 11,11
+ CONTROL "Spin1",IDC_SPIN9,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,87,56,11,11
EDITTEXT IDC_EDIT5,48,70,45,12,ES_AUTOHSCROLL
- CONTROL "Spin1",IDC_SPIN5,"msctls_updown32",UDS_ALIGNRIGHT |
- UDS_AUTOBUDDY | UDS_NOTHOUSANDS,87,69,11,11
- COMBOBOX IDC_COMBO_BASENOTE,48,83,45,89,CBS_DROPDOWNLIST |
- WS_VSCROLL
+ CONTROL "Spin1",IDC_SPIN5,"msctls_updown32",UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,87,69,11,11
+ COMBOBOX IDC_COMBO_BASENOTE,48,83,45,89,CBS_DROPDOWNLIST | WS_VSCROLL
EDITTEXT IDC_SAMPLE_NAME,129,26,135,12,ES_AUTOHSCROLL
EDITTEXT IDC_SAMPLE_FILENAME,292,26,72,13,ES_AUTOHSCROLL
COMBOBOX IDC_COMBO1,130,54,45,46,CBS_DROPDOWNLIST | WS_TABSTOP
EDITTEXT IDC_EDIT1,130,70,45,12,ES_NUMBER
- CONTROL "Spin1",IDC_SPIN1,"msctls_updown32",UDS_ALIGNRIGHT |
- UDS_AUTOBUDDY | UDS_NOTHOUSANDS,169,69,11,11
+ CONTROL "Spin1",IDC_SPIN1,"msctls_updown32",UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,169,69,11,11
EDITTEXT IDC_EDIT2,130,83,45,12,ES_NUMBER
- CONTROL "Spin1",IDC_SPIN2,"msctls_updown32",UDS_ALIGNRIGHT |
- UDS_AUTOBUDDY | UDS_NOTHOUSANDS,169,84,11,11
+ CONTROL "Spin1",IDC_SPIN2,"msctls_updown32",UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,169,84,11,11
COMBOBOX IDC_COMBO2,212,54,45,46,CBS_DROPDOWNLIST | WS_TABSTOP
EDITTEXT IDC_EDIT3,212,70,45,12,ES_NUMBER
- CONTROL "Spin1",IDC_SPIN3,"msctls_updown32",UDS_ALIGNRIGHT |
- UDS_AUTOBUDDY | UDS_NOTHOUSANDS,253,70,11,11
+ CONTROL "Spin1",IDC_SPIN3,"msctls_updown32",UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,253,70,11,11
EDITTEXT IDC_EDIT4,212,83,45,12,ES_NUMBER
- CONTROL "Spin1",IDC_SPIN4,"msctls_updown32",UDS_ALIGNRIGHT |
- UDS_AUTOBUDDY | UDS_NOTHOUSANDS,253,83,11,11
+ CONTROL "Spin1",IDC_SPIN4,"msctls_updown32",UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,253,83,11,11
COMBOBOX IDC_COMBO3,275,59,47,70,CBS_DROPDOWNLIST | WS_TABSTOP
EDITTEXT IDC_EDIT15,327,59,32,12,ES_NUMBER
- CONTROL "Depth",IDC_SPIN12,"msctls_updown32",UDS_SETBUDDYINT |
- UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,353,59,
- 11,11
+ CONTROL "Depth",IDC_SPIN12,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,353,59,11,11
EDITTEXT IDC_EDIT14,275,83,38,12,ES_NUMBER
- CONTROL "Sweep",IDC_SPIN11,"msctls_updown32",UDS_SETBUDDYINT |
- UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,305,84,
- 11,11
+ CONTROL "Sweep",IDC_SPIN11,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,305,84,11,11
EDITTEXT IDC_EDIT16,321,83,38,12,ES_NUMBER
- CONTROL "Rate",IDC_SPIN13,"msctls_updown32",UDS_SETBUDDYINT |
- UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,353,83,
- 11,11
- CONTROL "Time stretching",IDC_CHECK3,"Button",BS_AUTOCHECKBOX |
- BS_LEFTTEXT | BS_FLAT | NOT WS_VISIBLE | WS_TABSTOP,446,
- 36,68,11
- CONTROL "Preview mode",IDC_CHECK2,"Button",BS_AUTOCHECKBOX |
- BS_LEFTTEXT | BS_FLAT | NOT WS_VISIBLE | WS_TABSTOP,373,
- 83,65,11
- PUSHBUTTON "Restore",IDC_BUTTON4,482,82,33,13,NOT WS_VISIBLE,
- WS_EX_CLIENTEDGE
- COMBOBOX IDC_COMBO4,400,35,39,61,CBS_DROPDOWNLIST | NOT
- WS_VISIBLE | WS_VSCROLL | WS_GROUP | WS_TABSTOP
- COMBOBOX IDC_COMBO5,400,51,39,86,CBS_DROPDOWNLIST | NOT
- WS_VISIBLE | WS_VSCROLL | WS_GROUP | WS_TABSTOP
- COMBOBOX IDC_COMBO6,400,67,39,61,CBS_DROPDOWNLIST | NOT
- WS_VISIBLE | WS_VSCROLL | WS_GROUP | WS_TABSTOP
+ CONTROL "Rate",IDC_SPIN13,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,353,83,11,11
+ CONTROL "Time stretching",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | BS_FLAT | NOT WS_VISIBLE | WS_TABSTOP,446,36,68,11
+ CONTROL "Preview mode",IDC_CHECK2,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | BS_FLAT | NOT WS_VISIBLE | WS_TABSTOP,373,83,65,11
+ PUSHBUTTON "Restore",IDC_BUTTON4,482,82,33,13,NOT WS_VISIBLE,WS_EX_CLIENTEDGE
+ COMBOBOX IDC_COMBO4,400,35,39,61,CBS_DROPDOWNLIST | NOT WS_VISIBLE | WS_VSCROLL | WS_GROUP | WS_TABSTOP
+ COMBOBOX IDC_COMBO5,400,51,39,86,CBS_DROPDOWNLIST | NOT WS_VISIBLE | WS_VSCROLL | WS_GROUP | WS_TABSTOP
+ COMBOBOX IDC_COMBO6,400,67,39,61,CBS_DROPDOWNLIST | NOT WS_VISIBLE | WS_VSCROLL | WS_GROUP | WS_TABSTOP
EDITTEXT IDC_EDIT_STRETCHPARAMS,374,51,64,12,ES_AUTOHSCROLL
- EDITTEXT IDC_EDIT6,446,51,45,12,ES_RIGHT | ES_AUTOHSCROLL | NOT
- WS_VISIBLE,WS_EX_RIGHT
- PUSHBUTTON "...",IDC_BUTTON2,502,51,13,13,NOT WS_VISIBLE,
- WS_EX_CLIENTEDGE
+ EDITTEXT IDC_EDIT6,446,51,45,12,ES_RIGHT | ES_AUTOHSCROLL | NOT WS_VISIBLE,WS_EX_RIGHT
+ PUSHBUTTON "...",IDC_BUTTON2,502,51,13,13,NOT WS_VISIBLE,WS_EX_CLIENTEDGE
RTEXT "Sample",IDC_STATIC,62,8,24,8
- CTEXT "Length: 000000 (16-bit)",IDC_TEXT5,175,6,90,13,
- SS_CENTERIMAGE,WS_EX_STATICEDGE
- CONTROL "Toolbar2",IDC_TOOLBAR2,"ToolbarWindow32",WS_GROUP |
- 0x4d,268,4,186,17
+ CTEXT "Length: 000000 (16-bit)",IDC_TEXT5,175,6,90,13,SS_CENTERIMAGE,WS_EX_STATICEDGE
+ CONTROL "Toolbar2",IDC_TOOLBAR2,"ToolbarWindow32",WS_GROUP | 0x4d,268,4,186,17
GROUPBOX "",IDC_STATIC,3,22,94,78
LTEXT "Default Volume",IDC_STATIC,8,32,49,8
LTEXT "Global Volume",IDC_STATIC,8,45,46,8
LTEXT "FineTune",IDC_TEXT7,8,73,37,8
LTEXT "Transpose",IDC_TEXT6,8,86,38,8
- CTEXT "Name",IDC_STATIC,102,26,28,12,SS_CENTERIMAGE | NOT
- WS_GROUP,WS_EX_STATICEDGE
- CTEXT "File",IDC_STATIC,269,26,23,13,SS_CENTERIMAGE | NOT
- WS_GROUP | WS_TABSTOP,WS_EX_STATICEDGE
+ CTEXT "Name",IDC_STATIC,102,26,28,12,SS_CENTERIMAGE | NOT WS_GROUP,WS_EX_STATICEDGE
+ CTEXT "File",IDC_STATIC,269,26,23,13,SS_CENTERIMAGE | NOT WS_GROUP | WS_TABSTOP,WS_EX_STATICEDGE
GROUPBOX "Loop",IDC_STATIC,102,43,79,57
LTEXT "Type",IDC_STATIC,107,57,17,8
LTEXT "Start",IDC_STATIC,107,73,16,8
@@ -785,16 +614,13 @@
LTEXT "Sweep",IDC_STATIC,275,74,23,8
LTEXT "Depth",IDC_STATIC,327,50,20,8
LTEXT "Rate",IDC_STATIC,321,74,16,8
- GROUPBOX "Pitch shifting / Time stretching",
- IDC_GROUPBOX_PITCH_TIME,370,22,150,78,NOT WS_VISIBLE
- PUSHBUTTON "Process",IDC_BUTTON1,448,80,67,16,NOT WS_VISIBLE,
- WS_EX_CLIENTEDGE
+ GROUPBOX "Pitch shifting / Time stretching",IDC_GROUPBOX_PITCH_TIME,370,22,150,78,NOT WS_VISIBLE
+ PUSHBUTTON "Process",IDC_BUTTON1,448,80,67,16,NOT WS_VISIBLE,WS_EX_CLIENTEDGE
LTEXT "Pitch",IDC_TEXT_PITCH,373,36,23,10,NOT WS_VISIBLE
LTEXT "Quality",IDC_TEXT_QUALITY,374,54,23,10,NOT WS_VISIBLE
LTEXT "FFT",IDC_TEXT_FFT,374,68,23,10,NOT WS_VISIBLE
CTEXT "Static",IDC_TEXT_PREVIEW,448,69,67,10,NOT WS_VISIBLE
- PUSHBUTTON "Keep",IDC_BUTTON3,448,82,32,13,NOT WS_VISIBLE,
- WS_EX_CLIENTEDGE
+ PUSHBUTTON "Keep",IDC_BUTTON3,448,82,32,13,NOT WS_VISIBLE,WS_EX_CLIENTEDGE
LTEXT "%",IDC_TEXT_PERCENT,494,53,8,10,NOT WS_VISIBLE
LTEXT "Parameters",IDC_TEXT_STRETCHPARAMS,385,38,39,8
END
@@ -803,219 +629,142 @@
STYLE DS_SETFONT | WS_CHILD
FONT 8, "MS Sans Serif", 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
+ 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
EDITTEXT IDC_SAMPLE_NAME,131,6,151,12,ES_AUTOHSCROLL
EDITTEXT IDC_SAMPLE_FILENAME,324,6,105,12,ES_AUTOHSCROLL
EDITTEXT IDC_EDIT8,87,36,34,12,ES_NUMBER
- CONTROL "Spin1",IDC_SPIN8,"msctls_updown32",UDS_SETBUDDYINT |
- UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,112,40,
- 8,10
+ CONTROL "Spin1",IDC_SPIN8,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,112,40,8,10
EDITTEXT IDC_EDIT7,87,53,34,12,ES_NUMBER
- CONTROL "Spin1",IDC_SPIN7,"msctls_updown32",UDS_SETBUDDYINT |
- UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,112,57,
- 8,10
- CONTROL "Pan",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | BS_FLAT |
- WS_TABSTOP,55,71,29,10
+ CONTROL "Spin1",IDC_SPIN7,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,112,57,8,10
+ CONTROL "Pan",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | BS_FLAT | WS_TABSTOP,55,71,29,10
EDITTEXT IDC_EDIT9,87,70,34,12,ES_NUMBER
- CONTROL "Spin1",IDC_SPIN9,"msctls_updown32",UDS_SETBUDDYINT |
- UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,112,74,
- 8,11
+ CONTROL "Spin1",IDC_SPIN9,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,112,74,8,11
EDITTEXT IDC_EDIT15,33,99,27,13,ES_NUMBER
- CONTROL "Spin1",IDC_SPIN12,"msctls_updown32",UDS_SETBUDDYINT |
- UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,61,103,
- 7,11
- COMBOBOX IDC_COMBO4,95,99,27,91,CBS_DROPDOWNLIST | WS_VSCROLL |
- WS_TABSTOP
- CONTROL "",IDC_SLIDER5,"msctls_trackbar32",TBS_BOTH |
- TBS_NOTICKS,47,135,36,10
+ CONTROL "Spin1",IDC_SPIN12,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,61,103,7,11
+ COMBOBOX IDC_COMBO4,95,99,27,91,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ CONTROL "",IDC_SLIDER5,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS,47,135,36,10
EDITTEXT IDC_EDIT2,85,133,36,12,ES_AUTOHSCROLL | ES_NUMBER
- CONTROL "",IDC_SPIN1,"msctls_updown32",UDS_SETBUDDYINT |
- UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS |
- UDS_NOTHOUSANDS,116,133,8,12
+ CONTROL "",IDC_SPIN1,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,116,133,8,12
COMBOBOX IDC_COMBO9,50,151,71,81,CBS_DROPDOWNLIST | WS_TABSTOP
- CONTROL "Reso",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | BS_FLAT |
- WS_TABSTOP,136,37,33,10
- CONTROL "Slider2",IDC_SLIDER4,"msctls_trackbar32",TBS_BOTH |
- TBS_NOTICKS | WS_DISABLED | WS_TABSTOP,168,37,64,10
- CONTROL "Cutoff",IDC_CHECK2,"Button",BS_AUTOCHECKBOX | BS_FLAT |
- WS_TABSTOP,136,52,35,10
- CONTROL "Slider2",IDC_SLIDER3,"msctls_trackbar32",TBS_BOTH |
- TBS_NOTICKS | WS_DISABLED | WS_TABSTOP,168,53,64,10
- COMBOBOX IDC_FILTERMODE,163,70,69,42,CBS_DROPDOWNLIST | CBS_SORT |
- WS_VSCROLL | WS_TABSTOP
- CONTROL "Slider1",IDC_SLIDER1,"msctls_trackbar32",TBS_BOTH |
- TBS_NOTICKS | WS_TABSTOP,172,101,60,10
- CONTROL "Slider1",IDC_SLIDER2,"msctls_trackbar32",TBS_BOTH |
- TBS_NOTICKS | WS_TABSTOP,172,118,60,10
- CONTROL "",IDC_SLIDER6,"msctls_trackbar32",TBS_BOTH |
- TBS_NOTICKS | WS_TABSTOP,172,135,60,10
- CONTROL "",IDC_SLIDER7,"msctls_trackbar32",TBS_BOTH |
- TBS_NOTICKS | WS_TABSTOP,172,152,60,10
+ CONTROL "Reso",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | BS_FLAT | WS_TABSTOP,136,37,33,10
+ CONTROL "Slider2",IDC_SLIDER4,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_DISABLED | WS_TABSTOP,168,37,64,10
+ CONTROL "Cutoff",IDC_CHECK2,"Button",BS_AUTOCHECKBOX | BS_FLAT | WS_TABSTOP,136,52,35,10
+ CONTROL "Slider2",IDC_SLIDER3,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_DISABLED | WS_TABSTOP,168,53,64,10
+ COMBOBOX IDC_FILTERMODE,163,70,69,42,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
+ CONTROL "Slider1",IDC_SLIDER1,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,172,101,60,10
+ CONTROL "Slider1",IDC_SLIDER2,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,172,118,60,10
+ CONTROL "",IDC_SLIDER6,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,172,135,60,10
+ CONTROL "",IDC_SLIDER7,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,172,152,60,10
COMBOBOX IDC_COMBO1,308,36,50,54,CBS_DROPDOWNLIST | WS_TABSTOP
COMBOBOX IDC_COMBO2,308,53,50,69,CBS_DROPDOWNLIST | WS_TABSTOP
COMBOBOX IDC_COMBO3,308,70,50,54,CBS_DROPDOWNLIST | WS_TABSTOP
- COMBOBOX IDC_COMBO6,246,99,72,...
[truncated message content] |
|
From: <sag...@us...> - 2009-07-23 13:05:39
|
Revision: 300
http://modplug.svn.sourceforge.net/modplug/?rev=300&view=rev
Author: saga-games
Date: 2009-07-23 13:05:32 +0000 (Thu, 23 Jul 2009)
Log Message:
-----------
Commit 300! \o/
[Imp] Mod conversion: Somewhat decent conversion of Kxx (Key Off) from XM to S3M/IT
[Imp] Pattern editor: Solo/Unmute context menu has a bit more dynamical transition menu points (experimental)
[Imp] Pattern editor: Returned to old pattern looping behaviour when a Bxx effect occours (experimental)
[Fix] FT2 compatibility: More compatible handling of Kxx effect
[Fix] IT compatibility: Random waveforms (vibrato, tremolo, panbrello) (test #19)
[Fix] IT compatibility: Fixed handling of very short pitch / filter envelopes (test #24)
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Modedit.cpp
trunk/OpenMPT/mptrack/View_pat.cpp
trunk/OpenMPT/soundlib/Snd_fx.cpp
trunk/OpenMPT/soundlib/Sndmix.cpp
Modified: trunk/OpenMPT/mptrack/Modedit.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Modedit.cpp 2009-07-21 21:33:40 UTC (rev 299)
+++ trunk/OpenMPT/mptrack/Modedit.cpp 2009-07-23 13:05:32 UTC (rev 300)
@@ -206,6 +206,16 @@
case 0xA0: m->command = CMD_S3MCMDEX; break;
}
break;
+ case CMD_KEYOFF:
+ if(m->note == 0)
+ {
+ m->note = (newTypeIsS3M) ? NOTE_NOTECUT : NOTE_KEYOFF;
+ m->command = CMD_S3MCMDEX;
+ if(m->param == 0)
+ m->instr = 0;
+ m->param = 0xD0 | (m->param & 0x0F);
+ }
+ break;
}
}
}
Modified: trunk/OpenMPT/mptrack/View_pat.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_pat.cpp 2009-07-21 21:33:40 UTC (rev 299)
+++ trunk/OpenMPT/mptrack/View_pat.cpp 2009-07-23 13:05:32 UTC (rev 300)
@@ -4583,19 +4583,25 @@
AppendMenu(hMenu, (pSndFile->ChnSettings[nChn].dwFlags & CHN_MUTE) ?
(MF_STRING|MF_CHECKED) : MF_STRING, ID_PATTERN_MUTE,
"Mute Channel\t" + ih->GetKeyTextFromCommand(kcChannelMute));
- BOOL b, bAll;
- b = FALSE;
- bAll = FALSE;
- for (UINT i=0; i<pSndFile->m_nChannels; i++) {
- if (i != nChn) {
- if (!(pSndFile->ChnSettings[i].dwFlags & CHN_MUTE)) b = TRUE;
- } else {
- if (pSndFile->ChnSettings[i].dwFlags & CHN_MUTE) b = TRUE;
+ BOOL bSolo = false, bUnmuteAll = false;
+ BOOL bSoloPending = false, bUnmuteAllPending = false; // doesn't work perfectly yet
+
+ for (CHANNELINDEX i = 0; i < pSndFile->m_nChannels; i++) {
+ if (i != nChn)
+ {
+ if (!(pSndFile->ChnSettings[i].dwFlags & CHN_MUTE)) bSolo = bSoloPending = true;
+ if (!((~pSndFile->ChnSettings[i].dwFlags & CHN_MUTE) && pSndFile->m_bChannelMuteTogglePending[i])) bSoloPending = true;
}
- if (pSndFile->ChnSettings[i].dwFlags & CHN_MUTE) bAll = TRUE;
+ else
+ {
+ if (pSndFile->ChnSettings[i].dwFlags & CHN_MUTE) bSolo = bSoloPending = true;
+ if ((~pSndFile->ChnSettings[i].dwFlags & CHN_MUTE) && pSndFile->m_bChannelMuteTogglePending[i]) bSoloPending = true;
+ }
+ if (pSndFile->ChnSettings[i].dwFlags & CHN_MUTE) bUnmuteAll = bUnmuteAllPending = true;
+ if ((~pSndFile->ChnSettings[i].dwFlags & CHN_MUTE) && pSndFile->m_bChannelMuteTogglePending[i]) bUnmuteAllPending = true;
}
- if (b) AppendMenu(hMenu, MF_STRING, ID_PATTERN_SOLO, "Solo Channel\t" + ih->GetKeyTextFromCommand(kcChannelSolo));
- if (bAll) AppendMenu(hMenu, MF_STRING, ID_PATTERN_UNMUTEALL, "Unmute All\t" + ih->GetKeyTextFromCommand(kcChannelUnmuteAll));
+ if (bSolo) AppendMenu(hMenu, MF_STRING, ID_PATTERN_SOLO, "Solo Channel\t" + ih->GetKeyTextFromCommand(kcChannelSolo));
+ if (bUnmuteAll) AppendMenu(hMenu, MF_STRING, ID_PATTERN_UNMUTEALL, "Unmute All\t" + ih->GetKeyTextFromCommand(kcChannelUnmuteAll));
AppendMenu(hMenu,
pSndFile->m_bChannelMuteTogglePending[nChn] ?
@@ -4605,8 +4611,8 @@
"On transition: Unmute\t" + ih->GetKeyTextFromCommand(kcToggleChanMuteOnPatTransition) :
"On transition: Mute\t" + ih->GetKeyTextFromCommand(kcToggleChanMuteOnPatTransition));
- AppendMenu(hMenu, MF_STRING, ID_PATTERN_TRANSITION_UNMUTEALL, "On transition: Unmute all\t" + ih->GetKeyTextFromCommand(kcUnmuteAllChnOnPatTransition));
- AppendMenu(hMenu, MF_STRING, ID_PATTERN_TRANSITIONSOLO, "On transition: Solo\t" + ih->GetKeyTextFromCommand(kcSoloChnOnPatTransition));
+ if (bUnmuteAllPending) AppendMenu(hMenu, MF_STRING, ID_PATTERN_TRANSITION_UNMUTEALL, "On transition: Unmute all\t" + ih->GetKeyTextFromCommand(kcUnmuteAllChnOnPatTransition));
+ if (bSoloPending) AppendMenu(hMenu, MF_STRING, ID_PATTERN_TRANSITIONSOLO, "On transition: Solo\t" + ih->GetKeyTextFromCommand(kcSoloChnOnPatTransition));
AppendMenu(hMenu, MF_STRING, ID_PATTERN_CHNRESET, "Reset Channel\t" + ih->GetKeyTextFromCommand(kcChannelReset));
Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Snd_fx.cpp 2009-07-21 21:33:40 UTC (rev 299)
+++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2009-07-23 13:05:32 UTC (rev 300)
@@ -1109,7 +1109,7 @@
m_MixPlugins[plug-1].pMixPlugin->SetParameter(plugparam, value);
}
- // Process continuous parameter pontrol note.
+ // Process continuous parameter control note.
// Row data is cleared after first tick so on following
// ticks using channels m_nPlugParamValueStep to identify
// the need for parameter control. The condition cmd == 0
@@ -1216,9 +1216,15 @@
{
UINT note = pChn->nRowNote;
if (instr) pChn->nNewIns = instr;
- // XM: Key-Off + Sample == Note Cut
if (m_nType & (MOD_TYPE_MOD|MOD_TYPE_XM|MOD_TYPE_MT2))
{
+ // XM: FT2 ignores a note next to a K00 effect, and a fade-out seems to be done when no volume envelope is present (not exactly the Kxx behaviour)
+ if(cmd == CMD_KEYOFF && param == 0 && GetModFlag(MSF_COMPATIBLE_PLAY))
+ {
+ note = instr = 0;
+ }
+
+ // XM: Key-Off + Sample == Note Cut
if ((note == NOTE_KEYOFF) && ((!pChn->pHeader) || (!(pChn->pHeader->dwFlags & ENV_VOLUME))))
{
pChn->dwFlags |= CHN_FASTVOLRAMP;
@@ -1357,7 +1363,17 @@
// Volume Column Effect (except volume & panning)
- if ((volcmd > VOLCMD_PANNING) && (m_nTickCount >= nStartTick))
+ /* A few notes, paraphrased from ITTECH.TXT by Storlek (creator of schismtracker):
+ Ex/Fx/Gx are shared with Exx/Fxx/Gxx; Ex/Fx are 4x the 'normal' slide value
+ Gx is linked with Ex/Fx if Compat Gxx is off, just like Gxx is with Exx/Fxx
+ Gx values: 1, 4, 8, 16, 32, 64, 96, 128, 255
+ Ax/Bx/Cx/Dx values are used directly (i.e. D9 == D09), and are NOT shared with Dxx
+ (value is stored into nOldVolParam and used by A0/B0/C0/D0)
+ Hx uses the same value as Hxx and Uxx, and affects the *depth*
+ so... hxx = (hx | (oldhxx & 0xf0)) ???
+ TODO is this done correctly?
+ */
+ if ((volcmd > VOLCMD_PANNING) && (m_nTickCount >= nStartTick))
{
if (volcmd == VOLCMD_TONEPORTAMENTO)
{
@@ -1663,8 +1679,15 @@
// XM: Key-Off + Sample == Note Cut
if ((!pChn->pHeader) || (!(pChn->pHeader->dwFlags & ENV_VOLUME)))
{
- pChn->dwFlags |= CHN_FASTVOLRAMP;
- pChn->nVolume = 0;
+ if(param == 0) // FT2 is weird....
+ {
+ pChn->dwFlags |= CHN_NOTEFADE;
+ }
+ else
+ {
+ pChn->dwFlags |= CHN_FASTVOLRAMP;
+ pChn->nVolume = 0;
+ }
}
KeyOff(nChn);
}
@@ -1738,12 +1761,14 @@
// Position Jump
case CMD_POSITIONJUMP:
nPosJump = param;
+ /* commented this out (http://lpchip.com/modplug/viewtopic.php?t=1808) - I hope it doesn't break anything else.
if((m_dwSongFlags & SONG_PATTERNLOOP && m_nSeqOverride == 0)) {
m_nSeqOverride = param+1;
//Releasing pattern loop after position jump could cause
//instant jumps - modifying behavior so that now position jumps
//occurs also when pattern loop is enabled.
}
+ */
// see http://lpchip.com/modplug/viewtopic.php?t=2769 - FastTracker resets Dxx if Bxx is called _after_ Dxx
if(GetType() == MOD_TYPE_XM) nBreakRow = 0;
break;
Modified: trunk/OpenMPT/soundlib/Sndmix.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Sndmix.cpp 2009-07-21 21:33:40 UTC (rev 299)
+++ trunk/OpenMPT/soundlib/Sndmix.cpp 2009-07-23 13:05:32 UTC (rev 300)
@@ -973,7 +973,11 @@
vol += (ModSquareTable[trempos] * (int)pChn->nTremoloDepth) >> tremattn;
break;
case 3:
- vol += (ModRandomTable[trempos] * (int)pChn->nTremoloDepth) >> tremattn;
+ //IT compatibility 19. Use random values
+ if((m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT)) && GetModFlag(MSF_COMPATIBLE_PLAY))
+ vol += (((rand() & 0xFF) - 0x7F) * (int)pChn->nTremoloDepth) >> tremattn;
+ else
+ vol += (ModRandomTable[trempos] * (int)pChn->nTremoloDepth) >> tremattn;
break;
default:
vol += (ModSinusTable[trempos] * (int)pChn->nTremoloDepth) >> tremattn;
@@ -1321,7 +1325,11 @@
vdelta = ModSquareTable[vibpos];
break;
case 3:
- vdelta = ModRandomTable[vibpos];
+ //IT compatibility 19. Use random values
+ if((m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT)) && GetModFlag(MSF_COMPATIBLE_PLAY))
+ vdelta = (rand() & 0xFF) - 0x7F;
+ else
+ vdelta = ModRandomTable[vibpos];
break;
default:
vdelta = ModSinusTable[vibpos];
@@ -1377,7 +1385,11 @@
pdelta = ModSquareTable[panpos];
break;
case 3:
- pdelta = ModRandomTable[panpos];
+ //IT compatibility 19. Use random values
+ if((m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT)) && GetModFlag(MSF_COMPATIBLE_PLAY))
+ pdelta = (rand() & 0xFF) - 0x7F;
+ else
+ pdelta = ModRandomTable[panpos];
break;
default:
pdelta = ModSinusTable[panpos];
@@ -1605,7 +1617,10 @@
// Pitch Loop ?
if (penv->dwFlags & ENV_PITCHLOOP)
{
- if (pChn->nPitchEnvPosition >= penv->PitchPoints[penv->nPitchLoopEnd])
+ UINT pitchloopend = penv->PitchPoints[penv->nPitchLoopEnd];
+ //IT compatibility 24. Short envelope loops
+ if (m_nType != MOD_TYPE_XM && GetModFlag(MSF_COMPATIBLE_PLAY)) pitchloopend++;
+ if (pChn->nPitchEnvPosition == pitchloopend)
pChn->nPitchEnvPosition = penv->PitchPoints[penv->nPitchLoopStart];
}
// Pitch Sustain ?
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2009-07-21 21:33:46
|
Revision: 299
http://modplug.svn.sourceforge.net/modplug/?rev=299&view=rev
Author: saga-games
Date: 2009-07-21 21:33:40 +0000 (Tue, 21 Jul 2009)
Log Message:
-----------
[Fix] Keyboard manager: Octave offset for key descriptions is now C, not A
[Fix] Sample editor: Removed tuning from up/downsampling for MOD files which detuned them when saving
[Imp] Module loader: If plugins are missing, a single MessageBox is shown.
[Ref] Using constant instead of number in load_mid.cpp
Modified Paths:
--------------
trunk/OpenMPT/mptrack/CommandSet.cpp
trunk/OpenMPT/mptrack/Ctrl_smp.cpp
trunk/OpenMPT/mptrack/Vstplug.cpp
trunk/OpenMPT/soundlib/Load_mid.cpp
trunk/OpenMPT/soundlib/Sndfile.cpp
Modified: trunk/OpenMPT/mptrack/CommandSet.cpp
===================================================================
--- trunk/OpenMPT/mptrack/CommandSet.cpp 2009-07-20 21:33:11 UTC (rev 298)
+++ trunk/OpenMPT/mptrack/CommandSet.cpp 2009-07-21 21:33:40 UTC (rev 299)
@@ -418,17 +418,17 @@
commands[kcVPNoteA_1].UID = 1073;
commands[kcVPNoteA_1].isHidden = false;
commands[kcVPNoteA_1].isDummy = false;
- commands[kcVPNoteA_1].Message = "Base octave +1 A";
+ commands[kcVPNoteA_1].Message = "Base octave A";
commands[kcVPNoteAS1].UID = 1074;
commands[kcVPNoteAS1].isHidden = false;
commands[kcVPNoteAS1].isDummy = false;
- commands[kcVPNoteAS1].Message = "Base octave +1 A#";
+ commands[kcVPNoteAS1].Message = "Base octave A#";
commands[kcVPNoteB_1].UID = 1075;
commands[kcVPNoteB_1].isHidden = false;
commands[kcVPNoteB_1].isDummy = false;
- commands[kcVPNoteB_1].Message = "Base octave +1 B";
+ commands[kcVPNoteB_1].Message = "Base octave B";
commands[kcVPNoteC_1].UID = 1076;
commands[kcVPNoteC_1].isHidden = false;
@@ -478,17 +478,17 @@
commands[kcVPNoteA_2].UID = 1085;
commands[kcVPNoteA_2].isHidden = false;
commands[kcVPNoteA_2].isDummy = false;
- commands[kcVPNoteA_2].Message = "Base octave +2 A";
+ commands[kcVPNoteA_2].Message = "Base octave +1 A";
commands[kcVPNoteAS2].UID = 1086;
commands[kcVPNoteAS2].isHidden = false;
commands[kcVPNoteAS2].isDummy = false;
- commands[kcVPNoteAS2].Message = "Base octave +2 A#";
+ commands[kcVPNoteAS2].Message = "Base octave +1 A#";
commands[kcVPNoteB_2].UID = 1087;
commands[kcVPNoteB_2].isHidden = false;
commands[kcVPNoteB_2].isDummy = false;
- commands[kcVPNoteB_2].Message = "Base octave +2 B";
+ commands[kcVPNoteB_2].Message = "Base octave +1 B";
commands[kcVPNoteC_2].UID = 1088;
commands[kcVPNoteC_2].isHidden = false;
@@ -538,7 +538,7 @@
commands[kcVPNoteA_3].UID = 1097;
commands[kcVPNoteA_3].isHidden = false;
commands[kcVPNoteA_3].isDummy = false;
- commands[kcVPNoteA_3].Message = "Base octave +3 A";
+ commands[kcVPNoteA_3].Message = "Base octave +2 A";
commands[kcVPNoteStopC_0].UID = 1098;
commands[kcVPNoteStopC_0].isHidden = true;
Modified: trunk/OpenMPT/mptrack/Ctrl_smp.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2009-07-20 21:33:11 UTC (rev 298)
+++ trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2009-07-21 21:33:40 UTC (rev 299)
@@ -1491,8 +1491,11 @@
pins->nLength = dwNewLen;
if (viewstate.dwEndSel <= viewstate.dwBeginSel)
{
- if (pins->nC4Speed < 200000) pins->nC4Speed *= 2;
- if (pins->RelativeTone < 84) pins->RelativeTone += 12;
+ if(!(m_pSndFile->m_nType & MOD_TYPE_MOD))
+ {
+ if (pins->nC4Speed < 200000) pins->nC4Speed *= 2;
+ if (pins->RelativeTone < 84) pins->RelativeTone += 12;
+ }
}
CSoundFile::FreeSample(pOriginal);
END_CRITICAL();
@@ -1614,8 +1617,11 @@
}
if (viewstate.dwEndSel <= viewstate.dwBeginSel)
{
- if (pins->nC4Speed > 2000) pins->nC4Speed /= 2;
- if (pins->RelativeTone > -84) pins->RelativeTone -= 12;
+ if(!(m_pSndFile->m_nType & MOD_TYPE_MOD))
+ {
+ if (pins->nC4Speed > 2000) pins->nC4Speed /= 2;
+ if (pins->RelativeTone > -84) pins->RelativeTone -= 12;
+ }
}
pins->nLength = dwNewLen;
pins->pSample = (LPSTR)pNewSample;
Modified: trunk/OpenMPT/mptrack/Vstplug.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Vstplug.cpp 2009-07-20 21:33:11 UTC (rev 298)
+++ trunk/OpenMPT/mptrack/Vstplug.cpp 2009-07-21 21:33:40 UTC (rev 299)
@@ -571,13 +571,14 @@
return bOk;
} else
{
- CString message;
+ // MOVED to CSoundFile::Create
+ /*CString message;
message.Format("This track uses the plugin \"%s\", which could not be found.\n\rSearch for this plug on kvraudio?", pMixPlugin->Info.szLibraryName);
if (AfxMessageBox(message, MB_YESNO|MB_ICONQUESTION) == IDYES ) {
CString url;
url.Format("http://www.kvraudio.com/search.php?q=%s&lq=db", pMixPlugin->Info.szLibraryName);
CTrackApp::OpenURL(url);
- }
+ }*/
#ifdef VST_LOG
Log("Unknown plugin\n");
Modified: trunk/OpenMPT/soundlib/Load_mid.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_mid.cpp 2009-07-20 21:33:11 UTC (rev 298)
+++ trunk/OpenMPT/soundlib/Load_mid.cpp 2009-07-21 21:33:40 UTC (rev 299)
@@ -431,7 +431,7 @@
int mapnote = j+1;
if (nChannel == MIDI_DRUMCHANNEL)
{
- mapnote = 61;
+ mapnote = NOTE_MIDDLEC;
/*mapnote = 61 + j - nNote;
if (mapnote < 1) mapnote = 1;
if (mapnote > 120) mapnote = 120;*/
Modified: trunk/OpenMPT/soundlib/Sndfile.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.cpp 2009-07-20 21:33:11 UTC (rev 298)
+++ trunk/OpenMPT/soundlib/Sndfile.cpp 2009-07-21 21:33:40 UTC (rev 299)
@@ -704,9 +704,14 @@
if ((m_nRestartPos >= Order.size()) || (Order[m_nRestartPos] >= Patterns.Size())) m_nRestartPos = 0;
// Load plugins only when m_pModDoc != 0. (can be == 0 for example when examining module samples in treeview.
+
+ CString sNotFound;
+ BOOL bSearchIDs[MAX_MIXPLUGINS] = {false};
+ UINT iShowNotFound = 0;
+
if (gpMixPluginCreateProc && GetpModDoc())
{
- for (UINT iPlug=0; iPlug<MAX_MIXPLUGINS; iPlug++)
+ for (UINT iPlug = 0; iPlug < MAX_MIXPLUGINS; iPlug++)
{
if ((m_MixPlugins[iPlug].Info.dwPluginId1)
|| (m_MixPlugins[iPlug].Info.dwPluginId2))
@@ -714,12 +719,50 @@
gpMixPluginCreateProc(&m_MixPlugins[iPlug], this);
if (m_MixPlugins[iPlug].pMixPlugin)
{
+ // plugin has been found
m_MixPlugins[iPlug].pMixPlugin->RestoreAllParameters(m_MixPlugins[iPlug].defaultProgram); //rewbs.plugDefaultProgram: added param
}
+ else
+ {
+ // plugin not found - add to list
+ BOOL bFound = false;
+ for(UINT iPlugFind = 0; iPlugFind < iPlug; iPlugFind++)
+ if(m_MixPlugins[iPlugFind].Info.dwPluginId2 == m_MixPlugins[iPlug].Info.dwPluginId2)
+ bFound = true;
+
+ if(bFound == false)
+ {
+ sNotFound = sNotFound + m_MixPlugins[iPlug].Info.szLibraryName + "\n";
+ bSearchIDs[iPlug] = true; // set this flag so we will find the needed plugins later when calling KVRAudio
+ }
+ iShowNotFound++;
+ }
}
}
}
+ // Display a nice message so the user sees what plugins are missing
+ if(iShowNotFound)
+ {
+ if(iShowNotFound == 1)
+ {
+ sNotFound = "The following plugin has not been found:\n\n" + sNotFound + "\nDo you want to search for it on KVRAudio?";
+ }
+ else
+ {
+ sNotFound = "The following plugins have not been found:\n\n" + sNotFound + "\nDo you want to search for them on KVRAudio?"
+ "\nWARNING: A browser window / tab is opened for every plugin. If you do not want that, you can visit http://www.kvraudio.com/search.php";
+ }
+ if (::MessageBox(0, sNotFound, "OpenMPT - Plugins missing", MB_YESNO | MB_ICONQUESTION | MB_DEFBUTTON2) == IDYES)
+ for (UINT iPlug = 0; iPlug < MAX_MIXPLUGINS; iPlug++)
+ if (bSearchIDs[iPlug] == true)
+ {
+ CString sUrl;
+ sUrl.Format("http://www.kvraudio.com/search.php?q=%s&lq=db", m_MixPlugins[iPlug].Info.szLibraryName);
+ CTrackApp::OpenURL(sUrl);
+ }
+ }
+
// Set up mix levels
m_pConfig->SetMixLevels(m_nMixLevels);
RecalculateGainForAllPlugs();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2009-07-20 21:33:21
|
Revision: 298
http://modplug.svn.sourceforge.net/modplug/?rev=298&view=rev
Author: saga-games
Date: 2009-07-20 21:33:11 +0000 (Mon, 20 Jul 2009)
Log Message:
-----------
[Fix] Pattern editor: Weird combination of context menu shortcut and "always center active row" being disabled (http://lpchip.com/modplug/viewtopic.php?t=3203)
[Fix] Sample editor: Global volume is now also being adjusted for stereo and 16-Bit samples
[Ref] Using constants instead of numbers in two places
Modified Paths:
--------------
trunk/OpenMPT/mptrack/View_pat.cpp
trunk/OpenMPT/mptrack/view_com.cpp
trunk/OpenMPT/soundlib/Snd_fx.cpp
trunk/OpenMPT/soundlib/modsmp_ctrl.cpp
Modified: trunk/OpenMPT/mptrack/View_pat.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_pat.cpp 2009-07-19 21:41:08 UTC (rev 297)
+++ trunk/OpenMPT/mptrack/View_pat.cpp 2009-07-20 21:33:11 UTC (rev 298)
@@ -1220,12 +1220,12 @@
//------ Plugin Header Menu --------- :
if ((m_dwStatus & PATSTATUS_PLUGNAMESINHEADERS) &&
- (pt.y > m_szHeader.cy-PLUGNAME_HEIGHT) && (pt.y <= m_szHeader.cy)) {
+ (pt.y > m_szHeader.cy-PLUGNAME_HEIGHT) && (pt.y < m_szHeader.cy)) {
BuildPluginCtxMenu(hMenu, nChn, pSndFile);
}
//------ Channel Header Menu ---------- :
- else if (pt.y <= m_szHeader.cy){
+ else if (pt.y < m_szHeader.cy){
if (ih->ShiftPressed()) {
//Don't bring up menu if shift is pressed, else we won't get button up msg.
} else {
@@ -1237,7 +1237,7 @@
}
//------ Standard Menu ---------- :
- else if ((pt.x >= m_szHeader.cx) && (pt.y > m_szHeader.cy)) {
+ else if ((pt.x >= m_szHeader.cx) && (pt.y >= m_szHeader.cy)) {
/*if (BuildSoloMuteCtxMenu(hMenu, ih, nChn, pSndFile))
AppendMenu(hMenu, MF_SEPARATOR, 0, "");*/
if (BuildSelectionCtxMenu(hMenu, ih))
Modified: trunk/OpenMPT/mptrack/view_com.cpp
===================================================================
--- trunk/OpenMPT/mptrack/view_com.cpp 2009-07-19 21:41:08 UTC (rev 297)
+++ trunk/OpenMPT/mptrack/view_com.cpp 2009-07-20 21:33:11 UTC (rev 298)
@@ -276,7 +276,7 @@
{
wsprintf(s, "%d Hz",
pSndFile->GetFreqFromPeriod(
- pSndFile->GetPeriodFromNote(61, pins->nFineTune, pins->nC4Speed),
+ pSndFile->GetPeriodFromNote(NOTE_MIDDLEC, pins->nFineTune, pins->nC4Speed),
pins->nC4Speed));
}
break;
Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Snd_fx.cpp 2009-07-19 21:41:08 UTC (rev 297)
+++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2009-07-20 21:33:11 UTC (rev 298)
@@ -3450,7 +3450,7 @@
UINT CSoundFile::GetPeriodFromNote(UINT note, int nFineTune, UINT nC4Speed) const
//-------------------------------------------------------------------------------
{
- if ((!note) || (note > 0xF0)) return 0;
+ if ((!note) || (note >= NOTE_MIN_SPECIAL)) return 0;
if (m_nType & (MOD_TYPE_IT|MOD_TYPE_MPT|MOD_TYPE_S3M|MOD_TYPE_STM|MOD_TYPE_MDL|MOD_TYPE_ULT|MOD_TYPE_WAV
|MOD_TYPE_FAR|MOD_TYPE_DMF|MOD_TYPE_PTM|MOD_TYPE_AMS|MOD_TYPE_DBM|MOD_TYPE_AMF|MOD_TYPE_PSM))
{
Modified: trunk/OpenMPT/soundlib/modsmp_ctrl.cpp
===================================================================
--- trunk/OpenMPT/soundlib/modsmp_ctrl.cpp 2009-07-19 21:41:08 UTC (rev 297)
+++ trunk/OpenMPT/soundlib/modsmp_ctrl.cpp 2009-07-20 21:33:11 UTC (rev 298)
@@ -280,7 +280,7 @@
RemoveOffsetAndNormalize( reinterpret_cast<int8*>(pins->pSample) + iStart, iEnd - iStart, dOffset, dAmplify);
// step 3: adjust global vol (if available)
- if((modtype & (MOD_TYPE_IT | MOD_TYPE_MPT)) && (iStart == 0) && (iEnd == pins->nLength))
+ if((modtype & (MOD_TYPE_IT | MOD_TYPE_MPT)) && (iStart == 0) && (iEnd == pins->nLength * pins->GetNumChannels()))
pins->nGlobalVol = min((WORD)(pins->nGlobalVol / dAmplify), 64);
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-07-19 21:41:15
|
Revision: 297
http://modplug.svn.sourceforge.net/modplug/?rev=297&view=rev
Author: saga-games
Date: 2009-07-19 21:41:08 +0000 (Sun, 19 Jul 2009)
Log Message:
-----------
[Fix] VST: Default dirs for VST presets were not working properly
[Fix] Pattern editor: Echo paste did not work properly if edit order was different from playback order
[Fix] Pattern editor: Keyboard split note was off by one
[Fix] Instrument editor: No relative values are shown for envelopes with no release node (status bar)
[Fix] Find/Replace: (Hopefully) temporary fix for instrument sorting
[Fix] Compatibility: Pattern loops are now handeled correctly in XM (using compatibility switch) and MOD files
[Ref] Some small code changes (Usage of types PATTERNINDEX, ORDERINDEX, ROWINDEX)
Modified Paths:
--------------
trunk/OpenMPT/mptrack/AbstractVstEditor.cpp
trunk/OpenMPT/mptrack/Moddoc.cpp
trunk/OpenMPT/mptrack/Moddoc.h
trunk/OpenMPT/mptrack/Modedit.cpp
trunk/OpenMPT/mptrack/View_ins.cpp
trunk/OpenMPT/mptrack/View_pat.cpp
trunk/OpenMPT/mptrack/dlg_misc.cpp
trunk/OpenMPT/mptrack/dlg_misc.h
trunk/OpenMPT/soundlib/Snd_fx.cpp
Modified: trunk/OpenMPT/mptrack/AbstractVstEditor.cpp
===================================================================
--- trunk/OpenMPT/mptrack/AbstractVstEditor.cpp 2009-07-16 16:08:49 UTC (rev 296)
+++ trunk/OpenMPT/mptrack/AbstractVstEditor.cpp 2009-07-19 21:41:08 UTC (rev 297)
@@ -115,8 +115,11 @@
CFileDialog dlg(TRUE, "fxp", NULL,
OFN_HIDEREADONLY| OFN_OVERWRITEPROMPT | OFN_PATHMUSTEXIST | OFN_ENABLESIZING | OFN_NOREADONLYRETURN,
"VST Program (*.fxp)|*.fxp||", theApp.m_pMainWnd);
- dlg.m_ofn.lpstrInitialDir = CMainFrame::GetWorkingDirectory(DIR_PLUGINPRESETS);
+ const LPCTSTR pszWdir = CMainFrame::GetWorkingDirectory(DIR_PLUGINPRESETS);
+ if(pszWdir[0])
+ dlg.m_ofn.lpstrInitialDir = pszWdir;
+
if (!(dlg.DoModal() == IDOK)) return;
CMainFrame::SetWorkingDirectory(dlg.GetFileName(), DIR_PLUGINPRESETS, true);
@@ -135,8 +138,13 @@
CFileDialog dlg(FALSE, "fxp", NULL,
OFN_HIDEREADONLY| OFN_OVERWRITEPROMPT | OFN_PATHMUSTEXIST | OFN_ENABLESIZING | OFN_NOREADONLYRETURN,
"VST Program (*.fxp)|*.fxp||", theApp.m_pMainWnd);
+ const LPCTSTR pszWdir = CMainFrame::GetWorkingDirectory(DIR_PLUGINPRESETS);
+ if(pszWdir[0])
+ dlg.m_ofn.lpstrInitialDir = pszWdir;
if (!(dlg.DoModal() == IDOK)) return;
+ CMainFrame::SetWorkingDirectory(dlg.GetFileName(), DIR_PLUGINPRESETS, true);
+
//TODO: exception handling
if (!(m_pVstPlugin->SaveProgram(dlg.GetFileName())))
::AfxMessageBox("Error saving preset.");
Modified: trunk/OpenMPT/mptrack/Moddoc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Moddoc.cpp 2009-07-16 16:08:49 UTC (rev 296)
+++ trunk/OpenMPT/mptrack/Moddoc.cpp 2009-07-19 21:41:08 UTC (rev 297)
@@ -2877,7 +2877,7 @@
return NULL;
}
-HWND CModDoc::GetEditPosition(UINT &row, UINT &pat, UINT &ord)
+HWND CModDoc::GetEditPosition(ROWINDEX &row, PATTERNINDEX &pat, ORDERINDEX &ord)
//------------------------------------------------------------
{
HWND followSonghWnd;
@@ -3004,7 +3004,11 @@
}
CSoundFile *pSndFile = GetSoundFile();
- UINT nPat,nOrd,nRow;
+
+ ROWINDEX nRow;
+ PATTERNINDEX nPat;
+ ORDERINDEX nOrd;
+
HWND followSonghWnd;
followSonghWnd = GetEditPosition(nRow, nPat, nOrd);
@@ -3060,7 +3064,11 @@
}
CSoundFile *pSndFile = GetSoundFile();
- UINT nRow,nPat,nOrd;
+
+ ROWINDEX nRow;
+ PATTERNINDEX nPat;
+ ORDERINDEX nOrd;
+
HWND followSonghWnd;
followSonghWnd = GetEditPosition(nRow,nPat,nOrd);
@@ -3111,7 +3119,11 @@
}
CSoundFile *pSndFile = GetSoundFile();
- UINT nPat,nOrd,nRow;
+
+ ROWINDEX nRow;
+ PATTERNINDEX nPat;
+ ORDERINDEX nOrd;
+
HWND followSonghWnd;
followSonghWnd = GetEditPosition(nRow,nPat,nOrd);
Modified: trunk/OpenMPT/mptrack/Moddoc.h
===================================================================
--- trunk/OpenMPT/mptrack/Moddoc.h 2009-07-16 16:08:49 UTC (rev 296)
+++ trunk/OpenMPT/mptrack/Moddoc.h 2009-07-19 21:41:08 UTC (rev 297)
@@ -240,10 +240,10 @@
UINT FindSampleParent(UINT nSmp) const;
UINT FindInstrumentChild(UINT nIns) const;
BOOL MoveOrder(UINT nSourceNdx, UINT nDestNdx, BOOL bUpdate=TRUE, BOOL bCopy=FALSE);
- BOOL ExpandPattern(UINT nPattern);
- BOOL ShrinkPattern(UINT nPattern);
- BOOL CopyPattern(UINT nPattern, DWORD dwBeginSel, DWORD dwEndSel);
- BOOL PastePattern(UINT nPattern, DWORD dwBeginSel, BOOL mix, BOOL ITStyleMix=FALSE); //rewbs.mixpaste
+ BOOL ExpandPattern(PATTERNINDEX nPattern);
+ BOOL ShrinkPattern(PATTERNINDEX nPattern);
+ BOOL CopyPattern(PATTERNINDEX nPattern, DWORD dwBeginSel, DWORD dwEndSel);
+ BOOL PastePattern(PATTERNINDEX nPattern, DWORD dwBeginSel, BOOL mix, BOOL ITStyleMix=FALSE); //rewbs.mixpaste
BOOL CopyEnvelope(UINT nIns, UINT nEnv);
BOOL PasteEnvelope(UINT nIns, UINT nEnv);
@@ -253,7 +253,7 @@
BOOL CanUndo();
LRESULT ActivateView(UINT nIdView, DWORD dwParam);
void UpdateAllViews(CView *pSender, LPARAM lHint=0L, CObject *pHint=NULL);
- HWND GetEditPosition(UINT &row, UINT &pat, UINT &ord); //rewbs.customKeys
+ HWND GetEditPosition(ROWINDEX &row, PATTERNINDEX &pat, ORDERINDEX &ord); //rewbs.customKeys
LRESULT OnCustomKeyMsg(WPARAM, LPARAM); //rewbs.customKeys
void TogglePluginEditor(UINT m_nCurrentPlugin); //rewbs.patPlugNames
void RecordParamChange(int slot, long param);
Modified: trunk/OpenMPT/mptrack/Modedit.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Modedit.cpp 2009-07-16 16:08:49 UTC (rev 296)
+++ trunk/OpenMPT/mptrack/Modedit.cpp 2009-07-19 21:41:08 UTC (rev 297)
@@ -1564,7 +1564,7 @@
}
-BOOL CModDoc::ExpandPattern(UINT nPattern)
+BOOL CModDoc::ExpandPattern(PATTERNINDEX nPattern)
//----------------------------------------
{
// -> CODE#0008
@@ -1578,7 +1578,7 @@
}
-BOOL CModDoc::ShrinkPattern(UINT nPattern)
+BOOL CModDoc::ShrinkPattern(PATTERNINDEX nPattern)
//----------------------------------------
{
if ((nPattern >= m_SndFile.Patterns.Size()) || (!m_SndFile.Patterns[nPattern])) return FALSE;
@@ -1598,7 +1598,7 @@
static LPCSTR lpszClipboardPatternHdr = "ModPlug Tracker %3s\x0D\x0A";
-BOOL CModDoc::CopyPattern(UINT nPattern, DWORD dwBeginSel, DWORD dwEndSel)
+BOOL CModDoc::CopyPattern(PATTERNINDEX nPattern, DWORD dwBeginSel, DWORD dwEndSel)
//------------------------------------------------------------------------
{
CMainFrame *pMainFrm = CMainFrame::GetMainFrame();
@@ -1748,7 +1748,7 @@
// -> CODE#0014
// -> DESC="vst wet/dry slider"
//BOOL CModDoc::PastePattern(UINT nPattern, DWORD dwBeginSel)
-BOOL CModDoc::PastePattern(UINT nPattern, DWORD dwBeginSel, BOOL mix, BOOL ITStyleMix)
+BOOL CModDoc::PastePattern(PATTERNINDEX nPattern, DWORD dwBeginSel, BOOL mix, BOOL ITStyleMix)
// -! NEW_FEATURE#0014
//---------------------------------------------------------
{
@@ -1762,18 +1762,22 @@
if ((hCpy) && ((p = (LPSTR)GlobalLock(hCpy)) != NULL))
{
- PrepareUndo(nPattern, 0,0, m_SndFile.m_nChannels, m_SndFile.PatternSize[nPattern]);
+ PrepareUndo(nPattern, 0, 0, m_SndFile.m_nChannels, m_SndFile.PatternSize[nPattern]);
BYTE spdmax = (m_SndFile.m_nType & MOD_TYPE_MOD) ? 0x20 : 0x1F;
DWORD dwMemSize = GlobalSize(hCpy);
MODCOMMAND *m = m_SndFile.Patterns[nPattern];
UINT nrow = dwBeginSel >> 16;
UINT ncol = (dwBeginSel & 0xFFFF) >> 3;
- ORDERINDEX oCurrentOrder = m_SndFile.GetCurrentOrder(); //jojo.echopaste
UINT col;
BOOL bS3M = FALSE, bOk = FALSE;
UINT len = 0;
MODCOMMAND origModCmd;
+ ORDERINDEX oCurrentOrder; //jojo.echopaste
+ ROWINDEX rTemp;
+ PATTERNINDEX pTemp;
+ GetEditPosition(rTemp, pTemp, oCurrentOrder);
+
if ((nrow >= m_SndFile.PatternSize[nPattern]) || (ncol >= m_SndFile.m_nChannels)) goto PasteDone;
m += nrow * m_SndFile.m_nChannels;
// Search for signature
Modified: trunk/OpenMPT/mptrack/View_ins.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_ins.cpp 2009-07-16 16:08:49 UTC (rev 296)
+++ trunk/OpenMPT/mptrack/View_ins.cpp 2009-07-19 21:41:08 UTC (rev 297)
@@ -1739,13 +1739,13 @@
if (nVal < 0) nVal = 0;
if (nVal > 64) nVal = 64;
if (nTick < 0) nTick = 0;
- if (nTick<=EnvGetReleaseNodeTick()+1) {
+ if (nTick <= EnvGetReleaseNodeTick() + 1 || EnvGetReleaseNode() == ENV_RELEASE_NODE_UNSET) {
int displayVal = (m_nEnv != ENV_VOLUME) ? nVal-32 : nVal;
wsprintf(s, "Tick %d, [%d]", nTick, displayVal);
} else {
- int displayVal = (nVal-EnvGetReleaseNodeValue())*2;
- displayVal = (m_nEnv != ENV_VOLUME) ? displayVal-32 : displayVal;
- wsprintf(s, "Tick %d, [Rel%c%d]", nTick, displayVal>0?'+':'-', abs(displayVal));
+ int displayVal = (nVal - EnvGetReleaseNodeValue()) * 2;
+ displayVal = (m_nEnv != ENV_VOLUME) ? displayVal - 32 : displayVal;
+ wsprintf(s, "Tick %d, [Rel%c%d]", nTick, displayVal > 0 ? '+' : '-', abs(displayVal));
}
UpdateIndicator(s);
if ((m_dwStatus & INSSTATUS_DRAGGING) && (m_nDragItem))
Modified: trunk/OpenMPT/mptrack/View_pat.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_pat.cpp 2009-07-16 16:08:49 UTC (rev 296)
+++ trunk/OpenMPT/mptrack/View_pat.cpp 2009-07-19 21:41:08 UTC (rev 297)
@@ -3870,10 +3870,10 @@
const UINT nTick = pSndFile->m_nTickCount;
const PATTERNINDEX nPatPlayback = pSndFile->m_nPattern;
- const bool isSplit = (note < m_nSplitNote);
+ const bool isSplit = (note <= m_nSplitNote);
+ UINT ins = 0;
if (pModDoc)
{
- UINT ins = 0;
if (isSplit)
{
ins = m_nSplitInstrument;
@@ -3959,7 +3959,7 @@
//Enter note off
p->note = NOTE_KEYOFF;
- p->instr = (bChordMode) ? 0 : GetCurrentInstrument(); //p->instr = 0;
+ p->instr = (bChordMode) ? 0 : ins; //p->instr = 0;
//Writing the instrument as well - probably someone finds this annoying :)
p->volcmd = 0;
p->vol = 0;
@@ -4520,7 +4520,7 @@
bool CViewPattern::HandleSplit(MODCOMMAND* p, int note)
//-----------------------------------------------------
{
- if (note>=m_nSplitNote)
+ if (note>m_nSplitNote)
{
p->note = note;
UINT nins = GetCurrentInstrument();
Modified: trunk/OpenMPT/mptrack/dlg_misc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/dlg_misc.cpp 2009-07-16 16:08:49 UTC (rev 296)
+++ trunk/OpenMPT/mptrack/dlg_misc.cpp 2009-07-19 21:41:08 UTC (rev 297)
@@ -656,10 +656,10 @@
{
if (pSndFile->m_nInstruments)
{
- wsprintf(s, "%02d:%s", n, (pSndFile->Headers[n]) ? pSndFile->Headers[n]->name : "");
+ wsprintf(s, "%03d:%s", n, (pSndFile->Headers[n]) ? pSndFile->Headers[n]->name : "");
} else
{
- wsprintf(s, "%02d:%s", n, pSndFile->m_szNames[n]);
+ wsprintf(s, "%03d:%s", n, pSndFile->m_szNames[n]);
}
combo->SetItemData(combo->AddString(s), n);
}
Modified: trunk/OpenMPT/mptrack/dlg_misc.h
===================================================================
--- trunk/OpenMPT/mptrack/dlg_misc.h 2009-07-16 16:08:49 UTC (rev 296)
+++ trunk/OpenMPT/mptrack/dlg_misc.h 2009-07-19 21:41:08 UTC (rev 297)
@@ -534,7 +534,7 @@
ModCompatibilityExportTip = 0,
ItCompatibilityExportTip = 1,
ConfirmSignUnsignWhenPlaying = 2,
- enMsgBoxHidableMessage_count = 3
+ enMsgBoxHidableMessage_count
};
void MsgBoxHidable(enMsgBoxHidableMessage enMsg);
Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Snd_fx.cpp 2009-07-16 16:08:49 UTC (rev 296)
+++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2009-07-19 21:41:08 UTC (rev 297)
@@ -3262,7 +3262,8 @@
pChn->nPatternLoopCount--;
if(!pChn->nPatternLoopCount)
{
- if(GetType() & (MOD_TYPE_IT|MOD_TYPE_MPT) && GetModFlag(MSF_COMPATIBLE_PLAY))
+ //IT compatibility 10. Pattern loops (+ same fix for XM and MOD files)
+ if((GetType() & (MOD_TYPE_XM|MOD_TYPE_IT|MOD_TYPE_MPT) && GetModFlag(MSF_COMPATIBLE_PLAY)) || (GetType() & (MOD_TYPE_MOD)))
pChn->nPatternLoop = m_nRow+1;
return -1;
@@ -3270,8 +3271,9 @@
} else
{
MODCHANNEL *p = Chn;
-
- if(!(GetType() & (MOD_TYPE_IT|MOD_TYPE_MPT) && GetModFlag(MSF_COMPATIBLE_PLAY)))
+
+ //IT compatibility 10. Pattern loops (+ same fix for XM and MOD files)
+ if(!((GetType() & (MOD_TYPE_XM|MOD_TYPE_IT|MOD_TYPE_MPT) && GetModFlag(MSF_COMPATIBLE_PLAY)) || (GetType() & (MOD_TYPE_MOD))))
{
for (UINT i=0; i<m_nChannels; i++, p++) if (p != pChn)
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2009-07-16 16:08:58
|
Revision: 296
http://modplug.svn.sourceforge.net/modplug/?rev=296&view=rev
Author: saga-games
Date: 2009-07-16 16:08:49 +0000 (Thu, 16 Jul 2009)
Log Message:
-----------
[Fix] Find/Replace: Made comboboxes more convenient to use
[Fix] IT compatibility: Fixed the fix for test #23
Modified Paths:
--------------
trunk/OpenMPT/mptrack/mptrack.rc
trunk/OpenMPT/soundlib/Snd_fx.cpp
Modified: trunk/OpenMPT/mptrack/mptrack.rc
===================================================================
--- trunk/OpenMPT/mptrack/mptrack.rc 2009-07-12 22:21:08 UTC (rev 295)
+++ trunk/OpenMPT/mptrack/mptrack.rc 2009-07-16 16:08:49 UTC (rev 296)
@@ -1181,7 +1181,7 @@
CONTROL "Instrument",IDC_CHECK2,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,60,17,49,10
COMBOBOX IDC_COMBO2,60,28,106,103,CBS_DROPDOWNLIST | WS_VSCROLL |
- WS_TABSTOP
+ WS_TABSTOP | CBS_SORT
CONTROL "Volume Effect",IDC_CHECK3,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,13,46,60,10
COMBOBOX IDC_COMBO3,13,58,94,77,CBS_DROPDOWNLIST | CBS_SORT |
@@ -1189,7 +1189,7 @@
CONTROL "Volume Data",IDC_CHECK4,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,117,46,56,10
COMBOBOX IDC_COMBO4,117,58,48,77,CBS_DROPDOWNLIST | WS_VSCROLL |
- WS_TABSTOP
+ WS_TABSTOP | CBS_SORT
CONTROL "Effect",IDC_CHECK5,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,13,78,35,10
COMBOBOX IDC_COMBO5,13,92,94,71,CBS_DROPDOWNLIST | CBS_SORT |
@@ -1222,13 +1222,13 @@
CONTROL "Instrument",IDC_CHECK2,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,60,31,49,10
COMBOBOX IDC_COMBO2,60,42,106,92,CBS_DROPDOWNLIST | WS_VSCROLL |
- WS_TABSTOP
+ WS_TABSTOP | CBS_SORT
CONTROL "Volume Effect",IDC_CHECK3,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,13,60,60,10
COMBOBOX IDC_COMBO3,13,71,94,64,CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_COMBO4,117,71,48,64,CBS_DROPDOWNLIST | WS_VSCROLL |
- WS_TABSTOP
+ WS_TABSTOP | CBS_SORT
CONTROL "Volume Data",IDC_CHECK4,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,117,60,56,10
CONTROL "Effect",IDC_CHECK5,"Button",BS_AUTOCHECKBOX |
@@ -1238,7 +1238,7 @@
COMBOBOX IDC_COMBO5,13,106,94,70,CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_COMBO6,117,106,48,80,CBS_DROPDOWNLIST | WS_VSCROLL |
- WS_TABSTOP
+ WS_TABSTOP | CBS_SORT
CONTROL "Replace By:",IDC_CHECK7,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,12,15,63,10
CONTROL "Replace All (No confirmation)",IDC_CHECK8,"Button",
Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Snd_fx.cpp 2009-07-12 22:21:08 UTC (rev 295)
+++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2009-07-16 16:08:49 UTC (rev 296)
@@ -1927,10 +1927,6 @@
{
DoFreqSlide(pChn, -(int)(param * 4));
}
-
- //IT compatibility 23. Portamento with no note
- if((m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT)) && GetModFlag(MSF_COMPATIBLE_PLAY))
- pChn->nPortamentoDest = 0;
}
@@ -1972,10 +1968,6 @@
if (!(m_dwSongFlags & SONG_FIRSTTICK) || (m_nMusicSpeed == 1)) { //rewbs.PortaA01fix
DoFreqSlide(pChn, (int)(param << 2));
}
-
- //IT compatibility 23. Portamento with no note
- if((m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT)) && GetModFlag(MSF_COMPATIBLE_PLAY))
- pChn->nPortamentoDest = 0;
}
void CSoundFile::MidiPortamento(MODCHANNEL *pChn, int param)
@@ -2181,6 +2173,11 @@
if (pChn->nPeriod < pChn->nPortamentoDest) pChn->nPeriod = pChn->nPortamentoDest;
}
}
+
+ //IT compatibility 23. Portamento with no note
+ if(pChn->nPeriod == pChn->nPortamentoDest && ((m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT))) && GetModFlag(MSF_COMPATIBLE_PLAY))
+ pChn->nPortamentoDest = 0;
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2009-07-12 23:13:06
|
Revision: 295
http://modplug.svn.sourceforge.net/modplug/?rev=295&view=rev
Author: saga-games
Date: 2009-07-12 22:21:08 +0000 (Sun, 12 Jul 2009)
Log Message:
-----------
[Fix] SD0: Fix for S3M in rev. 294 also affected MPTm files
[Fix] IT compatibility: Panning fx (Xxx, S8x, pxx) override pan swing (test #20) - Maybe a more elegant solution can be found here, since the same code exists in at least three places here.
Modified Paths:
--------------
trunk/OpenMPT/soundlib/Snd_fx.cpp
Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Snd_fx.cpp 2009-07-12 14:17:41 UTC (rev 294)
+++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2009-07-12 22:21:08 UTC (rev 295)
@@ -1172,7 +1172,7 @@
if(GetModFlag(MSF_COMPATIBLE_PLAY) && (m_nType & (MOD_TYPE_IT|MOD_TYPE_MPT)))
nStartTick = 1;
//ST3 ignores notes with SD0 completely
- else if(m_nType & MOD_TYPE_S3M|MOD_TYPE_MPT)
+ else if(m_nType & MOD_TYPE_S3M)
nStartTick = m_nMusicSpeed;
}
@@ -1344,6 +1344,9 @@
pChn->nPan = vol << 2;
pChn->dwFlags |= CHN_FASTVOLRAMP;
pChn->nRestorePanOnNewNote = 0;
+ //IT compatibility 20. Set pan overrides random pan
+ if(GetModFlag(MSF_COMPATIBLE_PLAY) && (m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT)))
+ pChn->nPanSwing = 0;
}
//rewbs.VSTnoteDelay
@@ -1620,6 +1623,9 @@
}
pChn->dwFlags |= CHN_FASTVOLRAMP;
pChn->nRestorePanOnNewNote = 0;
+ //IT compatibility 20. Set pan overrides random pan
+ if(GetModFlag(MSF_COMPATIBLE_PLAY) && (m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT)))
+ pChn->nPanSwing = 0;
break;
// Panning Slide
@@ -2494,6 +2500,10 @@
if (!(m_dwSongFlags & SONG_SURROUNDPAN)) pChn->dwFlags &= ~CHN_SURROUND;
}
pChn->nPan = (param << 4) + 8; pChn->dwFlags |= CHN_FASTVOLRAMP;
+
+ //IT compatibility 20. Set pan overrides random pan
+ if(GetModFlag(MSF_COMPATIBLE_PLAY) && (m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT)))
+ pChn->nPanSwing = 0;
}
break;
// S9x: Sound Control
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2009-07-12 14:17:42
|
Revision: 294
http://modplug.svn.sourceforge.net/modplug/?rev=294&view=rev
Author: saga-games
Date: 2009-07-12 14:17:41 +0000 (Sun, 12 Jul 2009)
Log Message:
-----------
[Fix] S3M saving: 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)
[Imp] IT loading: Set "created with" version to 1.16 for modules that have been saved with ModPlug 1.16 or older
[Fix] IT compatibility: Improved retrigger compatibility even more (#15)
[Fix] IT compatibility: SD0 / SC0 is now interpreted as SD1 / SC1 in compatibility mode (test #22)
[Fix] S3M compatibility: Notes with SD0 are now ignored, SC0 is completely ignored
[Fix] IT compatibility: Portamento up / down resets the destination of tone portamento (test #23)
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Moddoc.cpp
trunk/OpenMPT/soundlib/Load_it.cpp
trunk/OpenMPT/soundlib/Load_s3m.cpp
trunk/OpenMPT/soundlib/Snd_fx.cpp
trunk/OpenMPT/soundlib/Sndfile.cpp
Modified: trunk/OpenMPT/mptrack/Moddoc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Moddoc.cpp 2009-07-12 12:25:38 UTC (rev 293)
+++ trunk/OpenMPT/mptrack/Moddoc.cpp 2009-07-12 14:17:41 UTC (rev 294)
@@ -2694,7 +2694,11 @@
break;
case 0xC0: // note cut
case 0xD0: // note delay
- strcat(s, " frames");
+ //IT compatibility 22. SD0 == SD1, SC0 == SC1
+ if(((param & 0x0F) == 1) || ((param & 0x0F) == 0 && (m_SndFile.GetType() & (MOD_TYPE_IT|MOD_TYPE_MPT)) && m_SndFile.GetModFlag(MSF_COMPATIBLE_PLAY)))
+ strcpy(s, "1 frame");
+ else
+ strcat(s, " frames");
break;
case 0xE0: // pattern delay (rows)
strcat(s, " rows");
Modified: trunk/OpenMPT/soundlib/Load_it.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_it.cpp 2009-07-12 12:25:38 UTC (rev 293)
+++ trunk/OpenMPT/soundlib/Load_it.cpp 2009-07-12 14:17:41 UTC (rev 294)
@@ -962,6 +962,8 @@
(pifh->cwtv == 0x217 && pifh->cmwt == 0x200)) interpretModplugmade = true;
//TODO: Check whether above interpretation is reasonable especially for
//values 0x217 and 0x200 which are the values used in 1.16.
+ if(pifh->cwtv == 0x217 && pifh->cmwt == 0x200)
+ m_dwCreatedWithVersion = MAKE_VERSION_NUMERIC(1, 16, 0, 0);
}
}
Modified: trunk/OpenMPT/soundlib/Load_s3m.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_s3m.cpp 2009-07-12 12:25:38 UTC (rev 293)
+++ trunk/OpenMPT/soundlib/Load_s3m.cpp 2009-07-12 14:17:41 UTC (rev 294)
@@ -531,7 +531,7 @@
header[0x30] = m_nDefaultGlobalVolume >> 2;
header[0x31] = m_nDefaultSpeed;
header[0x32] = m_nDefaultTempo;
- header[0x33] = ((m_nSamplePreAmp < 0x20) ? 0x20 : m_nSamplePreAmp) | 0x80; // Stereo
+ header[0x33] = min(max(0x20, m_nSamplePreAmp), 0x7F); // Stereo
header[0x35] = 0xFC;
for (i=0; i<32; i++)
{
Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Snd_fx.cpp 2009-07-12 12:25:38 UTC (rev 293)
+++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2009-07-12 14:17:41 UTC (rev 294)
@@ -298,7 +298,7 @@
if (!(m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT))) param <<= 1;
if(GetModFlag(MSF_COMPATIBLE_PLAY))
{
- // both FT2 and IT ignore out-of-range values
+ //IT compatibility 16. Both FT2 and IT ignore out-of-range values
if (param <= 128)
nGlbVol = param << 1;
}
@@ -312,6 +312,7 @@
case CMD_GLOBALVOLSLIDE:
if(GetModFlag(MSF_COMPATIBLE_PLAY))
{
+ //IT compatibility 16. Global volume slide params are stored per channel (FT2/IT)
if (param) pChn->nOldGlobalVolSlide = param; else param = pChn->nOldGlobalVolSlide;
}
else
@@ -746,6 +747,7 @@
pChn->dwFlags |= CHN_FASTVOLRAMP;
if(!GetModFlag(MSF_COMPATIBLE_PLAY))
{
+ //IT compatibility 15. Retrigger (Tremor doesn't store anything here, so we just don't reset this as well)
pChn->nRetrigCount = 0;
pChn->nTremorCount = 0;
}
@@ -1164,6 +1166,15 @@
if ((param & 0xF0) == 0xD0)
{
nStartTick = param & 0x0F;
+ if(nStartTick == 0)
+ {
+ //IT compatibility 22. SD0 == SD1
+ if(GetModFlag(MSF_COMPATIBLE_PLAY) && (m_nType & (MOD_TYPE_IT|MOD_TYPE_MPT)))
+ nStartTick = 1;
+ //ST3 ignores notes with SD0 completely
+ else if(m_nType & MOD_TYPE_S3M|MOD_TYPE_MPT)
+ nStartTick = m_nMusicSpeed;
+ }
//IT compatibility 08. Handling of out-of-range delay command.
if(nStartTick >= m_nMusicSpeed && GetType() & (MOD_TYPE_IT | MOD_TYPE_MPT) && GetModFlag(MSF_COMPATIBLE_PLAY))
@@ -1397,6 +1408,7 @@
break;
case VOLCMD_PORTAUP:
+ //IT compatibility (one of the first - link effect memory)
if((GetType() & (MOD_TYPE_IT | MOD_TYPE_MPT)) && GetModFlag(MSF_COMPATIBLE_PLAY))
PortamentoUp(pChn, vol << 2, true);
else
@@ -1404,6 +1416,7 @@
break;
case VOLCMD_PORTADOWN:
+ //IT compatibility (one of the first - link effect memory)
if((GetType() & (MOD_TYPE_IT | MOD_TYPE_MPT)) && GetModFlag(MSF_COMPATIBLE_PLAY))
PortamentoDown(pChn, vol << 2, true);
else
@@ -1535,21 +1548,22 @@
}
if(!GetModFlag(MSF_COMPATIBLE_PLAY))
{
- if (param) pChn->nRetrigParam = (BYTE)(param & 0xFF); else param = pChn->nRetrigParam;
- //rewbs.volOffset
- //RetrigNote(nChn, param);
- if (volcmd == VOLCMD_OFFSET)
- RetrigNote(nChn, param, vol<<3);
- else if (volcmd == VOLCMD_VELOCITY)
- RetrigNote(nChn, param, 48-(vol << 3));
- else
- RetrigNote(nChn, param);
- //end rewbs.volOffset:
+ if (param) pChn->nRetrigParam = (BYTE)(param & 0xFF); else param = pChn->nRetrigParam;
+ //rewbs.volOffset
+ //RetrigNote(nChn, param);
+ if (volcmd == VOLCMD_OFFSET)
+ RetrigNote(nChn, param, vol<<3);
+ else if (volcmd == VOLCMD_VELOCITY)
+ RetrigNote(nChn, param, 48-(vol << 3));
+ else
+ RetrigNote(nChn, param);
+ //end rewbs.volOffset:
}
else
{
- if (param) pChn->nRetrigParam = (BYTE)(param & 0xFF);
- RetrigNote(nChn, pChn->nRetrigParam);
+ //IT compatibility 15. Retrigger
+ if (param) pChn->nRetrigParam = (BYTE)(param & 0xFF);
+ RetrigNote(nChn, pChn->nRetrigParam);
}
break;
@@ -1567,7 +1581,7 @@
if (!(m_nType & (MOD_TYPE_IT|MOD_TYPE_MPT))) param <<= 1;
if(GetModFlag(MSF_COMPATIBLE_PLAY))
{
- // both FT2 and IT ignore out-of-range values
+ //IT compatibility 16. Both FT2 and IT ignore out-of-range values
if (param <= 128)
m_nGlobalVolume = param << 1;
}
@@ -1580,6 +1594,7 @@
// Global Volume Slide
case CMD_GLOBALVOLSLIDE:
+ //IT compatibility 16. Saving last global volume slide param per channel (FT2/IT)
if(GetModFlag(MSF_COMPATIBLE_PLAY))
GlobalVolSlide(param, &pChn->nOldGlobalVolSlide);
else
@@ -1636,7 +1651,7 @@
case CMD_KEYOFF:
if(GetModFlag(MSF_COMPATIBLE_PLAY) && (m_nType & (MOD_TYPE_XM|MOD_TYPE_MT2)))
{
- // This is how it's supposed to sound...
+ // This is how it's supposed to sound... (in FT2)
if (m_nTickCount == param)
{
// XM: Key-Off + Sample == Note Cut
@@ -1698,6 +1713,7 @@
if(!GetModFlag(MSF_COMPATIBLE_PLAY) || !(m_nType & (MOD_TYPE_XM|MOD_TYPE_MT2)))
{
+ // FT2 only sets the position of the Volume envelope
pChn->nPanEnvPosition = param;
pChn->nPitchEnvPosition = param;
if (pChn->pHeader)
@@ -1905,6 +1921,10 @@
{
DoFreqSlide(pChn, -(int)(param * 4));
}
+
+ //IT compatibility 23. Portamento with no note
+ if((m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT)) && GetModFlag(MSF_COMPATIBLE_PLAY))
+ pChn->nPortamentoDest = 0;
}
@@ -1947,6 +1967,9 @@
DoFreqSlide(pChn, (int)(param << 2));
}
+ //IT compatibility 23. Portamento with no note
+ if((m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT)) && GetModFlag(MSF_COMPATIBLE_PLAY))
+ pChn->nPortamentoDest = 0;
}
void CSoundFile::MidiPortamento(MODCHANNEL *pChn, int param)
@@ -2381,6 +2404,7 @@
//case 0x80: if (!m_nTickCount) { pChn->nPan = (param << 4) + 8; pChn->dwFlags |= CHN_FASTVOLRAMP; } break;
case 0x80: if (!m_nTickCount)
{
+ //IT compatibility (Panning always resets surround state)
if( TypeIsIT_MPT_XM() == false || GetModFlag(MSF_COMPATIBLE_PLAY) )
{
if (!(m_dwSongFlags & SONG_SURROUNDPAN)) pChn->dwFlags &= ~CHN_SURROUND;
@@ -2951,7 +2975,7 @@
if(GetModFlag(MSF_COMPATIBLE_PLAY) && (m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT)))
{
- // IT retrigger behaviour
+ //IT compatibility 15. Retrigger
if (!m_nTickCount && pChn->nRowNote)
{
pChn->nRetrigCount = param & 0xf;
@@ -3075,6 +3099,16 @@
void CSoundFile::NoteCut(UINT nChn, UINT nTick)
//---------------------------------------------
{
+ if(nTick == 0)
+ {
+ //IT compatibility 22. SC0 == SC1
+ if(GetModFlag(MSF_COMPATIBLE_PLAY) && (m_nType & (MOD_TYPE_IT|MOD_TYPE_MPT)))
+ nTick = 1;
+ // ST3 doesn't cut notes with SC0
+ else if(m_nType & MOD_TYPE_S3M)
+ return;
+ }
+
if (m_nTickCount == nTick)
{
MODCHANNEL *pChn = &Chn[nChn];
Modified: trunk/OpenMPT/soundlib/Sndfile.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.cpp 2009-07-12 12:25:38 UTC (rev 293)
+++ trunk/OpenMPT/soundlib/Sndfile.cpp 2009-07-12 14:17:41 UTC (rev 294)
@@ -636,6 +636,12 @@
Chn[ich].dwFlags = ChnSettings[ich].dwFlags;
Chn[ich].nVolume = 256;
Chn[ich].nCutOff = 0x7F;
+ //IT compatibility 15. Retrigger
+ if(GetModFlag(MSF_COMPATIBLE_PLAY))
+ {
+ Chn[ich].nRetrigParam = 1;
+ Chn[ich].nRetrigCount = 0;
+ }
}
// Checking instruments
MODINSTRUMENT *pins = Ins;
@@ -1135,7 +1141,13 @@
Chn[j].nCommand = 0;
Chn[j].nPatternLoopCount = 0;
Chn[j].nPatternLoop = 0;
- if(!GetModFlag(MSF_COMPATIBLE_PLAY)) Chn[j].nTremorCount = 0;
+ //IT compatibility 15. Retrigger
+ if(GetModFlag(MSF_COMPATIBLE_PLAY))
+ {
+ Chn[j].nRetrigCount = 0;
+ Chn[j].nRetrigParam = 1;
+ }
+ Chn[j].nTremorCount = Chn[j].nTremorOn = Chn[j].nTremorOff = 0;
}
if (!nPos)
{
@@ -1395,6 +1407,12 @@
Chn[i].nPatternLoop = 0;
Chn[i].nFadeOutVol = 0;
Chn[i].dwFlags |= CHN_KEYOFF|CHN_NOTEFADE;
+ //IT compatibility 15. Retrigger
+ if(GetModFlag(MSF_COMPATIBLE_PLAY))
+ {
+ Chn[i].nRetrigParam = 1;
+ Chn[i].nRetrigCount = 0;
+ }
Chn[i].nTremorCount = Chn[i].nTremorOn = Chn[i].nTremorOff = 0;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2009-07-12 12:25:43
|
Revision: 293
http://modplug.svn.sourceforge.net/modplug/?rev=293&view=rev
Author: saga-games
Date: 2009-07-12 12:25:38 +0000 (Sun, 12 Jul 2009)
Log Message:
-----------
[Fix] Pattern editor: Set max. row spacing / skipping value to 64, visibly clamp values > 64 to 64 in the edit box, skip to next pattern if continuous scroll is enabled
[Fix] Playback: Global volume will be set correctly when skipping around in the module (accidentally broke this in rev. 290)
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Ctrl_pat.cpp
trunk/OpenMPT/mptrack/View_pat.cpp
trunk/OpenMPT/mptrack/View_pat.h
trunk/OpenMPT/soundlib/Snd_fx.cpp
Modified: trunk/OpenMPT/mptrack/Ctrl_pat.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Ctrl_pat.cpp 2009-07-11 19:18:24 UTC (rev 292)
+++ trunk/OpenMPT/mptrack/Ctrl_pat.cpp 2009-07-12 12:25:38 UTC (rev 293)
@@ -167,7 +167,7 @@
m_EditOrderListMargins.SetParent(this);
m_EditOrderListMargins.SetLimitText(3);
// Spin controls
- m_SpinSpacing.SetRange(0, 16);
+ m_SpinSpacing.SetRange(0, MAX_SPACING);
m_SpinSpacing.SetPos(CMainFrame::gnPatternSpacing);
m_SpinInstrument.SetRange(-1, 1);
@@ -716,7 +716,11 @@
if ((m_EditSpacing.m_hWnd) && (m_EditSpacing.GetWindowTextLength() > 0))
{
CMainFrame::gnPatternSpacing = GetDlgItemInt(IDC_EDIT_SPACING);
- if (CMainFrame::gnPatternSpacing > 16) CMainFrame::gnPatternSpacing = 16;
+ if (CMainFrame::gnPatternSpacing > MAX_SPACING)
+ {
+ CMainFrame::gnPatternSpacing = MAX_SPACING;
+ SetDlgItemInt(IDC_EDIT_SPACING, CMainFrame::gnPatternSpacing, FALSE);
+ }
SendViewMessage(VIEWMSG_SETSPACING, CMainFrame::gnPatternSpacing);
}
}
Modified: trunk/OpenMPT/mptrack/View_pat.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_pat.cpp 2009-07-11 19:18:24 UTC (rev 292)
+++ trunk/OpenMPT/mptrack/View_pat.cpp 2009-07-12 12:25:38 UTC (rev 293)
@@ -18,7 +18,6 @@
#include "midi.h"
#include <cmath>
-#define MAX_SPACING 16
#define PLUGNAME_HEIGHT 16 //rewbs.patPlugName
#pragma warning(disable:4244) //"conversion from 'type1' to 'type2', possible loss of data"
@@ -4167,8 +4166,9 @@
if ( bIsLiveRecord == false )
{
if ((m_nSpacing > 0) && (m_nSpacing <= MAX_SPACING)) {
- if (nRow+m_nSpacing<pSndFile->PatternSize[nPat]) {
- SetCurrentRow(nRow+m_nSpacing);
+
+ if (nRow + m_nSpacing < pSndFile->PatternSize[nPat] || (CMainFrame::m_dwPatternSetup & PATTERN_CONTSCROLL)) {
+ SetCurrentRow(nRow + m_nSpacing, (CMainFrame::m_dwPatternSetup & PATTERN_CONTSCROLL) ? true: false);
m_bLastNoteEntryBlocked=false;
} else {
m_bLastNoteEntryBlocked=true; // if the cursor is block by the end of the pattern here,
Modified: trunk/OpenMPT/mptrack/View_pat.h
===================================================================
--- trunk/OpenMPT/mptrack/View_pat.h 2009-07-11 19:18:24 UTC (rev 292)
+++ trunk/OpenMPT/mptrack/View_pat.h 2009-07-12 12:25:38 UTC (rev 293)
@@ -30,6 +30,9 @@
#define PATSTATUS_PLUGNAMESINHEADERS 0x2000 //rewbs.patPlugName
#define PATSTATUS_PATTERNLOOP 0x4000
+// Row Spacing
+#define MAX_SPACING 64
+
enum {
NOTE_COLUMN=0,
INST_COLUMN,
Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Snd_fx.cpp 2009-07-11 19:18:24 UTC (rev 292)
+++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2009-07-12 12:25:38 UTC (rev 293)
@@ -295,8 +295,6 @@
break;
// Global Volume
case CMD_GLOBALVOLUME:
- if (m_nTickCount) break;
-
if (!(m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT))) param <<= 1;
if(GetModFlag(MSF_COMPATIBLE_PLAY))
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2009-07-11 19:18:34
|
Revision: 292
http://modplug.svn.sourceforge.net/modplug/?rev=292&view=rev
Author: saga-games
Date: 2009-07-11 19:18:24 +0000 (Sat, 11 Jul 2009)
Log Message:
-----------
[Fix] Tremor: Two (not too important) lines were missing
Modified Paths:
--------------
trunk/OpenMPT/soundlib/Load_it.cpp
trunk/OpenMPT/soundlib/Sndfile.cpp
Modified: trunk/OpenMPT/soundlib/Load_it.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_it.cpp 2009-07-11 18:53:31 UTC (rev 291)
+++ trunk/OpenMPT/soundlib/Load_it.cpp 2009-07-11 19:18:24 UTC (rev 292)
@@ -985,8 +985,6 @@
if (pifh->tempo) m_nDefaultTempo = pifh->tempo;
if(m_nDefaultTempo < 32) m_nDefaultTempo = 32; // tempo 31 is possible. due to conflicts with the rest of the engine, let's just clamp it to 32.
- if(m_nDefaultTempo < 32) m_nDefaultTempo = 32; // tempo 31 is possible. due to conflicts with the rest of the engine, let's just clamp it to 32.
-
m_nSamplePreAmp = pifh->mv & 0x7F;
if (m_nSamplePreAmp<0x20) {
m_nSamplePreAmp=100;
Modified: trunk/OpenMPT/soundlib/Sndfile.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.cpp 2009-07-11 18:53:31 UTC (rev 291)
+++ trunk/OpenMPT/soundlib/Sndfile.cpp 2009-07-11 19:18:24 UTC (rev 292)
@@ -1135,7 +1135,7 @@
Chn[j].nCommand = 0;
Chn[j].nPatternLoopCount = 0;
Chn[j].nPatternLoop = 0;
- Chn[j].nTremorCount = 0;
+ if(!GetModFlag(MSF_COMPATIBLE_PLAY)) Chn[j].nTremorCount = 0;
}
if (!nPos)
{
@@ -1395,7 +1395,7 @@
Chn[i].nPatternLoop = 0;
Chn[i].nFadeOutVol = 0;
Chn[i].dwFlags |= CHN_KEYOFF|CHN_NOTEFADE;
- Chn[i].nTremorCount = 0;
+ Chn[i].nTremorCount = Chn[i].nTremorOn = Chn[i].nTremorOff = 0;
}
if(resetMask & 4)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2009-07-11 18:53:35
|
Revision: 291
http://modplug.svn.sourceforge.net/modplug/?rev=291&view=rev
Author: saga-games
Date: 2009-07-11 18:53:31 +0000 (Sat, 11 Jul 2009)
Log Message:
-----------
[Imp] Note properties: Explanation for Tremor effect
[Fix] Tremor: Sounds like in IT when compatible playback mode is turned on.
[Fix] IT loader: 31 BPM is an allowed default tempo. Tentative fix: Clamp to 32 (instead of 125)
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Moddoc.cpp
trunk/OpenMPT/soundlib/Load_it.cpp
trunk/OpenMPT/soundlib/Snd_fx.cpp
trunk/OpenMPT/soundlib/Sndfile.h
trunk/OpenMPT/soundlib/Sndmix.cpp
Modified: trunk/OpenMPT/mptrack/Moddoc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Moddoc.cpp 2009-07-11 16:47:56 UTC (rev 290)
+++ trunk/OpenMPT/mptrack/Moddoc.cpp 2009-07-11 18:53:31 UTC (rev 291)
@@ -2567,6 +2567,28 @@
strcpy(s, "continue");
break;
+ case CMD_TREMOR:
+ if(param)
+ {
+ BYTE ontime = param >> 4, offtime = param & 0x0F;
+ if(m_SndFile.m_dwSongFlags & SONG_ITOLDEFFECTS)
+ {
+ ontime++;
+ offtime++;
+ }
+ else
+ {
+ if(ontime == 0) ontime = 1;
+ if(offtime == 0) offtime = 1;
+ }
+ wsprintf(pszName, "ontime %d, offtime %d", ontime, offtime);
+ }
+ else
+ {
+ strcpy(s, "continue");
+ }
+ break;
+
case CMD_MIDI:
if (param < 0x80)
{
Modified: trunk/OpenMPT/soundlib/Load_it.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_it.cpp 2009-07-11 16:47:56 UTC (rev 290)
+++ trunk/OpenMPT/soundlib/Load_it.cpp 2009-07-11 18:53:31 UTC (rev 291)
@@ -983,6 +983,10 @@
}
if (pifh->speed) m_nDefaultSpeed = pifh->speed;
if (pifh->tempo) m_nDefaultTempo = pifh->tempo;
+ if(m_nDefaultTempo < 32) m_nDefaultTempo = 32; // tempo 31 is possible. due to conflicts with the rest of the engine, let's just clamp it to 32.
+
+ if(m_nDefaultTempo < 32) m_nDefaultTempo = 32; // tempo 31 is possible. due to conflicts with the rest of the engine, let's just clamp it to 32.
+
m_nSamplePreAmp = pifh->mv & 0x7F;
if (m_nSamplePreAmp<0x20) {
m_nSamplePreAmp=100;
Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Snd_fx.cpp 2009-07-11 16:47:56 UTC (rev 290)
+++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2009-07-11 18:53:31 UTC (rev 291)
@@ -749,8 +749,8 @@
if(!GetModFlag(MSF_COMPATIBLE_PLAY))
{
pChn->nRetrigCount = 0;
+ pChn->nTremorCount = 0;
}
- pChn->nTremorCount = 0;
if (bResetEnv)
{
pChn->nVolSwing = pChn->nPanSwing = 0;
Modified: trunk/OpenMPT/soundlib/Sndfile.h
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.h 2009-07-11 16:47:56 UTC (rev 290)
+++ trunk/OpenMPT/soundlib/Sndfile.h 2009-07-11 18:53:31 UTC (rev 291)
@@ -546,7 +546,7 @@
BYTE nOldOffset, nOldHiOffset;
BYTE nCutOff, nResonance;
BYTE nRetrigCount, nRetrigParam;
- BYTE nTremorCount, nTremorParam;
+ BYTE nTremorCount, nTremorParam, nTremorOn, nTremorOff;
BYTE nPatternLoop, nPatternLoopCount;
BYTE nRowNote, nRowInstr;
BYTE nRowVolCmd, nRowVolume;
Modified: trunk/OpenMPT/soundlib/Sndmix.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Sndmix.cpp 2009-07-11 16:47:56 UTC (rev 290)
+++ trunk/OpenMPT/soundlib/Sndmix.cpp 2009-07-11 18:53:31 UTC (rev 291)
@@ -986,18 +986,53 @@
}
// Tremor
- if (pChn->nCommand == CMD_TREMOR)
+ if(pChn->nCommand == CMD_TREMOR)
{
- UINT n = (pChn->nTremorParam >> 4) + (pChn->nTremorParam & 0x0F);
- UINT ontime = pChn->nTremorParam >> 4;
- if ((!(m_nType & (MOD_TYPE_IT|MOD_TYPE_MPT))) || (m_dwSongFlags & SONG_ITOLDEFFECTS)) { n += 2; ontime++; }
- UINT tremcount = (UINT)pChn->nTremorCount;
- if (tremcount >= n) tremcount = 0;
- if ((m_nTickCount) || (m_nType & (MOD_TYPE_S3M|MOD_TYPE_IT|MOD_TYPE_MPT)))
+ if(GetModFlag(MSF_COMPATIBLE_PLAY) && (m_nType & (MOD_TYPE_IT|MOD_TYPE_MPT)))
{
- if (tremcount >= ontime) vol = 0;
- pChn->nTremorCount = (BYTE)(tremcount + 1);
+ // Original IT behaviour
+ if(pChn->nTremorOn)
+ pChn->nTremorOn--;
+ if(!pChn->nTremorOn) {
+ if(pChn->nTremorOff)
+ {
+ vol = 0;
+ pChn->nTremorOff--;
+ }
+ else
+ {
+ pChn->nTremorOn = pChn->nTremorParam >> 4;
+ pChn->nTremorOff = pChn->nTremorParam & 0x0F;
+ if(m_dwSongFlags & SONG_ITOLDEFFECTS)
+ {
+ pChn->nTremorOn++;
+ pChn->nTremorOff++;
+ }
+ else
+ {
+ if (!pChn->nTremorOn) pChn->nTremorOn = 1;
+ if (!pChn->nTremorOff) pChn->nTremorOff = 1;
+ }
+ }
+ }
}
+ else
+ {
+ UINT n = (pChn->nTremorParam >> 4) + (pChn->nTremorParam & 0x0F);
+ UINT ontime = pChn->nTremorParam >> 4;
+ if ((!(m_nType & (MOD_TYPE_IT|MOD_TYPE_MPT))) || (m_dwSongFlags & SONG_ITOLDEFFECTS))
+ {
+ n += 2;
+ ontime++;
+ }
+ UINT tremcount = (UINT)pChn->nTremorCount;
+ if (tremcount >= n) tremcount = 0;
+ if ((m_nTickCount) || (m_nType & (MOD_TYPE_S3M|MOD_TYPE_IT|MOD_TYPE_MPT)))
+ {
+ if (tremcount >= ontime) vol = 0;
+ pChn->nTremorCount = (BYTE)(tremcount + 1);
+ }
+ }
pChn->dwFlags |= CHN_FASTVOLRAMP;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2009-07-11 16:47:58
|
Revision: 290
http://modplug.svn.sourceforge.net/modplug/?rev=290&view=rev
Author: saga-games
Date: 2009-07-11 16:47:56 +0000 (Sat, 11 Jul 2009)
Log Message:
-----------
[Fix] patterns.bmp was broken
[Fix] IT / XM Compatibility: Out of range global volume, local global volume slides (Might need to re-align MODCHANNEL)
[Fix] IT Compatibility: Retrigger effect behaved slightly wrong
Modified Paths:
--------------
trunk/OpenMPT/mptrack/res/patterns.bmp
trunk/OpenMPT/soundlib/Snd_fx.cpp
trunk/OpenMPT/soundlib/Sndfile.h
Modified: trunk/OpenMPT/mptrack/res/patterns.bmp
===================================================================
(Binary files differ)
Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Snd_fx.cpp 2009-07-11 16:27:29 UTC (rev 289)
+++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2009-07-11 16:47:56 UTC (rev 290)
@@ -295,13 +295,32 @@
break;
// Global Volume
case CMD_GLOBALVOLUME:
+ if (m_nTickCount) break;
+
if (!(m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT))) param <<= 1;
- if (param > 128) param = 128;
- nGlbVol = param << 1;
+ if(GetModFlag(MSF_COMPATIBLE_PLAY))
+ {
+ // both FT2 and IT ignore out-of-range values
+ if (param <= 128)
+ nGlbVol = param << 1;
+ }
+ else
+ {
+ if (param > 128) param = 128;
+ nGlbVol = param << 1;
+ }
break;
// Global Volume Slide
case CMD_GLOBALVOLSLIDE:
- if (param) nOldGlbVolSlide = param; else param = nOldGlbVolSlide;
+ if(GetModFlag(MSF_COMPATIBLE_PLAY))
+ {
+ if (param) pChn->nOldGlobalVolSlide = param; else param = pChn->nOldGlobalVolSlide;
+ }
+ else
+ {
+ if (param) nOldGlbVolSlide = param; else param = nOldGlbVolSlide;
+
+ }
if (((param & 0x0F) == 0x0F) && (param & 0xF0))
{
param >>= 4;
@@ -727,7 +746,10 @@
pChn->nLeftVU = pChn->nRightVU = 0xFF;
pChn->dwFlags &= ~CHN_FILTER;
pChn->dwFlags |= CHN_FASTVOLRAMP;
- pChn->nRetrigCount = 0;
+ if(!GetModFlag(MSF_COMPATIBLE_PLAY))
+ {
+ pChn->nRetrigCount = 0;
+ }
pChn->nTremorCount = 0;
if (bResetEnv)
{
@@ -1513,6 +1535,8 @@
if (!(param & 0x0F)) param |= pChn->nRetrigParam & 0x0F;
param |= 0x100; // increment retrig count on first row
}
+ if(!GetModFlag(MSF_COMPATIBLE_PLAY))
+ {
if (param) pChn->nRetrigParam = (BYTE)(param & 0xFF); else param = pChn->nRetrigParam;
//rewbs.volOffset
//RetrigNote(nChn, param);
@@ -1523,6 +1547,12 @@
else
RetrigNote(nChn, param);
//end rewbs.volOffset:
+ }
+ else
+ {
+ if (param) pChn->nRetrigParam = (BYTE)(param & 0xFF);
+ RetrigNote(nChn, pChn->nRetrigParam);
+ }
break;
// Tremor
@@ -1537,13 +1567,25 @@
if (m_nTickCount) break;
if (!(m_nType & (MOD_TYPE_IT|MOD_TYPE_MPT))) param <<= 1;
- if (param > 128) param = 128;
- m_nGlobalVolume = param << 1;
+ if(GetModFlag(MSF_COMPATIBLE_PLAY))
+ {
+ // both FT2 and IT ignore out-of-range values
+ if (param <= 128)
+ m_nGlobalVolume = param << 1;
+ }
+ else
+ {
+ if (param > 128) param = 128;
+ m_nGlobalVolume = param << 1;
+ }
break;
// Global Volume Slide
case CMD_GLOBALVOLSLIDE:
- GlobalVolSlide(param);
+ if(GetModFlag(MSF_COMPATIBLE_PLAY))
+ GlobalVolSlide(param, &pChn->nOldGlobalVolSlide);
+ else
+ GlobalVolSlide(param, &m_nOldGlbVolSlide);
break;
// Set 8-bit Panning
@@ -2909,26 +2951,43 @@
UINT nRetrigCount = pChn->nRetrigCount;
BOOL bDoRetrig = FALSE;
- if (m_nType & (MOD_TYPE_S3M|MOD_TYPE_IT|MOD_TYPE_MPT))
+ if(GetModFlag(MSF_COMPATIBLE_PLAY) && (m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT)))
{
- if (!nRetrigSpeed) nRetrigSpeed = 1;
- if ((nRetrigCount) && (!(nRetrigCount % nRetrigSpeed))) bDoRetrig = TRUE;
- nRetrigCount++;
- } else
+ // IT retrigger behaviour
+ if (!m_nTickCount && pChn->nRowNote)
+ {
+ pChn->nRetrigCount = param & 0xf;
+ }
+ else if (!--pChn->nRetrigCount)
+ {
+ pChn->nRetrigCount = param & 0xf;
+ bDoRetrig = TRUE;
+ }
+ }
+ else
{
- UINT realspeed = nRetrigSpeed;
- if ((param & 0x100) && (pChn->nRowVolCmd == VOLCMD_VOLUME) && (pChn->nRowParam & 0xF0)) realspeed++;
- if ((m_nTickCount) || (param & 0x100))
+ if (m_nType & (MOD_TYPE_S3M|MOD_TYPE_IT|MOD_TYPE_MPT))
{
- if (!realspeed) realspeed = 1;
- if ((!(param & 0x100)) && (m_nMusicSpeed) && (!(m_nTickCount % realspeed))) bDoRetrig = TRUE;
+ if (!nRetrigSpeed) nRetrigSpeed = 1;
+ if ((nRetrigCount) && (!(nRetrigCount % nRetrigSpeed))) bDoRetrig = TRUE;
nRetrigCount++;
- } else if (m_nType & (MOD_TYPE_XM|MOD_TYPE_MT2)) nRetrigCount = 0;
- if (nRetrigCount >= realspeed)
+ } else
{
- if ((m_nTickCount) || ((param & 0x100) && (!pChn->nRowNote))) bDoRetrig = TRUE;
+ UINT realspeed = nRetrigSpeed;
+ if ((param & 0x100) && (pChn->nRowVolCmd == VOLCMD_VOLUME) && (pChn->nRowParam & 0xF0)) realspeed++;
+ if ((m_nTickCount) || (param & 0x100))
+ {
+ if (!realspeed) realspeed = 1;
+ if ((!(param & 0x100)) && (m_nMusicSpeed) && (!(m_nTickCount % realspeed))) bDoRetrig = TRUE;
+ nRetrigCount++;
+ } else if (m_nType & (MOD_TYPE_XM|MOD_TYPE_MT2)) nRetrigCount = 0;
+ if (nRetrigCount >= realspeed)
+ {
+ if ((m_nTickCount) || ((param & 0x100) && (!pChn->nRowNote))) bDoRetrig = TRUE;
+ }
}
}
+
if (bDoRetrig)
{
UINT dv = (param >> 4) & 0x0F;
@@ -2967,7 +3026,8 @@
SampleOffset(nChn, offset, false);
}
}
- pChn->nRetrigCount = (BYTE)nRetrigCount;
+ if(!GetModFlag(MSF_COMPATIBLE_PLAY) || !(m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT)))
+ pChn->nRetrigCount = (BYTE)nRetrigCount;
}
@@ -3191,11 +3251,11 @@
}
-void CSoundFile::GlobalVolSlide(UINT param)
+void CSoundFile::GlobalVolSlide(UINT param, UINT * nOldGlobalVolSlide)
//-----------------------------------------
{
LONG nGlbSlide = 0;
- if (param) m_nOldGlbVolSlide = param; else param = m_nOldGlbVolSlide;
+ if (param) *nOldGlobalVolSlide = param; else param = *nOldGlobalVolSlide;
if (((param & 0x0F) == 0x0F) && (param & 0xF0))
{
if (m_dwSongFlags & SONG_FIRSTTICK) nGlbSlide = (param >> 4) * 2;
Modified: trunk/OpenMPT/soundlib/Sndfile.h
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.h 2009-07-11 16:27:29 UTC (rev 289)
+++ trunk/OpenMPT/soundlib/Sndfile.h 2009-07-11 16:47:56 UTC (rev 290)
@@ -530,6 +530,7 @@
LONG nVolSwing, nPanSwing;
LONG nCutSwing, nResSwing;
LONG nRestorePanOnNewNote; //If > 0, nPan should be set to nRestorePanOnNewNote - 1 on new note. Used to recover from panswing.
+ UINT nOldGlobalVolSlide;
// 8-bit members
BYTE nRestoreResonanceOnNewNote; //Like above
BYTE nRestoreCutoffOnNewNote; //Like above
@@ -1160,7 +1161,7 @@
// Global Effects
void SetTempo(UINT param, bool setAsNonModcommand = false);
void SetSpeed(UINT param);
- void GlobalVolSlide(UINT param);
+ void GlobalVolSlide(UINT param, UINT * nOldGlobalVolSlide);
DWORD IsSongFinished(UINT nOrder, UINT nRow) const;
BOOL IsValidBackwardJump(UINT nStartOrder, UINT nStartRow, UINT nJumpOrder, UINT nJumpRow) const;
// Read/Write sample functions
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2009-07-11 16:27:33
|
Revision: 289
http://modplug.svn.sourceforge.net/modplug/?rev=289&view=rev
Author: saga-games
Date: 2009-07-11 16:27:29 +0000 (Sat, 11 Jul 2009)
Log Message:
-----------
[Fix] Treeview: Deleting patterns from a module will also reset their names
[Imp] Pattern editor: Echopaste switch
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Ctrl_pat.cpp
trunk/OpenMPT/mptrack/Ctrl_pat.h
trunk/OpenMPT/mptrack/Ctrl_seq.cpp
trunk/OpenMPT/mptrack/mptrack.rc
trunk/OpenMPT/mptrack/res/patterns.bmp
trunk/OpenMPT/mptrack/resource.h
trunk/OpenMPT/soundlib/Load_mod.cpp
trunk/OpenMPT/soundlib/Sndfile.cpp
Modified: trunk/OpenMPT/mptrack/Ctrl_pat.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Ctrl_pat.cpp 2009-07-08 22:23:42 UTC (rev 288)
+++ trunk/OpenMPT/mptrack/Ctrl_pat.cpp 2009-07-11 16:27:29 UTC (rev 289)
@@ -52,6 +52,7 @@
ON_COMMAND(ID_PATTERNDETAIL_LO, OnDetailLo)
ON_COMMAND(ID_PATTERNDETAIL_MED, OnDetailMed)
ON_COMMAND(ID_PATTERNDETAIL_HI, OnDetailHi)
+ ON_COMMAND(ID_ECHOPASTE, OnToggleEchoPaste)
ON_CBN_SELCHANGE(IDC_COMBO_INSTRUMENT, OnInstrumentChanged)
// -> CODE#0012
// -> DESC="midi keyboard split"
@@ -157,6 +158,7 @@
m_ToolBar.AddButton(ID_PATTERNDETAIL_MED, 31, TBSTYLE_CHECK, TBSTATE_ENABLED);
m_ToolBar.AddButton(ID_PATTERNDETAIL_HI, 32, TBSTYLE_CHECK, TBSTATE_ENABLED|TBSTATE_CHECKED);
m_ToolBar.AddButton(ID_SEPARATOR, 0, TBSTYLE_SEP);
+ m_ToolBar.AddButton(ID_ECHOPASTE, 38, TBSTYLE_CHECK, ((CMainFrame::m_dwPatternSetup & PATTERN_ECHOPASTE) ? TBSTATE_CHECKED : 0) | TBSTATE_ENABLED);
// Special edit controls -> tab switch to view
m_EditSpacing.SetParent(this);
@@ -295,6 +297,7 @@
// -> CODE#0007
// -> DESC="uncheck follow song checkbox by default"
CheckDlgButton(IDC_PATTERN_FOLLOWSONG, (CMainFrame::m_dwPatternSetup & PATTERN_FOLLOWSONGOFF) ? MF_UNCHECKED : MF_CHECKED);
+ m_ToolBar.SetState(ID_ECHOPASTE, ((CMainFrame::m_dwPatternSetup & PATTERN_ECHOPASTE) ? TBSTATE_CHECKED : 0) | TBSTATE_ENABLED);
// -! BEHAVIOUR_CHANGE#0007
}
if (dwHintMask & (HINT_MODTYPE|HINT_INSNAMES|HINT_SMPNAMES|HINT_PATNAMES))
@@ -1175,6 +1178,13 @@
SwitchToView();
}
+void CCtrlPatterns::OnToggleEchoPaste()
+//-------------------------------------
+{
+ CMainFrame::m_dwPatternSetup ^= PATTERN_ECHOPASTE;
+ UpdateView(HINT_MPTOPTIONS, NULL);
+ SwitchToView();
+}
//rewbs.introVST
void CCtrlPatterns::TogglePluginEditor()
Modified: trunk/OpenMPT/mptrack/Ctrl_pat.h
===================================================================
--- trunk/OpenMPT/mptrack/Ctrl_pat.h 2009-07-08 22:23:42 UTC (rev 288)
+++ trunk/OpenMPT/mptrack/Ctrl_pat.h 2009-07-11 16:27:29 UTC (rev 289)
@@ -215,6 +215,8 @@
afx_msg void OnUpdateRecord(CCmdUI *pCmdUI);
afx_msg void TogglePluginEditor(); //rewbs.instroVST
afx_msg void ToggleSplitPluginEditor(); //rewbs.instroVST
+ afx_msg void OnToggleEchoPaste();
+
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
private:
Modified: trunk/OpenMPT/mptrack/Ctrl_seq.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Ctrl_seq.cpp 2009-07-08 22:23:42 UTC (rev 288)
+++ trunk/OpenMPT/mptrack/Ctrl_seq.cpp 2009-07-11 16:27:29 UTC (rev 289)
@@ -813,12 +813,11 @@
if (m_pModDoc)
{
CSoundFile *pSndFile = m_pModDoc->GetSoundFile();
- const int nSeqLengthMinusOne = pSndFile->Order.size()-1;
- for (int i=m_nScrollPos; i<nSeqLengthMinusOne; i++) pSndFile->Order[i] = pSndFile->Order[i+1];
- pSndFile->Order[pSndFile->Order.size()-1] = pSndFile->Order.GetInvalidPatIndex();
+
+ m_pModDoc->RemoveOrder(m_nScrollPos);
InvalidateRect(NULL, FALSE);
- m_pModDoc->SetModified();
m_pModDoc->UpdateAllViews(NULL, HINT_MODSEQUENCE, this);
+
UINT nNewOrd = pSndFile->Order[m_nScrollPos];
if ((nNewOrd < pSndFile->Patterns.Size()) && (pSndFile->Patterns[nNewOrd]) && (m_pParent))
{
Modified: trunk/OpenMPT/mptrack/mptrack.rc
===================================================================
--- trunk/OpenMPT/mptrack/mptrack.rc 2009-07-08 22:23:42 UTC (rev 288)
+++ trunk/OpenMPT/mptrack/mptrack.rc 2009-07-11 16:27:29 UTC (rev 289)
@@ -2579,6 +2579,7 @@
ID_PATTERNDETAIL_MED "Medium pattern detail level\nMedium pattern detail level"
ID_PATTERNDETAIL_HI "High pattern detail level\nHigh pattern detail level"
ID_PATTERN_AMPLIFY "Amplify selection\nAmplify"
+ ID_ECHOPASTE "Toggle echo paste\nToggle echo paste"
END
STRINGTABLE
Modified: trunk/OpenMPT/mptrack/res/patterns.bmp
===================================================================
(Binary files differ)
Modified: trunk/OpenMPT/mptrack/resource.h
===================================================================
--- trunk/OpenMPT/mptrack/resource.h 2009-07-08 22:23:42 UTC (rev 288)
+++ trunk/OpenMPT/mptrack/resource.h 2009-07-11 16:27:29 UTC (rev 289)
@@ -1078,13 +1078,14 @@
#define ID_CLEANUP_COMPO 59221
#define ID_SAMPLE_DRAW 59224
#define ID_SAMPLE_ADDSILENCE 59225
+#define ID_ECHOPASTE 59226
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_3D_CONTROLS 1
#define _APS_NEXT_RESOURCE_VALUE 518
-#define _APS_NEXT_COMMAND_VALUE 59226
+#define _APS_NEXT_COMMAND_VALUE 59227
#define _APS_NEXT_CONTROL_VALUE 2360
#define _APS_NEXT_SYMED_VALUE 901
#endif
Modified: trunk/OpenMPT/soundlib/Load_mod.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_mod.cpp 2009-07-08 22:23:42 UTC (rev 288)
+++ trunk/OpenMPT/soundlib/Load_mod.cpp 2009-07-11 16:27:29 UTC (rev 289)
@@ -41,7 +41,7 @@
case 0x0D: command = CMD_PATTERNBREAK; param = ((param >> 4) * 10) + (param & 0x0F); break;
case 0x0E: command = CMD_MODCMDEX; break;
case 0x0F: command = (param <= (UINT)((m_nType & (MOD_TYPE_XM|MOD_TYPE_MT2)) ? 0x1F : 0x20)) ? CMD_SPEED : CMD_TEMPO;
- if ((param == 0xFF) && (m_nSamples == 15)) command = 0; break; //<rewbs> what the hell is this?! :)
+ if ((param == 0xFF) && (m_nSamples == 15)) command = 0; break; //<rewbs> what the hell is this?! :) //<jojo> it's the "stop tune" command! :-P
// Extension for XM extended effects
case 'G' - 55: command = CMD_GLOBALVOLUME; break; //16
case 'H' - 55: command = CMD_GLOBALVOLSLIDE; if (param & 0xF0) param &= 0xF0; break;
@@ -285,7 +285,7 @@
}
if (i >= nbpbuggy2) nbpbuggy2 = i+1;
}
- for (UINT iend=norders; iend<MAX_ORDERS; iend++) Order[iend] = 0xFF;
+ for (UINT iend=norders; iend<MAX_ORDERS; iend++) Order[iend] = Order.GetInvalidPatIndex();
norders--;
m_nRestartPos = pMagic->nRestartPos;
if (m_nRestartPos >= 0x78) m_nRestartPos = 0;
Modified: trunk/OpenMPT/soundlib/Sndfile.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.cpp 2009-07-08 22:23:42 UTC (rev 288)
+++ trunk/OpenMPT/soundlib/Sndfile.cpp 2009-07-11 16:27:29 UTC (rev 289)
@@ -2585,7 +2585,7 @@
if (!m_lpszPatternNames) m_nPatternNames = 0;
if (nPat >= m_nPatternNames)
{
- if (!lpszName[0]) return TRUE;
+ //if (!lpszName[0]) return TRUE;
UINT len = (nPat+1)*MAX_PATTERNNAME;
CHAR *p = new CHAR[len];
if (!p) return FALSE;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2009-07-08 22:24:01
|
Revision: 288
http://modplug.svn.sourceforge.net/modplug/?rev=288&view=rev
Author: saga-games
Date: 2009-07-08 22:23:42 +0000 (Wed, 08 Jul 2009)
Log Message:
-----------
[Fix] Patterns: Reset pattern name when deleting pattern
[Fix] Sample drawing: Disable sample drawing button when the sample is actually empty
[Fix] DC offset removal: Selection detection was buggy
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Modedit.cpp
trunk/OpenMPT/mptrack/View_smp.cpp
trunk/OpenMPT/soundlib/modsmp_ctrl.cpp
Modified: trunk/OpenMPT/mptrack/Modedit.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Modedit.cpp 2009-07-08 18:38:38 UTC (rev 287)
+++ trunk/OpenMPT/mptrack/Modedit.cpp 2009-07-08 22:23:42 UTC (rev 288)
@@ -1441,6 +1441,7 @@
BEGIN_CRITICAL();
LPVOID p = m_SndFile.Patterns[n];
m_SndFile.Patterns[n] = NULL;
+ m_SndFile.SetPatternName(n, "");
CSoundFile::FreePattern(p);
END_CRITICAL();
SetModified();
Modified: trunk/OpenMPT/mptrack/View_smp.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_smp.cpp 2009-07-08 18:38:38 UTC (rev 287)
+++ trunk/OpenMPT/mptrack/View_smp.cpp 2009-07-08 22:23:42 UTC (rev 288)
@@ -1087,7 +1087,7 @@
{
case ID_SAMPLE_DRAW:
if(m_bDrawingEnabled) dwStyle |= NCBTNS_CHECKED;
- if(pSndFile->Ins[m_nSample].GetNumChannels() > 1) dwStyle |= NCBTNS_DISABLED;
+ if(pSndFile->Ins[m_nSample].GetNumChannels() > 1 || pSndFile->Ins[m_nSample].pSample == nullptr) dwStyle |= NCBTNS_DISABLED;
break;
}
Modified: trunk/OpenMPT/soundlib/modsmp_ctrl.cpp
===================================================================
--- trunk/OpenMPT/soundlib/modsmp_ctrl.cpp 2009-07-08 18:38:38 UTC (rev 287)
+++ trunk/OpenMPT/soundlib/modsmp_ctrl.cpp 2009-07-08 22:23:42 UTC (rev 288)
@@ -280,7 +280,7 @@
RemoveOffsetAndNormalize( reinterpret_cast<int8*>(pins->pSample) + iStart, iEnd - iStart, dOffset, dAmplify);
// step 3: adjust global vol (if available)
- if((modtype & (MOD_TYPE_IT | MOD_TYPE_MPT)) && (iStart == 0) && (iEnd = pins->nLength))
+ if((modtype & (MOD_TYPE_IT | MOD_TYPE_MPT)) && (iStart == 0) && (iEnd == pins->nLength))
pins->nGlobalVol = min((WORD)(pins->nGlobalVol / dAmplify), 64);
AdjustEndOfSample(smp, pSndFile);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rel...@us...> - 2009-07-08 18:38:42
|
Revision: 287
http://modplug.svn.sourceforge.net/modplug/?rev=287&view=rev
Author: relabsoluness
Date: 2009-07-08 18:38:38 +0000 (Wed, 08 Jul 2009)
Log Message:
-----------
Project settings:
-Added VS2008 project files and a few build directives(see Stdafx.h).
-Configuration change: Debug build will now use DLL libraries.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Stdafx.h
trunk/OpenMPT/mptrack/mptrack.vcproj
Added Paths:
-----------
trunk/OpenMPT/mptrack/MPTRACK_08.sln
trunk/OpenMPT/mptrack/mptrack_08.vcproj
trunk/OpenMPT/soundtouch/soundtouch_08.vcproj
trunk/OpenMPT/unlha/unlha_08.vcproj
trunk/OpenMPT/unrar/unrar_08.vcproj
trunk/OpenMPT/unzip/unzip_08.vcproj
trunk/OpenMPT/xsoundlib/xsoundlib_08.vcproj
Added: trunk/OpenMPT/mptrack/MPTRACK_08.sln
===================================================================
--- trunk/OpenMPT/mptrack/MPTRACK_08.sln (rev 0)
+++ trunk/OpenMPT/mptrack/MPTRACK_08.sln 2009-07-08 18:38:38 UTC (rev 287)
@@ -0,0 +1,55 @@
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual C++ Express 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mptrack", "mptrack_08.vcproj", "{21D95071-FB97-4E69-B3B1-050D0D4A5021}"
+ ProjectSection(ProjectDependencies) = postProject
+ {44316F22-904E-48AA-B841-5A3A6AC77319} = {44316F22-904E-48AA-B841-5A3A6AC77319}
+ {FAE39936-1DC7-40BB-AD3F-3B5B9E9AB0E8} = {FAE39936-1DC7-40BB-AD3F-3B5B9E9AB0E8}
+ {CF3C2CA5-5D45-4635-BBA4-C1F435E10896} = {CF3C2CA5-5D45-4635-BBA4-C1F435E10896}
+ {FF541CE2-DAA1-4F84-9883-0A0F111BAA0B} = {FF541CE2-DAA1-4F84-9883-0A0F111BAA0B}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unlha", "..\unlha\unlha_08.vcproj", "{FAE39936-1DC7-40BB-AD3F-3B5B9E9AB0E8}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unrar", "..\unrar\unrar_08.vcproj", "{FF541CE2-DAA1-4F84-9883-0A0F111BAA0B}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unzip", "..\unzip\unzip_08.vcproj", "{44316F22-904E-48AA-B841-5A3A6AC77319}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xsoundlib", "..\xsoundlib\xsoundlib_08.vcproj", "{DCC2BB2F-6778-4FD3-9C00-D6CD8DC917B8}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SoundTouch", "..\soundtouch\soundtouch_08.vcproj", "{CF3C2CA5-5D45-4635-BBA4-C1F435E10896}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {21D95071-FB97-4E69-B3B1-050D0D4A5021}.Debug|Win32.ActiveCfg = Debug|Win32
+ {21D95071-FB97-4E69-B3B1-050D0D4A5021}.Debug|Win32.Build.0 = Debug|Win32
+ {21D95071-FB97-4E69-B3B1-050D0D4A5021}.Release|Win32.ActiveCfg = Release|Win32
+ {21D95071-FB97-4E69-B3B1-050D0D4A5021}.Release|Win32.Build.0 = Release|Win32
+ {FAE39936-1DC7-40BB-AD3F-3B5B9E9AB0E8}.Debug|Win32.ActiveCfg = Debug|Win32
+ {FAE39936-1DC7-40BB-AD3F-3B5B9E9AB0E8}.Debug|Win32.Build.0 = Debug|Win32
+ {FAE39936-1DC7-40BB-AD3F-3B5B9E9AB0E8}.Release|Win32.ActiveCfg = Release|Win32
+ {FAE39936-1DC7-40BB-AD3F-3B5B9E9AB0E8}.Release|Win32.Build.0 = Release|Win32
+ {FF541CE2-DAA1-4F84-9883-0A0F111BAA0B}.Debug|Win32.ActiveCfg = Debug|Win32
+ {FF541CE2-DAA1-4F84-9883-0A0F111BAA0B}.Debug|Win32.Build.0 = Debug|Win32
+ {FF541CE2-DAA1-4F84-9883-0A0F111BAA0B}.Release|Win32.ActiveCfg = Release|Win32
+ {FF541CE2-DAA1-4F84-9883-0A0F111BAA0B}.Release|Win32.Build.0 = Release|Win32
+ {44316F22-904E-48AA-B841-5A3A6AC77319}.Debug|Win32.ActiveCfg = Debug|Win32
+ {44316F22-904E-48AA-B841-5A3A6AC77319}.Debug|Win32.Build.0 = Debug|Win32
+ {44316F22-904E-48AA-B841-5A3A6AC77319}.Release|Win32.ActiveCfg = Release|Win32
+ {44316F22-904E-48AA-B841-5A3A6AC77319}.Release|Win32.Build.0 = Release|Win32
+ {DCC2BB2F-6778-4FD3-9C00-D6CD8DC917B8}.Debug|Win32.ActiveCfg = Debug|Win32
+ {DCC2BB2F-6778-4FD3-9C00-D6CD8DC917B8}.Debug|Win32.Build.0 = Debug|Win32
+ {DCC2BB2F-6778-4FD3-9C00-D6CD8DC917B8}.Release|Win32.ActiveCfg = Release|Win32
+ {DCC2BB2F-6778-4FD3-9C00-D6CD8DC917B8}.Release|Win32.Build.0 = Release|Win32
+ {CF3C2CA5-5D45-4635-BBA4-C1F435E10896}.Debug|Win32.ActiveCfg = Debug|Win32
+ {CF3C2CA5-5D45-4635-BBA4-C1F435E10896}.Debug|Win32.Build.0 = Debug|Win32
+ {CF3C2CA5-5D45-4635-BBA4-C1F435E10896}.Release|Win32.ActiveCfg = Release|Win32
+ {CF3C2CA5-5D45-4635-BBA4-C1F435E10896}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
Modified: trunk/OpenMPT/mptrack/Stdafx.h
===================================================================
--- trunk/OpenMPT/mptrack/Stdafx.h 2009-07-08 14:45:05 UTC (rev 286)
+++ trunk/OpenMPT/mptrack/Stdafx.h 2009-07-08 18:38:38 UTC (rev 287)
@@ -29,6 +29,9 @@
#define MMNODRV
#define MMNOMCI
+//#define _CRT_SECURE_NO_WARNINGS // Define to disable the "This function or variable may be unsafe" warnings.
+#define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 1
+#define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT 1
#include <afxwin.h> // MFC core and standard components
Modified: trunk/OpenMPT/mptrack/mptrack.vcproj
===================================================================
--- trunk/OpenMPT/mptrack/mptrack.vcproj 2009-07-08 14:45:05 UTC (rev 286)
+++ trunk/OpenMPT/mptrack/mptrack.vcproj 2009-07-08 18:38:38 UTC (rev 287)
@@ -17,7 +17,7 @@
OutputDirectory=".\Debug"
IntermediateDirectory=".\Debug"
ConfigurationType="1"
- UseOfMFC="1"
+ UseOfMFC="2"
ATLMinimizesCRunTimeLibraryUsage="FALSE">
<Tool
Name="VCCLCompilerTool"
@@ -28,7 +28,7 @@
PreprocessorDefinitions="_DEBUG,WIN32,_WINDOWS,ENABLE_EQ,MODPLUG_TRACKER,NO_PACKING,HAVE_DOT_NET,ENABLE_AMD,ENABLE_SSE,ENABLE_AMDNOW,ENABLE_MMX"
StringPooling="TRUE"
BasicRuntimeChecks="3"
- RuntimeLibrary="1"
+ RuntimeLibrary="3"
BufferSecurityCheck="TRUE"
EnableFunctionLevelLinking="TRUE"
ForceConformanceInForLoopScope="TRUE"
Added: trunk/OpenMPT/mptrack/mptrack_08.vcproj
===================================================================
--- trunk/OpenMPT/mptrack/mptrack_08.vcproj (rev 0)
+++ trunk/OpenMPT/mptrack/mptrack_08.vcproj 2009-07-08 18:38:38 UTC (rev 287)
@@ -0,0 +1,1237 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="mptrack"
+ ProjectGUID="{21D95071-FB97-4E69-B3B1-050D0D4A5021}"
+ RootNamespace="mptrack"
+ Keyword="MFCProj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="2"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Debug/mptrack.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\unlha,..\unzip,..\unrar,..\soundlib,..\include,..\xsoundlib,..\"
+ PreprocessorDefinitions="_DEBUG,WIN32,_WINDOWS,ENABLE_EQ,MODPLUG_TRACKER,NO_PACKING,HAVE_DOT_NET,ENABLE_AMD,ENABLE_SSE,ENABLE_AMDNOW,ENABLE_MMX"
+ StringPooling="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ BufferSecurityCheck="true"
+ EnableFunctionLevelLinking="true"
+ ForceConformanceInForLoopScope="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ PrecompiledHeaderFile=".\Debug/mptrack.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ BrowseInformation="1"
+ WarningLevel="4"
+ SuppressStartupBanner="false"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ AdditionalDependencies="winmm.lib strmiids.lib dmoguids.lib version.lib opengl32.lib glu32.lib Rpcrt4.lib delayimp.lib"
+ OutputFile=".\Debug/mptrack.exe"
+ Version="5.0"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories=""
+ DelayLoadDLLs="OpenMPT_soundtouch.dll"
+ GenerateDebugInformation="true"
+ AssemblyDebug="1"
+ ProgramDatabaseFile=".\Debug/mptrack.pdb"
+ GenerateMapFile="true"
+ MapFileName=".\Debug/mptrack.map"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ AdditionalManifestFiles="$(ProjectDir)res/rt_manif.bin"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="1"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Bin/mptrack.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/EHsc /O2"
+ Optimization="2"
+ InlineFunctionExpansion="2"
+ AdditionalIncludeDirectories="..\unlha,..\unzip,..\unrar,..\soundlib,..\include,..\xsoundlib,..\"
+ PreprocessorDefinitions="NDEBUG,WIN32,_WINDOWS,ENABLE_MMX,ENABLE_EQ,MODPLUG_TRACKER,NO_PACKING,HAVE_DOT_NET,ENABLE_AMD,ENABLE_SSE,ENABLE_AMDNOW"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="true"
+ EnableFunctionLevelLinking="false"
+ ForceConformanceInForLoopScope="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ PrecompiledHeaderFile=".\Release/mptrack.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="false"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ AdditionalDependencies="winmm.lib strmiids.lib dmoguids.lib version.lib opengl32.lib glu32.lib Rpcrt4.lib delayimp.lib"
+ OutputFile=".\Bin/mptrack.exe"
+ Version="5.0"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories=""
+ DelayLoadDLLs="OpenMPT_soundtouch.dll"
+ GenerateDebugInformation="true"
+ GenerateMapFile="false"
+ MapFileName=".\Release/mptrack.map"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ AdditionalManifestFiles="$(ProjectDir)res/rt_manif.bin"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath=".\AbstractVstEditor.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\ArrayUtils.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\AutoSaver.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\ChannelManagerDlg.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\ChildFrm.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\ColourEdit.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\CommandSet.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\CreditStatic.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\ctrl_com.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\ctrl_gen.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\ctrl_ins.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\ctrl_pat.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\ctrl_seq.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\ctrl_smp.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\DefaultVstEditor.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\dlg_misc.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\dlsbank.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\draw_pat.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\EffectVis.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\Fastmix.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\fxp.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\globals.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\HyperEdit.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\HyperEdit2.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\HyperEdit3.cpp"
+ >
+ </File>
+ <File
+ RelativePath="InputHandler.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\KeyConfigDlg.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\Load_669.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\Soundlib\load_amf.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\Load_ams.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\load_dbm.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\load_dmf.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\Load_dsm.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\Load_far.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\Load_gdm.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\Load_it.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\Load_mdl.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\Load_med.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\load_mid.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\Load_mo3.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\Load_mod.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\Soundlib\load_mt2.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\Load_mtm.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\Load_okt.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\Soundlib\load_psm.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\load_ptm.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\Load_s3m.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\Load_stm.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\Load_ult.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\Soundlib\Load_umx.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\Load_wav.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\Load_xm.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mainbar.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\MainFrm.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\MIDIMappingDialog.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\misc_util.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\mmcmp.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\Mmx_mix.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mod2midi.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mod2wave.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\mod_specifications.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\moddoc.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\modedit.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\modsmp_ctrl.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Moptions.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\MoveFXSlotDialog.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Mpdlgs.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mpt_midi.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mptrack.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mptrack.rc"
+ >
+ </File>
+ <File
+ RelativePath=".\OpenGLControl.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\OpenGLDevice.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\OpenGLEditor.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\OrderToPatternTable.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\pattern.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\patternContainer.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\PatternGotoDialog.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\PerformanceCounter.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\PlaybackEventer.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\PSRatioCalc.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\Sampleio.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\ScaleEnvPointsDlg.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\serialization_utils.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\snd_dsp.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\snd_eq.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\snd_flt.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\Snd_fx.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\Soundlib\Snd_rvb.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AssemblerOutput="4"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\Soundlib\snddev.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\Sndfile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\Sndmix.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\SoundFilePlayConfig.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\StdAfx.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\soundlib\Tables.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\view_com.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\view_gen.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\view_ins.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\view_pat.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\view_smp.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\view_tre.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\VSTEditor.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\vstplug.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\Waveform.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\WindowedFIR.cpp"
+ >
+ </File>
+ <Filter
+ Name="PatternRandomizer"
+ >
+ <File
+ RelativePath=".\PatternRandomizer.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\PatternRandomizer.h"
+ >
+ </File>
+ <File
+ RelativePath=".\PatternRandomizerGUI.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\PatternRandomizerGUI.h"
+ >
+ </File>
+ <File
+ RelativePath=".\PatternRandomizerGUIEffect.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\PatternRandomizerGUIEffect.h"
+ >
+ </File>
+ <File
+ RelativePath=".\PatternRandomizerGUIInstrument.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\PatternRandomizerGUIInstrument.h"
+ >
+ </File>
+ <File
+ RelativePath=".\PatternRandomizerGUINote.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\PatternRandomizerGUINote.h"
+ >
+ </File>
+ <File
+ RelativePath=".\PatternRandomizerGUIVolCmd.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\PatternRandomizerGUIVolCmd.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="MixGraph"
+ >
+ <File
+ RelativePath=".\ChannelNode.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\ChannelNode.h"
+ >
+ </File>
+ <File
+ RelativePath=".\ctrl_graph.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\ctrl_graph.h"
+ >
+ </File>
+ <File
+ RelativePath=".\EffectNode.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\EffectNode.h"
+ >
+ </File>
+ <File
+ RelativePath=".\FinalNode.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\FinalNode.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Graph.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Graph.h"
+ >
+ </File>
+ <File
+ RelativePath=".\InstrumentNode.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\InstrumentNode.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Node.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Node.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Vertex.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Vertex.h"
+ >
+ </File>
+ <File
+ RelativePath=".\view_graph.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\view_graph.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Tuning"
+ >
+ <File
+ RelativePath="..\soundlib\tuning.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\tuningbase.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\tuningCollection.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\TuningDialog.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\tuningRatioMapWnd.cpp"
+ >
+ </File>
+ </Filter>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
+ >
+ <File
+ RelativePath="res\bitmap1.bmp"
+ >
+ </File>
+ <File
+ RelativePath=".\res\colors.bmp"
+ >
+ </File>
+ <File
+ RelativePath=".\res\dragging.cur"
+ >
+ </File>
+ <File
+ RelativePath=".\Res\envbar.bmp"
+ >
+ </File>
+ <File
+ RelativePath=".\res\img_list.bmp"
+ >
+ </File>
+ <File
+ RelativePath=".\res\mainbar.bmp"
+ >
+ </File>
+ <File
+ RelativePath=".\res\moddoc.ico"
+ >
+ </File>
+ <File
+ RelativePath=".\res\MPTRACK.bmp"
+ >
+ </File>
+ <File
+ RelativePath=".\res\mptrack.ico"
+ >
+ </File>
+ <File
+ RelativePath=".\res\mptrack.rc2"
+ >
+ </File>
+ <File
+ RelativePath=".\Res\nodrag.cur"
+ >
+ </File>
+ <File
+ RelativePath=".\res\nodrop.cur"
+ >
+ </File>
+ <File
+ RelativePath=".\res\patterns.bmp"
+ >
+ </File>
+ <File
+ RelativePath=".\res\rt_manif.bin"
+ >
+ </File>
+ <File
+ RelativePath=".\Res\smptoolb.bmp"
+ >
+ </File>
+ <File
+ RelativePath=".\res\splashno.bmp"
+ >
+ </File>
+ <File
+ RelativePath=".\res\view_pat.bmp"
+ >
+ </File>
+ <File
+ RelativePath=".\res\vumeters.bmp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath=".\AbstractVstEditor.h"
+ >
+ </File>
+ <File
+ RelativePath=".\ArrayUtils.h"
+ >
+ </File>
+ <File
+ RelativePath=".\AutoSaver.h"
+ >
+ </File>
+ <File
+ RelativePath=".\ChannelManagerDlg.h"
+ >
+ </File>
+ <File
+ RelativePath=".\ChildFrm.h"
+ >
+ </File>
+ <File
+ RelativePath=".\ColourEdit.h"
+ >
+ </File>
+ <File
+ RelativePath=".\CommandSet.h"
+ >
+ </File>
+ <File
+ RelativePath=".\CreditStatic.h"
+ >
+ </File>
+ <File
+ RelativePath=".\ctrl_com.h"
+ >
+ </File>
+ <File
+ RelativePath=".\ctrl_gen.h"
+ >
+ </File>
+ <File
+ RelativePath=".\ctrl_ins.h"
+ >
+ </File>
+ <File
+ RelativePath=".\ctrl_pat.h"
+ >
+ </File>
+ <File
+ RelativePath=".\ctrl_smp.h"
+ >
+ </File>
+ <File
+ RelativePath=".\DefaultVstEditor.h"
+ >
+ </File>
+ <File
+ RelativePath=".\dlg_misc.h"
+ >
+ </File>
+ <File
+ RelativePath="..\Soundlib\Dlsbank.h"
+ >
+ </File>
+ <File
+ RelativePath=".\EffectVis.h"
+ >
+ </File>
+ <File
+ RelativePath=".\fxp.h"
+ >
+ </File>
+ <File
+ RelativePath=".\globals.h"
+ >
+ </File>
+ <File
+ RelativePath="InputHandler.h"
+ >
+ </File>
+ <File
+ RelativePath=".\KeyboardSettings.h"
+ >
+ </File>
+ <File
+ RelativePath=".\KeyConfigDlg.h"
+ >
+ </File>
+ <File
+ RelativePath=".\mainbar.h"
+ >
+ </File>
+ <File
+ RelativePath=".\MainFrm.h"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\midi.h"
+ >
+ </File>
+ <File
+ RelativePath=".\MIDIMappingDialog.h"
+ >
+ </File>
+ <File
+ RelativePath=".\misc_util.h"
+ >
+ </File>
+ <File
+ RelativePath=".\mod2midi.h"
+ >
+ </File>
+ <File
+ RelativePath=".\mod2wave.h"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\mod_specifications.h"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\modcommand.h"
+ >
+ </File>
+ <File
+ RelativePath=".\moddoc.h"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\modsmp_ctrl.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Moptions.h"
+ >
+ </File>
+ <File
+ RelativePath=".\MoveFXSlotDialog.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Mpdlgs.h"
+ >
+ </File>
+ <File
+ RelativePath=".\mptrack.h"
+ >
+ </File>
+ <File
+ RelativePath=".\OpenGLControl.h"
+ >
+ </File>
+ <File
+ RelativePath=".\OpenGLDevice.h"
+ >
+ </File>
+ <File
+ RelativePath=".\OpenGLEditor.h"
+ >
+ </File>
+ <File
+ RelativePath=".\order.h"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\OrderToPatternTable.h"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\pattern.h"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\patternContainer.h"
+ >
+ </File>
+ <File
+ RelativePath=".\PatternGotoDialog.h"
+ >
+ </File>
+ <File
+ RelativePath=".\PerformanceCounter.h"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\PlaybackEventer.h"
+ >
+ </File>
+ <File
+ RelativePath=".\PSRatioCalc.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Resource.h"
+ >
+ </File>
+ <File
+ RelativePath=".\ScaleEnvPointsDlg.h"
+ >
+ </File>
+ <File
+ RelativePath=".\serialization_utils.h"
+ >
+ </File>
+ <File
+ RelativePath="..\Soundlib\snddev.h"
+ >
+ </File>
+ <File
+ RelativePath="..\Soundlib\snddevx.h"
+ >
+ </File>
+ <File
+ RelativePath="..\Soundlib\Sndfile.h"
+ >
+ </File>
+ <File
+ RelativePath=".\SoundFilePlayConfig.h"
+ >
+ </File>
+ <File
+ RelativePath=".\StdAfx.h"
+ >
+ </File>
+ <File
+ RelativePath=".\typedefs.h"
+ >
+ </File>
+ <File
+ RelativePath=".\version.h"
+ >
+ </File>
+ <File
+ RelativePath=".\view_com.h"
+ >
+ </File>
+ <File
+ RelativePath=".\view_gen.h"
+ >
+ </File>
+ <File
+ RelativePath=".\view_ins.h"
+ >
+ </File>
+ <File
+ RelativePath=".\view_pat.h"
+ >
+ </File>
+ <File
+ RelativePath=".\view_smp.h"
+ >
+ </File>
+ <File
+ RelativePath=".\view_tre.h"
+ >
+ </File>
+ <File
+ RelativePath=".\VSTEditor.h"
+ >
+ </File>
+ <File
+ RelativePath=".\vstplug.h"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\wavConverter.h"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\WindowedFIR.h"
+ >
+ </File>
+ <Filter
+ Name="tuning"
+ >
+ <File
+ RelativePath="..\soundlib\tuning.h"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\tuningbase.h"
+ >
+ </File>
+ <File
+ RelativePath="..\soundlib\tuningcollection.h"
+ >
+ </File>
+ <File
+ RelativePath=".\TuningDialog.h"
+ >
+ </File>
+ <File
+ RelativePath=".\tuningRatioMapWnd.h"
+ >
+ </File>
+ </Filter>
+ </Filter>
+ <Filter
+ Name="test"
+ >
+ <File
+ RelativePath=".\test\test.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\test\test.h"
+ >
+ </File>
+ </Filter>
+ <File
+ RelativePath=".\mptrack.reg"
+ >
+ </File>
+ <File
+ RelativePath=".\VTune\mptrack.vpj"
+ >
+ </File>
+ </Files>
+ <Globals>
+ <Global
+ Name="RESOURCE_FILE"
+ Value="mptrack.rc"
+ />
+ </Globals>
+</VisualStudioProject>
Added: trunk/OpenMPT/soundtouch/soundtouch_08.vcproj
===================================================================
--- trunk/OpenMPT/soundtouch/soundtouch_08.vcproj (rev 0)
+++ trunk/OpenMPT/soundtouch/soundtouch_08.vcproj 2009-07-08 18:38:38 UTC (rev 287)
@@ -0,0 +1,297 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="SoundTouch"
+ ProjectGUID="{CF3C2CA5-5D45-4635-BBA4-C1F435E10896}"
+ RootNamespace="soundtouch"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="0"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SOUNDTOUCH_EXPORTS"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ ForceConformanceInForLoopScope="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="false"
+ OutputFile="$(SolutionDir)$(ConfigurationName)\OpenMPT_SoundTouch.dll"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary="$(OutDir)/soundtouch.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="0"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/O2"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SOUNDTOUCH_EXPORTS"
+ RuntimeLibrary="0"
+ ForceConformanceInForLoopScope="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/PDBPATH:none"
+ OutputFile="..\mptrack\bin\OpenMPT_SoundTouch.dll"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ StripPrivateSymbols=""
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary="$(OutDir)/soundtouch.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\3dnow_win.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\AAFilter.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\BPMDetect.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\cpu_detect_x86_win.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\FIFOSampleBuffer.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\FIRFilter.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mmx_optimized.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\PeakFinder.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\RateTransposer.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\SoundTouch.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\sse_optimized.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\TDStretch.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\AAFilter.h"
+ >
+ </File>
+ <File
+ RelativePath=".\BPMDetect.h"
+ >
+ </File>
+ <File
+ RelativePath=".\cpu_detect.h"
+ >
+ </File>
+ <File
+ RelativePath=".\FIFOSampleBuffer.h"
+ >
+ </File>
+ <File
+ RelativePath=".\FIFOSamplePipe.h"
+ >
+ </File>
+ <File
+ RelativePath=".\FIRFilter.h"
+ >
+ </File>
+ <File
+ RelativePath=".\PeakFinder.h"
+ >
+ </File>
+ <File
+ RelativePath=".\RateTransposer.h"
+ >
+ </File>
+ <File
+ RelativePath=".\SoundTouch.h"
+ >
+ </File>
+ <File
+ RelativePath=".\STTypes.h"
+ >
+ </File>
+ <File
+ RelativePath=".\TDStretch.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Added: trunk/OpenMPT/unlha/unlha_08.vcproj
===================================================================
--- trunk/OpenMPT/unlha/unlha_08.vcproj (rev 0)
+++ trunk/OpenMPT/unlha/unlha_08.vcproj 2009-07-08 18:38:38 UTC (rev 287)
@@ -0,0 +1,217 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="unlha"
+ ProjectGUID="{FAE39936-1DC7-40BB-AD3F-3B5B9E9AB0E8}"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="4"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
+ StringPooling="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ BufferSecurityCheck="true"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile=".\Debug/unlha.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="4"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile=".\Debug\unlha.lib"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="4"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/O1"
+ Optimization="1"
+ InlineFunctionExpansion="1"
+ PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="true"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile=".\Release/unlha.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="false"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile=".\bin\unlha.lib"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath="unlha.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="1"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath="lharc.h"
+ >
+ </File>
+ <File
+ RelativePath="slidehuf.h"
+ >
+ </File>
+ <File
+ RelativePath="unlha32.h"
+ >
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Added: trunk/OpenMPT/unrar/unrar_08.vcproj
===================================================================
--- trunk/OpenMPT/unrar/unrar_08.vcproj (rev 0)
+++ trunk/OpenMPT/unrar/unrar_08.vcproj 2009-07-08 18:38:38 UTC (rev 287)
@@ -0,0 +1,189 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="unrar"
+ ProjectGUID="{FF541CE2-DAA1-4F84-9883-0A0F111BAA0B}"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="4"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
+ StringPooling="true"
+ RuntimeLibrary="1"
+ BufferSecurityCheck="true"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile=".\Debug/UNRAR.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="4"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile=".\Debug\UNRAR.lib"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="4"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/O1"
+ Optimization="1"
+ InlineFunctionExpansion="1"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="true"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile=".\Release/UNRAR.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="false"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile=".\bin\UNRAR.lib"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="Unrar.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="1"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Added: trunk/OpenMPT/unzip/unzip_08.vcproj
===================================================================
--- trunk/OpenMPT/unzip/unzip_08.vcproj (rev 0)
+++ trunk/OpenMPT/unzip/unzip_08.vcproj 2009-07-08 18:38:38 UTC (rev 287)
@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="unzip"
+ ProjectGUID="{44316F22-904E-48AA-B841-5A3A6AC77319}"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="4"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
+ StringPooling="true"
+ RuntimeLibrary="1"
+ BufferSecurityCheck="true"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile=".\Debug/unzip.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="4"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile=".\Debug\unzip.lib"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="4"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/O1"
+ Optimization="1"
+ InlineFunctionExpansion="1"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="true"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile=".\Release/unzip.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="false"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile=".\bin\unzip.lib"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
+ >
+ <File
+ RelativePath="Unzip.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="1"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;fi;fd"
+ >
+ <File
+ RelativePath="unzip32.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Added: trunk/OpenMPT/xsoundlib/xsoundlib_08.vcproj
===================================================================
--- trunk/OpenMPT/xsoundlib/xsoundlib_08.vcproj (rev 0)
+++ trunk/OpenMPT/xsoundlib/xsoundlib_08.vcproj 2009-07-08 18:38:38 UTC (rev 287)
@@ -0,0 +1,264 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="xsoundlib"
+ ProjectGUID="{DCC2BB2F-6778-4FD3-9C00-D6CD8DC917B8}"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="4"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ BufferSecurityCheck="true"
+ UsePrecompiledHeader="2"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)/xsoundlib.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="4"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/O2"
+ PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="true"
+ UsePrecompiledHeader="2"
+ WarningLevel="3"
+ SuppressStartupBanner="false"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)/xsoundlib.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\samplerate.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\smbPitchShift.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="2"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\src_linear.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src_sinc.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src_zoh.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\stdafx.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\common.h"
+ >
+ </File>
+ <File
+ RelativePath=".\config.h"
+ >
+ </File>
+ <File
+ RelativePath=".\fastest_coeffs.h"
+ >
+ </File>
+ <File
+ RelativePath=".\float_cast.h"
+ >
+ </File>
+ <File
+ RelativePath=".\high_qual_coeffs.h"
+ >
+ </File>
+ <File
+ RelativePath=".\mid_qual_coeffs.h"
+ >
+ </File>
+ <File
+ RelativePath=".\samplerate.h"
+ >
+ </File>
+ <File
+ RelativePath=".\smbPitchShift.h"
+ >
+ </File>
+ <File
+ RelativePath=".\stdafx.h"
+ >
+ </File>
+ <File
+ RelativePath=".\unistd.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2009-07-08 14:45:17
|
Revision: 286
http://modplug.svn.sourceforge.net/modplug/?rev=286&view=rev
Author: saga-games
Date: 2009-07-08 14:45:05 +0000 (Wed, 08 Jul 2009)
Log Message:
-----------
[Fix] Short loops in S3M samples are now recognized
[New] Sample editor: Batch export samples (shift + click on "save sample" icon - this was introduced in the last commit already and has been slightly modified in this commit)
[Ref] Minor code updates (mostly comments)
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Ctrl_smp.cpp
trunk/OpenMPT/soundlib/Load_s3m.cpp
trunk/OpenMPT/soundlib/Snd_fx.cpp
trunk/OpenMPT/soundlib/Sndfile.cpp
Modified: trunk/OpenMPT/mptrack/Ctrl_smp.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2009-07-08 08:55:44 UTC (rev 285)
+++ trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2009-07-08 14:45:05 UTC (rev 286)
@@ -1015,7 +1015,9 @@
"Wave File (*.wav)|*.wav|"
"RAW Audio (*.raw)|*.raw||",
this);
- dlg.m_ofn.lpstrInitialDir = CMainFrame::GetWorkingDirectory(DIR_SAMPLES);
+ const LPCTSTR pszWdir = CMainFrame::GetWorkingDirectory(DIR_SAMPLES);
+ if(pszWdir[0])
+ dlg.m_ofn.lpstrInitialDir = pszWdir;
if (dlg.DoModal() != IDOK) return;
BeginWaitCursor();
@@ -1051,7 +1053,6 @@
sSampleFilename.Remove(sForbiddenChars.GetAt(i));
}
- //sFilename.Format("%s%s%s%s", drive, path, filename, ext);
sFilename = dlg.GetPathName();
sFilename.Replace("%sample_number%", sSampleNumber);
sFilename.Replace("%sample_filename%", sSampleFilename);
Modified: trunk/OpenMPT/soundlib/Load_s3m.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_s3m.cpp 2009-07-08 08:55:44 UTC (rev 285)
+++ trunk/OpenMPT/soundlib/Load_s3m.cpp 2009-07-08 14:45:05 UTC (rev 286)
@@ -367,9 +367,12 @@
insfile[iSmp] = ((DWORD)LittleEndianW(*((LPWORD)(s+0x0E)))) << 4;
insfile[iSmp] += ((DWORD)(BYTE)s[0x0D]) << 20;
if (insfile[iSmp] > dwMemLength) insfile[iSmp] &= 0xFFFF;
- if ((Ins[iSmp].nLoopStart >= Ins[iSmp].nLoopEnd) || (Ins[iSmp].nLoopEnd - Ins[iSmp].nLoopStart < 8))
- Ins[iSmp].nLoopStart = Ins[iSmp].nLoopEnd = 0;
+ if ((Ins[iSmp].nLoopStart >= Ins[iSmp].nLoopEnd) || (Ins[iSmp].nLoopEnd - Ins[iSmp].nLoopStart < 1))
+ Ins[iSmp].nLoopStart = Ins[iSmp].nLoopEnd = 0;
+ UINT iLooplength = Ins[iSmp].nLoopEnd - Ins[iSmp].nLoopStart;
+ if(iLooplength > 0 && iLooplength < 8) Ins[iSmp].nLoopEnd = Ins[iSmp].nLoopStart + 8;
Ins[iSmp].nPan = 0x80;
+ // ASSERT(iLooplength == 0 || iLooplength > 10);
}
}
// Reading patterns
@@ -727,4 +730,3 @@
#pragma warning(default:4100)
#endif // MODPLUG_NO_FILESAVE
-
Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Snd_fx.cpp 2009-07-08 08:55:44 UTC (rev 285)
+++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2009-07-08 14:45:05 UTC (rev 286)
@@ -2432,7 +2432,7 @@
pChn->nPan = (param << 4) + 8; pChn->dwFlags |= CHN_FASTVOLRAMP;
}
break;
- // S9x: Set Surround
+ // S9x: Sound Control
case 0x90: ExtendedChannelEffect(pChn, param & 0x0F); break;
// SAx: Set 64k Offset
case 0xA0: if (!m_nTickCount)
@@ -2450,7 +2450,7 @@
case 0xC0: NoteCut(nChn, param); break;
// SDx: Note Delay
// SEx: Pattern Delay for x rows
- // SFx: S3M: Funk Repeat, IT: Set Active Midi Macro
+ // SFx: S3M: Not used, IT: Set Active Midi Macro
case 0xF0: pChn->nActiveMacro = param; break;
}
}
Modified: trunk/OpenMPT/soundlib/Sndfile.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.cpp 2009-07-08 08:55:44 UTC (rev 285)
+++ trunk/OpenMPT/soundlib/Sndfile.cpp 2009-07-08 14:45:05 UTC (rev 286)
@@ -29,7 +29,7 @@
#define UNRAR_SUPPORT
#define UNLHA_SUPPORT
#define ZIPPED_MOD_SUPPORT
-LPCSTR glpszModExtensions = "mod|s3m|xm|it|stm|nst|ult|669|wow|mtm|med|far|mdl|ams|dsm|amf|okt|dmf|ptm|psm|mt2|umx"
+LPCSTR glpszModExtensions = "mod|s3m|xm|it|stm|nst|ult|669|wow|mtm|med|far|mdl|ams|dsm|amf|okt|dmf|ptm|psm|mt2|umx|gdm"
#ifndef NO_UNMO3_SUPPORT
"|mo3"
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2009-07-08 09:13:00
|
Revision: 285
http://modplug.svn.sourceforge.net/modplug/?rev=285&view=rev
Author: saga-games
Date: 2009-07-08 08:55:44 +0000 (Wed, 08 Jul 2009)
Log Message:
-----------
[Mod] Compo cleanup: Resets a few more variables to default values
[Fix] Mod conversion: Proper conversion between IT 8-Bit panning effect and S3M 7-Bit panning effect with surround
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Ctrl_smp.cpp
trunk/OpenMPT/mptrack/Modedit.cpp
Modified: trunk/OpenMPT/mptrack/Ctrl_smp.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2009-07-06 22:12:39 UTC (rev 284)
+++ trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2009-07-08 08:55:44 UTC (rev 285)
@@ -970,44 +970,101 @@
void CCtrlSamples::OnSampleSave()
//-------------------------------
{
- CHAR szFileName[_MAX_PATH] = "", ext[_MAX_EXT];
+ if(!m_pSndFile) return;
- if ((!m_pSndFile) || (!m_nSample) || (!m_pSndFile->Ins[m_nSample].pSample))
+ CHAR szFileName[_MAX_PATH] = "";
+ BOOL bBatchSave = CMainFrame::GetInputHandler()->ShiftPressed();
+
+ if(!bBatchSave)
{
- SwitchToView();
- return;
+ // save this sample
+ if ((!m_nSample) || (!m_pSndFile->Ins[m_nSample].pSample))
+ {
+ SwitchToView();
+ return;
+ }
+ if (m_pSndFile->m_nType & (MOD_TYPE_S3M|MOD_TYPE_IT|MOD_TYPE_MPT))
+ {
+ memcpy(szFileName, m_pSndFile->Ins[m_nSample].name, 22);
+ szFileName[22] = 0;
+ } else
+ {
+ memcpy(szFileName, m_pSndFile->m_szNames[m_nSample], 32);
+ szFileName[32] = 0;
+ }
+ if (!szFileName[0]) strcpy(szFileName, "untitled");
}
- if (m_pSndFile->m_nType & (MOD_TYPE_S3M|MOD_TYPE_IT|MOD_TYPE_MPT))
+ else
{
- memcpy(szFileName, m_pSndFile->Ins[m_nSample].name, 22);
- szFileName[22] = 0;
- } else
- {
- memcpy(szFileName, m_pSndFile->m_szNames[m_nSample], 32);
- szFileName[32] = 0;
+ // save all samples
+ CString sPath = m_pSndFile->m_pModDoc->GetPathName();
+ if(sPath.IsEmpty()) sPath = "untitled";
+
+ sPath += " - %sample_number% - ";
+ if(m_pSndFile->m_nType & (MOD_TYPE_XM|MOD_TYPE_MOD))
+ sPath += "%sample_name%.wav";
+ else
+ sPath += "%sample_filename%.wav";
+ sPath += ".wav";
+ _splitpath(sPath, NULL, NULL, szFileName, NULL);
}
- if (!szFileName[0]) strcpy(szFileName, "untitled");
+
CFileDialog dlg(FALSE, "wav",
szFileName,
OFN_HIDEREADONLY| OFN_ENABLESIZING | OFN_OVERWRITEPROMPT | OFN_PATHMUSTEXIST | OFN_NOREADONLYRETURN,
"Wave File (*.wav)|*.wav|"
"RAW Audio (*.raw)|*.raw||",
this);
-
- const LPCTSTR pszWdir = CMainFrame::GetWorkingDirectory(DIR_SAMPLES);
- if(pszWdir[0])
- dlg.m_ofn.lpstrInitialDir = pszWdir;
-
+ dlg.m_ofn.lpstrInitialDir = CMainFrame::GetWorkingDirectory(DIR_SAMPLES);
if (dlg.DoModal() != IDOK) return;
BeginWaitCursor();
+ TCHAR ext[_MAX_EXT];
_splitpath(dlg.GetPathName(), NULL, NULL, NULL, ext);
+
BOOL bOk = FALSE;
- if (!lstrcmpi(ext, ".raw"))
- bOk = m_pSndFile->SaveRAWSample(m_nSample, dlg.GetPathName());
- else
- bOk = m_pSndFile->SaveWAVSample(m_nSample, dlg.GetPathName());
+ UINT iMinSmp = m_nSample, iMaxSmp = m_nSample;
+ CString sFilename = dlg.GetPathName(), sNumberFormat;
+ if(bBatchSave)
+ {
+ iMinSmp = 1;
+ iMaxSmp = m_pSndFile->m_nSamples;
+ sNumberFormat.Format("%s%d%s", "%.", ((int)log10((float)iMaxSmp)) + 1, "d");
+ }
+
+ const CString sForbiddenChars = "\\/:\"?<>*";
+
+ for(UINT iSmp = iMinSmp; iSmp <= iMaxSmp; iSmp++)
+ {
+ if (m_pSndFile->Ins[iSmp].pSample)
+ {
+ if(bBatchSave)
+ {
+ CString sSampleNumber, sSampleName, sSampleFilename;
+ sSampleNumber.Format(sNumberFormat, iSmp);
+
+ sSampleName = (m_pSndFile->m_szNames[iSmp]) ? m_pSndFile->m_szNames[iSmp] : "untitled";
+ sSampleFilename = (m_pSndFile->Ins[iSmp].name[0]) ? m_pSndFile->Ins[iSmp].name : m_pSndFile->m_szNames[iSmp];
+ for(UINT i = 0; i < sForbiddenChars.GetLength(); i++)
+ {
+ sSampleName.Remove(sForbiddenChars.GetAt(i));
+ sSampleFilename.Remove(sForbiddenChars.GetAt(i));
+ }
+
+ //sFilename.Format("%s%s%s%s", drive, path, filename, ext);
+ sFilename = dlg.GetPathName();
+ sFilename.Replace("%sample_number%", sSampleNumber);
+ sFilename.Replace("%sample_filename%", sSampleFilename);
+ sFilename.Replace("%sample_name%", sSampleName);
+ }
+ if (!lstrcmpi(ext, ".raw"))
+ bOk = m_pSndFile->SaveRAWSample(iSmp, sFilename);
+ else
+ bOk = m_pSndFile->SaveWAVSample(iSmp, sFilename);
+ }
+ }
EndWaitCursor();
+
if (!bOk)
{
ErrorBox(IDS_ERR_SAVESMP, this);
Modified: trunk/OpenMPT/mptrack/Modedit.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Modedit.cpp 2009-07-06 22:12:39 UTC (rev 284)
+++ trunk/OpenMPT/mptrack/Modedit.cpp 2009-07-08 08:55:44 UTC (rev 285)
@@ -57,7 +57,8 @@
const bool oldTypeIsMOD = (oldtype == MOD_TYPE_MOD), oldTypeIsXM = (oldtype == MOD_TYPE_XM),
oldTypeIsS3M = (oldtype == MOD_TYPE_S3M), oldTypeIsIT = (oldtype == MOD_TYPE_IT),
oldTypeIsMPT = (oldtype == MOD_TYPE_MPT), oldTypeIsMOD_XM = (oldTypeIsMOD || oldTypeIsXM),
- oldTypeIsS3M_IT_MPT = (oldTypeIsS3M || oldTypeIsIT || oldTypeIsMPT);
+ oldTypeIsS3M_IT_MPT = (oldTypeIsS3M || oldTypeIsIT || oldTypeIsMPT),
+ oldTypeIsIT_MPT = (oldTypeIsIT || oldTypeIsMPT);
const bool newTypeIsMOD = (nNewType == MOD_TYPE_MOD), newTypeIsXM = (nNewType == MOD_TYPE_XM),
newTypeIsS3M = (nNewType == MOD_TYPE_S3M), newTypeIsIT = (nNewType == MOD_TYPE_IT),
@@ -327,8 +328,62 @@
}
}
if (bBrokenNoteMap) AddToLog("WARNING: Note Mapping will be lost when saving as XM\n");
+ } else
+ // Convert S3M to IT
+ if (oldTypeIsS3M && newTypeIsIT_MPT)
+ {
+ for (UINT nPat=0; nPat < m_SndFile.Patterns.Size(); nPat++) if (m_SndFile.Patterns[nPat])
+ {
+ MODCOMMAND *m = m_SndFile.Patterns[nPat];
+ for (UINT len = m_SndFile.PatternSize[nPat] * m_SndFile.m_nChannels; len--; m++)
+ {
+ switch(m->command)
+ {
+ case CMD_PANNING8:
+ if(m->param == 0xA4)
+ {
+ // surround remap
+ m->command = CMD_S3MCMDEX;
+ m->param = 0x91;
+ }
+ else
+ {
+ m->param = min(m->param << 1, 0xFF);
+ }
+ break;
+ default:
+ break;
+ }
+ }
+ }
+ } else
+ // Convert IT to S3M
+ if (oldTypeIsIT_MPT && newTypeIsS3M)
+ {
+ for (UINT nPat=0; nPat < m_SndFile.Patterns.Size(); nPat++) if (m_SndFile.Patterns[nPat])
+ {
+ MODCOMMAND *m = m_SndFile.Patterns[nPat];
+ for (UINT len = m_SndFile.PatternSize[nPat] * m_SndFile.m_nChannels; len--; m++)
+ {
+ switch(m->command)
+ {
+ case CMD_PANNING8:
+ m->param = (m->param + 1) >> 1;
+ case CMD_S3MCMDEX:
+ if(m->param == 0x91)
+ {
+ // surround remap (this is the "official" command)
+ m->command = CMD_PANNING8;
+ m->param = 0xA4;
+ }
+ default:
+ break;
+ }
+ }
+ }
}
- // Too many samples ?
+
+ // Too many samples?
if (newTypeIsMOD && (m_SndFile.m_nSamples > 31))
{
AddToLog("WARNING: Samples above 31 will be lost when saving this file as MOD!\n");
@@ -1067,6 +1122,9 @@
// convert to IT...
ChangeModType(MOD_TYPE_IT);
+ m_SndFile.m_nMixLevels = mixLevels_original;
+ m_SndFile.m_nTempoMode = tempo_mode_classic;
+ m_SndFile.m_dwSongFlags = SONG_LINEARSLIDES | SONG_EXFILTERRANGE;
// clear order list
m_SndFile.Order.Init();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2009-07-06 22:12:42
|
Revision: 284
http://modplug.svn.sourceforge.net/modplug/?rev=284&view=rev
Author: saga-games
Date: 2009-07-06 22:12:39 +0000 (Mon, 06 Jul 2009)
Log Message:
-----------
[Imp] Note properties: Completed descriptions for extended MOD/XM, fixed display of several effects.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Moddoc.cpp
Modified: trunk/OpenMPT/mptrack/Moddoc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Moddoc.cpp 2009-07-06 21:48:54 UTC (rev 283)
+++ trunk/OpenMPT/mptrack/Moddoc.cpp 2009-07-06 22:12:39 UTC (rev 284)
@@ -2634,49 +2634,95 @@
} else
{
wsprintf(s, "%d", param & 0x0F);
- if ((gFXInfo[ndx].dwEffect == CMD_S3MCMDEX) || (gFXInfo[ndx].dwEffect == CMD_MODCMDEX))
+ if(gFXInfo[ndx].dwEffect == CMD_S3MCMDEX)
{
switch(param & 0xF0)
{
- case 0x10:
+ case 0x10: // glissando control
if((param & 0x0F) == 0)
strcpy(s, "smooth");
else
strcpy(s, "semitones");
break;
- case 0x30:
- case 0x40:
- case 0x50:
- if(gFXInfo[ndx].dwEffect == CMD_S3MCMDEX)
+ case 0x30: // vibrato waveform
+ case 0x40: // tremolo waveform
+ case 0x50: // panbrello waveform
+ switch(param & 0x0F)
{
- 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: 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;
}
break;
- case 0x60: if (gFXInfo[ndx].dwEffect == CMD_MODCMDEX) break;
- case 0xA0:
+ case 0x60: // fine pattern delay (ticks)
+ strcat(s, " rows");
+ break;
+
+ case 0xA0: // high offset
wsprintf(s, "+ %u samples", 0x10000 * (param & 0x0F));
break;
- case 0xB0:
- if (gFXInfo[ndx].dwEffect == CMD_S3MCMDEX)
+ case 0xB0: // pattern loop
+ if((param & 0x0F) == 0x00)
+ strcpy(s, "loop start");
+ else
+ strcat(s, " times");
+ break;
+ case 0xC0: // note cut
+ case 0xD0: // note delay
+ strcat(s, " frames");
+ break;
+ case 0xE0: // pattern delay (rows)
+ strcat(s, " rows");
+ break;
+ case 0xF0: // macro
+ wsprintf(s, "SF%X", param & 0x0F); break;
+ default:
+ break;
+ }
+ }
+ if(gFXInfo[ndx].dwEffect == CMD_MODCMDEX)
+ {
+ switch(param & 0xF0)
+ {
+ case 0x30: // glissando control
+ if((param & 0x0F) == 0)
+ strcpy(s, "smooth");
+ else
+ strcpy(s, "semitones");
+ 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)
{
- if((param & 0x0F) == 0x00)
- strcpy(s, "loop start");
- else
- strcat(s, " times");
+ 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;
}
break;
- case 0xC0:
- case 0xD0: strcat(s, " frames"); break;
- case 0xE0: strcat(s, " rows"); break;
- case 0xF0: wsprintf(s, "SF%X", param & 0x0F); break;
+ case 0x60: // pattern loop
+ if((param & 0x0F) == 0x00)
+ strcpy(s, "loop start");
+ else
+ strcat(s, " times");
+ break;
+ case 0x90: // retrigger
+ wsprintf(s, "speed %d", param & 0x0F);
+ break;
+ case 0xC0: // note cut
+ case 0xD0: // note delay
+ strcat(s, " frames");
+ break;
+ case 0xE0: // pattern delay (rows)
+ strcat(s, " rows");
+ break;
+ case 0xF0: // macro
+ wsprintf(s, "SF%X", param & 0x0F); break;
+ default:
+ break;
}
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2009-07-06 21:49:02
|
Revision: 283
http://modplug.svn.sourceforge.net/modplug/?rev=283&view=rev
Author: saga-games
Date: 2009-07-06 21:48:54 +0000 (Mon, 06 Jul 2009)
Log Message:
-----------
[Mod] Sample editor: DC offset removal won't affect default volume, global volume won't be set when only parts of a sample are being processed
[Imp] Note properties: Added description for S1x - Glissando Control
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Moddoc.cpp
trunk/OpenMPT/soundlib/modsmp_ctrl.cpp
Modified: trunk/OpenMPT/mptrack/Moddoc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Moddoc.cpp 2009-07-06 17:34:31 UTC (rev 282)
+++ trunk/OpenMPT/mptrack/Moddoc.cpp 2009-07-06 21:48:54 UTC (rev 283)
@@ -2638,6 +2638,12 @@
{
switch(param & 0xF0)
{
+ case 0x10:
+ if((param & 0x0F) == 0)
+ strcpy(s, "smooth");
+ else
+ strcpy(s, "semitones");
+ break;
case 0x30:
case 0x40:
case 0x50:
Modified: trunk/OpenMPT/soundlib/modsmp_ctrl.cpp
===================================================================
--- trunk/OpenMPT/soundlib/modsmp_ctrl.cpp 2009-07-06 17:34:31 UTC (rev 282)
+++ trunk/OpenMPT/soundlib/modsmp_ctrl.cpp 2009-07-06 21:48:54 UTC (rev 283)
@@ -279,11 +279,9 @@
else if(pins->GetElementarySampleSize() == 1)
RemoveOffsetAndNormalize( reinterpret_cast<int8*>(pins->pSample) + iStart, iEnd - iStart, dOffset, dAmplify);
- // step 3: adjust either global vol or default vol of this sample
- if(modtype == MOD_TYPE_IT || modtype == MOD_TYPE_MPT)
+ // step 3: adjust global vol (if available)
+ if((modtype & (MOD_TYPE_IT | MOD_TYPE_MPT)) && (iStart == 0) && (iEnd = pins->nLength))
pins->nGlobalVol = min((WORD)(pins->nGlobalVol / dAmplify), 64);
- else if(modtype != MOD_TYPE_NONE)
- pins->nVolume = min((WORD)(pins->nVolume / dAmplify), 256);
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-07-06 17:34:54
|
Revision: 282
http://modplug.svn.sourceforge.net/modplug/?rev=282&view=rev
Author: saga-games
Date: 2009-07-06 17:34:31 +0000 (Mon, 06 Jul 2009)
Log Message:
-----------
Modified Paths:
--------------
trunk/OpenMPT/mptrack/MainFrm.cpp
trunk/OpenMPT/mptrack/Mainfrm.h
trunk/OpenMPT/mptrack/Moptions.cpp
Modified: trunk/OpenMPT/mptrack/MainFrm.cpp
===================================================================
--- trunk/OpenMPT/mptrack/MainFrm.cpp 2009-07-06 15:27:09 UTC (rev 281)
+++ trunk/OpenMPT/mptrack/MainFrm.cpp 2009-07-06 17:34:31 UTC (rev 282)
@@ -2208,15 +2208,22 @@
SetDefaultDirectory(szInstrDir, DIR_INSTRUMENTS);
SetDefaultDirectory(szVstDir, DIR_PLUGINS);
SetDefaultDirectory(szPresetDir, DIR_PLUGINPRESETS);
+ return TRUE;
+}
- // This shouldn't be here (misc options)
- m_wndToolBar.EnableFlatButtons(m_dwPatternSetup & PATTERN_FLATBUTTONS);
- UpdateAllViews(HINT_MPTOPTIONS, NULL);
- if (m_dwPatternSetup & PATTERN_MUTECHNMODE)
+BOOL CMainFrame::SetupMiscOptions()
+//---------------------------------
+{
+ if (CMainFrame::m_dwPatternSetup & PATTERN_MUTECHNMODE)
CSoundFile::gdwSoundSetup |= SNDMIX_MUTECHNMODE;
else
CSoundFile::gdwSoundSetup &= ~SNDMIX_MUTECHNMODE;
- return TRUE;
+
+ m_wndToolBar.EnableFlatButtons(m_dwPatternSetup & PATTERN_FLATBUTTONS);
+
+ UpdateTree(NULL, HINT_MPTOPTIONS);
+ UpdateAllViews(HINT_MPTOPTIONS, NULL);
+ return true;
}
Modified: trunk/OpenMPT/mptrack/Mainfrm.h
===================================================================
--- trunk/OpenMPT/mptrack/Mainfrm.h 2009-07-06 15:27:09 UTC (rev 281)
+++ trunk/OpenMPT/mptrack/Mainfrm.h 2009-07-06 17:34:31 UTC (rev 282)
@@ -571,6 +571,7 @@
void SwitchToActiveView();
BOOL SetupSoundCard(DWORD q, DWORD rate, UINT nbits, UINT chns, UINT bufsize, LONG wd);
BOOL SetupDirectories(LPCTSTR szModDir, LPCTSTR szSampleDir, LPCTSTR szInstrDir, LPCTSTR szVstDir, LPCTSTR szPresetDir);
+ BOOL SetupMiscOptions();
BOOL SetupPlayer(DWORD, DWORD, BOOL bForceUpdate=FALSE);
BOOL SetupMidi(DWORD d, LONG n);
void SetPreAmp(UINT n);
Modified: trunk/OpenMPT/mptrack/Moptions.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Moptions.cpp 2009-07-06 15:27:09 UTC (rev 281)
+++ trunk/OpenMPT/mptrack/Moptions.cpp 2009-07-06 17:34:31 UTC (rev 282)
@@ -782,12 +782,14 @@
if (bCheck) CMainFrame::m_dwPatternSetup |= mask; else CMainFrame::m_dwPatternSetup &= ~mask;
m_CheckList.SetCheck(i, (bCheck) ? TRUE : FALSE);
}
+
CMainFrame *pMainFrm = CMainFrame::GetMainFrame();
if (pMainFrm)
{
pMainFrm->SetupDirectories(szModDir, szSmpDir, szInsDir, szVstDir, szPresetDir);
- pMainFrm->UpdateTree(NULL, HINT_MPTOPTIONS);
+ pMainFrm->SetupMiscOptions();
}
+
CPropertyPage::OnOK();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rel...@us...> - 2009-07-06 15:53:10
|
Revision: 281
http://modplug.svn.sourceforge.net/modplug/?rev=281&view=rev
Author: relabsoluness
Date: 2009-07-06 15:27:09 +0000 (Mon, 06 Jul 2009)
Log Message:
-----------
(patches from Jojo, merged somewhat modified)
[New] General: New default directories: plugins and plugin presets. Includes some related refactoring. (merge edit: some changes and fixes)
[Fix] Internal: Fixed buffer overrun in tree view. (merged modified)
Modified Paths:
--------------
trunk/OpenMPT/mptrack/AbstractVstEditor.cpp
trunk/OpenMPT/mptrack/Ctrl_ins.cpp
trunk/OpenMPT/mptrack/Ctrl_smp.cpp
trunk/OpenMPT/mptrack/MainFrm.cpp
trunk/OpenMPT/mptrack/Mainfrm.h
trunk/OpenMPT/mptrack/Moddoc.cpp
trunk/OpenMPT/mptrack/Moptions.cpp
trunk/OpenMPT/mptrack/Moptions.h
trunk/OpenMPT/mptrack/Mptrack.cpp
trunk/OpenMPT/mptrack/View_tre.cpp
trunk/OpenMPT/mptrack/Vstplug.cpp
trunk/OpenMPT/mptrack/mptrack.rc
trunk/OpenMPT/mptrack/resource.h
Modified: trunk/OpenMPT/mptrack/AbstractVstEditor.cpp
===================================================================
--- trunk/OpenMPT/mptrack/AbstractVstEditor.cpp 2009-07-05 21:01:58 UTC (rev 280)
+++ trunk/OpenMPT/mptrack/AbstractVstEditor.cpp 2009-07-06 15:27:09 UTC (rev 281)
@@ -115,8 +115,12 @@
CFileDialog dlg(TRUE, "fxp", NULL,
OFN_HIDEREADONLY| OFN_OVERWRITEPROMPT | OFN_PATHMUSTEXIST | OFN_ENABLESIZING | OFN_NOREADONLYRETURN,
"VST Program (*.fxp)|*.fxp||", theApp.m_pMainWnd);
+ dlg.m_ofn.lpstrInitialDir = CMainFrame::GetWorkingDirectory(DIR_PLUGINPRESETS);
+
if (!(dlg.DoModal() == IDOK)) return;
+ CMainFrame::SetWorkingDirectory(dlg.GetFileName(), DIR_PLUGINPRESETS, true);
+
//TODO: exception handling to distinguish errors at this level.
if (!(m_pVstPlugin->LoadProgram(dlg.GetFileName())))
::AfxMessageBox("Error loading preset. Are you sure it is for this plugin?");
Modified: trunk/OpenMPT/mptrack/Ctrl_ins.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Ctrl_ins.cpp 2009-07-05 21:01:58 UTC (rev 280)
+++ trunk/OpenMPT/mptrack/Ctrl_ins.cpp 2009-07-06 15:27:09 UTC (rev 281)
@@ -1237,7 +1237,6 @@
BOOL CCtrlInstruments::OpenInstrument(LPCSTR lpszFileName)
//--------------------------------------------------------
{
- CHAR szName[_MAX_FNAME], szExt[_MAX_EXT];
CMappedFile f;
BOOL bFirst, bOk;
DWORD len;
@@ -1287,10 +1286,9 @@
INSTRUMENTHEADER *penv = m_pSndFile->Headers[m_nInstrument];
if (penv)
{
- CHAR szPath[_MAX_PATH], szNewPath[_MAX_PATH];
- _splitpath(lpszFileName, szNewPath, szPath, szName, szExt);
- strcat(szNewPath, szPath);
- strcpy(CMainFrame::m_szCurInsDir, szNewPath);
+ TCHAR szName[_MAX_FNAME], szExt[_MAX_EXT];
+ _tsplitpath(lpszFileName, nullptr, nullptr, szName, szExt);
+ CMainFrame::SetWorkingDirectory(lpszFileName, DIR_INSTRUMENTS, true);
if (!penv->name[0])
{
@@ -1528,10 +1526,11 @@
"Impulse Tracker Instruments (*.iti)|*.iti|"
"All Files (*.*)|*.*||",
this);
- if (CMainFrame::m_szCurInsDir[0])
- {
- dlg.m_ofn.lpstrInitialDir = CMainFrame::m_szCurInsDir;
- }
+
+ const LPCTSTR pszWdir = CMainFrame::GetWorkingDirectory(DIR_INSTRUMENTS);
+ if(pszWdir[0])
+ dlg.m_ofn.lpstrInitialDir = pszWdir;
+
const size_t bufferSize = 2048; //Note: This is possibly the maximum buffer size.
vector<char> filenameBuffer(bufferSize, 0);
dlg.GetOFN().lpstrFile = &filenameBuffer[0];
@@ -1601,10 +1600,11 @@
this);
// -! BUG_FIX#0019
- if (CMainFrame::m_szCurInsDir[0])
- {
- dlg.m_ofn.lpstrInitialDir = CMainFrame::m_szCurInsDir;
- }
+
+ const LPCTSTR pszWdir = CMainFrame::GetWorkingDirectory(DIR_INSTRUMENTS);
+ if(pszWdir[0])
+ dlg.m_ofn.lpstrInitialDir = pszWdir;
+
if (dlg.DoModal() != IDOK) return;
BeginWaitCursor();
_splitpath(dlg.GetPathName(), drive, path, NULL, ext);
@@ -1625,8 +1625,11 @@
EndWaitCursor();
if (!bOk) ErrorBox(IDS_ERR_SAVEINS, this); else
{
- strcpy(CMainFrame::m_szCurInsDir, drive);
- strcat(CMainFrame::m_szCurInsDir, path);
+ strcpy(szFileName, drive);
+ strcat(szFileName, path);
+
+ CMainFrame::SetWorkingDirectory(szFileName, DIR_INSTRUMENTS);
+
// -> CODE#0023
// -> DESC="IT project files (.itp)"
// m_pModDoc->UpdateAllViews(NULL, (m_nInstrument << 24) | HINT_INSTRUMENT);
Modified: trunk/OpenMPT/mptrack/Ctrl_smp.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2009-07-05 21:01:58 UTC (rev 280)
+++ trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2009-07-06 15:27:09 UTC (rev 281)
@@ -774,30 +774,30 @@
EndWaitCursor();
if (bOk)
{
- CHAR szPath[_MAX_PATH], szNewPath[_MAX_PATH];
MODINSTRUMENT *pins = &m_pSndFile->Ins[m_nSample];
- _splitpath(lpszFileName, szNewPath, szPath, szName, szExt);
- strcat(szNewPath, szPath);
- strcpy(CMainFrame::m_szCurSmpDir, szNewPath);
+ CMainFrame::SetWorkingDirectory(lpszFileName, DIR_SAMPLES, true);
if (!pins->name[0])
{
- memset(szPath, 0, 32);
- strcpy(szPath, szName);
+ CHAR szFullFilename[_MAX_PATH];
+ _splitpath(lpszFileName, 0, 0, szName, szExt);
+
+ memset(szFullFilename, 0, 32);
+ strcpy(szFullFilename, szName);
if (m_pSndFile->m_nType & (MOD_TYPE_MOD|MOD_TYPE_XM))
{
// MOD/XM
- strcat(szPath, szExt);
- szPath[31] = 0;
- memcpy(m_pSndFile->m_szNames[m_nSample], szPath, 32);
+ strcat(szFullFilename, szExt);
+ szFullFilename[31] = 0;
+ memcpy(m_pSndFile->m_szNames[m_nSample], szFullFilename, 32);
} else
{
// S3M/IT
- szPath[31] = 0;
- if (!m_pSndFile->m_szNames[m_nSample][0]) memcpy(m_pSndFile->m_szNames[m_nSample], szPath, 32);
- if (strlen(szPath) < 9) strcat(szPath, szExt);
+ szFullFilename[31] = 0;
+ if (!m_pSndFile->m_szNames[m_nSample][0]) memcpy(m_pSndFile->m_szNames[m_nSample], szFullFilename, 32);
+ if (strlen(szFullFilename) < 9) strcat(szFullFilename, szExt);
}
- szPath[21] = 0;
- memcpy(pins->name, szPath, 22);
+ szFullFilename[21] = 0;
+ memcpy(pins->name, szFullFilename, 22);
}
if ((m_pSndFile->m_nType & MOD_TYPE_XM) && (!(pins->uFlags & CHN_PANNING)))
{
@@ -925,10 +925,11 @@
"Raw Samples (*.raw,*.snd,*.pcm)|*.raw;*.snd;*.pcm|"
"All Files (*.*)|*.*||",
this);
- if (CMainFrame::m_szCurSmpDir[0])
- {
- dlg.m_ofn.lpstrInitialDir = CMainFrame::m_szCurSmpDir;
- }
+
+ const LPCTSTR pszWdir = CMainFrame::GetWorkingDirectory(DIR_SAMPLES);
+ if(pszWdir[0])
+ dlg.m_ofn.lpstrInitialDir = pszWdir;
+
dlg.m_ofn.nFilterIndex = nLastIndex;
const size_t bufferSize = 2048; //Note: This is possibly the maximum buffer size in MFC 7(this note was written November 2006).
vector<char> filenameBuffer(bufferSize, 0);
@@ -992,10 +993,11 @@
"Wave File (*.wav)|*.wav|"
"RAW Audio (*.raw)|*.raw||",
this);
- if (CMainFrame::m_szCurSmpDir[0])
- {
- dlg.m_ofn.lpstrInitialDir = CMainFrame::m_szCurSmpDir;
- }
+
+ const LPCTSTR pszWdir = CMainFrame::GetWorkingDirectory(DIR_SAMPLES);
+ if(pszWdir[0])
+ dlg.m_ofn.lpstrInitialDir = pszWdir;
+
if (dlg.DoModal() != IDOK) return;
BeginWaitCursor();
@@ -1011,10 +1013,7 @@
ErrorBox(IDS_ERR_SAVESMP, this);
} else
{
- CHAR drive[_MAX_DRIVE], path[_MAX_PATH];
- _splitpath(dlg.GetPathName(), drive, path, NULL, NULL);
- strcpy(CMainFrame::m_szCurSmpDir, drive);
- strcat(CMainFrame::m_szCurSmpDir, path);
+ CMainFrame::SetWorkingDirectory(dlg.GetPathName(), DIR_SAMPLES, true);
}
SwitchToView();
}
Modified: trunk/OpenMPT/mptrack/MainFrm.cpp
===================================================================
--- trunk/OpenMPT/mptrack/MainFrm.cpp 2009-07-05 21:01:58 UTC (rev 280)
+++ trunk/OpenMPT/mptrack/MainFrm.cpp 2009-07-06 15:27:09 UTC (rev 281)
@@ -257,16 +257,12 @@
0x00FF00, 0x00FFFF, 0x0000FF,
};
-// Arrays
-CHAR CMainFrame::m_szModDir[_MAX_PATH] = "";
-CHAR CMainFrame::m_szSmpDir[_MAX_PATH] = "";
-CHAR CMainFrame::m_szInsDir[_MAX_PATH] = "";
-CHAR CMainFrame::m_szKbdFile[_MAX_PATH] = ""; //rewbs.customKeys
-CHAR CMainFrame::m_szCurModDir[_MAX_PATH] = "";
-CHAR CMainFrame::m_szCurSmpDir[_MAX_PATH] = "";
-CHAR CMainFrame::m_szCurInsDir[_MAX_PATH] = "";
-//CHAR CMainFrame::m_szCurKbdFile[_MAX_PATH] = ""; //rewbs.customKeys
+// Directory Arrays (Default + Last)
+TCHAR CMainFrame::m_szDefaultDirectory[NUM_DIRS][_MAX_PATH] = {0};
+TCHAR CMainFrame::m_szWorkingDirectory[NUM_DIRS][_MAX_PATH] = {0};
+TCHAR CMainFrame::m_szKbdFile[_MAX_PATH] = ""; //rewbs.customKeys
+
CInputHandler *CMainFrame::m_InputHandler = NULL; //rewbs.customKeys
CAutoSaver *CMainFrame::m_pAutoSaver = NULL; //rewbs.autosave
CPerformanceCounter *CMainFrame::m_pPerfCounter = NULL;
@@ -318,8 +314,13 @@
m_szUserText[0] = 0;
m_szInfoText[0] = 0;
m_szXInfoText[0]= 0; //rewbs.xinfo
- m_szPluginsDir[0] = 0;
- m_szExportDir[0] = 0;
+
+ for(UINT i = 0; i < NUM_DIRS; i++)
+ {
+ m_szDefaultDirectory[i][0] = 0;
+ m_szWorkingDirectory[i][0] = 0;
+ }
+
m_dTotalCPU=0;
memset(gpenVuMeter, 0, sizeof(gpenVuMeter));
@@ -442,10 +443,19 @@
CSoundFile::s_DefaultPlugVolumeHandling = static_cast<uint8>(GetPrivateProfileInt("Misc", "DefaultPlugVolumeHandling", PLUGIN_VOLUMEHANDLING_IGNORE, iniFile));
if(CSoundFile::s_DefaultPlugVolumeHandling > 2) CSoundFile::s_DefaultPlugVolumeHandling = PLUGIN_VOLUMEHANDLING_IGNORE;
- GetPrivateProfileString("Paths", "Songs_Directory", m_szModDir, m_szModDir, INIBUFFERSIZE, iniFile);
- GetPrivateProfileString("Paths", "Samples_Directory", m_szSmpDir, m_szSmpDir, INIBUFFERSIZE, iniFile);
- GetPrivateProfileString("Paths", "Instruments_Directory", m_szInsDir, m_szInsDir, INIBUFFERSIZE, iniFile);
- GetPrivateProfileString("Paths", "Plugins_Directory", m_szPluginsDir, m_szPluginsDir, INIBUFFERSIZE, iniFile);
+ TCHAR szPath[_MAX_PATH] = "";
+ GetPrivateProfileString("Paths", "Songs_Directory", GetDefaultDirectory(DIR_MODS), szPath, INIBUFFERSIZE, iniFile);
+ SetDefaultDirectory(szPath, DIR_MODS);
+ GetPrivateProfileString("Paths", "Samples_Directory", GetDefaultDirectory(DIR_SAMPLES), szPath, INIBUFFERSIZE, iniFile);
+ SetDefaultDirectory(szPath, DIR_SAMPLES);
+ GetPrivateProfileString("Paths", "Instruments_Directory", GetDefaultDirectory(DIR_INSTRUMENTS), szPath, INIBUFFERSIZE, iniFile);
+ SetDefaultDirectory(szPath, DIR_INSTRUMENTS);
+ GetPrivateProfileString("Paths", "Plugins_Directory", GetDefaultDirectory(DIR_PLUGINS), szPath, INIBUFFERSIZE, iniFile);
+ SetDefaultDirectory(szPath, DIR_PLUGINS);
+ GetPrivateProfileString("Paths", "Plugin_Presets_Directory", GetDefaultDirectory(DIR_PLUGINPRESETS), szPath, INIBUFFERSIZE, iniFile);
+ SetDefaultDirectory(szPath, DIR_PLUGINPRESETS);
+ GetPrivateProfileString("Paths", "Export_Directory", GetDefaultDirectory(DIR_EXPORT), szPath, INIBUFFERSIZE, iniFile);
+ SetDefaultDirectory(szPath, DIR_EXPORT);
GetPrivateProfileString("Paths", "Key_Config_File", m_szKbdFile, m_szKbdFile, INIBUFFERSIZE, iniFile);
CSoundFile::m_nXBassDepth = GetPrivateProfileLong("Effects", "XBassDepth", 0, iniFile);
@@ -479,7 +489,6 @@
DWORD dwREG_DWORD = REG_DWORD;
DWORD dwREG_SZ = REG_SZ;
DWORD dwDWORDSize = sizeof(UINT);
- DWORD dwSZSIZE = sizeof(m_szModDir);
DWORD dwCRSIZE = sizeof(COLORREF);
@@ -524,15 +533,23 @@
RegQueryValueEx(key, "BufferLength", NULL, &dwREG_DWORD, (LPBYTE)&m_nBufferLength, &dwDWORDSize);
if ((m_nBufferLength < 10) || (m_nBufferLength > 200)) m_nBufferLength = 100;
RegQueryValueEx(key, "PreAmp", NULL, &dwREG_DWORD, (LPBYTE)&m_nPreAmp, &dwDWORDSize);
- RegQueryValueEx(key, "Songs_Directory", NULL, &dwREG_SZ, (LPBYTE)m_szModDir, &dwSZSIZE);
- dwSZSIZE = sizeof(m_szSmpDir);
- RegQueryValueEx(key, "Samples_Directory", NULL, &dwREG_SZ, (LPBYTE)m_szSmpDir, &dwSZSIZE);
- dwSZSIZE = sizeof(m_szInsDir);
- RegQueryValueEx(key, "Instruments_Directory", NULL, &dwREG_SZ, (LPBYTE)m_szInsDir, &dwSZSIZE);
- dwSZSIZE = sizeof(m_szPluginsDir);
- RegQueryValueEx(key, "Plugins_Directory", NULL, &dwREG_SZ, (LPBYTE)m_szPluginsDir, &dwSZSIZE);
+
+ CHAR sPath[_MAX_PATH] = "";
+ DWORD dwSZSIZE = sizeof(sPath);
+ RegQueryValueEx(key, "Songs_Directory", NULL, &dwREG_SZ, (LPBYTE)sPath, &dwSZSIZE);
+ SetDefaultDirectory(sPath, DIR_MODS);
+ dwSZSIZE = sizeof(sPath);
+ RegQueryValueEx(key, "Samples_Directory", NULL, &dwREG_SZ, (LPBYTE)sPath, &dwSZSIZE);
+ SetDefaultDirectory(sPath, DIR_SAMPLES);
+ dwSZSIZE = sizeof(sPath);
+ RegQueryValueEx(key, "Instruments_Directory", NULL, &dwREG_SZ, (LPBYTE)sPath, &dwSZSIZE);
+ SetDefaultDirectory(sPath, DIR_INSTRUMENTS);
+ dwSZSIZE = sizeof(sPath);
+ RegQueryValueEx(key, "Plugins_Directory", NULL, &dwREG_SZ, (LPBYTE)sPath, &dwSZSIZE);
+ SetDefaultDirectory(sPath, DIR_PLUGINS);
dwSZSIZE = sizeof(m_szKbdFile);
RegQueryValueEx(key, "Key_Config_File", NULL, &dwREG_SZ, (LPBYTE)m_szKbdFile, &dwSZSIZE);
+
RegQueryValueEx(key, "XBassDepth", NULL, &dwREG_DWORD, (LPBYTE)&CSoundFile::m_nXBassDepth, &dwDWORDSize);
RegQueryValueEx(key, "XBassRange", NULL, &dwREG_DWORD, (LPBYTE)&CSoundFile::m_nXBassRange, &dwDWORDSize);
RegQueryValueEx(key, "ReverbDepth", NULL, &dwREG_DWORD, (LPBYTE)&CSoundFile::m_nReverbDepth, &dwDWORDSize);
@@ -658,11 +675,12 @@
}
}
// Default directory location
- strcpy(m_szCurModDir, m_szModDir);
- strcpy(m_szCurSmpDir, m_szSmpDir);
- strcpy(m_szCurInsDir, m_szInsDir);
-// strcpy(m_szCurKbdFile, m_szKbdFile); //rewbs.customKeys
- if (m_szModDir[0]) SetCurrentDirectory(m_szModDir);
+ for(UINT i = 0; i < NUM_DIRS; i++)
+ {
+ _tcscpy(m_szWorkingDirectory[i], m_szDefaultDirectory[i]);
+ }
+ if (m_szDefaultDirectory[DIR_MODS][0]) SetCurrentDirectory(m_szDefaultDirectory[DIR_MODS]);
+
// Create Audio Thread
m_hAudioWakeUp = CreateEvent(NULL, FALSE, FALSE, NULL);
m_hNotifyWakeUp = CreateEvent(NULL, FALSE, FALSE, NULL);
@@ -948,10 +966,12 @@
WritePrivateProfileDWord("Pattern Editor", "Record", gbPatternRecord, iniFile);
WritePrivateProfileDWord("Pattern Editor", "AutoChordWaitTime", gnAutoChordWaitTime, iniFile);
- WritePrivateProfileString("Paths", "Songs_Directory", m_szModDir, iniFile);
- WritePrivateProfileString("Paths", "Samples_Directory", m_szSmpDir, iniFile);
- WritePrivateProfileString("Paths", "Instruments_Directory", m_szInsDir, iniFile);
- WritePrivateProfileString("Paths", "Plugins_Directory", m_szPluginsDir, iniFile);
+ WritePrivateProfileString("Paths", "Songs_Directory", GetDefaultDirectory(DIR_MODS), iniFile);
+ WritePrivateProfileString("Paths", "Samples_Directory", GetDefaultDirectory(DIR_SAMPLES), iniFile);
+ WritePrivateProfileString("Paths", "Instruments_Directory", GetDefaultDirectory(DIR_INSTRUMENTS), iniFile);
+ WritePrivateProfileString("Paths", "Plugins_Directory", GetDefaultDirectory(DIR_PLUGINS), iniFile);
+ WritePrivateProfileString("Paths", "Plugin_Presets_Directory", GetDefaultDirectory(DIR_PLUGINPRESETS), iniFile);
+ WritePrivateProfileString("Paths", "Export_Directory", GetDefaultDirectory(DIR_EXPORT), iniFile);
WritePrivateProfileString("Paths", "Key_Config_File", m_szKbdFile, iniFile);
WritePrivateProfileLong("Effects", "XBassDepth", CSoundFile::m_nXBassDepth, iniFile);
@@ -2179,15 +2199,16 @@
}
-BOOL CMainFrame::SetupDirectories(LPCSTR songs, LPCSTR samples, LPCSTR instr)
+BOOL CMainFrame::SetupDirectories(LPCTSTR szModDir, LPCTSTR szSampleDir, LPCTSTR szInstrDir, LPCTSTR szVstDir, LPCTSTR szPresetDir)
//---------------------------------------------------------------------------
{
- strcpy(m_szModDir, songs);
- strcpy(m_szSmpDir, samples);
- strcpy(m_szInsDir, instr);
- if (songs[0]) strcpy(m_szCurModDir, songs);
- if (samples[0]) strcpy(m_szCurSmpDir, samples);
- if (instr[0]) strcpy(m_szCurInsDir, instr);
+ // will also set working directory
+ SetDefaultDirectory(szModDir, DIR_MODS);
+ SetDefaultDirectory(szSampleDir, DIR_SAMPLES);
+ SetDefaultDirectory(szInstrDir, DIR_INSTRUMENTS);
+ SetDefaultDirectory(szVstDir, DIR_PLUGINS);
+ SetDefaultDirectory(szPresetDir, DIR_PLUGINPRESETS);
+
// This shouldn't be here (misc options)
m_wndToolBar.EnableFlatButtons(m_dwPatternSetup & PATTERN_FLATBUTTONS);
UpdateAllViews(HINT_MPTOPTIONS, NULL);
@@ -3003,3 +3024,56 @@
CBox.SetItemData(CBox.AddString(s), i);
}
}
+
+
+// retrieve / set default directory from given string and store it our setup variables
+// TODO: Let some magic happen to convert between absolute and relative paths. m_csExecutableDirectoryPath might be helpful
+
+void CMainFrame::SetDirectory(const LPCTSTR szFilenameFrom, Directory dir, TCHAR (&directories)[NUM_DIRS][_MAX_PATH], bool bStripFilename)
+//----------------------------------------------------------------------------
+{
+ TCHAR szPath[_MAX_PATH], szDir[_MAX_DIR];
+
+ if(bStripFilename)
+ {
+ _tsplitpath(szFilenameFrom, szPath, szDir, 0, 0);
+ _tcscat(szPath, szDir);
+ }
+ else
+ {
+ _tcscpy(szPath, szFilenameFrom);
+ }
+
+ _tcscpy(directories[dir], szPath);
+
+ // When updating default directory, also update the working directory.
+ if(szPath[0] && directories == m_szDefaultDirectory)
+ SetWorkingDirectory(szPath, dir);
+}
+
+void CMainFrame::SetDefaultDirectory(const LPCTSTR szFilenameFrom, Directory dir, bool bStripFilename)
+//----------------------------------------------------------------------------
+{
+ SetDirectory(szFilenameFrom, dir, m_szDefaultDirectory, bStripFilename);
+}
+
+
+void CMainFrame::SetWorkingDirectory(const LPCTSTR szFilenameFrom, Directory dir, bool bStripFilename)
+//----------------------------------------------------------------------------
+{
+ SetDirectory(szFilenameFrom, dir, m_szWorkingDirectory, bStripFilename);
+}
+
+
+LPCTSTR CMainFrame::GetDefaultDirectory(Directory dir)
+//----------------------------------------------------------------------------
+{
+ return m_szDefaultDirectory[dir];
+}
+
+
+LPCTSTR CMainFrame::GetWorkingDirectory(Directory dir)
+//----------------------------------------------------------------------------
+{
+ return m_szWorkingDirectory[dir];
+}
Modified: trunk/OpenMPT/mptrack/Mainfrm.h
===================================================================
--- trunk/OpenMPT/mptrack/Mainfrm.h 2009-07-05 21:01:58 UTC (rev 280)
+++ trunk/OpenMPT/mptrack/Mainfrm.h 2009-07-06 15:27:09 UTC (rev 281)
@@ -340,6 +340,22 @@
/////////////////////////////////////////////////////////////////////////
+// Default directories
+
+enum Directory
+{
+ DIR_MODS = 0,
+ DIR_SAMPLES,
+ DIR_INSTRUMENTS,
+ DIR_PLUGINS,
+ DIR_PLUGINPRESETS,
+ DIR_EXPORT,
+ NUM_DIRS
+};
+
+
+
+/////////////////////////////////////////////////////////////////////////
// Misc. Macros
@@ -400,9 +416,8 @@
static COLORREF rgbCustomColors[MAX_MODCOLORS];
static LPMODPLUGDIB bmpPatterns, bmpNotes, bmpVUMeters, bmpVisNode;
static HPEN gpenVuMeter[NUM_VUMETER_PENS*2];
- // Arrays
- static CHAR m_szModDir[_MAX_PATH], m_szSmpDir[_MAX_PATH], m_szInsDir[_MAX_PATH], m_szKbdFile[_MAX_PATH];
- static CHAR m_szCurModDir[_MAX_PATH], m_szCurSmpDir[_MAX_PATH], m_szCurInsDir[_MAX_PATH], m_szCurKbdDir[_MAX_PATH];
+ // key config
+ static TCHAR m_szKbdFile[_MAX_PATH];
// Low-Level Audio
public:
@@ -452,8 +467,6 @@
// Notification Buffer
MPTNOTIFICATION NotifyBuffer[MAX_UPDATE_HISTORY];
// Misc
- CHAR m_szPluginsDir[_MAX_PATH];
- CHAR m_szExportDir[_MAX_PATH];
bool m_bOptionsLocked; //rewbs.customKeys
double m_dTotalCPU;
CModDoc* m_pJustModifiedDoc;
@@ -480,10 +493,6 @@
BOOL dsoundFillBuffers(LPBYTE lpBuf, DWORD dwSize);
BOOL DSoundDone(LPBYTE lpBuffer, DWORD dwBytes);
BOOL DoNotification(DWORD dwSamplesRead, DWORD dwLatency);
- LPCSTR GetPluginsDir() const { return m_szPluginsDir; }
- VOID SetPluginsDir(LPCSTR pszDir) { lstrcpyn(m_szPluginsDir, pszDir, sizeof(m_szPluginsDir)); }
- LPCSTR GetExportDir() const { return m_szExportDir; }
- VOID SetExportDir(LPCSTR pszDir) { lstrcpyn(m_szExportDir, pszDir, sizeof(m_szExportDir)); }
// Midi Input Functions
public:
@@ -517,7 +526,7 @@
static CString GetPrivateProfileCString(const CString section, const CString key, const CString defaultValue, const CString iniFile);
-// Misc functions
+ // Misc functions
public:
VOID SetUserText(LPCSTR lpszText);
VOID SetInfoText(LPCSTR lpszText);
@@ -561,7 +570,7 @@
BOOL StopRenderer(CSoundFile*); //rewbs.VSTTimeInfo
void SwitchToActiveView();
BOOL SetupSoundCard(DWORD q, DWORD rate, UINT nbits, UINT chns, UINT bufsize, LONG wd);
- BOOL SetupDirectories(LPCSTR s, LPCSTR s2, LPCSTR s3);
+ BOOL SetupDirectories(LPCTSTR szModDir, LPCTSTR szSampleDir, LPCTSTR szInstrDir, LPCTSTR szVstDir, LPCTSTR szPresetDir);
BOOL SetupPlayer(DWORD, DWORD, BOOL bForceUpdate=FALSE);
BOOL SetupMidi(DWORD d, LONG n);
void SetPreAmp(UINT n);
@@ -570,6 +579,19 @@
BOOL ResetNotificationBuffer(HWND hwnd=NULL);
+public:
+ // access to default + working directories
+ static void SetWorkingDirectory(const LPCTSTR szFilenameFrom, Directory dir, bool bStripFilename = false);
+ static LPCTSTR GetWorkingDirectory(Directory dir);
+ static void SetDefaultDirectory(const LPCTSTR szFilenameFrom, Directory dir, bool bStripFilename = false);
+ static LPCTSTR GetDefaultDirectory(Directory dir);
+protected:
+ static void SetDirectory(const LPCTSTR szFilenameFrom, Directory dir, TCHAR (&pDirs)[NUM_DIRS][_MAX_PATH], bool bStripFilename);
+ // Directory Arrays (default dir + last dir)
+ static TCHAR m_szDefaultDirectory[NUM_DIRS][_MAX_PATH];
+ static TCHAR m_szWorkingDirectory[NUM_DIRS][_MAX_PATH];
+
+
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMainFrame)
Modified: trunk/OpenMPT/mptrack/Moddoc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Moddoc.cpp 2009-07-05 21:01:58 UTC (rev 280)
+++ trunk/OpenMPT/mptrack/Moddoc.cpp 2009-07-06 15:27:09 UTC (rev 281)
@@ -550,15 +550,15 @@
OFN_HIDEREADONLY| OFN_ENABLESIZING | OFN_OVERWRITEPROMPT | OFN_PATHMUSTEXIST | OFN_NOREADONLYRETURN,
lpszFilter,
theApp.m_pMainWnd);
- if (CMainFrame::m_szCurModDir[0])
- {
- dlg.m_ofn.lpstrInitialDir = CMainFrame::m_szCurModDir;
- }
+
+ const LPCTSTR pszWdir = CMainFrame::GetWorkingDirectory(DIR_MODS);
+ if(pszWdir[0])
+ dlg.m_ofn.lpstrInitialDir = pszWdir;
+
if (dlg.DoModal() != IDOK) return FALSE;
strcpy(s, dlg.GetPathName());
+ CMainFrame::SetWorkingDirectory(s, DIR_MODS, true);
_splitpath(s, drive, path, fname, fext);
- strcpy(CMainFrame::m_szCurModDir, drive);
- strcat(CMainFrame::m_szCurModDir, path);
} else
{
_splitpath(lpszPathName, drive, path, fname, NULL);
@@ -1374,15 +1374,15 @@
CFileDialog dlg(FALSE, "wav", s,
OFN_HIDEREADONLY | OFN_ENABLESIZING | OFN_OVERWRITEPROMPT | OFN_PATHMUSTEXIST | OFN_NOREADONLYRETURN,
"Wave Files (*.wav)|*.wav||", pMainFrm);
- dlg.m_ofn.lpstrInitialDir = pMainFrm->GetExportDir();
+ dlg.m_ofn.lpstrInitialDir = CMainFrame::GetWorkingDirectory(DIR_EXPORT);
CWaveConvert wsdlg(pMainFrm);
if (wsdlg.DoModal() != IDOK) return;
if (dlg.DoModal() != IDOK) return; //rewbs: made filename dialog appear after wav settings dialog
- s[0] = 0;
- _splitpath(dlg.GetPathName(), s, path, NULL, NULL);
- strcat(s, path);
- pMainFrm->SetExportDir(s);
+
+ // will set default dir here because there's no setup option for export dir yet (feel free to add one...)
+ pMainFrm->SetDefaultDirectory(dlg.GetPathName(), DIR_EXPORT, true);
+
strcpy(s, dlg.GetPathName());
// Saving as wave file
@@ -1505,16 +1505,17 @@
OFN_HIDEREADONLY | OFN_ENABLESIZING | OFN_OVERWRITEPROMPT | OFN_PATHMUSTEXIST | OFN_NOREADONLYRETURN,
"MPEG Layer III Files (*.mp3)|*.mp3|Layer3 Wave Files (*.wav)|*.wav||", pMainFrm);
dlg.m_ofn.nFilterIndex = 0;
- dlg.m_ofn.lpstrInitialDir = pMainFrm->GetExportDir();
+
+ dlg.m_ofn.lpstrInitialDir = CMainFrame::GetWorkingDirectory(DIR_EXPORT);
+
if (dlg.DoModal() == IDOK)
{
MPEGLAYER3WAVEFORMAT wfx;
HACMDRIVERID hadid;
- s[0] = 0;
- _splitpath(dlg.GetPathName(), s, path, NULL, NULL);
- strcat(s, path);
- pMainFrm->SetExportDir(s);
+ // will set default dir here because there's no setup option for export dir yet (feel free to add one...)
+ pMainFrm->SetDefaultDirectory(dlg.GetPathName(), DIR_EXPORT, true);
+
strcpy(s, dlg.GetPathName());
_splitpath(s, NULL, NULL, NULL, fext);
if (strlen(fext) <= 1)
Modified: trunk/OpenMPT/mptrack/Moptions.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Moptions.cpp 2009-07-05 21:01:58 UTC (rev 280)
+++ trunk/OpenMPT/mptrack/Moptions.cpp 2009-07-06 15:27:09 UTC (rev 281)
@@ -556,14 +556,17 @@
// COptionsGeneral
BEGIN_MESSAGE_MAP(COptionsGeneral, CPropertyPage)
- ON_EN_CHANGE(IDC_EDIT1, OnSettingsChanged)
- ON_EN_CHANGE(IDC_EDIT2, OnSettingsChanged)
- ON_EN_CHANGE(IDC_EDIT3, OnSettingsChanged)
- ON_LBN_SELCHANGE(IDC_LIST1, OnOptionSelChanged)
- ON_COMMAND(IDC_BUTTON1, OnBrowseSongs)
- ON_COMMAND(IDC_BUTTON2, OnBrowseSamples)
- ON_COMMAND(IDC_BUTTON3, OnBrowseInstruments)
- ON_CLBN_CHKCHANGE(IDC_LIST1, OnSettingsChanged)
+ ON_EN_CHANGE(IDC_OPTIONS_DIR_MODS, OnSettingsChanged)
+ ON_EN_CHANGE(IDC_OPTIONS_DIR_SAMPS, OnSettingsChanged)
+ ON_EN_CHANGE(IDC_OPTIONS_DIR_INSTS, OnSettingsChanged)
+ ON_EN_CHANGE(IDC_OPTIONS_DIR_VSTPRESETS, OnSettingsChanged)
+ ON_LBN_SELCHANGE(IDC_LIST1, OnOptionSelChanged)
+ ON_COMMAND(IDC_BUTTON_CHANGE_MODDIR, OnBrowseSongs)
+ ON_COMMAND(IDC_BUTTON_CHANGE_SAMPDIR, OnBrowseSamples)
+ ON_COMMAND(IDC_BUTTON_CHANGE_INSTRDIR, OnBrowseInstruments)
+ ON_COMMAND(IDC_BUTTON_CHANGE_VSTDIR, OnBrowsePlugins)
+ ON_COMMAND(IDC_BUTTON_CHANGE_VSTPRESETSDIR, OnBrowsePresets)
+ ON_CLBN_CHKCHANGE(IDC_LIST1, OnSettingsChanged)
END_MESSAGE_MAP()
typedef struct OPTGENDESC
@@ -711,9 +714,13 @@
}
m_CheckList.SetCurSel(0);
OnOptionSelChanged();
- SetDlgItemText(IDC_EDIT1, CMainFrame::m_szModDir);
- SetDlgItemText(IDC_EDIT2, CMainFrame::m_szSmpDir);
- SetDlgItemText(IDC_EDIT3, CMainFrame::m_szInsDir);
+
+ SetDlgItemText(IDC_OPTIONS_DIR_MODS, CMainFrame::GetDefaultDirectory(DIR_MODS));
+ SetDlgItemText(IDC_OPTIONS_DIR_SAMPS, CMainFrame::GetDefaultDirectory(DIR_SAMPLES));
+ SetDlgItemText(IDC_OPTIONS_DIR_INSTS, CMainFrame::GetDefaultDirectory(DIR_INSTRUMENTS));
+ SetDlgItemText(IDC_OPTIONS_DIR_VSTS, CMainFrame::GetDefaultDirectory(DIR_PLUGINS));
+ SetDlgItemText(IDC_OPTIONS_DIR_VSTPRESETS, CMainFrame::GetDefaultDirectory(DIR_PLUGINPRESETS));
+
return TRUE;
}
@@ -721,12 +728,16 @@
void COptionsGeneral::OnOK()
//--------------------------
{
- CHAR szModDir[_MAX_DIR], szSmpDir[_MAX_PATH], szInsDir[_MAX_PATH];
- szModDir[0] = szInsDir[0] = szSmpDir[0] = 0;
- GetDlgItemText(IDC_EDIT1, szModDir, _MAX_PATH);
- GetDlgItemText(IDC_EDIT2, szSmpDir, _MAX_PATH);
- GetDlgItemText(IDC_EDIT3, szInsDir, _MAX_PATH);
- for (UINT i=0; i<OPTGEN_MAXOPTIONS; i++)
+ // Default paths
+ TCHAR szModDir[_MAX_PATH], szSmpDir[_MAX_PATH], szInsDir[_MAX_PATH], szVstDir[_MAX_PATH], szPresetDir[_MAX_PATH];
+ szModDir[0] = szInsDir[0] = szSmpDir[0] = szVstDir[0] = szPresetDir[0] = 0;
+ GetDlgItemText(IDC_OPTIONS_DIR_MODS, szModDir, _MAX_PATH);
+ GetDlgItemText(IDC_OPTIONS_DIR_SAMPS, szSmpDir, _MAX_PATH);
+ GetDlgItemText(IDC_OPTIONS_DIR_INSTS, szInsDir, _MAX_PATH);
+ GetDlgItemText(IDC_OPTIONS_DIR_VSTS, szVstDir, _MAX_PATH);
+ GetDlgItemText(IDC_OPTIONS_DIR_VSTPRESETS, szPresetDir, _MAX_PATH);
+
+ for (UINT i=0; i < OPTGEN_MAXOPTIONS; i++)
{
DWORD mask = 0;
BOOL bCheck = m_CheckList.GetCheck(i);
@@ -774,7 +785,7 @@
CMainFrame *pMainFrm = CMainFrame::GetMainFrame();
if (pMainFrm)
{
- pMainFrm->SetupDirectories(szModDir, szSmpDir, szInsDir);
+ pMainFrm->SetupDirectories(szModDir, szSmpDir, szInsDir, szVstDir, szPresetDir);
pMainFrm->UpdateTree(NULL, HINT_MPTOPTIONS);
}
CPropertyPage::OnOK();
Modified: trunk/OpenMPT/mptrack/Moptions.h
===================================================================
--- trunk/OpenMPT/mptrack/Moptions.h 2009-07-05 21:01:58 UTC (rev 280)
+++ trunk/OpenMPT/mptrack/Moptions.h 2009-07-06 15:27:09 UTC (rev 281)
@@ -35,9 +35,11 @@
virtual void DoDataExchange(CDataExchange* pDX);
afx_msg void OnOptionSelChanged();
afx_msg void OnSettingsChanged() { SetModified(TRUE); }
- afx_msg void OnBrowseSongs() { BrowseForFolder(IDC_EDIT1); }
- afx_msg void OnBrowseSamples() { BrowseForFolder(IDC_EDIT2); }
- afx_msg void OnBrowseInstruments() { BrowseForFolder(IDC_EDIT3); }
+ afx_msg void OnBrowseSongs() { BrowseForFolder(IDC_OPTIONS_DIR_MODS); }
+ afx_msg void OnBrowseSamples() { BrowseForFolder(IDC_OPTIONS_DIR_SAMPS); }
+ afx_msg void OnBrowseInstruments() { BrowseForFolder(IDC_OPTIONS_DIR_INSTS); }
+ afx_msg void OnBrowsePlugins() { BrowseForFolder(IDC_OPTIONS_DIR_VSTS); }
+ afx_msg void OnBrowsePresets() { BrowseForFolder(IDC_OPTIONS_DIR_VSTPRESETS); }
//rewbs.customkeys: COptionsKeyboard moved to separate file
DECLARE_MESSAGE_MAP();
Modified: trunk/OpenMPT/mptrack/Mptrack.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Mptrack.cpp 2009-07-05 21:01:58 UTC (rev 280)
+++ trunk/OpenMPT/mptrack/Mptrack.cpp 2009-07-06 15:27:09 UTC (rev 281)
@@ -1277,10 +1277,11 @@
"All Files (*.*)|*.*||",
NULL);
dlg.m_ofn.nFilterIndex = CMainFrame::m_nFilterIndex;
- if (CMainFrame::m_szCurModDir[0])
- {
- dlg.m_ofn.lpstrInitialDir = CMainFrame::m_szCurModDir;
- }
+
+ const LPCTSTR pszWdir = CMainFrame::GetWorkingDirectory(DIR_MODS);
+ if(pszWdir[0])
+ dlg.m_ofn.lpstrInitialDir = pszWdir;
+
const size_t bufferSize = 2048; //Note: This is possibly the maximum buffer size in MFC 7(this note was written November 2006).
vector<char> filenameBuffer(bufferSize, 0);
dlg.GetOFN().lpstrFile = &filenameBuffer[0];
@@ -1290,11 +1291,8 @@
POSITION pos = dlg.GetStartPosition();
while(pos != NULL)
{
- CHAR szDrive[_MAX_PATH], szDir[_MAX_PATH];
CString pathName = dlg.GetNextPathName(pos);
- _splitpath(pathName, szDrive, szDir, NULL, NULL);
- strcpy(CMainFrame::m_szCurModDir, szDrive);
- strcat(CMainFrame::m_szCurModDir, szDir);
+ CMainFrame::SetWorkingDirectory(pathName, DIR_MODS, true);
CMainFrame::m_nFilterIndex = dlg.m_ofn.nFilterIndex;
OpenDocumentFile(pathName);
}
Modified: trunk/OpenMPT/mptrack/View_tre.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_tre.cpp 2009-07-05 21:01:58 UTC (rev 280)
+++ trunk/OpenMPT/mptrack/View_tre.cpp 2009-07-06 15:27:09 UTC (rev 281)
@@ -150,7 +150,7 @@
m_dwStatus |= TREESTATUS_SINGLEEXPAND;
}
ModifyStyle(dwRemove, dwAdd);
- strcpy(m_szInstrLibPath, CMainFrame::m_szSmpDir);
+ strcpy(m_szInstrLibPath, CMainFrame::GetDefaultDirectory(DIR_SAMPLES));
SetImageList(CMainFrame::GetMainFrame()->GetImageList(), TVSIL_NORMAL);
if (m_pDataTree)
{
@@ -1705,7 +1705,8 @@
if (!GetCurrentDirectory(sizeof(s), s)) s[0] = 0;
if (!strcmp(lpszDir+1, ":\\"))
{
- strcpy(sdrive, lpszDir);
+ sdrive[0] = lpszDir[0];
+ sdrive[1] = lpszDir[1];
sdrive[2] = 0;
lpszDir = sdrive;
}
Modified: trunk/OpenMPT/mptrack/Vstplug.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Vstplug.cpp 2009-07-05 21:01:58 UTC (rev 280)
+++ trunk/OpenMPT/mptrack/Vstplug.cpp 2009-07-06 15:27:09 UTC (rev 281)
@@ -1376,15 +1376,11 @@
OFN_FILEMUSTEXIST|OFN_ENABLESIZING |OFN_HIDEREADONLY|OFN_PATHMUSTEXIST|OFN_FORCESHOWHIDDEN|OFN_ALLOWMULTISELECT,
"VST Plugins (*.dll)|*.dll||",
this);
- CMainFrame *pMainFrm = CMainFrame::GetMainFrame();
- if (pMainFrm)
- {
- LPCSTR pszDir = pMainFrm->GetPluginsDir();
- if (pszDir[0])
- {
- dlg.m_ofn.lpstrInitialDir = pszDir;
- }
- }
+
+ const LPCTSTR pszWdir = CMainFrame::GetWorkingDirectory(DIR_PLUGINS);
+ if(pszWdir[0])
+ dlg.m_ofn.lpstrInitialDir = pszWdir;
+
pszFileNames = new CHAR[MAX_FILEOPEN_BUFSIZE];
if (!pszFileNames) return;
pszFileNames[0] = 0;
@@ -1393,7 +1389,6 @@
dlg.m_ofn.nMaxFile = MAX_FILEOPEN_BUFSIZE;
if (dlg.DoModal() == IDOK)
{
- CHAR s[_MAX_PATH], sdir[_MAX_PATH];
CVstPluginManager *pManager = theApp.GetPluginManager();
pszFileNames[MAX_FILEOPEN_BUFSIZE-1] = 0;
POSITION pos = dlg.GetStartPosition();
@@ -1403,16 +1398,14 @@
PVSTPLUGINLIB plugLib = NULL;
while (pos != NULL) {
- CString str = dlg.GetNextPathName(pos);
+ CString sFilename = dlg.GetNextPathName(pos);
if (!n) {
- _splitpath(str, s, sdir, NULL, NULL);
- strcat(s, sdir);
- if (pMainFrm) pMainFrm->SetPluginsDir(s);
+ CMainFrame::SetWorkingDirectory(sFilename, DIR_PLUGINS, true);
}
n++;
if (pManager) {
- plugLib = pManager->AddPlugin(str, FALSE);
+ plugLib = pManager->AddPlugin(sFilename, FALSE);
if (plugLib) {
bOk = TRUE;
}
Modified: trunk/OpenMPT/mptrack/mptrack.rc
===================================================================
--- trunk/OpenMPT/mptrack/mptrack.rc 2009-07-05 21:01:58 UTC (rev 280)
+++ trunk/OpenMPT/mptrack/mptrack.rc 2009-07-06 15:27:09 UTC (rev 281)
@@ -762,7 +762,7 @@
CTEXT "Length: 000000 (16-bit)",IDC_TEXT5,175,6,90,13,
SS_CENTERIMAGE,WS_EX_STATICEDGE
CONTROL "Toolbar2",IDC_TOOLBAR2,"ToolbarWindow32",WS_GROUP |
- 0x4d,268,4,195,17
+ 0x4d,268,4,186,17
GROUPBOX "",IDC_STATIC,3,22,94,78
LTEXT "Default Volume",IDC_STATIC,8,32,49,8
LTEXT "Global Volume",IDC_STATIC,8,45,46,8
@@ -1416,21 +1416,35 @@
CAPTION "General"
FONT 8, "MS Sans Serif", 0, 0, 0x0
BEGIN
- GROUPBOX "Directories",IDC_STATIC,5,5,261,67
- LTEXT "Songs:",IDC_STATIC,15,20,36,12,SS_CENTERIMAGE
- EDITTEXT IDC_EDIT1,59,20,174,12,ES_AUTOHSCROLL
- PUSHBUTTON "...",IDC_BUTTON1,240,20,12,11,NOT WS_TABSTOP
- LTEXT "Samples:",IDC_STATIC,15,37,41,12,SS_CENTERIMAGE
- EDITTEXT IDC_EDIT2,59,37,174,12,ES_AUTOHSCROLL
- PUSHBUTTON "...",IDC_BUTTON2,240,36,12,11,NOT WS_TABSTOP
- LTEXT "Instruments:",IDC_STATIC,15,53,40,12,SS_CENTERIMAGE
- EDITTEXT IDC_EDIT3,59,53,174,12,ES_AUTOHSCROLL
- PUSHBUTTON "...",IDC_BUTTON3,240,54,12,11,NOT WS_TABSTOP
- GROUPBOX "Options",IDC_STATIC,4,75,261,200
- LTEXT "Description",IDC_TEXT1,144,86,111,175
- LISTBOX IDC_LIST1,9,86,129,181,LBS_OWNERDRAWFIXED |
+ GROUPBOX "Default Directories",IDC_STATIC,6,6,261,102
+ RTEXT "Songs:",IDC_STATIC_MODDIR,12,18,48,12,SS_CENTERIMAGE
+ EDITTEXT IDC_OPTIONS_DIR_MODS,66,18,174,12,ES_AUTOHSCROLL
+ PUSHBUTTON "...",IDC_BUTTON_CHANGE_MODDIR,246,18,12,11,NOT
+ WS_TABSTOP
+ RTEXT "Samples:",IDC_STATIC_SAMPDIR,12,36,48,12,SS_CENTERIMAGE
+ EDITTEXT IDC_OPTIONS_DIR_SAMPS,66,36,174,12,ES_AUTOHSCROLL
+ PUSHBUTTON "...",IDC_BUTTON_CHANGE_SAMPDIR,246,36,12,11,NOT
+ WS_TABSTOP
+ RTEXT "Instruments:",IDC_STATIC_INSTRDIR,12,54,48,12,
+ SS_CENTERIMAGE
+ EDITTEXT IDC_OPTIONS_DIR_INSTS,66,54,174,12,ES_AUTOHSCROLL
+ PUSHBUTTON "...",IDC_BUTTON_CHANGE_INSTRDIR,246,54,12,11,NOT
+ WS_TABSTOP
+ GROUPBOX "Options",IDC_STATIC,4,114,261,161
+ LTEXT "Description",IDC_TEXT1,144,126,111,138
+ LISTBOX IDC_LIST1,9,126,129,141,LBS_OWNERDRAWFIXED |
LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL |
WS_TABSTOP
+ RTEXT "VST Plugins:",IDC_STATIC_VSTDIR,12,72,48,12,
+ SS_CENTERIMAGE
+ EDITTEXT IDC_OPTIONS_DIR_VSTS,66,72,174,12,ES_AUTOHSCROLL
+ PUSHBUTTON "...",IDC_BUTTON_CHANGE_VSTDIR,246,72,12,11,NOT
+ WS_TABSTOP
+ RTEXT "VST Presets:",IDC_STATIC_VSTPRESETDIR,12,90,48,12,
+ SS_CENTERIMAGE
+ EDITTEXT IDC_OPTIONS_DIR_VSTPRESETS,66,90,174,12,ES_AUTOHSCROLL
+ PUSHBUTTON "...",IDC_BUTTON_CHANGE_VSTPRESETSDIR,246,90,12,11,NOT
+ WS_TABSTOP
END
IDD_OPTIONS_SOUNDCARD DIALOGEX 0, 0, 272, 276
@@ -1438,7 +1452,6 @@
CAPTION "Sound Card"
FONT 8, "MS Sans Serif", 0, 0, 0x0
BEGIN
- GROUPBOX "",IDC_STATIC,5,5,232,170
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
@@ -1472,6 +1485,7 @@
WS_TABSTOP,133,92,64,10
LTEXT "Note: The Pre-Amp and Soft Panning settings are ignored by songs with mix levels set to 1.17RC3 or later in Song Properties.",
IDC_STATIC,17,152,204,18
+ GROUPBOX "",IDC_STATIC,5,5,232,170
END
IDD_MIDIMACRO DIALOGEX 0, 0, 349, 345
@@ -1930,24 +1944,24 @@
LTEXT "around current",IDC_STATIC,156,84,49,8
END
-IDD_ADDSILENCE DIALOGEX 0, 0, 175, 63
+IDD_ADDSILENCE DIALOGEX 0, 0, 175, 71
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION |
WS_SYSMENU
CAPTION "Insert Silence"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
- DEFPUSHBUTTON "OK",IDOK,118,7,50,14
- PUSHBUTTON "Cancel",IDCANCEL,118,25,50,14
- GROUPBOX "",IDC_STATIC,7,3,106,55
- EDITTEXT IDC_EDIT1,25,14,40,14,ES_AUTOHSCROLL | ES_NUMBER
+ DEFPUSHBUTTON "OK",IDOK,120,12,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,120,30,50,14
+ GROUPBOX "",IDC_STATIC,6,6,108,60
+ EDITTEXT IDC_EDIT1,12,18,40,14,ES_AUTOHSCROLL | ES_NUMBER
CONTROL "",IDC_SPIN1,"msctls_updown32",UDS_SETBUDDYINT |
UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS |
- UDS_NOTHOUSANDS,57,15,11,14
- LTEXT "samples",IDC_STATIC,74,17,26,8
+ UDS_NOTHOUSANDS,44,18,11,14
+ LTEXT "samples",IDC_STATIC,59,21,35,8
CONTROL "At beginning of sample",IDC_RADIO1,"Button",
- BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,11,32,89,10
+ BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,12,36,97,10
CONTROL "At end of sample",IDC_RADIO2,"Button",
- BS_AUTORADIOBUTTON | WS_TABSTOP,11,46,70,10
+ BS_AUTORADIOBUTTON | WS_TABSTOP,12,48,97,10
END
IDD_PATTERNRANDOMIZER_EFFECT DIALOGEX 0, 0, 235, 172
@@ -2239,7 +2253,7 @@
LEFTMARGIN, 7
RIGHTMARGIN, 168
TOPMARGIN, 7
- BOTTOMMARGIN, 56
+ BOTTOMMARGIN, 64
END
END
Modified: trunk/OpenMPT/mptrack/resource.h
===================================================================
--- trunk/OpenMPT/mptrack/resource.h 2009-07-05 21:01:58 UTC (rev 280)
+++ trunk/OpenMPT/mptrack/resource.h 2009-07-06 15:27:09 UTC (rev 281)
@@ -830,6 +830,24 @@
#define IDC_DONTSHOWAGAIN 2341
#define IDC_MESSAGETEXT 2342
#define IDC_SAMPLE_DCOFFSET 2343
+#define IDC_OPTIONS_DIR_MODS 2344
+#define IDC_OPTIONS_DIR_SAMPS 2345
+#define IDC_OPTIONS_DIR_INSTS 2346
+#define IDC_OPTIONS_DIR_VSTS 2347
+#define IDC_STATIC_MODDIR 2348
+#define IDC_STATIC_SAMPDIR 2349
+#define IDC_STATIC_INSTRDIR 2350
+#define IDC_STATIC_VSTDIR 2351
+#define IDC_BUTTON_CHANGE_MODDIR 2352
+#define IDC_BUTTON_CHANGE_SAMPDIR 2353
+#define IDC_BUTTON_CHANGE_INSTRDIR 2354
+#define IDC_BUTTON_CHANGE_VSTDIR 2355
+#define IDC_STATIC_AUTOSAVE_OPTIONS 2356
+#define IDC_STATIC_AUTOSAVE_LOCATION 2357
+#define IDC_OPTIONS_DIR_VSTPRESETS 2357
+#define IDC_BUTTON_CHANGE_VSTDIR2 2358
+#define IDC_BUTTON_CHANGE_VSTPRESETSDIR 2358
+#define IDC_STATIC_VSTPRESETDIR 2359
#define ID_FILE_NEWMOD 32771
#define ID_FILE_NEWXM 32772
#define ID_FILE_NEWS3M 32773
@@ -1067,7 +1085,7 @@
#define _APS_3D_CONTROLS 1
#define _APS_NEXT_RESOURCE_VALUE 518
#define _APS_NEXT_COMMAND_VALUE 59226
-#define _APS_NEXT_CONTROL_VALUE 2344
+#define _APS_NEXT_CONTROL_VALUE 2360
#define _APS_NEXT_SYMED_VALUE 901
#endif
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rel...@us...> - 2009-07-05 21:02:00
|
Revision: 280
http://modplug.svn.sourceforge.net/modplug/?rev=280&view=rev
Author: relabsoluness
Date: 2009-07-05 21:01:58 +0000 (Sun, 05 Jul 2009)
Log Message:
-----------
(patch from Jojo, merged somewhat modified)
[New] Sample tab: DC offset removal. (merge edits: refactoring: moved implementation to modsmp_ctrl and added some helper functions).
Modified Paths:
--------------
trunk/OpenMPT/mptrack/CommandSet.cpp
trunk/OpenMPT/mptrack/CommandSet.h
trunk/OpenMPT/mptrack/Ctrl_smp.cpp
trunk/OpenMPT/mptrack/Ctrl_smp.h
trunk/OpenMPT/mptrack/View_smp.cpp
trunk/OpenMPT/mptrack/mptrack.rc
trunk/OpenMPT/mptrack/res/patterns.bmp
trunk/OpenMPT/mptrack/resource.h
trunk/OpenMPT/soundlib/modsmp_ctrl.cpp
trunk/OpenMPT/soundlib/modsmp_ctrl.h
Modified: trunk/OpenMPT/mptrack/CommandSet.cpp
===================================================================
--- trunk/OpenMPT/mptrack/CommandSet.cpp 2009-07-01 20:02:20 UTC (rev 279)
+++ trunk/OpenMPT/mptrack/CommandSet.cpp 2009-07-05 21:01:58 UTC (rev 280)
@@ -2328,6 +2328,11 @@
commands[kcNotePCS].isDummy = false;
commands[kcNotePCS].Message = "Parameter control(smooth)(MPTm only)";
+ commands[kcSampleRemoveDCOffset].UID = 1790;
+ commands[kcSampleRemoveDCOffset].Message = "Remove DC Offset";
+ commands[kcSampleRemoveDCOffset].isHidden = false;
+ commands[kcSampleRemoveDCOffset].isDummy = false;
+
#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-07-01 20:02:20 UTC (rev 279)
+++ trunk/OpenMPT/mptrack/CommandSet.h 2009-07-05 21:01:58 UTC (rev 280)
@@ -572,7 +572,8 @@
kcSampleZoomDown,
kcSampleInvert,
kcSampleSignUnsign,
- kcEndSampleEditing=kcSampleSignUnsign,
+ kcSampleRemoveDCOffset,
+ kcEndSampleEditing=kcSampleRemoveDCOffset,
//kcSampStartNotes to kcInsNoteMapEndNoteStops must be contiguous.
kcSampStartNotes,
Modified: trunk/OpenMPT/mptrack/Ctrl_smp.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2009-07-01 20:02:20 UTC (rev 279)
+++ trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2009-07-05 21:01:58 UTC (rev 280)
@@ -14,6 +14,7 @@
#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"
+#include "modsmp_ctrl.h"
#ifdef _DEBUG
#define new DEBUG_NEW
@@ -67,6 +68,7 @@
ON_COMMAND(IDC_SAMPLE_SILENCE, OnSilence)
ON_COMMAND(IDC_SAMPLE_INVERT, OnInvert)
ON_COMMAND(IDC_SAMPLE_SIGN_UNSIGN, OnSignUnSign)
+ ON_COMMAND(IDC_SAMPLE_DCOFFSET, OnRemoveDCOffset)
ON_COMMAND(IDC_CHECK1, OnSetPanningChanged)
ON_COMMAND(ID_PREVINSTRUMENT, OnPrevInstrument)
ON_COMMAND(ID_NEXTINSTRUMENT, OnNextInstrument)
@@ -207,6 +209,7 @@
m_ToolBar2.AddButton(IDC_SAMPLE_PLAY, 14);
m_ToolBar2.AddButton(IDC_SAMPLE_NORMALIZE, 8);
m_ToolBar2.AddButton(IDC_SAMPLE_AMPLIFY, 9);
+ m_ToolBar2.AddButton(IDC_SAMPLE_DCOFFSET, 37);
m_ToolBar2.AddButton(IDC_SAMPLE_UPSAMPLE, 10);
m_ToolBar2.AddButton(IDC_SAMPLE_DOWNSAMPLE, 29);
m_ToolBar2.AddButton(IDC_SAMPLE_REVERSE, 11);
@@ -469,6 +472,10 @@
OnSignUnSign();
break;
+ case IDC_SAMPLE_DCOFFSET:
+ OnRemoveDCOffset();
+ break;
+
case IDC_SAMPLE_NORMALIZE:
OnNormalize();
break;
@@ -1046,8 +1053,8 @@
//Shift -> Normalize all samples
if(CMainFrame::GetInputHandler()->ShiftPressed())
{
- int ans = MessageBox(GetStrI18N(TEXT("This will normalize all samples independently. Continue?")), GetStrI18N(TEXT("Normalize")), MB_YESNO | MB_ICONQUESTION);
- if(ans == IDNO) return;
+ if(MessageBox(GetStrI18N(TEXT("This will normalize all samples independently. Continue?")), GetStrI18N(TEXT("Normalize")), MB_YESNO | MB_ICONQUESTION) == IDNO)
+ return;
iMinSample = 1;
iMaxSample = m_pSndFile->m_nSamples;
} else {
@@ -1203,6 +1210,89 @@
}
+void CCtrlSamples::OnRemoveDCOffset()
+//-----------------------------------
+{
+ if(!m_pModDoc || !m_pSndFile)
+ return;
+
+ SAMPLEVIEWSTATE viewstate;
+ UINT iMinSample = m_nSample, iMaxSample = m_nSample;
+
+ memset(&viewstate, 0, sizeof(viewstate));
+ SendViewMessage(VIEWMSG_SAVESTATE, (LPARAM)&viewstate);
+
+ //Shift -> Process all samples
+ if(CMainFrame::GetInputHandler()->ShiftPressed())
+ {
+ if(MessageBox(GetStrI18N(TEXT("This will process all samples independently. Continue?")), GetStrI18N(TEXT("DC Offset Removal")), MB_YESNO | MB_ICONQUESTION) == IDNO)
+ return;
+ iMinSample = 1;
+ iMaxSample = m_pSndFile->m_nSamples;
+ }
+
+ BeginWaitCursor();
+
+ // for report / SetModified
+ UINT iModified = 0;
+ float fReportOffset = 0;
+
+ for(UINT iSmp = iMinSample; iSmp <= iMaxSample; iSmp++)
+ {
+ UINT iStart, iEnd;
+
+ if( m_pSndFile->Ins[iSmp].pSample == nullptr )
+ continue;
+
+ if (iMinSample != iMaxSample)
+ {
+ iStart = 0;
+ iEnd = m_pSndFile->Ins[iSmp].nLength;
+ }
+ else
+ {
+ iStart = viewstate.dwBeginSel;
+ iEnd = viewstate.dwEndSel;
+ }
+ const float fOffset = ctrlSmp::RemoveDCOffset(m_pSndFile->Ins[iSmp], iStart, iEnd, m_pSndFile->GetType(), m_pSndFile);
+
+ if(fOffset == 0.0f) // No offset removed.
+ continue;
+
+ fReportOffset += fOffset;
+ iModified++;
+ m_pModDoc->UpdateAllViews(NULL, (iSmp << HINT_SHIFT_SMP) | HINT_SAMPLEDATA | HINT_SAMPLEINFO, NULL);
+ }
+
+ EndWaitCursor();
+ SwitchToView();
+
+ // fill the statusbar with some nice information
+
+ CString dcInfo;
+ if(iModified)
+ {
+ m_pModDoc->SetModified();
+ if(iModified == 1)
+ {
+ dcInfo.Format(GetStrI18N(TEXT("Removed DC offset (%.1f%%)")), fReportOffset * 100);
+ }
+ else
+ {
+ dcInfo.Format(GetStrI18N(TEXT("Removed DC offset from %d samples (avg %0.1f%%)")), iModified, fReportOffset / iModified * 100);
+ }
+ }
+ else
+ {
+ dcInfo.SetString(GetStrI18N(TEXT("No DC offset found")));
+ }
+
+ CMainFrame *pMainFrm = CMainFrame::GetMainFrame();
+ pMainFrm->SetXInfoText(dcInfo);
+
+}
+
+
void CCtrlSamples::OnAmplify()
//----------------------------
{
Modified: trunk/OpenMPT/mptrack/Ctrl_smp.h
===================================================================
--- trunk/OpenMPT/mptrack/Ctrl_smp.h 2009-07-01 20:02:20 UTC (rev 279)
+++ trunk/OpenMPT/mptrack/Ctrl_smp.h 2009-07-05 21:01:58 UTC (rev 280)
@@ -72,6 +72,7 @@
afx_msg void OnSamplePlay();
afx_msg void OnNormalize();
afx_msg void OnAmplify();
+ afx_msg void OnRemoveDCOffset();
afx_msg void OnUpsample();
afx_msg void OnDownsample();
afx_msg void OnReverse();
Modified: trunk/OpenMPT/mptrack/View_smp.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_smp.cpp 2009-07-01 20:02:20 UTC (rev 279)
+++ trunk/OpenMPT/mptrack/View_smp.cpp 2009-07-05 21:01:58 UTC (rev 280)
@@ -2543,12 +2543,13 @@
case kcSampleSave: PostCtrlMessage(IDC_SAMPLE_SAVEAS); return wParam;
case kcSampleNew: PostCtrlMessage(IDC_SAMPLE_NEW); return wParam;
- case kcSampleReverse: PostCtrlMessage(IDC_SAMPLE_REVERSE); return wParam;
- case kcSampleSilence: PostCtrlMessage(IDC_SAMPLE_SILENCE); return wParam;
- case kcSampleNormalize: PostCtrlMessage(IDC_SAMPLE_NORMALIZE); return wParam;
- case kcSampleAmplify: PostCtrlMessage(IDC_SAMPLE_AMPLIFY); return wParam;
- case kcSampleInvert: PostCtrlMessage(IDC_SAMPLE_INVERT); return wParam;
- case kcSampleSignUnsign: PostCtrlMessage(IDC_SAMPLE_SIGN_UNSIGN); return wParam;
+ case kcSampleReverse: PostCtrlMessage(IDC_SAMPLE_REVERSE); return wParam;
+ case kcSampleSilence: PostCtrlMessage(IDC_SAMPLE_SILENCE); return wParam;
+ case kcSampleNormalize: PostCtrlMessage(IDC_SAMPLE_NORMALIZE); return wParam;
+ case kcSampleAmplify: PostCtrlMessage(IDC_SAMPLE_AMPLIFY); return wParam;
+ case kcSampleInvert: PostCtrlMessage(IDC_SAMPLE_INVERT); return wParam;
+ case kcSampleSignUnsign: PostCtrlMessage(IDC_SAMPLE_SIGN_UNSIGN); return wParam;
+ case kcSampleRemoveDCOffset: PostCtrlMessage(IDC_SAMPLE_DCOFFSET); return wParam;
case kcNoteOff: PlayNote(NOTE_KEYOFF); return wParam;
case kcNoteCut: PlayNote(NOTE_NOTECUT); return wParam;
Modified: trunk/OpenMPT/mptrack/mptrack.rc
===================================================================
--- trunk/OpenMPT/mptrack/mptrack.rc 2009-07-01 20:02:20 UTC (rev 279)
+++ trunk/OpenMPT/mptrack/mptrack.rc 2009-07-05 21:01:58 UTC (rev 280)
@@ -762,7 +762,7 @@
CTEXT "Length: 000000 (16-bit)",IDC_TEXT5,175,6,90,13,
SS_CENTERIMAGE,WS_EX_STATICEDGE
CONTROL "Toolbar2",IDC_TOOLBAR2,"ToolbarWindow32",WS_GROUP |
- 0x4d,268,4,164,17
+ 0x4d,268,4,195,17
GROUPBOX "",IDC_STATIC,3,22,94,78
LTEXT "Default Volume",IDC_STATIC,8,32,49,8
LTEXT "Global Volume",IDC_STATIC,8,45,46,8
@@ -2487,6 +2487,11 @@
STRINGTABLE
BEGIN
+ IDC_SAMPLE_DCOFFSET "Remove DC Offset\nRemove DC Offset and normalize (hold shift to process all samples)"
+END
+
+STRINGTABLE
+BEGIN
ID_ENVELOPE_SETLOOP "Enable or disable the envelope loop"
ID_ENVELOPE_SUSTAIN "Enable or disable the envelope sustain"
ID_ENVELOPE_INSERTPOINT "Insert a new point in the envelope at the current location"
@@ -2499,6 +2504,11 @@
ID_PATTERN_PLAYROW "Play current row\nPlay Row"
ID_IMPORT_MIDILIB "Defines the default MIDI library used when importing MIDI files"
ID_CLEANUP_REARRANGE "Rearrange all patterns so that they are sorted in the order list\nRearrange Patterns"
+END
+
+STRINGTABLE
+BEGIN
+ ID_EDIT_GOTO_MENU "Go to row / channel / pattern / order"
ID_CLEANUP_COMPO "Reset attributes to defaults (useful for creating sample packs)\nCompo Cleanup"
END
@@ -2585,11 +2595,6 @@
IDS_OPERATION_FAIL "Operation failed."
END
-STRINGTABLE
-BEGIN
- ID_EDIT_GOTO_MENU "Go to row / channel / pattern / order"
-END
-
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
Modified: trunk/OpenMPT/mptrack/res/patterns.bmp
===================================================================
(Binary files differ)
Modified: trunk/OpenMPT/mptrack/resource.h
===================================================================
--- trunk/OpenMPT/mptrack/resource.h 2009-07-01 20:02:20 UTC (rev 279)
+++ trunk/OpenMPT/mptrack/resource.h 2009-07-05 21:01:58 UTC (rev 280)
@@ -829,6 +829,7 @@
#define IDC_MIDIPLAYPATTERNONMIDIIN 2340
#define IDC_DONTSHOWAGAIN 2341
#define IDC_MESSAGETEXT 2342
+#define IDC_SAMPLE_DCOFFSET 2343
#define ID_FILE_NEWMOD 32771
#define ID_FILE_NEWXM 32772
#define ID_FILE_NEWS3M 32773
@@ -1066,7 +1067,7 @@
#define _APS_3D_CONTROLS 1
#define _APS_NEXT_RESOURCE_VALUE 518
#define _APS_NEXT_COMMAND_VALUE 59226
-#define _APS_NEXT_CONTROL_VALUE 2343
+#define _APS_NEXT_CONTROL_VALUE 2344
#define _APS_NEXT_SYMED_VALUE 901
#endif
#endif
Modified: trunk/OpenMPT/soundlib/modsmp_ctrl.cpp
===================================================================
--- trunk/OpenMPT/soundlib/modsmp_ctrl.cpp 2009-07-01 20:02:20 UTC (rev 279)
+++ trunk/OpenMPT/soundlib/modsmp_ctrl.cpp 2009-07-05 21:01:58 UTC (rev 280)
@@ -170,4 +170,125 @@
}
+namespace
+{
+ struct OffsetData
+ {
+ double dMax, dMin, dOffset;
+ };
+
+ // Returns maximum sample amplitude for given sample type (int8/int16).
+ template <class T>
+ double GetMaxAmplitude() {return 1.0 + (std::numeric_limits<T>::max)();}
+
+ // Calculates DC offset and returns struct with DC offset, max and min values.
+ // DC offset value is average of [-1.0, 1.0[-normalized offset values.
+ template<class T>
+ OffsetData CalculateOffset(const T* pStart, const SmpLength nLength)
+ //------------------------------------------------------------------
+ {
+ OffsetData offsetVals = {0,0,0};
+
+ if(nLength < 1)
+ return offsetVals;
+
+ const double dMaxAmplitude = GetMaxAmplitude<T>();
+
+ double dMax = -1, dMin = 1, dSum = 0;
+
+ const T* p = pStart;
+ for (SmpLength i = 0; i < nLength; i++, p++)
+ {
+ const double dVal = double(*p) / dMaxAmplitude;
+ dSum += dVal;
+ if(dVal > dMax) dMax = dVal;
+ if(dVal < dMin) dMin = dVal;
+ }
+
+ offsetVals.dMax = dMax;
+ offsetVals.dMin = dMin;
+ offsetVals.dOffset = (-dSum / (double)(nLength));
+ return offsetVals;
+ }
+
+ template <class T>
+ void RemoveOffsetAndNormalize(T* pStart, const SmpLength nLength, const double dOffset, const double dAmplify)
+ //------------------------------------------------------------------------------------------------------------
+ {
+ T* p = pStart;
+ for (UINT i = 0; i < nLength; i++, p++)
+ {
+ double dVal = (*p) * dAmplify + dOffset;
+ Limit(dVal, (std::numeric_limits<T>::min)(), (std::numeric_limits<T>::max)());
+ *p = static_cast<T>(dVal);
+ }
+ }
+};
+
+// Remove DC offset
+float RemoveDCOffset(MODINSTRUMENT& smp,
+ SmpLength iStart,
+ SmpLength iEnd,
+ const MODTYPE modtype,
+ CSoundFile* const pSndFile)
+//----------------------------------------------
+{
+ if(smp.pSample == nullptr || smp.nLength < 1)
+ return 0;
+
+ MODINSTRUMENT* const pins = &smp;
+
+ if (iEnd > pins->nLength) iEnd = pins->nLength;
+ if (iStart > iEnd) iStart = iEnd;
+ if (iStart == iEnd)
+ {
+ iStart = 0;
+ iEnd = pins->nLength;
+ }
+
+ iStart *= pins->GetNumChannels();
+ iEnd *= pins->GetNumChannels();
+
+ const double dMaxAmplitude = (pins->GetElementarySampleSize() == 2) ? GetMaxAmplitude<int16>() : GetMaxAmplitude<int8>();
+
+ // step 1: Calculate offset.
+ OffsetData oData = {0,0,0};
+ if(pins->GetElementarySampleSize() == 2)
+ oData = CalculateOffset(reinterpret_cast<int16*>(pins->pSample) + iStart, iEnd - iStart);
+ else if(pins->GetElementarySampleSize() == 1)
+ oData = CalculateOffset(reinterpret_cast<int8*>(pins->pSample) + iStart, iEnd - iStart);
+
+ double dMin = oData.dMin, dMax = oData.dMax, dOffset = oData.dOffset;
+
+ const float fReportOffset = (float)dOffset;
+
+ if((int)(dOffset * dMaxAmplitude) == 0)
+ return 0;
+
+ // those will be changed...
+ dMax += dOffset;
+ dMin += dOffset;
+
+ // ... and that might cause distortion, so we will normalize this.
+ const double dAmplify = 1 / max(dMax, -dMin);
+
+ // step 2: centralize + normalize sample
+ dOffset *= dMaxAmplitude * dAmplify;
+ if(pins->GetElementarySampleSize() == 2)
+ RemoveOffsetAndNormalize( reinterpret_cast<int16*>(pins->pSample) + iStart, iEnd - iStart, dOffset, dAmplify);
+ else if(pins->GetElementarySampleSize() == 1)
+ RemoveOffsetAndNormalize( reinterpret_cast<int8*>(pins->pSample) + iStart, iEnd - iStart, dOffset, dAmplify);
+
+ // step 3: adjust either global vol or default vol of this sample
+ if(modtype == MOD_TYPE_IT || modtype == MOD_TYPE_MPT)
+ pins->nGlobalVol = min((WORD)(pins->nGlobalVol / dAmplify), 64);
+ else if(modtype != MOD_TYPE_NONE)
+ pins->nVolume = min((WORD)(pins->nVolume / dAmplify), 256);
+
+ AdjustEndOfSample(smp, pSndFile);
+
+ return fReportOffset;
+}
+
+
} // namespace ctrlSmp
Modified: trunk/OpenMPT/soundlib/modsmp_ctrl.h
===================================================================
--- trunk/OpenMPT/soundlib/modsmp_ctrl.h 2009-07-01 20:02:20 UTC (rev 279)
+++ trunk/OpenMPT/soundlib/modsmp_ctrl.h 2009-07-05 21:01:58 UTC (rev 280)
@@ -35,6 +35,16 @@
// Resets samples.
void ResetSamples(CSoundFile& rSndFile, ResetFlag resetflag);
-}
+// Remove DC offset and normalize.
+// Return: If DC offset was removed, returns original offset value, zero otherwise.
+float RemoveDCOffset(MODINSTRUMENT& smp,
+ SmpLength iStart, // Start position (for partial DC offset removal).
+ SmpLength iEnd, // End position (for partial DC offset removal).
+ const MODTYPE modtype, // Used to determine whether to adjust global or default volume
+ // to keep volume level the same given the normalization.
+ // Volume adjustment is not done if this param is MOD_TYPE_NONE.
+ CSoundFile* const pSndFile); // Passed to AdjustEndOfSample.
+} // Namespace ctrlSmp
+
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rel...@us...> - 2009-07-01 20:02:40
|
Revision: 279
http://modplug.svn.sourceforge.net/modplug/?rev=279&view=rev
Author: relabsoluness
Date: 2009-07-01 20:02:20 +0000 (Wed, 01 Jul 2009)
Log Message:
-----------
(patches from Jojo, merged somewhat modified)
[Fix] GDM import: GDM files now show in the load dialogs, MOD transpose/finetune related fix, Endian fixes.
[Imp] Sample tab: Better loop point handling when deleting sample selections.
[Fix] Sample tab: Transpose is now disabled when using MOD format.
[Mod] General: Changes to default general options configuration.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Ctrl_smp.cpp
trunk/OpenMPT/mptrack/MainFrm.cpp
trunk/OpenMPT/mptrack/Mptrack.cpp
trunk/OpenMPT/mptrack/View_smp.cpp
trunk/OpenMPT/soundlib/Load_gdm.cpp
Modified: trunk/OpenMPT/mptrack/Ctrl_smp.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2009-06-29 20:56:43 UTC (rev 278)
+++ trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2009-07-01 20:02:20 UTC (rev 279)
@@ -599,6 +599,9 @@
m_CheckPanning.EnableWindow(b && !(m_pSndFile->GetType() & MOD_TYPE_XM));
m_EditPanning.EnableWindow(b);
m_SpinPanning.EnableWindow(b);
+
+ b = (m_pSndFile->m_nType & MOD_TYPE_MOD) ? FALSE : TRUE;
+ m_CbnBaseNote.EnableWindow(b);
}
// Updating Values
if (dwHintMask & (HINT_MODTYPE|HINT_SAMPLEINFO))
Modified: trunk/OpenMPT/mptrack/MainFrm.cpp
===================================================================
--- trunk/OpenMPT/mptrack/MainFrm.cpp 2009-06-29 20:56:43 UTC (rev 278)
+++ trunk/OpenMPT/mptrack/MainFrm.cpp 2009-07-01 20:02:20 UTC (rev 279)
@@ -200,7 +200,8 @@
DWORD CMainFrame::m_dwPatternSetup = PATTERN_PLAYNEWNOTE | PATTERN_EFFECTHILIGHT
| PATTERN_SMALLFONT | PATTERN_CENTERROW | PATTERN_AUTOSPACEBAR
| PATTERN_DRAGNDROPEDIT | PATTERN_FLATBUTTONS
- | PATTERN_2NDHIGHLIGHT | PATTERN_STDHIGHLIGHT | PATTERN_HILITETIMESIGS;
+ | PATTERN_2NDHIGHLIGHT | PATTERN_STDHIGHLIGHT | PATTERN_HILITETIMESIGS
+ | PATTERN_SHOWPREVIOUS | PATTERN_CONTSCROLL | PATTERN_SYNCMUTE | PATTERN_AUTODELAY | PATTERN_NOTEFADE;
DWORD CMainFrame::m_nRowSpacing = 16;
DWORD CMainFrame::m_nRowSpacing2 = 4;
Modified: trunk/OpenMPT/mptrack/Mptrack.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Mptrack.cpp 2009-06-29 20:56:43 UTC (rev 278)
+++ trunk/OpenMPT/mptrack/Mptrack.cpp 2009-07-01 20:02:20 UTC (rev 279)
@@ -1253,11 +1253,12 @@
// -> CODE#0023
// -> DESC="IT project files (.itp)"
// "All Modules|*.mod;*.nst;*.wow;*.s3m;*.stm;*.669;*.mtm;*.xm;*.it;*.ult;*.mdz;*.s3z;*.xmz;*.itz;mod.*;*.far;*.mdl;*.okt;*.dmf;*.ptm;*.mdr;*.med;*.ams;*.dbm;*.dsm;*.mid;*.rmi;*.smf;*.bak;*.umx;*.amf;*.psm;*.mt2|"
+// "All Modules|*.mod;*.nst;*.wow;*.s3m;*.stm;*.669;*.mtm;*.xm;*.it;*.ult;*.mdz;*.s3z;*.xmz;*.itz;mod.*;*.far;*.mdl;*.okt;*.dmf;*.ptm;*.mdr;*.med;*.ams;*.dbm;*.dsm;*.mid;*.rmi;*.smf;*.bak;*.umx;*.amf;*.psm;*.mt2;*.gdm|"
#ifndef NO_MO3_SUPPORT
- "All Modules|*.mod;*.nst;*.wow;*.s3m;*.stm;*.669;*.mtm;*.xm;*.it;*.itp;*.mptm;*.ult;*.mdz;*.s3z;*.xmz;*.itz;mod.*;*.far;*.mdl;*.okt;*.dmf;*.ptm;*.mdr;*.med;*.ams;*.dbm;*.dsm;*.mid;*.rmi;*.smf;*.umx;*.amf;*.psm;*.mt2;*.mo3|"
+ "All Modules|*.mod;*.nst;*.wow;*.s3m;*.stm;*.669;*.mtm;*.xm;*.it;*.itp;*.mptm;*.ult;*.mdz;*.s3z;*.xmz;*.itz;mod.*;*.far;*.mdl;*.okt;*.dmf;*.ptm;*.mdr;*.med;*.ams;*.dbm;*.dsm;*.mid;*.rmi;*.smf;*.umx;*.amf;*.psm;*.mt2;*.gdm;*.mo3|"
"Compressed Modules (*.mdz;*.s3z;*.xmz;*.itz;*.mo3)|*.mdz;*.s3z;*.xmz;*.itz;*.mdr;*.zip;*.rar;*.lha;*.mo3|"
#else
- "All Modules|*.mod;*.nst;*.wow;*.s3m;*.stm;*.669;*.mtm;*.xm;*.it;*.itp;*.mptm;*.ult;*.mdz;*.s3z;*.xmz;*.itz;mod.*;*.far;*.mdl;*.okt;*.dmf;*.ptm;*.mdr;*.med;*.ams;*.dbm;*.dsm;*.mid;*.rmi;*.smf;*.umx;*.amf;*.psm;*.mt2|"
+ "All Modules|*.mod;*.nst;*.wow;*.s3m;*.stm;*.669;*.mtm;*.xm;*.it;*.itp;*.mptm;*.ult;*.mdz;*.s3z;*.xmz;*.itz;mod.*;*.far;*.mdl;*.okt;*.dmf;*.ptm;*.mdr;*.med;*.ams;*.dbm;*.dsm;*.mid;*.rmi;*.smf;*.umx;*.amf;*.psm;*.mt2;*.gdm|"
"Compressed Modules (*.mdz;*.s3z;*.xmz;*.itz)|*.mdz;*.s3z;*.xmz;*.itz;*.mdr;*.zip;*.rar;*.lha|"
#endif
// -! NEW_FEATURE#0023
@@ -1270,7 +1271,7 @@
"Impulse Tracker Projects (*.itp)|*.itp;*.itpz|"
// -! NEW_FEATURE#0023
"OpenMPT Modules (*.mptm)|*.mptm;*.mptmz|"
- "Other Modules (mtm,okt,mdl,669,far,...)|*.mtm;*.669;*.ult;*.wow;*.far;*.mdl;*.okt;*.dmf;*.ptm;*.med;*.ams;*.dbm;*.dsm;*.umx;*.amf;*.psm;*.mt2|"
+ "Other Modules (mtm,okt,mdl,669,far,...)|*.mtm;*.669;*.ult;*.wow;*.far;*.mdl;*.okt;*.dmf;*.ptm;*.med;*.ams;*.dbm;*.dsm;*.umx;*.amf;*.psm;*.mt2;*.gdm|"
"Wave Files (*.wav)|*.wav|"
"Midi Files (*.mid,*.rmi)|*.mid;*.rmi;*.smf|"
"All Files (*.*)|*.*||",
Modified: trunk/OpenMPT/mptrack/View_smp.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_smp.cpp 2009-06-29 20:56:43 UTC (rev 278)
+++ trunk/OpenMPT/mptrack/View_smp.cpp 2009-07-01 20:02:20 UTC (rev 279)
@@ -1704,6 +1704,31 @@
p[i] = (i+cutlen < iend) ? p[i+cutlen] : (char)0;
}
len = pins->nLength;
+
+ // adjust loop points (could need some optimization)
+ if(m_dwBeginSel < pins->nLoopStart && m_dwEndSel < pins->nLoopStart)
+ {
+ // cut part is before loop start
+ pins->nLoopStart -= m_dwEndSel - m_dwBeginSel;
+ pins->nLoopEnd -= m_dwEndSel - m_dwBeginSel;
+ }
+ else if(m_dwBeginSel < pins->nLoopStart && m_dwEndSel < pins->nLoopEnd)
+ {
+ // cut part is partly before loop start
+ pins->nLoopStart = m_dwBeginSel;
+ pins->nLoopEnd -= m_dwEndSel - m_dwBeginSel;
+ }
+ else if(m_dwBeginSel > pins->nLoopStart && m_dwEndSel < pins->nLoopEnd)
+ {
+ // cut part is in the loop
+ pins->nLoopEnd -= m_dwEndSel - m_dwBeginSel;
+ }
+ else if(m_dwBeginSel > pins->nLoopStart && m_dwBeginSel < pins->nLoopEnd && m_dwEndSel > pins->nLoopEnd)
+ {
+ // cut part is partly before loop end
+ pins->nLoopEnd = m_dwBeginSel;
+ }
+
if (pins->nLoopEnd > len) pins->nLoopEnd = len;
if (pins->nLoopStart + 4 >= pins->nLoopEnd)
{
Modified: trunk/OpenMPT/soundlib/Load_gdm.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_gdm.cpp 2009-06-29 20:56:43 UTC (rev 278)
+++ trunk/OpenMPT/soundlib/Load_gdm.cpp 2009-07-01 20:02:20 UTC (rev 279)
@@ -29,8 +29,8 @@
UINT16 TrackID; // Composing Tracker ID code (00 = 2GDM)
BYTE TrackMajorVer; // Tracker's major version
BYTE TrackMinorVer; // Tracker's minor version
- BYTE PanMap[32]; // 0-Left to 15-Right, 255-N/U
- BYTE MastVol; // Range: 0...64
+ BYTE PanMap[32]; // 0-Left to 15-Right, 255-N/U
+ BYTE MastVol; // Range: 0...64
BYTE Tempo; // Initial music tempo (6)
BYTE BPM; // Initial music BPM (125)
UINT16 FormOrigin; // Original format ID:
@@ -38,32 +38,32 @@
// (versions of 2GDM prior to v1.15 won't set this correctly)
UINT32 OrdOffset;
- BYTE NOO; // Number of orders in module - 1
+ BYTE NOO; // Number of orders in module - 1
UINT32 PatOffset;
- BYTE NOP; // Number of patterns in module - 1
+ BYTE NOP; // Number of patterns in module - 1
UINT32 SamHeadOffset;
UINT32 SamOffset;
- BYTE NOS; // Number of samples in module - 1
- UINT32 MTOffset; // Offset of song message
+ BYTE NOS; // Number of samples in module - 1
+ UINT32 MTOffset; // Offset of song message
UINT32 MTLength;
- UINT32 SSOffset; // Offset of scrolly script (huh?)
+ UINT32 SSOffset; // Offset of scrolly script (huh?)
UINT16 SSLength;
- UINT32 TGOffset; // Offset of text graphic (huh?)
+ UINT32 TGOffset; // Offset of text graphic (huh?)
UINT16 TGLength;
} GDMHEADER, *PGDMHEADER;
typedef struct _GDMSAMPLEHEADER
{
- CHAR SamName[32];
- CHAR FileName[12];
+ CHAR SamName[32]; // sample's name
+ CHAR FileName[12]; // sample's filename
BYTE EmsHandle; // useless
- UINT32 Length;
- UINT32 LoopBegin;
- UINT32 LoopEnd;
- BYTE Flags;
- UINT16 C4Hertz;
- BYTE Volume;
- BYTE Pan;
+ UINT32 Length; // length in bytes
+ UINT32 LoopBegin; // loop start in samples
+ UINT32 LoopEnd; // loop end in samples
+ BYTE Flags; // misc. flags
+ UINT16 C4Hertz; // frequency
+ BYTE Volume; // default volume
+ BYTE Pan; // default pan
} GDMSAMPLEHEADER, *PGDMSAMPLEHEADER;
BOOL CSoundFile::ReadGDM(const LPCBYTE lpStream, const DWORD dwMemLength)
@@ -90,7 +90,7 @@
return FALSE;
}
- // todo: Is TrackID, TrackMajorVer, TrackMinorVer relevant? The only TrackID should be 0 - 2GDM.exe
+ // interesting question: Is TrackID, TrackMajorVer, TrackMinorVer relevant? The only TrackID should be 0 - 2GDM.exe, so the answer would be no.
// read channel pan map... 0...15 = channel panning, 16 = surround channel, 255 = channel does not exist
m_nChannels = 32;
@@ -121,7 +121,7 @@
// 1-MOD, 2-MTM, 3-S3M, 4-669, 5-FAR, 6-ULT, 7-STM, 8-MED
- switch(pHeader->FormOrigin)
+ switch(LittleEndianW(pHeader->FormOrigin))
{
case 1:
m_nType = MOD_TYPE_MOD;
@@ -152,29 +152,36 @@
return FALSE;
break;
}
+ UINT32 iSampleOffset = LittleEndian(pHeader->SamOffset),
+ iPatternsOffset = LittleEndian(pHeader->PatOffset);
+ const UINT32 iOrdOffset = LittleEndian(pHeader->OrdOffset), iSamHeadOffset = LittleEndian(pHeader->SamHeadOffset),
+ iMTOffset = LittleEndian(pHeader->MTOffset), iMTLength = LittleEndian(pHeader->MTLength),
+ iSSOffset = LittleEndian(pHeader->SSOffset), iSSLength = LittleEndianW(pHeader->SSLength),
+ iTGOffset = LittleEndian(pHeader->TGOffset), iTGLength = LittleEndianW(pHeader->TGLength);
+
+
// check if offsets are valid. we won't read the scrolly text or text graphics, but invalid pointers would probably indicate a broken file...
- if( dwMemLength < pHeader->OrdOffset || dwMemLength - pHeader->OrdOffset < pHeader->NOO
- || dwMemLength < pHeader->PatOffset
- || dwMemLength < pHeader->SamHeadOffset || dwMemLength - pHeader->SamHeadOffset < (pHeader->NOS + 1) * sizeof(GDMSAMPLEHEADER)
- || dwMemLength < pHeader->SamOffset
- || dwMemLength < pHeader->MTOffset || dwMemLength - pHeader->MTOffset < pHeader->MTLength
- || dwMemLength < pHeader->SSOffset || dwMemLength - pHeader->SSOffset < pHeader->SSLength
- || dwMemLength < pHeader->TGOffset || dwMemLength - pHeader->TGOffset < pHeader->TGLength)
+ if( dwMemLength < iOrdOffset || dwMemLength - iOrdOffset < pHeader->NOO
+ || dwMemLength < iPatternsOffset
+ || dwMemLength < iSamHeadOffset || dwMemLength - iSamHeadOffset < (pHeader->NOS + 1) * sizeof(GDMSAMPLEHEADER)
+ || dwMemLength < iSampleOffset
+ || dwMemLength < iMTOffset || dwMemLength - iMTOffset < iMTLength
+ || dwMemLength < iSSOffset || dwMemLength - iSSOffset < iSSLength
+ || dwMemLength < iTGOffset || dwMemLength - iTGOffset < iTGLength)
return FALSE;
// read orders
- Order.ReadAsByte(lpStream + pHeader->OrdOffset, pHeader->NOO + 1, dwMemLength - pHeader->OrdOffset);
+ Order.ReadAsByte(lpStream + iOrdOffset, pHeader->NOO + 1, dwMemLength - iOrdOffset);
// read samples
m_nSamples = pHeader->NOS + 1;
- DWORD iSampleOffset = pHeader->SamOffset;
int iLZWsamples = 0;
for(UINT iSmp = 1; iSmp <= m_nSamples; iSmp++)
{
- const PGDMSAMPLEHEADER pSample = (PGDMSAMPLEHEADER)(lpStream + pHeader->SamHeadOffset + (iSmp - 1) * sizeof(GDMSAMPLEHEADER));
+ const PGDMSAMPLEHEADER pSample = (PGDMSAMPLEHEADER)(lpStream + iSamHeadOffset + (iSmp - 1) * sizeof(GDMSAMPLEHEADER));
// sample header
@@ -182,13 +189,31 @@
SetNullTerminator(m_szNames[iSmp]);
memcpy(Ins[iSmp].name, pSample->FileName, 12);
- Ins[iSmp].nC4Speed = pSample->C4Hertz;
+ Ins[iSmp].nC4Speed = LittleEndianW(pSample->C4Hertz);
Ins[iSmp].nGlobalVol = 256; // not supported in this format
- Ins[iSmp].nLength = min(pSample->Length, MAX_SAMPLE_LENGTH); // in bytes
- Ins[iSmp].nLoopStart = min(pSample->LoopBegin, Ins[iSmp].nLength); // in samples
- Ins[iSmp].nLoopEnd = min(pSample->LoopEnd - 1, Ins[iSmp].nLength); // dito
+ Ins[iSmp].nLength = min(LittleEndian(pSample->Length), MAX_SAMPLE_LENGTH); // in bytes
+ Ins[iSmp].nLoopStart = min(LittleEndian(pSample->LoopBegin), Ins[iSmp].nLength); // in samples
+ Ins[iSmp].nLoopEnd = min(LittleEndian(pSample->LoopEnd) - 1, Ins[iSmp].nLength); // dito
FrequencyToTranspose(&Ins[iSmp]); // set transpose + finetune for mod files
+ // fix transpose + finetune for some rare cases where transpose is not C-5 (e.g. sample 4 in wander2.mod)
+ if(m_nType == MOD_TYPE_MOD)
+ {
+ while(Ins[iSmp].RelativeTone != 0)
+ {
+ if(Ins[iSmp].RelativeTone > 0)
+ {
+ Ins[iSmp].RelativeTone -= 1;
+ Ins[iSmp].nFineTune += 128;
+ }
+ else
+ {
+ Ins[iSmp].RelativeTone += 1;
+ Ins[iSmp].nFineTune -= 128;
+ }
+ }
+ }
+
if(pSample->Flags & 0x01) Ins[iSmp].uFlags |= CHN_LOOP; // loop sample
if(pSample->Flags & 0x04)
@@ -243,23 +268,21 @@
// read sample data
ReadSample(&Ins[iSmp], iSampleFormat, reinterpret_cast<LPCSTR>(lpStream + iSampleOffset), dwMemLength - iSampleOffset);
- iSampleOffset += min(pSample->Length, dwMemLength - iSampleOffset);
+ iSampleOffset += min(LittleEndian(pSample->Length), dwMemLength - iSampleOffset);
}
// read patterns
Patterns.ResizeArray(max(MAX_PATTERNS, pHeader->NOP + 1));
- // position in file
- DWORD iPatternsOffset = pHeader->PatOffset;
-
BOOL bS3MCommandSet = (GetBestSaveFormat() & (MOD_TYPE_S3M | MOD_TYPE_IT | MOD_TYPE_MPT));
+ // we'll start at position iPatternsOffset and decode all patterns
for (PATTERNINDEX iPat = 0; iPat < pHeader->NOP + 1; iPat++)
{
if(iPatternsOffset + 2 > dwMemLength) break;
- UINT16 iPatternLength = *(UINT16 *)(lpStream + iPatternsOffset); // pattern length including the two "length" bytes
+ UINT16 iPatternLength = LittleEndianW(*(UINT16 *)(lpStream + iPatternsOffset)); // pattern length including the two "length" bytes
if(iPatternLength > dwMemLength || iPatternsOffset > dwMemLength - iPatternLength) break;
if(Patterns.Insert(iPat, 64))
@@ -510,13 +533,13 @@
}
// read song comments
- if(pHeader->MTLength)
+ if(iMTLength)
{
- m_lpszSongComments = new char[pHeader->MTLength + 1];
+ m_lpszSongComments = new char[iMTLength + 1];
if (m_lpszSongComments)
{
- memset(m_lpszSongComments, 0, pHeader->MTLength + 1);
- memcpy(m_lpszSongComments, lpStream + pHeader->MTOffset, pHeader->MTLength);
+ memset(m_lpszSongComments, 0, iMTLength + 1);
+ memcpy(m_lpszSongComments, lpStream + iMTOffset, iMTLength);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rel...@us...> - 2009-06-29 20:57:37
|
Revision: 278
http://modplug.svn.sourceforge.net/modplug/?rev=278&view=rev
Author: relabsoluness
Date: 2009-06-29 20:56:43 +0000 (Mon, 29 Jun 2009)
Log Message:
-----------
[Ref] Minor changes (use of note constants, aligned MODCHANNEL, moved command definitions to modcommand.h, simplified CSoundFile::GetNoteName, updated CVstPlugin when building with NO_VST).
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Moddoc.cpp
trunk/OpenMPT/mptrack/Mptrack.cpp
trunk/OpenMPT/mptrack/View_pat.cpp
trunk/OpenMPT/mptrack/Vstplug.cpp
trunk/OpenMPT/mptrack/Vstplug.h
trunk/OpenMPT/soundlib/Mmx_mix.cpp
trunk/OpenMPT/soundlib/Snd_fx.cpp
trunk/OpenMPT/soundlib/Sndfile.cpp
trunk/OpenMPT/soundlib/Sndfile.h
trunk/OpenMPT/soundlib/modcommand.h
Modified: trunk/OpenMPT/mptrack/Moddoc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Moddoc.cpp 2009-06-25 21:53:49 UTC (rev 277)
+++ trunk/OpenMPT/mptrack/Moddoc.cpp 2009-06-29 20:56:43 UTC (rev 278)
@@ -950,7 +950,7 @@
if ((nPlugin) && (nPlugin <= MAX_MIXPLUGINS))
{
IMixPlugin *pPlugin = m_SndFile.m_MixPlugins[nPlugin-1].pMixPlugin;
- if (pPlugin) pPlugin->MidiCommand(penv->nMidiChannel, penv->nMidiProgram, penv->wMidiBank, note+0xFF, 0, MAX_BASECHANNELS);
+ if (pPlugin) pPlugin->MidiCommand(penv->nMidiChannel, penv->nMidiProgram, penv->wMidiBank, note+NOTE_KEYOFF, 0, MAX_BASECHANNELS);
}
}
@@ -1017,7 +1017,7 @@
CVstPlugin *pPlug = (CVstPlugin*)m_SndFile.m_MixPlugins[nPlug-1].pMixPlugin;
INSTRUMENTHEADER* penv = m_SndFile.Chn[nChn].pHeader;
if (pPlug && penv) {
- pPlug->MidiCommand(penv->nMidiChannel, penv->nMidiProgram, penv->wMidiBank, 0xFF, 0, nChn);
+ pPlug->MidiCommand(penv->nMidiChannel, penv->nMidiProgram, penv->wMidiBank, NOTE_KEYOFF, 0, nChn);
}
}
} else {
Modified: trunk/OpenMPT/mptrack/Mptrack.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Mptrack.cpp 2009-06-25 21:53:49 UTC (rev 277)
+++ trunk/OpenMPT/mptrack/Mptrack.cpp 2009-06-29 20:56:43 UTC (rev 278)
@@ -707,7 +707,7 @@
m_pDocManager = new CModDocManager();
#ifdef _DEBUG
- // ASSERT((sizeof(MODCHANNEL)&7) == 0);
+ ASSERT((sizeof(MODCHANNEL)&7) == 0);
// Disabled by rewbs for smoothVST. Might cause minor perf issues due to increased cache misses?
#endif
Modified: trunk/OpenMPT/mptrack/View_pat.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_pat.cpp 2009-06-25 21:53:49 UTC (rev 277)
+++ trunk/OpenMPT/mptrack/View_pat.cpp 2009-06-29 20:56:43 UTC (rev 278)
@@ -3879,7 +3879,7 @@
{
ins = m_nSplitInstrument;
if (m_bOctaveLink) note += 12*(m_nOctaveModifier-9);
- if (note > NOTE_MAX && note<254) note = NOTE_MAX;
+ if (note > NOTE_MAX && note < NOTE_NOTECUT) note = NOTE_MAX;
if (note<0) note=1;
}
if (!ins) ins = GetCurrentInstrument();
@@ -4536,7 +4536,7 @@
if(GetCurrentInstrument()) p->instr = GetCurrentInstrument();
if (m_bOctaveLink)
note += 12*(m_nOctaveModifier-9);
- if (note > NOTE_MAX && note<254) note = NOTE_MAX;
+ if (note > NOTE_MAX && note < NOTE_NOTECUT) note = NOTE_MAX;
if (note<0) note=1;
p->note = note;
Modified: trunk/OpenMPT/mptrack/Vstplug.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Vstplug.cpp 2009-06-25 21:53:49 UTC (rev 277)
+++ trunk/OpenMPT/mptrack/Vstplug.cpp 2009-06-29 20:56:43 UTC (rev 278)
@@ -2647,12 +2647,12 @@
// Specific Note Off
- if (note > 0xFF) //rewbs.vstiLive
+ if (note > NOTE_KEYOFF) //rewbs.vstiLive
{
dwMidiCode = 0x80|nCh; //note off, on chan nCh
note--;
- UINT i = note - 0xFF;
+ UINT i = note - NOTE_KEYOFF;
if (pCh->uNoteOnMap[i][trackChannel])
{
pCh->uNoteOnMap[i][trackChannel]--;
@@ -2663,7 +2663,7 @@
// "Hard core" All Sounds Off on this midi and tracker channel
// This one doesn't check the note mask - just one note off per note.
// Also less likely to cause a VST event buffer overflow.
- else if (note == 0xFE) // ^^
+ else if (note == NOTE_NOTECUT) // ^^
{
//MidiSend(0xB0|nCh|(0x79<<8)); // reset all controllers
MidiSend(0xB0|nCh|(0x7b<<8)); // all notes off
Modified: trunk/OpenMPT/mptrack/Vstplug.h
===================================================================
--- trunk/OpenMPT/mptrack/Vstplug.h 2009-06-25 21:53:49 UTC (rev 277)
+++ trunk/OpenMPT/mptrack/Vstplug.h 2009-06-29 20:56:43 UTC (rev 278)
@@ -204,10 +204,10 @@
VOID GetPluginType(LPSTR) {}
long GetNumPrograms() {return 0;}
long GetProgramNameIndexed(long, long, char*) {return 0;}
- VOID SetParameter(UINT, FLOAT) {}
+ VOID SetParameter(PlugParamIndex nIndex, PlugParamValue fValue) {}
VOID GetParamLabel(UINT, LPSTR) {}
VOID GetParamDisplay(UINT, LPSTR) {}
- FLOAT GetParameter(UINT) {return 0;}
+ PlugParamValue GetParameter(PlugParamIndex nIndex) {return 0;}
bool LoadProgram(CString) {return false;}
bool SaveProgram(CString) {return false;}
VOID SetCurrentProgram(UINT) {}
Modified: trunk/OpenMPT/soundlib/Mmx_mix.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Mmx_mix.cpp 2009-06-25 21:53:49 UTC (rev 277)
+++ trunk/OpenMPT/soundlib/Mmx_mix.cpp 2009-06-29 20:56:43 UTC (rev 278)
@@ -161,7 +161,7 @@
{
CHAR s[64];
wsprintf(s, "MODCHANNEL not aligned: sizeof(MODCHANNEL) = %d", sizeof(MODCHANNEL));
- //::MessageBox(NULL, s, NULL, MB_OK|MB_ICONEXCLAMATION); //disabled by rewbs
+ ::MessageBox(NULL, s, NULL, MB_OK|MB_ICONEXCLAMATION); //disabled by rewbs
}
DWORD dwFastSinc = (DWORD)(LPVOID)gFastSinc;
if (dwFastSinc & 7)
Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Snd_fx.cpp 2009-06-25 21:53:49 UTC (rev 277)
+++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2009-06-29 20:56:43 UTC (rev 278)
@@ -939,7 +939,7 @@
//switch off duplicated note played on this plugin
IMixPlugin *pPlugin = m_MixPlugins[pHeader->nMixPlug-1].pMixPlugin;
if (pPlugin && p->nNote)
- pPlugin->MidiCommand(p->pHeader->nMidiChannel, p->pHeader->nMidiProgram, p->pHeader->wMidiBank, p->nNote+0xFF, 0, i);
+ pPlugin->MidiCommand(p->pHeader->nMidiChannel, p->pHeader->nMidiProgram, p->pHeader->wMidiBank, p->nNote+NOTE_KEYOFF, 0, i);
break;
}
}
@@ -1027,7 +1027,7 @@
case NNA_NOTEFADE:
//switch off note played on this plugin, on this tracker channel and midi channel
//pPlugin->MidiCommand(pChn->pHeader->nMidiChannel, pChn->pHeader->nMidiProgram, pChn->nNote+0xFF, 0, n);
- pPlugin->MidiCommand(pChn->pHeader->nMidiChannel, pChn->pHeader->nMidiProgram, pChn->pHeader->wMidiBank, /*pChn->nNote+*/0xFF, 0, nChn);
+ pPlugin->MidiCommand(pChn->pHeader->nMidiChannel, pChn->pHeader->nMidiProgram, pChn->pHeader->wMidiBank, /*pChn->nNote+*/NOTE_KEYOFF, 0, nChn);
break;
}
}
@@ -3030,7 +3030,7 @@
if ((nPlug) && (nPlug <= MAX_MIXPLUGINS)) {
IMixPlugin *pPlug = (IMixPlugin*)m_MixPlugins[nPlug-1].pMixPlugin;
if (pPlug) {
- pPlug->MidiCommand(pHeader->nMidiChannel, pHeader->nMidiProgram, pHeader->wMidiBank, /*pChn->nNote+*/0xFF, 0, nChn);
+ pPlug->MidiCommand(pHeader->nMidiChannel, pHeader->nMidiProgram, pHeader->wMidiBank, /*pChn->nNote+*/NOTE_KEYOFF, 0, nChn);
}
}
}
Modified: trunk/OpenMPT/soundlib/Sndfile.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.cpp 2009-06-25 21:53:49 UTC (rev 277)
+++ trunk/OpenMPT/soundlib/Sndfile.cpp 2009-06-29 20:56:43 UTC (rev 278)
@@ -2876,14 +2876,14 @@
string CSoundFile::GetNoteName(const CTuning::NOTEINDEXTYPE& note, const int inst) const
//----------------------------------------------------------------------------------
{
- if(inst >= MAX_INSTRUMENTS || inst < -1) return "BUG";
+ if(inst >= MAX_INSTRUMENTS || inst < -1 || note < 1 || note > NOTE_MAX) return "BUG";
if(inst == -1)
- return string(szNoteNames[abs(note-1)%12]) + Stringify((note-1)/12);
+ return szDefaultNoteNames[note-1];
if(m_nType == MOD_TYPE_MPT && Headers[inst] && Headers[inst]->pTuning)
return Headers[inst]->pTuning->GetNoteName(note-NOTE_MIDDLEC);
else
- return string(szNoteNames[abs(note-1)%12]) + Stringify((note-1)/12);
+ return szDefaultNoteNames[note-1];
}
Modified: trunk/OpenMPT/soundlib/Sndfile.h
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.h 2009-06-25 21:53:49 UTC (rev 277)
+++ trunk/OpenMPT/soundlib/Sndfile.h 2009-06-29 20:56:43 UTC (rev 278)
@@ -162,44 +162,6 @@
#define ENV_PITCHCARRY 0x2000
#define ENV_MUTE 0x4000
-#define CMD_NONE 0
-#define CMD_ARPEGGIO 1
-#define CMD_PORTAMENTOUP 2
-#define CMD_PORTAMENTODOWN 3
-#define CMD_TONEPORTAMENTO 4
-#define CMD_VIBRATO 5
-#define CMD_TONEPORTAVOL 6
-#define CMD_VIBRATOVOL 7
-#define CMD_TREMOLO 8
-#define CMD_PANNING8 9
-#define CMD_OFFSET 10
-#define CMD_VOLUMESLIDE 11
-#define CMD_POSITIONJUMP 12
-#define CMD_VOLUME 13
-#define CMD_PATTERNBREAK 14
-#define CMD_RETRIG 15
-#define CMD_SPEED 16
-#define CMD_TEMPO 17
-#define CMD_TREMOR 18
-#define CMD_MODCMDEX 19
-#define CMD_S3MCMDEX 20
-#define CMD_CHANNELVOLUME 21
-#define CMD_CHANNELVOLSLIDE 22
-#define CMD_GLOBALVOLUME 23
-#define CMD_GLOBALVOLSLIDE 24
-#define CMD_KEYOFF 25
-#define CMD_FINEVIBRATO 26
-#define CMD_PANBRELLO 27
-#define CMD_XFINEPORTAUPDOWN 28
-#define CMD_PANNINGSLIDE 29
-#define CMD_SETENVPOSITION 30
-#define CMD_MIDI 31
-#define CMD_SMOOTHMIDI 32 //rewbs.smoothVST
-#define CMD_VELOCITY 33 //rewbs.velocity
-// -> CODE#0010
-// -> DESC="add extended parameter mechanism to pattern effects"
-#define CMD_XPARAM 34
-// -! NEW_FEATURE#0010
// Filter Modes
#define FLTMODE_UNCHANGED 0xFF
@@ -207,22 +169,6 @@
#define FLTMODE_HIGHPASS 1
#define FLTMODE_BANDPASS 2
-// Volume Column commands
-#define VOLCMD_VOLUME 1
-#define VOLCMD_PANNING 2
-#define VOLCMD_VOLSLIDEUP 3
-#define VOLCMD_VOLSLIDEDOWN 4
-#define VOLCMD_FINEVOLUP 5
-#define VOLCMD_FINEVOLDOWN 6
-#define VOLCMD_VIBRATOSPEED 7
-#define VOLCMD_VIBRATO 8
-#define VOLCMD_PANSLIDELEFT 9
-#define VOLCMD_PANSLIDERIGHT 10
-#define VOLCMD_TONEPORTAMENTO 11
-#define VOLCMD_PORTAUP 12
-#define VOLCMD_PORTADOWN 13
-#define VOLCMD_VELOCITY 14 //rewbs.velocity
-#define VOLCMD_OFFSET 15 //rewbs.volOff
#define RSF_16BIT 0x04
#define RSF_STEREO 0x08
@@ -544,7 +490,7 @@
// Channel Struct
-typedef struct _MODCHANNEL
+typedef struct __declspec(align(32)) _MODCHANNEL
{
// First 32-bytes: Most used mixing information: don't change it
LPSTR pCurrentSample;
@@ -584,9 +530,9 @@
LONG nVolSwing, nPanSwing;
LONG nCutSwing, nResSwing;
LONG nRestorePanOnNewNote; //If > 0, nPan should be set to nRestorePanOnNewNote - 1 on new note. Used to recover from panswing.
- LONG nRestoreResonanceOnNewNote; //Like above
- LONG nRestoreCutoffOnNewNote; //Like above
// 8-bit members
+ BYTE nRestoreResonanceOnNewNote; //Like above
+ BYTE nRestoreCutoffOnNewNote; //Like above
BYTE nNote, nNNA;
BYTE nNewNote, nNewIns, nCommand, nArpeggio;
BYTE nOldVolumeSlide, nOldFineVolUpDown;
@@ -607,11 +553,11 @@
BYTE nLeftVU, nRightVU;
BYTE nActiveMacro, nFilterMode;
+ uint16 m_RowPlugParam; //NOTE_PCs memory.
float m_nPlugParamValueStep; //rewbs.smoothVST
float m_nPlugInitialParamValue; //rewbs.smoothVST
- long m_RowPlugParam; //NOTE_PCs memory.
PLUGINDEX m_RowPlug; //NOTE_PCs memory.
-
+
void ClearRowCmd() {nRowNote = 0; nRowInstr = 0; nRowVolCmd = 0; nRowVolume = 0; nRowCommand = 0; nRowParam = 0;}
typedef UINT VOLUME;
Modified: trunk/OpenMPT/soundlib/modcommand.h
===================================================================
--- trunk/OpenMPT/soundlib/modcommand.h 2009-06-25 21:53:49 UTC (rev 277)
+++ trunk/OpenMPT/soundlib/modcommand.h 2009-06-29 20:56:43 UTC (rev 278)
@@ -69,4 +69,60 @@
#define NOTE_MIN_SPECIAL NOTE_PCS
+// Volume Column commands
+#define VOLCMD_VOLUME 1
+#define VOLCMD_PANNING 2
+#define VOLCMD_VOLSLIDEUP 3
+#define VOLCMD_VOLSLIDEDOWN 4
+#define VOLCMD_FINEVOLUP 5
+#define VOLCMD_FINEVOLDOWN 6
+#define VOLCMD_VIBRATOSPEED 7
+#define VOLCMD_VIBRATO 8
+#define VOLCMD_PANSLIDELEFT 9
+#define VOLCMD_PANSLIDERIGHT 10
+#define VOLCMD_TONEPORTAMENTO 11
+#define VOLCMD_PORTAUP 12
+#define VOLCMD_PORTADOWN 13
+#define VOLCMD_VELOCITY 14 //rewbs.velocity
+#define VOLCMD_OFFSET 15 //rewbs.volOff
+
+
+// Effect column commands
+#define CMD_NONE 0
+#define CMD_ARPEGGIO 1
+#define CMD_PORTAMENTOUP 2
+#define CMD_PORTAMENTODOWN 3
+#define CMD_TONEPORTAMENTO 4
+#define CMD_VIBRATO 5
+#define CMD_TONEPORTAVOL 6
+#define CMD_VIBRATOVOL 7
+#define CMD_TREMOLO 8
+#define CMD_PANNING8 9
+#define CMD_OFFSET 10
+#define CMD_VOLUMESLIDE 11
+#define CMD_POSITIONJUMP 12
+#define CMD_VOLUME 13
+#define CMD_PATTERNBREAK 14
+#define CMD_RETRIG 15
+#define CMD_SPEED 16
+#define CMD_TEMPO 17
+#define CMD_TREMOR 18
+#define CMD_MODCMDEX 19
+#define CMD_S3MCMDEX 20
+#define CMD_CHANNELVOLUME 21
+#define CMD_CHANNELVOLSLIDE 22
+#define CMD_GLOBALVOLUME 23
+#define CMD_GLOBALVOLSLIDE 24
+#define CMD_KEYOFF 25
+#define CMD_FINEVIBRATO 26
+#define CMD_PANBRELLO 27
+#define CMD_XFINEPORTAUPDOWN 28
+#define CMD_PANNINGSLIDE 29
+#define CMD_SETENVPOSITION 30
+#define CMD_MIDI 31
+#define CMD_SMOOTHMIDI 32 //rewbs.smoothVST
+#define CMD_VELOCITY 33 //rewbs.velocity
+#define CMD_XPARAM 34 // -> CODE#0010 -> DESC="add extended parameter mechanism to pattern effects" -! NEW_FEATURE#0010
+
+
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rel...@us...> - 2009-06-25 21:53:59
|
Revision: 277
http://modplug.svn.sourceforge.net/modplug/?rev=277&view=rev
Author: relabsoluness
Date: 2009-06-25 21:53:49 +0000 (Thu, 25 Jun 2009)
Log Message:
-----------
(merged from devBranch_1_17_03 with some additional modifications)
[New] Pattern tab: New experimental parameter controls for controlling plug params(only in mptm). Is more or less fully functional except that the commands won't be saved to file. Includes modifications/additions to: keyshortcuts, various GUI components, pattern draw methods, clipboard handling, pattern editing functions, ProcessEffects().
[Mod] Pattern tab: Added some checks to prevent entering notes which are not supported by the module type.
Refactoring
-Find/Replace dialog: Added enums for special items.
-Disabled keyconfig log messages.
-Modification to IMixPlugin for easier parameter control.
-Created new note name arrays and functions for populating comboboxes with note names.
-Removed constructor from modcommand and instrumentheader.
-ProcessMidiOut() now takes modcommand data from modchannel.
-Various smaller changes (removed compiler warning etc.)
Modified Paths:
--------------
trunk/OpenMPT/mptrack/CommandSet.cpp
trunk/OpenMPT/mptrack/CommandSet.h
trunk/OpenMPT/mptrack/Ctrl_ins.cpp
trunk/OpenMPT/mptrack/Ctrl_pat.cpp
trunk/OpenMPT/mptrack/Draw_pat.cpp
trunk/OpenMPT/mptrack/Moddoc.cpp
trunk/OpenMPT/mptrack/Modedit.cpp
trunk/OpenMPT/mptrack/Mptrack.cpp
trunk/OpenMPT/mptrack/Mptrack.h
trunk/OpenMPT/mptrack/View_pat.cpp
trunk/OpenMPT/mptrack/View_pat.h
trunk/OpenMPT/mptrack/View_tre.cpp
trunk/OpenMPT/mptrack/Vstplug.cpp
trunk/OpenMPT/mptrack/Vstplug.h
trunk/OpenMPT/mptrack/dlg_misc.cpp
trunk/OpenMPT/mptrack/dlg_misc.h
trunk/OpenMPT/mptrack/mod2midi.cpp
trunk/OpenMPT/mptrack/mptrack.vcproj
trunk/OpenMPT/mptrack/res/view_pat.bmp
trunk/OpenMPT/mptrack/test/test.cpp
trunk/OpenMPT/mptrack/test/test.h
trunk/OpenMPT/mptrack/typedefs.h
trunk/OpenMPT/soundlib/LOAD_DMF.CPP
trunk/OpenMPT/soundlib/Load_it.cpp
trunk/OpenMPT/soundlib/Load_mid.cpp
trunk/OpenMPT/soundlib/OrderToPatternTable.cpp
trunk/OpenMPT/soundlib/Snd_fx.cpp
trunk/OpenMPT/soundlib/Sndfile.cpp
trunk/OpenMPT/soundlib/Sndfile.h
trunk/OpenMPT/soundlib/Sndmix.cpp
trunk/OpenMPT/soundlib/mod_specifications.h
trunk/OpenMPT/soundlib/modcommand.h
Added Paths:
-----------
trunk/OpenMPT/soundlib/mod_specifications.cpp
Modified: trunk/OpenMPT/mptrack/CommandSet.cpp
===================================================================
--- trunk/OpenMPT/mptrack/CommandSet.cpp 2009-06-24 19:39:33 UTC (rev 276)
+++ trunk/OpenMPT/mptrack/CommandSet.cpp 2009-06-25 21:53:49 UTC (rev 277)
@@ -5,6 +5,15 @@
#include <stdio.h>
#include <stdlib.h>
+#define ENABLE_LOGGING 0
+
+#if(ENABLE_LOGGING)
+ //
+#else
+ #define Log
+#endif
+
+
bool CCommandSet::s_bShowErrorOnUnknownKeybinding = true;
CCommandSet::CCommandSet(void)
@@ -2309,6 +2318,16 @@
commands[kcSwitchEchoPaste].isHidden = false;
commands[kcSwitchEchoPaste].isDummy = false;
+ commands[kcNotePC].UID = 1788;
+ commands[kcNotePC].isHidden = false;
+ commands[kcNotePC].isDummy = false;
+ commands[kcNotePC].Message = "Parameter control(MPTm only)";
+
+ commands[kcNotePCS].UID = 1789;
+ commands[kcNotePCS].isHidden = false;
+ commands[kcNotePCS].isDummy = false;
+ commands[kcNotePCS].Message = "Parameter control(smooth)(MPTm only)";
+
#ifdef _DEBUG
for (int i=0; i<kcNumCommands; i++) {
if (commands[i].UID != 0) { // ignore unset UIDs
@@ -2438,7 +2457,7 @@
{
//World's biggest, most confusing method. :)
//Needs refactoring. Maybe make lots of Rule subclasses, each with their own Enforce() method?
- bool removing = !adding; //for attempt to salvage readability..
+ //bool removing = !adding; //for attempt to salvage readability..
KeyCombination curKc; // for looping through key combinations
KeyCombination newKc; // for adding new key combinations
CString report="";
@@ -2544,7 +2563,7 @@
{
KeyCombination newKcDeSel;
bool ruleApplies=true;
- CommandID cmdOff;
+ CommandID cmdOff = kcNull;
switch (inCmd)
{
@@ -2942,7 +2961,7 @@
if (IsDummyCommand((CommandID)cmd))
continue;
- for (UINT k=0; k<commands[cmd].kcList.GetSize(); k++)
+ for (INT_PTR k=0; k<commands[cmd].kcList.GetSize(); k++)
{
contexts.RemoveAll();
eventTypes.RemoveAll();
@@ -2969,7 +2988,7 @@
contexts.Add(curKc.ctx);
}
- long label = 0;
+ //long label = 0;
for (int cx=0; cx<contexts.GetSize(); cx++) {
for (int ke=0; ke<eventTypes.GetSize(); ke++) {
km[contexts[cx]][curKc.mod][curKc.code][eventTypes[ke]] = (CommandID)cmd;
@@ -2992,7 +3011,7 @@
BYTE ctxCode = (BYTE)ctx;
BYTE modCode = (BYTE)mod;
BYTE codeCode = (BYTE)code;
- BYTE keCode = (BYTE)ke;
+ //BYTE keCode = (BYTE)ke;
DWORD label = ctxCode | (modCode<<8) | (codeCode<<16) | (ke<<24);
@@ -3187,7 +3206,7 @@
{
for (int i=0; i<kcNumCommands; i++)
{
- if (commands[i].UID == uid)
+ if (commands[i].UID == static_cast<UINT>(uid))
return i;
}
@@ -3270,7 +3289,7 @@
CString CCommandSet::GetKeyTextFromCommand(CommandID c, UINT key)
{
- if (key < commands[c].kcList.GetSize())
+ if ( static_cast<INT_PTR>(key) < commands[c].kcList.GetSize())
return GetKeyText(commands[c].kcList[0].mod, commands[c].kcList[0].code);
else
return "";
@@ -3396,6 +3415,7 @@
void CCommandSet::GetParentContexts(InputTargetContext child, CArray<InputTargetContext, InputTargetContext> parentList)
{
+ UNREFERENCED_PARAMETER(child);
//parentList.RemoveAll();
//for (InputTargetContext parent; parent<kCtxMaxInputContexts; parent++) {
@@ -3407,6 +3427,7 @@
void CCommandSet::GetChildContexts(InputTargetContext parent, CArray<InputTargetContext, InputTargetContext> childList)
{
+ UNREFERENCED_PARAMETER(parent);
//childList.RemoveAll();
//for (InputTargetContext child; child<kCtxMaxInputContexts; child++) {
Modified: trunk/OpenMPT/mptrack/CommandSet.h
===================================================================
--- trunk/OpenMPT/mptrack/CommandSet.h 2009-06-24 19:39:33 UTC (rev 276)
+++ trunk/OpenMPT/mptrack/CommandSet.h 2009-06-25 21:53:49 UTC (rev 277)
@@ -433,7 +433,9 @@
kcNoteOff,
kcNoteCutOld,
kcNoteOffOld,
- kcEndNoteMisc=kcNoteOffOld,
+ kcNotePC,
+ kcNotePCS,
+ kcEndNoteMisc=kcNotePCS,
//Set instruments
Modified: trunk/OpenMPT/mptrack/Ctrl_ins.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Ctrl_ins.cpp 2009-06-24 19:39:33 UTC (rev 276)
+++ trunk/OpenMPT/mptrack/Ctrl_ins.cpp 2009-06-25 21:53:49 UTC (rev 277)
@@ -822,11 +822,7 @@
// Pitch/Pan Separation
m_SpinPPS.SetRange(-32, +32);
// Pitch/Pan Center
- for (UINT n=0; n<=NOTE_MAX; n++)
- {
- wsprintf(s, "%s%d", szNoteNames[n % 12], n/12);
- m_ComboPPC.SetItemData(m_ComboPPC.AddString(s), n);
- }
+ AppendNotesToControl(m_ComboPPC, 0, NOTE_MAX-1);
// -> CODE#0027
// -> DESC="per-instrument volume ramping setup (refered as attack)"
Modified: trunk/OpenMPT/mptrack/Ctrl_pat.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Ctrl_pat.cpp 2009-06-24 19:39:33 UTC (rev 276)
+++ trunk/OpenMPT/mptrack/Ctrl_pat.cpp 2009-06-25 21:53:49 UTC (rev 277)
@@ -200,11 +200,8 @@
//CHAR s[8];
CHAR s[10];
- for(int i = 0 ; i < NOTE_MAX ; i++){
- wsprintf(s, "%s%d", szNoteNames[i % 12], i/12);
- int n = m_CbnSplitNote.AddString(s);
- m_CbnSplitNote.SetItemData(n, i);
- }
+ AppendNotesToControl(m_CbnSplitNote, 0, NOTE_MAX - 1);
+
m_nSplitInstrument = 0;
m_nSplitNote = 60;
m_CbnSplitNote.SetCurSel(m_nSplitNote);
Modified: trunk/OpenMPT/mptrack/Draw_pat.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Draw_pat.cpp 2009-06-24 19:39:33 UTC (rev 276)
+++ trunk/OpenMPT/mptrack/Draw_pat.cpp 2009-06-25 21:53:49 UTC (rev 277)
@@ -329,7 +329,15 @@
{
m_Dib.TextBlt(x, y, dx, COLUMN_HEIGHT, xsrc, ysrc + 14*COLUMN_HEIGHT);
} else
+ if(note >= NOTE_PC)
{
+ m_Dib.TextBlt(x, y, dx, COLUMN_HEIGHT, xsrc, ysrc + 15*COLUMN_HEIGHT);
+ } else
+ if(note >= NOTE_PCS)
+ {
+ m_Dib.TextBlt(x, y, dx, COLUMN_HEIGHT, xsrc, ysrc + 16*COLUMN_HEIGHT);
+ } else
+ {
if(pTuning)
{ // Drawing custom note names
string noteStr = pTuning->GetNoteName(note-NOTE_MIDDLEC);
@@ -387,24 +395,40 @@
}
-void CViewPattern::DrawVolumeCommand(int x, int y, UINT volcmd, UINT vol)
-//-----------------------------------------------------------------------
+void CViewPattern::DrawVolumeCommand(int x, int y, const MODCOMMAND mc)
+//---------------------------------------------------------------------
{
PCPATTERNFONT pfnt = GetCurrentPatternFont();
- if (volcmd)
- {
- volcmd &= 0x0F;
- vol &= 0x7F;
- m_Dib.TextBlt(x, y, pfnt->nVolCmdWidth, COLUMN_HEIGHT,
- pfnt->nVolX, pfnt->nVolY+volcmd*COLUMN_HEIGHT);
+
+ if(mc.note == NOTE_PCS || mc.note == NOTE_PC)
+ { //If note is parameter control note, drawing volume command differently.
+ const int val = min(MODCOMMAND::maxColumnValue, mc.GetValueVolCol());
+
+ m_Dib.TextBlt(x, y, 1, COLUMN_HEIGHT, pfnt->nClrX, pfnt->nClrY);
+ m_Dib.TextBlt(x + 1, y, pfnt->nVolCmdWidth, COLUMN_HEIGHT,
+ pfnt->nNumX, pfnt->nNumY+(val / 100)*COLUMN_HEIGHT);
m_Dib.TextBlt(x+pfnt->nVolCmdWidth, y, pfnt->nVolHiWidth, COLUMN_HEIGHT,
- pfnt->nNumX, pfnt->nNumY+(vol / 10)*COLUMN_HEIGHT);
+ pfnt->nNumX, pfnt->nNumY+((val / 10)%10)*COLUMN_HEIGHT);
m_Dib.TextBlt(x+pfnt->nVolCmdWidth+pfnt->nVolHiWidth, y, pfnt->nEltWidths[2]-(pfnt->nVolCmdWidth+pfnt->nVolHiWidth), COLUMN_HEIGHT,
- pfnt->nNumX, pfnt->nNumY+(vol % 10)*COLUMN_HEIGHT);
- } else
+ pfnt->nNumX, pfnt->nNumY+(val % 10)*COLUMN_HEIGHT);
+ }
+ else
{
- int srcx = pfnt->nEltWidths[0] + pfnt->nEltWidths[1];
- m_Dib.TextBlt(x, y, pfnt->nEltWidths[2], COLUMN_HEIGHT, pfnt->nClrX+srcx, pfnt->nClrY);
+ if (mc.volcmd)
+ {
+ const int volcmd = (mc.volcmd & 0x0F);
+ const int vol = (mc.vol & 0x7F);
+ m_Dib.TextBlt(x, y, pfnt->nVolCmdWidth, COLUMN_HEIGHT,
+ pfnt->nVolX, pfnt->nVolY+volcmd*COLUMN_HEIGHT);
+ m_Dib.TextBlt(x+pfnt->nVolCmdWidth, y, pfnt->nVolHiWidth, COLUMN_HEIGHT,
+ pfnt->nNumX, pfnt->nNumY+(vol / 10)*COLUMN_HEIGHT);
+ m_Dib.TextBlt(x+pfnt->nVolCmdWidth+pfnt->nVolHiWidth, y, pfnt->nEltWidths[2]-(pfnt->nVolCmdWidth+pfnt->nVolHiWidth), COLUMN_HEIGHT,
+ pfnt->nNumX, pfnt->nNumY+(vol % 10)*COLUMN_HEIGHT);
+ } else
+ {
+ int srcx = pfnt->nEltWidths[0] + pfnt->nEltWidths[1];
+ m_Dib.TextBlt(x, y, pfnt->nEltWidths[2], COLUMN_HEIGHT, pfnt->nClrX+srcx, pfnt->nClrY);
+ }
}
}
@@ -780,8 +804,19 @@
MODCOMMAND *mold = m - ncols;
if (m->note == mold->note) dwSpeedUpMask |= 0x01;
if ((m->instr == mold->instr) || (m_nDetailLevel < 1)) dwSpeedUpMask |= 0x02;
- if (((m->volcmd == mold->volcmd) && ((!m->volcmd) || (m->vol == mold->vol))) || (m_nDetailLevel < 2)) dwSpeedUpMask |= 0x04;
- if ((m->command == mold->command) || (m_nDetailLevel < 3)) dwSpeedUpMask |= (m->command) ? 0x08 : 0x18;
+ if ( m->note == NOTE_PCS || m->note == NOTE_PC || mold->note == NOTE_PCS || mold->note == NOTE_PC )
+ { // Handle speedup mask for PC notes.
+ if(m->note == mold->note)
+ {
+ if(m->GetValueVolCol() == mold->GetValueVolCol() || (m_nDetailLevel < 2)) dwSpeedUpMask |= 0x04;
+ if(m->GetValueEffectCol() == mold->GetValueEffectCol() || (m_nDetailLevel < 3)) dwSpeedUpMask |= 0x18;
+ }
+ }
+ else
+ {
+ if (((m->volcmd == mold->volcmd) && ((!m->volcmd) || (m->vol == mold->vol))) || (m_nDetailLevel < 2)) dwSpeedUpMask |= 0x04;
+ if ((m->command == mold->command) || (m_nDetailLevel < 3)) dwSpeedUpMask |= (m->command) ? 0x08 : 0x18;
+ }
if (dwSpeedUpMask == 0x1F) goto DoBlit;
}
bColSel[col] |= 0x40;
@@ -857,7 +892,7 @@
tx_col = MODCOLOR_TEXTSELECTED;
bk_col = MODCOLOR_BACKSELECTED;
} else
- if ((m->volcmd) && (CMainFrame::m_dwPatternSetup & PATTERN_EFFECTHILIGHT))
+ if (m->note != NOTE_PCS && m->note != NOTE_PC && (m->volcmd) && (CMainFrame::m_dwPatternSetup & PATTERN_EFFECTHILIGHT))
{
switch(m->volcmd)
{
@@ -886,15 +921,18 @@
}
// Drawing Volume
m_Dib.SetTextColor(tx_col, bk_col);
- DrawVolumeCommand(xbmp+x, 0, m->volcmd, m->vol);
+ DrawVolumeCommand(xbmp+x, 0, *m);
}
x += pfnt->nEltWidths[2];
}
// Command & param
if (m_nDetailLevel > 2)
{
+ const bool isPCnote = (m->note == NOTE_PC || m->note == NOTE_PCS);
+ uint16 val = m->GetValueEffectCol();
+ if(val > MODCOMMAND::maxColumnValue) val = MODCOMMAND::maxColumnValue;
fx_col = row_col;
- if ((m->command) && (m->command < MAX_EFFECTS) && (CMainFrame::m_dwPatternSetup & PATTERN_EFFECTHILIGHT))
+ if (!isPCnote && (m->command) && (m->command < MAX_EFFECTS) && (CMainFrame::m_dwPatternSetup & PATTERN_EFFECTHILIGHT))
{
switch(gEffectColors[m->command])
{
@@ -921,17 +959,26 @@
tx_col = MODCOLOR_TEXTSELECTED;
bk_col = MODCOLOR_BACKSELECTED;
}
+
// Drawing Command
m_Dib.SetTextColor(tx_col, bk_col);
- if (m->command)
+ if(isPCnote)
{
- UINT command = m->command & 0x3F;
- int n = (pSndFile->m_nType & (MOD_TYPE_MOD|MOD_TYPE_XM)) ? gszModCommands[command] : gszS3mCommands[command];
- if (n <= ' ') n = '?';
- DrawLetter(xbmp+x, 0, (char)n, pfnt->nEltWidths[3], pfnt->nCmdOfs);
- } else
+ m_Dib.TextBlt(xbmp + x, 0, 2, COLUMN_HEIGHT, pfnt->nClrX+x, pfnt->nClrY);
+ m_Dib.TextBlt(xbmp + x + 2, 0, pfnt->nEltWidths[3], m_szCell.cy, pfnt->nNumX, pfnt->nNumY+(val / 100)*COLUMN_HEIGHT);
+ }
+ else
{
- m_Dib.TextBlt(xbmp+x, 0, pfnt->nEltWidths[3], COLUMN_HEIGHT, pfnt->nClrX+x, pfnt->nClrY);
+ if (m->command)
+ {
+ UINT command = m->command & 0x3F;
+ int n = (pSndFile->m_nType & (MOD_TYPE_MOD|MOD_TYPE_XM)) ? gszModCommands[command] : gszS3mCommands[command];
+ if (n <= ' ') n = '?';
+ DrawLetter(xbmp+x, 0, (char)n, pfnt->nEltWidths[3], pfnt->nCmdOfs);
+ } else
+ {
+ m_Dib.TextBlt(xbmp+x, 0, pfnt->nEltWidths[3], COLUMN_HEIGHT, pfnt->nClrX+x, pfnt->nClrY);
+ }
}
}
x += pfnt->nEltWidths[3];
@@ -945,15 +992,24 @@
tx_col = MODCOLOR_TEXTSELECTED;
bk_col = MODCOLOR_BACKSELECTED;
}
+
// Drawing param
m_Dib.SetTextColor(tx_col, bk_col);
- if (m->command)
+ if(isPCnote)
{
- m_Dib.TextBlt(xbmp+x, 0, pfnt->nParamHiWidth, m_szCell.cy, pfnt->nNumX, pfnt->nNumY+(m->param >> 4)*COLUMN_HEIGHT);
- m_Dib.TextBlt(xbmp+x+pfnt->nParamHiWidth, 0, pfnt->nEltWidths[4]-pfnt->nParamHiWidth, m_szCell.cy, pfnt->nNumX+1, pfnt->nNumY+(m->param & 0x0F)*COLUMN_HEIGHT);
- } else
+ m_Dib.TextBlt(xbmp + x, 0, pfnt->nParamHiWidth, m_szCell.cy, pfnt->nNumX, pfnt->nNumY+((val / 10) % 10)*COLUMN_HEIGHT);
+ m_Dib.TextBlt(xbmp + x + pfnt->nParamHiWidth, 0, pfnt->nEltWidths[4]-pfnt->nParamHiWidth, m_szCell.cy, pfnt->nNumX+1, pfnt->nNumY+(val % 10)*COLUMN_HEIGHT);
+ }
+ else
{
- m_Dib.TextBlt(xbmp+x, 0, pfnt->nEltWidths[4], m_szCell.cy, pfnt->nClrX+x, pfnt->nClrY);
+ if (m->command)
+ {
+ m_Dib.TextBlt(xbmp+x, 0, pfnt->nParamHiWidth, m_szCell.cy, pfnt->nNumX, pfnt->nNumY+(m->param >> 4)*COLUMN_HEIGHT);
+ m_Dib.TextBlt(xbmp+x+pfnt->nParamHiWidth, 0, pfnt->nEltWidths[4]-pfnt->nParamHiWidth, m_szCell.cy, pfnt->nNumX+1, pfnt->nNumY+(m->param & 0x0F)*COLUMN_HEIGHT);
+ } else
+ {
+ m_Dib.TextBlt(xbmp+x, 0, pfnt->nEltWidths[4], m_szCell.cy, pfnt->nClrX+x, pfnt->nClrY);
+ }
}
}
}
@@ -1396,59 +1452,65 @@
pMainFrm->SetUserText(s);
if (::GetFocus() == m_hWnd)
{
- nChn = (m_dwCursor & 0xFFFF) >> 3;
+ nChn = GetChanFromCursor(m_dwCursor);
s[0] = 0;
if ((!(m_dwStatus & (PATSTATUS_KEYDRAGSEL/*|PATSTATUS_MOUSEDRAGSEL*/))) //rewbs.xinfo: update indicator even when dragging
&& (m_dwBeginSel == m_dwEndSel) && (pSndFile->Patterns[m_nPattern])
&& (m_nRow < pSndFile->PatternSize[m_nPattern]) && (nChn < pSndFile->m_nChannels))
{
MODCOMMAND *m = &pSndFile->Patterns[m_nPattern][m_nRow*pSndFile->m_nChannels+nChn];
- switch (m_dwCursor & 7)
+
+ // Ignore update if using PC or PCs notes because instrument, volcol and effect values
+ // have different meaning.
+ if(m->note != NOTE_PC && m->note != NOTE_PCS)
{
- case 1:
- if (m->instr)
+ switch (GetColTypeFromCursor(m_dwCursor))
{
- CHAR sztmp[128] = "";
- if (pSndFile->m_nInstruments)
+ case 1:
+ if (m->instr)
{
- if ((m->instr <= pSndFile->m_nInstruments) && (pSndFile->Headers[m->instr]))
+ CHAR sztmp[128] = "";
+ if (pSndFile->m_nInstruments)
{
- INSTRUMENTHEADER *penv = pSndFile->Headers[m->instr];
- memcpy(sztmp, penv->name, 32);
- sztmp[32] = 0;
- if ((m->note) && (m->note <= NOTE_MAX))
+ if ((m->instr <= pSndFile->m_nInstruments) && (pSndFile->Headers[m->instr]))
{
- UINT nsmp = penv->Keyboard[m->note-1];
- if ((nsmp) && (nsmp <= pSndFile->m_nSamples))
+ INSTRUMENTHEADER *penv = pSndFile->Headers[m->instr];
+ memcpy(sztmp, penv->name, 32);
+ sztmp[32] = 0;
+ if ((m->note) && (m->note <= NOTE_MAX))
{
- CHAR sztmp2[64] = "";
- memcpy(sztmp2, pSndFile->m_szNames[nsmp], 32);
- sztmp2[32] = 0;
- if (sztmp2[0])
+ UINT nsmp = penv->Keyboard[m->note-1];
+ if ((nsmp) && (nsmp <= pSndFile->m_nSamples))
{
- wsprintf(sztmp+strlen(sztmp), " (%d: %s)", nsmp, sztmp2);
+ CHAR sztmp2[64] = "";
+ memcpy(sztmp2, pSndFile->m_szNames[nsmp], 32);
+ sztmp2[32] = 0;
+ if (sztmp2[0])
+ {
+ wsprintf(sztmp+strlen(sztmp), " (%d: %s)", nsmp, sztmp2);
+ }
}
}
}
- }
- } else
- {
- if (m->instr <= pSndFile->m_nSamples)
+ } else
{
- memcpy(sztmp, pSndFile->m_szNames[m->instr], 32);
- sztmp[32] = 0;
+ if (m->instr <= pSndFile->m_nSamples)
+ {
+ memcpy(sztmp, pSndFile->m_szNames[m->instr], 32);
+ sztmp[32] = 0;
+ }
}
+ if (sztmp[0]) wsprintf(s, "%d: %s", m->instr, sztmp);
}
- if (sztmp[0]) wsprintf(s, "%d: %s", m->instr, sztmp);
+ break;
+ case 2:
+ if (!pModDoc->GetVolCmdInfo(pModDoc->GetIndexFromVolCmd(m->volcmd), s)) s[0] = 0;
+ break;
+ case 3:
+ case 4:
+ if (!pModDoc->GetEffectName(s, m->command, m->param, FALSE, nChn)) s[0] = 0;
+ break;
}
- break;
- case 2:
- if (!pModDoc->GetVolCmdInfo(pModDoc->GetIndexFromVolCmd(m->volcmd), s)) s[0] = 0;
- break;
- case 3:
- case 4:
- if (!pModDoc->GetEffectName(s, m->command, m->param, FALSE, nChn)) s[0] = 0;
- break;
}
}
pMainFrm->SetInfoText(s);
Modified: trunk/OpenMPT/mptrack/Moddoc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Moddoc.cpp 2009-06-24 19:39:33 UTC (rev 276)
+++ trunk/OpenMPT/mptrack/Moddoc.cpp 2009-06-25 21:53:49 UTC (rev 277)
@@ -1598,7 +1598,7 @@
pattern = "Fast Tracker Files (*.xm)|*.xm||";
break;*/
case MOD_TYPE_MOD:
- ext = MOD_STD_SPECS.fileExtension;
+ ext = ModSpecs::mod.fileExtension;
pattern = FileFilterMOD;
if( AfxMessageBox(GetStrI18N(TEXT(
"Compared to regular MOD save, compatibility export makes "
@@ -1610,7 +1610,7 @@
return;
break;
case MOD_TYPE_IT:
- ext = IT_STD_SPECS.fileExtension;
+ ext = ModSpecs::it.fileExtension;
pattern = FileFilterIT;
::MessageBox(NULL,"Warning: the exported file will not contain any of MPT's file-format hacks.", "Compatibility export warning.",MB_ICONINFORMATION | MB_OK);
break;
Modified: trunk/OpenMPT/mptrack/Modedit.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Modedit.cpp 2009-06-24 19:39:33 UTC (rev 276)
+++ trunk/OpenMPT/mptrack/Modedit.cpp 2009-06-25 21:53:49 UTC (rev 277)
@@ -20,7 +20,19 @@
#define str_mptm_conversion_warning GetStrI18N(_TEXT("Conversion from mptm to any other moduletype may makes certain features unavailable and is not guaranteed to work properly. Do the conversion anyway?"))
+const size_t Pow10Table[10] = {1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000};
+// Return D'th digit(character) of given value.
+// GetDigit<0>(123) == '3'
+// GetDigit<1>(123) == '2'
+// GetDigit<2>(123) == '1'
+template<BYTE D>
+inline TCHAR GetDigit(const size_t val)
+{
+ return (D > 9) ? '0' : 48 + ((val / Pow10Table[D]) % 10);
+}
+
+
//////////////////////////////////////////////////////////////////////
// Module type conversion
@@ -1578,6 +1590,8 @@
case 0: p[1] = p[2] = p[3] = '.'; break;
case NOTE_KEYOFF: p[1] = p[2] = p[3] = '='; break;
case NOTE_NOTECUT: p[1] = p[2] = p[3] = '^'; break;
+ case NOTE_PC: p[1] = 'P'; p[2] = 'C'; p[3] = ' '; break;
+ case NOTE_PCS: p[1] = 'P'; p[2] = 'C'; p[3] = 'S'; break;
default:
p[1] = szNoteNames[(note-1) % 12][0];
p[2] = szNoteNames[(note-1) % 12][1];
@@ -1605,12 +1619,22 @@
ncursor++;
if ((ncursor >= colmin) && (ncursor <= colmax))
{
- if ((m->volcmd) && (m->volcmd <= MAX_VOLCMDS))
+ if(m->note == NOTE_PC || m->note == NOTE_PCS)
{
- p[6] = gszVolCommands[m->volcmd];
- p[7] = '0' + (m->vol / 10);
- p[8] = '0' + (m->vol % 10);
- } else p[6] = p[7] = p[8] = '.';
+ const uint16 val = m->GetValueVolCol();
+ p[6] = GetDigit<2>(val);
+ p[7] = GetDigit<1>(val);
+ p[8] = GetDigit<0>(val);
+ }
+ else
+ {
+ if ((m->volcmd) && (m->volcmd <= MAX_VOLCMDS))
+ {
+ p[6] = gszVolCommands[m->volcmd];
+ p[7] = '0' + (m->vol / 10);
+ p[8] = '0' + (m->vol % 10);
+ } else p[6] = p[7] = p[8] = '.';
+ }
} else
{
p[6] = p[7] = p[8] = ' ';
@@ -1620,18 +1644,28 @@
if (((ncursor >= colmin) && (ncursor <= colmax))
|| ((ncursor+1 >= colmin) && (ncursor+1 <= colmax)))
{
- if (m->command)
+ if(m->note == NOTE_PC || m->note == NOTE_PCS)
{
- if (m_SndFile.m_nType & (MOD_TYPE_S3M|MOD_TYPE_IT|MOD_TYPE_MPT))
- p[9] = gszS3mCommands[m->command];
- else
- p[9] = gszModCommands[m->command];
- } else p[9] = '.';
- if (m->param)
+ const uint16 val = m->GetValueEffectCol();
+ p[9] = GetDigit<2>(val);
+ p[10] = GetDigit<1>(val);
+ p[11] = GetDigit<0>(val);
+ }
+ else
{
- p[10] = szHexChar[m->param >> 4];
- p[11] = szHexChar[m->param & 0x0F];
- } else p[10] = p[11] = '.';
+ if (m->command)
+ {
+ if (m_SndFile.m_nType & (MOD_TYPE_S3M|MOD_TYPE_IT|MOD_TYPE_MPT))
+ p[9] = gszS3mCommands[m->command];
+ else
+ p[9] = gszModCommands[m->command];
+ } else p[9] = '.';
+ if (m->param)
+ {
+ p[10] = szHexChar[m->param >> 4];
+ p[11] = szHexChar[m->param & 0x0F];
+ } else p[10] = p[11] = '.';
+ }
} else
{
p[9] = p[10] = p[11] = ' ';
@@ -1723,6 +1757,13 @@
m[col].note = 0;
if (s[0] == '=') m[col].note = NOTE_KEYOFF; else
if (s[0] == '^') m[col].note = NOTE_NOTECUT; else
+ if (s[0] == 'P')
+ {
+ if(s[2] == 'S')
+ m[col].note = NOTE_PCS;
+ else
+ m[col].note = NOTE_PC;
+ } else
if (s[0] != '.')
{
for (UINT i=0; i<12; i++)
@@ -1750,68 +1791,92 @@
{
if (s[5] != '.')
{
- m[col].volcmd = 0;
- for (UINT i=1; i<MAX_VOLCMDS; i++)
+ if(m[col].note == NOTE_PCS || m[col].note == NOTE_PC)
{
- if (s[5] == gszVolCommands[i])
+ char val[4];
+ memcpy(val, s+5, 3);
+ val[3] = 0;
+ m[col].SetValueVolCol(ConvertStrTo<uint16>(val));
+ }
+ else
+ {
+ m[col].volcmd = 0;
+ for (UINT i=1; i<MAX_VOLCMDS; i++)
{
- m[col].volcmd = i;
- break;
+ if (s[5] == gszVolCommands[i])
+ {
+ m[col].volcmd = i;
+ break;
+ }
}
+ m[col].vol = (s[6]-'0')*10 + (s[7]-'0');
}
- m[col].vol = (s[6]-'0')*10 + (s[7]-'0');
} else m[col].volcmd = m[col].vol = 0;
}
- if (s[8] > ' ' && (!mix || ((!ITStyleMix && origModCmd.command==0) ||
- (ITStyleMix && origModCmd.command==0 && origModCmd.param==0))))
+
+ if(m[col].note == NOTE_PCS || m[col].note == NOTE_PC)
{
- m[col].command = 0;
- if (s[8] != '.')
+ if(s[8] != '.')
{
- LPCSTR psc = (bS3M) ? gszS3mCommands : gszModCommands;
- for (UINT i=1; i<MAX_EFFECTS; i++)
- {
- if ((s[8] == psc[i]) && (psc[i] != '?')) m[col].command = i;
- }
+ char val[4];
+ memcpy(val, s+8, 3);
+ val[3] = 0;
+ m[col].SetValueEffectCol(ConvertStrTo<uint16>(val));
}
}
- // Effect value
- if (s[9] > ' ' && (!mix || ((!ITStyleMix && origModCmd.param==0) ||
- (ITStyleMix && origModCmd.command==0 && origModCmd.param==0))))
+ else
{
- m[col].param = 0;
- if (s[9] != '.')
+ if (s[8] > ' ' && (!mix || ((!ITStyleMix && origModCmd.command==0) ||
+ (ITStyleMix && origModCmd.command==0 && origModCmd.param==0))))
{
- for (UINT i=0; i<16; i++)
+ m[col].command = 0;
+ if (s[8] != '.')
{
- if (s[9] == szHexChar[i]) m[col].param |= (i<<4);
- if (s[10] == szHexChar[i]) m[col].param |= i;
+ LPCSTR psc = (bS3M) ? gszS3mCommands : gszModCommands;
+ for (UINT i=1; i<MAX_EFFECTS; i++)
+ {
+ if ((s[8] == psc[i]) && (psc[i] != '?')) m[col].command = i;
+ }
}
}
- }
- // Checking command
- if (m_SndFile.m_nType & (MOD_TYPE_MOD|MOD_TYPE_XM))
- {
- switch (m[col].command)
+ // Effect value
+ if (s[9] > ' ' && (!mix || ((!ITStyleMix && origModCmd.param==0) ||
+ (ITStyleMix && origModCmd.command==0 && origModCmd.param==0))))
{
- case CMD_SPEED:
- case CMD_TEMPO:
- if (!bS3M) m[col].command = (m[col].param <= spdmax) ? CMD_SPEED : CMD_TEMPO;
- else
+ m[col].param = 0;
+ if (s[9] != '.')
{
- if ((m[col].command == CMD_SPEED) && (m[col].param > spdmax)) m[col].param = CMD_TEMPO; else
- if ((m[col].command == CMD_TEMPO) && (m[col].param <= spdmax)) m[col].param = CMD_SPEED;
+ for (UINT i=0; i<16; i++)
+ {
+ if (s[9] == szHexChar[i]) m[col].param |= (i<<4);
+ if (s[10] == szHexChar[i]) m[col].param |= i;
+ }
}
- break;
}
- } else
- {
- switch (m[col].command)
+ // Checking command
+ if (m_SndFile.m_nType & (MOD_TYPE_MOD|MOD_TYPE_XM))
{
- case CMD_SPEED:
- case CMD_TEMPO:
- if (!bS3M) m[col].command = (m[col].param <= spdmax) ? CMD_SPEED : CMD_TEMPO;
- break;
+ switch (m[col].command)
+ {
+ case CMD_SPEED:
+ case CMD_TEMPO:
+ if (!bS3M) m[col].command = (m[col].param <= spdmax) ? CMD_SPEED : CMD_TEMPO;
+ else
+ {
+ if ((m[col].command == CMD_SPEED) && (m[col].param > spdmax)) m[col].param = CMD_TEMPO; else
+ if ((m[col].command == CMD_TEMPO) && (m[col].param <= spdmax)) m[col].param = CMD_SPEED;
+ }
+ break;
+ }
+ } else
+ {
+ switch (m[col].command)
+ {
+ case CMD_SPEED:
+ case CMD_TEMPO:
+ if (!bS3M) m[col].command = (m[col].param <= spdmax) ? CMD_SPEED : CMD_TEMPO;
+ break;
+ }
}
}
}
Modified: trunk/OpenMPT/mptrack/Mptrack.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Mptrack.cpp 2009-06-24 19:39:33 UTC (rev 276)
+++ trunk/OpenMPT/mptrack/Mptrack.cpp 2009-06-25 21:53:49 UTC (rev 277)
@@ -192,19 +192,26 @@
/////////////////////////////////////////////////////////////////////////////
// Common Tables
-LPCSTR szNoteNames[12] =
+const LPCSTR szNoteNames[12] =
{
"C-", "C#", "D-", "D#", "E-", "F-",
"F#", "G-", "G#", "A-", "A#", "B-"
};
-LPCSTR szHexChar = "0123456789ABCDEF";
-LPCSTR gszModCommands = " 0123456789ABCDRFFTE???GHK?YXPLZ\\:#"; //rewbs.smoothVST: added last \ (written as \\); rewbs.velocity: added last :
-LPCSTR gszS3mCommands = " JFEGHLKRXODB?CQATI?SMNVW?UY?P?Z\\:#"; //rewbs.smoothVST: added last \ (written as \\); rewbs.velocity: added last :
-LPCSTR gszVolCommands = " vpcdabuhlrgfe:o"; //rewbs.velocity: added last : ; rewbs.volOff added last o
+const LPCTSTR szDefaultNoteNames[NOTE_MAX] = {
+ TEXT("C-0"), TEXT("C#0"), TEXT("D-0"), TEXT("D#0"), TEXT("E-0"), TEXT("F-0"), TEXT("F#0"), TEXT("G-0"), TEXT("G#0"), TEXT("A-0"), TEXT("A#0"), TEXT("B-0"),
+ TEXT("C-1"), TEXT("C#1"), TEXT("D-1"), TEXT("D#1"), TEXT("E-1"), TEXT("F-1"), TEXT("F#1"), TEXT("G-1"), TEXT("G#1"), TEXT("A-1"), TEXT("A#1"), TEXT("B-1"),
+ TEXT("C-2"), TEXT("C#2"), TEXT("D-2"), TEXT("D#2"), TEXT("E-2"), TEXT("F-2"), TEXT("F#2"), TEXT("G-2"), TEXT("G#2"), TEXT("A-2"), TEXT("A#2"), TEXT("B-2"),
+ TEXT("C-3"), TEXT("C#3"), TEXT("D-3"), TEXT("D#3"), TEXT("E-3"), TEXT("F-3"), TEXT("F#3"), TEXT("G-3"), TEXT("G#3"), TEXT("A-3"), TEXT("A#3"), TEXT("B-3"),
+ TEXT("C-4"), TEXT("C#4"), TEXT("D-4"), TEXT("D#4"), TEXT("E-4"), TEXT("F-4"), TEXT("F#4"), TEXT("G-4"), TEXT("G#4"), TEXT("A-4"), TEXT("A#4"), TEXT("B-4"),
+ TEXT("C-5"), TEXT("C#5"), TEXT("D-5"), TEXT("D#5"), TEXT("E-5"), TEXT("F-5"), TEXT("F#5"), TEXT("G-5"), TEXT("G#5"), TEXT("A-5"), TEXT("A#5"), TEXT("B-5"),
+ TEXT("C-6"), TEXT("C#6"), TEXT("D-6"), TEXT("D#6"), TEXT("E-6"), TEXT("F-6"), TEXT("F#6"), TEXT("G-6"), TEXT("G#6"), TEXT("A-6"), TEXT("A#6"), TEXT("B-6"),
+ TEXT("C-7"), TEXT("C#7"), TEXT("D-7"), TEXT("D#7"), TEXT("E-7"), TEXT("F-7"), TEXT("F#7"), TEXT("G-7"), TEXT("G#7"), TEXT("A-7"), TEXT("A#7"), TEXT("B-7"),
+ TEXT("C-8"), TEXT("C#8"), TEXT("D-8"), TEXT("D#8"), TEXT("E-8"), TEXT("F-8"), TEXT("F#8"), TEXT("G-8"), TEXT("G#8"), TEXT("A-8"), TEXT("A#8"), TEXT("B-8"),
+ TEXT("C-9"), TEXT("C#9"), TEXT("D-9"), TEXT("D#9"), TEXT("E-9"), TEXT("F-9"), TEXT("F#9"), TEXT("G-9"), TEXT("G#9"), TEXT("A-9"), TEXT("A#9"), TEXT("B-9"),
+};
-
-BYTE gEffectColors[MAX_EFFECTS] =
+const BYTE gEffectColors[MAX_EFFECTS] =
{
0, 0, MODCOLOR_PITCH, MODCOLOR_PITCH,
MODCOLOR_PITCH, MODCOLOR_PITCH, MODCOLOR_VOLUME, MODCOLOR_VOLUME,
@@ -1119,15 +1126,12 @@
void CTrackApp::LoadChords(PMPTCHORD pChords)
//-------------------------------------------
-{
- CHAR snam[32];
-
+{
if (!m_szConfigFileName[0]) return;
for (UINT i=0; i<3*12; i++)
{
LONG chord;
- wsprintf(snam, "%s%d", szNoteNames[i%12], i/12);
- if ((chord = GetPrivateProfileInt("Chords", snam, -1, m_szConfigFileName)) >= 0)
+ if ((chord = GetPrivateProfileInt("Chords", szDefaultNoteNames[i], -1, m_szConfigFileName)) >= 0)
{
if ((chord & 0xFFFFFFC0) || (!pChords[i].notes[0]))
{
@@ -1144,14 +1148,13 @@
void CTrackApp::SaveChords(PMPTCHORD pChords)
//-------------------------------------------
{
- CHAR s[64], snam[32];
+ CHAR s[64];
if (!m_szConfigFileName[0]) return;
for (UINT i=0; i<3*12; i++)
{
- wsprintf(snam, "%s%d", szNoteNames[i%12], i/12);
wsprintf(s, "%d", (pChords[i].key) | (pChords[i].notes[0] << 6) | (pChords[i].notes[1] << 12) | (pChords[i].notes[2] << 18));
- if (!WritePrivateProfileString("Chords", snam, s, m_szConfigFileName)) break;
+ if (!WritePrivateProfileString("Chords", szDefaultNoteNames[i], s, m_szConfigFileName)) break;
}
}
Modified: trunk/OpenMPT/mptrack/Mptrack.h
===================================================================
--- trunk/OpenMPT/mptrack/Mptrack.h 2009-06-24 19:39:33 UTC (rev 276)
+++ trunk/OpenMPT/mptrack/Mptrack.h 2009-06-25 21:53:49 UTC (rev 277)
@@ -379,27 +379,48 @@
void Log(LPCSTR format,...);
UINT MsgBox(UINT nStringID, CWnd *p=NULL, LPCSTR lpszTitle=NULL, UINT n=MB_OK);
void ErrorBox(UINT nStringID, CWnd*p=NULL);
+
+// Helper function declarations.
void AddPluginNamesToCombobox(CComboBox& CBox, SNDMIXPLUGIN* plugarray, const bool librarynames = false);
void AddPluginParameternamesToCombobox(CComboBox& CBox, SNDMIXPLUGIN& plugarray);
void AddPluginParameternamesToCombobox(CComboBox& CBox, CVstPlugin& plug);
+// Append note names in range [noteStart, noteEnd] to given combobox. Index starts from 0.
+void AppendNotesToControl(CComboBox& combobox, const MODCOMMAND::NOTE noteStart, const MODCOMMAND::NOTE noteEnd);
+
+// Append note names to combobox. If pSndFile != nullprt, appends only notes that are
+// available in the module type. If nInstr is given, instrument specific note names are used instead of
+// default note names.
+void AppendNotesToControlEx(CComboBox& combobox, const CSoundFile* const pSndFile = nullptr, const INSTRUMENTINDEX nInstr = MAX_INSTRUMENTS);
+
+// Returns note name(such as "C-5") of given note. Regular notes are in range [1,MAX_NOTE].
+LPCTSTR GetNoteStr(const MODCOMMAND::NOTE);
+
///////////////////////////////////////////////////
// Tables
#define MAX_EFFECTS 35 //rewbs.smoothVST & rewbs.velocity: increased from 32. Wonder what this will break...
//+1 for eric's multiplier
#define MAX_VOLCMDS 16 //rewbs.voloff & rewbs.velocity: increased from 14
-extern BYTE gEffectColors[MAX_EFFECTS];
-extern LPCSTR szNoteNames[12];
-extern LPCSTR szHexChar;
-extern LPCSTR gszModCommands;
-extern LPCSTR gszS3mCommands;
-extern LPCSTR gszVolCommands;
+extern const BYTE gEffectColors[MAX_EFFECTS];
+extern const LPCSTR szNoteNames[12];
+extern const LPCTSTR szDefaultNoteNames[NOTE_MAX];
+const LPCTSTR szSpecialNoteNames[NOTE_MAX_SPECIAL-NOTE_MIN_SPECIAL + 1] = {TEXT("PCs"), TEXT("PC"), TEXT("^^"), TEXT("==")};
+const LPCTSTR szSpecialNoteShortDesc[NOTE_MAX_SPECIAL-NOTE_MIN_SPECIAL + 1] = {TEXT("Param control(smooth)"), TEXT("Param control"), TEXT("Note Cut"), TEXT("Note Off")};
+// Make sure that special note arrays include string for every note.
+STATIC_ASSERT(NOTE_MAX_SPECIAL - NOTE_MIN_SPECIAL + 1 == ARRAYELEMCOUNT(szSpecialNoteNames));
+STATIC_ASSERT(ARRAYELEMCOUNT(szSpecialNoteShortDesc) == ARRAYELEMCOUNT(szSpecialNoteNames));
+
+const LPCSTR szHexChar = "0123456789ABCDEF";
+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
+
// Defined in load_mid.cpp
-extern LPCSTR szMidiProgramNames[128];
-extern LPCSTR szMidiPercussionNames[61]; // notes 25..85
-extern LPCSTR szMidiGroupNames[17]; // 16 groups + Percussions
+extern const LPCSTR szMidiProgramNames[128];
+extern const LPCSTR szMidiPercussionNames[61]; // notes 25..85
+extern const LPCSTR szMidiGroupNames[17]; // 16 groups + Percussions
/////////////////////////////////////////////////////////////////////////////
Modified: trunk/OpenMPT/mptrack/View_pat.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_pat.cpp 2009-06-24 19:39:33 UTC (rev 276)
+++ trunk/OpenMPT/mptrack/View_pat.cpp 2009-06-25 21:53:49 UTC (rev 277)
@@ -23,9 +23,9 @@
#pragma warning(disable:4244) //"conversion from 'type1' to 'type2', possible loss of data"
-MODCOMMAND CViewPattern::m_cmdOld;
-MODCOMMAND CViewPattern::m_cmdFind;
-MODCOMMAND CViewPattern::m_cmdReplace;
+MODCOMMAND CViewPattern::m_cmdOld = {0,0,0,0,0,0};
+MODCOMMAND CViewPattern::m_cmdFind = {0,0,0,0,0,0};
+MODCOMMAND CViewPattern::m_cmdReplace = {0,0,0,0,0,0};
DWORD CViewPattern::m_dwFindFlags = 0;
DWORD CViewPattern::m_dwReplaceFlags = 0;
UINT CViewPattern::m_nFindMinChn = 0;
@@ -837,7 +837,7 @@
{
UINT chn = i >> 3;
MODCOMMAND *blank= &p[row * pSndFile->m_nChannels + chn];
- *blank = MODCOMMAND();
+ *blank = MODCOMMAND::Empty();
}
}
m_dwBeginSel = startSel;
@@ -874,6 +874,7 @@
PrepareUndo(m_dwBeginSel, m_dwEndSel);
DWORD tmp = m_dwEndSel;
+ bool invalidateAllCols = false;
for (UINT row=(m_dwBeginSel >> 16); row<=(m_dwEndSel >> 16); row++) { // for all selected rows
for (UINT i=(m_dwBeginSel & 0xFFFF); i<=(m_dwEndSel & 0xFFFF); i++) if ((i & 7) < 5) { // for all selected cols
@@ -884,8 +885,17 @@
switch(i & 7) {
case 0: // Clear note
if (rm.note) {
- m->note = 0;
- if (ITStyle) m->instr = 0;
+ if(m->note == NOTE_PCS || m->note == NOTE_PC)
+ { // Clear whole row if clearing PC note
+ m->Clear();
+ invalidateAllCols = true;
+ }
+ else
+ {
+ m->note = 0;
+ if (ITStyle) m->instr = 0;
+ }
+
}
break;
case 1: // Clear instrument
@@ -913,7 +923,17 @@
} //end selected columns
} //end selected rows
- if ((tmp & 7) == 3) tmp++;
+ // If selection ends on effect command column, extent invalidation area to
+ // effect param column as well.
+ if ((tmp & 7) == EFFECT_COLUMN)
+ tmp++;
+
+ // If invalidation on all columns is wanted, extent invalidation area.
+ if(invalidateAllCols)
+ tmp += LAST_COLUMN - (tmp % 8);
+
+ ASSERT(tmp % 8 <= LAST_COLUMN);
+
InvalidateArea(m_dwBeginSel, tmp);
pModDoc->SetModified();
pModDoc->UpdateAllViews(this, HINT_PATTERNDATA | (m_nPattern << HINT_SHIFT_PAT), NULL);
@@ -1791,7 +1811,7 @@
UINT ch = n % pSndFile->m_nChannels;
if ((ch < m_nFindMinChn) || (ch > m_nFindMaxChn)) bFound = FALSE;
}
- if (((m_dwFindFlags & PATSEARCH_NOTE) && ((m->note != m_cmdFind.note) && ((m_cmdFind.note != 0xFD) || (!m->note) || (m->note & 0x80))))
+ if (((m_dwFindFlags & PATSEARCH_NOTE) && ((m->note != m_cmdFind.note) && ((m_cmdFind.note != CFindReplaceTab::findAny) || (!m->note) || (m->note & 0x80))))
|| ((m_dwFindFlags & PATSEARCH_INSTR) && (m->instr != m_cmdFind.instr))
|| ((m_dwFindFlags & PATSEARCH_VOLCMD) && (m->volcmd != m_cmdFind.volcmd))
|| ((m_dwFindFlags & PATSEARCH_VOLUME) && (m->vol != m_cmdFind.vol))
@@ -1799,10 +1819,21 @@
|| ((m_dwFindFlags & PATSEARCH_PARAM) && (m->param != m_cmdFind.param)))
{
bFound = FALSE;
- } else
- if (((m_dwFindFlags & (PATSEARCH_COMMAND|PATSEARCH_PARAM)) == PATSEARCH_COMMAND) && (bEffectEx))
+ }
+ else
{
- if ((m->param & 0xF0) != (m_cmdFind.param & 0xF0)) bFound = FALSE;
+ if (((m_dwFindFlags & (PATSEARCH_COMMAND|PATSEARCH_PARAM)) == PATSEARCH_COMMAND) && (bEffectEx))
+ {
+ if ((m->param & 0xF0) != (m_cmdFind.param & 0xF0)) bFound = FALSE;
+ }
+
+ // Ignore modcommands with PC/PCS notes when searching from volume or effect column.
+ if( (m->note == NOTE_PC || m->note == NOTE_PCS)
+ &&
+ m_dwFindFlags & (PATSEARCH_VOLCMD|PATSEARCH_VOLUME|PATSEARCH_COMMAND|PATSEARCH_PARAM))
+ {
+ bFound = FALSE;
+ }
}
// Found!
if (bFound)
@@ -1845,22 +1876,22 @@
if ((m_dwReplaceFlags & PATSEARCH_NOTE))
{
// -1 octave
- if (m_cmdReplace.note == 0xFA)
+ if (m_cmdReplace.note == CFindReplaceTab::replaceMinusOctave)
{
if (m->note > 12) m->note -= 12;
} else
// +1 octave
- if (m_cmdReplace.note == 0xFB)
+ if (m_cmdReplace.note == CFindReplaceTab::replacePlusOctave)
{
- if (m->note <= 108) m->note += 12;
+ if (m->note <= NOTE_MAX - 12) m->note += 12;
} else
// Note--
- if (m_cmdReplace.note == 0xFC)
+ if (m_cmdReplace.note == CFindReplaceTab::replaceMinusOne)
{
if (m->note > 1) m->note--;
} else
// Note++
- if (m_cmdReplace.note == 0xFD)
+ if (m_cmdReplace.note == CFindReplaceTab::replacePlusOne)
{
if (m->note < NOTE_MAX) m->note++;
} else m->note = m_cmdReplace.note;
@@ -1868,12 +1899,12 @@
if ((m_dwReplaceFlags & PATSEARCH_INSTR))
{
// Instr--
- if (m_cmdReplace.instr == 0xFC)
+ if (m_cmdReplace.instr == CFindReplaceTab::replaceMinusOne)
{
if (m->instr > 1) m->instr--;
} else
// Instr++
- if (m_cmdReplace.instr == 0xFD)
+ if (m_cmdReplace.instr == CFindReplaceTab::replacePlusOne)
{
if (m->instr < MAX_INSTRUMENTS-1) m->instr++;
} else m->instr = m_cmdReplace.instr;
@@ -1913,11 +1944,7 @@
{
if (m_dwFindFlags & PATSEARCH_NOTE)
{
- UINT note = m_cmdFind.note;
- if (note == 0) strcpy(szFind, "..."); else
- if (note == 0xFE) strcpy(szFind, "^^ "); else
- if (note == 0xFF) strcpy(szFind, "== "); else
- wsprintf(szFind, "%s%d", szNoteNames[(note-1) % 12], (note-1)/12);
+ wsprintf(szFind, "%s", GetNoteStr(m_cmdFind.note));
} else strcpy(szFind, "???");
strcat(szFind, " ");
if (m_dwFindFlags & PATSEARCH_INSTR)
@@ -2041,7 +2068,6 @@
UINT nCursor = m_dwCursor & 0x07;
CSoundFile *pSndFile = pModDoc->GetSoundFile();
MODCOMMAND *p = pSndFile->Patterns[m_nPattern] + m_nRow*pSndFile->m_nChannels + nChn;
- MODCOMMAND oldcmd = *p;
switch(nCursor)
{
@@ -2173,7 +2199,6 @@
//for all channels where type is selected
for (int chnIdx=0; chnIdx<nValidChans; chnIdx++) {
- MODCOMMAND *pcmd = pSndFile->Patterns[m_nPattern];
UINT nchn = validChans[chnIdx];
UINT row0 = GetSelectionStartRow();
UINT row1 = GetSelectionEndRow();
@@ -2186,27 +2211,50 @@
PrepareUndo(m_dwBeginSel, m_dwEndSel);
}
- int vsrc, vdest, vcmd, verr, distance;
+ bool doPCinterpolation = false;
+
+ int vsrc, vdest, vcmd = 0, verr = 0, distance;
distance = row1 - row0;
+ const MODCOMMAND srcCmd = *pSndFile->Patterns[m_nPattern].GetpModCommand(row0, nchn);
+ const MODCOMMAND destCmd = *pSndFile->Patterns[m_nPattern].GetpModCommand(row1, nchn);
+
+ MODCOMMAND::NOTE PCnote = 0;
+ uint16 PCinst = 0, PCparam = 0;
+
switch(type) {
case NOTE_COLUMN:
- vsrc = pcmd[row0 * pSndFile->m_nChannels + nchn].note;
- vdest = pcmd[row1 * pSndFile->m_nChannels + nchn].note;
- vcmd = pcmd[row0 * pSndFile->m_nChannels + nchn].instr;
- verr = (distance * 59) / 120;
+ vsrc = srcCmd.note;
+ vdest = destCmd.note;
+ vcmd = srcCmd.instr;
+ verr = (distance * 59) / NOTE_MAX;
break;
case VOL_COLUMN:
- vsrc = pcmd[row0 * pSndFile->m_nChannels + nchn].vol;
- vdest = pcmd[row1 * pSndFile->m_nChannels + nchn].vol;
- vcmd = pcmd[row0 * pSndFile->m_nChannels + nchn].volcmd;
+ vsrc = srcCmd.vol;
+ vdest = destCmd.vol;
+ vcmd = srcCmd.volcmd;
verr = (distance * 63) / 128;
break;
case PARAM_COLUMN:
case EFFECT_COLUMN:
- vsrc = pcmd[row0 * pSndFile->m_nChannels + nchn].param;
- vdest = pcmd[row1 * pSndFile->m_nChannels + nchn].param;
- vcmd = pcmd[row0 * pSndFile->m_nChannels + nchn].command;
+ if(srcCmd.note == NOTE_PC || srcCmd.note == NOTE_PCS || destCmd.note == NOTE_PCS || destCmd.note == NOTE_PC)
+ {
+ doPCinterpolation = true;
+ PCnote = (srcCmd.note == NOTE_PC || srcCmd.note == NOTE_PCS) ? srcCmd.note : destCmd.note;
+ vsrc = srcCmd.GetValueEffectCol();
+ vdest = destCmd.GetValueEffectCol();
+ PCparam = srcCmd.GetValueVolCol();
+ if(PCparam == 0) PCparam = destCmd.GetValueVolCol();
+ PCinst = srcCmd.instr;
+ if(PCinst == 0)
+ PCinst = destCmd.instr;
+ }
+ else
+ {
+ vsrc = srcCmd.param;
+ vdest = destCmd.param;
+ vcmd = srcCmd.command;
+ }
verr = (distance * 63) / 128;
break;
default:
@@ -2215,8 +2263,9 @@
}
if (vdest < vsrc) verr = -verr;
- pcmd += row0 * pSndFile->m_nChannels + nchn;
+ MODCOMMAND* pcmd = pSndFile->Patterns[m_nPattern].GetpModCommand(row0, nchn);
+
for (UINT i=0; i<=distance; i++, pcmd += pSndFile->m_nChannels) {
switch(type) {
@@ -2235,11 +2284,24 @@
}
break;
case EFFECT_COLUMN:
- if ((!pcmd->command) || (pcmd->command == vcmd)) {
- int val = vsrc + ((vdest - vsrc) * (int)i + verr) / distance;
- pcmd->param = (BYTE)val;
- pcmd->command = vcmd;
+ if(doPCinterpolation)
+ { // With PC/PCs notes, copy PCs note and plug index to all rows where
+ // effect interpolation is done.
+ const uint16 val = static_cast<uint16>(vsrc + ((vdest - vsrc) * (int)i + verr) / distance);
+ pcmd->note = PCnote;
+ pcmd->instr = PCinst;
+ pcmd->SetValueVolCol(PCparam);
+ pcmd->SetValueEffectCol(val);
}
+ else
+ {
+ if ((!pcmd->command) || (pcmd->command == vcmd))
+ {
+ int val = vsrc + ((vdest - vsrc) * (int)i + verr) / distance;
+ pcmd->param = (BYTE)val;
+ pcmd->command = vcmd;
+ }
+ }
break;
default:
ASSERT(false);
@@ -3487,6 +3549,8 @@
case kcNoteCutOld: TempEnterNote(NOTE_NOTECUT, true); return wParam;
case kcNoteOff: TempEnterNote(NOTE_KEYOFF, false); return wParam;
case kcNoteOffOld: TempEnterNote(NOTE_KEYOFF, true); return wParam;
+ case kcNotePC: TempEnterNote(NOTE_PC); return wParam;
+ case kcNotePCS: TempEnterNote(NOTE_PCS); return wParam;
case kcEditUndo: OnEditUndo(); return wParam;
case kcEditFind: OnEditFind(); return wParam;
@@ -3576,6 +3640,19 @@
return NULL;
}
+#define ENTER_PCNOTE_VALUE(v, method) \
+ { \
+ if((v >= 0) && (v <= 9)) \
+ { \
+ uint16 val = p->Get##method##(); \
+ /* Move existing digits to left, drop out leftmost digit and */ \
+ /* push new digit to the least meaning digit. */ \
+ val = (val % 100) * 10 + v; \
+ if(val > MODCOMMAND::maxColumnValue) val = MODCOMMAND::maxColumnValue; \
+ p->Set##method##(val); \
+ } \
+ }
+
void CViewPattern::TempEnterVol(int v)
//------------------------------------
{
@@ -3586,55 +3663,57 @@
{
CSoundFile *pSndFile = pModDoc->GetSoundFile();
- MODCOMMAND *p = pSndFile->Patterns[m_nPattern], *prowbase;
-
- MODCOMMAND oldcmd; // This is the command we are about to overwrite
+
PrepareUndo(m_dwBeginSel, m_dwEndSel);
- // -- Work out where to put the new data
- UINT nChn = (m_dwCursor & 0xFFFF) >> 3;
- prowbase = p + m_nRow * pSndFile->m_nChannels;
- p = prowbase + nChn;
- oldcmd = *p;
+ MODCOMMAND* p = pSndFile->Patterns[m_nPattern].GetpModCommand(m_nRow, GetChanFromCursor(m_dwCursor));
+ MODCOMMAND oldcmd = *p; // This is the command we are about to overwrite
- UINT volcmd = p->volcmd;
- UINT vol = p->vol;
- if ((v >= 0) && (v <= 9))
+ if(p->note == NOTE_PC || p->note == NOTE_PCS)
{
- vol = ((vol * 10) + v) % 100;
- if (!volcmd) volcmd = VOLCMD_VOLUME;
+ ENTER_PCNOTE_VALUE(v, ValueVolCol);
}
else
- switch(v+kcSetVolumeStart)
+ {
+ UINT volcmd = p->volcmd;
+ UINT vol = p->vol;
+ if ((v >= 0) && (v <= 9))
{
- case kcSetVolumeVol: volcmd = VOLCMD_VOLUME; break;
- case kcSetVolumePan: volcmd = VOLCMD_PANNING; break;
- case kcSetVolumeVolSlideUp: volcmd = VOLCMD_VOLSLIDEUP; break;
- case kcSetVolumeVolSlideDown: volcmd = VOLCMD_VOLSLIDEDOWN; break;
- case kcSetVolumeFineVolUp: volcmd = VOLCMD_FINEVOLUP; break;
- case kcSetVolumeFineVolDown: volcmd = VOLCMD_FINEVOLDOWN; break;
- case kcSetVolumeVibratoSpd: volcmd = VOLCMD_VIBRATOSPEED; break;
- case kcSetVolumeVibrato: volcmd = VOLCMD_VIBRATO; break;
- case kcSetVolumeXMPanLeft: if (pSndFile->m_nType & MOD_TYPE_XM) volcmd = VOLCMD_PANSLIDELEFT; break;
- case kcSetVolumeXMPanRight: if (pSndFile->m_nType & MOD_TYPE_XM) volcmd = VOLCMD_PANSLIDERIGHT; break;
- case kcSetVolumePortamento: volcmd = VOLCMD_TONEPORTAMENTO; break;
- case kcSetVolumeITPortaUp: if (pSndFile->m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT)) volcmd = VOLCMD_PORTAUP; break;
- case kcSetVolumeITPortaDown: if (pSndFile->m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT)) volcmd = VOLCMD_PORTADOWN; break;
- case kcSetVolumeITVelocity: if (pSndFile->m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT)) volcmd = VOLCMD_VELOCITY; break; //rewbs.velocity
- case kcSetVolumeITOffset: if (pSndFile->m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT)) volcmd = VOLCMD_OFFSET; break; //rewbs.volOff
+ vol = ((vol * 10) + v) % 100;
+ if (!volcmd) volcmd = VOLCMD_VOLUME;
}
- if ((pSndFile->m_nType & MOD_TYPE_MOD) && (volcmd > VOLCMD_PANNING)) volcmd = vol = 0;
+ else
+ switch(v+kcSetVolumeStart)
+ {
+ case kcSetVolumeVol: volcmd = VOLCMD_VOLUME; break;
+ case kcSetVolumePan: volcmd = VOLCMD_PANNING; break;
+ case kcSetVolumeVolSlideUp: volcmd = VOLCMD_VOLSLIDEUP; break;
+ case kcSetVolumeVolSlideDown: volcmd = VOLCMD_VOLSLIDEDOWN; break;
+ case kcSetVolumeFineVolUp: volcmd = VOLCMD_FINEVOLUP; break;
+ case kcSetVolumeFineVolDown: volcmd = VOLCMD_FINEVOLDOWN; break;
+ case kcSetVolumeVibratoSpd: volcmd = VOLCMD_VIBRATOSPEED; break;
+ case kcSetVolumeVibrato: volcmd = VOLCMD_VIBRATO; break;
+ case kcSetVolumeXMPanLeft: if (pSndFile->m_nType & MOD_TYPE_XM) volcmd = VOLCMD_PANSLIDELEFT; break;
+ case kcSetVolumeXMPanRight: if (pSndFile->m_nType & MOD_TYPE_XM) volcmd = VOLCMD_PANSLIDERIGHT; break;
+ case kcSetVolumePortamento: volcmd = VOLCMD_TONEPORTAMENTO; break;
+ case kcSetVolumeITPortaUp: if (pSndFile->m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT)) volcmd = VOLCMD_PORTAUP; break;
+ case kcSetVolumeITPortaDown: if (pSndFile->m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT)) volcmd = VOLCMD_PORTADOWN; break;
+ case kcSetVolumeITVelocity: if (pSndFile->m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT)) volcmd = VOLCMD_VELOCITY; break; //rewbs.velocity
+ case kcSetVolumeITOffset: if (pSndFile->m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT)) volcmd = VOLCMD_OFFSET; break; //rewbs.volOff
+ }
+ if ((pSndFile->m_nType & MOD_TYPE_MOD) && (volcmd > VOLCMD_PANNING)) volcmd = vol = 0;
- UINT max = 64;
- if (volcmd > VOLCMD_PANNING)
- {
- max = (pSndFile->m_nType == MOD_TYPE_XM) ? 0x0F : 9;
+ UINT max = 64;
+ if (volcmd > VOLCMD_PANNING)
+ {
+ max = (pSndFile->m_nType == MOD_TYPE_XM) ? 0x0F : 9;
+ }
+
+ if (vol > max) vol %= 10;
+ p->volcmd = volcmd;
+ p->vol = vol;
}
- if (vol > max) vol %= 10;
- p->volcmd = volcmd;
- p->vol = vol;
-
if (IsEditingEnabled_bmsg())
{
DWORD sel = (m_nRow << 16) | m_dwCursor;
@@ -3672,47 +3751,52 @@
CMainFrame *pMainFrm = CMainFrame::GetMainFrame();
CModDoc *pModDoc = GetDocument();
- if ((pModDoc) && (pMainFrm) && (IsEditingEnabled_bmsg()))
+ if(!IsEditingEnabled_bmsg()) return;
+
+ if ((pModDoc) && (pMainFrm))
{
CSoundFile *pSndFile = pModDoc->GetSoundFile();
MODCOMMAND *p = pSndFile->Patterns[m_nPattern].GetpModCommand(m_nRow, GetChanFromCursor(m_dwCursor));
MODCOMMAND oldcmd = *p; // This is the command we are about to overwrite
- //if(p->command != 0 && !overwrite) return true;
-
PrepareUndo(m_dwBeginSel, m_dwEndSel);
- //LPCSTR lpcmd = (pSndFile->m_nType & (MOD_TYPE_MOD|MOD_TYPE_XM)) ? gszModCommands : gszS3mCommands;
- if (c)
+ if(p->note == NOTE_PC || p->note == NOTE_PCS)
{
- if ((c == m_cmdOld.command) && (!p->param) && (!p->command)) p->param = m_cmdOld.param;
- else m_cmdOld.param = 0;
- m_cmdOld.command = c;
+ ENTER_PCNOTE_VALUE(c, ValueEffectCol);
}
- p->command = c;
-
- // Check for MOD/XM Speed/Tempo command
- if ((pSndFile->m_nType & (MOD_TYPE_MOD|MOD_TYPE_XM))
- && ((p->command == CMD_SPEED) || (p->command == CMD_TEMPO)))
+ else
{
- UINT maxspd = (pSndFile->m_nType & MOD_TYPE_XM) ? 0x1F : 0x20;
- p->command = (p->param <= maxspd) ? CMD_SPEED : CMD_TEMPO;
- }
- //if (IsEditingEnabled_bmsg())
- //{
- DWORD sel = (m_nRow << 16) | m_dwCursor;
- SetCurSel(sel, sel);
- sel &= ~7;
- if(oldcmd != *p)
+ //LPCSTR lpcmd = (pSndFile->m_nType & (MOD_TYPE_MOD|MOD_TYPE_XM)) ? gszModCommands : gszS3mCommands;
+ if (c)
{
- pModDoc->SetModified();
- InvalidateArea(sel, sel+5);
- UpdateIndicator();
+ if ((c == m_cmdOld.command) && (!p->param) && (!p->command)) p->param = m_cmdOld.param;
+ else m_cmdOld.param = 0;
+ m_cmdOld.command = c;
}
- //}
- } // end if mainframe & moddoc exist & editing enabled
+ p->command = c;
+
+ // Check for MOD/XM Speed/Tempo command
+ if ((pSndFile->m_nType & (MOD_TYPE_MOD|MOD_TYPE_XM))
+ && ((p->command == CMD_SPEED) || (p->command == CMD_TEMPO)))
+ {
+ UINT maxspd = (pSndFile->m_nType & MOD_TYPE_XM) ? 0x1F : 0x20;
+ p->command = (p->param <= maxspd) ? CMD_SPEED : CMD_TEMPO;
+ }
+ }
+
+ DWORD sel = (m_nRow << 16) | m_dwCursor;
+ SetCurSel(sel, sel);
+ sel &= ~7;
+ if(oldcmd != *p)
+ {
+ pModDoc->SetModified();
+ InvalidateArea(sel, sel+5);
+ UpdateIndicator();
+ }
+ } // end if mainframe & moddoc exist
}
@@ -3725,41 +3809,43 @@
if ((pModDoc) && (pMainFrm) && (IsEditingEnabled_bmsg()))
{
CSoundFile *pSndFile = pModDoc->GetSoundFile();
- MODCOMMAND oldcmd; // This is the command we are about to overwrite
MODCOMMAND *p = pSndFile->Patterns[m_nPattern].GetpModCommand(m_nRow, GetChanFromCursor(m_dwCursor));
- oldcmd = *p;
+ MODCOMMAND oldcmd = *p; // This is the command we are about to overwrite
PrepareUndo(m_dwBeginSel, m_dwEndSel);
- //if(enterAsAbsoluteValue) p->param = v;
- //else p->param = (p->param << 4) | v;
-
- p->param = (p->param << 4) | v;
- if (p->command == m_cmdOld.command) m_cmdOld.param = p->param;
-
-/*
- if (v >= 0 && v <= 9)
+ if(p->note == NOTE_PC || p->note == NOTE_PCS)
{
- p->param = (p->param << 4) | v;
- if (p->command == m_cmdOld.command) m_cmdOld.param = p->param;
+ ENTER_PCNOTE_VALUE(v, ValueEffectCol);
}
- else if (v >= 10 && v <= 15)
+ else
{
- p->param = (p->param << 4) | (v + 0x0A);
+
+ p->param = (p->param << 4) | v;
if (p->command == m_cmdOld.command) m_cmdOld.param = p->param;
+
+ /*
+ if (v >= 0 && v <= 9)
+ {
+ p->param = (p->param << 4) | v;
+ if (p->command == m_cmdOld.command) m_cmdOld.param = p->param;
+ }
+ else if (v >= 10 && v <= 15)
+ {
+ p->param = (p->param << 4) | (v + 0x0A);
+ if (p->command == m_cmdOld.command) m_cmdOld.param = p->param;
+ }
+ */
+ // Check for MOD/XM Speed/Tempo command
+ if ((pSndFile->m_nType & (MOD_TYPE_MOD|MOD_TYPE_XM))
+ && ((p->command == CMD_SPEED) || (p->command == CMD_TEMPO)))
+ {
+ UINT maxspd = (pSndFile->m_nType & MOD_TYPE_XM) ? 0x1F : 0x20;
+ p->command = (p->param <= maxspd) ? CMD_SPEED : CMD_TEMPO;
+ }
}
-*/
- // Check for MOD/XM Speed/Tempo command
- if ((pSndFile->m_nType & (MOD_TYPE_MOD|MOD_TYPE_XM))
- && ((p->command == CMD_SPEED) || (p->command == CMD_TEMPO)))
- {
- UINT maxspd = (pSndFile->m_nType & MOD_TYPE_XM) ? 0x1F : 0x20;
- p->command = (p->param <= maxspd) ? CMD_SPEED : CMD_TEMPO;
- }
- //if (IsEditingEnabled())
- //{
DWORD sel = (m_nRow << 16) | m_dwCursor;
SetCurSel(sel, sel);
sel &= ~7;
@@ -3769,7 +3855,6 @@
InvalidateArea(sel, sel+5);
UpdateIndicator();
}
- //}
}
}
@@ -3971,6 +4056,7 @@
if ((pModDoc) && (pMainFrm))
{
+ ROWINDEX nRow = m_nRow;
CSoundFile *pSndFile = pModDoc->GetSoundFile();
const ROWINDEX nRowPlayback = pSndFile->m_nRow;
const UINT nTick = pSndFile->m_nTickCount;
@@ -3978,15 +4064,32 @@
const bool bRecordEnabled = IsEditingEnabled();
const UINT nChn = GetChanFromCursor(m_dwCursor);
+
+ if(note > pSndFile->GetModSpecifications().noteMax && note < NOTE_MIN_SPECIAL)
+ note = pSndFile->GetModSpecifications().noteMax;
+ else if( note < pSndFile->GetModSpecifications().noteMin)
+ note = pSndFile->GetModSpecifications().noteMin;
+
+ // Check whether the module format supports the note.
+ if( pSndFile->GetModSpecifications().HasNote(note) == false )
+ return;
+
BYTE recordGroup = pModDoc->IsChannelRecord(nChn);
UINT nPlayIns = 0;
-
- if (note > NOTE_MAX && note < 254) note = NOTE_MAX;
-
const bool bIsLiveRecord = IsLiveRecord(*pMainFrm, *pModDoc, *pSndFile);
const bool usePlaybackPosition = (bIsLiveRecord && (CMainFrame::m_dwPatternSetup & PATTERN_AUTODELAY));
+ //Param control 'note'
+ if((note == NOTE_PC || note == NOTE_PCS) && bRecordEnabled)
+ {
+ pModDoc->PrepareUndo(m_nPattern, nChn, nRow, 1, 1);
+ pSndFile->Patterns[m_nPattern].GetpModCommand(nRow, nChn)->note = note;
+ const DWORD sel = (nRow << 16) | m_dwCursor;
+ pModDoc->SetModified();
+ InvalidateArea(sel, sel+5);
+ UpdateIndicator();
+ return;
+ }
- ROWINDEX nRow = m_nRow;
// -- Chord autodetection: step back if we just entered a note
if ((bRecordEnabled) && (recordGroup) && !bIsLiveRecord) {
@@ -4315,16 +4418,12 @@
switch(field)
{
- case 0: p->note = 0; if (ITStyle) p->instr = 0; break; //Note
+ case 0: if(p->note == NOTE_PC || p->note == NOTE_PCS) p->Clear(); else {p->note = 0; if (ITStyle) p->instr = 0;} break; //Note
case 1: p->instr = 0; break; //instr
case 2: p->vol = 0; p->volcmd = 0; break; //Vol
case 3: p->command = 0; break; //Effect
case 4: p->param = 0; break; //Param
- default: p->note = 0; //If not specified, delete them all! :)
- p->instr = 0;
- p->vol = 0; p->volcmd = 0;
- p->command = 0;
- p->param = 0;
+ default: p->Clear(); //If not specified, delete them all! :)
}
if(IsEditingEnabled_bmsg())
@@ -4852,28 +4951,32 @@
bool CViewPattern::IsInterpolationPossible(UINT startRow, UINT endRow,
UINT chan, UINT colType, CSoundFile* pSndFile) {
//---------------------------------------------------------------------------------------
- bool result = false;
- MODCOMMAND *pcmd = pSndFile->Patterns[m_nPattern];
- UINT startRowCmd, endRowCmd;
-
if (startRow == endRow) {
return false;
}
+ bool result = false;
+ const MODCOMMAND startRowMC = *pSndFile->Patterns[m_nPattern].GetpModCommand(startRow, chan);
+ const MODCOMMAND endRowMC = *pSndFile->Patterns[m_nPattern].GetpModCommand(endRow, chan);
+ UINT startRowCmd, endRowCmd;
+
+ if(colType == EFFECT_COLUMN && (startRowMC.note == NOTE_PC || startRowMC.note == NOTE_PCS || endRowMC.note == NOTE_PC || endRowMC.note == NOTE_PCS))
+ return true;
+
switch (colType) {
case NOTE_COLUMN:
- startRowCmd = pcmd[startRow*pSndFile->m_nChannels+chan].note;
- endRowCmd = pcmd[endRow*pSndFile->m_nChannels+chan].note;
+ startRowCmd = startRowMC.note;
+ endRowCmd = endRowMC.note;
result = (startRowCmd>0 && endRowCmd>0);
break;
case EFFECT_COLUMN:
- startRowCmd = pcmd[startRow*pSndFile->m_nChannels+chan].command;
- endRowCmd = pcmd[endRow*pSndFile->m_nChannels+chan].command;
+ startRowCmd = startRowMC.command;
+ endRowCmd = endRowMC.command;
result = (startRowCmd == endRowCmd) && (startRowCmd>0 && endRowCmd>0);
break;
case VOL_COLUMN:
- startRowCmd = pcmd[startRow*pSndFile->m_nChannels+chan].volcmd;
- endRowCmd = pcmd[endRow*pSndFile->m_nChannels+chan].volcmd;
+ startRowCmd = startRowMC.volcmd;
+ endRowCmd = endRowMC.volcmd;
result = (startRowCmd == endRowCmd) && (startRowCmd>0 && endRowCmd>0);
break;
default:
Modified: trunk/OpenMPT/mptrack/View_pat.h
===================================================================
--- trunk/OpenMPT/mptrack/View_pat.h 2009-06-24 19:39:33 UTC (rev 276)
+++ trunk/OpenMPT/mptrack/View_pat.h 2009-06-25 21:53:49 UTC (rev 277)
@@ -36,6 +36,7 @@
VOL_COLUMN,
EFFECT_COLUMN,
PARAM_COLUMN,
+ LAST_COLUMN = PARAM_COLUMN
};
@@ -164,7 +165,7 @@
void DrawLetter(int x, int y, char letter, int sizex=10, int ofsx=0);
void DrawNote(int x, int y, UINT note, CTuning* pTuning = NULL);
void DrawInstrument(int x, int y, UINT instr);
- void DrawVolumeCommand(int x, int y, UINT volcmd, UINT vol);
+ void DrawVolumeCommand(int x, int y, const MODCOMMAND mc);
void DrawChannelVUMeter(HDC hdc, int x, int y, UINT nChn);
void UpdateAllVUMeters(MPTNOTIFICATION *pnotify);
void DrawDragSel(HDC hdc);
Modified: trunk/OpenMPT/mptrack/View_tre.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_tre.cpp 2009-06-24 19:39:33 UTC (rev 276)
+++ trunk/OpenMPT/mptrack/View_tre.cpp 2009-06-25 21:53:49 UTC (rev 277)
@@ -400,8 +400,7 @@
for (UINT iPerc=24; iPerc<=84; iPerc++)
{
DWORD dwI...
[truncated message content] |