Looking for MID-to-WAV converter, Windows, command line, *not* SF2-based

Emulation of old PCs, PC hardware, or PC peripherals.

Looking for MID-to-WAV converter, Windows, command line, *not* SF2-based

Postby marzsyndrome » 2017-7-04 @ 18:28

Whew! Glad I could get that title in at least without running out of space. But to be more precise, I am looking for:

1) A command-line program for Windows...
2) ...that can convert a MIDI file to a WAV file...
3) ...that doesn't simply use soundfonts...
4) ...but instead is able to use external MIDI drivers...
5) ...such as MUNT or OPL3Windows.

So, that eliminates both Timidity and FluidSynth. Basically, I want a batch-friendly program that is able to read a MIDI file like it were, say, WMP, and utilise whatever driver I've specified in the Drivers32 section of the registry and output the end-result into a WAVE format. I'm thinking, for instance, that I could utilise the accuracy of OPL3Windows to create an OPL'd version of a MIDI file of my choice and do as I wish with it. I've tried using that OPL3 128Mb soundfont with the above-mentioned MIDI programs but it obviously isn't all that accurate a lot of the time. And I'd prefer command-line-based because then I could make a batch script to auto-convert many MIDI files in this style, rather than just chuck everything into a bulky GUI program.

I've also tried ADLMIDI - well, whatever outdated Win32 binary I could get my hands on - and somehow it still doesn't sound quite like how I hear it through OPL3Windows. Is it not using Nuked?

Anyhow, whoever can magic up precisely this kind of setup will have my eternal gratitude. Thanking you!
Last edited by marzsyndrome on 2017-7-04 @ 19:50, edited 2 times in total.
marzsyndrome
Newbie
 
Posts: 53
Joined: 2007-3-28 @ 14:33

Re: Looking for MID-to-WAV converter, Windows, command line, *not* SF2-based

Postby superfury » 2017-7-04 @ 19:42

You can simply play it using any windows player, which (supports) outputs to MUNT or OPL3Windows(don't know that one, though). Then simply redirect output to the Windows Stereo mix loopback adapter, then record it using any audio software that can record it to a .wav file? Although, that would require real-time recording. Don't know of any software that can directly render output using MUNT etc.(which outputs to hardware only afaik). Thus the loopback adapter is probably the only choice?
superfury
l33t
 
Posts: 2050
Joined: 2014-3-08 @ 11:25
Location: Netherlands

Re: Looking for MID-to-WAV converter, Windows, command line, *not* SF2-based

Postby leileilol » 2017-7-04 @ 20:17

IIRC WinAMP should have a WAV output plugin along with a (buggy!) MIDI input plugin that can sample from midi devices (really meant for the visualizers etc).
User avatar
leileilol
l33t++
 
Posts: 8718
Joined: 2006-12-16 @ 18:03

Re: Looking for MID-to-WAV converter, Windows, command line, *not* SF2-based

Postby Falcosoft » 2017-7-04 @ 20:37

Hi,
I do not think such a converter can exist since there is no function in the WinMM API to get back sample data from Midi Out drivers. You can only send Midi messages to drivers that usually render samples directly to WaveOut (virtual Midi cables and HW ports are exceptions). So Superfury is right, only real-time recording is possible. But you can do this process even with one GUI application (FSMP).
And if you want to record directly (avoiding the loop-back adapter) you can also do it with the help of the included Munt VSTi and OPL3 GM VSTi plugins.
http://falcosoft.hu/softwares.html#midiplayer
About the recording part:
http://falcosoft.hu/midiplayer_howto.html#a8
About how to use the VSTi plugins:
http://falcosoft.hu/midiplayer_howto.html#a17

Edit:
I have just tried and Winamp does not seem to use the Disk Writer output when the Midi input plugin (and normal Midi Out ports) is used.
Last edited by Falcosoft on 2017-7-06 @ 02:47, edited 1 time in total.
User avatar
Falcosoft
Member
 
Posts: 394
Joined: 2016-5-21 @ 13:46
Location: Pécs, Hungary

Re: Looking for MID-to-WAV converter, Windows, command line, *not* SF2-based

Postby marzsyndrome » 2017-7-04 @ 21:15

leileilol wrote:IIRC WinAMP should have a WAV output plugin along with a (buggy!) MIDI input plugin that can sample from midi devices (really meant for the visualizers etc).
Yes, I'm aware of Winamp and its own MIDI-to-WAV usefulness. I just wish someone would write a CLI frontend that utilises in_midi.dll (and I guess out_disk.dll) outside of Winamp like that fhgaacenc program some smart soul made a few years back.
marzsyndrome
Newbie
 
Posts: 53
Joined: 2007-3-28 @ 14:33

Re: Looking for MID-to-WAV converter, Windows, command line, *not* SF2-based

Postby Falcosoft » 2017-7-04 @ 21:32

Winamp also cannot render to wav when you select a 'normal' Midi Out port. The conversion only works with the DirectMusic MS GM/GS Softsynth.
I still cannot comprehend how it would be even theoretically possible to write such a converter (considering the lacking of any supporting functions in the API).
User avatar
Falcosoft
Member
 
Posts: 394
Joined: 2016-5-21 @ 13:46
Location: Pécs, Hungary

Re: Looking for MID-to-WAV converter, Windows, command line, *not* SF2-based

Postby marzsyndrome » 2017-7-04 @ 22:08

Yeah, oops, just noticed the edit to your post after I made my comment (the posting of which I delayed due to being momentarily distracted). So I guess Winamp is a bust unless someone makes a replacement Midi plugin for it (there's already many alternative MOD plugins for it, so I hold out hope).

That said, foobar2000 is a godsend GUI-wise - the foo_midi component for it appears to now include Nuclear support, which I'll take to mean it uses Nuked. And it includes the option to use OPL3W as a preset anyway! Now if only it could be made more CLI batch friendly...
marzsyndrome
Newbie
 
Posts: 53
Joined: 2007-3-28 @ 14:33

Re: Looking for MID-to-WAV converter, Windows, command line, *not* SF2-based

Postby marzsyndrome » 2017-7-04 @ 22:30

Falcosoft wrote:Hi,
I do not think such a converter can exist since there is no function in the WinMM API to get back sample data from Midi Out drivers. You can only send Midi messages to drivers that usually render samples directly to WaveOut (virtual Midi cables are exceptions). So Superfury is right, only real-time recording is possible. But you can do this process even with one GUI application (FSMP).
And if you want to record directly (avoiding the loop-back adapter) you can also do it with the help of the included Munt VSTi and OPL3 GM VSTi plugins.
http://falcosoft.hu/softwares.html#midiplayer
About the recording part:
http://falcosoft.hu/midiplayer_howto.html#a8
About how to use the VSTi plugins:
http://falcosoft.hu/midiplayer_howto.html#a17

Okay, so I gave your MIDI program a try. Took a while to navigate round the interface and sort out the VSTi configuration, but overall it's pretty neat. Just a couple of questions:

1) Would a fast write-to-WAV output option be possible in future? Just noticed that even after setting the recording output to File Mode, it only writes in real-time.
2) What would be the likelihood of a CLI program on the side designed to deal with MIDI-to-WAV-or-whatever conversions in future also? Noticed the mod2midi program so I hold out hope. :)
marzsyndrome
Newbie
 
Posts: 53
Joined: 2007-3-28 @ 14:33

Re: Looking for MID-to-WAV converter, Windows, command line, *not* SF2-based

Postby Kamerat » 2017-7-05 @ 17:22

foobar2000 with the "MIDI synthesizer host" plugin host can convert at high speed. It comes with Munt (Super MUNT GM), Soundfont support, VSTi support and some FM emulators.

http://www.foobar2000.org/download
http://www.foobar2000.org/components/view/foo_midi
User avatar
Kamerat
Oldbie
 
Posts: 622
Joined: 2014-3-14 @ 19:09
Location: Oslo, Norway

Re: Looking for MID-to-WAV converter, Windows, command line, *not* SF2-based

Postby Falcosoft » 2017-7-06 @ 01:25

) Would a fast write-to-WAV output option be possible in future? Just noticed that even after setting the recording output to File Mode, it only writes in real-time.

As I said in case of normal Midi Out ports only real-time recording is possible (even theoretically). In case of Softsynths/Basmmidi output mode that can give back sample data faster than real-time conversion is possible so maybe later it can be added.
2) What would be the likelihood of a CLI program on the side designed to deal with MIDI-to-WAV-or-whatever conversions in future also? Noticed the mod2midi program so I hold out hope. :)

Just as above. In case of normal Midi Out ports as in your original question:
...whatever driver I've specified in the Drivers32 section

such a conversion tool is not possible. In case of Bassmidi/SoftSynths the chances are higher than zero :)
User avatar
Falcosoft
Member
 
Posts: 394
Joined: 2016-5-21 @ 13:46
Location: Pécs, Hungary

Re: Looking for MID-to-WAV converter, Windows, command line, *not* SF2-based

Postby marzsyndrome » 2017-7-06 @ 12:25

Kamerat wrote:foobar2000 with the "MIDI synthesizer host" plugin host can convert at high speed. It comes with Munt (Super MUNT GM), Soundfont support, VSTi support and some FM emulators.

http://www.foobar2000.org/download
http://www.foobar2000.org/components/view/foo_midi

Yes, I did already mention fb2k earlier. It's very useful at times. I'm just hoping that any command-line support it may have is capable of starting itself up to do one task then auto-quit again.

Falcosoft wrote:
) Would a fast write-to-WAV output option be possible in future? Just noticed that even after setting the recording output to File Mode, it only writes in real-time.

As I said in case of normal Midi Out ports only real-time recording is possible (even theoretically). In case of Softsynths/Basmmidi output mode that can give back sample data faster than real-time conversion is possible so maybe later it can be added.
2) What would be the likelihood of a CLI program on the side designed to deal with MIDI-to-WAV-or-whatever conversions in future also? Noticed the mod2midi program so I hold out hope. :)

Just as above. In case of normal Midi Out ports as in your original question:
...whatever driver I've specified in the Drivers32 section

such a conversion tool is not possible. In case of Bassmidi/SoftSynths the chances are higher than zero :)

Well at this point if BassMIDI/SoftSynth approaches are capable nowadays of more or less replicating what MIDI playback sounds like through WinMM anyway, I'm all for going down that route. :)
marzsyndrome
Newbie
 
Posts: 53
Joined: 2007-3-28 @ 14:33

Re: Looking for MID-to-WAV converter, Windows, command line, *not* SF2-based

Postby Kamerat » 2017-7-06 @ 15:38

marzsyndrome wrote:
Kamerat wrote:foobar2000 with the "MIDI synthesizer host" plugin host can convert at high speed. It comes with Munt (Super MUNT GM), Soundfont support, VSTi support and some FM emulators.

http://www.foobar2000.org/download
http://www.foobar2000.org/components/view/foo_midi

Yes, I did already mention fb2k earlier. It's very useful at times. I'm just hoping that any command-line support it may have is capable of starting itself up to do one task then auto-quit again.

Think I need some new glasses. :blush:
User avatar
Kamerat
Oldbie
 
Posts: 622
Joined: 2014-3-14 @ 19:09
Location: Oslo, Norway

Re: Looking for MID-to-WAV converter, Windows, command line, *not* SF2-based

Postby Stretch » 2017-7-15 @ 23:38

ADLMIDI sounds different compared to OPL3Windows, because it has reverb applied. midiplay from libadlmidi sounds more authentic because it has no reverb, but the -w option for writing wav doesn't work.

PGE MusPlay for Win32 from the middle of this page https://github.com/Wohlstand/libADLMIDI is a graphical interface to libADLMIDI and it has the option to write a wav.
Win98SE - Intel SE440BX-2 - Pentium II 233 Mhz - 256 MB System Ram - Voodoo 3 1000 AGP - Yamaha YMF-724 PCI - Soundblaster 32 ISA
Stretch
Member
 
Posts: 253
Joined: 2013-11-16 @ 00:57

Re: Looking for MID-to-WAV converter, Windows, command line, *not* SF2-based

Postby datajake1999 » 2017-12-07 @ 09:53

I am looking for a midi to wav converter that uses the code from opl3windows as well.
It is the most accurate compared with everything else because it emulates the pitch bend underflow bug, for example.
I don't like using foobar2000 to convert midis to wav, even though it uses the code from opl3windows, because the output is a bit distorted.
These are the reasons I want someone to write a command-line utility to convert midis to wav using opl3windows.
datajake1999
Newbie
 
Posts: 21
Joined: 2016-4-17 @ 17:04


Return to PC Emulation

Who is online

Users browsing this forum: No registered users and 1 guest