---------------------------------------------------------------------- Convert to SAM ---------------------------------------------------------------------- Version 2.01 (02/15/93) Jim Dahl --------------------------------------- 0. THIS VERSION --------------------------------------- 1.1 HISTORY. This is the third version (versions 1.00 and 1.10 supported only RAW data, requiring a VOC conversion utility to be utilized). With VOC support added, the program has been renamed from RAW2SAM to CVT2SAM to demonstrate its multi-format input capabilities. Future plans include expanded VOC support (repeat blocks) and WAV support (I have yet been unable to obtain the necessary documentation, or WAV support would have been included in this version). Updates will be posted on City Lites BBS (sec 5). Version 2.01 is a minor fix of 2.00, actually released the same day, because I erroneously uploaded an old version of 2.00 to three sites. The difference between 2.00 and 2.01 (should you acquire 2.00 somehow) is that 2.00 cannot properly process repeat blocks. 1.2 WHY USE CVT2SAM? CVT2SAM is provided to you, by me, as a free utility. I encourage you to use it and copy it. CVT2SAM, however, is not 'junkware' (a cheap utility whipped up overnight then sent to the mass markets and left unsupported), rather it constantly evolves and includes many hours work and thousands of lines of code. Each section of code has been rewritten, from scratch, two or three times to optimize the speed and increase modularity of the code. I have heard many comments that the speed of CVT2SAM is amazingly fast compared to other utilities of the type (though most utilities just strip the VOC header and treat the rest as raw data, rather than processing the individual blocks in blocked VOC's). --------------------------------------- 1. PURPOSE --------------------------------------- CVT2SAM.EXE converts raw sound files and VOC files to .SAM files suitable for use in ModEdit. Most types of VOC files and all raw sound types work with CVT2SAM. If the CTV format is not recognized, the type will be assumed to be a raw sample, so unknown formats, such as Microsoft's WAV format, will not be converted correctly. --------------------------------------- 2. USAGE --------------------------------------- After typing 'CVT2SAM' on the command line, the program will prompt for an input file name and an output file name. The output file name will default to the first eight characters of the input file name with a '.SAM' extension. Instead of using the interactive mode, the user can also type: CVT2SAM [InFile] [OutFile] [-?] [-C] If both an input file and an output file are specified, the program will execute the conversion. If only an input file is specified, the program will prompt for an output file, with a default value of the first eight characters of the input file name with a '.SAM' extension. It is recommended that the '.SAM' extension be used, as ModEdit will only recognize those samples which have an '.SAM' extension. CVT2SAM assumes that the OutFile should be overwritten if it already exists and therefore does not prompt or warn the user. The '-?' option brings up a short help screen. The '-C' option instructs the CTV converter to convert even compressed data (see note in section 4.3). --------------------------------------* 3. FUNCTION --------------------------------------* 3.1 WHAT DOES CVT2SAM DO? CVT2SAM converts the sound data from the input file from unsigned to signed sound data. (Most popular sound types, including VOC files, use unsigned data; SAM files use signed data). CVT2SAM also recognizes CTV block types headers and performs the appropriate action to convert the blocks to raw sound data when possible. 3.2 HOW EFFICIENT IS CVT2SAM? CVT2SAM was written in assembly, then PKLITE'd so it is very compact and time efficient. (This version was initially ready for release over a month before the actual date of release, but I pushed back the date to completely rewrite the VOC conversion routines). --------------------------------------* 4. USAGE TIPS - RAW and VOC FILES --------------------------------------* 4.1 VOC SAMPLING RATES. A rate of 8000hz corresponds to C2 in ModEdit, the default instrument pitch. However, with ModEdit 3, you can adjust the rate of each sample at playback or loading time, therefore all VOC speeds and sampling rates can be used. 4.2 VOC BLOCK TYPES. This version of CVT2SAM recognizes VOC file structure and all current block types. Silence blocks are expanded; new data and consecutive data blocks are converted, marker blocks are discarded, message blocks are displayed on the screen, and repeat blocks are ignored at this time. 4.3 VOC COMPRESSION. As the hardware compression feature of the Sound Blaster actually discards data from the VOC, compressed VOC files are not supported. If you do not have or can not obtain a decompressed copy of the VOC file, use the -C switch to tell CVT2SAM to convert compressed data as well (though bear in mind that the actual decompression of it is done by the hardware at playback time only if the sound is in VOC format, so by converting a 2:1 compressed VOC sampled at 8000hz, you would be left with a much poorer quality 4000hz SAM file. That is why hardware compression is NOT supported by default, and not recommended). 4.4 NEW VOC TYPES. Stereo VOC blocks can not be used, as the SAM format does not support stereo and there is no comfortable way to convert a stereo sample to a mono sample. As I gain information of other new block types, I will address them and include them if appropriate. ---------------------------------------- 5. SUPPORT ---------------------------------------- Should you encounter ANY error, please contact me, and send me the file (if applicable). I can be contacted at: Internet JADAHL@VM1.NoDak.Edu City Lites BBS (701) 775-1143 (2400- baud) (701) 772-5399 (9600+ baud) Jim Dahl Home Jim Dahl 2236 Springbrook Ct. Grand Forks, ND 58201 Feel free to contact me with any questions/comments (particularly error reports!) If for some reason you want the source code, no problem, just get in touch.