nesdev.com
http://forums.nesdev.com/

New VRC7 patch set
http://forums.nesdev.com/viewtopic.php?f=6&t=9141
Page 1 of 1

Author:  rainwarrior [ Wed Aug 01, 2012 12:43 am ]
Post subject:  New VRC7 patch set

I've spent some time over the last several days going over the VRC7 patch set with the CopyNES VRC7 tuner. This is about as close as I can get; some patches appear to be exact, but many have very minute differences which I could not reconcile. Also, there are many factors which make an exact match very hard; vibrato/tremolo don't synch with the note, so patches which use them are a bit variable, and there are some other random factors which seem to affect the onset of the note that I don't understand, but again they make some patches sound slightly different each time (just in the onset of the tone though).

This is an incremental improvement on the patch set quietust posted a few years ago. This would have taken a lot more time if it weren't for the prior work of kevtris and quietust, especially on the VRC7 tuner tool.

Code:
rainwarrior's VRC7 patches:

00 00 00 00 00 00 00 00
03 21 05 06 B8 82 42 27
13 41 13 0D D8 D6 23 12
31 11 08 08 FA 9A 22 02
31 61 18 07 78 64 30 27
22 21 1E 06 F0 76 08 28
02 01 06 00 F0 F2 03 F5
21 61 1D 07 82 81 16 07
23 21 1A 17 CF 72 25 17
15 11 25 00 4F 71 00 11
85 01 12 0F 99 A2 40 02
07 C1 69 07 F3 F5 A7 12
71 23 0D 06 66 75 23 16
01 02 D3 05 A3 92 F7 52
61 63 0C 00 94 AF 34 06
21 62 0D 00 B1 A0 54 17


Hardware recording of patch comparison:
http://rainwarrior.ca/projects/nes/vrc7_rainwarrior_patch_test.flac
(Pairs of tones are built-in first, custom second, each at three pitches, when all patches are done, the entire test is repeated at low volume.)

The USB CopyNES host I used is available here:
https://github.com/bbbradsmith/usbcopynesblue

There are some minor source code changes to the VRC7 tuner tool; the modulator volume range is fixed (only went to 32 instead of 64), and saving files is fixed, as well as adding keyboard shortcuts Q/W/E to play the tones. I haven't uploaded a build with the fixed tool, but the source code fixes are in at that repository.


Edit: attached source code an NES/NSF for the test.

Attachments:
File comment: ca65 source code, NES ROM and NSF of VRC7 path test.
vrc7_patch_test.zip [5.94 KiB]
Downloaded 61 times

Author:  rainwarrior [ Wed Aug 01, 2012 2:34 am ]
Post subject: 

For anyone who is curious what the differences are, here's the changes in my new set, vs quietust's old one:

quietust.vrc7 > rainwarrior.vrc7:

patch 1:
Modulator output: 4 > 5
Modulator attack: 8 > 11
Modulator decay: 13 > 8
Carrier attack: 15 > 8
Carrier sustain: 1 > 2

patch 2:
Modulator output: 5 > 19
Feedback: 6 > 5
Modulator attack: 9 > 13
Modulator decay: 9 > 8
Carrier attack: 9 > 13
Modulator sustain: 6 > 2

patch 3:
Modulator output: 16 > 8
Feedback: 2 > 0
Modulator decay: 0 > 10
Carrier decay: 12 > 10
Modulator sustain: 3 > 2

patch 4:
Modulator rate scaling: 0 > 1
Modulator output: 29 > 24
Modulator attack: 9 > 7
Modulator decay: 15 > 8
Modulator sustain: 2 > 3

patch 6:
Carrier sustain: 9 > 15

patch 7:
Modulator output: 28 > 29

patch 8:
Modulator attack: 14 > 12
Carrier attack: 8 > 7
Carrier release: 5 > 7

patch 9:
Modulator sustain: 1 > 0
Modulator rate scaling: 0 > 1
Modulator output: 31 > 37
Modulator attack: 8 > 4
Modulator decay: 6 > 15
Carrier attack: 4 > 7
Modulator sustain: 2 > 0

patch 10:
Modulator output: 31 > 18
Modulator attack: 14 > 9
Modulator decay: 4 > 9
Modulator sustain: 1 > 4
Modulator release: 1 > 0
Carrier sustain: 1 > 0

patch 11:
Modulator level scale: 0 > 1
Modulator output: 43 > 41
Carrier level scale: 1 > 0
Feedback: 5 > 7
Modulator attack: 11 > 15
Modulator decay: 4 > 3
Carrier decay: 1 > 5
Modulator sustain: 2 > 10
Modulator release: 4 > 7
Carrier sustain: 15 > 1
Carrier release: 4 > 2

patch 12:
Modulator rate scaling: 0 > 1
Modulator output: 17 > 13
Modulator attack: 9 > 6
Carrier attack: 9 > 7
Carrier decay: 6 > 5
Modulator sustain: 1 > 2

patch 13:
Modulator attack: 8 > 10
Modulator decay: 2 > 3
Carrier attack: 10 > 9
Modulator sustain: 3 > 15
Modulator release: 1 > 7
Carrier release: 1 > 2

patch 14:
Modulator multiplier: 2 > 1
Carrier vibrato: 0 > 1
Carrier multiplier: 2 > 3
Modulator output: 13 > 12
Feedback: 2 > 0
Modulator attack: 12 > 9
Modulator decay: 3 > 4
Carrier attack: 7 > 10
Modulator sustain: 2 > 3
Carrier release: 5 > 6

patch 15:
Modulator output: 14 > 13
Modulator attack: 10 > 11
Modulator sustain: 4 > 5

Author:  Disch [ Wed Aug 01, 2012 8:45 pm ]
Post subject: 

I haven't compared side-by-side with actual recordings yet... but it sounds great to me at first listen!

Nice work. :)

Author:  rainwarrior [ Sun Nov 13, 2016 10:29 pm ]
Post subject:  Re: New VRC7 patch set

Just realized I never published the ROM/NSF of the test, or its source code. Added to OP.

Author:  ap9 [ Wed Oct 18, 2017 12:29 am ]
Post subject:  Re: New VRC7 patch set

I found a few sustain, decay and release values are slightly off according to the waveforms in the patch test recording (internal patch first, approximated second). The set is very close, of course— I found only three instances one point off.

It was in the process of updating my emulator that I made the following adjustments to achieve close results to the h/w recording:

Patch #1:
Carrier decay 2 > 1
Carrier sustain 2 > 3
$"03 21 05 06 B8 81 42 37"

Patch #14:
Carrier release 6 > 7
$"61 63 0C 00 94 AF 34 07"

Patch #15:
Carrier release 7 > 8
$"21 62 0D 00 B1 A0 54 18"

(Also: thanks for your work, rainwarrior.)

Page 1 of 1 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/