SNES docs (and other tweaks)

This commit is contained in:
Electric Keet 2023-06-27 14:06:23 -07:00
parent 0ec451726c
commit 6ede173d2c
7 changed files with 325 additions and 108 deletions

View File

@ -10,7 +10,7 @@ double-click to open the instrument editor.
every instrument can be renamed and have its type changed. every instrument can be renamed and have its type changed.
depending on the instrument type, there are currently 13 different types of an instrument editor: depending on the instrument type, there are many different types of instrument editor:
- [FM synthesis](fm.md) - for use with YM2612, YM2151 and FM block portion of YM2610. - [FM synthesis](fm.md) - for use with YM2612, YM2151 and FM block portion of YM2610.
- [Standard](standard.md) - for use with NES and Sega Master System's PSG sound source and its derivatives. - [Standard](standard.md) - for use with NES and Sega Master System's PSG sound source and its derivatives.
@ -29,7 +29,7 @@ depending on the instrument type, there are currently 13 different types of an i
- [Konami SCC / Bubble System WSG](scc.md) - for use with Konami SCC and Wavetable portion in Bubble System's sound hardware. - [Konami SCC / Bubble System WSG](scc.md) - for use with Konami SCC and Wavetable portion in Bubble System's sound hardware.
- [Namco 163](n163.md) - for use with Namco 163. - [Namco 163](n163.md) - for use with Namco 163.
- [Konami VRC6](vrc6.md) - for use with VRC6's PSG sound source. - [Konami VRC6](vrc6.md) - for use with VRC6's PSG sound source.
- [SNES](snes.md) - for use with SNES S-APU.
# macros # macros

View File

@ -1,4 +1,4 @@
# Amiga/PCM sound sourceinstrument editor # Amiga/PCM sound source instrument editor
The PCM instrument editor consists of a sample selector and several macros: The PCM instrument editor consists of a sample selector and several macros:
@ -8,7 +8,7 @@ The PCM instrument editor consists of a sample selector and several macros:
# Macros # Macros
- **Volume**: volume sequence WARNING: it works only on Amiga system, as of version 0.5.5!! - **Volume**: volume sequence. _warning:_ it works only on Amiga system, as of version 0.5.5!
- **Arpeggio**: pitch sequence - **Arpeggio**: pitch sequence
- **Waveform**: sample sequence - **Waveform**: sample sequence
- **Panning (left)**: output level for left channel - **Panning (left)**: output level for left channel

46
doc/4-instrument/snes.md Normal file
View File

@ -0,0 +1,46 @@
# SNES instrument editor
these tabs are unique to the editor for SNES instruments.
# SNES
**Use envelope** enables the ADSR volume envelope. if it's on:
- **A**: attack rate.
- **D**: decay rate.
- **S**: sustain level.
- **D2**: decay rate during sustain.
- **R**: release rate.
- **Sustain/release mode**:
- **Direct**: note release acts as note cut.
- **Effective (linear decrease)**: after release, volume lowers by subtractions of 1/64 steps.
- **Effective (exponential decrease)**: after release, volume decays exponentially. see [gain chart](../7-systems/snes.md).
- **Delayed (write R on release)**: after release, waits until A and D have completed before starting exponential decrease.
if envelope is off, select gain mode as described below.
# Macros
- **Volume**: volume.
- **Arpeggio**: pitch in half-steps.
- **Noise Freq**: preset frequency of noise generator.
- **Waveform**: waveform.
- **Panning (left)**: output level of left channel.
- **Panning (right)**: output level of right channel.
- **Pitch**: fine pitch.
- **Special**: bitmap of flags.
- invert left: inverts output of left channel.
- invert right: inverts output of right channel.
- pitch mod: modulates pitch using previous channel's output.
- echo: enables echo.
- noise: enables noise generator.
- **Gain**: sets mode and value of gain.
- 0 127: direct gain from 0 to 127
- 128 159: linear gain from -0 to -31
- 160 191: exponential gain from -0 to -31
- 192 223: linear gain from +0 to +31
- 224 255: exponential gain from +0 to +31

View File

@ -1,11 +1,11 @@
# X1-010 instrument editor # X1-010 instrument editor
X1-010 instrument editor consists of 7 macros. X1-010 instrument editor consists of these macros.
- **Volume**: volume levels sequence - **Volume**: volume levels sequence
- **Arpeggio**: pitch sequence - **Arpeggio**: pitch sequence
- **Waveform**: spicifies wavetables sequence - **Waveform**: specifies wavetables sequence
- **Envelope Mode**: allows shaping an envelope - **Envelope Mode**: allows shaping an envelope
- **Envelope**: spicifies envelope shape sequence, it's also wavetable. - **Envelope**: specifies envelope shape sequence, it's also wavetable.
- **Auto envelope numerator**: sets the envelope to the channel's frequency multiplied by numerator - **Auto envelope numerator**: sets the envelope to the channel's frequency multiplied by numerator
- **Auto envelope denominator**: sets the envelope to the channel's frequency divided by denominator - **Auto envelope denominator**: sets the envelope to the channel's frequency divided by denominator

View File

@ -4,6 +4,8 @@ a computer with a desktop OS, lifelike graphics and 4 channels of PCM sound in 1
in this very computer music trackers were born... in this very computer music trackers were born...
imported MOD files use this chip, and will set A-4 tuning to 436.
# effects # effects
- `10xx`: **toggle low-pass filter.** `0` turns it off and `1` turns it on. - `10xx`: **toggle low-pass filter.** `0` turns it off and `1` turns it on.

View File

@ -6,10 +6,17 @@ also known as Famicom. it is a five-channel sound generator: first two channels
# effects # effects
- `11xx`: **write to delta modulation counter.** this may be used to attenuate the triangle and noise channels. - `11xx`: **write to delta modulation counter.** range is `00` to `7F`. this may be used to attenuate the triangle and noise channels down to about half normal volume.
- will not work if a sample is playing. - will not work if a sample is playing.
- `12xx`: **set duty cycle or noise mode of channel.** - `12xx`: **set duty cycle or noise mode of channel.**
- may be `0` to `3` for the pulse channels and `0` or `1` for the noise channel. - may be `0` to `3` for the pulse channels:
- `0`: 12.5%
- `1`: 25%
- `2`: 50%
- `3`: 75% (inverted)
- may be `0` or `1` for the noise channel:
- `0`: long (15-bit LFSR, 32767-step)
- `1`: short (9-bit LFSR, 93-step)
- `13xy`: **setup sweep up.** - `13xy`: **setup sweep up.**
- `x` is the time. - `x` is the time.
- `y` is the shift. - `y` is the shift.
@ -48,62 +55,126 @@ also known as Famicom. it is a five-channel sound generator: first two channels
- only works in DPCM mode. - only works in DPCM mode.
- see table below for possible values. - see table below for possible values.
# DPCM frequency table # tables
val | NTSC | PAL ## short noise frequencies (NTSC)
----|----------:|----------:
00 | 4181.7Hz | 4177.4Hz
01 | 4709.9Hz | 4696.6Hz
02 | 5264.0Hz | 5261.4Hz
03 | 5593.0Hz | 5579.2Hz
04 | 6257.9Hz | 6023.9Hz
05 | 7046.3Hz | 7044.9Hz
06 | 7919.3Hz | 7917.2Hz
07 | 8363.4Hz | 8397.0Hz
08 | 9419.9Hz | 9446.6Hz
09 | 11186.1Hz | 11233.8Hz
0A | 12604.0Hz | 12595.5Hz
0B | 13982.6Hz | 14089.9Hz
0C | 16884.6Hz | 16965.4Hz
0D | 21306.8Hz | 21315.5Hz
0E | 24858.0Hz | 25191.0Hz
0F | 33143.9Hz | 33252.1Hz
# length counter table note | arpeggio | fundamental | MIDI note | pitch
:---- | -------: | ----------: | --------: | :----------
`C-0` | @0 | 4.7 Hz | -9.47 | `d_1` + 53¢
`C#0` | @1 | 9.5 Hz | 2.53 | `D-0` + 53¢
`D-0` | @2 | 18.9 Hz | 14.55 | `D-1` + 55¢
`D#0` | @3 | 25.3 Hz | 19.53 | `G-1` + 53¢
`E-0` | @4 | 37.9 Hz | 26.55 | `D-2` + 55¢
`F-0` | @5 | 50.6 Hz | 31.57 | `G-2` + 57¢
`F#0` | @6 | 75.8 Hz | 38.55 | `D-3` + 55¢
`G-0` | @7 | 95.3 Hz | 42.51 | `F#3` + 51¢
`G#0` | @8 | 120.3 Hz | 46.55 | `A#3` + 55¢
`A-0` | @9 | 150.4 Hz | 50.41 | `D-4` + 41¢
`A#0` | @10 | 200.5 Hz | 55.39 | `G-4` + 39¢
`B-0` | @11 | 300.7 Hz | 62.41 | `D-5` + 41¢
`C-1` | @12 | 601.4 Hz | 74.41 | `D-6` + 41¢
`C#1` | @13 | 1202.8 Hz | 86.41 | `D-7` + 41¢
`D-1` | @14 | 2405.6 Hz | 98.41 | `D-8` + 41¢
`D#1` | @15 | 4811.2 Hz | 110.41 | `D-9` + 41¢
val | raw | NTSC | PAL | Dendy | NTSC 5-step | PAL 5-step | Dendy 5-step reference: [NESdev](https://www.nesdev.org/wiki/APU_Noise)
----|----:|------:|------:|------:|------------:|-----------:|-------------:
00 | 10 | 83ms | 100ms | 84ms | 104ms | 125ms | 105ms ## length counter table
01 | 254 | 2.1s | 2.5s | 2.1s | 2.6s | 3.2s | 2.7s
02 | 20 | 166ms | 200ms | 168ms | 208ms | 250ms | 210ms <!-- organized by input value... of little use -->
03 | 2 | 17ms | 20ms | 17ms | 21ms | 25ms | 21ms <!--
04 | 40 | 333ms | 400ms | 336ms | 417ms | 500ms | 421ms value | raw | NTSC | PAL | Dendy | NTSC 5-step | PAL 5-step | Dendy 5-step
05 | 4 | 33ms | 40ms | 34ms | 42ms | 50ms | 42ms -----:|----:|------:|------:|------:|------------:|-----------:|-------------:
06 | 80 | 667ms | 800ms | 673ms | 833ms | 1.0s | 841ms `00` | 10 | 83ms | 100ms | 84ms | 104ms | 125ms | 105ms
07 | 6 | 50ms | 60ms | 50ms | 63ms | 75ms | 63ms `01` | 254 | 2.1s | 2.5s | 2.1s | 2.6s | 3.2s | 2.7s
08 | 160 | 1.3s | 1.6s | 1.3s | 1.7s | 2.0s | 1.7s `02` | 20 | 166ms | 200ms | 168ms | 208ms | 250ms | 210ms
09 | 8 | 67ms | 80ms | 67ms | 83ms | 100ms | 84ms `03` | 2 | 17ms | 20ms | 17ms | 21ms | 25ms | 21ms
0A | 60 | 500ms | 600ms | 505ms | 625ms | 750ms | 631ms `04` | 40 | 333ms | 400ms | 336ms | 417ms | 500ms | 421ms
0B | 10 | 83ms | 100ms | 84ms | 104ms | 125ms | 105ms `05` | 4 | 33ms | 40ms | 34ms | 42ms | 50ms | 42ms
0C | 14 | 117ms | 140ms | 118ms | 146ms | 175ms | 147ms `06` | 80 | 667ms | 800ms | 673ms | 833ms | 1.0s | 841ms
0D | 12 | 100ms | 120ms | 101ms | 125ms | 150ms | 126ms `07` | 6 | 50ms | 60ms | 50ms | 63ms | 75ms | 63ms
0E | 26 | 217ms | 260ms | 219ms | 271ms | 325ms | 273ms `08` | 160 | 1.3s | 1.6s | 1.3s | 1.7s | 2.0s | 1.7s
0F | 14 | 117ms | 140ms | 118ms | 145ms | 175ms | 147ms `09` | 8 | 67ms | 80ms | 67ms | 83ms | 100ms | 84ms
10 | 12 | 100ms | 120ms | 101ms | 125ms | 150ms | 126ms `0A` | 60 | 500ms | 600ms | 505ms | 625ms | 750ms | 631ms
11 | 16 | 133ms | 160ms | 135ms | 167ms | 200ms | 168ms `0B` | 10 | 83ms | 100ms | 84ms | 104ms | 125ms | 105ms
12 | 24 | 200ms | 240ms | 202ms | 250ms | 300ms | 252ms `0C` | 14 | 117ms | 140ms | 118ms | 146ms | 175ms | 147ms
13 | 18 | 150ms | 180ms | 151ms | 188ms | 225ms | 189ms `0D` | 12 | 100ms | 120ms | 101ms | 125ms | 150ms | 126ms
14 | 48 | 400ms | 480ms | 404ms | 500ms | 600ms | 505ms `0E` | 26 | 217ms | 260ms | 219ms | 271ms | 325ms | 273ms
15 | 20 | 167ms | 200ms | 168ms | 208ms | 250ms | 210ms `0F` | 14 | 117ms | 140ms | 118ms | 145ms | 175ms | 147ms
16 | 96 | 800ms | 960ms | 807ms | 1.0s | 1.2s | 1.0s `10` | 12 | 100ms | 120ms | 101ms | 125ms | 150ms | 126ms
17 | 22 | 183ms | 220ms | 185ms | 229ms | 275ms | 231ms `11` | 16 | 133ms | 160ms | 135ms | 167ms | 200ms | 168ms
18 | 192 | 1.6s | 1.9s | 1.6s | 2.0s | 2.4s | 2.0s `12` | 24 | 200ms | 240ms | 202ms | 250ms | 300ms | 252ms
19 | 24 | 200ms | 240ms | 202ms | 250ms | 300ms | 252ms `13` | 18 | 150ms | 180ms | 151ms | 188ms | 225ms | 189ms
1A | 72 | 600ms | 720ms | 606ms | 750ms | 900ms | 757ms `14` | 48 | 400ms | 480ms | 404ms | 500ms | 600ms | 505ms
1B | 26 | 217ms | 260ms | 219ms | 271ms | 325ms | 273ms `15` | 20 | 167ms | 200ms | 168ms | 208ms | 250ms | 210ms
1C | 16 | 133ms | 160ms | 135ms | 167ms | 200ms | 168ms `16` | 96 | 800ms | 960ms | 807ms | 1.0s | 1.2s | 1.0s
1D | 28 | 233ms | 280ms | 235ms | 292ms | 350ms | 294ms `17` | 22 | 183ms | 220ms | 185ms | 229ms | 275ms | 231ms
1E | 32 | 267ms | 320ms | 269ms | 333ms | 400ms | 336ms `18` | 192 | 1.6s | 1.9s | 1.6s | 2.0s | 2.4s | 2.0s
1F | 30 | 250ms | 300ms | 252ms | 313ms | 375ms | 315ms `19` | 24 | 200ms | 240ms | 202ms | 250ms | 300ms | 252ms
`1A` | 72 | 600ms | 720ms | 606ms | 750ms | 900ms | 757ms
`1B` | 26 | 217ms | 260ms | 219ms | 271ms | 325ms | 273ms
`1C` | 16 | 133ms | 160ms | 135ms | 167ms | 200ms | 168ms
`1D` | 28 | 233ms | 280ms | 235ms | 292ms | 350ms | 294ms
`1E` | 32 | 267ms | 320ms | 269ms | 333ms | 400ms | 336ms
`1F` | 30 | 250ms | 300ms | 252ms | 313ms | 375ms | 315ms
-->
<!-- organized by resulting times... more useful! -->
value | raw | NTSC | PAL | Dendy | NTSC 5-step | PAL 5-step | Dendy 5-step
-----:|----:|------:|------:|------:|------------:|-----------:|-------------:
`03` | 2 | 17ms | 20ms | 17ms | 21ms | 25ms | 21ms
`05` | 4 | 33ms | 40ms | 34ms | 42ms | 50ms | 42ms
`07` | 6 | 50ms | 60ms | 50ms | 63ms | 75ms | 63ms
`09` | 8 | 67ms | 80ms | 67ms | 83ms | 100ms | 84ms
`00` | 10 | 83ms | 100ms | 84ms | 104ms | 125ms | 105ms
`0B` | 10 | 83ms | 100ms | 84ms | 104ms | 125ms | 105ms
`0D` | 12 | 100ms | 120ms | 101ms | 125ms | 150ms | 126ms
`10` | 12 | 100ms | 120ms | 101ms | 125ms | 150ms | 126ms
`0C` | 14 | 117ms | 140ms | 118ms | 146ms | 175ms | 147ms
`0F` | 14 | 117ms | 140ms | 118ms | 145ms | 175ms | 147ms
`1C` | 16 | 133ms | 160ms | 135ms | 167ms | 200ms | 168ms
`11` | 16 | 133ms | 160ms | 135ms | 167ms | 200ms | 168ms
`13` | 18 | 150ms | 180ms | 151ms | 188ms | 225ms | 189ms
`02` | 20 | 166ms | 200ms | 168ms | 208ms | 250ms | 210ms
`15` | 20 | 167ms | 200ms | 168ms | 208ms | 250ms | 210ms
`17` | 22 | 183ms | 220ms | 185ms | 229ms | 275ms | 231ms
`12` | 24 | 200ms | 240ms | 202ms | 250ms | 300ms | 252ms
`19` | 24 | 200ms | 240ms | 202ms | 250ms | 300ms | 252ms
`0E` | 26 | 217ms | 260ms | 219ms | 271ms | 325ms | 273ms
`1B` | 26 | 217ms | 260ms | 219ms | 271ms | 325ms | 273ms
`1D` | 28 | 233ms | 280ms | 235ms | 292ms | 350ms | 294ms
`1F` | 30 | 250ms | 300ms | 252ms | 313ms | 375ms | 315ms
`1E` | 32 | 267ms | 320ms | 269ms | 333ms | 400ms | 336ms
`04` | 40 | 333ms | 400ms | 336ms | 417ms | 500ms | 421ms
`14` | 48 | 400ms | 480ms | 404ms | 500ms | 600ms | 505ms
`0A` | 60 | 500ms | 600ms | 505ms | 625ms | 750ms | 631ms
`1A` | 72 | 600ms | 720ms | 606ms | 750ms | 900ms | 757ms
`06` | 80 | 667ms | 800ms | 673ms | 833ms | 1.0s | 841ms
`16` | 96 | 800ms | 960ms | 807ms | 1.0s | 1.2s | 1.0s
`08` | 160 | 1.3s | 1.6s | 1.3s | 1.7s | 2.0s | 1.7s
`18` | 192 | 1.6s | 1.9s | 1.6s | 2.0s | 2.4s | 2.0s
`01` | 254 | 2.1s | 2.5s | 2.1s | 2.6s | 3.2s | 2.7s
reference: [NESdev](https://www.nesdev.org/wiki/APU_Length_Counter) reference: [NESdev](https://www.nesdev.org/wiki/APU_Length_Counter)
## DPCM frequency table
value | NTSC | PAL
------|----------:|----------:
`00` | 4181.7Hz | 4177.4Hz
`01` | 4709.9Hz | 4696.6Hz
`02` | 5264.0Hz | 5261.4Hz
`03` | 5593.0Hz | 5579.2Hz
`04` | 6257.9Hz | 6023.9Hz
`05` | 7046.3Hz | 7044.9Hz
`06` | 7919.3Hz | 7917.2Hz
`07` | 8363.4Hz | 8397.0Hz
`08` | 9419.9Hz | 9446.6Hz
`09` | 11186.1Hz | 11233.8Hz
`0A` | 12604.0Hz | 12595.5Hz
`0B` | 13982.6Hz | 14089.9Hz
`0C` | 16884.6Hz | 16965.4Hz
`0D` | 21306.8Hz | 21315.5Hz
`0E` | 24858.0Hz | 25191.0Hz
`0F` | 33143.9Hz | 33252.1Hz

View File

@ -1,8 +1,8 @@
# Super Nintendo Entertainment System (SNES)/Super Famicom # Super Nintendo Entertainment System (SNES) / Super Famicom
the successor to NES to compete with Genesis, packing superior graphics and sample-based audio. the successor to NES to compete with Genesis, packing superior graphics and sample-based audio.
its audio system, developed by Sony, features a DSP chip, SPC700 CPU and 64KB of dedicated SRAM used by both. its Sony-developed audio system features a DSP chip, SPC700 CPU, and 64KB of dedicated SRAM used by both.
this whole system itself is pretty much a separate computer that the main CPU needs to upload its program and samples to. this whole system itself is pretty much a separate computer that the main CPU needs to upload its program and samples to.
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. 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.
@ -25,55 +25,153 @@ Furnace also allows the SNES to use wavetables (and the wavetable synthesizer) i
- `10xx`: **set waveform.** - `10xx`: **set waveform.**
- `11xx`: **toggle noise mode.** - `11xx`: **toggle noise mode.**
- `12xx`: **toggle echo on this channel.** - `12xx`: **toggle echo on this channel.**
- `13xx`: **toggle pitch modulation.** - `13xx`: **toggle pitch modulation.** frequency modulation by the previous channel's output. no effect on channel 1.
- `14xy`: **toggle inverting the left or right channels.** (x: left, y: right). - `14xy`: **toggle inverting the left or right channels.** `x` is left, `y` is right.
- `15xx`: **set envelope mode.** - `15xx`: **set envelope mode.** see gain chart below for `1` through `5`.
- 0: ADSR. - `0`: ADSR mode.
- 1: gain (direct). - `1`: gain (direct). volume holds at one level.
- 2: linear decrement. - `2`: linear decrement. volume lowers by subtractions of 1/64.
- 3: exponential decrement. - `3`: exponential decrement. volume lowers by multiplications of 255/256.
- 4: linear increment. - `4`: linear increment. volume rises by additions of 1/64.
- 5: bent line (inverse log) increment. - `5`: bent line (inverse log) increment. volume rises by additions of 1/64 until 3/4, then additions of 1/256.
- `16xx`: **set gain.** `00` to `7F` if direct, `00` to `1F` otherwise. - `16xx`: **set gain.** `00` to `7F` if direct, `00` to `1F` otherwise.
- `18xx`: **enable echo buffer.** - `18xx`: **enable echo buffer.**
- `19xx`: **set echo delay.** range is `0` to `F`. - `19xx`: **set echo delay.** range is `0` to `F`.
- `1Axx`: **set left echo channel volume.** - `1Axx`: **set left echo channel volume.**\
- this is a signed number. `1Bxx`: **set right echo channel volume.**\
`1Cxx`: **set echo feedback.**
- all of these are signed numbers.
- `00` to `7F` for 0 to 127. - `00` to `7F` for 0 to 127.
- `80` to `FF` for -128 to -1. - `80` to `FF` for -128 to -1.
- setting this to -128 is not recommended as it may cause echo output to overflow and therefore click. - setting these to -128 is not recommended as it may cause echo output to overflow and therefore click.
- `1Bxx`: **set right echo channel volume.** - `1Dxx`: **set noise generator frequency.** range is `00` to `1F`. see noise frequencies chart below.
- this is a signed number. - `1Exx`: **set left dry / global volume.**\
- `00` to `7F` for 0 to 127. `1Fxx`: **set right dry / global volume.**
- `80` to `FF` for -128 to -1. - these do not affect echo.
- setting this to -128 is not recommended as it may cause echo output to overflow and therefore click. - `20xx`: **set attack.** range is `0` to `F`.\
- `1Cxx`: **set echo feedback.** `21xx`: **set decay.** range is `0` to `7`.\
- this is a signed number. `22xx`: **set sustain.** range is `0` to `7`.\
- `00` to `7F` for 0 to 127. `23xx`: **set release.** range is `00` to `1F`.
- `80` to `FF` for -128 to -1. - these four are only used in ADSR envelope mode. see ADSR chart below.
- setting this to -128 is not recommended as it may cause echo output to overflow and therefore click. - `30xx`: **set echo filter coefficient 0.**\
- `1Dxx`: **set noise generator frequency.** range is `00` to `1F`. `31xx`: **set echo filter coefficient 1.**\
- `1Exx`: **set left dry / global volume.** `32xx`: **set echo filter coefficient 2.**\
- this does not affect echo. `33xx`: **set echo filter coefficient 3.**\
- `1Fxx`: **set right dry / global volume.** `34xx`: **set echo filter coefficient 4.**\
- this does not affect echo. `35xx`: **set echo filter coefficient 5.**\
- `20xx`: **set attack.** range is `0` to `F`. `36xx`: **set echo filter coefficient 6.**\
- only in ADSR envelope mode. `37xx`: **set echo filter coefficient 7.**
- `21xx`: **set decay.** range is `0` to `7`.
- only in ADSR envelope mode.
- `22xx`: **set sustain.** range is `0` to `7`.
- only in ADSR envelope mode.
- `23xx`: **set release.** range is `00` to `1F`.
- only in ADSR envelope mode.
- `30xx`: **set echo filter coefficient 0.**
- `31xx`: **set echo filter coefficient 1.**
- `32xx`: **set echo filter coefficient 2.**
- `33xx`: **set echo filter coefficient 3.**
- `34xx`: **set echo filter coefficient 4.**
- `35xx`: **set echo filter coefficient 5.**
- `36xx`: **set echo filter coefficient 6.**
- `37xx`: **set echo filter coefficient 7.**
- all of these are signed numbers. - all of these are signed numbers.
- `00` to `7F` for 0 to 127. - `00` to `7F` for 0 to 127.
- `80` to `FF` for -128 to -1. - `80` to `FF` for -128 to -1.
- _Note:_ Be sure the sum of all coefficients is between -128 and 127. sums outside that may result in overflow and therefore clicking. - _Note:_ Be sure the sum of all coefficients is between -128 and 127. sums outside that may result in overflow and therefore clicking.
- see [SnesLab](https://sneslab.net/wiki/FIR_Filter) for a full explanation and examples.
# tables
## ADSR
| attack | 0→1 time | decay | 1→S time | sustain | ratio | release | S→0 time
| -----: | -------: | ----: | -------: | ------: | :---: | ------: | -------:
| `00` | 4.1 sec | `00` | 1.2 sec | `00` | 1/8 | `00` | ∞
| `01` | 2.5 sec | `01` | 740 msec | `01` | 2/8 | `01` | 38 sec
| `02` | 1.5 sec | `02` | 440 msec | `02` | 3/8 | `02` | 28 sec
| `03` | 1.0 sec | `03` | 290 msec | `03` | 4/8 | `03` | 24 sec
| `04` | 640 msec | `04` | 180 msec | `04` | 5/8 | `04` | 19 sec
| `05` | 380 msec | `05` | 110 msec | `05` | 6/8 | `05` | 14 sec
| `06` | 260 msec | `06` | 74 msec | `06` | 7/8 | `06` | 12 sec
| `07` | 160 msec | `07` | 37 msec | `07` | 1 | `07` | 9.4 sec
| `08` | 96 msec | | | | | `08` | 7.1 sec
| `09` | 64 msec | | | | | `09` | 5.9 sec
| `0A` | 40 msec | | | | | `0A` | 4.7 sec
| `0B` | 24 msec | | | | | `0B` | 3.5 sec
| `0C` | 16 msec | | | | | `0C` | 2.9 sec
| `0D` | 10 msec | | | | | `0D` | 2.4 sec
| `0E` | 6 msec | | | | | `0E` | 1.8 sec
| `0F` | 0 msec | | | | | `0F` | 1.5 sec
| | | | | | | `10` | 1.2 sec
| | | | | | | `11` | 880 msec
| | | | | | | `12` | 740 msec
| | | | | | | `13` | 590 msec
| | | | | | | `14` | 440 msec
| | | | | | | `15` | 370 msec
| | | | | | | `16` | 290 msec
| | | | | | | `17` | 220 msec
| | | | | | | `18` | 180 msec
| | | | | | | `19` | 150 msec
| | | | | | | `1A` | 110 msec
| | | | | | | `1B` | 92 msec
| | | | | | | `1C` | 74 msec
| | | | | | | `1D` | 55 msec
| | | | | | | `1E` | 37 msec
| | | | | | | `1F` | 18 msec
reference: [Super Famicom Development Wiki](https://wiki.superfamicom.org/spc700-reference#dsp-voice-register:-adsr-1097)
## gain
value | linear inc. | bent line inc. | linear dec. | exponent dec.
----: | ----------: | -------------: | ----------: | ------------:
`00` | ∞ | ∞ | ∞ | ∞
`01` | 4.1 sec | 7.2 sec | 4.1 sec | 38 sec
`02` | 3.1 sec | 5.4 sec | 3.1 sec | 28 sec
`03` | 2.6 sec | 4.6 sec | 2.6 sec | 24 sec
`04` | 2.0 sec | 3.5 sec | 2.0 sec | 19 sec
`05` | 1.5 sec | 2.6 sec | 1.5 sec | 14 sec
`06` | 1.3 sec | 2.3 sec | 1.3 sec | 12 sec
`07` | 1.0 sec | 1.8 sec | 1.0 sec | 9.4 sec
`08` | 770 msec | 1.3 sec | 770 msec | 7.1 sec
`09` | 640 msec | 1.1 sec | 640 msec | 5.9 sec
`0A` | 510 msec | 900 msec | 510 msec | 4.7 sec
`0B` | 380 msec | 670 msec | 380 msec | 3.5 sec
`0C` | 320 msec | 560 msec | 320 msec | 2.9 sec
`0D` | 260 msec | 450 msec | 260 msec | 2.4 sec
`0E` | 190 msec | 340 msec | 190 msec | 1.8 sec
`0F` | 160 msec | 280 msec | 160 msec | 1.5 sec
`10` | 130 msec | 220 msec | 130 msec | 1.2 sec
`11` | 96 msec | 170 msec | 96 msec | 880 msec
`12` | 80 msec | 140 msec | 80 msec | 740 msec
`13` | 64 msec | 110 msec | 64 msec | 590 msec
`14` | 48 msec | 84 msec | 48 msec | 440 msec
`15` | 40 msec | 70 msec | 40 msec | 370 msec
`16` | 32 msec | 56 msec | 32 msec | 290 msec
`17` | 24 msec | 42 msec | 24 msec | 220 msec
`18` | 20 msec | 35 msec | 20 msec | 180 msec
`19` | 16 msec | 28 msec | 16 msec | 150 msec
`1A` | 12 msec | 21 msec | 12 msec | 110 msec
`1B` | 10 msec | 18 msec | 10 msec | 92 msec
`1C` | 8 msec | 14 msec | 8 msec | 74 msec
`1D` | 6 msec | 11 msec | 6 msec | 55 msec
`1E` | 4 msec | 7 msec | 4 msec | 37 msec
`1F` | 2 msec | 3.5 msec | 2 msec | 18 msec
reference: [Super Famicom Development Wiki](https://wiki.superfamicom.org/spc700-reference#dsp-voice-register:-gain-1156)
## noise frequencies
value | freq. | value | freq.
----: | -----: | ----: | -------:
`00` | 0 Hz | `10` | 500 Hz
`01` | 16 Hz | `11` | 667 Hz
`02` | 21 Hz | `12` | 800 Hz
`03` | 25 Hz | `13` | 1.0 KHz
`04` | 31 Hz | `14` | 1.3 KHz
`05` | 42 Hz | `15` | 1.6 KHz
`06` | 50 Hz | `16` | 2.0 KHz
`07` | 63 Hz | `17` | 2.7 KHz
`08` | 83 Hz | `18` | 3.2 KHz
`09` | 100 Hz | `19` | 4.0 KHz
`0A` | 125 Hz | `1A` | 5.3 KHz
`0B` | 167 Hz | `1B` | 6.4 KHz
`0C` | 200 Hz | `1C` | 8.0 KHz
`0D` | 250 Hz | `1D` | 10.7 KHz
`0E` | 333 Hz | `1E` | 16 KHz
`0F` | 400 Hz | `1F` | 32 KHz
reference: [Super Famicom Development Wiki](https://wiki.superfamicom.org/spc700-reference#dsp-register:-flg-1318)
# resources
- [SNES-format BRR samples](https://www.smwcentral.net/?p=section&s=brrsamples) at SMW Central