What it does

It is capable of:

  • Importing a MIDI file
  • Editing a MIDI file (adding/removing/pitching/changing-the-duration-of notes)
  • Playing a MIDI file (limited to Grand Piano samples for now)
  • Importing a raw audio file and generating a MIDI file from it
  • Listening to the microphone and, in real time, writing down the notes it hears, in time (so you can, for example, whistle a tune and hear it back)

How we built it

Using raylib&raygui for creating the graphical window and fftw for the FFT implementation. We wrote the MIDI parser and pitch detector ourselves, using them.

Most of the code is written in C, using C++'s vectors on two instances (for storing the notes of the current MIDI file, which we do in the hip and modern data-oriented format, and for storing the live microphone feed). It's morally written in C.

Challenges we ran into

Making the FFT's tradeoff between time- and frequency- accuracy was a huge pain, and we don't really have it dialed in quite right even now. We use a relatively naïve approach to detecting the time- aspect (chunking the input and FFTing them in turn), which seems to be not-ideal.

Accomplishments that we're proud of

We've written the entire front-end, a pretty-much complete MIDI 1.0 parser and an audio-to-midi converter (detecting which notes play when). We basically had no merge conflicts, too, and the work distributed itself incredibly evenly, so we chose a really good project. Furthermore, we are very pleased with how the application ended up looking, so this really is an audiovisual gem.

What we learned

This was a wonderful experience for the whole team. We were able to fine-tune our planning skills, and somehow that worked nicely. We also learned a lot about MIDI files and sound physics. We were surprised by how fast the fft algorithm really is! ... And also, hard to employ correctly.

Built With

Share this project:

Updates