----------------------------------------------------------------- -- Play16 version 1.10 - a versatile soundplayer for the Amiga -- ----------------------------------------------------------------- Readme.1st ---------- This is a MINOR update. There's not much new... Features in brief ----------------- - FREEWARE! No beta, no nag requesters and no expiry date! - online help - autodetects and plays several soundfiles, up to 16 bit / 56 kHz / stereo - full Workbench support (but not Intuition and no GUI) - always correct playback speed, even for sounds >28 kHz - realtime playback from harddisk, optimized assembler routines - optional 14 bit output (less noise but not as good as true 16 bit) - Supports AHI and soundcards (Prelude recommended!) - automatic or manual audio filter control - plays mono sounds on *both* channels, not only on the left one - plays (and loops) files that are larger than memory - preloading for exactly timed start of playback - fast µ-Law/A-Law decompression - system friendly audio channel allocation - optionally dump the output into a file (can be used to convert sounds) - supported Filetypes are: * Microsoft RIFF-WAVE (.WAV) mono/stereo, 8/16 bit, linear/uLaw/ALaw/ADPCM * Creative Voice File (.VOC) mono/stereo, 8/16 bit, linear * Sun/NeXT Audio (.AU) mono/stereo, 8/16 bit, linear/uLaw * MacroSystem Audio (.MAUD) mono/stereo, 8/16 bit, linear/uLaw * Apple/SGI/Amiga AIFF (.AIFF) mono/stereo, 8/16/24 bit, linear/uLaw/ALaw * Amiga IFF-8SVX (.IFF) mono/stereo, 8 bit, linear/FibDelta/ExpDelta * Any raw sound data as long as it matches one of the following: - 8 bit signed - 8 bit unsigned - 16 bit signed, Intel format (LSB first) - 16 bit signed, Motorola format (MSB first) - 14 bit µ-Law - 14 bit A-Law - supported output devices are: * Native Amiga chipset (Paula) 8 bit * Native Amiga chipset (Paula) 14 bit * Native Amiga chipset (Paula) 14 bit calibrated (Christian Buchner) * MacroSystem Maestro Pro 16 bit 44.1kHz and 48kHz only * IFF-8SVX file dump 8 bit * AHI audio system 16 bit * Prelude 16 bit ========================== Section 1: Quick start ========================= What do I need to use Play16? ----------------------------- Any Amiga running Kickstart/Workbench 2.04 or greater. asyncio.library To use the calibrated 14 bit output you need a valid CyberSound preferences file in your ENVARC: directory. If you don't have one already it can be generated with Christian's calibration package included in this distribution. Maestix.library V39 or higher is required to use the MPro board for output. AHI audio system V2 or higher is required to use AHI output. Where do I find the latest version? ----------------------------------- - AMINET: mus/play - WWW: http://Play16.amiga-software.com further I recommend to have a look at the following packages: Prelude: - WWW: http://www.act-net.com/Prelude/ CyberSound: - AMINET: disk/cdrom/14Bit_CDPlayer.lha Maestix: - AMINET: util/libs/Maestix39_00.lha How do I use it? ---------------- From CLI: Simply type "Play16 " and that's it! From Workbench: Just doubleclick on it's icon. A filerequester will pop up. All possible options will be explained later. If you set none of them, the defaults will be used. ==================== Section 2: Background information ==================== What does it do? ---------------- Basically, Play16 is capable of playing uncompressed and _some_ compressed soundfiles through Amiga's standard audio device or an increasing number of alternative devices. If the actual resolution or playback rate exceeds that of the Amiga hardware, realtime conversion is done so that the sound is being played back correctly. You can even play 16 bit / 44.1 kHz sounds on the old amiga chipset (Paula), providing all parts of your system can keep up with the high data transfer rate and lots of calculations needed for this task. (In this case an accelerated Amiga is recommended :-) The two audio channels at each side can be linked to perform as a single 14 bit channel (subranging). Again, this swallows lots of computing power. Anyway, an Amiga 3000-16MHz is fast enough to play an uncompressed soundfile with full 44.1kHz/14bit output (productivity) directly from harddisk !!! I don't want Play16 to be a program that plays each and every exotic format that exists somewhere. However, I intend to support as many popular file types as possible. Why Play16? ----------- I didn't find any CLI based program to play back 16 bit recordings, on a standard Amiga, so I decided to write one myself. Why CLI based and no GUI? ------------------------- There are so many GUI based directory utilities, simply use Play16 as an external player. Consult the manual of your software package on how to do it. Application example: Assign "Play16 PRELOAD" to a button called "Jingle". Select the desired soundfile and press the Jingle-button. Wait for the appropriate moment and hit the return key - here comes the sound! Nice when audio dubbing your home videos or even on parties :-) How does it work? (technical info) ---------------------------------- The standard Amiga audio device is limited to 8 bit / 28 kHz playbck when using DMA. With the introduction of ECS the 28 kHz DMA barrier was broken - but only if the current displaymode was one with double scan rate like productivity. The reason for this is the dependency between video and audio DMA. If you don't have ECS or if you simply don't want to switch to Productivity just to listen to your desired sound, Play16 can halve the sample rate during playback. Another way to archieve high output rates is using IRQ. This works no matter what the displaymode is. I've been experimenting on that long before I started writing Play16 but there was so much jitter that my current downsampling method sounds much better. To play back even long sounds, the popular method of double buffering is used. Alternatively, all data can be loaded into memory before playback. This is useful when playing short sounds or when loading the sound from floppy disk or slow network transfers. The 14 bit output is archieved by setting the first channel on each side to volume 64 and the second to volume 1. The louder channel then plays the upper 8 bits as usual while the other channel plays the 6 most significant bits of the low byte synchronously. Because timing is very crucial in this case it is nessecary to write directly to hardware registers instead of using the audio.device. This method may not work on future amiga models if there ever will be any... :-/ Unfortunately, Amiga's DACs are not perfectly linear. A significant increase in sound quality can be archieved by calibrating each MSB conversion step individually for your machine. Christian Buchner's CyberSound system supports this kind of calibration. Play16 can load the preferences file generated by Christian's calibration program. The MPro output uses the maestix.library by Richard Körber. Have a look at the Maestix package available on AMINET for further details. =========================== Section 3: Options ============================ What options are provided? -------------------------- There are three ways to specify the options, which are: CLI: In the commandline, using standard AmigaOS 2.x template Workbench: In the icon, using standard Amiga Workbench tooltype entries General: By setting environment variables. This is not possible for all options yet. If you are not familiar with the AmigaOS 2.x commandline template, see the examples below and consult the AmigaOS manual for furhter information. The tooltype entries are identical to the keywords you can specify in the commandline. Also, the environment variables have the same names and reside in ENV:Play16. Basic options: (All options marked with (*) have corresponding env-vars.) HELP/S Display online-help QUIET/S Turns off all text output except error messages VERBOSITY/N Sets the level of verbosity. 0: Just display the banner and error messages 1: Print additional information about the sound file 2: Information about progress and memory usuage 3: Debugging information (may look a bit weird :) Default is level 0. FAST/S(*) Do NOT automatically switch to half sample rate if the soundfile's rate exceeds 28 kHz. Use this option when running your Amiga in Productivity or similar display modes. HIFI/S Obsolete since v1.4 but still included for compatibility reasons. See "OUTPUT/K". VOLUME/N Set the playback volume. This works only for Paula8, Paula14, Paula14c and AHI output. NEW: Volume is specified in percent now! Possible ranges are: Paula8: 0% - 100% Paula14: 0% - 400% (boost) Paula14c: 0% - 400% (boost) AHI: 0% - 100% ATTENTION! If you try to boost a sound that is already full scale this will result in excessive clipping. OUTPUT/K(*) Set Play16's output device. Possible options are: Paula8 Standard 8 bit output through Amiga hardware. This option is the default. Paula14 Turn on the 14 bit output. Watch out! This is a nasty routine that writes directly to some hardware registers. I've done everything I can to prevent Play16 from interfering with other running tasks in this case but you'll never know... Use it with care! Paula14c Same as Paula14 but using the calibration preferences for even better sound quality. See Section 2 for details. MPro Use MacroSystem's Maestro Pro board for output. 44.1kHz and 48kHz sounds only. For 44.1kHz output a valid and stable signal has to be present on the standard input. See the manuals of Maestix and the MPro board for further info. AHI Use Martin 'Levicitus' Blom's AHI audio system for output. Prelude Directly use the Prelude soundcard for output. 8SVX Do not play the sound but create an IFF-8SVX file containing the data. Basically this is the output generated by redirected into a file. The filename will be the input file's name with "iff" appended. WARNING: All limitations of apply here as well, which are: - Every 16 bit sound will be cropped to 8 bits resulting in loss of quality. - If you DO NOT set the FAST keyword, the sample rate of the output file will be limited to 28kHz and downsampled automaticlly if nessecary. I recommend to keep the original file if you have enough space. If you don't you may be disappointed of your converted 8 bit sounds when you buy a better sound system! OUTNUM/N(*) If the selected playback device has more than one output you can specify its number here (currently only supported by AHI). FILTER/K(*) FILTER=ON : Enable audio filter for playback FILTER=OFF : Disable audio filter for playback FILTER=AUTO: Turn filter on or off depending on sample rate If you don't specify this keyword Play16 will leave the hardware registers of the audiofilter completely untouched. LOOPS/N Determines the number of loops to be played. Default is 1 loop. (Play the sound once.) LOOPS=0 means infinite number of loops. Advanced Options: WINDOW/K(*) Specify output window for Workbench startup. This Keyword can only be used in the ToolType entries of the Play16 icon itself. If you don't set this, the hardcoded default will be used. PATH/K Set the default path for the filerequester. In the command line, specifying just a path instead of a filename has the same effect. SINGLE/S Use only one buffer rather then two and load all data into memory before playback. PRIORITY/N Set Play16's task priority. May vary from -25 to 25, default is 1. MULTIPLE/S Open the filerequester again, after all files have been played. BUFFER/N AsyncIO Buffersize in KBytes. Default is 64. PRELOAD/S Load enough data into memory for immediate start of playback at a keypress MODE/N Don't pop up and AHI mode requester but use the given mode instead. If the lower word of the ModeID is zero BestAudioID will be used to find a suitable mode. You can use GAIP16 (included) to find out the ModeID you want. Take the first decimal number for hardware selection only (BestAudioID is used) or the second decimal number to force a specific mode. RAW/S Disable autodetect and tell Play16 what the actual format of the sound data is. However, if Play16 can't detect the filetype it will switch to RAW mode automatically. If you don't want this to happen you can specify STRICT: STRICT/S Play only files that are supported by the autodetect routine Use this if you don't want to get scared by the sudden noisy output when trying to play back other data than sound :-) OUTPATH/K Use this path for writing converted 8SVX files instead of the same directory Examples: a) Play16 music.wav Simply play the file called music.wav once and directly from harddisk. b) Play16 music.wav SINGLE Same as above but load all data into memory before playback. Use this when loading soundfiles from floppy disk. c) Play16 music.wav SINGLE VERBOSITY=1 Same as b, but with additional information being printed out. d) Play16 rhythm.wav LOOPS=10 Play the rhythm as a continuous loop, i.e. over and over again (10 times) e) Play16 explosion.wav SINGLE PRELOAD Load the complete explosion sound into memory, then wait for you to hit before playback. f) Play16 MyFavouriteTune.wav FAST OUTPUT=8SVX Convert the given file to IFF-8SVX without changing the sample rate. g) Play16 MyFavouriteTune.wav OUTPUT=8SVX Same as f but limit the sample rate of the converted file to 28kHz! h) Play16 DemoSound RAW ALAW FREQ=8000 Play a raw ISDN A-Law file generated by WilhelmTEL The following options tell Play16 what parameters to use when in RAW mode. This happens either if you set the RAW keyword or if Play16 could not identify the file and STRICT was _not_ set. Options when in RAW mode: FREQ/N Sampling frequency in Hz TRACKS/N Number of tracks, 1 for mono, 2 for stereo BITS/N Resolution in bits, may be 8 or 16 HEADER/N Length of header: This is the number of bytes to be skipped at the beginning of the file. UNSIGNED/S Data is unsigned, not signed (only valid for 8 bit sounds) INTEL/S Data is in Intel format (only valid for 16 bit sounds) ULAW/S Data is compressed using the µ-Law compression scheme ALAW/S Data is compressed using the A-Law compression scheme The default settings are: 22050 Hz, mono, 8 bits, no header. How do I use this RAW mode? --------------------------- Umm, err, difficult to explain, even harder to understand... Well, if you know the data format of the soundfile, simply set RAW, FREQ, TRACKS, BITS, UNSIGNED and INTEL accordingly. If you don't, the only way to find it out is by trial and error :) Here are some tips to make it a bit easier: Don't set HEADER to an odd number. (Leave it at 0, first.) If you set BITS to 16 and hear nothing but noise, try to set INTEL. If you set BITS to 8 and the sound is distorted, try to set UNSIGNED. If the above does not help, try different combinations of BITS, INTEL and UNSIGNED. If you manage to get a recognisable sound output which is either too fast or too slow, start experimenting on TRACKS and FREQ. If you want to play known files and raw ones without changing the command line, simply specify all you know about the raw data and leave out the RAW and the STRICT keyword. If Play16 can indentify the file it will use its parameters. If the filetype is unknown your specified parameters will be used instead. Legal stuff ----------- Play16 is copyrighted freeware. It may be distributed freely as long as no modifications are made to the executable and this document. A nominal fee may be asked to cover distribution costs. Play16 may not be used for any commercial purposes or included with any commercial product without the written permission of the author. No responsibilities are taken for damaged speakers, amplifiers, Amigas or any other components or data involved while using Play16. Although I've done some beta testing I can't guarantee that Play16 will not crash! If you find any bugs, let me know. It is NOT the fault of MacroSystem NOR does it represent the quality of their products if the MPro output or the maestix.library should fail. Miscellaneous ------------- I don't claim Play16 to be fast. I've done some optimizing - but because the loader/converter module is a universial one, more data is actually being moved around different memory blocks than needed for playback. However, I've implemented separate optimized routines for 8 bit and for 14/16 bit. * Please note that English is not my native language :) I can be reached at... Internet: AmigaTom@gmx.de History ------- V0.5ß - Initial beta test release V0.6ß - Optimized the code a bit. V0.7ß - Fixed some severe bugs that caused Play16 to crash when trying to load corrupted files. V0.8ß - Play16 can now be stopped by pressing ctrl-c during playback. The buffer that is currently being played will be finished first. - Automatic filter control depending on sample rate. V0.9ß - Added 'loop'-option. Sample can be played several times. - All time consuming routines now in hand optimized assembler code. v1.0ß - Play16 now uses standard OS2.x commandline template. Thanks to Kai for persuading me to do this :) v1.0 - Done some minor bugfixes. v1.1 - Oops! Play16 caused some Enforcer hits. Fixed that. Thanks to Rod Schnell for reporting it. - Added 'single'-option. Sound can be loaded completely into memory before playing. No looping possible in this case yet! - Playback time in minutes:seconds displayed if verbose >= 1 - uLaw decompression for WAVE-Files, using a decoding table for maximum speed (didn't do much testing on it, hope it works!) - MAUD filetype support (why do there have to be so many formats?) - AIFF filetype support - ctrl-c now stops playback immediately. Thanks to Marc for some programming tips about that. v1.2 - IFF-8SVX filetype support (only uncompressed files!) - RAW data support: _Any_ data can be played - Preload feature added - Fixed a bug that caused illegal memory access (hopefully) Thanks to Ignatios Souvatzis for reporting it. - Improved chunk handling v1.3 - 14 bit output (finally!) - Any file Play16 can't recognise is considered raw data unless you set the STRICT keyword - Fixed a bug in WAV filetype length determination - Advanced audiofilter control / original state will be restored after playback - More information about sound (AUTHOR or ANNO-Chunk) is being printed out if VERBOSE>=1. However, Play16 will *not* search the whole file for that string. If it doesn't come before the sound data -- bad luck :-) v1.3a - Bugfix in chunk handling routine: Chunks with an odd length were treated incorrectly. This bug accompanied all versions of Play16, even v1.0. However, I decided to release a fix now instead of letting you wait until v1.4 is finished. v1.4 - Wildcard and multiple file support - Environment variable support (partial) - A filerequester will pop up if no filename is given - Workbench support, including icon with tooltype entries - Maestro Pro output, using Richard Körber's Maestix package - Calibrated 14 bit output, using Christian Buchner's CyberSound package - IFF-8SVX file dump - Creative VOC support (currently only 1st data block) (This format crazy :-)) - Closing the output window now stops playback, too - Looping now for single mode as well, LOOPS=0 won't cause a severe crash any more Thanks to Andy Church for reporting it. - Open a screen during playback, e.g. productivity for fast DMA - German docs v1.5 - Fixed a bug that caused enforcer hits when running Play16 from CLI - Changed the depth of Play16's productivity screen to 1 bitplane to reduce CPU- and DMA-load - "Play16 " now opens a filerequester pointing to the specified path. The new PATH tooltype does the same. - Fixed mono playback of raw tracks. - uLaw decompression for MAUD, too - Fibonacci Delta decompression for 8SVX, thanks to Ralph Wermke. v1.6 - Improved the V34 performance. (whoops, wrong file! :-))) - A one-plane-screen will now be used for CLI mode as well. - Task priority is now reset to 0 at exit. - Files with additional data after the sound chunk are now being played correctly. - CTRL-D now skips the current sound and starts playing the next one. - ASL library will only be opened if a filerequester is really needed. Thanks to all who suggested to do this. - New option: Volume (only for Paula8 mode) - New option: Multiple (only if filerequester pops up) - No more chunks of odd length in 8SVX dump - MS-ADPCM decompression for WAV files - RAW option works now as a Tooltype entry as well - Nice MagicWB icon for the Play16 drawer done by Mario Cattaneo v1.7 * New features: - Online help - A-Law decompression for RIFF-Wave and ISDN-Master RAW - Now using AsyncIO.library to read the audio data - AHI audio system support (still experimental) - Exponential Delta decompression for 8SVX * Fixed bugs: - MULTIPLE does not hang any more - Hopefully no more illegal memory access for FibDelta playback - No more crashes when ecountering unknown 8SVX compression methods v1.8 * New features: - Finally AIFF-C support! Sorry for the delay. - AHI seems to be stable. Currently lowlevel support only. - Volume is specified in percent now. Up to 400% boost is available in Paula14 and Paula14c modes. - Quickly put in the 4 lines of code needed for Native Prelude support - Corresponding environment variable for FAST/S (do »SetEnv FAST 1« to enable it) - A different output path for converted 8SVX files can be specified - Different versions using asyncio.library or standard AmigaDOS * Fixed bugs: - Finally fixed break bug when using multiple. (I hope.) *growl* - Some MAUD files weren't played til the end. Changed the method how the length is computed. MAUD is obsolete anyway. - VOLUME now works for AHI playback, too - Task priority is changed _only_ if specified and not zero - Files written with OUTPUT=8SVX will be closed now - Removed unnessecary byte padding when writing 8SVX files - Yikes! Pattern matching was used even for Workbench icons all the time. Fixed. v1.9 * New features: - 24-bit AIFF support, playback will still be 16-bit though - more verbose error reporting why a file can't be played - recompiled with SAS/C 6.50 - OUTNUM option to select among different outputs of AHI devices * Dropped features: - removed the screenmode hack v1.10 * New features: - µ-Law and A-Law AIFF support - time counter - QUIET option - minimum stacksize defined in startup code * Dropped features: - removed the 68000 version - keep using Play16 v1.8 if you still haven't got a faster processor! Future plans ------------ - none! I won't add any more proprietary file types! If you bribe me with lotsa money I'll think about it. ;-) Known bugs ---------- Looping of Fibonacci Delta sounds may be distorted. Large VOC sounds can't be played completely. No-one uses VOC anyway... If there's not enough free CPU time, Play16 sometimes repeats parts of the sound and may stop playback prematurely. Maybe asyncio will reduce this problem a bit. On some systems Paula14 and Paula14c produce garbage (wrong buffer order) at the beginning of playback. So far I haven't been able to solve this problem. Use a soundcard instead. Credits ------- Thanks go to the following persons: Kai Stuke for many vital hints on C programming and the Amiga audio device and for beta testing this program. Marc Albrecht for doing some beta testing as well, giving valuable hints on optimizing the code and translating this document into German. Clete Baker for supplying the AIFF- and SDII specs. Alex Kazik for helping me with µ-Law and A-Law AIFF Richard Körber for writing the Maestix Library and making it freeware. Christian Buchner for his research and ideas on how to improve the 14bit output by calibrating the DACs individually. Mario Cattaneo for the nice Play16 drawer icon Christian A. Weber for his good ISDN A-Law decoder source Martin Blom for his neat AHI audio system And to all the people who wrote me!