Oversampler v1.0 April, 23. 1992 ____________________________________________________________ The Oversampler isn't anything special at all. It's just a small program demonstrating the oversampling technique on the Apple IIGS. The other major feature of Oversampler is the ability to play digitized sound directly from disk without loading them into memory. The advantage is that you can instantly play long long sounds without waiting to load them from disk and you don't need to have 8 MB ram to play sounds of 8 MB - in fact Oversampler only requires 16 KB of free space! Oversampling ------------ If you own a CD player you may have read in the manual that your CD player uses four or eight times oversampling to improve sound quality. Oversampler is doing the same. With 2-times oversampling the program loads 8 KB of sound into memory, doubles the wave to 16 KB in sound ram by adding an intermediate value between every two values (e.g. 10, 20, 40, 25, 15, ... becomes to 10, 15, 20, 30, 40, 32, 25, 20, 15, ...) and doubles the frequency in order to play the sound at the correct speed. 4-times oversampling quadruples wave size and frequency by inserting 3 intermediate bytes and so on... 50 45 40 x x 35 ===> 30 2-times * * 25 x oversampling x 20 x ===> x * 15 x * x 10 x x * 0 ... ... -10 -15 Using the program ----------------- Open first a sound file by selecting 'Open' from the 'File' menu. You can select files of any type but Oversampler treats every file as raw data. Zeros in the data are converted to $01 so you're able to play Macintosh sounds as well. (Otherwise the oscillator would stop when detecting a zero.) A dialog box appears with following options: Volume: Set the volume of the selected output channel. Explained in section 'Output' Frequency: With this scroll bar you can set the playback rate. When you open a file the auxtype is taken as default frequency (if 10 < auxtype < 900 else freq = 200.) To get the frequency in Hertz just multiply the shown rate by 51.406. Echo Delay: Use this scroll bar to set the echo to off (default) or to the delay you desire. A delay of 16 is about 1/3 second (16/60) so the echo source would be approximately 55 m (180 ft) away. Echo and oversampling mode won't work together (yet)! The echoed channel (right) has about 3/4 the volume of the original channel (left). Output: Stereo (default): Select this if you own a stereo card. The volume control will affect the oscillators volumes. Left & Right: Use these options to test you stereo card...(well, actually I don't know why I added these options.) Internal: If you use your internal speaker or if you have connected your GS to an external speaker via phone plug select 'Internal'. The volume scroll bar will only change the system volume. Oversampling: Off: (default) No oversampling. 2-times/ 4-times: Enables the oversampling mode as explained earlier. Please remind that Oversampler internally doubles/ quadruples the frequency rate and disk access will be twice/ four times as fast as at normal playback. Your disk might be too slow then. (-> Play) Close: Closes the file. (Shortcut: Command-W) Play: Starts playing the sound from disk. Press the ESC key to stop the playback. If your disk device is to slow to keep up with the playback rate you'll get a message. In this case try decreasing the frequency or disabling the oversampling mode. The highest rate for the Apple 3.5" drive is about 375 (with Transwarp and w/o oversampling). My Vulcan - and most harddisks I think - won't have any problems at rates above 900. ____________________________________________________________ Oversampler was written in 100% assembly language on Merlin 16+ (the best programming environment!) Resources were created on Genesys (the best resource editor!). ____________________________________________________________ Write to: Andre Horstmann GEnie A.HORSTMANN Hoehenweg 3d Internet shadow@beiz.mediatex.ch CH-6300 Zug Fax +41-42-22 45 72 Switzerland