4]-------------------- 3]DIGIFILTER 3]Copyright © 1990 3]By John Leonard 3]186 Hoover Ave. 3]Bloomfield, NJ 07003 4]-------------------- (JUMPDISK NOTE: When you run DIGIFILTER you'll want some sounds to play around with. Ahead is a list of sounds in the DownHill_Challenge drawer of this issue: j:downhill_challenge/yay3.instr j:downhill_challenge/ow.instr j:downhill_challenge/shhh.instr j:downhill_challenge/bam.instr j:downhill_challenge/ding2.instr j:downhill_challenge/jump.instr j:downhill_challenge/paddle.instr 3] DO NOT SAVE ANY OF THESE SOUNDS USING DIGIFILTER UNLESS YOU ARE WORKING 3]WITH A COPY OF JUMPDISK. You don't want to change the quality of the sounds used by Downhill_Challenge. Saving should be delayed until you use DigiFilter in your own work.) DigiFilter digitally filters IFF sound samples and eliminates unwanted frequencies from the result. It uses a digital filter of the type known as a "Hamming" window. This is a recursive filter that produces far less phase- induced distortion than many commonly used non-recursive filters. The program provides low pass, high pass, band pass, and band reject filters. To load a sample for filtering, press the LOAD ORIGINAL button, type the name of the sample you want in the file requester that appears, and press Return. If the alert "Sample Will Double Up" occurs, that means that only one copy of the sample will fit into the memory currently available. You can hear the sample by pressing the PLAY ORIGINAL button. After a sample has been filtered, pressing the PLAY RESULT button will play the filtered sample and pressing the PLAY ORIGINAL button will play the unfiltered sample. If the sample was doubled up upon loading, both buttons will play the filtered sample. To filter the sample, press the FILTER button. There are pulldown menus for DESIGN and PREFERENCES at top left of screen. The filter, whose characteristics are set by the entries on the DESIGN and PREFERENCES menus, will be applied to the original sample, and the result will be stored in the result sample area. To save the filtered sample, press the SAVE RESULT button. Then, type the name under which it will be saved in the file requester that appears and press Return. If you have the memory, by saving the result to RAM:, you can achieve a greatly increased amount of flexibility in your use of the program. By pressing the COPY button, the result sample can be copied back to the original sample buffer, where it can be filtered again. 3]DESIGN MENU Low Pass: Allows low-end frequencies to pass. High Pass: Allows high-end frequencies to pass. Band Pass: Allows a select range of frequencies to pass. Band Reject: Omits a select range of frequencies. Max Align: Scales a low-volume sample so its maximum amplitude is 127. x 0.9: multiplies the volume of a sample by 0.9 3]PREFERENCES MENU Forbid/Permit: With this item you may toggle between allowing and disallowing task-switching during the filtering process itself. If there are other tasks running simultaneously, this will speed the filtering process. OverFlow: There are three subitems under this item which allow you to choose the way in which overflow is dealt with. Overflow occurs when a sample point in the filter result is outside of the range [-128 thru 127]. Truncation omits all but the lowest eight bits of the sample point value. This results in some noise but is the fastest of the three methods available. Rescale: First, the sample is filtered. As it is filtered, the maximum value of all the resulting sample points is recorded. After the filter is complete, if the maximum value is outside of the allowed range, a scaling factor is produced. This factor's product, when multiplied by the maximum value of the result, will just fit inside the allowed range. The sample is then re-filtered and each of the resulting sample points is multiplied by the scaling factor. The maximum value of the result is now equal to the maximum value allowed. This method is the longest of the three but for some samples will produce the highest quality, lowest noise result. Set To Constant works in the same way that Truncate works, except an overflowed value is set to a constant instead of merely being truncated. This results in slightly less noise but takes longer to compute because of the test for maximum that must be performed for each point. Set Filter Params: Selecting this item opens a requester that allows you to specify the: Low cut-off frequency: This is the frequency that is used by the low pass, band pass, and band reject filters as their operating low frequency. In the low pass filter, frequencies below this one will be passed --appear in the result --and those above will be cut out. High cut-off frequency: This value is used by the high pass, band pass, and band reject filters as their operating high frequencies. Both the low frequency and high frequency settings should be made with consideration of the max frequency readout in the lower left-hand corner of the filter window. This is half the sampling frequency as it appears in the sample file. No frequencies, other than noise, higher than this will appear in the result when it is played back at that sampling frequency. The behavior of the low pass and high pass filters is undefined, if the low frequency is set higher than the high frequency. Cutoff frequencies, plus a multiple of the sampling frequency, should produce the same filter. The method of computation is called a "convolution" and the time it takes is roughly proportional to the product of the filter length and the sample length. For filtering with truncation or constant: t [uSecs] = 16 * FilterLength * SampleLength A 160,000 byte sample, with a filter length of 7 might be expected to take about: 16 * 160,000 * 7 = 17,920,000 uSecs or 18 seconds. Use of the Max Align, and x 0.9 items: The Truncate filter setting works well and will produce little or no noise, as long as the resulting sample does not overflow the byte-length sample point size. One way of insuring this is to attenuate the original sample before it is filtered. This can be done by selecting the x 0.9 filter, filtering the sample, and copying it back to the original buffer. Then select the desired filter (low pass, etc.) from the design menu and filter the attenuated sample. If the volume of the result is too low, it can be copied back to the original area, Max Align selected from the design menu, and the filter performed again in order to bring the maximum sample point up to to maximum allowed. All these operations add to the noise present in the result, though if little attenuation is needed, the reduced filtering time may well be worth the small amount of noise added. A note about aliasing: If a sound is sampled at 10000 Hz, the highest frequency that will record accurately is 5000 Hz. All frequencies above this will record as frequencies between 0 and 5000 Hz. All frequencies separated by a multiple of the sampling frequency (e.g. 1500 Hz and 11500 Hz) are called "aliases" of one another and they will all record as the same frequency (i.e. 1500 Hz). Clearly, aliasing produces noise in a sample. This noise cannot easily be removed by any methods now available. Therefore, when making a sample, care should be taken to prevent frequencies greater than half the sampling frequency from being recorded. This is accomplished by placing an analog low pass filter, whose cutoff is set somewhere below half the sampling frequency, into the signal path before the analog-to-digital conversion. 4]END OF TEXT