Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /storage/content/49/145849/famitracker.com/public_html/forum/classes/dbHandler.php on line 29
I'm not sure if this has been done or not but either way it was fun. It also downconverts FDS waves to GB waves (I called it GBS waves, even though I'm sure it has another name) So, if you convert an FDS wave to GB and back, you have an FDS wave with the Gameboy's limitations.
NOTE: Because NEZplug outputs in hex 0-F for GB waves and FamiTracker uses decimal 0-63 for FDS waves, this program needs GB waves in hex and FDS waves in decimal form (Although FDS waves can be entered in hex and will be automatically converted upon detection)
Also, since NEZplug has spaces in it's waveforms, which are separated by the byte, (even though the wave is interpreted by the nybble), (e.g. "00 11 22 33 44 55 66 77 88 99 AA BB CC DD EE FF" is a saw wave) this program allows the Gameboy waveforms to have any number of spaces, to avoid confusion.
FDS waveforms need spaces though, because "123" for example could be 1 & 23 or 12 & 3. Gameboy waveforms are output with no spaces.
Finally, the max volume for FDS output seems to be 60, not 64. (I added a volume hack in 2.0 to 'fix' that)
This was made with Visual Basic 2010, so you need this [url=http://www.microsoft.com/download/en/details.aspx?id=17851]http://www.microsoft.com/download/en/details.aspx?id=17851
Version history:
1.0 - First version
2.0 - Adds waveform previews, GB -> FDS loudness stretching (so the max is 64 instead of 60), and HQ FDS -> GB downsampling (experimental)
3.0 - Fixes many bugs and adds linear interpolation. The code is also more optimized. The linear interpolation smooths only the extra points, so a GB wave that was smoothly turned to an FDS wave can be turned back and be 100% identical. It was either this version or the last that added a NEZplug -> FamiTracker converter.
Bugs I remember fixing:
Made max volume for FamiTracker 63 instead of 64 because it starts at 0.
The converter no longer accepts invalid numbers that will make it crash.
Fixed the graphs sometimes not updating.
This is the source code. Does anybody know how I can smooth the waveform? I've taken a stab at it, but it didn't turn out so great.
Edit: The code was taking up way to much space and is now useless since I successfully introduced linear interpolation.
For waveform smoothing the easiest approach is linear interpolation between points (remember to wrap around at the end). The more points you're interpolating the more you get triangle-wave kinda sidebands in there though.
To reduce this you can use higher order interpolation (e.g. fit a cubic polynomial to four data points and interpolate using that; there are a lot of ways to do this, e.g. catmull-rom).
Alternatively you can fill with four copies of each, and then run a convolution filter over it that filters out everything above the sampling frequency; in practice this has roughly the same result as a higher order interpolation.
Since you've only got values from 0-63 to work with, there's probably no point to anything better than cubic interpolation. (Also, makes sure interpolation is optional, so that people can still get the proper gameboy sampling rate sound.)
[quote=com63]It doesn't seem to open for me. :S[/quote]
You probably need some sort of runtime for Visual Basic 2010. Does it give you an error?
edit: try this [url=http://www.microsoft.com/net]http://www.microsoft.com/net
[quote=retrotails][quote=com63]It doesn't seem to open for me. [/quote]
You probably need some sort of runtime for Visual Basic 2010. Does it give you an error?
edit: try this [url=http://www.microsoft.com/net]http://www.microsoft.com/net[/quote]
Um...
[quote=Error]Unhandled Exception: System.TypeLoadException: Could not load type 'WindowsApplication1.GB2FDS' from assembly 'GBS2FDS, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
at WindowsApplication1.My.MyProject+MyForms.get_GB2FDS () [0x00000] in <filename unknown>:0
at WindowsApplication1.My.MyApplication.OnCreateMainForm () [0x00000] in <filename unknown>:0
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun () [0x00000] in <filename unknown>:0
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run (System.String[] commandLine) [0x00000] in <filename unknown>:0
at WindowsApplication1.My.MyApplication.Main (System.String[] Args) [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeLoadException: Could not load type 'WindowsApplication1.GB2FDS' from assembly 'GBS2FDS, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
at WindowsApplication1.My.MyProject+MyForms.get_GB2FDS () [0x00000] in <filename unknown>:0
at WindowsApplication1.My.MyApplication.OnCreateMainForm () [0x00000] in <filename unknown>:0
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun () [0x00000] in <filename unknown>:0
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run (System.String[] commandLine) [0x00000] in <filename unknown>:0
at WindowsApplication1.My.MyApplication.Main (System.String[] Args) [0x00000] in <filename unknown>:0
[/quote]
_______________________
Everything moves real slow when it's 40 below.
[quote=retrotails][quote=com63]It doesn't seem to open for me. [/quote]
You probably need some sort of runtime for Visual Basic 2010. Does it give you an error?
edit: try this [url=http://www.microsoft.com/net]http://www.microsoft.com/net[/quote]
You need .NET framework 4 for the program to work (tried it &, since I didn't have .NET 4 installed, I had to install it to get it working).
This said, the program works fine.
_______________________
Technology: the one thing that's hated & cursed at by all engineers, technologists, scientists & technicians!