Thysbelon.Logo of a Hummingbird moth.

Murders (Hawaii: Part II) VRC6 Chiptune Cover

(This music cannot yet be played on the home page. Please click on the post link.)

Hello!

Throughout the first 8 days of February, I worked on a cover of ミラクルミュージカル's Murders. I had discovered the excellent FamiStudio, and I thought it would be fun to create a cover of Murders using the same chip used in 悪魔城伝説. I know these songs are popular, and they probably already have many covers, but I hope my cover is still enjoyed.

This cover would not have been possible without the excellent sheet music transcription by punyidea.

You may be wondering: "If you finished this cover on February 8th, why did you wait until March 13th to post it?"
Well, for my blog, I knew I had to synthesize the chiptune using JavaScript. Rendering it to an mp3 and embedding with <audio> would be too easy! And you may have noticed that I've been posting a lot of JavaScript synthesis of midi lately. The great thing about sequenced music compared to streamed music is that it has a way smaller file size; and on the web, where large file sizes make the page take longer to load, that's great!

I thought there would already be JavaScript and WebAssembly programs out there to play NSF files on a webpage, and I did find a few, but they had crackles.

So I decided I would compile game-music-emu to WebAssembly myself. I didn't think it would be too hard...

Most of my struggles I was able to solve by looking at Chip-Player-JS's code. Thank you mmontag!

The biggest struggle was when I tried to make it so you could pass "true" or "false" to switch between stereo and mono (the famicom and NES never supported stereo); I never did figure this out, so I just made two copies of the entire program, one that only plays stereo and one that only plays mono. The total size of the two binaries is 349 KB, so I think being lazy is fine this time.

What made the stereo conundrum very frustrating was that it looked like the library, or other forks of it, already had methods to switch between stereo and mono; but these methods either didn't work or I couldn't figure out how to use them.

Anyway, I'm pretty happy with where nsfplayer-wasm is at now. The only problem left is that sometimes there are a few crackles when the song starts. I have no idea how to fix this. I never quite got nsfplayer-wasm in an acceptable state, because it has horrible performance on smartphones and low-power computers. Well, nsfplayer-wasm still isn't perfect, but it's finally acceptable! 😊

Download project files.

Tags:
Categories: