<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://sneslab.net/mw/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=LucianoTheWindowsFan</id>
	<title>SnesLab - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://sneslab.net/mw/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=LucianoTheWindowsFan"/>
	<link rel="alternate" type="text/html" href="https://sneslab.net/wiki/Special:Contributions/LucianoTheWindowsFan"/>
	<updated>2026-04-08T00:33:25Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.5</generator>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=FIR_Filter&amp;diff=2189</id>
		<title>FIR Filter</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=FIR_Filter&amp;diff=2189"/>
		<updated>2022-03-31T21:25:30Z</updated>

		<summary type="html">&lt;p&gt;LucianoTheWindowsFan: /* Low-pass filters */  Games fixed (Wonder Woman isn&amp;#039;t even an actual SNES game!).&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:{{#setmainimage:SNES Sound Mixing.png}}|thumb|SNES sound mixing diagram. The FIR Filter plays an important role for the final sound output.]]&lt;br /&gt;
A &#039;&#039;&#039;FIR Filter&#039;&#039;&#039; (&#039;&#039;&#039;F&#039;&#039;&#039;inite &#039;&#039;&#039;i&#039;&#039;&#039;mpulse &#039;&#039;&#039;r&#039;&#039;&#039;esponse filter) is a type of filter used on signal processing. It works by taking the sum of last Nth samples multiplied by a value, called &#039;&#039;&#039;FIR taps&#039;&#039;&#039; or &#039;&#039;&#039;coefficients&#039;&#039;&#039;. It&#039;s finite because if you pass a FIR filter in an impulse response, the impulse will fade out after passing though the N taps. That&#039;s easy to notice since the FIR filter never uses itself as feed unlike the [https://en.wikipedia.org/wiki/Infinite_impulse_response IIR Filter].&lt;br /&gt;
&lt;br /&gt;
On the [[SNES]], the FIR filter has 8 taps which are 1.7 fixed point values. The filter is applied on the echo output so it has &#039;&#039;&#039;direct influence&#039;&#039;&#039; to the sound output and can be used to archive different effects which is more detailed on the following topics.&lt;br /&gt;
&lt;br /&gt;
== Mathematical Definition ==&lt;br /&gt;
The FIR filter can be defined in the following mathematical formula:&lt;br /&gt;
&amp;lt;math&amp;gt;y[n] = \sum_{i=0}^{N-1}b_{i} \cdot x[n-i]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the current output sample Y[n], take the sum of previous N samples from source (including current), multiplied by the FIR coefficient, which is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y[n] = b_{0} \cdot x[n] + b_{1} \cdot x[n-1] + b_{2} \cdot x[n-2] + ... + b_{N-1} \cdot x[n-(N-1)]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The SNES has &#039;&#039;&#039;eight FIR taps&#039;&#039;&#039;, which limits N to 8:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y[n] = \sum_{i=0}^{7}b_{i} \cdot x[n-i]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, &#039;&#039;&#039;the samples are processed from the oldest to the newest sample&#039;&#039;&#039;. That means the first FIR tap is applied to the oldest sample while the last FIR tap is applied to the newest sample:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y[n] = \sum_{i=0}^{7}b_{i} \cdot x[n-(7-i)]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Which in other words, it yields to the equivalent pseudo-code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
y[n] = FIR[0] * x[n - 7] +&lt;br /&gt;
       FIR[1] * x[n - 6] +&lt;br /&gt;
       FIR[2] * x[n - 5] +&lt;br /&gt;
       FIR[3] * x[n - 4] +&lt;br /&gt;
       FIR[4] * x[n - 3] +&lt;br /&gt;
       FIR[5] * x[n - 2] + &lt;br /&gt;
       FIR[6] * x[n - 1] + &lt;br /&gt;
       FIR[7] * x[n - 0];&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where FIR is a array containing the eight taps or coefficients.&lt;br /&gt;
&lt;br /&gt;
== S-DSP Implementation ==&lt;br /&gt;
[[File:Chrono Trigger FIR filter.png|thumb|Example of FIR filter used on Chrono Trigger, which is used as an echo low-pass filter on this case. Screenshot taken from [[SNES SPC700 PLAYER]]]]&lt;br /&gt;
The FIR taps are located on the DSP registers $0F though $7F, where $0F is the first tap (FIR[0]) and $7F is the last tap (FIR[7]).&lt;br /&gt;
&lt;br /&gt;
Because the S-DSP doesn&#039;t have floating point capability, the tap values are actually in the &#039;&#039;&#039;1.7 fixed point, signed format&#039;&#039;&#039;. This means that values between $00-$7F is positive (0 to 127) and $80-$FF is negative (-128 to -1) and after doing the multiplication the value then is divided by 128. So for positive values, $7F means 1.00, $40 means 0.50, $20 means 0.25 and it goes on, while for negative values $80 means -1.00, $C0 means 0.50, $E0 means 0.25 and it goes on.&lt;br /&gt;
&lt;br /&gt;
The coefficients sum is done on a 16-bit integer type, which means that if an overflow occur the value gets &#039;&#039;&#039;clipped&#039;&#039;&#039;. The only exception for this is the &#039;&#039;&#039;last multiplication&#039;&#039;&#039; (last FIR coefficient multiplied by the first sample). For this case, the number gets &#039;&#039;&#039;clamped&#039;&#039;&#039; instead of clipped, e.g.: 18623 + 16888 will yield to 32767 instead of overflowing to -30025.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An accurate implementation of the FIR filter given the above rules would be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
S = (FIR[0] * x[n - 7] &amp;gt;&amp;gt; 6) +&lt;br /&gt;
    (FIR[1] * x[n - 6] &amp;gt;&amp;gt; 6) +&lt;br /&gt;
    (FIR[2] * x[n - 5] &amp;gt;&amp;gt; 6) +&lt;br /&gt;
    (FIR[3] * x[n - 4] &amp;gt;&amp;gt; 6) +&lt;br /&gt;
    (FIR[4] * x[n - 3] &amp;gt;&amp;gt; 6) +&lt;br /&gt;
    (FIR[5] * x[n - 2] &amp;gt;&amp;gt; 6) + &lt;br /&gt;
    (FIR[6] * x[n - 1] &amp;gt;&amp;gt; 6);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;&amp;gt;&amp;gt;&amp;quot; operator is the [[arithmetic right shift]] operation, which on this context is the equivalent by dividing the value by 128 (without decimal places).&lt;br /&gt;
&lt;br /&gt;
With the first 7 taps calculated, we &#039;&#039;&#039;clip&#039;&#039;&#039; it so it&#039;s always within the -32768 to 32767 range:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
S = S &amp;amp; 0xFFFF;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we add the last tap which is multiplied by the current sample, x[n]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
S = S + (FIR[0] * x[n] &amp;gt;&amp;gt; 6);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;clamp&#039;&#039;&#039; it to the -32768 to 32767:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
S = S &amp;gt; 32767 ? 32767 : S;&lt;br /&gt;
S = S &amp;lt; -32768 ? -32768 : S;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It&#039;s important to remember that the [[Echo buffer]] uses &#039;&#039;&#039;15-bit samples&#039;&#039;&#039; instead of 16-bit and it&#039;s &#039;&#039;&#039;left-aligned&#039;&#039;&#039;, so the binary format is: &amp;quot;seee eeee eeee eee0&amp;quot; and not &amp;quot;ssee eeee eeee eeee&amp;quot;. However, when the sample is placed on the FIR ring buffer (x[]), it end ups right shifted so it gets to the &amp;quot;ssee eeee eeee eeee&amp;quot; format.&lt;br /&gt;
&lt;br /&gt;
So we finally take the last bit and we have our FIR value done:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Result = S &amp;amp; 0xFFFE;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each sound channel (left and right) is &#039;&#039;&#039;processed separately&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is a diagram of the FIR filter calculation:&lt;br /&gt;
&lt;br /&gt;
[[File:SNES FIR Filter diagram.png|border]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Because of the integer clipping behavior on the first seven taps, it&#039;s important to your FIR filter maximum gain &#039;&#039;&#039;never exceed&#039;&#039;&#039; 0 dB (or the absolute sum of all FIR taps never exceed 128) for avoiding audio clicks, specially with the first seven taps. &#039;&#039;&#039;Not all games obey that&#039;&#039;&#039;, so the most important is checking out the frequency response of the filter and verifying how the gain behaves for the frequency range.&lt;br /&gt;
&lt;br /&gt;
Once done, the FIR is multiplied by the L/R echo volume and it&#039;s output together the main volume. It&#039;s also multiplied by the echo feedback value and fed back to the echo buffer together the sound output, as you can see on the above diagram.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Timing Information ===&lt;br /&gt;
&lt;br /&gt;
The S-DSP generates &#039;&#039;&#039;one stereo sample&#039;&#039;&#039; every 32 SPC700 clocks. During these 32 clocks, some operations are done by the S-DSP regarding echo and FIR filter. These are the following:&lt;br /&gt;
&lt;br /&gt;
Each time a new sample is generated on the S-DSP, one sample is taken from the echo buffer and inserted on the FIR ring buffer (x[]), which then the ring buffer is used to generate the FIR sample output:&lt;br /&gt;
&lt;br /&gt;
* The left echo channel is inserted on the ring buffer at cycle 22 and written on cycle 29.&lt;br /&gt;
* The right echo channel is inserted on the ring buffer at cycle 23 and written on cycle 30.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The FIR taps are not read immediately, but gradually read while the left and right echo channel are being processed:&lt;br /&gt;
&lt;br /&gt;
* FIR[0] is accessed during cycle 22.&lt;br /&gt;
* FIR[1] and FIR[2] are accessed during cycle 23.&lt;br /&gt;
* FIR[3], FIR[4] and FIR[5] are accessed during cycle 24.&lt;br /&gt;
* FIR[6] and FIR[7] are accessed during cycle 25.&lt;br /&gt;
&lt;br /&gt;
== Frequency response ==&lt;br /&gt;
[[File:VilelaBot Chrono Trigger FIR frequency response.png|thumb|The FIR Filter frequency response of one of the Chrono Trigger songs. Image generated via !vb fir command of [[VilelaBot]]. FIR used: $0C $21 $2B $2B $13 $FE $F3 $F9. It&#039;s a low-pass filter with a cut-off frequency of around ~4.5 kHz.]]&lt;br /&gt;
&lt;br /&gt;
It&#039;s possible to view the &#039;&#039;&#039;frequency response&#039;&#039;&#039; of a FIR filter and therefore visualize which frequencies are amplified or attenuated. The calculations involves [https://en.wikipedia.org/wiki/Discrete-time_Fourier_transform Discrete-time Fourier transform] (DFFT) and are considerably complex. The formula looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
H(\jmath \omega ) = \sum_{n=0}^{N-1}h(n)[cos(n \omega)-\jmath sin(n \omega)]&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
* &amp;lt;math&amp;gt;H(\jmath \omega )&amp;lt;/math&amp;gt; is the output power for given frequency &amp;lt;math&amp;gt;H( \omega )&amp;lt;/math&amp;gt;. It is a complex number, therefore you will end up having two components, which is the &#039;&#039;&#039;magnitude&#039;&#039;&#039; &amp;lt;math&amp;gt;|H(\jmath \omega )|&amp;lt;/math&amp;gt; and &#039;&#039;&#039;phase&#039;&#039;&#039; &amp;lt;math&amp;gt;\measuredangle H(\jmath \omega )&amp;lt;/math&amp;gt;.&lt;br /&gt;
** Magnitude is the &#039;&#039;&#039;output volume&#039;&#039;&#039; e.g. 1.0 is 100% volume.&lt;br /&gt;
** Phase means how &#039;&#039;&#039;late or early&#039;&#039;&#039; is the signal relative to the original, in &#039;&#039;&#039;radians&#039;&#039;&#039; (&amp;lt;math&amp;gt;\pi = +180^{\circ}&amp;lt;/math&amp;gt;). Humans normally don&#039;t perceive phase changes, but combining two close and oppose phased-signals can generate some odd effects like an oscillating signal used on Square SPC engines.&lt;br /&gt;
* &amp;lt;math&amp;gt;h(n)&amp;lt;/math&amp;gt; is the FIR filter taps.&lt;br /&gt;
* &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the amount of taps.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Disregarding SNES clipping and clamping effects, the frequency response of its 8-tap FIR would be calculated as the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;H(\jmath \omega ) = \sum_{n=0}^{7}\textrm{FIR}(7-n)[cos(n \omega)-\jmath sin(n \omega)]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expanding the sum yields:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;H(\jmath \omega ) = \textrm{FIR}(7)+&lt;br /&gt;
\textrm{FIR}(6)[cos(\omega)-\jmath sin(\omega)] +&lt;br /&gt;
\textrm{FIR}(5)[cos(2 \omega)-\jmath sin(2 \omega)] +&lt;br /&gt;
\textrm{FIR}(4)[cos(3 \omega)-\jmath sin(3 \omega)] +&lt;br /&gt;
\textrm{FIR}(3)[cos(4 \omega)-\jmath sin(4 \omega)] +&lt;br /&gt;
\textrm{FIR}(2)[cos(5 \omega)-\jmath sin(5 \omega)] +&lt;br /&gt;
\textrm{FIR}(1)[cos(6 \omega)-\jmath sin(6 \omega)] +&lt;br /&gt;
\textrm{FIR}(0)[cos(7 \omega)-\jmath sin(7 \omega)]&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When doing a visualization, it&#039;s often common to see &#039;&#039;&#039;ripples&#039;&#039;&#039; or signal &#039;&#039;&#039;ringing&#039;&#039;&#039; on certain regions. Even with careful values choice, it&#039;s not possible to attenuate them because of the low amount of taps the SNES FIR filter has, but regardless of the amount of taps they are often common on modern DSP applications and other kind of filters.&lt;br /&gt;
&lt;br /&gt;
[[VilelaBot]] has a command for viewing FIR filters frequency response and gain, see the &#039;&#039;&#039;!vb help fir&#039;&#039;&#039; command for more information.&lt;br /&gt;
&lt;br /&gt;
== Uses ==&lt;br /&gt;
&lt;br /&gt;
The most useful thing that you can do with FIR filters is &#039;&#039;&#039;amplifying or attenuating a frequency range&#039;&#039;&#039;. Effectively, you can create your own [https://en.wikipedia.org/wiki/Equalization_(audio) sound equalizer] depending on your echo settings and main volume combinations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The most common usage involve:&lt;br /&gt;
* Using FIR as a low or high pass filters, normally using 4.5 kHz as the cut-off point:&lt;br /&gt;
** Low-pass to filter out high frequencies from the echo sound output. &lt;br /&gt;
** High-pass to filter out low frequencies from the echo sound output.&lt;br /&gt;
* Band-pass or band-stop filters to allow or disallow a frequency range:&lt;br /&gt;
** Band-pass allows frequency between A and B.&lt;br /&gt;
** Band-stop disallows frequency between A and B.&lt;br /&gt;
* Attenuate very specific frequencies that to balance the sound echo feedback and avoid overflows.&lt;br /&gt;
* Identity filter ($7F on the first tap and $00 on others): output original produced song from the echo buffer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Getting started ===&lt;br /&gt;
&lt;br /&gt;
For who wants to start experiment with FIR filters, the best recommendation is start experimenting with filters &#039;&#039;&#039;already made&#039;&#039;&#039; and &#039;&#039;&#039;available under the examples section&#039;&#039;&#039;. Normally the most effects you want to archive is making your &#039;&#039;&#039;echo sound more filled&#039;&#039;&#039; and the filters that will (likely) do that, depending on your echo, are either the &#039;&#039;&#039;low-pass&#039;&#039;&#039; or &#039;&#039;&#039;high-pass&#039;&#039;&#039; filters. They will either let the lower frequencies (&#039;&#039;&#039;bass&#039;&#039;&#039;) pass or the higher frequencies (&#039;&#039;&#039;treble&#039;&#039;&#039;), balancing the amount of frequencies your song has.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Choose a filter that has a gain between &#039;&#039;&#039;0.00 dB&#039;&#039;&#039; and &#039;&#039;&#039;-3.00 dB&#039;&#039;&#039;, which are safe filters that &#039;&#039;&#039;will not cause&#039;&#039;&#039; audio clipping/overflowing. Filters with positive gain are not recommended specially since during the internal FIR calculations some samples may end up &#039;&#039;&#039;overflowing and generating audio clicks&#039;&#039;&#039;. Another common problem is the combination of excessive [[Echo feedback]] that combined with FIR filter can make the echo buffer &#039;&#039;&#039;gradually get louder&#039;&#039;&#039; and eventually &amp;quot;exploding&amp;quot; your song.&lt;br /&gt;
&lt;br /&gt;
Filters with low gain (-7.00 dB and below) will make your overall echo &#039;&#039;&#039;weakier&#039;&#039;&#039; and less &#039;&#039;&#039;notable&#039;&#039;&#039;, which will require you compensating it by &#039;&#039;&#039;increasing&#039;&#039;&#039; echo feedback and echo volume, but at the same time the song quality can &#039;&#039;&#039;slight reduce&#039;&#039;&#039; because a few bits will be lost during the calculation and &#039;&#039;&#039;won&#039;t be&#039;&#039;&#039; recovered since all calculations are fixed-point.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Nintendo SPC driver (N-SPC) includes &#039;&#039;&#039;four&#039;&#039;&#039; standard FIR filters which can be used on your songs. These are:&lt;br /&gt;
&lt;br /&gt;
[[File:Nintendo SPC Band Pass FIR Filter Frequency Response.png|thumb|Analysis of N-SPC&#039;s built-in band-pass filter. It&#039;s notable that frequencies after 10 kHz has some ripples that still makes them slight audible.]]&lt;br /&gt;
&amp;lt;big&amp;gt;1. $7F $00 $00 $00 $00 $00 $00 $00&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The identity filter. Used if you want to keep your echo sound &#039;&#039;&#039;the same as original&#039;&#039;&#039;, disregarding the echo feedback of course.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;2. $58 $BF $DB $F0 $FE $07 $0C $0C&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
High-pass filter with cut-off frequency at 3 kHz. In other words, frequencies &#039;&#039;&#039;higher than&#039;&#039;&#039; 3 kHz are &#039;&#039;&#039;kept&#039;&#039;&#039; while frequencies &#039;&#039;&#039;lower than&#039;&#039;&#039; 3 kHz are &#039;&#039;&#039;attenuated&#039;&#039;&#039;. The FIR gain is &#039;&#039;&#039;+0.91 dB&#039;&#039;&#039;, which means the FIR will &#039;&#039;&#039;increase&#039;&#039;&#039; the echo volume and although it&#039;s a small amount you should be careful when playing loud channels.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;3. $0C $21 $2B $2B $13 $FE $F3 $F9&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Low-pass filter with cut-off frequency at 5 kHz. Frequencies &#039;&#039;&#039;higher than&#039;&#039;&#039; 5 kHz will be attenuated. The FIR gain is +0.65 dB.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;4. $34 $33 $00 $D9 $E5 $01 $FC $EB&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Band-pass filter that theoretically cuts frequencies &#039;&#039;&#039;lower than 1.5 kHz and higher than 8.5 kHz&#039;&#039;&#039;, however it has some &#039;&#039;&#039;ripples&#039;&#039;&#039; that makes frequencies between 11 kHz ~ 13 kHz and 15 kHz ~ 16 kHz audible, as you can see on the figure. That&#039;s considered normal given the limitations of a FIR filter with 8 taps.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Low-pass filters ===&lt;br /&gt;
&lt;br /&gt;
Low-pass filters attenuates high frequencies (high pitched sound).&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Game !! FIR Filter !! Cut-off Freq. !! Max. Gain !! High Freq. Gain&lt;br /&gt;
|-&lt;br /&gt;
| Bio Metal || $00 $23 $1E $14 $0A $00 $00 $00 || 5 kHz || -2.59 dB || -15 dB&lt;br /&gt;
|-&lt;br /&gt;
| Clue || $10 $10 $10 $10 $10 $10 $10 $60 || 2 kHz || +4.22 dB || -3 dB&lt;br /&gt;
|-&lt;br /&gt;
| Dragon Quest || $FF $07 $16 $23 $23 $16 $07 $FE || 4 kHz || -0.21 dB || -35 dB&lt;br /&gt;
|-&lt;br /&gt;
| Dragon Quest III || $10 $22 $24 $20 $28 $F8 $F8 $F8 || 3 kHz || +0.60 dB || -13 dB&lt;br /&gt;
|-&lt;br /&gt;
| Dragon Quest VI || $06 $08 $08 $08 $10 $20 $20 $20 || 2.5 kHz || +0.90 dB || -14 dB&lt;br /&gt;
|-&lt;br /&gt;
| Dragon Quest VI || $0B $21 $20 $20 $10 $FC $FB $FF || 5 kHz || -1.01 dB || -20 dB&lt;br /&gt;
|-&lt;br /&gt;
| Dragon Quest VI || $0B $21 $28 $28 $18 $F2 $F0 $F0 || 6 kHz || +1.06 dB || -17 dB&lt;br /&gt;
|-&lt;br /&gt;
| Earthworm Jim 2 || $00 $00 $14 $26 $26 $10 $08 $08 || 3 kHz || +0.00 dB || -25 dB&lt;br /&gt;
|-&lt;br /&gt;
| Justice League Task Force || $48 $20 $12 $0C $00 $00 $00 $00 || 3 kHz || +0.40 dB || -6 dB&lt;br /&gt;
|-&lt;br /&gt;
| Kyuuyaku Megami Tensei || $0B $21 $28 $28 $18 $FC $FB $F7 || 6 kHz || +0.42 dB || -20 dB&lt;br /&gt;
|-&lt;br /&gt;
| Magic Boy || $FF $05 $13 $20 $20 $13 $05 $FF || 4 kHz || -1.32 dB || -40 dB&lt;br /&gt;
|-&lt;br /&gt;
| Many games || $0C $21 $2B $2B $13 $FE $F3 $F9 || 5 kHz || +0.65 dB || -25 dB&lt;br /&gt;
|-&lt;br /&gt;
| Many games || $FF $08 $17 $24 $24 $17 $08 $FF || 5 kHz || +0.27 dB || -30 dB&lt;br /&gt;
|-&lt;br /&gt;
| Momotarou Dentetsu Happy || $10 $20 $30 $40 $50 $60 $70 $80 || 3 kHz || +8.10 dB || +4 dB&lt;br /&gt;
|-&lt;br /&gt;
| Solid Runner || $0B $21 $22 $23 $12 $FC $FB $F7 || 4 kHz || -0.58 dB || -22 dB&lt;br /&gt;
|-&lt;br /&gt;
| Solid Runner || $0B $21 $22 $25 $15 $F9 $F5 $F4 || 5 kHz || -0.06 dB || -20 dB&lt;br /&gt;
|-&lt;br /&gt;
| Strike Gunner || $20 $40 $20 $10 $00 $00 $00 $00 || 5 kHz || +1.02 dB || -20 dB&lt;br /&gt;
|-&lt;br /&gt;
| Super Bomberman 5, Bakukyuu Renpatsu!! Super B-Daman || $04 $F9 $F8 $27 $27 $F8 $F9 $04 || 12 kHz || -3.79 dB || -20 dB&lt;br /&gt;
|-&lt;br /&gt;
| Treasure Hunter G || $0B $21 $22 $22 $12 $FE $F5 $F8 || 5 kHz || -0.55 dB || -20 dB&lt;br /&gt;
|-&lt;br /&gt;
| UFO Kamen Yakisoban || $FF $08 $17 $24 $24 $00 $00 $00 || 5 kHz || -1.97 dB || -17 dB&lt;br /&gt;
|-&lt;br /&gt;
| Zenki Tenchimeidou || $FE $FD $16 $34 $34 $16 $FD $FC || 6 kHz || +0.53 dB || -32 dB&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== High-pass filters ===&lt;br /&gt;
High-pass filters attenuates low frequencies (bass-lines).&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Game !! FIR Filter !! Cut-off Freq. !! Max. Gain !! Low Freq. Gain !! Notes&lt;br /&gt;
|-&lt;br /&gt;
| Bobby&#039;s World || $18 $E8 $0C $F4 $0C $F4 $0C $F4 || 10 kHz || -0.56 dB || -20 dB || Looks like a rising wave. At 1 kHz sound is audible already.&lt;br /&gt;
|-&lt;br /&gt;
| Battle Cross || $3F $A9 $14 $54 $EC $14 $FC $AB || 1.5 kHz || +7.62 dB || -20 dB || Some ripples at 8 kHz and 14 kHz&lt;br /&gt;
|-&lt;br /&gt;
| Donkey Kong Country 2 || $58 $BF $DB $E0 $FE $01 $2C $2C || 3 kHz || +4.21 dB || -10 dB || Some oscillations starting at 4.5 kHz.&lt;br /&gt;
|-&lt;br /&gt;
| G.O.D. || $01 $02 $04 $08 $10 $20 $40 $80 || 2 kHz || +2.52 dB || -30 dB || Very effective high-pass filter.&lt;br /&gt;
|-&lt;br /&gt;
| Many games || $58 $BF $DB $F0 $FE $07 $0C $0C || 3 kHz || +0.91 dB || -40 dB || Most used hi-pass filter.&lt;br /&gt;
|-&lt;br /&gt;
| Terranigma || $5F $F3 $F4 $F5 $F6 $F7 $F8 $F9 || 1.5 kHz || -1.10 dB || -14 dB || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Band-pass filters ===&lt;br /&gt;
Band-pass filters attenuates signal outside an allowed frequency range. It has a parabolic-like curve.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Game !! FIR Filter !! Left Freq. !! Right Freq. !! Max. Gain !! Notes&lt;br /&gt;
|-&lt;br /&gt;
| Many games || $34 $33 $00 $D9 $E5 $01 $FC $EB || 1.5 kHz || 8.5 kHz || +0.53 dB || Ripples at 11 kHz ~ 13 kHz, 15 kHz ~ 16 kHz.&lt;br /&gt;
|-&lt;br /&gt;
| Popful Mail || $00 $FF $EE $B8 $06 $20 $01 $FF || 3 kHz || 10 kHz || -1.27 dB || For frequency &amp;gt;10 kHz, -10 dB, &amp;lt;3 kHz, -5 dB&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Band-stop filters ===&lt;br /&gt;
&lt;br /&gt;
Band-stop filters attenuates frequencies between a frequency region. It has a &amp;quot;U&amp;quot; like aspect.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Game !! FIR Filter !! Left Freq. !! Right Freq. !! Max. Gain !! Notes&lt;br /&gt;
|-&lt;br /&gt;
| Chaos Seed || $FF $40 $20 $20 $00 $00 $00 $00 || 5 kHz || 14 kHz || -0.07 dB || It has an &amp;quot;U&amp;quot;-like with 10 kHz at center.&lt;br /&gt;
|-&lt;br /&gt;
| Do-Re-Mi Fantasy - Milon no Dokidoki Daibouken || $00 $00 $00 $00 $48 $00 $30 $00 || 4 kHz || 12 kHz || -0.56 dB || It has a &amp;quot;V&amp;quot;-like curve with 8 kHz at center.&lt;br /&gt;
|-&lt;br /&gt;
| Many games || $0C $21 $2B $2B $F3 $FE $F3 $F9 || 6 kHz || 12 kHz || -0.14 dB || It looks like a lying &amp;quot;Z&amp;quot;. &amp;lt;6 kHz with -2dB and &amp;gt;12 kHz with -11dB. At 9 kHz, -14 dB.&lt;br /&gt;
|-&lt;br /&gt;
| Popful Mail || $08 $FF $E0 $B8 $04 $80 $09 $FF || 4 kHz || 10 kHz || +4.42 dB || It has an &amp;quot;U&amp;quot;-like curve with 6.7 kHz at center.&lt;br /&gt;
|-&lt;br /&gt;
| Super Bomberman 3 || $00 $00 $00 $28 $00 $28 $00 $FE || 5 kHz || 11 kHz || -4.30 dB || It has an even &amp;quot;V&amp;quot;-like curve with 8 kHz at center.&lt;br /&gt;
|-&lt;br /&gt;
| Super Bomberman 3 || $00 $00 $00 $40 $00 $28 $00 $FE || 5 kHz || 11 kHz || -1.97 dB || It has an even &amp;quot;V&amp;quot;-like curve with 8 kHz at center.&lt;br /&gt;
|-&lt;br /&gt;
| Tengai Makyou Zero || $00 $00 $00 $00 $30 $00 $48 $00 || 4 kHz || 12 kHz || -0.56 dB || It has a &amp;quot;V&amp;quot;-like curve with 8 kHz at center.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Unusual filters ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Game !! FIR Filter !! Maximum Gain !! What it Does&lt;br /&gt;
|-&lt;br /&gt;
| Alien vs. Predator || $0C $2B $2B $2B $28 $FF $F8 $F9 || +2.21 dB || Band-stop between 6 kHz and 8.5 kHz (-15 dB). Smooth Low-pass cut-off at 13 kHz (-18 dB).&lt;br /&gt;
|-&lt;br /&gt;
| Angelique Voice Fantasy || $0D $F5 $FA $12 $12 $FA $F5 $0D || -5.40 dB || Eliminates 12 kHz and 16 kHz.&lt;br /&gt;
|-&lt;br /&gt;
| B.O.B || $18 $0C $F4 $0C $F4 $0C $F4 $00 || -6.90 dB || Attenuates 0 kHz (-14 dB), 5 kHz (-14 dB) and 10 kHz (-16 dB).&lt;br /&gt;
|-&lt;br /&gt;
| Doney Kong Country 2 || $50 $BF $DB $E0 $E0 $0A $C8 $C8 || +3.59 dB || It looks like a &amp;quot;W&amp;quot; at 4.3 kHz (-10 dB) and 9.7 kHz (-15 dB).&lt;br /&gt;
|-&lt;br /&gt;
| Donkey Kong Country || $00 $01 $00 $00 $00 $00 $00 $00 || -42.14 dB || Makes echo almost inaudible.&lt;br /&gt;
|-&lt;br /&gt;
| Doom || $FA $0A $1A $13 $13 $1A $0A $FA || -2.32 dB || Eliminates 6.4 kHz, 12.8 kHz and 16 kHz.&lt;br /&gt;
|-&lt;br /&gt;
| Dragon Guest VI || $0D $10 $10 $24 $3D $F4 $F4 $F4 || -0.76 dB || It looks like a twisted &amp;quot;W&amp;quot; at ~6 kHz (-5 dB) and ~12.5 kHz (-10 dB).&lt;br /&gt;
|-&lt;br /&gt;
| Dragon Guest VI || $10 $08 $14 $14 $14 $FE $FE $FE || -4.30 dB || It looks like a &amp;quot;W&amp;quot; at ~6 kHz (-16 dB) and ~12 kHz (-30 dB).&lt;br /&gt;
|-&lt;br /&gt;
| Dragon Guest VI || $30 $0C $44 $0C $54 $0C $B4 $0C || +3.24 dB || Looks like a &amp;quot;W&amp;quot; at 5.8 kHz (-2.8 dB), 10.4 kHz (-1.5 dB), low pass at 15 kHz (0 dB).&lt;br /&gt;
|-&lt;br /&gt;
| Front Mission, BS Koi ha Balance, BS Dynani Tracer || $XX $00 $00 $00 $00 $00 $00 $00 || -0.14 dB || $XX fades in from $00 to $7E at beginning, essentially controlling the echo volume and feedback.&lt;br /&gt;
|-&lt;br /&gt;
| Jim Power || $FF $FC $FD $FE $FF $FE $FD $FC || -16.12 dB || Many ripples at 4 kHz (-50 dB), 9 kHz (-45 dB), 13.5 kHz (-42 dB), gradually attenuating higher frequencies.&lt;br /&gt;
|-&lt;br /&gt;
| Kamaitachi no Yoru || $FF $0A $1E $32 $32 $1E $0A $FF || +2.86 dB || Eliminates 9.5 kHz, 11.5 kHz and 16 kHz.&lt;br /&gt;
|-&lt;br /&gt;
| Kamen Rider SD || $20 $06 $10 $16 $16 $06 $08 $20 || +1.02 dB || Attenuates 3.5 kHz (-25 dB), 6.5 kHz (-22 dB), 11.6 kHz (-40 dB) and 16 kHz (-18 dB).&lt;br /&gt;
|-&lt;br /&gt;
| Many games || $10 $30 $22 $24 $11 $F0 $20 $FF || +2.26 dB || Band-stop at 9 kHz (-15 dB) and very light low-pass filter at 14 kHz (-10 dB).&lt;br /&gt;
|-&lt;br /&gt;
| Many games || $3F $D8 $00 $D9 $E5 $01 $6F $EB || +5.68 dB || It would have been a high-pass filter at 3 kHz if it wasn&#039;t for the sudden gain drop at 13 kHz (-20 dB).&lt;br /&gt;
|-&lt;br /&gt;
| Mario is Missing! || $0A $0A $0A $0A $0A $0A $0A $0A || -4.08 dB || Eliminates 4, 8, 12 and 16 kHz in a way that echo doesn&#039;t explode on the song.&lt;br /&gt;
|-&lt;br /&gt;
| Momotarou Dentetsu Happy || $10 $20 $60 $30 $55 $17 $80 $01 || +7.06 dB || Band-stop at 7.5 kHz (+1 dB) and low-pass filter with cut-off at 14 kHz (-5 dB).&lt;br /&gt;
|-&lt;br /&gt;
| Momotarou Dentetsu Happy || $60 $20 $60 $30 $55 $17 $80 $01 || +8.28 dB || It looks like a &amp;quot;W&amp;quot;, but weak. 5.5 kHz (0 dB), 10.5 kHz (-2 dB). Drops at 16 kHz (-10 dB).&lt;br /&gt;
|-&lt;br /&gt;
| Monster Maker 3 || $21 $00 $23 $00 $25 $00 $27 $00 || +1.02 dB || Band-stop at 4 kHz (-27 dB), 8 kHz (-30 dB), 12 kHz (-27 dB), symmetrical filter.&lt;br /&gt;
|-&lt;br /&gt;
| Popful Mail || $06 $B0 $07 $FF $EB $B8 $0E $00 || +1.93 dB || It looks like a twisted &amp;quot;W&amp;quot; at ~4.5 kHz (-22 dB) and ~12.5 kHz (-16 dB).&lt;br /&gt;
|-&lt;br /&gt;
| Prince of Persia II || $0F $08 $86 $08 $0B $09 $90 $09 || +6.17 dB || It looks like a &amp;quot;W&amp;quot; at ~4 kHz and ~12 kHz.&lt;br /&gt;
|-&lt;br /&gt;
| Seiken Densetsu 3/Trials of Mana || $20 $0C $10 $0C $20 $0C $0C $0C || +0.78 dB || Looks like a &amp;quot;W&amp;quot; at 4 kHz (-30 dB) and 11.7 kHz (-50 dB).&lt;br /&gt;
|-&lt;br /&gt;
| Sengoku Denshou || $65 $09 $F4 $09 $8C $0A $2C $0B || +5.60 dB || It looks like a &amp;quot;M&amp;quot; at 1 kHz (-6 dB), 8 kHz (-8 dB) and 16 kHz (-15 dB).&lt;br /&gt;
|-&lt;br /&gt;
| Star Ocean, Tales of Phantasia || $0D $22 $22 $24 $11 $F0 $03 $FF || -0.56 dB || Band-stop between 5 kHz and 10 kHz (-16 dB). Smooth Low-pass cut-off at 13 kHz (-17 dB). Echo slowly overflows without the FIR.&lt;br /&gt;
|-&lt;br /&gt;
| Super Genjin 2 || $00 $00 $00 $36 $00 $28 $00 $41 || +1.88 dB || It looks like a &amp;quot;W&amp;quot; at ~5 kHz and ~11 kHz.&lt;br /&gt;
|-&lt;br /&gt;
| Super Mad Champ || $34 $33 $00 $D9 $E5 $01 $FC $00 || +1.11 dB || Band-pass between 2 kHz and 9 kHz &amp;amp; 12 kHz and 15 kHz (weakier, -13 dB).&lt;br /&gt;
|-&lt;br /&gt;
| Super Tekkyuu Fight! || $0E $49 $4B $46 $5F $08 $DE $08 || +7.66 dB || It looks like a twisted &amp;quot;W&amp;quot; at ~7 kHz (-5 dB) and ~15 kHz (-30dB).&lt;br /&gt;
|-&lt;br /&gt;
| Tactics Ogre || $44 $0C $46 $0C $75 $0C $C4 $0C || +5.57 dB || It looks like a &amp;quot;W at 5.3 kHz (-4.0 dB) and 10.7 kHz (-1.8 dB).&lt;br /&gt;
|-&lt;br /&gt;
| The Flintstones || $XX $33 $00 $D9 $E5 $01 $FC $EB || +4.34 dB || $XX ranges from $00 to $7F, essentially a light high-pass filter with volume fade.&lt;br /&gt;
|-&lt;br /&gt;
| The Mask || $FA $02 $18 $28 $2A $F4 $0A $1E || +0.14 dB || Slight attenuates at 4 kHz (-7 dB), then starting at 9 kHz it gradually starts attenuating (-15 dB).&lt;br /&gt;
|-&lt;br /&gt;
| The Mask || $30 $1A $04 $F4 $F8 $04 $0A $0C || -1.96 dB || Band-stop at 2 kHz (-8 dB), 8.5 kHz (-10 dB), 11.5 kHz (-15 dB), 16 kHz (-15 dB).&lt;br /&gt;
|-&lt;br /&gt;
| The Simpsons - Bart&#039;s Nightmare || $00 $08 $10 $10 $10 $10 $08 $00 || -4.08 dB || Eliminates 6.8 kHz and 13.6 kHz in a way that echo doesn&#039;t explode on the song.&lt;br /&gt;
|-&lt;br /&gt;
| The Simpsons - Bart&#039;s Nightmare || $18 $18 $18 $18 $18 $18 $18 $18 || +3.52 dB || Eliminates 4, 8, 12 and 16 kHz.&lt;br /&gt;
|-&lt;br /&gt;
| WWF Super Wrestlemania || $13 $13 $13 $13 $13 $13 $13 $13 || +1.49 dB || Eliminates 4, 8, 12 and 16 kHz.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* [https://www.romhacking.net/documents/191/ Romhacking.net - Documents - Anomie&#039;s S-DSP Doc]&lt;br /&gt;
* [https://problemkaputt.de/fullsnes.htm Fullsnes - Nocash SNES Specs]&lt;br /&gt;
* [https://www.vyssotski.ch/BasicsOfInstrumentation/SpikeSorting/Design_of_FIR_Filters.pdf Design of FIR Filters - Dr. Elena Punskaya]&lt;br /&gt;
* [https://www.elprocus.com/fir-filter-for-digital-signal-processing/ What is FIR Filter? - FIR Filters for Digital Signal Processing]&lt;br /&gt;
* [http://www.eas.uccs.edu/~mwickert/ece2610/lecture_notes/ece2610_chap5.pdf ECE 2610 Signal and Systems - FIR Filters]&lt;br /&gt;
* [https://www.dsprelated.com/freebooks/sasp/FIR_Digital_Filter_Design.html FIR Digital Filter Design | Spectral Audio Signal Processing]&lt;br /&gt;
* [https://dspguru.com/dsp/faqs/fir/ FIR filter FAQ - dspGuru]&lt;br /&gt;
* [http://www.sengpielaudio.com/calculator-levelchange.htm The relationship between decibels, volume and power - sengpielaudio]&lt;/div&gt;</summary>
		<author><name>LucianoTheWindowsFan</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=FIR_Filter&amp;diff=2054</id>
		<title>FIR Filter</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=FIR_Filter&amp;diff=2054"/>
		<updated>2021-08-31T14:40:49Z</updated>

		<summary type="html">&lt;p&gt;LucianoTheWindowsFan: /* High-pass filters */ Game fixed.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:{{#setmainimage:SNES Sound Mixing.png}}|thumb|SNES sound mixing diagram. The FIR Filter plays an important role for the final sound output.]]&lt;br /&gt;
A &#039;&#039;&#039;FIR Filter&#039;&#039;&#039; (&#039;&#039;&#039;F&#039;&#039;&#039;inite &#039;&#039;&#039;i&#039;&#039;&#039;mpulse &#039;&#039;&#039;r&#039;&#039;&#039;esponse filter) is a type of filter used on signal processing. It works by taking the sum of last Nth samples multiplied by a value, called &#039;&#039;&#039;FIR taps&#039;&#039;&#039; or &#039;&#039;&#039;coefficients&#039;&#039;&#039;. It&#039;s finite because if you pass a FIR filter in an impulse response, the impulse will fade out after passing though the N taps. That&#039;s easy to notice since the FIR filter never uses itself as feed unlike the [https://en.wikipedia.org/wiki/Infinite_impulse_response IIR Filter].&lt;br /&gt;
&lt;br /&gt;
On the [[SNES]], the FIR filter has 8 taps which are 1.7 fixed point values. The filter is applied on the echo output so it has &#039;&#039;&#039;direct influence&#039;&#039;&#039; to the sound output and can be used to archive different effects which is more detailed on the following topics.&lt;br /&gt;
&lt;br /&gt;
== Mathematical Definition ==&lt;br /&gt;
The FIR filter can be defined in the following mathematical formula:&lt;br /&gt;
&amp;lt;math&amp;gt;y[n] = \sum_{i=0}^{N-1}b_{i} \cdot x[n-i]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the current output sample Y[n], take the sum of previous N samples from source (including current), multiplied by the FIR coefficient, which is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y[n] = b_{0} \cdot x[n] + b_{1} \cdot x[n-1] + b_{2} \cdot x[n-2] + ... + b_{N-1} \cdot x[n-(N-1)]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The SNES has &#039;&#039;&#039;eight FIR taps&#039;&#039;&#039;, which limits N to 8:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y[n] = \sum_{i=0}^{7}b_{i} \cdot x[n-i]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, &#039;&#039;&#039;the samples are processed from the oldest to the newest sample&#039;&#039;&#039;. That means the first FIR tap is applied to the oldest sample while the last FIR tap is applied to the newest sample:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y[n] = \sum_{i=0}^{7}b_{i} \cdot x[n-(7-i)]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Which in other words, it yields to the equivalent pseudo-code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
y[n] = FIR[0] * x[n - 7] +&lt;br /&gt;
       FIR[1] * x[n - 6] +&lt;br /&gt;
       FIR[2] * x[n - 5] +&lt;br /&gt;
       FIR[3] * x[n - 4] +&lt;br /&gt;
       FIR[4] * x[n - 3] +&lt;br /&gt;
       FIR[5] * x[n - 2] + &lt;br /&gt;
       FIR[6] * x[n - 1] + &lt;br /&gt;
       FIR[7] * x[n - 0];&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where FIR is a array containing the eight taps or coefficients.&lt;br /&gt;
&lt;br /&gt;
== S-DSP Implementation ==&lt;br /&gt;
[[File:Chrono Trigger FIR filter.png|thumb|Example of FIR filter used on Chrono Trigger, which is used as an echo low-pass filter on this case. Screenshot taken from [[SNES SPC700 PLAYER]]]]&lt;br /&gt;
The FIR taps are located on the DSP registers $0F though $7F, where $0F is the first tap (FIR[0]) and $7F is the last tap (FIR[7]).&lt;br /&gt;
&lt;br /&gt;
Because the S-DSP doesn&#039;t have floating point capability, the tap values are actually in the &#039;&#039;&#039;1.7 fixed point, signed format&#039;&#039;&#039;. This means that values between $00-$7F is positive (0 to 127) and $80-$FF is negative (-128 to -1) and after doing the multiplication the value then is divided by 128. So for positive values, $7F means 1.00, $40 means 0.50, $20 means 0.25 and it goes on, while for negative values $80 means -1.00, $C0 means 0.50, $E0 means 0.25 and it goes on.&lt;br /&gt;
&lt;br /&gt;
The coefficients sum is done on a 16-bit integer type, which means that if an overflow occur the value gets &#039;&#039;&#039;clipped&#039;&#039;&#039;. The only exception for this is the &#039;&#039;&#039;last multiplication&#039;&#039;&#039; (last FIR coefficient multiplied by the first sample). For this case, the number gets &#039;&#039;&#039;clamped&#039;&#039;&#039; instead of clipped, e.g.: 18623 + 16888 will yield to 32767 instead of overflowing to -30025.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An accurate implementation of the FIR filter given the above rules would be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
S = (FIR[0] * x[n - 7] &amp;gt;&amp;gt; 6) +&lt;br /&gt;
    (FIR[1] * x[n - 6] &amp;gt;&amp;gt; 6) +&lt;br /&gt;
    (FIR[2] * x[n - 5] &amp;gt;&amp;gt; 6) +&lt;br /&gt;
    (FIR[3] * x[n - 4] &amp;gt;&amp;gt; 6) +&lt;br /&gt;
    (FIR[4] * x[n - 3] &amp;gt;&amp;gt; 6) +&lt;br /&gt;
    (FIR[5] * x[n - 2] &amp;gt;&amp;gt; 6) + &lt;br /&gt;
    (FIR[6] * x[n - 1] &amp;gt;&amp;gt; 6);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;&amp;gt;&amp;gt;&amp;quot; operator is the [[arithmetic right shift]] operation, which on this context is the equivalent by dividing the value by 128 (without decimal places).&lt;br /&gt;
&lt;br /&gt;
With the first 7 taps calculated, we &#039;&#039;&#039;clip&#039;&#039;&#039; it so it&#039;s always within the -32768 to 32767 range:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
S = S &amp;amp; 0xFFFF;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we add the last tap which is multiplied by the current sample, x[n]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
S = S + (FIR[0] * x[n] &amp;gt;&amp;gt; 6);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;clamp&#039;&#039;&#039; it to the -32768 to 32767:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
S = S &amp;gt; 32767 ? 32767 : S;&lt;br /&gt;
S = S &amp;lt; -32768 ? -32768 : S;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It&#039;s important to remember that the [[Echo buffer]] uses &#039;&#039;&#039;15-bit samples&#039;&#039;&#039; instead of 16-bit and it&#039;s &#039;&#039;&#039;left-aligned&#039;&#039;&#039;, so the binary format is: &amp;quot;seee eeee eeee eee0&amp;quot; and not &amp;quot;ssee eeee eeee eeee&amp;quot;. However, when the sample is placed on the FIR ring buffer (x[]), it end ups right shifted so it gets to the &amp;quot;ssee eeee eeee eeee&amp;quot; format.&lt;br /&gt;
&lt;br /&gt;
So we finally take the last bit and we have our FIR value done:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Result = S &amp;amp; 0xFFFE;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each sound channel (left and right) is &#039;&#039;&#039;processed separately&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is a diagram of the FIR filter calculation:&lt;br /&gt;
&lt;br /&gt;
[[File:SNES FIR Filter diagram.png|border]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Because of the integer clipping behavior on the first seven taps, it&#039;s important to your FIR filter maximum gain &#039;&#039;&#039;never exceed&#039;&#039;&#039; 0 dB (or the absolute sum of all FIR taps never exceed 128) for avoiding audio clicks, specially with the first seven taps. &#039;&#039;&#039;Not all games obey that&#039;&#039;&#039;, so the most important is checking out the frequency response of the filter and verifying how the gain behaves for the frequency range.&lt;br /&gt;
&lt;br /&gt;
Once done, the FIR is multiplied by the L/R echo volume and it&#039;s output together the main volume. It&#039;s also multiplied by the echo feedback value and fed back to the echo buffer together the sound output, as you can see on the above diagram.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Timing Information ===&lt;br /&gt;
&lt;br /&gt;
The S-DSP generates &#039;&#039;&#039;one stereo sample&#039;&#039;&#039; every 32 SPC700 clocks. During these 32 clocks, some operations are done by the S-DSP regarding echo and FIR filter. These are the following:&lt;br /&gt;
&lt;br /&gt;
Each time a new sample is generated on the S-DSP, one sample is taken from the echo buffer and inserted on the FIR ring buffer (x[]), which then the ring buffer is used to generate the FIR sample output:&lt;br /&gt;
&lt;br /&gt;
* The left echo channel is inserted on the ring buffer at cycle 22 and written on cycle 29.&lt;br /&gt;
* The right echo channel is inserted on the ring buffer at cycle 23 and written on cycle 30.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The FIR taps are not read immediately, but gradually read while the left and right echo channel are being processed:&lt;br /&gt;
&lt;br /&gt;
* FIR[0] is accessed during cycle 22.&lt;br /&gt;
* FIR[1] and FIR[2] are accessed during cycle 23.&lt;br /&gt;
* FIR[3], FIR[4] and FIR[5] are accessed during cycle 24.&lt;br /&gt;
* FIR[6] and FIR[7] are accessed during cycle 25.&lt;br /&gt;
&lt;br /&gt;
== Frequency response ==&lt;br /&gt;
[[File:VilelaBot Chrono Trigger FIR frequency response.png|thumb|The FIR Filter frequency response of one of the Chrono Trigger songs. Image generated via !vb fir command of [[VilelaBot]]. FIR used: $0C $21 $2B $2B $13 $FE $F3 $F9. It&#039;s a low-pass filter with a cut-off frequency of around ~4.5 kHz.]]&lt;br /&gt;
&lt;br /&gt;
It&#039;s possible to view the &#039;&#039;&#039;frequency response&#039;&#039;&#039; of a FIR filter and therefore visualize which frequencies are amplified or attenuated. The calculations involves [https://en.wikipedia.org/wiki/Discrete-time_Fourier_transform Discrete-time Fourier transform] (DFFT) and are considerably complex. The formula looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
H(\jmath \omega ) = \sum_{n=0}^{N-1}h(n)[cos(n \omega)-\jmath sin(n \omega)]&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
* &amp;lt;math&amp;gt;H(\jmath \omega )&amp;lt;/math&amp;gt; is the output power for given frequency &amp;lt;math&amp;gt;H( \omega )&amp;lt;/math&amp;gt;. It is a complex number, therefore you will end up having two components, which is the &#039;&#039;&#039;magnitude&#039;&#039;&#039; &amp;lt;math&amp;gt;|H(\jmath \omega )|&amp;lt;/math&amp;gt; and &#039;&#039;&#039;phase&#039;&#039;&#039; &amp;lt;math&amp;gt;\measuredangle H(\jmath \omega )&amp;lt;/math&amp;gt;.&lt;br /&gt;
** Magnitude is the &#039;&#039;&#039;output volume&#039;&#039;&#039; e.g. 1.0 is 100% volume.&lt;br /&gt;
** Phase means how &#039;&#039;&#039;late or early&#039;&#039;&#039; is the signal relative to the original, in &#039;&#039;&#039;radians&#039;&#039;&#039; (&amp;lt;math&amp;gt;\pi = +180^{\circ}&amp;lt;/math&amp;gt;). Humans normally don&#039;t perceive phase changes, but combining two close and oppose phased-signals can generate some odd effects like an oscillating signal used on Square SPC engines.&lt;br /&gt;
* &amp;lt;math&amp;gt;h(n)&amp;lt;/math&amp;gt; is the FIR filter taps.&lt;br /&gt;
* &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the amount of taps.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Disregarding SNES clipping and clamping effects, the frequency response of its 8-tap FIR would be calculated as the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;H(\jmath \omega ) = \sum_{n=0}^{7}\textrm{FIR}(7-n)[cos(n \omega)-\jmath sin(n \omega)]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expanding the sum yields:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;H(\jmath \omega ) = \textrm{FIR}(7)+&lt;br /&gt;
\textrm{FIR}(6)[cos(\omega)-\jmath sin(\omega)] +&lt;br /&gt;
\textrm{FIR}(5)[cos(2 \omega)-\jmath sin(2 \omega)] +&lt;br /&gt;
\textrm{FIR}(4)[cos(3 \omega)-\jmath sin(3 \omega)] +&lt;br /&gt;
\textrm{FIR}(3)[cos(4 \omega)-\jmath sin(4 \omega)] +&lt;br /&gt;
\textrm{FIR}(2)[cos(5 \omega)-\jmath sin(5 \omega)] +&lt;br /&gt;
\textrm{FIR}(1)[cos(6 \omega)-\jmath sin(6 \omega)] +&lt;br /&gt;
\textrm{FIR}(0)[cos(7 \omega)-\jmath sin(7 \omega)]&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When doing a visualization, it&#039;s often common to see &#039;&#039;&#039;ripples&#039;&#039;&#039; or signal &#039;&#039;&#039;ringing&#039;&#039;&#039; on certain regions. Even with careful values choice, it&#039;s not possible to attenuate them because of the low amount of taps the SNES FIR filter has, but regardless of the amount of taps they are often common on modern DSP applications and other kind of filters.&lt;br /&gt;
&lt;br /&gt;
[[VilelaBot]] has a command for viewing FIR filters frequency response and gain, see the &#039;&#039;&#039;!vb help fir&#039;&#039;&#039; command for more information.&lt;br /&gt;
&lt;br /&gt;
== Uses ==&lt;br /&gt;
&lt;br /&gt;
The most useful thing that you can do with FIR filters is &#039;&#039;&#039;amplifying or attenuating a frequency range&#039;&#039;&#039;. Effectively, you can create your own [https://en.wikipedia.org/wiki/Equalization_(audio) sound equalizer] depending on your echo settings and main volume combinations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The most common usage involve:&lt;br /&gt;
* Using FIR as a low or high pass filters, normally using 4.5 kHz as the cut-off point:&lt;br /&gt;
** Low-pass to filter out high frequencies from the echo sound output. &lt;br /&gt;
** High-pass to filter out low frequencies from the echo sound output.&lt;br /&gt;
* Band-pass or band-stop filters to allow or disallow a frequency range:&lt;br /&gt;
** Band-pass allows frequency between A and B.&lt;br /&gt;
** Band-stop disallows frequency between A and B.&lt;br /&gt;
* Attenuate very specific frequencies that to balance the sound echo feedback and avoid overflows.&lt;br /&gt;
* Identity filter ($7F on the first tap and $00 on others): output original produced song from the echo buffer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Getting started ===&lt;br /&gt;
&lt;br /&gt;
For who wants to start experiment with FIR filters, the best recommendation is start experimenting with filters &#039;&#039;&#039;already made&#039;&#039;&#039; and &#039;&#039;&#039;available under the examples section&#039;&#039;&#039;. Normally the most effects you want to archive is making your &#039;&#039;&#039;echo sound more filled&#039;&#039;&#039; and the filters that will (likely) do that, depending on your echo, are either the &#039;&#039;&#039;low-pass&#039;&#039;&#039; or &#039;&#039;&#039;high-pass&#039;&#039;&#039; filters. They will either let the lower frequencies (&#039;&#039;&#039;bass&#039;&#039;&#039;) pass or the higher frequencies (&#039;&#039;&#039;treble&#039;&#039;&#039;), balancing the amount of frequencies your song has.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Choose a filter that has a gain between &#039;&#039;&#039;0.00 dB&#039;&#039;&#039; and &#039;&#039;&#039;-3.00 dB&#039;&#039;&#039;, which are safe filters that &#039;&#039;&#039;will not cause&#039;&#039;&#039; audio clipping/overflowing. Filters with positive gain are not recommended specially since during the internal FIR calculations some samples may end up &#039;&#039;&#039;overflowing and generating audio clicks&#039;&#039;&#039;. Another common problem is the combination of excessive [[Echo feedback]] that combined with FIR filter can make the echo buffer &#039;&#039;&#039;gradually get louder&#039;&#039;&#039; and eventually &amp;quot;exploding&amp;quot; your song.&lt;br /&gt;
&lt;br /&gt;
Filters with low gain (-7.00 dB and below) will make your overall echo &#039;&#039;&#039;weakier&#039;&#039;&#039; and less &#039;&#039;&#039;notable&#039;&#039;&#039;, which will require you compensating it by &#039;&#039;&#039;increasing&#039;&#039;&#039; echo feedback and echo volume, but at the same time the song quality can &#039;&#039;&#039;slight reduce&#039;&#039;&#039; because a few bits will be lost during the calculation and &#039;&#039;&#039;won&#039;t be&#039;&#039;&#039; recovered since all calculations are fixed-point.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Nintendo SPC driver (N-SPC) includes &#039;&#039;&#039;four&#039;&#039;&#039; standard FIR filters which can be used on your songs. These are:&lt;br /&gt;
&lt;br /&gt;
[[File:Nintendo SPC Band Pass FIR Filter Frequency Response.png|thumb|Analysis of N-SPC&#039;s built-in band-pass filter. It&#039;s notable that frequencies after 10 kHz has some ripples that still makes them slight audible.]]&lt;br /&gt;
&amp;lt;big&amp;gt;1. $7F $00 $00 $00 $00 $00 $00 $00&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The identity filter. Used if you want to keep your echo sound &#039;&#039;&#039;the same as original&#039;&#039;&#039;, disregarding the echo feedback of course.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;2. $58 $BF $DB $F0 $FE $07 $0C $0C&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
High-pass filter with cut-off frequency at 3 kHz. In other words, frequencies &#039;&#039;&#039;higher than&#039;&#039;&#039; 3 kHz are &#039;&#039;&#039;kept&#039;&#039;&#039; while frequencies &#039;&#039;&#039;lower than&#039;&#039;&#039; 3 kHz are &#039;&#039;&#039;attenuated&#039;&#039;&#039;. The FIR gain is &#039;&#039;&#039;+0.91 dB&#039;&#039;&#039;, which means the FIR will &#039;&#039;&#039;increase&#039;&#039;&#039; the echo volume and although it&#039;s a small amount you should be careful when playing loud channels.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;3. $0C $21 $2B $2B $13 $FE $F3 $F9&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Low-pass filter with cut-off frequency at 5 kHz. Frequencies &#039;&#039;&#039;higher than&#039;&#039;&#039; 5 kHz will be attenuated. The FIR gain is +0.65 dB.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;4. $34 $33 $00 $D9 $E5 $01 $FC $EB&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Band-pass filter that theoretically cuts frequencies &#039;&#039;&#039;lower than 1.5 kHz and higher than 8.5 kHz&#039;&#039;&#039;, however it has some &#039;&#039;&#039;ripples&#039;&#039;&#039; that makes frequencies between 11 kHz ~ 13 kHz and 15 kHz ~ 16 kHz audible, as you can see on the figure. That&#039;s considered normal given the limitations of a FIR filter with 8 taps.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Low-pass filters ===&lt;br /&gt;
&lt;br /&gt;
Low-pass filters attenuates high frequencies (high pitched sound).&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Game !! FIR Filter !! Cut-off Freq. !! Max. Gain !! High Freq. Gain&lt;br /&gt;
|-&lt;br /&gt;
| Bio Metal || $00 $23 $1E $14 $0A $00 $00 $00 || 5 kHz || -2.59 dB || -15 dB&lt;br /&gt;
|-&lt;br /&gt;
| Clue || $10 $10 $10 $10 $10 $10 $10 $60 || 2 kHz || +4.22 dB || -3 dB&lt;br /&gt;
|-&lt;br /&gt;
| Dragon Guest || $FF $07 $16 $23 $23 $16 $07 $FE || 4 kHz || -0.21 dB || -35 dB&lt;br /&gt;
|-&lt;br /&gt;
| Dragon Quest III || $10 $22 $24 $20 $28 $F8 $F8 $F8 || 3 kHz || +0.60 dB || -13 dB&lt;br /&gt;
|-&lt;br /&gt;
| Dragon Quest VI || $06 $08 $08 $08 $10 $20 $20 $20 || 2.5 kHz || +0.90 dB || -14 dB&lt;br /&gt;
|-&lt;br /&gt;
| Dragon Quest VI || $0B $21 $20 $20 $10 $FC $FB $FF || 5 kHz || -1.01 dB || -20 dB&lt;br /&gt;
|-&lt;br /&gt;
| Dragon Quest VI || $0B $21 $28 $28 $18 $F2 $F0 $F0 || 6 kHz || +1.06 dB || -17 dB&lt;br /&gt;
|-&lt;br /&gt;
| Earthworm Jim 2 || $00 $00 $14 $26 $26 $10 $08 $08 || 3 kHz || +0.00 dB || -25 dB&lt;br /&gt;
|-&lt;br /&gt;
| Kyuuyaku Megami Tensei || $0B $21 $28 $28 $18 $FC $FB $F7 || 6 kHz || +0.42 dB || -20 dB&lt;br /&gt;
|-&lt;br /&gt;
| Magicboy || $FF $05 $13 $20 $20 $13 $05 $FF || 4 kHz || -1.32 dB || -40 dB&lt;br /&gt;
|-&lt;br /&gt;
| Many games || $0C $21 $2B $2B $13 $FE $F3 $F9 || 5 kHz || +0.65 dB || -25 dB&lt;br /&gt;
|-&lt;br /&gt;
| Many games || $FF $08 $17 $24 $24 $17 $08 $FF || 5 kHz || +0.27 dB || -30 dB&lt;br /&gt;
|-&lt;br /&gt;
| Momotarou Dentetsu Happy || $10 $20 $30 $40 $50 $60 $70 $80 || 3 kHz || +8.10 dB || +4 dB&lt;br /&gt;
|-&lt;br /&gt;
| Solid Runner || $0B $21 $22 $23 $12 $FC $FB $F7 || 4 kHz || -0.58 dB || -22 dB&lt;br /&gt;
|-&lt;br /&gt;
| Solid Runner || $0B $21 $22 $25 $15 $F9 $F5 $F4 || 5 kHz || -0.06 dB || -20 dB&lt;br /&gt;
|-&lt;br /&gt;
| Strike Gunner || $20 $40 $20 $10 $00 $00 $00 $00 || 5 kHz || +1.02 dB || -20 dB&lt;br /&gt;
|-&lt;br /&gt;
| Super Bomberman 5, Bakukyuu Renpatsu!! Super B-Daman || $04 $F9 $F8 $27 $27 $F8 $F9 $04 || 12 kHz || -3.79 dB || -20 dB&lt;br /&gt;
|-&lt;br /&gt;
| Treasure Hunter G || $0B $21 $22 $22 $12 $FE $F5 $F8 || 5 kHz || -0.55 dB || -20 dB&lt;br /&gt;
|-&lt;br /&gt;
| UFO Kamen Yakisoban || $FF $08 $17 $24 $24 $00 $00 $00 || 5 kHz || -1.97 dB || -17 dB&lt;br /&gt;
|-&lt;br /&gt;
| Wonder Woman || $48 $20 $12 $0C $00 $00 $00 $00 || 3 kHz || +0.40 dB || -6 dB&lt;br /&gt;
|-&lt;br /&gt;
| Zenki Tenchimeidou || $FE $FD $16 $34 $34 $16 $FD $FC || 6 kHz || +0.53 dB || -32 dB&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== High-pass filters ===&lt;br /&gt;
High-pass filters attenuates low frequencies (bass-lines).&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Game !! FIR Filter !! Cut-off Freq. !! Max. Gain !! Low Freq. Gain !! Notes&lt;br /&gt;
|-&lt;br /&gt;
| Bobby&#039;s World || $18 $E8 $0C $F4 $0C $F4 $0C $F4 || 10 kHz || -0.56 dB || -20 dB || Looks like a rising wave. At 1 kHz sound is audible already.&lt;br /&gt;
|-&lt;br /&gt;
| Battle Cross || $3F $A9 $14 $54 $EC $14 $FC $AB || 1.5 kHz || +7.62 dB || -20 dB || Some ripples at 8 kHz and 14 kHz&lt;br /&gt;
|-&lt;br /&gt;
| Donkey Kong Country 2 || $58 $BF $DB $E0 $FE $01 $2C $2C || 3 kHz || +4.21 dB || -10 dB || Some oscillations starting at 4.5 kHz.&lt;br /&gt;
|-&lt;br /&gt;
| G.O.D. || $01 $02 $04 $08 $10 $20 $40 $80 || 2 kHz || +2.52 dB || -30 dB || Very effective high-pass filter.&lt;br /&gt;
|-&lt;br /&gt;
| Many games || $58 $BF $DB $F0 $FE $07 $0C $0C || 3 kHz || +0.91 dB || -40 dB || Most used hi-pass filter.&lt;br /&gt;
|-&lt;br /&gt;
| Terranigma || $5F $F3 $F4 $F5 $F6 $F7 $F8 $F9 || 1.5 kHz || -1.10 dB || -14 dB || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Band-pass filters ===&lt;br /&gt;
Band-pass filters attenuates signal outside an allowed frequency range. It has a parabolic-like curve.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Game !! FIR Filter !! Left Freq. !! Right Freq. !! Max. Gain !! Notes&lt;br /&gt;
|-&lt;br /&gt;
| Many games || $34 $33 $00 $D9 $E5 $01 $FC $EB || 1.5 kHz || 8.5 kHz || +0.53 dB || Ripples at 11 kHz ~ 13 kHz, 15 kHz ~ 16 kHz.&lt;br /&gt;
|-&lt;br /&gt;
| Popful Mail || $00 $FF $EE $B8 $06 $20 $01 $FF || 3 kHz || 10 kHz || -1.27 dB || For frequency &amp;gt;10 kHz, -10 dB, &amp;lt;3 kHz, -5 dB&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Band-stop filters ===&lt;br /&gt;
&lt;br /&gt;
Band-stop filters attenuates frequencies between a frequency region. It has a &amp;quot;U&amp;quot; like aspect.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Game !! FIR Filter !! Left Freq. !! Right Freq. !! Max. Gain !! Notes&lt;br /&gt;
|-&lt;br /&gt;
| Chaos Seed || $FF $40 $20 $20 $00 $00 $00 $00 || 5 kHz || 14 kHz || -0.07 dB || It has an &amp;quot;U&amp;quot;-like with 10 kHz at center.&lt;br /&gt;
|-&lt;br /&gt;
| Do-Re-Mi Fantasy - Milon no Dokidoki Daibouken || $00 $00 $00 $00 $48 $00 $30 $00 || 4 kHz || 12 kHz || -0.56 dB || It has a &amp;quot;V&amp;quot;-like curve with 8 kHz at center.&lt;br /&gt;
|-&lt;br /&gt;
| Many games || $0C $21 $2B $2B $F3 $FE $F3 $F9 || 6 kHz || 12 kHz || -0.14 dB || It looks like a lying &amp;quot;Z&amp;quot;. &amp;lt;6 kHz with -2dB and &amp;gt;12 kHz with -11dB. At 9 kHz, -14 dB.&lt;br /&gt;
|-&lt;br /&gt;
| Popful Mail || $08 $FF $E0 $B8 $04 $80 $09 $FF || 4 kHz || 10 kHz || +4.42 dB || It has an &amp;quot;U&amp;quot;-like curve with 6.7 kHz at center.&lt;br /&gt;
|-&lt;br /&gt;
| Super Bomberman 3 || $00 $00 $00 $28 $00 $28 $00 $FE || 5 kHz || 11 kHz || -4.30 dB || It has an even &amp;quot;V&amp;quot;-like curve with 8 kHz at center.&lt;br /&gt;
|-&lt;br /&gt;
| Super Bomberman 3 || $00 $00 $00 $40 $00 $28 $00 $FE || 5 kHz || 11 kHz || -1.97 dB || It has an even &amp;quot;V&amp;quot;-like curve with 8 kHz at center.&lt;br /&gt;
|-&lt;br /&gt;
| Tengai Makyou Zero || $00 $00 $00 $00 $30 $00 $48 $00 || 4 kHz || 12 kHz || -0.56 dB || It has a &amp;quot;V&amp;quot;-like curve with 8 kHz at center.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Unusual filters ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Game !! FIR Filter !! Maximum Gain !! What it Does&lt;br /&gt;
|-&lt;br /&gt;
| Alien vs. Predator || $0C $2B $2B $2B $28 $FF $F8 $F9 || +2.21 dB || Band-stop between 6 kHz and 8.5 kHz (-15 dB). Smooth Low-pass cut-off at 13 kHz (-18 dB).&lt;br /&gt;
|-&lt;br /&gt;
| Angelique Voice Fantasy || $0D $F5 $FA $12 $12 $FA $F5 $0D || -5.40 dB || Eliminates 12 kHz and 16 kHz.&lt;br /&gt;
|-&lt;br /&gt;
| B.O.B || $18 $0C $F4 $0C $F4 $0C $F4 $00 || -6.90 dB || Attenuates 0 kHz (-14 dB), 5 kHz (-14 dB) and 10 kHz (-16 dB).&lt;br /&gt;
|-&lt;br /&gt;
| Doney Kong Country 2 || $50 $BF $DB $E0 $E0 $0A $C8 $C8 || +3.59 dB || It looks like a &amp;quot;W&amp;quot; at 4.3 kHz (-10 dB) and 9.7 kHz (-15 dB).&lt;br /&gt;
|-&lt;br /&gt;
| Donkey Kong Country || $00 $01 $00 $00 $00 $00 $00 $00 || -42.14 dB || Makes echo almost inaudible.&lt;br /&gt;
|-&lt;br /&gt;
| Doom || $FA $0A $1A $13 $13 $1A $0A $FA || -2.32 dB || Eliminates 6.4 kHz, 12.8 kHz and 16 kHz.&lt;br /&gt;
|-&lt;br /&gt;
| Dragon Guest VI || $0D $10 $10 $24 $3D $F4 $F4 $F4 || -0.76 dB || It looks like a twisted &amp;quot;W&amp;quot; at ~6 kHz (-5 dB) and ~12.5 kHz (-10 dB).&lt;br /&gt;
|-&lt;br /&gt;
| Dragon Guest VI || $10 $08 $14 $14 $14 $FE $FE $FE || -4.30 dB || It looks like a &amp;quot;W&amp;quot; at ~6 kHz (-16 dB) and ~12 kHz (-30 dB).&lt;br /&gt;
|-&lt;br /&gt;
| Dragon Guest VI || $30 $0C $44 $0C $54 $0C $B4 $0C || +3.24 dB || Looks like a &amp;quot;W&amp;quot; at 5.8 kHz (-2.8 dB), 10.4 kHz (-1.5 dB), low pass at 15 kHz (0 dB).&lt;br /&gt;
|-&lt;br /&gt;
| Front Mission, BS Koi ha Balance, BS Dynani Tracer || $XX $00 $00 $00 $00 $00 $00 $00 || -0.14 dB || $XX fades in from $00 to $7E at beginning, essentially controlling the echo volume and feedback.&lt;br /&gt;
|-&lt;br /&gt;
| Jim Power || $FF $FC $FD $FE $FF $FE $FD $FC || -16.12 dB || Many ripples at 4 kHz (-50 dB), 9 kHz (-45 dB), 13.5 kHz (-42 dB), gradually attenuating higher frequencies.&lt;br /&gt;
|-&lt;br /&gt;
| Kamaitachi no Yoru || $FF $0A $1E $32 $32 $1E $0A $FF || +2.86 dB || Eliminates 9.5 kHz, 11.5 kHz and 16 kHz.&lt;br /&gt;
|-&lt;br /&gt;
| Kamen Rider SD || $20 $06 $10 $16 $16 $06 $08 $20 || +1.02 dB || Attenuates 3.5 kHz (-25 dB), 6.5 kHz (-22 dB), 11.6 kHz (-40 dB) and 16 kHz (-18 dB).&lt;br /&gt;
|-&lt;br /&gt;
| Many games || $10 $30 $22 $24 $11 $F0 $20 $FF || +2.26 dB || Band-stop at 9 kHz (-15 dB) and very light low-pass filter at 14 kHz (-10 dB).&lt;br /&gt;
|-&lt;br /&gt;
| Many games || $3F $D8 $00 $D9 $E5 $01 $6F $EB || +5.68 dB || It would have been a high-pass filter at 3 kHz if it wasn&#039;t for the sudden gain drop at 13 kHz (-20 dB).&lt;br /&gt;
|-&lt;br /&gt;
| Mario is Missing! || $0A $0A $0A $0A $0A $0A $0A $0A || -4.08 dB || Eliminates 4, 8, 12 and 16 kHz in a way that echo doesn&#039;t explode on the song.&lt;br /&gt;
|-&lt;br /&gt;
| Momotarou Dentetsu Happy || $10 $20 $60 $30 $55 $17 $80 $01 || +7.06 dB || Band-stop at 7.5 kHz (+1 dB) and low-pass filter with cut-off at 14 kHz (-5 dB).&lt;br /&gt;
|-&lt;br /&gt;
| Momotarou Dentetsu Happy || $60 $20 $60 $30 $55 $17 $80 $01 || +8.28 dB || It looks like a &amp;quot;W&amp;quot;, but weak. 5.5 kHz (0 dB), 10.5 kHz (-2 dB). Drops at 16 kHz (-10 dB).&lt;br /&gt;
|-&lt;br /&gt;
| Monster Maker 3 || $21 $00 $23 $00 $25 $00 $27 $00 || +1.02 dB || Band-stop at 4 kHz (-27 dB), 8 kHz (-30 dB), 12 kHz (-27 dB), symmetrical filter.&lt;br /&gt;
|-&lt;br /&gt;
| Popful Mail || $06 $B0 $07 $FF $EB $B8 $0E $00 || +1.93 dB || It looks like a twisted &amp;quot;W&amp;quot; at ~4.5 kHz (-22 dB) and ~12.5 kHz (-16 dB).&lt;br /&gt;
|-&lt;br /&gt;
| Prince of Persia II || $0F $08 $86 $08 $0B $09 $90 $09 || +6.17 dB || It looks like a &amp;quot;W&amp;quot; at ~4 kHz and ~12 kHz.&lt;br /&gt;
|-&lt;br /&gt;
| Seiken Densetsu 3/Trials of Mana || $20 $0C $10 $0C $20 $0C $0C $0C || +0.78 dB || Looks like a &amp;quot;W&amp;quot; at 4 kHz (-30 dB) and 11.7 kHz (-50 dB).&lt;br /&gt;
|-&lt;br /&gt;
| Sengoku Denshou || $65 $09 $F4 $09 $8C $0A $2C $0B || +5.60 dB || It looks like a &amp;quot;M&amp;quot; at 1 kHz (-6 dB), 8 kHz (-8 dB) and 16 kHz (-15 dB).&lt;br /&gt;
|-&lt;br /&gt;
| Star Ocean, Tales of Phantasia || $0D $22 $22 $24 $11 $F0 $03 $FF || -0.56 dB || Band-stop between 5 kHz and 10 kHz (-16 dB). Smooth Low-pass cut-off at 13 kHz (-17 dB). Echo slowly overflows without the FIR.&lt;br /&gt;
|-&lt;br /&gt;
| Super Genjin 2 || $00 $00 $00 $36 $00 $28 $00 $41 || +1.88 dB || It looks like a &amp;quot;W&amp;quot; at ~5 kHz and ~11 kHz.&lt;br /&gt;
|-&lt;br /&gt;
| Super Mad Champ || $34 $33 $00 $D9 $E5 $01 $FC $00 || +1.11 dB || Band-pass between 2 kHz and 9 kHz &amp;amp; 12 kHz and 15 kHz (weakier, -13 dB).&lt;br /&gt;
|-&lt;br /&gt;
| Super Tekkyuu Fight! || $0E $49 $4B $46 $5F $08 $DE $08 || +7.66 dB || It looks like a twisted &amp;quot;W&amp;quot; at ~7 kHz (-5 dB) and ~15 kHz (-30dB).&lt;br /&gt;
|-&lt;br /&gt;
| Tactics Ogre || $44 $0C $46 $0C $75 $0C $C4 $0C || +5.57 dB || It looks like a &amp;quot;W at 5.3 kHz (-4.0 dB) and 10.7 kHz (-1.8 dB).&lt;br /&gt;
|-&lt;br /&gt;
| The Flintstones || $XX $33 $00 $D9 $E5 $01 $FC $EB || +4.34 dB || $XX ranges from $00 to $7F, essentially a light high-pass filter with volume fade.&lt;br /&gt;
|-&lt;br /&gt;
| The Mask || $FA $02 $18 $28 $2A $F4 $0A $1E || +0.14 dB || Slight attenuates at 4 kHz (-7 dB), then starting at 9 kHz it gradually starts attenuating (-15 dB).&lt;br /&gt;
|-&lt;br /&gt;
| The Mask || $30 $1A $04 $F4 $F8 $04 $0A $0C || -1.96 dB || Band-stop at 2 kHz (-8 dB), 8.5 kHz (-10 dB), 11.5 kHz (-15 dB), 16 kHz (-15 dB).&lt;br /&gt;
|-&lt;br /&gt;
| The Simpsons - Bart&#039;s Nightmare || $00 $08 $10 $10 $10 $10 $08 $00 || -4.08 dB || Eliminates 6.8 kHz and 13.6 kHz in a way that echo doesn&#039;t explode on the song.&lt;br /&gt;
|-&lt;br /&gt;
| The Simpsons - Bart&#039;s Nightmare || $18 $18 $18 $18 $18 $18 $18 $18 || +3.52 dB || Eliminates 4, 8, 12 and 16 kHz.&lt;br /&gt;
|-&lt;br /&gt;
| WWF Super Wrestlemania || $13 $13 $13 $13 $13 $13 $13 $13 || +1.49 dB || Eliminates 4, 8, 12 and 16 kHz.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* [https://www.romhacking.net/documents/191/ Romhacking.net - Documents - Anomie&#039;s S-DSP Doc]&lt;br /&gt;
* [https://problemkaputt.de/fullsnes.htm Fullsnes - Nocash SNES Specs]&lt;br /&gt;
* [https://www.vyssotski.ch/BasicsOfInstrumentation/SpikeSorting/Design_of_FIR_Filters.pdf Design of FIR Filters - Dr. Elena Punskaya]&lt;br /&gt;
* [https://www.elprocus.com/fir-filter-for-digital-signal-processing/ What is FIR Filter? - FIR Filters for Digital Signal Processing]&lt;br /&gt;
* [http://www.eas.uccs.edu/~mwickert/ece2610/lecture_notes/ece2610_chap5.pdf ECE 2610 Signal and Systems - FIR Filters]&lt;br /&gt;
* [https://www.dsprelated.com/freebooks/sasp/FIR_Digital_Filter_Design.html FIR Digital Filter Design | Spectral Audio Signal Processing]&lt;br /&gt;
* [https://dspguru.com/dsp/faqs/fir/ FIR filter FAQ - dspGuru]&lt;br /&gt;
* [http://www.sengpielaudio.com/calculator-levelchange.htm The relationship between decibels, volume and power - sengpielaudio]&lt;/div&gt;</summary>
		<author><name>LucianoTheWindowsFan</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=Talk:FIR_Filter&amp;diff=1900</id>
		<title>Talk:FIR Filter</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=Talk:FIR_Filter&amp;diff=1900"/>
		<updated>2021-05-08T21:58:38Z</updated>

		<summary type="html">&lt;p&gt;LucianoTheWindowsFan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== TO DO list ==&lt;br /&gt;
&lt;br /&gt;
# Designing your own FIR filters using Fast Fourier Transform&lt;br /&gt;
# FIRcon&lt;br /&gt;
# Include sample songs (using some audio plugin?)&lt;br /&gt;
&lt;br /&gt;
--[[User:Vitor Vilela|Vitor Vilela]] ([[User talk:Vitor Vilela|talk]]) 01:48, 18 November 2019 (UTC)&lt;br /&gt;
:The FIR filter of &amp;quot;$F8 $08 $11 $1C $1C $11 $08 $F8&amp;quot; was used in &#039;&#039;Ren and Stimpy: Time Warp&#039;&#039;. --[[User:LucianoTheWindowsFan|LucianoTheWindowsFan]] ([[User talk:LucianoTheWindowsFan|talk]]) 21:58, 8 May 2021 (UTC)&lt;/div&gt;</summary>
		<author><name>LucianoTheWindowsFan</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=User_talk:LucianoTheWindowsFan&amp;diff=1899</id>
		<title>User talk:LucianoTheWindowsFan</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=User_talk:LucianoTheWindowsFan&amp;diff=1899"/>
		<updated>2021-05-08T21:58:10Z</updated>

		<summary type="html">&lt;p&gt;LucianoTheWindowsFan: Wrong page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>LucianoTheWindowsFan</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=Kirby%27s_Dream_Land_3:Audio&amp;diff=1898</id>
		<title>Kirby&#039;s Dream Land 3:Audio</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=Kirby%27s_Dream_Land_3:Audio&amp;diff=1898"/>
		<updated>2021-05-08T21:53:04Z</updated>

		<summary type="html">&lt;p&gt;LucianoTheWindowsFan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a documentation of [[Kirby&#039;s Dream Land 3]]&#039;s Audio Files.&lt;br /&gt;
&lt;br /&gt;
== Sound Driver ==&lt;br /&gt;
PC:	0x103EFC&amp;lt;br&amp;gt;&lt;br /&gt;
SNES:	$D03EFC&amp;lt;br&amp;gt;&lt;br /&gt;
ARAM:	$0700&amp;lt;br&amp;gt;&lt;br /&gt;
Length:	0x9FC bytes.&amp;lt;br&amp;gt;&lt;br /&gt;
Uses the standard N-SPC as a base, however, the game only uses tempo values 2E, 2F and 30 because tempo affects sound effects too, therefore, the songs use non-standard note lenghts to simulate tempo. The panning table is inverted, normally 00 - 14 would be Right - Left, but in this driver it&#039;s the opposite (which makes more sense to me). Percussion Set command does nothing as it&#039;s in a fixed value of 23, this may be because each sound effect sets the command to 23. The driver is not programmed to deal with SFX interrupts correctly, so every stage song must use 5 channels or less.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Song List ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! SONG IDs !! Common Name !! Additional Comments&lt;br /&gt;
|-&lt;br /&gt;
| 00 Nothing || N/A || &lt;br /&gt;
|-&lt;br /&gt;
| 01 K3DEATH || Kirby Lose || &lt;br /&gt;
|-&lt;br /&gt;
| 02 K3BOSS || Big Boss Battle || &lt;br /&gt;
|-&lt;br /&gt;
| 03 K3BOSS2 || Invincible 2 || This one is unused, apparently it was meant for a boss.&lt;br /&gt;
|-&lt;br /&gt;
| 04 K3BOSS3 || Miniboss Battle || &lt;br /&gt;
|-&lt;br /&gt;
| 05 K3CLEARSTAR || Bonus Jump || &lt;br /&gt;
|-&lt;br /&gt;
| 06 K3CLEARSH || Victory || &lt;br /&gt;
|-&lt;br /&gt;
| 07 K3DEDEDE || King Dedede || &lt;br /&gt;
|-&lt;br /&gt;
| 08 K3EVENT1 || Mission Completed || &lt;br /&gt;
|-&lt;br /&gt;
| 09 K3EVENT2 || Incorrect Path || Song is only used in one level, probably was supposed to play when a mission was failed, but the idea ended up being scrapped.&lt;br /&gt;
|-&lt;br /&gt;
| 0A K3FIELD1 || Grass Land 4 || &lt;br /&gt;
|-&lt;br /&gt;
| 0B K3FIELD2 || Grass Land 2 || &lt;br /&gt;
|-&lt;br /&gt;
| 0C K3FIELD3 || Iceberg || &lt;br /&gt;
|-&lt;br /&gt;
| 0D K3FIELD4 || Sand Canyon 1 || &lt;br /&gt;
|-&lt;br /&gt;
| 0E K3FIELD5 || Sand Canyon 3 || &lt;br /&gt;
|-&lt;br /&gt;
| 0F K3FIELD6 || Ripple Field 1 || &lt;br /&gt;
|-&lt;br /&gt;
| 10 K3FIELD7 || Ripple Field 3 || &lt;br /&gt;
|-&lt;br /&gt;
| 11 K3FIELD8 || Cloudy Park || &lt;br /&gt;
|-&lt;br /&gt;
| 12 K3FIELD9 || Ripple Field 2 || &lt;br /&gt;
|-&lt;br /&gt;
| 13 K3FIELD10 || Grass Land 3 || &lt;br /&gt;
|-&lt;br /&gt;
| 14 K3FIELD11 || Grass Land 1 || &lt;br /&gt;
|-&lt;br /&gt;
| 15 K3FIELD12 || Sand Canyon 2 || A copypaste of Gourmet Race from Kirby Super Star. Its pitch was edited probably to fit with KDL3&#039;s samples properly.&lt;br /&gt;
|-&lt;br /&gt;
| 16 K3GAMEOVER || Game Over || &lt;br /&gt;
|-&lt;br /&gt;
| 17 K3LASBOSS1 || Hyper Zone 1 || &lt;br /&gt;
|-&lt;br /&gt;
| 18 K3LASBOSS2 || Hyper Zone 2 || &lt;br /&gt;
|-&lt;br /&gt;
| 19 K3LEVEL1 || Grass Land Map || &lt;br /&gt;
|-&lt;br /&gt;
| 1A K3LEVEL2 || Ripple Field Map || &lt;br /&gt;
|-&lt;br /&gt;
| 1B K3LEVEL3 || Cloudy Park Map || &lt;br /&gt;
|-&lt;br /&gt;
| 1C K3LEVEL4 || Sand Canyon Map || &lt;br /&gt;
|-&lt;br /&gt;
| 1D K3LEVEL5 || Mission Failed || Probably meant to play in a level map, but then the idea was scrapped and K3EVENT2 was replaced by this one.&lt;br /&gt;
|-&lt;br /&gt;
| 1E K3LEVEL6 || Iceberg Map || &lt;br /&gt;
|-&lt;br /&gt;
| 1F K3MINIGAME1 || Minigame || &lt;br /&gt;
|-&lt;br /&gt;
| 20 K3MUTEKI || Invincible 1 || &lt;br /&gt;
|-&lt;br /&gt;
| 21 K3OPEN1 || Opening || &lt;br /&gt;
|-&lt;br /&gt;
| 22 K3OPEN2 || Title Screen || &lt;br /&gt;
|-&lt;br /&gt;
| 23 K3OPEN3 || Music Test || &lt;br /&gt;
|-&lt;br /&gt;
| 24 K3OPENSE || Ominous Wind || Its name implies that it was going to be used in a similar way to Super Star&#039;s Spring Breeze or Dynablade cutscenes.&lt;br /&gt;
|-&lt;br /&gt;
| 25 K3SELECT || File Select || &lt;br /&gt;
|-&lt;br /&gt;
| 26 K3SIMOBE1 || Friends 1 || &lt;br /&gt;
|-&lt;br /&gt;
| 27 K3SIMOBE2 || Friends 2 || &lt;br /&gt;
|-&lt;br /&gt;
| 28 K3SIMOBE3 || Friends 3 || &lt;br /&gt;
|-&lt;br /&gt;
| 29 K3WORLDMAP || Popstar || &lt;br /&gt;
|-&lt;br /&gt;
| 2A K3END1 || Staff Roll || &lt;br /&gt;
|-&lt;br /&gt;
| 2B K3END2 || Cast Montage || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Each song inserts at ARAM $4739 except for Staff Roll and Cast Montage which insert at ARAM $3439.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Song Pointers ===&lt;br /&gt;
PC:	0x005EB2&amp;lt;br&amp;gt;&lt;br /&gt;
SNES:	$C05EB2&amp;lt;br&amp;gt;&lt;br /&gt;
Length:	0x81 bytes.&amp;lt;br&amp;gt;&lt;br /&gt;
Every three bytes points to each song in the exact same order as [[Kirby&#039;s Dream Land 3:Audio#Song_List|Song IDs]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Sample Pack List ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Sample Pack IDs !! Used in !! Inst 28 !! Inst 29 !! Inst 2A !! Inst 2B&lt;br /&gt;
|-&lt;br /&gt;
| 00 || Default || N/A || N/A || N/A || N/A&lt;br /&gt;
|-&lt;br /&gt;
| 01 || Big Boss Battle, Iceberg || Power Snare Drum || Acid Synth Bass || N/A || N/A&lt;br /&gt;
|-&lt;br /&gt;
| 02 || Title Screen, Grass Land 3, Ripple Field 1, Ripple Field 3, Miniboss Battle || VOX Arr1 (Soft Attack) || VOX Arr1 || Slap Bass || Synth Brass&lt;br /&gt;
|-&lt;br /&gt;
| 03 || Sand Canyon 2, King Dedede, Hyper Zone 1 || Synth Bass 1 || Wasp Synth Fifths || Solo Wasp Synth || N/A&lt;br /&gt;
|-&lt;br /&gt;
| 04 || Grass Land 1, Grass Land 2 || Clarinet || Tuba || N/A || N/A&lt;br /&gt;
|-&lt;br /&gt;
| 05 || Ripple Field 2 || Pulse Wave-like (Unused) || Synth-ish Snare Drum || Sub Synth Bass  || N/A&lt;br /&gt;
|-&lt;br /&gt;
| 06 || Hyper Zone 2 || Crystal || Synth Bass 2 || N/A || N/A&lt;br /&gt;
|-&lt;br /&gt;
| 07 || Opening, Music Test || Glass Pad (Soft Attack) || Glass Pad || Electric Open Hi-Hat || N/A&lt;br /&gt;
|-&lt;br /&gt;
| 08 || Pop Star || Cyber Space || N/A || N/A || N/A&lt;br /&gt;
|-&lt;br /&gt;
| 09 (Referred to as 89) || Staff Roll || Voice Oohs || Synth Guitar || N/A || N/A&lt;br /&gt;
|-&lt;br /&gt;
| 0A (Referred to as 8A) || Cast Montage || Wood Block || N/A || N/A || N/A&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Sample Pack Pointers ===&lt;br /&gt;
PC:	0x005F6C&amp;lt;br&amp;gt;&lt;br /&gt;
SNES:	$C05F6C&amp;lt;br&amp;gt;&lt;br /&gt;
Length:	0x1E bytes.&amp;lt;br&amp;gt;&lt;br /&gt;
Every three bytes points to each sample pack in the exact same order as [[Kirby&#039;s Dream Land 3:Audio#Sample_Pack_List|Sample Pack IDs]] (starting from 01). &amp;lt;br&amp;gt;&lt;br /&gt;
The game has roughly 10KB free available for samples in ARAM, but only uses up to about 5KB.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Global Sample Pack ===&lt;br /&gt;
PC:	$0E0000&amp;lt;br&amp;gt;&lt;br /&gt;
SNES:	$CE0000&amp;lt;br&amp;gt;&lt;br /&gt;
Length:	0x74AD bytes.&amp;lt;br&amp;gt;&lt;br /&gt;
Where all of the global samples are. Instrument range goes from 00 to 27. See table below.&amp;lt;br&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ID !! Instrument&lt;br /&gt;
|-&lt;br /&gt;
| 00 || Tenor Sax&lt;br /&gt;
|-&lt;br /&gt;
| 01 || Trumpet&lt;br /&gt;
|-&lt;br /&gt;
| 02 || Gameboy Bass&lt;br /&gt;
|-&lt;br /&gt;
| 03 || Fantasia&lt;br /&gt;
|-&lt;br /&gt;
| 04 || Jazz Guitar&lt;br /&gt;
|-&lt;br /&gt;
| 05 || FM Glockenspiel (Soft Attack)&lt;br /&gt;
|-&lt;br /&gt;
| 06 || FM Glockenspiel&lt;br /&gt;
|-&lt;br /&gt;
| 07 || Celesta (Long)&lt;br /&gt;
|-&lt;br /&gt;
| 08 || Celesta (Soft Attack)&lt;br /&gt;
|-&lt;br /&gt;
| 09 || Celesta&lt;br /&gt;
|-&lt;br /&gt;
| 0A || Phaze SFX (Non-sustained)&lt;br /&gt;
|-&lt;br /&gt;
| 0B || Phaze SFX&lt;br /&gt;
|-&lt;br /&gt;
| 0C || Jet SFX (Soft Attack, Slow Decay)&lt;br /&gt;
|-&lt;br /&gt;
| 0D || Jet SFX &lt;br /&gt;
|-&lt;br /&gt;
| 0E || Jet SFX (Softer Attack, Slower Decay)&lt;br /&gt;
|-&lt;br /&gt;
| 0F || Jet SFX (Strong Attack)&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Sine Wave (Sloppily looped, works best with echo)&lt;br /&gt;
|-&lt;br /&gt;
| 11 || Noise (Soft Attack, Slow Decay)&lt;br /&gt;
|-&lt;br /&gt;
| 12 || Noise (Stronger Attack, Fast Decay) &lt;br /&gt;
|-&lt;br /&gt;
| 13 || Noise&lt;br /&gt;
|-&lt;br /&gt;
| 14 || Machine-ish Noise&lt;br /&gt;
|-&lt;br /&gt;
| 15 || String Ensemble (Soft Attack, Fast Decay)&lt;br /&gt;
|-&lt;br /&gt;
| 16 || String Ensemble (Softer Attack, Fast Decay)&lt;br /&gt;
|-&lt;br /&gt;
| 17 || String Ensemble (Even Softer Attack, Slower Decay)&lt;br /&gt;
|-&lt;br /&gt;
| 18 || String Ensemble (Soft Attack)&lt;br /&gt;
|-&lt;br /&gt;
| 19 || String Ensemble&lt;br /&gt;
|-&lt;br /&gt;
| 1A || Aaah VOX Synth&lt;br /&gt;
|-&lt;br /&gt;
| 1B || Swanee (Blown Bottle)&lt;br /&gt;
|-&lt;br /&gt;
| 1C || Pan Flute&lt;br /&gt;
|-&lt;br /&gt;
| 1D || Lead 1&lt;br /&gt;
|-&lt;br /&gt;
| 1E || 50% Square Wave (Slightly Softer)&lt;br /&gt;
|-&lt;br /&gt;
| 1F || 50% Square Wave&lt;br /&gt;
|-&lt;br /&gt;
| 20 || Triangle Wave&lt;br /&gt;
|-&lt;br /&gt;
| 21 || Lead 2 (Used commonly as a bass)&lt;br /&gt;
|-&lt;br /&gt;
| 22 || Rumbling SFX&lt;br /&gt;
|-&lt;br /&gt;
| 23 || Electric Kick&lt;br /&gt;
|-&lt;br /&gt;
| 24 || Electric Hi-Hat&lt;br /&gt;
|-&lt;br /&gt;
| 25 || Timbale&lt;br /&gt;
|-&lt;br /&gt;
| 26 || Electric Snare (Soft Decay, used commonly in low octaves)&lt;br /&gt;
|-&lt;br /&gt;
| 27 || Electric Snare&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Sample Pack Usage ===&lt;br /&gt;
PC:	0x10CA2E&amp;lt;br&amp;gt;&lt;br /&gt;
SNES:	$D0CA2E&amp;lt;br&amp;gt;&lt;br /&gt;
Length:	0x2B bytes.&amp;lt;br&amp;gt;&lt;br /&gt;
Each byte corresponds to which sample pack each song will use, the order of the bytes is the exact same as [[Kirby&#039;s Dream Land 3:Audio#Song_List|Song IDs]]. You must input the ID of which sample pack you want to use.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Sound Effects? ==&lt;br /&gt;
Sound Effects start at $3400 in ARAM and at $CEA1F3 (PC 0x0EA1F3) in ROM, I can&#039;t grasp how they exactly work though, they behave like normal sequence data but I had trouble understanding how their pointers work.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Relevant RAM Adresses ==&lt;br /&gt;
$80:7350	Current song playing.&amp;lt;br&amp;gt;&lt;br /&gt;
$80:7351	Current sample pack being used.&amp;lt;br&amp;gt;&lt;br /&gt;
$80:7340	Current SFX playing.&lt;/div&gt;</summary>
		<author><name>LucianoTheWindowsFan</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=Kirby%27s_Dream_Land_3:Audio&amp;diff=1897</id>
		<title>Kirby&#039;s Dream Land 3:Audio</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=Kirby%27s_Dream_Land_3:Audio&amp;diff=1897"/>
		<updated>2021-05-08T21:52:44Z</updated>

		<summary type="html">&lt;p&gt;LucianoTheWindowsFan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a documentation of [[Kirby&#039;s Dream Land 3]]&#039;s Audio Files.&lt;br /&gt;
&lt;br /&gt;
== Sound Driver ==&lt;br /&gt;
PC:	0x103EFC&amp;lt;br&amp;gt;&lt;br /&gt;
SNES:	$D03EFC&amp;lt;br&amp;gt;&lt;br /&gt;
ARAM:	$0700&amp;lt;br&amp;gt;&lt;br /&gt;
Length:	0x9FC bytes.&amp;lt;br&amp;gt;&lt;br /&gt;
Uses the standard N-SPC as a base, however, the game only uses tempo values 2E, 2F and 30 because tempo affects sound effects too, therefore, the songs use non-standard note lenghts to simulate tempo. The panning table is inverted, normally 00 - 14 would be Right - Left, but in this driver it&#039;s the opposite (which makes more sense to me). Percussion Set command does nothing as it&#039;s in a fixed value of 23, this may be because each sound effect sets the command to 23. The driver is not programmed to deal with SFX interrupts correctly, so every stage song must use 5 channels or less.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Song List ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! SONG IDs !! Common Name !! Additional Comments&lt;br /&gt;
|-&lt;br /&gt;
| 00 Nothing || N/A || &lt;br /&gt;
|-&lt;br /&gt;
| 01 K3DEATH || Kirby Lose || &lt;br /&gt;
|-&lt;br /&gt;
| 02 K3BOSS || Big Boss Battle || &lt;br /&gt;
|-&lt;br /&gt;
| 03 K3BOSS2 || Invincible 2 || This one is unused, apparently it was meant for a boss.&lt;br /&gt;
|-&lt;br /&gt;
| 04 K3BOSS3 || Miniboss Battle || &lt;br /&gt;
|-&lt;br /&gt;
| 05 K3CLEARSTAR || Bonus Jump || &lt;br /&gt;
|-&lt;br /&gt;
| 06 K3CLEARSH || Victory || &lt;br /&gt;
|-&lt;br /&gt;
| 07 K3DEDEDE || King Dedede || &lt;br /&gt;
|-&lt;br /&gt;
| 08 K3EVENT1 || Mission Completed || &lt;br /&gt;
|-&lt;br /&gt;
| 09 K3EVENT2 || Incorrect Path || Song is only used in one level, probably was supposed to play when a mission was failed, but the idea ended up being scrapped.&lt;br /&gt;
|-&lt;br /&gt;
| 0A K3FIELD1 || Grass Land 4 || &lt;br /&gt;
|-&lt;br /&gt;
| 0B K3FIELD2 || Grass Land 2 || &lt;br /&gt;
|-&lt;br /&gt;
| 0C K3FIELD3 || Iceberg || &lt;br /&gt;
|-&lt;br /&gt;
| 0D K3FIELD4 || Sand Canyon 1 || &lt;br /&gt;
|-&lt;br /&gt;
| 0E K3FIELD5 || Sand Canyon 3 || &lt;br /&gt;
|-&lt;br /&gt;
| 0F K3FIELD6 || Ripple Field 1 || &lt;br /&gt;
|-&lt;br /&gt;
| 10 K3FIELD7 || Ripple Field 3 || &lt;br /&gt;
|-&lt;br /&gt;
| 11 K3FIELD8 || Cloudy Park || &lt;br /&gt;
|-&lt;br /&gt;
| 12 K3FIELD9 || Ripple Field 2 || &lt;br /&gt;
|-&lt;br /&gt;
| 13 K3FIELD10 || Grass Land 3 || &lt;br /&gt;
|-&lt;br /&gt;
| 14 K3FIELD11 || Grass Land 1 || &lt;br /&gt;
|-&lt;br /&gt;
| 15 K3FIELD12 || Sand Canyon 2 || A copypaste from Super Star, this one being Gourmet Race. Its pitch was edited probably to fit with KDL3&#039;s samples properly.&lt;br /&gt;
|-&lt;br /&gt;
| 16 K3GAMEOVER || Game Over || &lt;br /&gt;
|-&lt;br /&gt;
| 17 K3LASBOSS1 || Hyper Zone 1 || &lt;br /&gt;
|-&lt;br /&gt;
| 18 K3LASBOSS2 || Hyper Zone 2 || &lt;br /&gt;
|-&lt;br /&gt;
| 19 K3LEVEL1 || Grass Land Map || &lt;br /&gt;
|-&lt;br /&gt;
| 1A K3LEVEL2 || Ripple Field Map || &lt;br /&gt;
|-&lt;br /&gt;
| 1B K3LEVEL3 || Cloudy Park Map || &lt;br /&gt;
|-&lt;br /&gt;
| 1C K3LEVEL4 || Sand Canyon Map || &lt;br /&gt;
|-&lt;br /&gt;
| 1D K3LEVEL5 || Mission Failed || Probably meant to play in a level map, but then the idea was scrapped and K3EVENT2 was replaced by this one.&lt;br /&gt;
|-&lt;br /&gt;
| 1E K3LEVEL6 || Iceberg Map || &lt;br /&gt;
|-&lt;br /&gt;
| 1F K3MINIGAME1 || Minigame || &lt;br /&gt;
|-&lt;br /&gt;
| 20 K3MUTEKI || Invincible 1 || &lt;br /&gt;
|-&lt;br /&gt;
| 21 K3OPEN1 || Opening || &lt;br /&gt;
|-&lt;br /&gt;
| 22 K3OPEN2 || Title Screen || &lt;br /&gt;
|-&lt;br /&gt;
| 23 K3OPEN3 || Music Test || &lt;br /&gt;
|-&lt;br /&gt;
| 24 K3OPENSE || Ominous Wind || Its name implies that it was going to be used in a similar way to Super Star&#039;s Spring Breeze or Dynablade cutscenes.&lt;br /&gt;
|-&lt;br /&gt;
| 25 K3SELECT || File Select || &lt;br /&gt;
|-&lt;br /&gt;
| 26 K3SIMOBE1 || Friends 1 || &lt;br /&gt;
|-&lt;br /&gt;
| 27 K3SIMOBE2 || Friends 2 || &lt;br /&gt;
|-&lt;br /&gt;
| 28 K3SIMOBE3 || Friends 3 || &lt;br /&gt;
|-&lt;br /&gt;
| 29 K3WORLDMAP || Popstar || &lt;br /&gt;
|-&lt;br /&gt;
| 2A K3END1 || Staff Roll || &lt;br /&gt;
|-&lt;br /&gt;
| 2B K3END2 || Cast Montage || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Each song inserts at ARAM $4739 except for Staff Roll and Cast Montage which insert at ARAM $3439.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Song Pointers ===&lt;br /&gt;
PC:	0x005EB2&amp;lt;br&amp;gt;&lt;br /&gt;
SNES:	$C05EB2&amp;lt;br&amp;gt;&lt;br /&gt;
Length:	0x81 bytes.&amp;lt;br&amp;gt;&lt;br /&gt;
Every three bytes points to each song in the exact same order as [[Kirby&#039;s Dream Land 3:Audio#Song_List|Song IDs]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Sample Pack List ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Sample Pack IDs !! Used in !! Inst 28 !! Inst 29 !! Inst 2A !! Inst 2B&lt;br /&gt;
|-&lt;br /&gt;
| 00 || Default || N/A || N/A || N/A || N/A&lt;br /&gt;
|-&lt;br /&gt;
| 01 || Big Boss Battle, Iceberg || Power Snare Drum || Acid Synth Bass || N/A || N/A&lt;br /&gt;
|-&lt;br /&gt;
| 02 || Title Screen, Grass Land 3, Ripple Field 1, Ripple Field 3, Miniboss Battle || VOX Arr1 (Soft Attack) || VOX Arr1 || Slap Bass || Synth Brass&lt;br /&gt;
|-&lt;br /&gt;
| 03 || Sand Canyon 2, King Dedede, Hyper Zone 1 || Synth Bass 1 || Wasp Synth Fifths || Solo Wasp Synth || N/A&lt;br /&gt;
|-&lt;br /&gt;
| 04 || Grass Land 1, Grass Land 2 || Clarinet || Tuba || N/A || N/A&lt;br /&gt;
|-&lt;br /&gt;
| 05 || Ripple Field 2 || Pulse Wave-like (Unused) || Synth-ish Snare Drum || Sub Synth Bass  || N/A&lt;br /&gt;
|-&lt;br /&gt;
| 06 || Hyper Zone 2 || Crystal || Synth Bass 2 || N/A || N/A&lt;br /&gt;
|-&lt;br /&gt;
| 07 || Opening, Music Test || Glass Pad (Soft Attack) || Glass Pad || Electric Open Hi-Hat || N/A&lt;br /&gt;
|-&lt;br /&gt;
| 08 || Pop Star || Cyber Space || N/A || N/A || N/A&lt;br /&gt;
|-&lt;br /&gt;
| 09 (Referred to as 89) || Staff Roll || Voice Oohs || Synth Guitar || N/A || N/A&lt;br /&gt;
|-&lt;br /&gt;
| 0A (Referred to as 8A) || Cast Montage || Wood Block || N/A || N/A || N/A&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Sample Pack Pointers ===&lt;br /&gt;
PC:	0x005F6C&amp;lt;br&amp;gt;&lt;br /&gt;
SNES:	$C05F6C&amp;lt;br&amp;gt;&lt;br /&gt;
Length:	0x1E bytes.&amp;lt;br&amp;gt;&lt;br /&gt;
Every three bytes points to each sample pack in the exact same order as [[Kirby&#039;s Dream Land 3:Audio#Sample_Pack_List|Sample Pack IDs]] (starting from 01). &amp;lt;br&amp;gt;&lt;br /&gt;
The game has roughly 10KB free available for samples in ARAM, but only uses up to about 5KB.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Global Sample Pack ===&lt;br /&gt;
PC:	$0E0000&amp;lt;br&amp;gt;&lt;br /&gt;
SNES:	$CE0000&amp;lt;br&amp;gt;&lt;br /&gt;
Length:	0x74AD bytes.&amp;lt;br&amp;gt;&lt;br /&gt;
Where all of the global samples are. Instrument range goes from 00 to 27. See table below.&amp;lt;br&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ID !! Instrument&lt;br /&gt;
|-&lt;br /&gt;
| 00 || Tenor Sax&lt;br /&gt;
|-&lt;br /&gt;
| 01 || Trumpet&lt;br /&gt;
|-&lt;br /&gt;
| 02 || Gameboy Bass&lt;br /&gt;
|-&lt;br /&gt;
| 03 || Fantasia&lt;br /&gt;
|-&lt;br /&gt;
| 04 || Jazz Guitar&lt;br /&gt;
|-&lt;br /&gt;
| 05 || FM Glockenspiel (Soft Attack)&lt;br /&gt;
|-&lt;br /&gt;
| 06 || FM Glockenspiel&lt;br /&gt;
|-&lt;br /&gt;
| 07 || Celesta (Long)&lt;br /&gt;
|-&lt;br /&gt;
| 08 || Celesta (Soft Attack)&lt;br /&gt;
|-&lt;br /&gt;
| 09 || Celesta&lt;br /&gt;
|-&lt;br /&gt;
| 0A || Phaze SFX (Non-sustained)&lt;br /&gt;
|-&lt;br /&gt;
| 0B || Phaze SFX&lt;br /&gt;
|-&lt;br /&gt;
| 0C || Jet SFX (Soft Attack, Slow Decay)&lt;br /&gt;
|-&lt;br /&gt;
| 0D || Jet SFX &lt;br /&gt;
|-&lt;br /&gt;
| 0E || Jet SFX (Softer Attack, Slower Decay)&lt;br /&gt;
|-&lt;br /&gt;
| 0F || Jet SFX (Strong Attack)&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Sine Wave (Sloppily looped, works best with echo)&lt;br /&gt;
|-&lt;br /&gt;
| 11 || Noise (Soft Attack, Slow Decay)&lt;br /&gt;
|-&lt;br /&gt;
| 12 || Noise (Stronger Attack, Fast Decay) &lt;br /&gt;
|-&lt;br /&gt;
| 13 || Noise&lt;br /&gt;
|-&lt;br /&gt;
| 14 || Machine-ish Noise&lt;br /&gt;
|-&lt;br /&gt;
| 15 || String Ensemble (Soft Attack, Fast Decay)&lt;br /&gt;
|-&lt;br /&gt;
| 16 || String Ensemble (Softer Attack, Fast Decay)&lt;br /&gt;
|-&lt;br /&gt;
| 17 || String Ensemble (Even Softer Attack, Slower Decay)&lt;br /&gt;
|-&lt;br /&gt;
| 18 || String Ensemble (Soft Attack)&lt;br /&gt;
|-&lt;br /&gt;
| 19 || String Ensemble&lt;br /&gt;
|-&lt;br /&gt;
| 1A || Aaah VOX Synth&lt;br /&gt;
|-&lt;br /&gt;
| 1B || Swanee (Blown Bottle)&lt;br /&gt;
|-&lt;br /&gt;
| 1C || Pan Flute&lt;br /&gt;
|-&lt;br /&gt;
| 1D || Lead 1&lt;br /&gt;
|-&lt;br /&gt;
| 1E || 50% Square Wave (Slightly Softer)&lt;br /&gt;
|-&lt;br /&gt;
| 1F || 50% Square Wave&lt;br /&gt;
|-&lt;br /&gt;
| 20 || Triangle Wave&lt;br /&gt;
|-&lt;br /&gt;
| 21 || Lead 2 (Used commonly as a bass)&lt;br /&gt;
|-&lt;br /&gt;
| 22 || Rumbling SFX&lt;br /&gt;
|-&lt;br /&gt;
| 23 || Electric Kick&lt;br /&gt;
|-&lt;br /&gt;
| 24 || Electric Hi-Hat&lt;br /&gt;
|-&lt;br /&gt;
| 25 || Timbale&lt;br /&gt;
|-&lt;br /&gt;
| 26 || Electric Snare (Soft Decay, used commonly in low octaves)&lt;br /&gt;
|-&lt;br /&gt;
| 27 || Electric Snare&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Sample Pack Usage ===&lt;br /&gt;
PC:	0x10CA2E&amp;lt;br&amp;gt;&lt;br /&gt;
SNES:	$D0CA2E&amp;lt;br&amp;gt;&lt;br /&gt;
Length:	0x2B bytes.&amp;lt;br&amp;gt;&lt;br /&gt;
Each byte corresponds to which sample pack each song will use, the order of the bytes is the exact same as [[Kirby&#039;s Dream Land 3:Audio#Song_List|Song IDs]]. You must input the ID of which sample pack you want to use.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Sound Effects? ==&lt;br /&gt;
Sound Effects start at $3400 in ARAM and at $CEA1F3 (PC 0x0EA1F3) in ROM, I can&#039;t grasp how they exactly work though, they behave like normal sequence data but I had trouble understanding how their pointers work.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Relevant RAM Adresses ==&lt;br /&gt;
$80:7350	Current song playing.&amp;lt;br&amp;gt;&lt;br /&gt;
$80:7351	Current sample pack being used.&amp;lt;br&amp;gt;&lt;br /&gt;
$80:7340	Current SFX playing.&lt;/div&gt;</summary>
		<author><name>LucianoTheWindowsFan</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=Kirby%27s_Dream_Land_3:Audio&amp;diff=1896</id>
		<title>Kirby&#039;s Dream Land 3:Audio</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=Kirby%27s_Dream_Land_3:Audio&amp;diff=1896"/>
		<updated>2021-05-08T21:51:44Z</updated>

		<summary type="html">&lt;p&gt;LucianoTheWindowsFan: Not exactly a copypaste. It has the same song of origin, but otherwise sounds completely different.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a documentation of [[Kirby&#039;s Dream Land 3]]&#039;s Audio Files.&lt;br /&gt;
&lt;br /&gt;
== Sound Driver ==&lt;br /&gt;
PC:	0x103EFC&amp;lt;br&amp;gt;&lt;br /&gt;
SNES:	$D03EFC&amp;lt;br&amp;gt;&lt;br /&gt;
ARAM:	$0700&amp;lt;br&amp;gt;&lt;br /&gt;
Length:	0x9FC bytes.&amp;lt;br&amp;gt;&lt;br /&gt;
Uses the standard N-SPC as a base, however, the game only uses tempo values 2E, 2F and 30 because tempo affects sound effects too, therefore, the songs use non-standard note lenghts to simulate tempo. The panning table is inverted, normally 00 - 14 would be Right - Left, but in this driver it&#039;s the opposite (which makes more sense to me). Percussion Set command does nothing as it&#039;s in a fixed value of 23, this may be because each sound effect sets the command to 23. The driver is not programmed to deal with SFX interrupts correctly, so every stage song must use 5 channels or less.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Song List ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! SONG IDs !! Common Name !! Additional Comments&lt;br /&gt;
|-&lt;br /&gt;
| 00 Nothing || N/A || &lt;br /&gt;
|-&lt;br /&gt;
| 01 K3DEATH || Kirby Lose || &lt;br /&gt;
|-&lt;br /&gt;
| 02 K3BOSS || Big Boss Battle || &lt;br /&gt;
|-&lt;br /&gt;
| 03 K3BOSS2 || Invincible 2 || This one is unused, apparently it was meant for a boss.&lt;br /&gt;
|-&lt;br /&gt;
| 04 K3BOSS3 || Miniboss Battle || &lt;br /&gt;
|-&lt;br /&gt;
| 05 K3CLEARSTAR || Bonus Jump || &lt;br /&gt;
|-&lt;br /&gt;
| 06 K3CLEARSH || Victory || &lt;br /&gt;
|-&lt;br /&gt;
| 07 K3DEDEDE || King Dedede || &lt;br /&gt;
|-&lt;br /&gt;
| 08 K3EVENT1 || Mission Completed || &lt;br /&gt;
|-&lt;br /&gt;
| 09 K3EVENT2 || Incorrect Path || Song is only used in one level, probably was supposed to play when a mission was failed, but the idea ended up being scrapped.&lt;br /&gt;
|-&lt;br /&gt;
| 0A K3FIELD1 || Grass Land 4 || &lt;br /&gt;
|-&lt;br /&gt;
| 0B K3FIELD2 || Grass Land 2 || &lt;br /&gt;
|-&lt;br /&gt;
| 0C K3FIELD3 || Iceberg || &lt;br /&gt;
|-&lt;br /&gt;
| 0D K3FIELD4 || Sand Canyon 1 || &lt;br /&gt;
|-&lt;br /&gt;
| 0E K3FIELD5 || Sand Canyon 3 || &lt;br /&gt;
|-&lt;br /&gt;
| 0F K3FIELD6 || Ripple Field 1 || &lt;br /&gt;
|-&lt;br /&gt;
| 10 K3FIELD7 || Ripple Field 3 || &lt;br /&gt;
|-&lt;br /&gt;
| 11 K3FIELD8 || Cloudy Park || &lt;br /&gt;
|-&lt;br /&gt;
| 12 K3FIELD9 || Ripple Field 2 || &lt;br /&gt;
|-&lt;br /&gt;
| 13 K3FIELD10 || Grass Land 3 || &lt;br /&gt;
|-&lt;br /&gt;
| 14 K3FIELD11 || Grass Land 1 || &lt;br /&gt;
|-&lt;br /&gt;
| 15 K3FIELD12 || Sand Canyon 2 || And another copypaste from Super Star, this one being Gourmet Race. Its pitch was edited probably to fit with KDL3&#039;s samples properly.&lt;br /&gt;
|-&lt;br /&gt;
| 16 K3GAMEOVER || Game Over || &lt;br /&gt;
|-&lt;br /&gt;
| 17 K3LASBOSS1 || Hyper Zone 1 || &lt;br /&gt;
|-&lt;br /&gt;
| 18 K3LASBOSS2 || Hyper Zone 2 || &lt;br /&gt;
|-&lt;br /&gt;
| 19 K3LEVEL1 || Grass Land Map || &lt;br /&gt;
|-&lt;br /&gt;
| 1A K3LEVEL2 || Ripple Field Map || &lt;br /&gt;
|-&lt;br /&gt;
| 1B K3LEVEL3 || Cloudy Park Map || &lt;br /&gt;
|-&lt;br /&gt;
| 1C K3LEVEL4 || Sand Canyon Map || &lt;br /&gt;
|-&lt;br /&gt;
| 1D K3LEVEL5 || Mission Failed || Probably meant to play in a level map, but then the idea was scrapped and K3EVENT2 was replaced by this one.&lt;br /&gt;
|-&lt;br /&gt;
| 1E K3LEVEL6 || Iceberg Map || &lt;br /&gt;
|-&lt;br /&gt;
| 1F K3MINIGAME1 || Minigame || &lt;br /&gt;
|-&lt;br /&gt;
| 20 K3MUTEKI || Invincible 1 || &lt;br /&gt;
|-&lt;br /&gt;
| 21 K3OPEN1 || Opening || &lt;br /&gt;
|-&lt;br /&gt;
| 22 K3OPEN2 || Title Screen || &lt;br /&gt;
|-&lt;br /&gt;
| 23 K3OPEN3 || Music Test || &lt;br /&gt;
|-&lt;br /&gt;
| 24 K3OPENSE || Ominous Wind || Its name implies that it was going to be used in a similar way to Super Star&#039;s Spring Breeze or Dynablade cutscenes.&lt;br /&gt;
|-&lt;br /&gt;
| 25 K3SELECT || File Select || &lt;br /&gt;
|-&lt;br /&gt;
| 26 K3SIMOBE1 || Friends 1 || &lt;br /&gt;
|-&lt;br /&gt;
| 27 K3SIMOBE2 || Friends 2 || &lt;br /&gt;
|-&lt;br /&gt;
| 28 K3SIMOBE3 || Friends 3 || &lt;br /&gt;
|-&lt;br /&gt;
| 29 K3WORLDMAP || Popstar || &lt;br /&gt;
|-&lt;br /&gt;
| 2A K3END1 || Staff Roll || &lt;br /&gt;
|-&lt;br /&gt;
| 2B K3END2 || Cast Montage || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Each song inserts at ARAM $4739 except for Staff Roll and Cast Montage which insert at ARAM $3439.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Song Pointers ===&lt;br /&gt;
PC:	0x005EB2&amp;lt;br&amp;gt;&lt;br /&gt;
SNES:	$C05EB2&amp;lt;br&amp;gt;&lt;br /&gt;
Length:	0x81 bytes.&amp;lt;br&amp;gt;&lt;br /&gt;
Every three bytes points to each song in the exact same order as [[Kirby&#039;s Dream Land 3:Audio#Song_List|Song IDs]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Sample Pack List ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Sample Pack IDs !! Used in !! Inst 28 !! Inst 29 !! Inst 2A !! Inst 2B&lt;br /&gt;
|-&lt;br /&gt;
| 00 || Default || N/A || N/A || N/A || N/A&lt;br /&gt;
|-&lt;br /&gt;
| 01 || Big Boss Battle, Iceberg || Power Snare Drum || Acid Synth Bass || N/A || N/A&lt;br /&gt;
|-&lt;br /&gt;
| 02 || Title Screen, Grass Land 3, Ripple Field 1, Ripple Field 3, Miniboss Battle || VOX Arr1 (Soft Attack) || VOX Arr1 || Slap Bass || Synth Brass&lt;br /&gt;
|-&lt;br /&gt;
| 03 || Sand Canyon 2, King Dedede, Hyper Zone 1 || Synth Bass 1 || Wasp Synth Fifths || Solo Wasp Synth || N/A&lt;br /&gt;
|-&lt;br /&gt;
| 04 || Grass Land 1, Grass Land 2 || Clarinet || Tuba || N/A || N/A&lt;br /&gt;
|-&lt;br /&gt;
| 05 || Ripple Field 2 || Pulse Wave-like (Unused) || Synth-ish Snare Drum || Sub Synth Bass  || N/A&lt;br /&gt;
|-&lt;br /&gt;
| 06 || Hyper Zone 2 || Crystal || Synth Bass 2 || N/A || N/A&lt;br /&gt;
|-&lt;br /&gt;
| 07 || Opening, Music Test || Glass Pad (Soft Attack) || Glass Pad || Electric Open Hi-Hat || N/A&lt;br /&gt;
|-&lt;br /&gt;
| 08 || Pop Star || Cyber Space || N/A || N/A || N/A&lt;br /&gt;
|-&lt;br /&gt;
| 09 (Referred to as 89) || Staff Roll || Voice Oohs || Synth Guitar || N/A || N/A&lt;br /&gt;
|-&lt;br /&gt;
| 0A (Referred to as 8A) || Cast Montage || Wood Block || N/A || N/A || N/A&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Sample Pack Pointers ===&lt;br /&gt;
PC:	0x005F6C&amp;lt;br&amp;gt;&lt;br /&gt;
SNES:	$C05F6C&amp;lt;br&amp;gt;&lt;br /&gt;
Length:	0x1E bytes.&amp;lt;br&amp;gt;&lt;br /&gt;
Every three bytes points to each sample pack in the exact same order as [[Kirby&#039;s Dream Land 3:Audio#Sample_Pack_List|Sample Pack IDs]] (starting from 01). &amp;lt;br&amp;gt;&lt;br /&gt;
The game has roughly 10KB free available for samples in ARAM, but only uses up to about 5KB.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Global Sample Pack ===&lt;br /&gt;
PC:	$0E0000&amp;lt;br&amp;gt;&lt;br /&gt;
SNES:	$CE0000&amp;lt;br&amp;gt;&lt;br /&gt;
Length:	0x74AD bytes.&amp;lt;br&amp;gt;&lt;br /&gt;
Where all of the global samples are. Instrument range goes from 00 to 27. See table below.&amp;lt;br&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ID !! Instrument&lt;br /&gt;
|-&lt;br /&gt;
| 00 || Tenor Sax&lt;br /&gt;
|-&lt;br /&gt;
| 01 || Trumpet&lt;br /&gt;
|-&lt;br /&gt;
| 02 || Gameboy Bass&lt;br /&gt;
|-&lt;br /&gt;
| 03 || Fantasia&lt;br /&gt;
|-&lt;br /&gt;
| 04 || Jazz Guitar&lt;br /&gt;
|-&lt;br /&gt;
| 05 || FM Glockenspiel (Soft Attack)&lt;br /&gt;
|-&lt;br /&gt;
| 06 || FM Glockenspiel&lt;br /&gt;
|-&lt;br /&gt;
| 07 || Celesta (Long)&lt;br /&gt;
|-&lt;br /&gt;
| 08 || Celesta (Soft Attack)&lt;br /&gt;
|-&lt;br /&gt;
| 09 || Celesta&lt;br /&gt;
|-&lt;br /&gt;
| 0A || Phaze SFX (Non-sustained)&lt;br /&gt;
|-&lt;br /&gt;
| 0B || Phaze SFX&lt;br /&gt;
|-&lt;br /&gt;
| 0C || Jet SFX (Soft Attack, Slow Decay)&lt;br /&gt;
|-&lt;br /&gt;
| 0D || Jet SFX &lt;br /&gt;
|-&lt;br /&gt;
| 0E || Jet SFX (Softer Attack, Slower Decay)&lt;br /&gt;
|-&lt;br /&gt;
| 0F || Jet SFX (Strong Attack)&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Sine Wave (Sloppily looped, works best with echo)&lt;br /&gt;
|-&lt;br /&gt;
| 11 || Noise (Soft Attack, Slow Decay)&lt;br /&gt;
|-&lt;br /&gt;
| 12 || Noise (Stronger Attack, Fast Decay) &lt;br /&gt;
|-&lt;br /&gt;
| 13 || Noise&lt;br /&gt;
|-&lt;br /&gt;
| 14 || Machine-ish Noise&lt;br /&gt;
|-&lt;br /&gt;
| 15 || String Ensemble (Soft Attack, Fast Decay)&lt;br /&gt;
|-&lt;br /&gt;
| 16 || String Ensemble (Softer Attack, Fast Decay)&lt;br /&gt;
|-&lt;br /&gt;
| 17 || String Ensemble (Even Softer Attack, Slower Decay)&lt;br /&gt;
|-&lt;br /&gt;
| 18 || String Ensemble (Soft Attack)&lt;br /&gt;
|-&lt;br /&gt;
| 19 || String Ensemble&lt;br /&gt;
|-&lt;br /&gt;
| 1A || Aaah VOX Synth&lt;br /&gt;
|-&lt;br /&gt;
| 1B || Swanee (Blown Bottle)&lt;br /&gt;
|-&lt;br /&gt;
| 1C || Pan Flute&lt;br /&gt;
|-&lt;br /&gt;
| 1D || Lead 1&lt;br /&gt;
|-&lt;br /&gt;
| 1E || 50% Square Wave (Slightly Softer)&lt;br /&gt;
|-&lt;br /&gt;
| 1F || 50% Square Wave&lt;br /&gt;
|-&lt;br /&gt;
| 20 || Triangle Wave&lt;br /&gt;
|-&lt;br /&gt;
| 21 || Lead 2 (Used commonly as a bass)&lt;br /&gt;
|-&lt;br /&gt;
| 22 || Rumbling SFX&lt;br /&gt;
|-&lt;br /&gt;
| 23 || Electric Kick&lt;br /&gt;
|-&lt;br /&gt;
| 24 || Electric Hi-Hat&lt;br /&gt;
|-&lt;br /&gt;
| 25 || Timbale&lt;br /&gt;
|-&lt;br /&gt;
| 26 || Electric Snare (Soft Decay, used commonly in low octaves)&lt;br /&gt;
|-&lt;br /&gt;
| 27 || Electric Snare&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Sample Pack Usage ===&lt;br /&gt;
PC:	0x10CA2E&amp;lt;br&amp;gt;&lt;br /&gt;
SNES:	$D0CA2E&amp;lt;br&amp;gt;&lt;br /&gt;
Length:	0x2B bytes.&amp;lt;br&amp;gt;&lt;br /&gt;
Each byte corresponds to which sample pack each song will use, the order of the bytes is the exact same as [[Kirby&#039;s Dream Land 3:Audio#Song_List|Song IDs]]. You must input the ID of which sample pack you want to use.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Sound Effects? ==&lt;br /&gt;
Sound Effects start at $3400 in ARAM and at $CEA1F3 (PC 0x0EA1F3) in ROM, I can&#039;t grasp how they exactly work though, they behave like normal sequence data but I had trouble understanding how their pointers work.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Relevant RAM Adresses ==&lt;br /&gt;
$80:7350	Current song playing.&amp;lt;br&amp;gt;&lt;br /&gt;
$80:7351	Current sample pack being used.&amp;lt;br&amp;gt;&lt;br /&gt;
$80:7340	Current SFX playing.&lt;/div&gt;</summary>
		<author><name>LucianoTheWindowsFan</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=User_talk:LucianoTheWindowsFan&amp;diff=1895</id>
		<title>User talk:LucianoTheWindowsFan</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=User_talk:LucianoTheWindowsFan&amp;diff=1895"/>
		<updated>2021-05-08T19:39:53Z</updated>

		<summary type="html">&lt;p&gt;LucianoTheWindowsFan: Created page with &amp;quot;==Some games== Some games used a(n unusual) FIR filter of &amp;quot;$F8 $08 $11 $1C $1C $11 $08 $F8&amp;quot; to eliminate echo explosion. Was it worth mentioning? --~~~~&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Some games==&lt;br /&gt;
Some games used a(n unusual) FIR filter of &amp;quot;$F8 $08 $11 $1C $1C $11 $08 $F8&amp;quot; to eliminate echo explosion. Was it worth mentioning? --[[User:LucianoTheWindowsFan|LucianoTheWindowsFan]] ([[User talk:LucianoTheWindowsFan|talk]]) 19:39, 8 May 2021 (UTC)&lt;/div&gt;</summary>
		<author><name>LucianoTheWindowsFan</name></author>
	</entry>
	<entry>
		<id>https://sneslab.net/mw/index.php?title=FIR_Filter&amp;diff=1894</id>
		<title>FIR Filter</title>
		<link rel="alternate" type="text/html" href="https://sneslab.net/mw/index.php?title=FIR_Filter&amp;diff=1894"/>
		<updated>2021-05-08T19:35:27Z</updated>

		<summary type="html">&lt;p&gt;LucianoTheWindowsFan: Typo fix as well as an additional (unusual) FIR filter.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:{{#setmainimage:SNES Sound Mixing.png}}|thumb|SNES sound mixing diagram. The FIR Filter plays an important role for the final sound output.]]&lt;br /&gt;
A &#039;&#039;&#039;FIR Filter&#039;&#039;&#039; (&#039;&#039;&#039;F&#039;&#039;&#039;inite &#039;&#039;&#039;i&#039;&#039;&#039;mpulse &#039;&#039;&#039;r&#039;&#039;&#039;esponse filter) is a type of filter used on signal processing. It works by taking the sum of last Nth samples multiplied by a value, called &#039;&#039;&#039;FIR taps&#039;&#039;&#039; or &#039;&#039;&#039;coefficients&#039;&#039;&#039;. It&#039;s finite because if you pass a FIR filter in an impulse response, the impulse will fade out after passing though the N taps. That&#039;s easy to notice since the FIR filter never uses itself as feed unlike the [https://en.wikipedia.org/wiki/Infinite_impulse_response IIR Filter].&lt;br /&gt;
&lt;br /&gt;
On the [[SNES]], the FIR filter has 8 taps which are 1.7 fixed point values. The filter is applied on the echo output so it has &#039;&#039;&#039;direct influence&#039;&#039;&#039; to the sound output and can be used to archive different effects which is more detailed on the following topics.&lt;br /&gt;
&lt;br /&gt;
== Mathematical Definition ==&lt;br /&gt;
The FIR filter can be defined in the following mathematical formula:&lt;br /&gt;
&amp;lt;math&amp;gt;y[n] = \sum_{i=0}^{N-1}b_{i} \cdot x[n-i]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the current output sample Y[n], take the sum of previous N samples from source (including current), multiplied by the FIR coefficient, which is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y[n] = b_{0} \cdot x[n] + b_{1} \cdot x[n-1] + b_{2} \cdot x[n-2] + ... + b_{N-1} \cdot x[n-(N-1)]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The SNES has &#039;&#039;&#039;eight FIR taps&#039;&#039;&#039;, which limits N to 8:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y[n] = \sum_{i=0}^{7}b_{i} \cdot x[n-i]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, &#039;&#039;&#039;the samples are processed from the oldest to the newest sample&#039;&#039;&#039;. That means the first FIR tap is applied to the oldest sample while the last FIR tap is applied to the newest sample:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y[n] = \sum_{i=0}^{7}b_{i} \cdot x[n-(7-i)]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Which in other words, it yields to the equivalent pseudo-code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
y[n] = FIR[0] * x[n - 7] +&lt;br /&gt;
       FIR[1] * x[n - 6] +&lt;br /&gt;
       FIR[2] * x[n - 5] +&lt;br /&gt;
       FIR[3] * x[n - 4] +&lt;br /&gt;
       FIR[4] * x[n - 3] +&lt;br /&gt;
       FIR[5] * x[n - 2] + &lt;br /&gt;
       FIR[6] * x[n - 1] + &lt;br /&gt;
       FIR[7] * x[n - 0];&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where FIR is a array containing the eight taps or coefficients.&lt;br /&gt;
&lt;br /&gt;
== S-DSP Implementation ==&lt;br /&gt;
[[File:Chrono Trigger FIR filter.png|thumb|Example of FIR filter used on Chrono Trigger, which is used as an echo low-pass filter on this case. Screenshot taken from [[SNES SPC700 PLAYER]]]]&lt;br /&gt;
The FIR taps are located on the DSP registers $0F though $7F, where $0F is the first tap (FIR[0]) and $7F is the last tap (FIR[7]).&lt;br /&gt;
&lt;br /&gt;
Because the S-DSP doesn&#039;t have floating point capability, the tap values are actually in the &#039;&#039;&#039;1.7 fixed point, signed format&#039;&#039;&#039;. This means that values between $00-$7F is positive (0 to 127) and $80-$FF is negative (-128 to -1) and after doing the multiplication the value then is divided by 128. So for positive values, $7F means 1.00, $40 means 0.50, $20 means 0.25 and it goes on, while for negative values $80 means -1.00, $C0 means 0.50, $E0 means 0.25 and it goes on.&lt;br /&gt;
&lt;br /&gt;
The coefficients sum is done on a 16-bit integer type, which means that if an overflow occur the value gets &#039;&#039;&#039;clipped&#039;&#039;&#039;. The only exception for this is the &#039;&#039;&#039;last multiplication&#039;&#039;&#039; (last FIR coefficient multiplied by the first sample). For this case, the number gets &#039;&#039;&#039;clamped&#039;&#039;&#039; instead of clipped, e.g.: 18623 + 16888 will yield to 32767 instead of overflowing to -30025.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An accurate implementation of the FIR filter given the above rules would be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
S = (FIR[0] * x[n - 7] &amp;gt;&amp;gt; 6) +&lt;br /&gt;
    (FIR[1] * x[n - 6] &amp;gt;&amp;gt; 6) +&lt;br /&gt;
    (FIR[2] * x[n - 5] &amp;gt;&amp;gt; 6) +&lt;br /&gt;
    (FIR[3] * x[n - 4] &amp;gt;&amp;gt; 6) +&lt;br /&gt;
    (FIR[4] * x[n - 3] &amp;gt;&amp;gt; 6) +&lt;br /&gt;
    (FIR[5] * x[n - 2] &amp;gt;&amp;gt; 6) + &lt;br /&gt;
    (FIR[6] * x[n - 1] &amp;gt;&amp;gt; 6);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;&amp;gt;&amp;gt;&amp;quot; operator is the [[arithmetic right shift]] operation, which on this context is the equivalent by dividing the value by 128 (without decimal places).&lt;br /&gt;
&lt;br /&gt;
With the first 7 taps calculated, we &#039;&#039;&#039;clip&#039;&#039;&#039; it so it&#039;s always within the -32768 to 32767 range:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
S = S &amp;amp; 0xFFFF;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we add the last tap which is multiplied by the current sample, x[n]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
S = S + (FIR[0] * x[n] &amp;gt;&amp;gt; 6);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;clamp&#039;&#039;&#039; it to the -32768 to 32767:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
S = S &amp;gt; 32767 ? 32767 : S;&lt;br /&gt;
S = S &amp;lt; -32768 ? -32768 : S;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It&#039;s important to remember that the [[Echo buffer]] uses &#039;&#039;&#039;15-bit samples&#039;&#039;&#039; instead of 16-bit and it&#039;s &#039;&#039;&#039;left-aligned&#039;&#039;&#039;, so the binary format is: &amp;quot;seee eeee eeee eee0&amp;quot; and not &amp;quot;ssee eeee eeee eeee&amp;quot;. However, when the sample is placed on the FIR ring buffer (x[]), it end ups right shifted so it gets to the &amp;quot;ssee eeee eeee eeee&amp;quot; format.&lt;br /&gt;
&lt;br /&gt;
So we finally take the last bit and we have our FIR value done:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Result = S &amp;amp; 0xFFFE;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each sound channel (left and right) is &#039;&#039;&#039;processed separately&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is a diagram of the FIR filter calculation:&lt;br /&gt;
&lt;br /&gt;
[[File:SNES FIR Filter diagram.png|border]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Because of the integer clipping behavior on the first seven taps, it&#039;s important to your FIR filter maximum gain &#039;&#039;&#039;never exceed&#039;&#039;&#039; 0 dB (or the absolute sum of all FIR taps never exceed 128) for avoiding audio clicks, specially with the first seven taps. &#039;&#039;&#039;Not all games obey that&#039;&#039;&#039;, so the most important is checking out the frequency response of the filter and verifying how the gain behaves for the frequency range.&lt;br /&gt;
&lt;br /&gt;
Once done, the FIR is multiplied by the L/R echo volume and it&#039;s output together the main volume. It&#039;s also multiplied by the echo feedback value and fed back to the echo buffer together the sound output, as you can see on the above diagram.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Timing Information ===&lt;br /&gt;
&lt;br /&gt;
The S-DSP generates &#039;&#039;&#039;one stereo sample&#039;&#039;&#039; every 32 SPC700 clocks. During these 32 clocks, some operations are done by the S-DSP regarding echo and FIR filter. These are the following:&lt;br /&gt;
&lt;br /&gt;
Each time a new sample is generated on the S-DSP, one sample is taken from the echo buffer and inserted on the FIR ring buffer (x[]), which then the ring buffer is used to generate the FIR sample output:&lt;br /&gt;
&lt;br /&gt;
* The left echo channel is inserted on the ring buffer at cycle 22 and written on cycle 29.&lt;br /&gt;
* The right echo channel is inserted on the ring buffer at cycle 23 and written on cycle 30.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The FIR taps are not read immediately, but gradually read while the left and right echo channel are being processed:&lt;br /&gt;
&lt;br /&gt;
* FIR[0] is accessed during cycle 22.&lt;br /&gt;
* FIR[1] and FIR[2] are accessed during cycle 23.&lt;br /&gt;
* FIR[3], FIR[4] and FIR[5] are accessed during cycle 24.&lt;br /&gt;
* FIR[6] and FIR[7] are accessed during cycle 25.&lt;br /&gt;
&lt;br /&gt;
== Frequency response ==&lt;br /&gt;
[[File:VilelaBot Chrono Trigger FIR frequency response.png|thumb|The FIR Filter frequency response of one of the Chrono Trigger songs. Image generated via !vb fir command of [[VilelaBot]]. FIR used: $0C $21 $2B $2B $13 $FE $F3 $F9. It&#039;s a low-pass filter with a cut-off frequency of around ~4.5 kHz.]]&lt;br /&gt;
&lt;br /&gt;
It&#039;s possible to view the &#039;&#039;&#039;frequency response&#039;&#039;&#039; of a FIR filter and therefore visualize which frequencies are amplified or attenuated. The calculations involves [https://en.wikipedia.org/wiki/Discrete-time_Fourier_transform Discrete-time Fourier transform] (DFFT) and are considerably complex. The formula looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
H(\jmath \omega ) = \sum_{n=0}^{N-1}h(n)[cos(n \omega)-\jmath sin(n \omega)]&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
* &amp;lt;math&amp;gt;H(\jmath \omega )&amp;lt;/math&amp;gt; is the output power for given frequency &amp;lt;math&amp;gt;H( \omega )&amp;lt;/math&amp;gt;. It is a complex number, therefore you will end up having two components, which is the &#039;&#039;&#039;magnitude&#039;&#039;&#039; &amp;lt;math&amp;gt;|H(\jmath \omega )|&amp;lt;/math&amp;gt; and &#039;&#039;&#039;phase&#039;&#039;&#039; &amp;lt;math&amp;gt;\measuredangle H(\jmath \omega )&amp;lt;/math&amp;gt;.&lt;br /&gt;
** Magnitude is the &#039;&#039;&#039;output volume&#039;&#039;&#039; e.g. 1.0 is 100% volume.&lt;br /&gt;
** Phase means how &#039;&#039;&#039;late or early&#039;&#039;&#039; is the signal relative to the original, in &#039;&#039;&#039;radians&#039;&#039;&#039; (&amp;lt;math&amp;gt;\pi = +180^{\circ}&amp;lt;/math&amp;gt;). Humans normally don&#039;t perceive phase changes, but combining two close and oppose phased-signals can generate some odd effects like an oscillating signal used on Square SPC engines.&lt;br /&gt;
* &amp;lt;math&amp;gt;h(n)&amp;lt;/math&amp;gt; is the FIR filter taps.&lt;br /&gt;
* &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the amount of taps.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Disregarding SNES clipping and clamping effects, the frequency response of its 8-tap FIR would be calculated as the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;H(\jmath \omega ) = \sum_{n=0}^{7}\textrm{FIR}(7-n)[cos(n \omega)-\jmath sin(n \omega)]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expanding the sum yields:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;H(\jmath \omega ) = \textrm{FIR}(7)+&lt;br /&gt;
\textrm{FIR}(6)[cos(\omega)-\jmath sin(\omega)] +&lt;br /&gt;
\textrm{FIR}(5)[cos(2 \omega)-\jmath sin(2 \omega)] +&lt;br /&gt;
\textrm{FIR}(4)[cos(3 \omega)-\jmath sin(3 \omega)] +&lt;br /&gt;
\textrm{FIR}(3)[cos(4 \omega)-\jmath sin(4 \omega)] +&lt;br /&gt;
\textrm{FIR}(2)[cos(5 \omega)-\jmath sin(5 \omega)] +&lt;br /&gt;
\textrm{FIR}(1)[cos(6 \omega)-\jmath sin(6 \omega)] +&lt;br /&gt;
\textrm{FIR}(0)[cos(7 \omega)-\jmath sin(7 \omega)]&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When doing a visualization, it&#039;s often common to see &#039;&#039;&#039;ripples&#039;&#039;&#039; or signal &#039;&#039;&#039;ringing&#039;&#039;&#039; on certain regions. Even with careful values choice, it&#039;s not possible to attenuate them because of the low amount of taps the SNES FIR filter has, but regardless of the amount of taps they are often common on modern DSP applications and other kind of filters.&lt;br /&gt;
&lt;br /&gt;
[[VilelaBot]] has a command for viewing FIR filters frequency response and gain, see the &#039;&#039;&#039;!vb help fir&#039;&#039;&#039; command for more information.&lt;br /&gt;
&lt;br /&gt;
== Uses ==&lt;br /&gt;
&lt;br /&gt;
The most useful thing that you can do with FIR filters is &#039;&#039;&#039;amplifying or attenuating a frequency range&#039;&#039;&#039;. Effectively, you can create your own [https://en.wikipedia.org/wiki/Equalization_(audio) sound equalizer] depending on your echo settings and main volume combinations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The most common usage involve:&lt;br /&gt;
* Using FIR as a low or high pass filters, normally using 4.5 kHz as the cut-off point:&lt;br /&gt;
** Low-pass to filter out high frequencies from the echo sound output. &lt;br /&gt;
** High-pass to filter out low frequencies from the echo sound output.&lt;br /&gt;
* Band-pass or band-stop filters to allow or disallow a frequency range:&lt;br /&gt;
** Band-pass allows frequency between A and B.&lt;br /&gt;
** Band-stop disallows frequency between A and B.&lt;br /&gt;
* Attenuate very specific frequencies that to balance the sound echo feedback and avoid overflows.&lt;br /&gt;
* Identity filter ($7F on the first tap and $00 on others): output original produced song from the echo buffer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Getting started ===&lt;br /&gt;
&lt;br /&gt;
For who wants to start experiment with FIR filters, the best recommendation is start experimenting with filters &#039;&#039;&#039;already made&#039;&#039;&#039; and &#039;&#039;&#039;available under the examples section&#039;&#039;&#039;. Normally the most effects you want to archive is making your &#039;&#039;&#039;echo sound more filled&#039;&#039;&#039; and the filters that will (likely) do that, depending on your echo, are either the &#039;&#039;&#039;low-pass&#039;&#039;&#039; or &#039;&#039;&#039;high-pass&#039;&#039;&#039; filters. They will either let the lower frequencies (&#039;&#039;&#039;bass&#039;&#039;&#039;) pass or the higher frequencies (&#039;&#039;&#039;treble&#039;&#039;&#039;), balancing the amount of frequencies your song has.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Choose a filter that has a gain between &#039;&#039;&#039;0.00 dB&#039;&#039;&#039; and &#039;&#039;&#039;-3.00 dB&#039;&#039;&#039;, which are safe filters that &#039;&#039;&#039;will not cause&#039;&#039;&#039; audio clipping/overflowing. Filters with positive gain are not recommended specially since during the internal FIR calculations some samples may end up &#039;&#039;&#039;overflowing and generating audio clicks&#039;&#039;&#039;. Another common problem is the combination of excessive [[Echo feedback]] that combined with FIR filter can make the echo buffer &#039;&#039;&#039;gradually get louder&#039;&#039;&#039; and eventually &amp;quot;exploding&amp;quot; your song.&lt;br /&gt;
&lt;br /&gt;
Filters with low gain (-7.00 dB and below) will make your overall echo &#039;&#039;&#039;weakier&#039;&#039;&#039; and less &#039;&#039;&#039;notable&#039;&#039;&#039;, which will require you compensating it by &#039;&#039;&#039;increasing&#039;&#039;&#039; echo feedback and echo volume, but at the same time the song quality can &#039;&#039;&#039;slight reduce&#039;&#039;&#039; because a few bits will be lost during the calculation and &#039;&#039;&#039;won&#039;t be&#039;&#039;&#039; recovered since all calculations are fixed-point.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Nintendo SPC driver (N-SPC) includes &#039;&#039;&#039;four&#039;&#039;&#039; standard FIR filters which can be used on your songs. These are:&lt;br /&gt;
&lt;br /&gt;
[[File:Nintendo SPC Band Pass FIR Filter Frequency Response.png|thumb|Analysis of N-SPC&#039;s built-in band-pass filter. It&#039;s notable that frequencies after 10 kHz has some ripples that still makes them slight audible.]]&lt;br /&gt;
&amp;lt;big&amp;gt;1. $7F $00 $00 $00 $00 $00 $00 $00&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The identity filter. Used if you want to keep your echo sound &#039;&#039;&#039;the same as original&#039;&#039;&#039;, disregarding the echo feedback of course.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;2. $58 $BF $DB $F0 $FE $07 $0C $0C&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
High-pass filter with cut-off frequency at 3 kHz. In other words, frequencies &#039;&#039;&#039;higher than&#039;&#039;&#039; 3 kHz are &#039;&#039;&#039;kept&#039;&#039;&#039; while frequencies &#039;&#039;&#039;lower than&#039;&#039;&#039; 3 kHz are &#039;&#039;&#039;attenuated&#039;&#039;&#039;. The FIR gain is &#039;&#039;&#039;+0.91 dB&#039;&#039;&#039;, which means the FIR will &#039;&#039;&#039;increase&#039;&#039;&#039; the echo volume and although it&#039;s a small amount you should be careful when playing loud channels.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;3. $0C $21 $2B $2B $13 $FE $F3 $F9&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Low-pass filter with cut-off frequency at 5 kHz. Frequencies &#039;&#039;&#039;higher than&#039;&#039;&#039; 5 kHz will be attenuated. The FIR gain is +0.65 dB.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;4. $34 $33 $00 $D9 $E5 $01 $FC $EB&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Band-pass filter that theoretically cuts frequencies &#039;&#039;&#039;lower than 1.5 kHz and higher than 8.5 kHz&#039;&#039;&#039;, however it has some &#039;&#039;&#039;ripples&#039;&#039;&#039; that makes frequencies between 11 kHz ~ 13 kHz and 15 kHz ~ 16 kHz audible, as you can see on the figure. That&#039;s considered normal given the limitations of a FIR filter with 8 taps.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Low-pass filters ===&lt;br /&gt;
&lt;br /&gt;
Low-pass filters attenuates high frequencies (high pitched sound).&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Game !! FIR Filter !! Cut-off Freq. !! Max. Gain !! High Freq. Gain&lt;br /&gt;
|-&lt;br /&gt;
| Bio Metal || $00 $23 $1E $14 $0A $00 $00 $00 || 5 kHz || -2.59 dB || -15 dB&lt;br /&gt;
|-&lt;br /&gt;
| Clue || $10 $10 $10 $10 $10 $10 $10 $60 || 2 kHz || +4.22 dB || -3 dB&lt;br /&gt;
|-&lt;br /&gt;
| Dragon Guest || $FF $07 $16 $23 $23 $16 $07 $FE || 4 kHz || -0.21 dB || -35 dB&lt;br /&gt;
|-&lt;br /&gt;
| Dragon Quest III || $10 $22 $24 $20 $28 $F8 $F8 $F8 || 3 kHz || +0.60 dB || -13 dB&lt;br /&gt;
|-&lt;br /&gt;
| Dragon Quest VI || $06 $08 $08 $08 $10 $20 $20 $20 || 2.5 kHz || +0.90 dB || -14 dB&lt;br /&gt;
|-&lt;br /&gt;
| Dragon Quest VI || $0B $21 $20 $20 $10 $FC $FB $FF || 5 kHz || -1.01 dB || -20 dB&lt;br /&gt;
|-&lt;br /&gt;
| Dragon Quest VI || $0B $21 $28 $28 $18 $F2 $F0 $F0 || 6 kHz || +1.06 dB || -17 dB&lt;br /&gt;
|-&lt;br /&gt;
| Earthworm Jim 2 || $00 $00 $14 $26 $26 $10 $08 $08 || 3 kHz || +0.00 dB || -25 dB&lt;br /&gt;
|-&lt;br /&gt;
| Kyuuyaku Megami Tensei || $0B $21 $28 $28 $18 $FC $FB $F7 || 6 kHz || +0.42 dB || -20 dB&lt;br /&gt;
|-&lt;br /&gt;
| Magicboy || $FF $05 $13 $20 $20 $13 $05 $FF || 4 kHz || -1.32 dB || -40 dB&lt;br /&gt;
|-&lt;br /&gt;
| Many games || $0C $21 $2B $2B $13 $FE $F3 $F9 || 5 kHz || +0.65 dB || -25 dB&lt;br /&gt;
|-&lt;br /&gt;
| Many games || $FF $08 $17 $24 $24 $17 $08 $FF || 5 kHz || +0.27 dB || -30 dB&lt;br /&gt;
|-&lt;br /&gt;
| Momotarou Dentetsu Happy || $10 $20 $30 $40 $50 $60 $70 $80 || 3 kHz || +8.10 dB || +4 dB&lt;br /&gt;
|-&lt;br /&gt;
| Solid Runner || $0B $21 $22 $23 $12 $FC $FB $F7 || 4 kHz || -0.58 dB || -22 dB&lt;br /&gt;
|-&lt;br /&gt;
| Solid Runner || $0B $21 $22 $25 $15 $F9 $F5 $F4 || 5 kHz || -0.06 dB || -20 dB&lt;br /&gt;
|-&lt;br /&gt;
| Strike Gunner || $20 $40 $20 $10 $00 $00 $00 $00 || 5 kHz || +1.02 dB || -20 dB&lt;br /&gt;
|-&lt;br /&gt;
| Super Bomberman 5, Bakukyuu Renpatsu!! Super B-Daman || $04 $F9 $F8 $27 $27 $F8 $F9 $04 || 12 kHz || -3.79 dB || -20 dB&lt;br /&gt;
|-&lt;br /&gt;
| Treasure Hunter G || $0B $21 $22 $22 $12 $FE $F5 $F8 || 5 kHz || -0.55 dB || -20 dB&lt;br /&gt;
|-&lt;br /&gt;
| UFO Kamen Yakisoban || $FF $08 $17 $24 $24 $00 $00 $00 || 5 kHz || -1.97 dB || -17 dB&lt;br /&gt;
|-&lt;br /&gt;
| Wonder Woman || $48 $20 $12 $0C $00 $00 $00 $00 || 3 kHz || +0.40 dB || -6 dB&lt;br /&gt;
|-&lt;br /&gt;
| Zenki Tenchimeidou || $FE $FD $16 $34 $34 $16 $FD $FC || 6 kHz || +0.53 dB || -32 dB&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== High-pass filters ===&lt;br /&gt;
High-pass filters attenuates low frequencies (bass-lines).&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Game !! FIR Filter !! Cut-off Freq. !! Max. Gain !! Low Freq. Gain !! Notes&lt;br /&gt;
|-&lt;br /&gt;
| B.O.B || $18 $E8 $0C $F4 $0C $F4 $0C $F4 || 10 kHz || -0.56 dB || -20 dB || Looks like a rising wave. At 1 kHz sound is audible already.&lt;br /&gt;
|-&lt;br /&gt;
| Battle Cross || $3F $A9 $14 $54 $EC $14 $FC $AB || 1.5 kHz || +7.62 dB || -20 dB || Some ripples at 8 kHz and 14 kHz&lt;br /&gt;
|-&lt;br /&gt;
| Donkey Kong Country 2 || $58 $BF $DB $E0 $FE $01 $2C $2C || 3 kHz || +4.21 dB || -10 dB || Some oscillations starting at 4.5 kHz.&lt;br /&gt;
|-&lt;br /&gt;
| G.O.D. || $01 $02 $04 $08 $10 $20 $40 $80 || 2 kHz || +2.52 dB || -30 dB || Very effective high-pass filter.&lt;br /&gt;
|-&lt;br /&gt;
| Many games || $58 $BF $DB $F0 $FE $07 $0C $0C || 3 kHz || +0.91 dB || -40 dB || Most used hi-pass filter.&lt;br /&gt;
|-&lt;br /&gt;
| Terranigma || $5F $F3 $F4 $F5 $F6 $F7 $F8 $F9 || 1.5 kHz || -1.10 dB || -14 dB || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Band-pass filters ===&lt;br /&gt;
Band-pass filters attenuates signal outside an allowed frequency range. It has a parabolic-like curve.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Game !! FIR Filter !! Left Freq. !! Right Freq. !! Max. Gain !! Notes&lt;br /&gt;
|-&lt;br /&gt;
| Many games || $34 $33 $00 $D9 $E5 $01 $FC $EB || 1.5 kHz || 8.5 kHz || +0.53 dB || Ripples at 11 kHz ~ 13 kHz, 15 kHz ~ 16 kHz.&lt;br /&gt;
|-&lt;br /&gt;
| Popful Mail || $00 $FF $EE $B8 $06 $20 $01 $FF || 3 kHz || 10 kHz || -1.27 dB || For frequency &amp;gt;10 kHz, -10 dB, &amp;lt;3 kHz, -5 dB&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Band-stop filters ===&lt;br /&gt;
&lt;br /&gt;
Band-stop filters attenuates frequencies between a frequency region. It has a &amp;quot;U&amp;quot; like aspect.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Game !! FIR Filter !! Left Freq. !! Right Freq. !! Max. Gain !! Notes&lt;br /&gt;
|-&lt;br /&gt;
| Chaos Seed || $FF $40 $20 $20 $00 $00 $00 $00 || 5 kHz || 14 kHz || -0.07 dB || It has an &amp;quot;U&amp;quot;-like with 10 kHz at center.&lt;br /&gt;
|-&lt;br /&gt;
| Do-Re-Mi Fantasy - Milon no Dokidoki Daibouken || $00 $00 $00 $00 $48 $00 $30 $00 || 4 kHz || 12 kHz || -0.56 dB || It has a &amp;quot;V&amp;quot;-like curve with 8 kHz at center.&lt;br /&gt;
|-&lt;br /&gt;
| Many games || $0C $21 $2B $2B $F3 $FE $F3 $F9 || 6 kHz || 12 kHz || -0.14 dB || It looks like a lying &amp;quot;Z&amp;quot;. &amp;lt;6 kHz with -2dB and &amp;gt;12 kHz with -11dB. At 9 kHz, -14 dB.&lt;br /&gt;
|-&lt;br /&gt;
| Popful Mail || $08 $FF $E0 $B8 $04 $80 $09 $FF || 4 kHz || 10 kHz || +4.42 dB || It has an &amp;quot;U&amp;quot;-like curve with 6.7 kHz at center.&lt;br /&gt;
|-&lt;br /&gt;
| Super Bomberman 3 || $00 $00 $00 $28 $00 $28 $00 $FE || 5 kHz || 11 kHz || -4.30 dB || It has an even &amp;quot;V&amp;quot;-like curve with 8 kHz at center.&lt;br /&gt;
|-&lt;br /&gt;
| Super Bomberman 3 || $00 $00 $00 $40 $00 $28 $00 $FE || 5 kHz || 11 kHz || -1.97 dB || It has an even &amp;quot;V&amp;quot;-like curve with 8 kHz at center.&lt;br /&gt;
|-&lt;br /&gt;
| Tengai Makyou Zero || $00 $00 $00 $00 $30 $00 $48 $00 || 4 kHz || 12 kHz || -0.56 dB || It has a &amp;quot;V&amp;quot;-like curve with 8 kHz at center.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Unusual filters ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Game !! FIR Filter !! Maximum Gain !! What it Does&lt;br /&gt;
|-&lt;br /&gt;
| Alien vs. Predator || $0C $2B $2B $2B $28 $FF $F8 $F9 || +2.21 dB || Band-stop between 6 kHz and 8.5 kHz (-15 dB). Smooth Low-pass cut-off at 13 kHz (-18 dB).&lt;br /&gt;
|-&lt;br /&gt;
| Angelique Voice Fantasy || $0D $F5 $FA $12 $12 $FA $F5 $0D || -5.40 dB || Eliminates 12 kHz and 16 kHz.&lt;br /&gt;
|-&lt;br /&gt;
| B.O.B || $18 $0C $F4 $0C $F4 $0C $F4 $00 || -6.90 dB || Attenuates 0 kHz (-14 dB), 5 kHz (-14 dB) and 10 kHz (-16 dB).&lt;br /&gt;
|-&lt;br /&gt;
| Doney Kong Country 2 || $50 $BF $DB $E0 $E0 $0A $C8 $C8 || +3.59 dB || It looks like a &amp;quot;W&amp;quot; at 4.3 kHz (-10 dB) and 9.7 kHz (-15 dB).&lt;br /&gt;
|-&lt;br /&gt;
| Donkey Kong Country || $00 $01 $00 $00 $00 $00 $00 $00 || -42.14 dB || Makes echo almost inaudible.&lt;br /&gt;
|-&lt;br /&gt;
| Doom || $FA $0A $1A $13 $13 $1A $0A $FA || -2.32 dB || Eliminates 6.4 kHz, 12.8 kHz and 16 kHz.&lt;br /&gt;
|-&lt;br /&gt;
| Dragon Guest VI || $0D $10 $10 $24 $3D $F4 $F4 $F4 || -0.76 dB || It looks like a twisted &amp;quot;W&amp;quot; at ~6 kHz (-5 dB) and ~12.5 kHz (-10 dB).&lt;br /&gt;
|-&lt;br /&gt;
| Dragon Guest VI || $10 $08 $14 $14 $14 $FE $FE $FE || -4.30 dB || It looks like a &amp;quot;W&amp;quot; at ~6 kHz (-16 dB) and ~12 kHz (-30 dB).&lt;br /&gt;
|-&lt;br /&gt;
| Dragon Guest VI || $30 $0C $44 $0C $54 $0C $B4 $0C || +3.24 dB || Looks like a &amp;quot;W&amp;quot; at 5.8 kHz (-2.8 dB), 10.4 kHz (-1.5 dB), low pass at 15 kHz (0 dB).&lt;br /&gt;
|-&lt;br /&gt;
| Front Mission, BS Koi ha Balance, BS Dynani Tracer || $XX $00 $00 $00 $00 $00 $00 $00 || -0.14 dB || $XX fades in from $00 to $7E at beginning, essentially controlling the echo volume and feedback.&lt;br /&gt;
|-&lt;br /&gt;
| Jim Power || $FF $FC $FD $FE $FF $FE $FD $FC || -16.12 dB || Many ripples at 4 kHz (-50 dB), 9 kHz (-45 dB), 13.5 kHz (-42 dB), gradually attenuating higher frequencies.&lt;br /&gt;
|-&lt;br /&gt;
| Kamaitachi no Yoru || $FF $0A $1E $32 $32 $1E $0A $FF || +2.86 dB || Eliminates 9.5 kHz, 11.5 kHz and 16 kHz.&lt;br /&gt;
|-&lt;br /&gt;
| Kamen Rider SD || $20 $06 $10 $16 $16 $06 $08 $20 || +1.02 dB || Attenuates 3.5 kHz (-25 dB), 6.5 kHz (-22 dB), 11.6 kHz (-40 dB) and 16 kHz (-18 dB).&lt;br /&gt;
|-&lt;br /&gt;
| Many games || $10 $30 $22 $24 $11 $F0 $20 $FF || +2.26 dB || Band-stop at 9 kHz (-15 dB) and very light low-pass filter at 14 kHz (-10 dB).&lt;br /&gt;
|-&lt;br /&gt;
| Many games || $3F $D8 $00 $D9 $E5 $01 $6F $EB || +5.68 dB || It would have been a high-pass filter at 3 kHz if it wasn&#039;t for the sudden gain drop at 13 kHz (-20 dB).&lt;br /&gt;
|-&lt;br /&gt;
| Mario is Missing! || $0A $0A $0A $0A $0A $0A $0A $0A || -4.08 dB || Eliminates 4, 8, 12 and 16 kHz in a way that echo doesn&#039;t explode on the song.&lt;br /&gt;
|-&lt;br /&gt;
| Momotarou Dentetsu Happy || $10 $20 $60 $30 $55 $17 $80 $01 || +7.06 dB || Band-stop at 7.5 kHz (+1 dB) and low-pass filter with cut-off at 14 kHz (-5 dB).&lt;br /&gt;
|-&lt;br /&gt;
| Momotarou Dentetsu Happy || $60 $20 $60 $30 $55 $17 $80 $01 || +8.28 dB || It looks like a &amp;quot;W&amp;quot;, but weak. 5.5 kHz (0 dB), 10.5 kHz (-2 dB). Drops at 16 kHz (-10 dB).&lt;br /&gt;
|-&lt;br /&gt;
| Monster Maker 3 || $21 $00 $23 $00 $25 $00 $27 $00 || +1.02 dB || Band-stop at 4 kHz (-27 dB), 8 kHz (-30 dB), 12 kHz (-27 dB), symmetrical filter.&lt;br /&gt;
|-&lt;br /&gt;
| Popful Mail || $06 $B0 $07 $FF $EB $B8 $0E $00 || +1.93 dB || It looks like a twisted &amp;quot;W&amp;quot; at ~4.5 kHz (-22 dB) and ~12.5 kHz (-16 dB).&lt;br /&gt;
|-&lt;br /&gt;
| Prince of Persia II || $0F $08 $86 $08 $0B $09 $90 $09 || +6.17 dB || It looks like a &amp;quot;W&amp;quot; at ~4 kHz and ~12 kHz.&lt;br /&gt;
|-&lt;br /&gt;
| Seiken Densetsu 3/Trials of Mana || $20 $0C $10 $0C $20 $0C $0C $0C || +0.78 dB || Looks like a &amp;quot;W&amp;quot; at 4 kHz (-30 dB) and 11.7 kHz (-50 dB).&lt;br /&gt;
|-&lt;br /&gt;
| Sengoku Denshou || $65 $09 $F4 $09 $8C $0A $2C $0B || +5.60 dB || It looks like a &amp;quot;M&amp;quot; at 1 kHz (-6 dB), 8 kHz (-8 dB) and 16 kHz (-15 dB).&lt;br /&gt;
|-&lt;br /&gt;
| Star Ocean, Tales of Phantasia || $0D $22 $22 $24 $11 $F0 $03 $FF || -0.56 dB || Band-stop between 5 kHz and 10 kHz (-16 dB). Smooth Low-pass cut-off at 13 kHz (-17 dB). Echo slowly overflows without the FIR.&lt;br /&gt;
|-&lt;br /&gt;
| Super Genjin 2 || $00 $00 $00 $36 $00 $28 $00 $41 || +1.88 dB || It looks like a &amp;quot;W&amp;quot; at ~5 kHz and ~11 kHz.&lt;br /&gt;
|-&lt;br /&gt;
| Super Mad Champ || $34 $33 $00 $D9 $E5 $01 $FC $00 || +1.11 dB || Band-pass between 2 kHz and 9 kHz &amp;amp; 12 kHz and 15 kHz (weakier, -13 dB).&lt;br /&gt;
|-&lt;br /&gt;
| Super Tekkyuu Fight! || $0E $49 $4B $46 $5F $08 $DE $08 || +7.66 dB || It looks like a twisted &amp;quot;W&amp;quot; at ~7 kHz (-5 dB) and ~15 kHz (-30dB).&lt;br /&gt;
|-&lt;br /&gt;
| Tactics Ogre || $44 $0C $46 $0C $75 $0C $C4 $0C || +5.57 dB || It looks like a &amp;quot;W at 5.3 kHz (-4.0 dB) and 10.7 kHz (-1.8 dB).&lt;br /&gt;
|-&lt;br /&gt;
| The Flintstones || $XX $33 $00 $D9 $E5 $01 $FC $EB || +4.34 dB || $XX ranges from $00 to $7F, essentially a light high-pass filter with volume fade.&lt;br /&gt;
|-&lt;br /&gt;
| The Mask || $FA $02 $18 $28 $2A $F4 $0A $1E || +0.14 dB || Slight attenuates at 4 kHz (-7 dB), then starting at 9 kHz it gradually starts attenuating (-15 dB).&lt;br /&gt;
|-&lt;br /&gt;
| The Mask || $30 $1A $04 $F4 $F8 $04 $0A $0C || -1.96 dB || Band-stop at 2 kHz (-8 dB), 8.5 kHz (-10 dB), 11.5 kHz (-15 dB), 16 kHz (-15 dB).&lt;br /&gt;
|-&lt;br /&gt;
| The Simpsons - Bart&#039;s Nightmare || $00 $08 $10 $10 $10 $10 $08 $00 || -4.08 dB || Eliminates 6.8 kHz and 13.6 kHz in a way that echo doesn&#039;t explode on the song.&lt;br /&gt;
|-&lt;br /&gt;
| The Simpsons - Bart&#039;s Nightmare || $18 $18 $18 $18 $18 $18 $18 $18 || +3.52 dB || Eliminates 4, 8, 12 and 16 kHz.&lt;br /&gt;
|-&lt;br /&gt;
| WWF Super Wrestlemania || $13 $13 $13 $13 $13 $13 $13 $13 || +1.49 dB || Eliminates 4, 8, 12 and 16 kHz.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* [https://www.romhacking.net/documents/191/ Romhacking.net - Documents - Anomie&#039;s S-DSP Doc]&lt;br /&gt;
* [https://problemkaputt.de/fullsnes.htm Fullsnes - Nocash SNES Specs]&lt;br /&gt;
* [https://www.vyssotski.ch/BasicsOfInstrumentation/SpikeSorting/Design_of_FIR_Filters.pdf Design of FIR Filters - Dr. Elena Punskaya]&lt;br /&gt;
* [https://www.elprocus.com/fir-filter-for-digital-signal-processing/ What is FIR Filter? - FIR Filters for Digital Signal Processing]&lt;br /&gt;
* [http://www.eas.uccs.edu/~mwickert/ece2610/lecture_notes/ece2610_chap5.pdf ECE 2610 Signal and Systems - FIR Filters]&lt;br /&gt;
* [https://www.dsprelated.com/freebooks/sasp/FIR_Digital_Filter_Design.html FIR Digital Filter Design | Spectral Audio Signal Processing]&lt;br /&gt;
* [https://dspguru.com/dsp/faqs/fir/ FIR filter FAQ - dspGuru]&lt;br /&gt;
* [http://www.sengpielaudio.com/calculator-levelchange.htm The relationship between decibels, volume and power - sengpielaudio]&lt;/div&gt;</summary>
		<author><name>LucianoTheWindowsFan</name></author>
	</entry>
</feed>