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.
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.
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.
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.
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.
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.
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.
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).
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'
Thanks 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!
this 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.
Hi 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!
I 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.
That'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!
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:
Honey, 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.
Hi 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.
I'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!
@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.
Hey 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!
Tough 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.
Hey 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!
Matt, I really like the sound of this plugin, except for one awful glitch. I'm trying to do a stutter effect, one problem is that I can't sync it and set it fast enough to get the effect I want(only goes to 1/32 - going down as far as 1/128 would be great), I've managed to sync up the ms to the bpm(awkwardly), but now I'm having issues with an extremely stuttering sound/glitching/crackling that works it's way in and out of the sound.
Interestingly it seems to go away more when I set my computer's power profile to "High power" so it could be some kind of buffer under-run, I'm not sure. I'll post clips when I have more of the track done.
Hey hon! Stoppin' in to give you the good word. Letting you know that we've got a heap new ammount of church members this week. I played them some of the megaman music I made with your VSTi, and they think it is the BOMB!! I told them "Child, if it wasn't for Matt Montag, there wouldn't be none of this blessed music!" Mhmm!!
Please please please Matt! Please finish this... Please fix things like... velocity change in the piano roll... pitch slides, and note stacking. Pleaseeeee... Make my dream come true. v___v ... I don't wanna use famitracker...
Upon it's discovery, your VST made my work better by far. I was trying to get somewhere near the flexibility of FamiTracker's style, and it was all I needed. If you were to finish this, the 8-bit fans who wish to not compose their music by traditional standards (trackers) would highly appreciate this. Again, thank you!
b1e95dc632