How to compile the code: - Visual Studio 2008/2010 is required. Express versions won't work as they don't include MFC. - The VST 2.4 and ASIO SDKs are needed for compiling with VST and ASIO support. If you don't want this, uncomment #define NO_VST and #define NO_ASIO in the file StdAfx.h. Have a look at include/readme.txt to find out which exact files you need and where you can get them. If you need further help with the VST and ASIO SDKs, get in touch with the main developers. - You need the DirectX SDK to enable DirectSound output. If you don't want this, uncomment #define NO_DSOUND in the file StdAfx.h. - To compile the project, open mptrack/MPTRACK_08.SLN (if you're using VS2008) or mptrack/MPTRACK_10.SLN (VS2010) and hit the compile button! :) Coding conventions (see below for an example): * Functions / methods are "underlined" (The "//------" comment, see below for an example what it should look like). * Place curly braces at the beginning of the line, not at the end * Generally make use of the custom index types like SAMPLEINDEX or ORDERINDEX when referring to samples, orders, etc. * When changing playback behaviour, make sure that you use the function * CSoundFile::IsCompatibleMode() so that modules made with previous versions of MPT still sound correct (if the change is extremely small, this might be unnecessary) * CamelCase function and variable names are preferred. * When checking the module type, use something like if(GetType() & MOD_TYPE_XXX) instead of if(GetType() == MOD_TYPE_XXX) as it could be theoretically possible that two mod types are set (currently this doesn't happen, but in the future this might actually be used as a code feature :) Code example: void Foo::Bar(int foobar) //----------------------- { while(true) { // some code } } A few words from the readme of the original MPT 1.16 source drop by Olivier: The sound library was originally written to support VOC/WAV and MOD files under DOS, and supported such things as PC-Speaker, SoundBlaster 1/2/Pro, and the famous Gravis UltraSound. It was then ported to Win32 in 1995 (through the Mod95 project, mostly for use within Render32). What does this mean? It means the code base is quite old and is showing its age (over 10 years now) It means that many things are poorly named (CSoundFile), and not very clean, and if I was to rewrite the engine today, it would look much different. Some tips for future development and cleanup: - Probably the main improvement would be to separate the Song, Channel, Mixer and Low-level mixing routines in separate interface-based classes. - Get rid of globals (many globals creeped up over time, mostly because of the hack to allow simultaneous playback of 2 songs in Modplug Player -> ReadMix()). This is a major problem for writing a DShow source filter, or any other COM object (A DShow source would allow playback of MOD files in WMP, which would be much easier than rewriting a different player). - The MPT UI code is MFC-based, and I would say is fairly clean (as a rough rule, the more recent the code is, the cleaner it is), though the UI code is tightly integrated with the implementation (this could make it somewhat more difficult to implement such things as a skin-based UI - but hey, if it was easy, I probably would have done it already :).