Dual Module Player for OS/2 1.02 -------------------------------- This is a port of Otto Chrons' Dual Module Player 4.0 (a DOS program) by Julien Pierre. Dual Module Player is a program for playing music modules on different sound systems on IBM PC compatible machines. It uses DSMI sound programming interface (Digital Sound & Music Interface) to achieve high quality sound and wide sound card support. Currently DMP supports following module formats: MOD,NST The original Amiga module format (SoundTracker, NoiseTracker). Also supported by many PC trackers. Original format supported only 4 channels but many variants can support up to 32 channels. STM,S3M Scream Tracker format. S3M can support up to 16 channels while STM is limited to 4. 669 Composer669 module format using 8 channels. FAR Farandole tracker format capable of using 16 channels. MTM MultiTracker format. It's a MOD variant with up to 32 channels. AMF DSMI's internal module format. You can convert all the previous formats to AMF with M2AMF but not vice versa. Using AMF format saves you disk space because AMFs are usually smaller than other module formats. DMP can also load AMFs faster than other formats. But remember that you cannot play AMFs on any other player, nor can you convert AMFs back to any other format. The command-line syntax is the following : DMP module [/8] [/rate] [/MONO] [/AMP=level] [/DRIVER={DART,FILE,MMPM2}] [/NOQUALITY] [/FILENAME=name] [/DARTBUFFER=size] [/LOOP] [/DETECT] All the parameters in [] are optional. The order is not relevant. The only parameter you have to specify is the module filename. By default, DMP will try to use MMPM/2 at 44 kHz stereo 16 bits, using quality mode, and AUTO amplification level.. It will report an error if it cannot initialize the soundcard. You can get an explanation on the parameters by typing DMP without any parameter. Here are some additional informations: /8 : switches to 8-bit mode. Default is 16-bit. Using 8-bit mode degrades the quality. It doesn't decrease the CPU usage - except if you use the MMPM/2 sound driver. You should only use this if you have an 8-bit soundcard like an original Soundblaster or Soundblaster Pro. /MONO : switches to monophonic mode. Default is stereophonic. Using this option will divide the CPU time required by two. /NOQUALITY : disables quality mode. Default is quality mode. Quality mode was originally implemented only on 8-bit sounds cards to overcome the dynamic limitation of 8-bits. It uses 16-bit mixing routines to achieve 96dB dynamic range (instead of 48dB) and post processes the 16-bit data into 8-bits with a look-up table that amplifies the sound. Because of this post processing, the Quality mode takes more processor power but it's worth it. To further amplify the sound you can use '/AMP=level' command line option. For 16-bit cards there's no need to use Quality mode to improve the quality of the sound. But with up to 32 channels the dynamics of individual channels go worse i.e. the volume is lower. You can of course select an amplification option in the sound setup to amplify the sound but there is always a risk of click and noise if the sound overruns. This is where 16-bit Quality mode comes in. It uses a temporary 32-bit buffer to do the mixing and post processes the buffer by clipping values that can't fit to 16-bits. /DRIVER=name : sets the sound driver. May be MMPM2 (default), DART, or FILE. /DRIVER=MMPM2 : By default, DMP will use the MMPM/2 sound driver which should work on all soundcards supported by MMPM/2. However, this requires a lot of memory for buffering, and also a lot of CPU. Because of buffering, the response to keyboard commands will be delayed - from 4 seconds in 16-bit 44 kHz stereo mode to about one minute if you use 8-bit 11 kHz mono mode (I strongly discourage you from using this one !). Also, there will be a corresponding delay before the sound begins. So be patient when using low-quality modes ! Don't e-mail me to say you don't hear anything. The initial delay is due to a bug in MMPM/2 that I bypassed by putting 800 KB of blank data at the beginning. If IBM solves this one, I could remove it. However, the delay in response cannot be suppressed when using MMPM/2 playlists. The delay doesn't apply to the volume command, which controls the hardware setting of the soundcard. /DRIVER=DART : To overcome these limitations, IBM created DART - Direct Audio real-time. It allows much faster access to the soundcard, and real-time as the name says. It has none of the drawbacks of MMPM/2 playlists mentioned above. There will be no initial delay and the keyboard response should be instant. The problem with DART is that it hasn't been officially released. To use it, you need two DLLs from the Entertainment Toolkit that is found on Developer's Connection Volume 8 - new versions of AMPMXMCD.DLL and AUDIOSH.DLL. I was told they could be found at ftp://apts178.residence.gatech.edu/os2/mmedia.zip and ftp://apts178.residence.gatech.edu/os2/sos2beta.zip. Download at your own risk. Another problem is that it doesn't work well with all soundcards (see the /DARTBUFFER parameter), and some cards will require new drivers. IBM still hasn't answered me about the distribution of the DART DLLs - I don't know if I am allowed to distribute them with my application. In doubt, I didn't put them. So sadly you'll have to get a Devcon 8 to use DMP in DART mode. /DRIVER=FILE : This sound driver directs output to the hard disk, just as in the first alpha of DMP that was released in August. By default it goes to TEST.WAV, but you can change this with /FILENAME=name. The volume command has no effect in this mode. /DARTBUFFER=size : I put this parameter because the default 4096 bytes I used didn't work well on all soundcards, especially my Soundblaster 16. It starts working, but usually the sounds get distorded when working in other heavy applications at the same time. Use a size of 32768 with SB16 instead. But the best thing to do is probably to wait for new drivers. As with other soundcards, you have to experiment yourself. I'm interested in feedback about the best size. Beware that the higher the buffersize, the less real-time DMP will be. /LOOP : This mode will make the module loop forever. You'll have to type ESC to stop it. There are known bugs in this function with certain modules. I'm looking at a workaround. /DETECT : enables auto-detection of soundcard capabilities. If you put this parameter, you don't have to (and shouldn't) specify a sampling rate, resolution, or polyphony mode. DMP will try to find the best capabilities for your card itself, instead of defaulting to stereo 16-bit 44kHz. Priority is in this order : stereo, resolution, then sampling rate. For example, that means DMP will choose stereo 8-bit 44kHz over mono 16-bit 44kHz, even though they are the same data rate. :songlist : plays a list of files. This option will make DMP play each module listed in the "songlist" file. It must be an ASCII file containing the full name of each module with relative paths. You can include wildcards inside songlists. /RANDOM : will play the modules in random order. /VOL=xxx : sets the volume to xxx at the beginning of the program, with 0<=xxx<=100. I think that's it. If you find bugs, please report them ! GREETINGS --------- I have to thank many people for their testing of DMP. If you have been forgotten, I'm sorry. I'll put you in version 1.1 ;) Oc, Culus, Nightboob, Os2wizard, dandaman, rwg, hrbeing, Timur Tabi, alav, Linden deCarmo. I must say the OS/2 porting was a real nightmare. It lasted 17 months, but it made me about 10 years older even though I'm only 19. CONTACTING THE AUTHOR --------------------- I can be joined on the internet as madbrain@micronet.fr. My phone is +33-1-30471798. Don't wake me up by phoning during the day, though. Try the night :) The Team OS/2 BBS I run is at +33-1-30472762 (V34 access). My snail-mail is Julien Pierre 5, allee des peupliers 78470 Saint Remy-les-Chevreuse France You can also find me as "madbrain" on Internet Relay Chat (check that it is my address in ".fr" as other people are using this nickname also). Well, forget that, I'll not be on IRC until I pay the damn phone bill. Bug reports : When reporting a bug, please always mention which soundcard you are using, with the version of the driver, the version of MMPM/2 and OS/2. REVISION HISTORY ---------------- 1.0, released November 30th, 1995 : initial release. 1.01, released December 5th 1995 : bugfix in the initialization routine, addition of songlist mode. 1.02, released December 11th 1995 : - addition of wildcard support (including inside songlists) - "@" character for songlists was replaced by ":" since "@" can be used in filenames - addition of "/VOL=" option to set volume on startup - you can now use any number of songlists and files on the command line - addition of the "Q" key to exit the program instead of going to the next module - addition of random playing mode with /RANDOM LICENSE ------- Dual Module Player is a freeware program. But still, if you had $2000 to pay my phone bill, I wouldn't say no ! I wouldn't refuse an OS/2 programmer's job either, as I'm jobless at the time (I'm a dual national American/French citizen). Dual Module Player is copyrighted by me and Otto Chrons. You are only allowed to distribute it in its original form. Programmers interested in using modules in their OS/2 programs should look at the DSMI.OS2 file. DSMI is a commercial library, not freeware.