Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
poor waif
Apr 8, 2007
Kaboom
I spent my Friday evening writing a MIDI parser in standard Java, and then I connected the result to an old wave exporter I wrote years ago. It's missing huge chunks of the fancier MIDI features, but it's reached the point where you can start recognising what song is playing!

Be warned that there's no support for instruments, just really loud square waves.



In the future I hope to let it turn MIDI files into optimised guitar tabs.

poor waif fucked around with this message at 02:07 on Mar 21, 2015

Adbot
ADBOT LOVES YOU

poor waif
Apr 8, 2007
Kaboom

Snapchat A Titty posted:

Sorry, parsing as in parsing midi data into sound or as in parsing sound into midi data?

I assume the former, but still, it's hella fun to get to the point where you can see or hear the difference. Implementing filters&poo poo is gonna be a blast.

Parsing MIDI data into data structures that are easier to work with. The actual parsing is mostly done, but there are tons of little details to playback that are going to get really tricky. The next big step is going to be semi-realistic instruments with some form of ADSR implementation.

poor waif
Apr 8, 2007
Kaboom
I've added basic instruments to MIDI playback. My implementation of an instrument is basically ADSR with a couple fourier series coefficients for waveform synthesis. It seems to sort of work, but I haven't bothered designing very many instruments yet.

I'm going to look into loading SF2 files, at a first glance it seems like a proper implementation will require a far snazzier instrument implementation.

Most MIDI files seem to sort of work at the moment, but some of the more complicated ones don't sound good at all. I'm thinking they're making heavy use of controller events or pitch bends, which I haven't implemented at all yet.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply