Debian Codegraph @

android/app/jni/doc/7-systems/snes.md

raw
1 # Super Nintendo Entertainment System (SNES) / Super Famicom
2
3 the successor to NES to compete with Genesis, packing superior graphics and sample-based audio.
4
5 its Sony-developed audio system features a DSP chip, SPC700 CPU, and 64KB of dedicated SRAM used by both.
6 this whole system itself is pretty much a separate computer that the main CPU needs to upload its program and samples to.
7
8 Furnace communicates with the DSP directly and provides a full 64KB of memory. this memory might be reduced excessively on ROM export to make up for playback engine and pattern data. you can go to window > statistics to see how much memory your samples are using.
9
10 some notable features of the DSP are:
11 - pitch modulation.
12 - a built in noise generator, useful for hi-hats, cymbals, rides, effects, among other things.
13 - per-channel echo, which unfortunately eats up a lot of memory but can be used to save channels in songs.
14 - an 8-tap FIR filter for the echo, which is basically a procedural low-pass filter that you can edit however you want.
15 - sample loop, but the loop points have to be multiples of 16.
16 - left/right channel invert for surround sound.
17 - ADSR and gain envelope modes.
18 - 7-bit volume per channel.
19 - sample interpolation, which is basically a low-pass filter that gets affected by the pitch of the channel.
20
21 Furnace also allows the SNES to use wavetables (and the wavetable synthesizer) in order to create more 'animated' sounds, using less memory than regular samples.
22
23 ## effects
24
25 - `10xx`: **set waveform.**
26 - `11xx`: **toggle noise mode.**
27 - `12xx`: **toggle echo on this channel.**
28 - `13xx`: **toggle pitch modulation.** frequency modulation by the previous channel's output. no effect on channel 1.
29 - `14xy`: **toggle inverting the left or right channels.** `x` is left, `y` is right.
30 - `15xx`: **set envelope mode.** see gain chart below for `1` through `5`.
31 - `0`: ADSR mode.
32 - `1`: gain (direct). volume holds at one level.
33 - `2`: linear decrement. volume lowers by subtractions of 1/64.
34 - `3`: exponential decrement. volume lowers by multiplications of 255/256.
35 - `4`: linear increment. volume rises by additions of 1/64.
36 - `5`: bent line (inverse log) increment. volume rises by additions of 1/64 until 3/4, then additions of 1/256.
37 - `16xx`: **set gain.** `00` to `7F` if direct, `00` to `1F` otherwise.
38 - `18xx`: **enable echo buffer.**
39 - `19xx`: **set echo delay.** range is `0` to `F`.
40 - `1Axx`: **set left echo channel volume.**
41 - `1Bxx`: **set right echo channel volume.**
42 - `1Cxx`: **set echo feedback.**
43 - all of these are signed numbers.
44 - `00` to `7F` for 0 to 127.
45 - `80` to `FF` for -128 to -1.
46 - setting these to -128 is not recommended as it may cause echo output to overflow and therefore click.
47 - `1Dxx`: **set noise generator frequency.** range is `00` to `1F`. see noise frequencies chart below.
48 - `1Exx`: **set left dry / global volume.**
49 - `1Fxx`: **set right dry / global volume.**
50 - these do not affect echo.
51 - `20xx`: **set attack.** range is `0` to `F`.
52 - `21xx`: **set decay.** range is `0` to `7`.
53 - `22xx`: **set sustain.** range is `0` to `7`.
54 - `23xx`: **set release.** range is `00` to `1F`.
55 - these four are only used in ADSR envelope mode. see ADSR chart below.
56 - `3xyy`: **set echo filter coefficient.**
57 - `x` is the coefficient from 0 to 7.
58 - `yy` is the value (signed number).
59 - `00` to `7F` for 0 to 127.
60 - `80` to `FF` for -128 to -1.
61 - note: be sure the sum of all coefficients is between -128 and 127. sums outside that may result in overflow and therefore clicking.
62 - see SnesLab for [echo filter explanations and examples](https://sneslab.net/wiki/FIR_Filter#Uses).
63
64 ## info
65
66 this chip uses the [SNES](../4-instrument/snes.md) instrument editor.
67
68 when two channels are joined for pitch modulation, the channel bar will show `mod` on a bracket tying them together.
69
70 when using sample offset commands, be sure to open each involved sample in the sample editor, look to the "Info" section at the top-left, and check the "no BRR filters" box. this prevents sound glitches, at the cost of lowering the sample quality to 4-bit.
71
72 ## channel status
73
74 the following icons are displayed when channel status is enabled in the pattern view:
75
76 - envelope/gain status:
77 - ![direct gain, envelope off](status-SNES-gain-direct.png) direct gain
78 - ![linear gain decrease](status-SNES-gain-dec-lin.png) linear gain decrease
79 - ![logarithmic gain decrease](status-SNES-gain-dec-log.png) logarithmic gain decrease
80 - ![linear gain increase](status-SNES-gain-inc-lin.png) linear gain increase
81 - ![bent-line gain increase](status-SNES-gain-inc-bent.png) bent-line gain increase
82 - ![envelope attack](status-SNES-env-A.png) envelope attack
83 - ![envelope decay](status-SNES-env-D.png) envelope decay
84 - ![envelope sustain](status-SNES-env-S.png) envelope sustain
85 - ![envelope release](status-SNES-env-R.png) envelope release
86
87 ## chip config
88
89 the following options are available in the Chip Manager window:
90
91 - **Volume scale**: scale volumes to prevent clipping/distortion.
92 - **Enable echo**: enables the echo buffer.
93 - **Initial echo state**: selects which channels will have echo applied.
94 - **Delay**: sets echo length.
95 - **Feedback**: sets how much of the echo output will be fed back into the buffer.
96 - **Echo volume**: sets echo volume.
97 - **Echo filter**: adjusts echo filter.
98 - **Dec/Hex**: toggles decimal or hexadecimal mode for the filter settings text entry box to the right.
99 - SnesLab provides [echo filter explanations and examples](https://sneslab.net/wiki/FIR_Filter#Uses). their example filter strings can be pasted directly into the filter settings text entry box if set to Hex mode.
100 - **Disable Gaussian interpolation**: removes sample interpolation, resulting in crisper but aliased sound. not accurate to hardware.
101 - **Anti-click**: reduces clicks in the output by using hardware envelopes to smooth them out.
102 - make sure your samples start on center, or else you will still hear clicks.
103
104 ## ADSR
105
106 | attack | 0→1 time | decay | 1→S time | sustain | ratio | release | S→0 time
107 | -----: | -------: | ----: | -------: | ------: | :---: | ------: | -------:
108 | `00` | 4.1s | `00` | 1.2s | `00` | 1/8 | `00` | ∞
109 | `01` | 2.5s | `01` | 740ms | `01` | 2/8 | `01` | 38s
110 | `02` | 1.5s | `02` | 440ms | `02` | 3/8 | `02` | 28s
111 | `03` | 1.0s | `03` | 290ms | `03` | 4/8 | `03` | 24s
112 | `04` | 640ms | `04` | 180ms | `04` | 5/8 | `04` | 19s
113 | `05` | 380ms | `05` | 110ms | `05` | 6/8 | `05` | 14s
114 | `06` | 260ms | `06` | 74ms | `06` | 7/8 | `06` | 12s
115 | `07` | 160ms | `07` | 37ms | `07` | 1 | `07` | 9.4s
116 | `08` | 96ms | | | | | `08` | 7.1s
117 | `09` | 64ms | | | | | `09` | 5.9s
118 | `0A` | 40ms | | | | | `0A` | 4.7s
119 | `0B` | 24ms | | | | | `0B` | 3.5s
120 | `0C` | 16ms | | | | | `0C` | 2.9s
121 | `0D` | 10ms | | | | | `0D` | 2.4s
122 | `0E` | 6ms | | | | | `0E` | 1.8s
123 | `0F` | 0ms | | | | | `0F` | 1.5s
124 | | | | | | | `10` | 1.2s
125 | | | | | | | `11` | 880ms
126 | | | | | | | `12` | 740ms
127 | | | | | | | `13` | 590ms
128 | | | | | | | `14` | 440ms
129 | | | | | | | `15` | 370ms
130 | | | | | | | `16` | 290ms
131 | | | | | | | `17` | 220ms
132 | | | | | | | `18` | 180ms
133 | | | | | | | `19` | 150ms
134 | | | | | | | `1A` | 110ms
135 | | | | | | | `1B` | 92ms
136 | | | | | | | `1C` | 74ms
137 | | | | | | | `1D` | 55ms
138 | | | | | | | `1E` | 37ms
139 | | | | | | | `1F` | 18ms
140
141 reference: [Super Famicom Development Wiki](https://wiki.superfamicom.org/spc700-reference#dsp-voice-register:-adsr-1097)
142
143 ## gain
144
145 value | linear inc. | bent line inc. | linear dec. | exponent dec.
146 ----: | ----------: | -------------: | ----------: | ------------:
147 `00` | ∞ | ∞ | ∞ | ∞
148 `01` | 4.1s | 7.2s | 4.1s | 38s
149 `02` | 3.1s | 5.4s | 3.1s | 28s
150 `03` | 2.6s | 4.6s | 2.6s | 24s
151 `04` | 2.0s | 3.5s | 2.0s | 19s
152 `05` | 1.5s | 2.6s | 1.5s | 14s
153 `06` | 1.3s | 2.3s | 1.3s | 12s
154 `07` | 1.0s | 1.8s | 1.0s | 9.4s
155 `08` | 770ms | 1.3s | 770ms | 7.1s
156 `09` | 640ms | 1.1s | 640ms | 5.9s
157 `0A` | 510ms | 900ms | 510ms | 4.7s
158 `0B` | 380ms | 670ms | 380ms | 3.5s
159 `0C` | 320ms | 560ms | 320ms | 2.9s
160 `0D` | 260ms | 450ms | 260ms | 2.4s
161 `0E` | 190ms | 340ms | 190ms | 1.8s
162 `0F` | 160ms | 280ms | 160ms | 1.5s
163 `10` | 130ms | 220ms | 130ms | 1.2s
164 `11` | 96ms | 170ms | 96ms | 880ms
165 `12` | 80ms | 140ms | 80ms | 740ms
166 `13` | 64ms | 110ms | 64ms | 590ms
167 `14` | 48ms | 84ms | 48ms | 440ms
168 `15` | 40ms | 70ms | 40ms | 370ms
169 `16` | 32ms | 56ms | 32ms | 290ms
170 `17` | 24ms | 42ms | 24ms | 220ms
171 `18` | 20ms | 35ms | 20ms | 180ms
172 `19` | 16ms | 28ms | 16ms | 150ms
173 `1A` | 12ms | 21ms | 12ms | 110ms
174 `1B` | 10ms | 18ms | 10ms | 92ms
175 `1C` | 8ms | 14ms | 8ms | 74ms
176 `1D` | 6ms | 11ms | 6ms | 55ms
177 `1E` | 4ms | 7ms | 4ms | 37ms
178 `1F` | 2ms | 3.5ms | 2ms | 18ms
179
180 reference: [Super Famicom Development Wiki](https://wiki.superfamicom.org/spc700-reference#dsp-voice-register:-gain-1156)
181
182 ## noise frequencies
183
184 value | freq. | value | freq.
185 ----: | -----: | ----: | -------:
186 `00` | 0 Hz | `10` | 500 Hz
187 `01` | 16 Hz | `11` | 667 Hz
188 `02` | 21 Hz | `12` | 800 Hz
189 `03` | 25 Hz | `13` | 1.0 KHz
190 `04` | 31 Hz | `14` | 1.3 KHz
191 `05` | 42 Hz | `15` | 1.6 KHz
192 `06` | 50 Hz | `16` | 2.0 KHz
193 `07` | 63 Hz | `17` | 2.7 KHz
194 `08` | 83 Hz | `18` | 3.2 KHz
195 `09` | 100 Hz | `19` | 4.0 KHz
196 `0A` | 125 Hz | `1A` | 5.3 KHz
197 `0B` | 167 Hz | `1B` | 6.4 KHz
198 `0C` | 200 Hz | `1C` | 8.0 KHz
199 `0D` | 250 Hz | `1D` | 10.7 KHz
200 `0E` | 333 Hz | `1E` | 16 KHz
201 `0F` | 400 Hz | `1F` | 32 KHz
202
203 reference: [Super Famicom Development Wiki](https://wiki.superfamicom.org/spc700-reference#dsp-register:-flg-1318)
204
205 ## resources
206
207 - [SNES-format BRR samples](https://www.smwcentral.net/?p=stion&s=brrsamples) at SMW Central