|
From: <re...@us...> - 2007-03-13 22:14:26
|
Revision: 174
http://svn.sourceforge.net/modplug/?rev=174&view=rev
Author: rewbs
Date: 2007-03-13 15:14:22 -0700 (Tue, 13 Mar 2007)
Log Message:
-----------
. v1.17.02.46 (in progress, no binary yet)
/ <rewbs> internal: renamed m_nSongPreAmp to m_nSamplePreAmp, to avoid confusion with global preamp.
/ <rewbs> internal: stubs for launching scripted pattern transforms.
+ <rewbs> new mixmode: bypass global preamp, provide explicit dB value for sample attenuation. WARNING: subject to change.
+ <rewbs> SCx now sends note off to VSTis at tick x.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Ctrl_gen.cpp
trunk/OpenMPT/mptrack/Ctrl_gen.h
trunk/OpenMPT/mptrack/MainFrm.cpp
trunk/OpenMPT/mptrack/Moddoc.cpp
trunk/OpenMPT/mptrack/SoundFilePlayConfig.cpp
trunk/OpenMPT/mptrack/SoundFilePlayConfig.h
trunk/OpenMPT/mptrack/View_pat.cpp
trunk/OpenMPT/mptrack/View_pat.h
trunk/OpenMPT/mptrack/Vstplug.cpp
trunk/OpenMPT/mptrack/bin/mptrack_P3.exe
trunk/OpenMPT/mptrack/bin/mptrack_P4-Athlon64.exe
trunk/OpenMPT/mptrack/bin/version
trunk/OpenMPT/mptrack/dlg_misc.cpp
trunk/OpenMPT/mptrack/mptrack.rc
trunk/OpenMPT/mptrack/resource.h
trunk/OpenMPT/packageTemplate/extraKeymaps/UK_mpt_it2_hybrid_(rewbs).mkb
trunk/OpenMPT/soundlib/LOAD_DSM.CPP
trunk/OpenMPT/soundlib/Load_far.cpp
trunk/OpenMPT/soundlib/Load_it.cpp
trunk/OpenMPT/soundlib/Load_med.cpp
trunk/OpenMPT/soundlib/Load_s3m.cpp
trunk/OpenMPT/soundlib/Load_xm.cpp
trunk/OpenMPT/soundlib/Snd_fx.cpp
trunk/OpenMPT/soundlib/Sndfile.cpp
trunk/OpenMPT/soundlib/Sndfile.h
trunk/OpenMPT/soundlib/Sndmix.cpp
Modified: trunk/OpenMPT/mptrack/Ctrl_gen.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Ctrl_gen.cpp 2007-02-26 21:38:06 UTC (rev 173)
+++ trunk/OpenMPT/mptrack/Ctrl_gen.cpp 2007-03-13 22:14:22 UTC (rev 174)
@@ -6,6 +6,7 @@
#include "dlg_misc.h"
#include "ctrl_gen.h"
#include "view_gen.h"
+#include "math.h"
// -> CODE#0015
// -> DESC="channels management dlg"
@@ -58,7 +59,7 @@
DDX_Control(pDX, IDC_SLIDER_SONGTEMPO, m_SliderTempo);
DDX_Control(pDX, IDC_SLIDER_VSTIVOL, m_SliderVSTiVol);
DDX_Control(pDX, IDC_SLIDER_GLOBALVOL, m_SliderGlobalVol);
- DDX_Control(pDX, IDC_SLIDER_SONGPREAMP, m_SliderPreAmp);
+ DDX_Control(pDX, IDC_SLIDER_SAMPLEPREAMP, m_SliderSamplePreAmp);
DDX_Control(pDX, IDC_EDIT_MODTYPE, m_EditModType);
DDX_Control(pDX, IDC_COMBO_RESAMPLING, m_ComboResampling);
@@ -91,12 +92,13 @@
m_SpinVSTiVol.SetRange(0, 2000);
m_SpinRestartPos.SetRange(0, 255);
- m_SliderPreAmp.SetRange(0, 500);
m_SliderTempo.SetRange(0, 480);
- m_SliderVSTiVol.SetRange(0, 500);
- m_SliderGlobalVol.SetRange(0, 256);
+ m_SliderGlobalVol.SetRange(0, MAX_SLIDER_GLOBAL_VOL);
+ m_SliderVSTiVol.SetRange(0, MAX_SLIDER_VSTI_VOL);
+ m_SliderSamplePreAmp.SetRange(0, MAX_SLIDER_SAMPLE_VOL);
+
// -! BEHAVIOUR_CHANGE#0016
m_ComboResampling.AddString("None");
m_ComboResampling.AddString("Linear");
@@ -174,15 +176,15 @@
m_EditRestartPos.SetWindowText(s);
wsprintf(s, "%d", m_pSndFile->m_nVSTiVolume);
m_EditVSTiVol.SetWindowText(s);
- wsprintf(s, "%d", m_pSndFile->m_nSongPreAmp);
+ wsprintf(s, "%d", m_pSndFile->m_nSamplePreAmp);
m_EditSamplePA.SetWindowText(s);
wsprintf(s, "%d", m_pSndFile->m_nRestartPos);
m_EditRestartPos.SetWindowText(s);
}
- m_SliderGlobalVol.SetPos(256-m_pSndFile->m_nDefaultGlobalVolume);
- m_SliderVSTiVol.SetPos(500-m_pSndFile->m_nVSTiVolume);
- m_SliderPreAmp.SetPos(500-m_pSndFile->m_nSongPreAmp);
+ m_SliderGlobalVol.SetPos(MAX_SLIDER_GLOBAL_VOL-m_pSndFile->m_nDefaultGlobalVolume);
+ m_SliderVSTiVol.SetPos(MAX_SLIDER_VSTI_VOL-m_pSndFile->m_nVSTiVolume);
+ m_SliderSamplePreAmp.SetPos(MAX_SLIDER_SAMPLE_VOL-m_pSndFile->m_nSamplePreAmp);
m_SliderTempo.SetPos(480 - m_pSndFile->m_nDefaultTempo + 32);
@@ -202,7 +204,7 @@
m_SpinVSTiVol.EnableWindow(b);
m_EditSamplePA.EnableWindow(b);
m_SpinSamplePA.EnableWindow(b);
- m_SliderPreAmp.EnableWindow(b);
+ m_SliderSamplePreAmp.EnableWindow(b);
m_SliderVSTiVol.EnableWindow(b);
// MOD Type
@@ -259,8 +261,8 @@
}
else if (pSlider==&m_SliderGlobalVol) {
- int gv = 256 - m_SliderGlobalVol.GetPos();
- if ((gv >= 0) && (gv <= 256) && (gv != m_pSndFile->m_nDefaultGlobalVolume)) {
+ int gv = MAX_SLIDER_GLOBAL_VOL - m_SliderGlobalVol.GetPos();
+ if ((gv >= 0) && (gv <= MAX_SLIDER_GLOBAL_VOL) && (gv != m_pSndFile->m_nDefaultGlobalVolume)) {
m_pSndFile->m_nGlobalVolume = gv;
m_pSndFile->m_nDefaultGlobalVolume = gv;
m_pModDoc->SetModified();
@@ -268,18 +270,18 @@
}
}
- else if (pSlider==&m_SliderPreAmp) {
- int spa = 500 - m_SliderPreAmp.GetPos();
- if ((spa >= 0) && (spa <= 500) && (spa != m_pSndFile->m_nSongPreAmp)) {
- m_pSndFile->m_nSongPreAmp = spa;
+ else if (pSlider==&m_SliderSamplePreAmp) {
+ int spa = MAX_SLIDER_SAMPLE_VOL - m_SliderSamplePreAmp.GetPos();
+ if ((spa >= 0) && (spa <= MAX_SLIDER_SAMPLE_VOL) && (spa != m_pSndFile->m_nSamplePreAmp)) {
+ m_pSndFile->m_nSamplePreAmp = spa;
m_pModDoc->SetModified();
m_pModDoc->UpdateAllViews(NULL, HINT_MODGENERAL, this);
}
}
else if (pSlider==&m_SliderVSTiVol) {
- int vv = 500 - m_SliderVSTiVol.GetPos();
- if ((vv >= 0) && (vv <= 500) && (vv != m_pSndFile->m_nVSTiVolume)) {
+ int vv = MAX_SLIDER_VSTI_VOL - m_SliderVSTiVol.GetPos();
+ if ((vv >= 0) && (vv <= MAX_SLIDER_VSTI_VOL) && (vv != m_pSndFile->m_nVSTiVolume)) {
m_pSndFile->m_nVSTiVolume = vv;
m_pSndFile->RecalculateGainForAllPlugs();
m_pModDoc->SetModified();
@@ -392,9 +394,9 @@
m_EditSamplePA.GetWindowText(s, sizeof(s));
if (s[0]) {
int n = atoi(s);
- if ((n >= 0) && (n <= 2000) && (n != m_pSndFile->m_nSongPreAmp)) {
+ if ((n >= 0) && (n <= 2000) && (n != m_pSndFile->m_nSamplePreAmp)) {
m_bEditsLocked=true;
- m_pSndFile->m_nSongPreAmp = n;
+ m_pSndFile->m_nSamplePreAmp = n;
m_pModDoc->SetModified();
m_pModDoc->UpdateAllViews(NULL, HINT_MODGENERAL, this);
UpdateView(HINT_MODGENERAL, NULL);
@@ -607,7 +609,54 @@
}
+BOOL CCtrlGeneral::GetToolTipText(UINT uId, LPSTR pszText) {
+//----------------------------------------------------------
+ if ((pszText) && (uId))
+ {
+ if (!m_pSndFile->m_pConfig->getDisplayDBValues()) {
+ wsprintf(pszText, "Use a more recent mixmode to see dB offsets.");
+ return TRUE;
+ }
+
+ switch(uId) {
+ case IDC_SLIDER_SAMPLEPREAMP:
+ setAsDecibels(pszText, m_pSndFile->m_nSamplePreAmp, m_pSndFile->m_pConfig->getNormalSamplePreAmp());
+ return TRUE;
+ break;
+ case IDC_SLIDER_VSTIVOL:
+ setAsDecibels(pszText, m_pSndFile->m_nVSTiVolume, m_pSndFile->m_pConfig->getNormalVSTiVol());
+ return TRUE;
+ break;
+ case IDC_SLIDER_GLOBALVOL:
+ setAsDecibels(pszText, m_pSndFile->m_nGlobalVolume, m_pSndFile->m_pConfig->getNormalGlobalVol());
+ return TRUE;
+ break;
+ }
+ }
+ return FALSE;
+
+}
+
+void CCtrlGeneral::setAsDecibels(LPSTR stringToSet, double value, double valueAtZeroDB) {
+//-------------------------------------------------------------------------------------
+
+ if (value==0) {
+ wsprintf(stringToSet, "-inf");
+ return;
+ }
+
+ double changeFactor = value / valueAtZeroDB;
+ double dB = 10*log(changeFactor);
+
+ char sign = (dB>=0)?'+':' ';
+ sprintf(stringToSet, "%c%.2f dB", sign, dB);
+ return;
+
+}
+
+
+
////////////////////////////////////////////////////////////////////////////////
//
// CVuMeter
@@ -672,3 +721,5 @@
SelectObject(hdc, oldpen);
m_nDisplayedVu = m_nVuMeter;
}
+
+
Modified: trunk/OpenMPT/mptrack/Ctrl_gen.h
===================================================================
--- trunk/OpenMPT/mptrack/Ctrl_gen.h 2007-02-26 21:38:06 UTC (rev 173)
+++ trunk/OpenMPT/mptrack/Ctrl_gen.h 2007-03-13 22:14:22 UTC (rev 174)
@@ -20,7 +20,13 @@
DECLARE_MESSAGE_MAP();
};
+enum {
+ MAX_SLIDER_GLOBAL_VOL=256,
+ MAX_SLIDER_VSTI_VOL=256,
+ MAX_SLIDER_SAMPLE_VOL=256
+};
+
//=======================================
class CCtrlGeneral: public CModControlDlg
//=======================================
@@ -29,6 +35,9 @@
CCtrlGeneral();
LONG* GetSplitPosRef() {return &CMainFrame::glGeneralWindowHeight;} //rewbs.varWindowSize
+private:
+ void setAsDecibels(LPSTR stringToSet, double value, double valueAtZeroDB);
+
public:
bool m_bEditsLocked;
//{{AFX_DATA(CCtrlGeneral)
@@ -39,7 +48,7 @@
CSpinButtonCtrl m_SpinTempo, m_SpinSpeed, m_SpinGlobalVol, m_SpinRestartPos,
m_SpinSamplePA, m_SpinVSTiVol;
- CSliderCtrl m_SliderTempo, m_SliderPreAmp, m_SliderGlobalVol, m_SliderVSTiVol;
+ CSliderCtrl m_SliderTempo, m_SliderSamplePreAmp, m_SliderGlobalVol, m_SliderVSTiVol;
CComboBox m_ComboResampling;
CVuMeter m_VuMeterLeft, m_VuMeterRight;
//}}AFX_DATA
@@ -51,6 +60,7 @@
virtual CRuntimeClass *GetAssociatedViewClass();
virtual void OnActivatePage(LPARAM);
virtual void OnDeactivatePage();
+ virtual BOOL GetToolTipText(UINT uId, LPSTR pszText);
//}}AFX_VIRTUAL
protected:
//{{AFX_MSG(CCtrlGeneral)
Modified: trunk/OpenMPT/mptrack/MainFrm.cpp
===================================================================
--- trunk/OpenMPT/mptrack/MainFrm.cpp 2007-02-26 21:38:06 UTC (rev 173)
+++ trunk/OpenMPT/mptrack/MainFrm.cpp 2007-03-13 22:14:22 UTC (rev 174)
@@ -1973,7 +1973,13 @@
StopSoundFile(&m_WaveFile);
m_WaveFile.Destroy();
m_WaveFile.Create(NULL, 0);
+
+ //Avoid global volume ramping when trying samples in the treeview.
+ m_WaveFile.m_pConfig->setGlobalVolumeAppliesToMaster(false);
+ m_WaveFile.m_nDefaultGlobalVolume=64;
+
m_WaveFile.m_nDefaultTempo = 125;
+ m_WaveFile.m_nGlobalVolume=64;
m_WaveFile.m_nDefaultSpeed = 4;
m_WaveFile.m_nRepeatCount = 0;
m_WaveFile.m_nType = MOD_TYPE_IT;
Modified: trunk/OpenMPT/mptrack/Moddoc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Moddoc.cpp 2007-02-26 21:38:06 UTC (rev 173)
+++ trunk/OpenMPT/mptrack/Moddoc.cpp 2007-03-13 22:14:22 UTC (rev 174)
@@ -604,7 +604,7 @@
strcpy(m_SndFile.m_szNames[0], "untitled");
m_SndFile.m_nMusicTempo = m_SndFile.m_nDefaultTempo = 125;
m_SndFile.m_nMusicSpeed = m_SndFile.m_nDefaultSpeed = 6;
- m_SndFile.m_nGlobalVolume = m_SndFile.m_nDefaultGlobalVolume = 128;
+ m_SndFile.m_nGlobalVolume = m_SndFile.m_nDefaultGlobalVolume = 256;
for (UINT init=0; init<MAX_BASECHANNELS; init++)
{
m_SndFile.ChnSettings[init].dwFlags = 0;
Modified: trunk/OpenMPT/mptrack/SoundFilePlayConfig.cpp
===================================================================
--- trunk/OpenMPT/mptrack/SoundFilePlayConfig.cpp 2007-02-26 21:38:06 UTC (rev 173)
+++ trunk/OpenMPT/mptrack/SoundFilePlayConfig.cpp 2007-03-13 22:14:22 UTC (rev 174)
@@ -3,7 +3,7 @@
CSoundFilePlayConfig::CSoundFilePlayConfig(void)
{
- SetPluginMixLevels(plugmix_mode_117RC2);
+ SetPluginMixLevels(plugmix_mode_117RC3);
setVSTiVolume(1.0f);
}
@@ -20,6 +20,12 @@
setIntToFloat(1.0f/static_cast<float>(1<<28));
setFloatToInt(static_cast<float>(1<<28));
setGlobalVolumeAppliesToMaster(false);
+ setUseGlobalPreAmp(true);
+ setTreatPanLikeBalance(false);
+ setDisplayDBValues(false);
+ setNormalSamplePreAmp(128.0);
+ setNormalVSTiVol(100.0);
+ setNormalGlobalVol(128.0);
break;
// Ericus' version gives us floats in [-0.06;0.06] and requires attenuation to
@@ -29,18 +35,29 @@
setIntToFloat(1.0f/static_cast<float>(0x07FFFFFFF));
setFloatToInt(static_cast<float>(0x07FFFFFFF));
setGlobalVolumeAppliesToMaster(false);
+ setUseGlobalPreAmp(true);
+ setTreatPanLikeBalance(false);
+ setDisplayDBValues(false);
+ setNormalSamplePreAmp(128.0);
+ setNormalVSTiVol(100.0);
+ setNormalGlobalVol(128.0);
break;
// FOR TEST PURPOSES ONLY:
case plugmix_mode_Test:
- setVSTiAttenuation(2.0f);
+ setVSTiAttenuation(1.0f);
setIntToFloat(1.0f/static_cast<float>(MIXING_CLIPMAX));
setFloatToInt(static_cast<float>(MIXING_CLIPMAX));
- setGlobalVolumeAppliesToMaster(false);
+ setGlobalVolumeAppliesToMaster(true);
+ setUseGlobalPreAmp(false);
+ setTreatPanLikeBalance(true);
+ setDisplayDBValues(true);
+ setNormalSamplePreAmp(128.0);
+ setNormalVSTiVol(128.0);
+ setNormalGlobalVol(256.0);
break;
-
- // 117RC2 applies Rewbs' version gives us floats in [-1.0; 1.0] and hopefully plays VSTis at
+ // 117RC2 gives us floats in [-1.0; 1.0] and hopefully plays VSTis at
// the right volume... but we attenuate by 2x to approx. match sample volume.
default:
case plugmix_mode_117RC2:
@@ -48,6 +65,28 @@
setIntToFloat(1.0f/static_cast<float>(MIXING_CLIPMAX));
setFloatToInt(static_cast<float>(MIXING_CLIPMAX));
setGlobalVolumeAppliesToMaster(true);
+ setUseGlobalPreAmp(true);
+ setTreatPanLikeBalance(false);
+ setDisplayDBValues(false);
+ setNormalSamplePreAmp(128.0);
+ setNormalVSTiVol(100.0);
+ setNormalGlobalVol(128.0);
+
+ // 117RC3 ignores the horrible global, system-specific pre-amp,
+ // treats panning as balance to avoid saturation on loud sample (and because I think it's better :),
+ // and allows display of attenuation in decibels.
+ case plugmix_mode_117RC3:
+ setVSTiAttenuation(1.0f);
+ setIntToFloat(1.0f/static_cast<float>(MIXING_CLIPMAX));
+ setFloatToInt(static_cast<float>(MIXING_CLIPMAX));
+ setGlobalVolumeAppliesToMaster(true);
+ setUseGlobalPreAmp(false);
+ setTreatPanLikeBalance(true);
+ setDisplayDBValues(true);
+ setNormalSamplePreAmp(128.0);
+ setNormalVSTiVol(128.0);
+ setNormalGlobalVol(256.0);
+ break;
}
return;
@@ -57,12 +96,12 @@
//getters and setters.
bool CSoundFilePlayConfig::getGlobalVolumeAppliesToMaster() {
- return m_bGlobalVolumeAppliesToMaster;
+ return m_globalVolumeAppliesToMaster;
}
void CSoundFilePlayConfig::setGlobalVolumeAppliesToMaster(bool inGlobalVolumeAppliesToMaster){
- m_bGlobalVolumeAppliesToMaster=inGlobalVolumeAppliesToMaster;
+ m_globalVolumeAppliesToMaster=inGlobalVolumeAppliesToMaster;
}
float CSoundFilePlayConfig::getVSTiGainFactor() {
@@ -105,3 +144,54 @@
m_FloatToInt=inFloatToInt;
}
+bool CSoundFilePlayConfig::getUseGlobalPreAmp() {
+ return m_ignorePreAmp;
+}
+
+void CSoundFilePlayConfig::setUseGlobalPreAmp(bool inUseGlobalPreAmp) {
+ m_ignorePreAmp=inUseGlobalPreAmp;
+}
+
+
+bool CSoundFilePlayConfig::getTreatPanLikeBalance() {
+ return m_treatPanLikeBalance;
+}
+
+void CSoundFilePlayConfig::setTreatPanLikeBalance(bool inTreatPanLikeBalance) {
+ m_treatPanLikeBalance=inTreatPanLikeBalance;
+}
+
+void CSoundFilePlayConfig::setDisplayDBValues(bool in) {
+ m_displayDBValues=in;
+}
+
+void CSoundFilePlayConfig::setNormalSamplePreAmp(double in) {
+ m_normalSamplePreAmp=in;
+}
+
+void CSoundFilePlayConfig::setNormalVSTiVol(double in) {
+ m_normalVSTiVol=in;
+}
+
+void CSoundFilePlayConfig::setNormalGlobalVol(double in) {
+ m_normalGlobalVol=in;
+}
+
+bool CSoundFilePlayConfig::getDisplayDBValues() {
+ return m_displayDBValues;
+}
+
+double CSoundFilePlayConfig::getNormalSamplePreAmp() {
+ return m_normalSamplePreAmp;
+}
+
+double CSoundFilePlayConfig::getNormalVSTiVol() {
+ return m_normalVSTiVol;
+}
+
+double CSoundFilePlayConfig::getNormalGlobalVol() {
+ return m_normalGlobalVol;
+}
+
+
+
Modified: trunk/OpenMPT/mptrack/SoundFilePlayConfig.h
===================================================================
--- trunk/OpenMPT/mptrack/SoundFilePlayConfig.h 2007-02-26 21:38:06 UTC (rev 173)
+++ trunk/OpenMPT/mptrack/SoundFilePlayConfig.h 2007-03-13 22:14:22 UTC (rev 174)
@@ -16,7 +16,8 @@
plugmix_mode_original = 0,
plugmix_mode_117RC1 = 1,
plugmix_mode_117RC2 = 2,
- plugmix_mode_Test = 3,
+ plugmix_mode_117RC3 = 3,
+ plugmix_mode_Test = 4,
};
// Class used to store settings for a song file.
@@ -34,30 +35,55 @@
float getFloatToInt();
void setFloatToInt(float);
+ // default VSTi gain factor, different depending on the MPT version we're "emulating"
void setVSTiAttenuation(float);
float getVSTiAttenuation();
+
+ // user-controllable VSTi gain factor.
void setVSTiVolume(float);
float getVSTiVolume();
- void setGlobalVolumeAppliesToMaster(bool);
+ void setGlobalVolumeAppliesToMaster(bool);
bool getGlobalVolumeAppliesToMaster();
+ void setUseGlobalPreAmp(bool);
+ bool getUseGlobalPreAmp();
-//calculated internally (getters only):
- float getVSTiGainFactor();
+ void setTreatPanLikeBalance(bool);
+ bool getTreatPanLikeBalance();
+ void setDisplayDBValues(bool);
+ bool getDisplayDBValues();
+ //Values at which volumes are unchanged
+ double getNormalSamplePreAmp();
+ double getNormalVSTiVol();
+ double getNormalGlobalVol();
+ void setNormalSamplePreAmp(double);
+ void setNormalVSTiVol(double);
+ void setNormalGlobalVol(double);
-//
private:
+
+//calculated internally (getters only):
+ float getVSTiGainFactor();
+
float m_IntToFloat;
float m_FloatToInt;
- float m_VSTiAttenuation; // default VSTi gain factor, different depending on the MPT version we're "emulating"
- float m_VSTiVolume; // user-controllable VSTi gain factor.
+ float m_VSTiAttenuation;
+ float m_VSTiVolume;
float m_VSTiGainFactor; // always m_VSTiAttenuation * m_VSTiVolume. No public setter.
- bool m_bGlobalVolumeAppliesToMaster;
+ float m_normalSamplePreAmp;
+ float m_normalVSTiVol;
+ float m_normalGlobalVol;
+ bool m_globalVolumeAppliesToMaster;
+ bool m_ignorePreAmp;
+ bool m_treatPanLikeBalance;
+ bool m_displayDBValues;
+
DWORD m_LastSavedWithVersion;
DWORD m_CreatedWithVersion;
};
+
Modified: trunk/OpenMPT/mptrack/View_pat.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_pat.cpp 2007-02-26 21:38:06 UTC (rev 173)
+++ trunk/OpenMPT/mptrack/View_pat.cpp 2007-03-13 22:14:22 UTC (rev 174)
@@ -79,6 +79,7 @@
ON_COMMAND(ID_PREVORDER, OnPrevOrder)
ON_COMMAND(ID_NEXTORDER, OnNextOrder)
ON_COMMAND(IDC_PATTERN_RECORD, OnPatternRecord)
+ ON_COMMAND(ID_RUN_SCRIPT, OnRunScript)
ON_COMMAND(ID_TRANSPOSE_UP, OnTransposeUp)
ON_COMMAND(ID_TRANSPOSE_DOWN, OnTransposeDown)
ON_COMMAND(ID_TRANSPOSE_OCTUP, OnTransposeOctUp)
@@ -2447,7 +2448,13 @@
EndWaitCursor();
}
+void CViewPattern::OnRunScript()
+//--------------------------------
+{
+ ;
+}
+
void CViewPattern::OnTransposeUp()
//--------------------------------
{
@@ -4525,6 +4532,8 @@
CArray<UINT, UINT> validChans;
DWORD greyed = (ListChansWhereColSelected(NOTE_COLUMN, validChans)>0)?FALSE:MF_GRAYED;
+ //AppendMenu(hMenu, MF_STRING, ID_RUN_SCRIPT, "Run script");
+
if (!greyed || !(CMainFrame::m_dwPatternSetup&PATTERN_OLDCTXMENUSTYLE)) {
AppendMenu(hMenu, MF_STRING|greyed, ID_TRANSPOSE_UP, "Transpose +1\t" + ih->GetKeyTextFromCommand(kcTransposeUp));
AppendMenu(hMenu, MF_STRING|greyed, ID_TRANSPOSE_DOWN, "Transpose -1\t" + ih->GetKeyTextFromCommand(kcTransposeDown));
Modified: trunk/OpenMPT/mptrack/View_pat.h
===================================================================
--- trunk/OpenMPT/mptrack/View_pat.h 2007-02-26 21:38:06 UTC (rev 173)
+++ trunk/OpenMPT/mptrack/View_pat.h 2007-03-13 22:14:22 UTC (rev 174)
@@ -266,6 +266,7 @@
afx_msg void OnInterpolateNote();
afx_msg void OnVisualizeEffect(); //rewbs.fxvis
afx_msg void OnOpenRandomizer(); //rewbs.fxvis
+ afx_msg void OnRunScript();
afx_msg void OnTransposeUp();
afx_msg void OnTransposeDown();
afx_msg void OnTransposeOctUp();
Modified: trunk/OpenMPT/mptrack/Vstplug.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Vstplug.cpp 2007-02-26 21:38:06 UTC (rev 173)
+++ trunk/OpenMPT/mptrack/Vstplug.cpp 2007-03-13 22:14:22 UTC (rev 174)
@@ -2035,7 +2035,7 @@
if (m_bIsInstrument) {
gain /= m_pSndFile->m_pConfig->getVSTiAttenuation();
- gain *= (m_pSndFile->m_nVSTiVolume / 100.0f);
+ gain *= (m_pSndFile->m_nVSTiVolume / m_pSndFile->m_pConfig->getNormalVSTiVol());
}
m_fGain = gain;
}
@@ -2091,6 +2091,7 @@
}
}
*/
+
void CVstPlugin::Process(float *pOutL, float *pOutR, unsigned long nSamples)
//--------------------------------------------------------------------------
{
Modified: trunk/OpenMPT/mptrack/bin/mptrack_P3.exe
===================================================================
(Binary files differ)
Modified: trunk/OpenMPT/mptrack/bin/mptrack_P4-Athlon64.exe
===================================================================
(Binary files differ)
Modified: trunk/OpenMPT/mptrack/bin/version
===================================================================
--- trunk/OpenMPT/mptrack/bin/version 2007-02-26 21:38:06 UTC (rev 173)
+++ trunk/OpenMPT/mptrack/bin/version 2007-03-13 22:14:22 UTC (rev 174)
@@ -1 +1 @@
-1.17.02.45
\ No newline at end of file
+1.17.02.46
\ No newline at end of file
Modified: trunk/OpenMPT/mptrack/dlg_misc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/dlg_misc.cpp 2007-02-26 21:38:06 UTC (rev 173)
+++ trunk/OpenMPT/mptrack/dlg_misc.cpp 2007-03-13 22:14:22 UTC (rev 174)
@@ -248,21 +248,21 @@
default: m_TempoModeBox.SetCurSel(0); break;
}
+ m_PlugMixBox.SetItemData(m_PlugMixBox.AddString("OpenMPT 1.17RC3"), plugmix_mode_117RC3);
m_PlugMixBox.SetItemData(m_PlugMixBox.AddString("OpenMPT 1.17RC2"), plugmix_mode_117RC2);
m_PlugMixBox.SetItemData(m_PlugMixBox.AddString("OpenMPT 1.17RC1"), plugmix_mode_117RC1);
m_PlugMixBox.SetItemData(m_PlugMixBox.AddString("Original"), plugmix_mode_original);
-// m_PlugMixBox.SetItemData(m_PlugMixBox.AddString("Test"), plugmix_mode_Test);
+ m_PlugMixBox.SetItemData(m_PlugMixBox.AddString("Test"), plugmix_mode_Test);
switch(m_pSndFile->m_nPlugMixMode)
{
- case plugmix_mode_original: m_PlugMixBox.SetCurSel(2); break;
- case plugmix_mode_117RC1: m_PlugMixBox.SetCurSel(1); break;
-// case plugmix_mode_Test: m_PlugMixBox.SetCurSel(3); break;
- case plugmix_mode_117RC2:
+ //case plugmix_mode_Test: m_PlugMixBox.SetCurSel(3); break;
+ case plugmix_mode_original: m_PlugMixBox.SetCurSel(3); break;
+ case plugmix_mode_117RC1: m_PlugMixBox.SetCurSel(2); break;
+ case plugmix_mode_117RC2: m_PlugMixBox.SetCurSel(1); break;
+ case plugmix_mode_117RC3:
default: m_PlugMixBox.SetCurSel(0); break;
}
-;
-
SetDlgItemText(IDC_EDIT5, "Created with:");
SetDlgItemText(IDC_EDIT6, "Last saved with:");
Modified: trunk/OpenMPT/mptrack/mptrack.rc
===================================================================
--- trunk/OpenMPT/mptrack/mptrack.rc 2007-02-26 21:38:06 UTC (rev 173)
+++ trunk/OpenMPT/mptrack/mptrack.rc 2007-03-13 22:14:22 UTC (rev 174)
@@ -542,21 +542,22 @@
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,105,28,15,50
+ 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
LTEXT "VSTi vol:",IDC_STATIC,159,20,33,8
CONTROL "",IDC_SLIDER_VSTIVOL,"msctls_trackbar32",TBS_VERT |
- TBS_BOTH | TBS_NOTICKS,164,28,15,50
+ 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
LTEXT "Sample vol:",IDC_STATIC,212,20,38,8
- CONTROL "Slider1",IDC_SLIDER_SONGPREAMP,"msctls_trackbar32",
- TBS_VERT | TBS_BOTH | TBS_NOTICKS,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,
@@ -931,10 +932,10 @@
WS_TABSTOP
GROUPBOX "Tempo",IDC_STATIC,4,51,235,38
LTEXT "Mode:",IDC_STATIC,7,62,21,8
- COMBOBOX IDC_COMBO4,156,129,81,51,CBS_DROPDOWNLIST | WS_VSCROLL |
+ COMBOBOX IDC_COMBO4,153,129,81,51,CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
GROUPBOX "Playback",IDC_STATIC,4,95,235,51
- LTEXT "Plugin levels:",IDC_STATIC,111,131,43,10
+ LTEXT "Mix Levels:",IDC_STATIC,111,131,40,10
GROUPBOX "OpenMPT Version Info",IDC_STATIC,4,150,235,42
EDITTEXT IDC_EDIT1,67,161,166,13,ES_AUTOHSCROLL | ES_READONLY,
WS_EX_STATICEDGE
@@ -1905,7 +1906,7 @@
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,17,2,45
+ FILEVERSION 1,17,2,46
PRODUCTVERSION 0,0,0,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
@@ -1923,7 +1924,7 @@
BEGIN
VALUE "CompanyName", "Olivier Lapicque / OpenMPT team"
VALUE "FileDescription", "OpenMPT / ModPlug Tracker"
- VALUE "FileVersion", "1, 17, 2, 45"
+ VALUE "FileVersion", "1, 17, 2, 46"
VALUE "InternalName", "Modplug Tracker"
VALUE "LegalCopyright", "Copyright \xA91997-2003 Olivier Lapicque; \xA92004-2007 GPL."
VALUE "LegalTrademarks", "M.O.D.P.L.U.G"
Modified: trunk/OpenMPT/mptrack/resource.h
===================================================================
--- trunk/OpenMPT/mptrack/resource.h 2007-02-26 21:38:06 UTC (rev 173)
+++ trunk/OpenMPT/mptrack/resource.h 2007-03-13 22:14:22 UTC (rev 174)
@@ -533,7 +533,7 @@
#define IDC_EDIT_SPEED 2008
#define IDC_EDIT_GLOBALVOL 2009
#define IDC_EDIT_RESTARTPOS 2010
-#define IDC_SLIDER_SONGPREAMP 2011
+#define IDC_SLIDER_SAMPLEPREAMP 2011
#define IDC_BUTTON_MODTYPE 2012
#define IDC_EDIT_SAMPLEPA 2013
#define IDC_EDIT_MODTYPE 2014
@@ -728,7 +728,7 @@
#define IDC_AUTOSAVE_USECUSTOMDIR 2245
#define IDC_BUTTON_MODTYPE2 2246
#define IDC_BUTTON_PLAYERPROPS 2247
-#define IDC_SLIDER_SONGPREAMP3 2248
+#define IDC_SLIDER_SAMPLEPREAMP3 2248
#define IDC_SLIDER_GLOBALVOL 2249
#define IDC_EDIT_VSTIVOL 2250
#define IDC_SLIDER_VSTIVOL 2251
@@ -930,6 +930,7 @@
#define ID_VIEW_SONGPROPERTIES 38002
#define ID_GROW_SELECTION 40001
#define ID_SHRINK_SELECTION 40002
+#define ID_RUN_SCRIPT 40003
#define IDS_ERR_FILEOPEN 55001
#define IDS_ERR_FILETYPE 55002
#define IDS_ERR_SAVEINS 55003
Modified: trunk/OpenMPT/packageTemplate/extraKeymaps/UK_mpt_it2_hybrid_(rewbs).mkb
===================================================================
--- trunk/OpenMPT/packageTemplate/extraKeymaps/UK_mpt_it2_hybrid_(rewbs).mkb 2007-02-26 21:38:06 UTC (rev 173)
+++ trunk/OpenMPT/packageTemplate/extraKeymaps/UK_mpt_it2_hybrid_(rewbs).mkb 2007-03-13 22:14:22 UTC (rev 174)
@@ -9,7 +9,7 @@
0:1349:2:83:1 //File/Save: Ctrl+S (KeyDown)
0:1030:2:119:1 //Play song/Pause song: Ctrl+F8 (KeyDown)
0:1031:0:119:1 //Pause song: F8 (KeyDown)
-0:1375:0:27:1 //Stop Song: ESC (KeyDown)
+0:1375:0:27:1 //Stop Song: Esc (KeyDown)
0:1029:0:116:5 //Play song from start: F5 (KeyDown|KeyHold)
0:1028:0:118:5 //Play song from cursor: F7 (KeyDown|KeyHold)
0:1027:0:117:5 //Play pattern from start: F6 (KeyDown|KeyHold)
@@ -36,49 +36,49 @@
0:1670:6:77:1 //View Channel Manager: Ctrl+Alt+M (KeyDown)
0:1669:3:77:1 //View Plugin Manager: Shift+Ctrl+M (KeyDown)
0:1032:0:219:5 //Previous instrument: [ (KeyDown|KeyHold)
-0:1032:2:38:5 //Previous instrument: Ctrl+UP (KeyDown|KeyHold)
+0:1032:2:38:5 //Previous instrument: Ctrl+Up (KeyDown|KeyHold)
0:1033:0:221:5 //Next instrument: ] (KeyDown|KeyHold)
-0:1033:2:40:5 //Next instrument: Ctrl+DOWN (KeyDown|KeyHold)
-0:1036:0:111:5 //Previous octave: NUM DIVIDE (KeyDown|KeyHold)
-0:1037:0:106:5 //Next octave: NUMMULT (KeyDown|KeyHold)
-0:1034:2:37:5 //Previous order: Ctrl+LEFT (KeyDown|KeyHold)
-0:1035:2:39:5 //Next order: Ctrl+RIGHT (KeyDown|KeyHold)
+0:1033:2:40:5 //Next instrument: Ctrl+Down (KeyDown|KeyHold)
+0:1036:0:111:5 //Previous octave: Num / (KeyDown|KeyHold)
+0:1037:0:106:5 //Next octave: Num * (KeyDown|KeyHold)
+0:1034:2:37:5 //Previous order: Ctrl+Left (KeyDown|KeyHold)
+0:1035:2:39:5 //Next order: Ctrl+Right (KeyDown|KeyHold)
//----( General Context [bottom] (1) )------------
//----( Pattern Context [bottom] (2) )------------
-2:1017:0:34:5 //Jump down by measure: PGDOWN (KeyDown|KeyHold)
-2:1018:0:33:5 //Jump up by measure: PGUP (KeyDown|KeyHold)
-2:1338:4:34:5 //Jump down by beat: Alt+PGDOWN (KeyDown|KeyHold)
-2:1339:4:33:5 //Jump up by beat: Alt+PGUP (KeyDown|KeyHold)
-2:1019:2:34:5 //Snap down to measure: Ctrl+PGDOWN (KeyDown|KeyHold)
-2:1020:2:33:5 //Snap up to measure: Ctrl+PGUP (KeyDown|KeyHold)
-2:1340:6:34:5 //Snap down to beat: Ctrl+Alt+PGDOWN (KeyDown|KeyHold)
-2:1341:6:33:5 //Snap up to beat: Ctrl+Alt+PGUP (KeyDown|KeyHold)
-2:1038:0:40:5 //Navigate down by 1 row: DOWN (KeyDown|KeyHold)
-2:1039:0:38:5 //Navigate up by 1 row: UP (KeyDown|KeyHold)
-2:1040:0:37:5 //Navigate left: LEFT (KeyDown|KeyHold)
-2:1041:0:39:5 //Navigate right: RIGHT (KeyDown|KeyHold)
-2:1042:0:9:5 //Navigate to next channel: TAB (KeyDown|KeyHold)
-2:1043:2:9:5 //Navigate to previous channel: Ctrl+TAB (KeyDown|KeyHold)
-2:1044:0:36:1 //Go to first channel: HOME (KeyDown)
-2:1045:2:36:1 //Go to first row: Ctrl+HOME (KeyDown)
-2:1046:6:36:1 //Go to first row of first channel: Ctrl+Alt+HOME (KeyDown)
-2:1047:0:35:1 //Go to last channel: END (KeyDown)
-2:1048:2:35:1 //Go to last row: Ctrl+END (KeyDown)
-2:1049:6:35:1 //Go to last row of last channel: Ctrl+Alt+END (KeyDown)
-2:1050:1:16:1 //Selection key: Shift (KeyDown)
+2:1017:0:34:5 //Jump down by measure: Page Down (KeyDown|KeyHold)
+2:1018:0:33:5 //Jump up by measure: Page Up (KeyDown|KeyHold)
+2:1338:4:34:5 //Jump down by beat: Alt+Page Down (KeyDown|KeyHold)
+2:1339:4:33:5 //Jump up by beat: Alt+Page Up (KeyDown|KeyHold)
+2:1019:2:34:5 //Snap down to measure: Ctrl+Page Down (KeyDown|KeyHold)
+2:1020:2:33:5 //Snap up to measure: Ctrl+Page Up (KeyDown|KeyHold)
+2:1340:6:34:5 //Snap down to beat: Ctrl+Alt+Page Down (KeyDown|KeyHold)
+2:1341:6:33:5 //Snap up to beat: Ctrl+Alt+Page Up (KeyDown|KeyHold)
+2:1038:0:40:5 //Navigate down by 1 row: Down (KeyDown|KeyHold)
+2:1039:0:38:5 //Navigate up by 1 row: Up (KeyDown|KeyHold)
+2:1040:0:37:5 //Navigate left: Left (KeyDown|KeyHold)
+2:1041:0:39:5 //Navigate right: Right (KeyDown|KeyHold)
+2:1042:0:9:5 //Navigate to next channel: Tab (KeyDown|KeyHold)
+2:1043:2:9:5 //Navigate to previous channel: Ctrl+Tab (KeyDown|KeyHold)
+2:1044:0:36:1 //Go to first channel: Home (KeyDown)
+2:1045:2:36:1 //Go to first row: Ctrl+Home (KeyDown)
+2:1046:6:36:1 //Go to first row of first channel: Ctrl+Alt+Home (KeyDown)
+2:1047:0:35:1 //Go to last channel: End (KeyDown)
+2:1048:2:35:1 //Go to last row: Ctrl+End (KeyDown)
+2:1049:6:35:1 //Go to last row of last channel: Ctrl+Alt+End (KeyDown)
+2:1050:1:16:1 //Selection key: Shift+Shift (KeyDown)
2:1011:4:76:1 //Select channel / Select all: Alt+L (KeyDown)
2:1663:2:118:1 //Toggle follow song: Ctrl+F7 (KeyDown)
-2:1003:0:13:1 //Quick copy: ENTER (KeyDown)
-2:1004:0:32:5 //Quick paste: SPACE (KeyDown|KeyHold)
+2:1003:0:13:1 //Quick copy: Enter (KeyDown)
+2:1004:0:32:5 //Quick paste: Space (KeyDown|KeyHold)
2:1001:1:120:1 //Enable recording: Shift+F9 (KeyDown)
-2:1002:2:13:1 //Play row: Ctrl+ENTER (KeyDown)
-2:1002:0:104:1 //Play row: NUM 8 (KeyDown)
+2:1002:2:13:1 //Play row: Ctrl+Enter (KeyDown)
+2:1002:0:104:1 //Play row: Num 8 (KeyDown)
2:1002:0:56:1 //Play row: 8 (KeyDown)
-2:1317:4:18:1 //Set row jump on note entry: Alt (KeyDown)
-2:1685:6:9:1 //Switch to order list: Ctrl+Alt+TAB (KeyDown)
-2:1672:3:13:1 //Insert new pattern: Shift+Ctrl+ENTER (KeyDown)
+2:1317:4:18:1 //Set row jump on note entry: Alt+Alt (KeyDown)
+2:1685:6:9:1 //Switch to order list: Ctrl+Alt+Tab (KeyDown)
+2:1672:3:13:1 //Insert new pattern: Shift+Ctrl+Enter (KeyDown)
2:1662:6:80:1 //Toggle channel's plugin editor: Ctrl+Alt+P (KeyDown)
2:1062:0:93:1 //Show note properties: Application (KeyDown)
2:1063:2:93:1 //Show context (right-click) menu: Ctrl+Application (KeyDown)
@@ -95,110 +95,110 @@
2:1013:4:83:1 //Apply current instrument: Alt+S (KeyDown)
2:1660:4:69:1 //Grow selection: Alt+E (KeyDown)
2:1661:4:68:1 //Shrink selection: Alt+D (KeyDown)
-2:1057:0:46:1 //Clear row: DELETE (KeyDown)
-2:1058:0:110:1 //Clear field: NUM DECIMAL (KeyDown)
+2:1057:0:46:1 //Clear row: Delete (KeyDown)
+2:1058:0:110:1 //Clear field: Num Del (KeyDown)
2:1664:1:190:1 //Clear field (IT Style): Shift+. (KeyDown)
-2:1059:2:46:1 //Clear row and step: Ctrl+DELETE (KeyDown)
-2:1060:2:110:1 //Clear field and step: Ctrl+NUM DECIMAL (KeyDown)
+2:1059:2:46:1 //Clear row and step: Ctrl+Delete (KeyDown)
+2:1060:2:110:1 //Clear field and step: Ctrl+Num Del (KeyDown)
2:1665:3:190:1 //Clear field and step (IT Style): Shift+Ctrl+. (KeyDown)
-2:1061:0:8:5 //Delete rows: BACKSPACE (KeyDown|KeyHold)
-2:1377:2:8:5 //Delete all rows: Ctrl+BACKSPACE (KeyDown|KeyHold)
-2:1378:0:45:5 //Insert Row: INSERT (KeyDown|KeyHold)
-2:1379:2:45:1 //Insert All Rows: Ctrl+INSERT (KeyDown)
-2:1055:0:109:5 //Previous pattern: NUM SUB (KeyDown|KeyHold)
-2:1054:0:107:5 //Next pattern: NUM PLUS (KeyDown|KeyHold)
+2:1061:0:8:5 //Delete rows: Backspace (KeyDown|KeyHold)
+2:1377:2:8:5 //Delete all rows: Ctrl+Backspace (KeyDown|KeyHold)
+2:1378:0:45:5 //Insert Row: Insert (KeyDown|KeyHold)
+2:1379:2:45:1 //Insert All Rows: Ctrl+Insert (KeyDown)
+2:1055:0:109:5 //Previous pattern: Num - (KeyDown|KeyHold)
+2:1054:0:107:5 //Next pattern: Num + (KeyDown|KeyHold)
//----( Pattern Context [bottom] - Note Col (3) )------------
-3:1064:0:90:5 //Base octave C: Z (KeyDown|KeyHold)
-3:1065:0:83:5 //Base octave C#: S (KeyDown|KeyHold)
-3:1066:0:88:5 //Base octave D: X (KeyDown|KeyHold)
-3:1067:0:68:5 //Base octave D#: D (KeyDown|KeyHold)
-3:1068:0:67:5 //Base octave E: C (KeyDown|KeyHold)
-3:1069:0:86:5 //Base octave F: V (KeyDown|KeyHold)
-3:1070:0:71:5 //Base octave F#: G (KeyDown|KeyHold)
-3:1071:0:66:5 //Base octave G: B (KeyDown|KeyHold)
-3:1072:0:72:5 //Base octave G#: H (KeyDown|KeyHold)
-3:1073:0:78:5 //Base octave +1 A: N (KeyDown|KeyHold)
-3:1074:0:74:5 //Base octave +1 A#: J (KeyDown|KeyHold)
-3:1075:0:77:5 //Base octave +1 B: M (KeyDown|KeyHold)
-3:1076:0:81:5 //Base octave +1 C: Q (KeyDown|KeyHold)
-3:1077:0:50:5 //Base octave +1 C#: 2 (KeyDown|KeyHold)
-3:1078:0:87:5 //Base octave +1 D: W (KeyDown|KeyHold)
-3:1079:0:51:5 //Base octave +1 D#: 3 (KeyDown|KeyHold)
-3:1080:0:69:5 //Base octave +1 E: E (KeyDown|KeyHold)
-3:1081:0:82:5 //Base octave +1 F: R (KeyDown|KeyHold)
-3:1082:0:53:5 //Base octave +1 F#: 5 (KeyDown|KeyHold)
-3:1083:0:84:5 //Base octave +1 G: T (KeyDown|KeyHold)
-3:1084:0:54:5 //Base octave +1 G#: 6 (KeyDown|KeyHold)
-3:1085:0:89:5 //Base octave +2 A: Y (KeyDown|KeyHold)
-3:1086:0:55:5 //Base octave +2 A#: 7 (KeyDown|KeyHold)
-3:1087:0:85:5 //Base octave +2 B: U (KeyDown|KeyHold)
-3:1088:0:73:5 //Base octave +2 C: I (KeyDown|KeyHold)
-3:1089:0:57:5 //Base octave +2 C#: 9 (KeyDown|KeyHold)
-3:1090:0:79:5 //Base octave +2 D: O (KeyDown|KeyHold)
-3:1091:0:48:5 //Base octave +2 D#: 0 (KeyDown|KeyHold)
-3:1092:0:80:5 //Base octave +2 E: P (KeyDown|KeyHold)
-3:1212:0:96:1 //Set octave 0: NUM 0 (KeyDown)
-3:1213:0:97:1 //Set octave 1: NUM 1 (KeyDown)
-3:1214:0:98:1 //Set octave 2: NUM 2 (KeyDown)
-3:1215:0:99:1 //Set octave 3: NUM 3 (KeyDown)
+3:1064:0:90:1 //Base octave C: Z (KeyDown)
+3:1065:0:83:1 //Base octave C#: S (KeyDown)
+3:1066:0:88:1 //Base octave D: X (KeyDown)
+3:1067:0:68:1 //Base octave D#: D (KeyDown)
+3:1068:0:67:1 //Base octave E: C (KeyDown)
+3:1069:0:86:1 //Base octave F: V (KeyDown)
+3:1070:0:71:1 //Base octave F#: G (KeyDown)
+3:1071:0:66:1 //Base octave G: B (KeyDown)
+3:1072:0:72:1 //Base octave G#: H (KeyDown)
+3:1073:0:78:1 //Base octave +1 A: N (KeyDown)
+3:1074:0:74:1 //Base octave +1 A#: J (KeyDown)
+3:1075:0:77:1 //Base octave +1 B: M (KeyDown)
+3:1076:0:81:1 //Base octave +1 C: Q (KeyDown)
+3:1077:0:50:1 //Base octave +1 C#: 2 (KeyDown)
+3:1078:0:87:1 //Base octave +1 D: W (KeyDown)
+3:1079:0:51:1 //Base octave +1 D#: 3 (KeyDown)
+3:1080:0:69:1 //Base octave +1 E: E (KeyDown)
+3:1081:0:82:1 //Base octave +1 F: R (KeyDown)
+3:1082:0:53:1 //Base octave +1 F#: 5 (KeyDown)
+3:1083:0:84:1 //Base octave +1 G: T (KeyDown)
+3:1084:0:54:1 //Base octave +1 G#: 6 (KeyDown)
+3:1085:0:89:1 //Base octave +2 A: Y (KeyDown)
+3:1086:0:55:1 //Base octave +2 A#: 7 (KeyDown)
+3:1087:0:85:1 //Base octave +2 B: U (KeyDown)
+3:1088:0:73:1 //Base octave +2 C: I (KeyDown)
+3:1089:0:57:1 //Base octave +2 C#: 9 (KeyDown)
+3:1090:0:79:1 //Base octave +2 D: O (KeyDown)
+3:1091:0:48:1 //Base octave +2 D#: 0 (KeyDown)
+3:1092:0:80:1 //Base octave +2 E: P (KeyDown)
+3:1212:0:96:1 //Set octave 0: Num 0 (KeyDown)
+3:1213:0:97:1 //Set octave 1: Num 1 (KeyDown)
+3:1214:0:98:1 //Set octave 2: Num 2 (KeyDown)
+3:1215:0:99:1 //Set octave 3: Num 3 (KeyDown)
3:1216:0:52:1 //Set octave 4: 4 (KeyDown)
-3:1216:0:100:1 //Set octave 4: NUM 4 (KeyDown)
-3:1217:0:101:1 //Set octave 5: NUM 5 (KeyDown)
-3:1218:0:102:1 //Set octave 6: NUM 6 (KeyDown)
-3:1219:0:103:1 //Set octave 7: NUM 7 (KeyDown)
-3:1220:0:104:1 //Set octave 8: NUM 8 (KeyDown)
-3:1221:0:105:1 //Set octave 9: NUM 9 (KeyDown)
-3:1316:1:16:1 //Chord Modifier: Shift (KeyDown)
+3:1216:0:100:1 //Set octave 4: Num 4 (KeyDown)
+3:1217:0:101:1 //Set octave 5: Num 5 (KeyDown)
+3:1218:0:102:1 //Set octave 6: Num 6 (KeyDown)
+3:1219:0:103:1 //Set octave 7: Num 7 (KeyDown)
+3:1220:0:104:1 //Set octave 8: Num 8 (KeyDown)
+3:1221:0:105:1 //Set octave 9: Num 9 (KeyDown)
+3:1316:1:16:1 //Chord Modifier: Shift+Shift (KeyDown)
3:1200:0:49:1 //Note cut: 1 (KeyDown)
-3:1201:0:223:1 //Note off: ` (KeyDown)
+3:1201:0:223:1 //Note off: (KeyDown)
3:1201:0:187:1 //Note off: = (KeyDown)
3:1667:1:49:1 //Note cut (don't remember instrument): Shift+1 (KeyDown)
-3:1668:1:223:1 //Note off (don't remember instrument): Shift+` (KeyDown)
+3:1668:1:223:1 //Note off (don't remember instrument): Shift+ (KeyDown)
//----( Pattern Context [bottom] - Ins Col (4) )------------
-4:1202:0:96:1 //Set instrument digit 0: NUM 0 (KeyDown)
+4:1202:0:96:1 //Set instrument digit 0: Num 0 (KeyDown)
4:1202:0:48:1 //Set instrument digit 0: 0 (KeyDown)
-4:1203:0:97:1 //Set instrument digit 1: NUM 1 (KeyDown)
+4:1203:0:97:1 //Set instrument digit 1: Num 1 (KeyDown)
4:1203:0:49:1 //Set instrument digit 1: 1 (KeyDown)
-4:1204:0:98:1 //Set instrument digit 2: NUM 2 (KeyDown)
+4:1204:0:98:1 //Set instrument digit 2: Num 2 (KeyDown)
4:1204:0:50:1 //Set instrument digit 2: 2 (KeyDown)
-4:1205:0:99:1 //Set instrument digit 3: NUM 3 (KeyDown)
+4:1205:0:99:1 //Set instrument digit 3: Num 3 (KeyDown)
4:1205:0:51:1 //Set instrument digit 3: 3 (KeyDown)
-4:1206:0:100:1 //Set instrument digit 4: NUM 4 (KeyDown)
+4:1206:0:100:1 //Set instrument digit 4: Num 4 (KeyDown)
4:1206:0:52:1 //Set instrument digit 4: 4 (KeyDown)
-4:1207:0:101:1 //Set instrument digit 5: NUM 5 (KeyDown)
+4:1207:0:101:1 //Set instrument digit 5: Num 5 (KeyDown)
4:1207:0:53:1 //Set instrument digit 5: 5 (KeyDown)
-4:1208:0:102:1 //Set instrument digit 6: NUM 6 (KeyDown)
+4:1208:0:102:1 //Set instrument digit 6: Num 6 (KeyDown)
4:1208:0:54:1 //Set instrument digit 6: 6 (KeyDown)
-4:1209:0:103:1 //Set instrument digit 7: NUM 7 (KeyDown)
+4:1209:0:103:1 //Set instrument digit 7: Num 7 (KeyDown)
4:1209:0:55:1 //Set instrument digit 7: 7 (KeyDown)
4:1210:0:56:1 //Set instrument digit 8: 8 (KeyDown)
-4:1210:0:104:1 //Set instrument digit 8: NUM 8 (KeyDown)
-4:1211:0:105:1 //Set instrument digit 9: NUM 9 (KeyDown)
+4:1210:0:104:1 //Set instrument digit 8: Num 8 (KeyDown)
+4:1211:0:105:1 //Set instrument digit 9: Num 9 (KeyDown)
4:1211:0:57:1 //Set instrument digit 9: 9 (KeyDown)
//----( Pattern Context [bottom] - Vol Col (5) )------------
5:1222:0:48:1 //Set volume digit 0: 0 (KeyDown)
-5:1222:0:96:1 //Set volume digit 0: NUM 0 (KeyDown)
+5:1222:0:96:1 //Set volume digit 0: Num 0 (KeyDown)
5:1223:0:49:1 //Set volume digit 1: 1 (KeyDown)
-5:1223:0:97:1 //Set volume digit 1: NUM 1 (KeyDown)
+5:1223:0:97:1 //Set volume digit 1: Num 1 (KeyDown)
5:1224:0:50:1 //Set volume digit 2: 2 (KeyDown)
-5:1224:0:98:1 //Set volume digit 2: NUM 2 (KeyDown)
+5:1224:0:98:1 //Set volume digit 2: Num 2 (KeyDown)
5:1225:0:51:1 //Set volume digit 3: 3 (KeyDown)
-5:1225:0:99:1 //Set volume digit 3: NUM 3 (KeyDown)
+5:1225:0:99:1 //Set volume digit 3: Num 3 (KeyDown)
5:1226:0:52:1 //Set volume digit 4: 4 (KeyDown)
-5:1226:0:100:1 //Set volume digit 4: NUM 4 (KeyDown)
+5:1226:0:100:1 //Set volume digit 4: Num 4 (KeyDown)
5:1227:0:53:1 //Set volume digit 5: 5 (KeyDown)
-5:1227:0:101:1 //Set volume digit 5: NUM 5 (KeyDown)
+5:1227:0:101:1 //Set volume digit 5: Num 5 (KeyDown)
5:1228:0:54:1 //Set volume digit 6: 6 (KeyDown)
-5:1228:0:102:1 //Set volume digit 6: NUM 6 (KeyDown)
+5:1228:0:102:1 //Set volume digit 6: Num 6 (KeyDown)
5:1229:0:55:1 //Set volume digit 7: 7 (KeyDown)
-5:1229:0:103:1 //Set volume digit 7: NUM 7 (KeyDown)
+5:1229:0:103:1 //Set volume digit 7: Num 7 (KeyDown)
5:1230:0:56:1 //Set volume digit 8: 8 (KeyDown)
-5:1230:0:104:1 //Set volume digit 8: NUM 8 (KeyDown)
+5:1230:0:104:1 //Set volume digit 8: Num 8 (KeyDown)
5:1231:0:57:1 //Set volume digit 9: 9 (KeyDown)
-5:1231:0:105:1 //Set volume digit 9: NUM 9 (KeyDown)
+5:1231:0:105:1 //Set volume digit 9: Num 9 (KeyDown)
5:1232:0:86:1 //Vol command - volume: V (KeyDown)
5:1233:0:80:1 //Vol command - pan: P (KeyDown)
5:1234:0:67:1 //Vol command - vol slide up: C (KeyDown)
@@ -216,31 +216,31 @@
5:1246:0:79:1 //Vol command - Offset: O (KeyDown)
//----( Pattern Context [bottom] - FX Col (6) )------------
-6:1294:0:220:1 //FX midi macro slide: \ (KeyDown)
+6:1294:0:226:1 //FX midi macro slide: \ (KeyDown)
6:1295:1:186:1 //FX pseudo-velocity (experimental): Shift+; (KeyDown)
-6:1666:0:222:1 //FX parameter extension command: # (KeyDown)
+6:1666:0:222:1 //FX parameter extension command: ' (KeyDown)
//----( Pattern Context [bottom] - Param Col (7) )------------
7:1247:0:48:1 //FX Param digit 0: 0 (KeyDown)
-7:1247:0:96:1 //FX Param digit 0: NUM 0 (KeyDown)
+7:1247:0:96:1 //FX Param digit 0: Num 0 (KeyDown)
7:1248:0:49:1 //FX Param digit 1: 1 (KeyDown)
-7:1248:0:97:1 //FX Param digit 1: NUM 1 (KeyDown)
+7:1248:0:97:1 //FX Param digit 1: Num 1 (KeyDown)
7:1249:0:50:1 //FX Param digit 2: 2 (KeyDown)
-7:1249:0:98:1 //FX Param digit 2: NUM 2 (KeyDown)
+7:1249:0:98:1 //FX Param digit 2: Num 2 (KeyDown)
7:1250:0:51:1 //FX Param digit 3: 3 (KeyDown)
-7:1250:0:99:1 //FX Param digit 3: NUM 3 (KeyDown)
+7:1250:0:99:1 //FX Param digit 3: Num 3 (KeyDown)
7:1251:0:52:1 //FX Param digit 4: 4 (KeyDown)
-7:1251:0:100:1 //FX Param digit 4: NUM 4 (KeyDown)
+7:1251:0:100:1 //FX Param digit 4: Num 4 (KeyDown)
7:1252:0:53:1 //FX Param digit 5: 5 (KeyDown)
-7:1252:0:101:1 //FX Param digit 5: NUM 5 (KeyDown)
+7:1252:0:101:1 //FX Param digit 5: Num 5 (KeyDown)
7:1253:0:54:1 //FX Param digit 6: 6 (KeyDown)
-7:1253:0:102:1 //FX Param digit 6: NUM 6 (KeyDown)
+7:1253:0:102:1 //FX Param digit 6: Num 6 (KeyDown)
7:1254:0:55:1 //FX Param digit 7: 7 (KeyDown)
-7:1254:0:103:1 //FX Param digit 7: NUM 7 (KeyDown)
+7:1254:0:103:1 //FX Param digit 7: Num 7 (KeyDown)
7:1255:0:56:1 //FX Param digit 8: 8 (KeyDown)
-7:1255:0:104:1 //FX Param digit 8: NUM 8 (KeyDown)
+7:1255:0:104:1 //FX Param digit 8: Num 8 (KeyDown)
7:1256:0:57:1 //FX Param digit 9: 9 (KeyDown)
-7:1256:0:105:1 //FX Param digit 9: NUM 9 (KeyDown)
+7:1256:0:105:1 //FX Param digit 9: Num 9 (KeyDown)
7:1257:0:65:1 //FX Param digit A: A (KeyDown)
7:1258:0:66:1 //FX Param digit B: B (KeyDown)
7:1259:0:67:1 //FX Param digit C: C (KeyDown)
@@ -253,13 +253,13 @@
8:1674:4:83:1 //Save Sample: Alt+S (KeyDown)
8:1675:4:78:1 //New Sample: Alt+N (KeyDown)
8:1380:2:84:1 //Trim sample around loop points: Ctrl+T (KeyDown)
-8:1383:0:8:1 //Silence sample selection: BACKSPACE (KeyDown)
+8:1383:0:8:1 //Silence sample selection: Backspace (KeyDown)
8:1384:3:78:1 //Normalise Sample: Shift+Ctrl+N (KeyDown)
8:1385:3:65:1 //Amplify Sample: Shift+Ctrl+A (KeyDown)
8:1381:3:82:1 //Reverse sample: Shift+Ctrl+R (KeyDown)
-8:1382:0:46:1 //Delete sample selection: DELETE (KeyDown)
-8:1386:0:107:1 //Zoom Out: NUM PLUS (KeyDown)
-8:1387:0:109:1 //Zoom In: NUM SUB (KeyDown)
+8:1382:0:46:1 //Delete sample selection: Delete (KeyDown)
+8:1386:0:107:1 //Zoom Out: Num + (KeyDown)
+8:1387:0:109:1 //Zoom In: Num - (KeyDown)
//----( Instrument Context [bottom] (9) )------------
Modified: trunk/OpenMPT/soundlib/LOAD_DSM.CPP
===================================================================
--- trunk/OpenMPT/soundlib/LOAD_DSM.CPP 2007-02-26 21:38:06 UTC (rev 173)
+++ trunk/OpenMPT/soundlib/LOAD_DSM.CPP 2007-03-13 22:14:22 UTC (rev 174)
@@ -109,7 +109,7 @@
m_nDefaultTempo = psong->bpm;
m_nDefaultGlobalVolume = psong->globalvol << 2;
if ((!m_nDefaultGlobalVolume) || (m_nDefaultGlobalVolume > 256)) m_nDefaultGlobalVolume = 256;
- m_nSongPreAmp = psong->mastervol & 0x7F;
+ m_nSamplePreAmp = psong->mastervol & 0x7F;
for (UINT iOrd=0; iOrd<MAX_ORDERS; iOrd++)
{
Order[iOrd] = (BYTE)((iOrd < psong->numord) ? psong->orders[iOrd] : 0xFF);
Modified: trunk/OpenMPT/soundlib/Load_far.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_far.cpp 2007-02-26 21:38:06 UTC (rev 173)
+++ trunk/OpenMPT/soundlib/Load_far.cpp 2007-03-13 22:14:22 UTC (rev 174)
@@ -76,7 +76,7 @@
m_nChannels = 16;
m_nInstruments = 0;
m_nSamples = 0;
- m_nSongPreAmp = 0x20;
+ m_nSamplePreAmp = 0x20;
m_nDefaultSpeed = pmh1->speed;
m_nDefaultTempo = 80;
m_nDefaultGlobalVolume = 256;
Modified: trunk/OpenMPT/soundlib/Load_it.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_it.cpp 2007-02-26 21:38:06 UTC (rev 173)
+++ trunk/OpenMPT/soundlib/Load_it.cpp 2007-03-13 22:14:22 UTC (rev 174)
@@ -285,9 +285,9 @@
m_nDefaultGlobalVolume = id;
streamPos += sizeof(DWORD);
- // m_nSongPreAmp
+ // m_nSamplePreAmp
memcpy(&id,lpStream+streamPos,sizeof(DWORD));
- m_nSongPreAmp = id;
+ m_nSamplePreAmp = id;
streamPos += sizeof(DWORD);
// m_nDefaultSpeed
@@ -615,7 +615,7 @@
case 'PMM.': fadr = reinterpret_cast<BYTE*>(&m_nPlugMixMode); break;
case 'CWV.': fadr = reinterpret_cast<BYTE*>(&m_dwCreatedWithVersion); break;
case 'LSWV': fadr = reinterpret_cast<BYTE*>(&m_dwLastSavedWithVersion); break;
- case 'SPA.': fadr = reinterpret_cast<BYTE*>(&m_nSongPreAmp); break;
+ case 'SPA.': fadr = reinterpret_cast<BYTE*>(&m_nSamplePreAmp); break;
case 'VSTV': fadr = reinterpret_cast<BYTE*>(&m_nVSTiVolume); break;
case 'DGV.': fadr = reinterpret_cast<BYTE*>(&m_nDefaultGlobalVolume); break;
case 'RP..': fadr = reinterpret_cast<BYTE*>(&m_nRestartPos); break;
@@ -677,9 +677,9 @@
}
if (pifh->speed) m_nDefaultSpeed = pifh->speed;
if (pifh->tempo) m_nDefaultTempo = pifh->tempo;
- m_nSongPreAmp = pifh->mv & 0x7F;
- if (m_nSongPreAmp<0x20) {
- m_nSongPreAmp=100;
+ m_nSamplePreAmp = pifh->mv & 0x7F;
+ if (m_nSamplePreAmp<0x20) {
+ m_nSamplePreAmp=100;
}
// Reading Channels Pan Positions
for (int ipan=0; ipan</*MAX_BASECHANNELS*/64; ipan++) if (pifh->chnpan[ipan] != 0xFF) //Header only has room for settings for 64 chans...
@@ -1019,7 +1019,7 @@
case 'PMM.': fadr = reinterpret_cast<BYTE*>(&m_nPlugMixMode); break;
case 'CWV.': fadr = reinterpret_cast<BYTE*>(&m_dwCreatedWithVersion); break;
case 'LSWV': fadr = reinterpret_cast<BYTE*>(&m_dwLastSavedWithVersion); break;
- case 'SPA.': fadr = reinterpret_cast<BYTE*>(&m_nSongPreAmp); break;
+ case 'SPA.': fadr = reinterpret_cast<BYTE*>(&m_nSamplePreAmp); break;
case 'VSTV': fadr = reinterpret_cast<BYTE*>(&m_nVSTiVolume); break;
case 'DGV.': fadr = reinterpret_cast<BYTE*>(&m_nDefaultGlobalVolume); break;
case 'RP..': fadr = reinterpret_cast<BYTE*>(&m_nRestartPos); break;
@@ -1238,7 +1238,7 @@
fwrite(&id, 1, sizeof(id), f);
id = m_nDefaultGlobalVolume;
fwrite(&id, 1, sizeof(id), f);
- id = m_nSongPreAmp;
+ id = m_nSamplePreAmp;
fwrite(&id, 1, sizeof(id), f);
id = m_nDefaultSpeed;
fwrite(&id, 1, sizeof(id), f);
@@ -1502,7 +1502,7 @@
if (m_dwSongFlags & SONG_ITCOMPATMODE) header.flags |= 0x20;
if (m_dwSongFlags & SONG_EXFILTERRANGE) header.flags |= 0x1000;
header.globalvol = m_nDefaultGlobalVolume >> 1;
- header.mv = m_nSongPreAmp;
+ header.mv = m_nSamplePreAmp;
if (header.mv < 0x20) header.mv = 0x20;
if (header.mv > 0x7F) header.mv = 0x7F;
header.speed = m_nDefaultSpeed;
@@ -2085,7 +2085,7 @@
if (m_dwSongFlags & SONG_ITCOMPATMODE) header.flags |= 0x20;
if (m_dwSongFlags & SONG_EXFILTERRANGE) header.flags |= 0x1000;
header.globalvol = m_nDefaultGlobalVolume >> 1;
- header.mv = m_nSongPreAmp;
+ header.mv = m_nSamplePreAmp;
if (header.mv < 0x20) header.mv = 0x20;
if (header.mv > 0x7F) header.mv = 0x7F;
header.speed = m_nDefaultSpeed;
@@ -3139,11 +3139,11 @@
fwrite(&size, 1, sizeof(__int16), f);
fwrite(&m_dwLastSavedWithVersion, 1, size, f);
- code = 'SPA.'; //write m_nSongPreAmp
+ code = 'SPA.'; //write m_nSamplePreAmp
fwrite(&code, 1, sizeof(__int32), f);
- size = sizeof(m_nSongPreAmp);
+ size = sizeof(m_nSamplePreAmp);
fwrite(&size, 1, sizeof(__int16), f);
- fwrite(&m_nSongPreAmp, 1, size, f);
+ fwrite(&m_nSamplePreAmp, 1, size, f);
code = 'VSTV'; //write m_nVSTiVolume
fwrite(&code, 1, sizeof(__int32), f);
Modified: trunk/OpenMPT/soundlib/Load_med.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_med.cpp 2007-02-26 21:38:06 UTC (rev 173)
+++ trunk/OpenMPT/soundlib/Load_med.cpp 2007-03-13 22:14:22 UTC (rev 174)
@@ -515,7 +515,7 @@
Log("\n");
#endif
m_nType = MOD_TYPE_MED;
- m_nSongPreAmp = 0x20;
+ m_nSamplePreAmp = 0x20;
dwBlockArr = BigEndian(pmmh->blockarr);
dwSmplArr = BigEndian(pmmh->smplarr);
dwExpData = BigEndian(pmmh->expdata);
Modified: trunk/OpenMPT/soundlib/Load_s3m.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_s3m.cpp 2007-02-26 21:38:06 UTC (rev 173)
+++ trunk/OpenMPT/soundlib/Load_s3m.cpp 2007-03-13 22:14:22 UTC (rev 174)
@@ -226,7 +226,7 @@
// Global Volume
m_nDefaultGlobalVolume = psfh->globalvol << 2;
if ((!m_nDefaultGlobalVolume) || (m_nDefaultGlobalVolume > 256)) m_nDefaultGlobalVolume = 256;
- m_nSongPreAmp = psfh->mastervol & 0x7F;
+ m_nSamplePreAmp = psfh->mastervol & 0x7F;
// Channels
m_nChannels = 4;
for (UINT ich=0; ich<32; ich++)
@@ -456,7 +456,7 @@
header[0x30] = m_nDefaultGlobalVolume >> 2;
header[0x31] = m_nDefaultSpeed;
header[0x32] = m_nDefaultTempo;
- header[0x33] = ((m_nSongPreAmp < 0x20) ? 0x20 : m_nSongPreAmp) | 0x80; // Stereo
+ header[0x33] = ((m_nSamplePreAmp < 0x20) ? 0x20 : m_nSamplePreAmp) | 0x80; // Stereo
header[0x35] = 0xFC;
for (i=0; i<32; i++)
{
Modified: trunk/OpenMPT/soundlib/Load_xm.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_xm.cpp 2007-02-26 21:38:06 UTC (rev 173)
+++ trunk/OpenMPT/soundlib/Load_xm.cpp 2007-03-13 22:14:22 UTC (rev 174)
@@ -642,7 +642,7 @@
case 'PMM.': fadr = reinterpret_cast<BYTE*>(&m_nPlugMixMode); break;
case 'CWV.': fadr = reinterpret_cast<BYTE*>(&m_dwCreatedWithVersion); break;
case 'LSWV': fadr = reinterpret_cast<BYTE*>(&m_dwLastSavedWithVersion); break;
- case 'SPA.': fadr = reinterpret_cast<BYTE*>(&m_nSongPreAmp); break;
+ case 'SPA.': fadr = reinterpret_cast<BYTE*>(&m_nSamplePreAmp); break;
case 'VSTV': fadr = reinterpret_cast<BYTE*>(&m_nVSTiVolume); break;
case 'DGV.': fadr = reinterpret_cast<BYTE*>(&m_nDefaultGlobalVolume); break;
}
Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Snd_fx.cpp 2007-02-26 21:38:06 UTC (rev 173)
+++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2007-03-13 22:14:22 UTC (rev 174)
@@ -2668,6 +2668,18 @@
// if (m_nInstruments) KeyOff(pChn); ?
pChn->nVolume = 0;
pChn->dwFlags |= CHN_FASTVOLRAMP;
+
+ INSTRUMENTHEADER *pHeader = pChn->pHeader;
+ if (pHeader && pHeader->nMidiChannel>0 && pHeader->nMidiChannel<17) { // instro sends to a midi chan
+ UINT nPlug = pHeader->nMixPlug;
+ 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);
+ }
+ }
+ }
+
}
}
Modified: trunk/OpenMPT/soundlib/Sndfile.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.cpp 2007-02-26 21:38:06 UTC (rev 173)
+++ trunk/OpenMPT/soundlib/Sndfile.cpp 2007-03-13 22:14:22 UTC (rev 174)
@@ -178,7 +178,7 @@
RPM. [EXT] nRowsPerMeasure;
RS.. nResSwing;
SEP@ [EXT] chunk SEPARATOR tag
-SPA. [EXT] m_nSongPreAmp;
+SPA. [EXT] m_nSamplePreAmp;
TM.. [EXT] nTempoMode;
VE.. nVolEnv;
VE[. VolEnv[MAX_ENVPOINTS];
@@ -411,7 +411,7 @@
memset(&m_SongEQ, 0, sizeof(m_SongEQ));
m_lTotalSampleCount=0;
- m_nPlugMixMode=plugmix_mode_117RC2;
+ m_nPlugMixMode=plugmix_mode_Test;
m_pConfig = new CSoundFilePlayConfig();
BuildDefaultInstrument();
@@ -438,8 +438,8 @@
m_nInstruments = 0;
m_nFreqFactor = m_nTempoFactor = 128;
m_nMasterVolume = 128;
- m_nDefaultGlobalVolume = 128;
- m_nGlobalVolume = 128;
+ m_nDefaultGlobalVolume = 256;
+ m_nGlobalVolume = 256;
m_nOldGlbVolSlide = 0;
m_nDefaultSpeed = 6;
m_nDefaultTempo = 125;
@@ -454,8 +454,8 @@
m_nRestartPos = 0;
m_nMinPeriod = 16;
m_nMaxPeriod = 32767;
- m_nSongPreAmp = 100;
- m_nVSTiVolume = 100;
+ m_nSamplePreAmp = 128;
+ m_nVSTiVolume = 128;
m_nPatternNames = 0;
m_nMaxOrderPosition = 0;
m_lpszPatternNames = NULL;
Modified: trunk/OpenMPT/soundlib/Sndfile.h
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.h 2007-02-26 21:38:06 UTC (rev 173)
+++ trunk/OpenMPT/soundlib/Sndfile.h 2007-03-13 22:14:22 UTC (rev 174)
@@ -847,7 +847,7 @@
UINT m_nPattern,m_nCurrentPattern,m_nNextPattern,m_nRestartPos, m_nSeqOverride;
bool m_bPatternTransitionOccurred;
UINT m_nMasterVolume, m_nGlobalVolume, m_nSamplesToGlobalVolRampDest,
- m_nGlobalVolumeDestination, m_nSongPreAmp, m_nVSTiVolume;
+ m_nGlobalVolumeDestination, m_nSamplePreAmp, m_nVSTiVolume;
long m_lHighResRampingGlobalVolume;
UINT m_nFreqFactor, m_nTempoFactor, m_nOldGlbVolSlide;
LONG m_nMinPeriod, m_nMaxPeriod, m_nRepeatCount;
Modified: trunk/OpenMPT/soundlib/Sndmix.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Sndmix.cpp 2007-02-26 21:38:06 UTC (rev 173)
+++ trunk/OpenMPT/soundlib/Sndmix.cpp 2007-03-13 22:14:22 UTC (rev 174)
@@ -828,22 +828,33 @@
if(nchn32 < 1) nchn32 = 1;
if(nchn32 > 31) nchn32 = 31;
- int realmastervol = m_nMasterVolume;
- if (realmastervol > 0x80)
- {
- realmastervol = 0x80 + ((realmastervol - 0x80) * (nchn32+4)) / 16;
+
+ DWORD mastervol;
+
+ if (m_pConfig->getUseGlobalPreAmp()) {
+ int realmastervol = m_nMasterVolume;
+ if (realmastervol > 0x80) {
+ //Attenuate global pre-amp depending on num channels
+ realmastervol = 0x80 + ((realmastervol - 0x80) * (nchn32+4)) / 16;
+ }
+ mastervol = (realmastervol * (m_nSamplePreAmp)) >> 6;
+ } else {
+ //Preferred option: don't use global pre-amp at all.
+ mastervol = m_nSamplePreAmp;
}
- DWORD mastervol = (realmastervol * (m_nSongPreAmp)) >> 6;
if ((m_dwSongFlags & SONG_GLOBALFADE) && (m_nGlobalFadeMaxSamples))
{
mastervol = _muldiv(mastervol, m_nGlobalFadeSamples, m_nGlobalFadeMaxSamples);
}
- UINT attenuation = (gdwSoundSetup & SNDMIX_AGC) ? PreAmpAGCTable[nchn32>>1] : PreAmpTable[nchn32>>1];
- if(attenuation < 1) attenuation = 1;
-
- nMasterVol = (mastervol << 7) / attenuation;
+ if (m_pConfig->getUseGlobalPreAmp()) {
+ UINT attenuation = (gdwSoundSetup & SNDMIX_AGC) ? PreAmpAGCTable[nchn32>>1] : PreAmpTable[nchn32>>1];
+ if(attenuation < 1) attenuation = 1;
+ nMasterVol = (mastervol << 7) / attenuation;
+ } else {
+ nMasterVol = mastervol;
+ }
}
////////////////////////////////////////////////////////////////////////////////////
// Update channels data
@@ -1459,8 +1470,7 @@
#define kChnMasterVol nMasterVol
#endif // MODPLUG_TRACKER
// Adjusting volumes
- if (gnChannels >= 2)
- {
+ if (gnChannels >= 2) {
int pan = ((int)pChn->nRealPan) - 128;
pan *= (int)m_nStereoSeparation;
pan /= 128;
@@ -1470,25 +1480,29 @@
#ifndef FASTSOUNDLIB
if (gdwSoundSetup & SNDMIX_REVERSESTEREO) pan = 256 - pan;
#endif
- LONG realvol = (pChn->nRealVolume * kChnMasterVol) >> (8-1);
- if (gdwSoundSetup & SNDMIX_SOFTPANNING)
- {
- if (pan < 128)
- {
+
+ LONG realvol;
+ if (m_pConfig->getUseGlobalPreAmp()) {
+ realvol = (pChn->nRealVolume * kChnMasterVol) >> 7;
+ } else {
+ //Extra attenuation required here if we're bypassing pre-amp.
+ realvol = (pChn->nRealVolume * kChnMasterVol) >> 8;
+ }
+
+ if (m_pConfig->getTreatPanLikeBalance()) {
+ if (pan < 128) {
pChn->nNewLeftVol = (realvol * pan) >> 8;
pChn->nNewRightVol = (realvol * 128) >> 8;
- } else
- {
+ } else {
pChn->nNewLeftVol = (realvol * 128) >> 8;
pChn->nNewRightVol = (realvol * (256 - pan)) >> 8;
}
- } else
- {
+ } else {
pChn->nNewLeftVol = (realvol * pan) >> 8;
pChn->nNewRightVol = (realvol * (256 - pan)) >> 8;
}
- } else
- {
+
+ } else {
pChn->nNewRightVol = (pChn->nRealVolume * kChnMasterVol) >> 8;
pChn->nNewLeftVol = pChn->nNewRightVol;
}
@@ -1544,8 +1558,11 @@
if (pChn->nInc >= 0xFE00) pChn->dwFlags |= CHN_NOIDO;
#endif // FASTSOUNDLIB
}
- pChn->nNewRightVol >>= MIXING_ATTENUATION;
- pChn->nNewLeftVol >>= MIXING_ATTENUATION;
+ if (m_pConfig->getUseGlobalPreAmp()) {
+ pChn->nNewRightVol >>= MIXING_ATTENUATION;
+ pChn->nNewLeftVol >>= MIXING_ATTENUATION;
+ }
+
pChn->nRightRamp = pChn->nLeftRamp = 0;
// Dolby Pro-Logic Surround
if ((pChn->dwFlags & CHN_SURROUND) && (gnChannels == 2)) pChn->nNewLeftVol = - pChn->nNewLeftVol;
@@ -1732,7 +1749,7 @@
VOID CSoundFile::ApplyGlobalVolume(int SoundBuffer[], long lTotalSampleCount)
-//--------------------------------------------------------
+//---------------------------------------------------------------------------
{
long delta=0;
long step=0;
@@ -1754,7 +1771,6 @@
step = delta/static_cast<long>(m_nSamplesToGlobalVolRampDest);
}
}
-
for (int pos=0; pos<lTotalSampleCount; pos++) {
if (m_nSamplesToGlobalVolRampDest>0) { //ramping required
@@ -1767,3 +1783,4 @@
}
}
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|