How to converting mid to wav?

Hello everybody,Could some one help me with an example of how to convert midi files to wave files, or with some suggestions on how to do it?Thaks a lot
[172 byte] By [laurcjROa] at [2007-10-2 19:24:14]
# 1

I believe you can play the file with a midi player and record it as a wav as its playing. I think I remember doing this once, so I'm pretty sure it works.

If you were looking for a way to do it without actually playing it, I would probably start by looking at JMF: http://java.sun.com/products/java-media/jmf/

RadcliffePikea at 2007-7-13 21:09:15 > top of Java-index,Other Topics,Algorithms...
# 2

You type "convert midi to wav" into google

You browse the list of shareware software that will convert midi to wav "with a single button click"

You choose one or more, download them, try them out, and post the results back here so that other inquiring minds can know what works best.

marlin314a at 2007-7-13 21:09:15 > top of Java-index,Other Topics,Algorithms...
# 3
Thank you marlin314 for your "usefull" and "interesting" suggestions. It was my mistake that I forgot to specify that I need to integrate this conversion in a Java application.If you can give me a hint about how to do it in Java please feel free.
laurcjROa at 2007-7-13 21:09:15 > top of Java-index,Other Topics,Algorithms...
# 4
> If you can give me a hint about how to do it in Java please feel free.Then take a look at the jmf package as RadcliffePike suggested.
prometheuzza at 2007-7-13 21:09:15 > top of Java-index,Other Topics,Algorithms...
# 5
The problem is that I'm new to Java Media Framework so a code sample whould be very usefull
laurcjROa at 2007-7-13 21:09:15 > top of Java-index,Other Topics,Algorithms...
# 6

> The problem is that I'm new to Java Media Framework

> so a code sample whould be very usefull

You like to be fed with a very small spoon it seems.

Here goes: if you open the link provided by RadcliffePike you'll see a menu on the left side of the page. In that menu there is an item called Code Samples & Apps. Click that menu item.

You can also put the following strings in your favorite search engine java jmf code example and hit the search button.

prometheuzza at 2007-7-13 21:09:15 > top of Java-index,Other Topics,Algorithms...
# 7
I allready searched the net and the Java Media Framework Code Samples & Apps and I could not find anything usefull.
laurcjROa at 2007-7-13 21:09:15 > top of Java-index,Other Topics,Algorithms...
# 8
> I allready searched the net and the Java Media> Framework Code Samples & Apps and I could not find> anything usefull.That's a shame.
prometheuzza at 2007-7-13 21:09:15 > top of Java-index,Other Topics,Algorithms...
# 9
You might also want to look at using thejavax.soundpackage http://java.sun.com/j2se/1.4.2/docs/api/matfud
matfuda at 2007-7-13 21:09:15 > top of Java-index,Other Topics,Algorithms...
# 10
I already did that but I found out that there is no built-in way to capture the output of the synthesizer. see this FAQ: http://www.jsresources.org/faq_midi.html#midi_to_audio
laurcjROa at 2007-7-13 21:09:15 > top of Java-index,Other Topics,Algorithms...
# 11

You would have to find a software only implementation of a Synthesizer. Register it and ask for it by name. Then you can cast the generic "Synthesizer" to the known type and tap into its sampled output.

Even better if it implments both Synthesizer and InputAudioSteam or TargetDataLine

I don't know if one exists but it could be worth looking for.

matfud

matfuda at 2007-7-13 21:09:15 > top of Java-index,Other Topics,Algorithms...