Audio Samples
Super Mario Brothers
Steps Ahead
Project Notes and Documentation

Overall module graph in SynthMaker
The NES VST is designed to emulate the 8-bit sounds of the Nintendo, remaining faithful to the specifications of the 2A03 chip. The plugin was built in Outsim SynthMaker to allow for an advanced user interface, and sounds were evaluated against the output of FamiTracker, which uses the Blip Buffer library to generate "perfect" alias-free primitive waveforms. In our project, aliasing is minimized with conventional techniques available in SynthMaker.
The following is a discussion of each 2A03 chip sound channel (Square, Triangle, Noise, and DPCM) and their implementation in SynthMaker.
Square
Our square wave was initially constructed by summing two saw waves limited at half bandwidth, which really means 1/4 of the sample rate or 11,025 hz. This was unsatisfactory and we switched to a construction from saw waves limited at nyquist. The test signal was a square wave with pulse width modulation cycling across 25%, 50%, 75%, and 12.5% pulse width. The results are compared here:

Linear sonogram of PWM square wave. The first tone is produced by SynthMaker before correction. The second and fourth tones are produced by FamiTracker. The third tone is the corrected full-bandwidth square wave produced by SynthMaker. Notice the first tone produces undesirable full bandwidth clicks when the pulse width changes. The corrected tone masks this effect.
Triangle
The Nintendo triangle wave has a distinct sound. It is produced by quantizing a triangle waveform to 16 discrete amplitudes. It also has an asymmetrical rise and fall. The falling segment of the waveform is slightly curved and the rise is linear. The triangle wave normally contains only odd harmonics, but this irregularity causes the signal to gain even harmonics, characteristic of the saw wave.

One period triangle waveform output of FamiTracker
Sample 1
4 bit quantized triangle wave, no anti-aliasing
Sample 2
4 bit quantized triangle wave, 2x oversampling, aliasing still audible
Sample 3
Nintendo triangle wave (produced by FamiTracker) vs. aliased triangle from SynthMaker.
Sample 4
Wavetable triangle vs. Nintendo triangle wave (produced by FamiTracker) This first attempt at band-limited wavetable synthesis used only 32 sample points as input. The resulting waveform does not have the high quantization harmonics.
Sample 5
Nintendo triangle wave (produced by FamiTracker) vs. band-limited wavetable triangle from SynthMaker. This time, the wavetable used 512 sample points. The sample points were also tweaked to create an asymmetric wave shape.
Triangle Oscillator Block Diagram

The final block diagram of the triangle oscillator in SynthMaker
Noise
The noise channel in the Nintendo is not noise in the usual sense, where amplitude or frequency would be modulated randomly. Instead, the NES sends a random sequence of bits directly to audio out. This is analagous to a square wave with a continuously-varying random pulse width. The NES produces noise in repeating sequences of 32767 or 93 bits. The pitch or color of the noise is variable at 16 modes. These modes are mapped to MIDI notes in our VST plugin.
The noise sequence produced by code is heavily aliased with a great deal of harmonic content above 22,050 hz. To solve this problem we subdivide time and create 8 unique output samples at every tick. These samples are merged and lowpass filtered to produce an 8x oversampled anti-aliased output.
Noise Oscillator Block Diagram

Noise oscillator in SynthMaker. Creates a new noise buffer every time a note is triggered, allowing every note to produce a unique noise pattern, characteristic of the Nintendo.
DPCM
Delta pulse code modulation is achieved by either increasing or decreasing the amplitude of the signal by a fixed interval at every sample. The signal never maintains a steady amplitude, and the amplitude climbs at a limited rate. The NES uses DPCM to play sampled audio, and does so with an amplitude resolution of 6 bits or 64 levels. We achieve realtime DPCM in code. We allow the user to select 4 custom WAV file samples and attach the samples to MIDI notes C4, D4, E4, and F4.
DPCM Oscillator Block Diagram

DPCM code section. This represents the DSP behind each "NES DPCM" module in the graph below.
Filter Section
The output is filtered by custom highpass- and lowpass-shelf filters. The filters attenuate unwanted ultra low frequency and high frequency content that may be produced by the DPCM.
Subscribe





Phytopep
/ April 3, 2011Matt,
You are my hero.
I've spent the last few months researching and carefully testing about 25-30 different plugins, VSTs, trackers, NSF players, and other tools that generate NES sounds in order to find one that was free (or close to free) of aliasing.
As far as I can tell, you have done what no one else has. Your VST is the only piece of software I've ever heard get it right. Even FamiTracker, which is supposed to use the blip buffer algorithm, produces what seems to me to be aliasing (I can hear it in high octaves, and it's visible in an FFT).
If I could send you a beer, I would.
Felix
/ May 3, 2011This is AMAZING!!! I always hated using Famitracker because it is confusing, but it always best the best NES instruments... now this... I can now make good 8-bit songs in FL Studio!
But... there's one little downfall I think... and that's not being able to do volume/pitch slides and adjustments in the piano roll. v_v' ... like if I wanna have a Hi-Hat with diff volumes, I would have to have multiples in separate channels. v_v'
Matt
/ May 3, 2011Thanks dude! I will keep working on it... I have pitch bend working in the latest version, but definitely need to get velocity sensitivity. I also want to map the mod wheel to duty cycle.
Felix
/ May 4, 2011Thanks for the reply! I've been mimicking a lot of tunes from diff. famitracker projects that I found with this VST. I made Megaman 3's stage select, and part of Plug Man's stage from MM9, and it's pretty damn near accurate to Famitrackers!
I've been telling everybody about this VST, so you'll probably be getting lots of feedback, and yeah, by far the BEST Nintendo VST!
Felix
/ May 4, 2011Oh, one more thing. The LFO steps go by 4's. I'm having a bit of trouble mimicking this one instrument....
In Famitracker, it's Volume: 15,8 | 0,8,13,8
But here in the VST, since it goes by 8's, it's
Volume: 15,8 | 0.8.13.8.8.8
Two extra 8's at the end. The Step time speed is at 16 ms (fastest). So those extra two 8's slow it down. v__v' I dunno how to get around this. <_<'
If LFO Steps went by 2's, It should work.
It's not a big deal really, 'cause I don't plan to use such an instrument, but I'm trying to mimic everything I can. xD!
Felix
/ May 4, 2011Hey Matt, checking in again with more feed back!
Mk, so I'm trying to make this Square kick. On famitracker the pitch for it is |77 ... but in the VST the pitch only goes to 12. So it's not happening. v_v'
Derik
/ May 7, 2011this VST is amazing! It is without a doubt the most accurate I have seen yet. I prefer working in Cubase but I refuse to make NES music in there because it just doesn't sound the same. Now I can make NES songs in something I'm comfortable working with. For that, I owe you thanks.
Just wondering are you planning on adding the NES expansions in future versions?
Felix
/ May 7, 2011Hey man, more feed back for you!
Okay, so on Famitracker there's an instrument that is a pitch of
0 -1 0 0 -1 0 0 -1 00 -1 0
It's basically a little slide up lead. Well... in the VST's Fine Pitch, I mimic... however, it makes it a slide down, not slide up. Apparently the negative and positive have switched places.
So I had to make it 0 +1 0 0 +1 0 0 +1 0 0 +1 0
for it to be a slide up...
So if one is to copy Pitch from famitracker, they would need to switch the negative in famitracker to positive in the VST.
I'm really getting the hang of how this VST works and how to adjust things. I've already mimicked a lot of instruments! It's great!
Phytopep
/ July 7, 2011Hi Matt,
I think I found a small bug in your noise algorithm. If you play a sustained noise, it will sometimes abruptly change pitch at regular intervals. Try looking at an FFT of a few of the lower pitches of noise played for 30 seconds, and you'll easily spot it.
Thanks again for taking the time to make this instrument!
Vinyl Scratch
/ July 8, 2011I thank you many a time for this great VST. I just have one question, will expansion chips such as VRC6, VRC7, FDS, and the like be supported?
dJ~noeko
/ July 21, 2011As someone that uses a lot of single waveform oscillators for that crunchy chiptune sound when producing, this is a godsend. I could just kiss you! Is there any chance you'd be willing to add some sort of DCPM-based saw wave presets? ( http://www.slack.net/~ant/misc/nes-saw/ )
That'd be an absolute godsend.
Matt
/ July 24, 2011I know what you are getting at. The way the DPCM sampler works now is that you load any WAV file in and it plays through a filter that makes it sound like DPCM. And another consideration is that the plugin is meant to be used in a full DAW environment so that you could load WAV clips of your favorite DPCM instruments into a different VST plugin. I understand the value of presets, however... Another problem is that my VST doesn't allow you to change pitch of those DPCM samples, it's supposed to be one-shots like drum kicks, etc. I plan to revisit the plugin soon and I'll put some thought into this.
dJ~noeko
/ August 4, 2011That's exciting to hear! I've been using it in a lot of my music lately and any improvements to it would be wonderful. When it comes to making hard bass sounds I think the NES is the premier square wave generator so this nearly 1:1 emulation of it is great. Any improvements to something that's already this good would be mind blowing. Keep up the great work!
sn0w75
/ August 20, 2011Hi,
I decided to try out this VST, made a rather cool sample with it:
http://soundcloud.com/sn0w75/pkmn-battle
However, whenever I use the VST in a Cubase project (Windows 7 64-bit, 64-bit Cubase), save the project, close it, and re-open it, it causes VSTBridgeApp.exe to crash (essentially rendering the whole project unusable until you remove the NES instruments, save, and restart Cubase/reopen the project). Here's the crash report:
Problem signature:
Problem Event Name: APPCRASH
Application Name: VSTBridgeApp.exe
Application Version: 2.0.2.64
Application Timestamp: 4cf79126
Fault Module Name: StackHash_0a9e
Fault Module Version: 0.0.0.0
Fault Module Timestamp: 00000000
Exception Code: c0000005
Exception Offset: 02cc30e0
OS Version: 6.1.7601.2.1.0.256.48
Locale ID: 1033
Additional Information 1: 0a9e
Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
Additional Information 3: 0a9e
Additional Information 4: 0a9e372d3b4ad19135b953a78882e789
Do you think there's anything to be done about it? I do like my chiptunes.
Madame Orean
/ September 3, 2011Honey, this is a thing from the lord, but you've got to get yo' ass on the ball and get dis thang complete!! I trying to make my music for church, and I can't adjust that velocity in the piano roll, nor can I do pitch slides, or note stacking in one channel, and I had to recognize that.
Get'cho ass in gear, my dear! My church is waitin for a lovely 8 bit song about the glory of the lord!!!
Matt
/ September 7, 2011Hi Madame Orean, thanks for the comment...you pointed out some real problems. I was waiting to see the response from the people, but I've gotten enough feedback now. I'll get back to work and put up a new version soon.
The_Strange_Remain@yahoo.com
/ September 16, 2011I'm really sorry to be that guy...but has anyone tried and had trouble installing this into Mixcraft 5? It refuses to acknowledge this is in my VST folder in programfiles(x86) even after removing and adding the folder again. Everything else shows up alright but not the nes vst. If you know anything about this I'd be very grateful for any point in the right direction. Thanks!
Matt
/ September 16, 2011@The_Strange_Remain and sn0w75: if you are having problems using the plugin with your VST host, I don't know the answer, but the plugin was made with SynthMaker, so try searching your problem with that keyword and you might find something. Please keep me posted if you figure it out.
Madame Orean
/ October 21, 2011I can't wait for you to complete this vst, hon. My church is gonna flip they wig when I make some megaman music
Madame Orean
/ November 5, 2011Hey hon, I am popping in again to say hello, and reminding you that my church is waiting for me to make some blessed 8-bit gospel music!
Madame Orean
/ November 12, 2011Hey hon, just wanted to say that I am excited about what God is doing. Stay blessed <3
Madame Orean
/ December 4, 2011Hey hon. I made a nice song for church last Sunday. It lacked some things. I got good feedback from my church sisters. The pastor told me to use famitracker but I said no, I have faith in Matt Montag. He gonna perfect the best NES vst. Keep up the good work, Matt! Stay blessed!
Yamato Ryou
/ December 23, 20111. The sound is not ideal
2. Large CPU usage
3. DPCM is not ideal
4. Envelope set is more complex (if still on step)
Translated from the Google...T_T
Matt
/ December 23, 2011Tough critics out here. Actually, those are some issues I was working on. CPU usage is too high. And the DPCM is not exactly NES, it favors flexibility instead of accuracy. I am considering going to a fixed NES DPCM sample bank, with a big list of presets like "SMB3 Kick" "TMNT3 Cowabunga" and "Duck Hunt Dog Laugh". I think these original game samples are what people would end up loading into a DPCM bank anyway.
Madame Orean
/ January 1, 2012Hey hon, how you are? It's Orean again. Checkin' in with ya'. How your Christmas was? How your new years was? We was ballin' at church today. Found some new Megaman fan game called Rokko Chan, and I loaded some of they songs on my iPod and played it at church. My sisters was really flowing about. When you get yourself a chance, listen to that 'Volcano Man' stage music. It really put the holy spirit in me. Stay blessed, Matt! <3
Madame Orean
/ January 29, 2012Hey hon, checkin' in seeing how you feel. Stay blessed!