Simple VST plugin that aesthetically emulates the properties of the SNES sound hardware.
It implements the following effects (with the same order of operations):
- Downsampling
- Realtime Bit-Rate Reduction
- SNES Echo (has Delay and Feedback parameters with panning controls)
- Feedback Filters
- Lowpass
- Highpass
- Bandpass
- Use Custom Filter Coefficients
This VST plugin turns "clean" audio into what it might have sounded like had it been outputted through the SNES. The signal is put through the following stages:
- Downsampling: Default is 32 kHz, however this can be changed to any sample rate between 1 Hz and the current project's sample rate.
- The output sample rate of the SNES is 32 kHz, so this is supposed to add a bit of that "retro touch" to the sound.
- There are 4 downsampling modes:
- None: Completely bypasses downsampling...
- Nearest: Just picks the nearest neighbor when downsampling (this method has the most aliasing)
- Linear: Linearly interpolates between samples
- 4-pt Gaussian: Uses the Gauss table (points on the normal distribution) from the SPC-700 to do a weighted average of 4 points to interpolate samples. This method was originally used on the SNES in the context of stretching out samples for the purpose of pitching them up and down, however I'm not sure if it will provide the same effect if it's used for constant downsampling.
- Bit-Rate Reduction (BRR): The SNES used this technique to compress instrument/sound samples. It encodes 16 2-byte samples into 9-byte chunks. The first byte is a header that contains a bitshift value
- Echo: The SNES used a feedback-based delay (delay length is in increments of 16ms)
- FIR Filter: An 8-tap FIR filter is applied to the output of the echo
- There will be 5 modes for this filter:
- None: The filter coefficients will just be an impulse signal, effectively applying no filter to the echo.
- Lowpass: Picks filter coefficients that try to attenuate higher frequencies
- Hipass: Picks filter coefficients that try to attenuate lower frequencies
- Bandpass: Picks filter coefficients that try to attenuate all frequencies except a single band
- Custom: Allows the user to pick custom filter coefficients. This will be useful for users that want to emulate the specific echo of a game, as loading the .SPC file for a song in a SPC player displays the filter coefficients for that song, which can be inputted into this plugin.
- There will be 5 modes for this filter:
In addition to these features, the plugin should automatically be able to detect whether the inputs/outputs are mono/stereo and process with regards to those. The regular case would be stereo inputs and outputs, but if the output was changed to mono, then the left and right channels should be combined into a single output channel properly. And if the input was changed to mono instead, then the controls that correspond to stereo output/panning should still work.
The user will have the option to switch the manner of control for the Wet/Dry Volume and Panning controls (they can either change both the left and right channels' volumes independently, or change a single volume value and pan it left & right). Another manner of input the user can change is whether the processing is done with Q1.7 fixed point numbers or regular floating point numbers.
- Change everything to Text Knobs
- Add functionality to text knobs that:
- Allows text input upon ctrl-clicking/right-clicking the text knob
- Resets the field to its default upon double-clicking/middle-clicking the text knob
- Make it so that dragging a Text Knob up and down actually changes the values
- Assign more accurate ranges to each knob (including logarithmic ranges for larger ranges like downsampling frequency)
- Get 1.7 Fixed point naming/processing working
- Implement downsampling
- Nearest
- Linear
- 4-pt Gaussian
- BRR
- Echo
- FIR Filter
I've got a previous version of this plugin built on the iPlug2 framework, that implements the nearest-neighbor and linear downsampling methods, along with the echo & FIR filter, so that means we also have some baseline code for those functions. However, I still need to convert that code over to work with the VST3 SDK, as well as change it to support arbitrary combinations of Mono/Stereo inputs/outputs.