3

Are there any Open source APIs available for wav to midi conversion? You find many open source software, but I couldn't find APIs. Is there any way I can find them? Also are there any Open source APIs available for music transcription? (i.e. generating a digital version of a music sheet). Greatly appreciate any form of direction or assistance. Advance Thanks

1
  • 1
    You have to think about what you're asking here. WAV->MIDI is an incredibly difficult problems whose solutions vary from "painfully bad" -> "painful" -> "bad" -> "works with 1 instrument". The state of the art just hasn't advanced to the point where we have good open source solutions. Dec 13, 2009 at 18:10

1 Answer 1

4

Converting from wav to midi is a very difficult and error prone operation, not often done as far as I know, which will very often give poor results, so having an API to do that would be silly, though libraries may exist for it used in the Open Source software you mention. .wav files have no useful metadata that can help you get back to midi. It's much harder than speech to text to do well! (harmonics and noise matter). Will probably work OK for single instruments playing though, with strong fundamental frequencies that can be picked out with fourier transform.

For OCR of sheet music, I have found a piece of GPL'd software called Audiveris. This task isn't as hard as the previous thing, but is still a highly complex operation, probably requiring manual intervention to correct errors, that having a simple API for is pointless.

If you are making some Open Source software yourself, you can of course attempt to adapt swathes of code from these projects for whatever use you have in mind, though I doubt it would be worth the effort.

If any of the software you find has a command line interface to start a conversion, you could execute shell commands from your own software to make them do the required conversions automatically.

3
  • Thanks a lot for your answers. Wav-to-midi conversion; i'm doing only for piano. I need to convert audio track of piano playing (wav) into midi - to use for comparison purposes. I was thinking if I can find an API (like audiveris for sheet music ocr), to integrate its functions to my software. sheet music OCR; found audiveris + API - still trying to figure out how to integrate. I want to generate a digital music score on my own with my own API. Do you think it's impossible? Also how to use API in your code? I'm not a coding wiz - pls mind me for simple things i'm asking. Advance thanks
    – Dolphin
    Dec 21, 2009 at 15:41
  • Hi, I managed to access Audiveris and carry out some necessary steps straight from the CLI without using their GUI. May I know how I can execute these CLI Commands (for making use of API steps) from Java code (say from a class)? Appreciate any insight and suggestions. Thanks in advance
    – Dolphin
    Jun 5, 2010 at 18:55
  • Hi KernelJ-I managed to make use of the CLI and execute commands of the Audiveris API - and it worked. However I couldn't find any such software with CLI for wav-to-midi conversion - must be since the process itself is an extensive approach and I didn't come across such APIs. Many thanks for suggesting about making use of CLI
    – Dolphin
    Jun 28, 2010 at 23:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.