From: <sag...@us...> - 2010-05-08 22:11:39
|
Revision: 590 http://modplug.svn.sourceforge.net/modplug/?rev=590&view=rev Author: saga-games Date: 2010-05-08 22:11:33 +0000 (Sat, 08 May 2010) Log Message: ----------- [Mod] Added some more examples to the (still unfunctional) sample generator. [Ref] Small changes to the code from the last revision. Forgot to mention that this code was actually by coda, so thanks! Modified Paths: -------------- trunk/OpenMPT/mptrack/SampleGenerator.cpp trunk/OpenMPT/mptrack/View_gen.cpp Modified: trunk/OpenMPT/mptrack/SampleGenerator.cpp =================================================================== --- trunk/OpenMPT/mptrack/SampleGenerator.cpp 2010-05-08 16:57:45 UTC (rev 589) +++ trunk/OpenMPT/mptrack/SampleGenerator.cpp 2010-05-08 22:11:33 UTC (rev 590) @@ -596,6 +596,10 @@ preset.expression = "sin(xp * _pi / 50 * 440 * len / freq)"; presets.AddPreset(preset); + preset.description = "Brown Noise (kind of)"; + preset.expression = "rnd(1) * 0.1 + smp(x - 1) * 0.9"; + presets.AddPreset(preset); + preset.description = "Noisy Saw"; preset.expression = "(x mod 800) / 800 - 0.5 + rnd (0.1)"; presets.AddPreset(preset); @@ -618,10 +622,15 @@ preset.description = "Laser"; preset.expression = "sin(xp * _pi * 100 /(xp ^ 2)) * 100 / sqrt(xp)"; + presets.AddPreset(preset); + preset.description = "Noisy Laser Hit"; + preset.expression = "(sin(sqrt(xp) * 100) + rnd(1) - 0.5) * exp(-xp / 10)"; presets.AddPreset(preset); + preset.description = "Twinkle, Twinkle..."; preset.expression = "sin(xp * _pi * 100 / xp) * 100 / sqrt(xp)"; + presets.AddPreset(preset); preset.description = "FM Tom"; preset.expression = "sin(xp * _pi * 2 + (xp / 5 - 50) ^ 2) * exp(-xp / 10)"; @@ -630,6 +639,11 @@ preset.description = "FM Warp"; preset.expression = "sin(_pi * xp / 2 * (1 + (1 + sin(_pi * xp / 4 * 50)) / 4)) * exp(-(xp / 8) * .6)"; presets.AddPreset(preset); + + preset.description = "Weird Noise"; + preset.expression = "rnd(1) * 0.1 + smp(x - rnd(xp)) * 0.9"; + presets.AddPreset(preset); + } Modified: trunk/OpenMPT/mptrack/View_gen.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_gen.cpp 2010-05-08 16:57:45 UTC (rev 589) +++ trunk/OpenMPT/mptrack/View_gen.cpp 2010-05-08 22:11:33 UTC (rev 590) @@ -1485,26 +1485,28 @@ } +// This is used for retrieving the correct background colour for the +// frames on the general tab when using WinXP Luna or Vista/Win7 Aero. typedef HRESULT (__stdcall * ETDT)(HWND, DWORD); HBRUSH CViewGlobals::OnCtlColor(CDC *pDC, CWnd* pWnd, UINT nCtlColor) //------------------------------------------------------------------- { static bool bUxInited = false; - static ETDT m_ETDT = nullptr; + static ETDT hETDT = NULL; if(!bUxInited) { HMODULE uxlib = LoadLibrary("uxtheme.dll"); if(uxlib) - m_ETDT = (ETDT)GetProcAddress(uxlib, "EnableThemeDialogTexture"); + hETDT = (ETDT)GetProcAddress(uxlib, "EnableThemeDialogTexture"); bUxInited = true; } switch(nCtlColor) { case CTLCOLOR_DLG: - if(m_ETDT) - m_ETDT(*pWnd, ETDT_ENABLETAB); + if(hETDT) + hETDT(*pWnd, ETDT_ENABLETAB); } return CFormView::OnCtlColor(pDC, pWnd, nCtlColor); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |