Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

I'm working on writing a mini game engine for this jam. The main issue I'm having right now is music playback. I've been looking at the midi file format, but it's a pain to implement a binary reader that reads all of the right parts of the file. Preferably I'd like a plaintext file with note number and duration to hold for, seperated by commas and new lines. This might not be something you'd want to help work on, but if you have some tunes that you would like to convert to this format, I can post the specification.

(+3)

Tune.js (which is a Javascript sound/music generator) has a MIDI to JSON converter on its site which may be helpful.
https://tonejs.github.io/MidiConvert/

That converter is cool! Thank you Heavy Pixels!

I might actually use this. I was trying to write this for .NET 2.0 so that it would be compatible with running on Windows 98, but music is more important than comparability. If I use version 3.5 I can use the WebClient class to download the JS and the JavaScriptSerializer class to process the result. That does mean I still need some tracks, just in MIDI format. I'll look into implementing this today and get back to you all.

(1 edit)

The engine will now load json files generated by the toneJS MIDI converter. I've posted the source on GitHub, with a debug build of the game that automatically loads and plays "music.json". The sound quality was pretty horrendous with the test MIDI I used, but it wasn't an 8-bit track, and was probably never meant to be played with just frequency and duration. Have a look and see if whatever music you're planning to produce for the jam will sound ok. I also want to say thanks to HeavyPixels for providing this great resource.

https://github.com/LucidaDragon/Ninja/tree/master/SmolGame/bin/Debug

Oh interesting! It's kind of like a hexadecimal system (or Tracker). I can write tracker music or I can convert to whatever format you need. We can work together on it. I'm open to exploring