Page 1 of 1
Guide Setting up Remote MIDI Emulation (Midilink, Munt, Windows)
Posted: Fri Oct 16, 2020 4:14 pm
by jrronimo
I wrote this up in the ao486 section, but it should be applicable to any core that can use Midilink should work with this. I couldn't find all the answers in one place, so hopefully this will help in the future:
This guide will allow you to set up Munt, the Roland MT-32/CM-32L emulator, on a Windows PC and have a MiSTer core send its data over the network to that computer, which will play MIDI sounds. If your game/program also has sound generated by the Sound Blaster card at the same time, you will need to combine the inputs. For example, you can use the audio out of an HDMI to VGA adapter to the Line In on the computer running Munt, then plug your headphones or speakers into that computer to hear both at the same time.
Get Tobias Erichsen's LoopMIDI from here
Install it and run it.
Once LoopMIDI opens, click the "+" at the bottom. It should add a line that says "loopMIDI Port"
Get bbond007's UDPMIDI.EXE from here -- Windows will complain the file isn't safe or commonly downloaded, but it's fine. Either that or bbond007's got all my credit card information now.
Run it
On the line that says MIDI Device, click the dropdown arrow and choose the number that also says "loopMIDI Port"
-- Note: If you run UDPMIDI before LoopMIDI, UDPMIDI won't see the LoopMIDI port.
Download and install the Windows version of Munt, here
Run it
Select Options -> ROM Configuration and tell Munt where your CM-32L or MT-32 ROMs are.
Click Tools -> New MIDI port...
Select the line with "loopMIDI Port"
You need to edit the /media/fat/linux/MidiLink.INI file on your MiSTer. I prefer the editor 'nano' for things like this.
Use PuTTy to SSH in to your MiSTer by putting in its IP address (From the MiSTer Main Menu, press F12, then the left arrow key and it will display your MiSTer's IP)
Login with root/1
Use the command: nano /media/fat/linux/MidiLink.INI
Edit the line that says "UDP_SERVER" to have the IP address of your Windows computer
Press "CTRL+X" to exit; press 'y' to save changes, then 'enter' to write the changes.
Now, fire up ao486 and change the UART MidiLink: setting to Remote (type is UDP, but that should be default).
Start up Space Quest 3 (or whatever!) and enjoy!
Re: Guide Setting up Remote MIDI Emulation (Midilink, Munt, Windows)
Posted: Fri Oct 16, 2020 11:45 pm
by flynnsbit
Thank you for this! I had MIDI on my list for this weekend.
Re: Guide Setting up Remote MIDI Emulation (Midilink, Munt, Windows)
Posted: Tue Oct 20, 2020 8:34 pm
by jrronimo
flynnsbit wrote: ↑Fri Oct 16, 2020 11:45 pm
Thank you for this! I had MIDI on my list for this weekend.
Happily! I've always dreamed of having an MT-32, and it took a little longer than I'd hoped to figure this all out, so I'm glad it helped.
Re: Guide Setting up Remote MIDI Emulation (Midilink, Munt, Windows)
Posted: Sun Nov 15, 2020 12:18 pm
by JonnyTenebrous
@ jjronimo
Huge thanks for this guide! I've been wandering around down the rabbit hole trying to figure out how to connect up all this stuff for the last few days... and I was already about halfway there, but this just lays it all out clearly. MT-32 emulation on my Windows PC with a great Amp/DAC, feeding some nice Sennheiser headphones, while the MiSTer handles the digital audio and gameplay... it's just amazing! The dream DOS experience!
Re: Guide Setting up Remote MIDI Emulation (Midilink, Munt, Windows)
Posted: Sun Nov 15, 2020 5:48 pm
by jrronimo
JonnyTenebrous wrote: ↑Sun Nov 15, 2020 12:18 pm
@ jjronimo
Huge thanks for this guide! I've been wandering around down the rabbit hole trying to figure out how to connect up all this stuff for the last few days... and I was already about halfway there, but this just lays it all out clearly. MT-32 emulation on my Windows PC with a great Amp/DAC, feeding some nice Sennheiser headphones, while the MiSTer handles the digital audio and gameplay... it's just amazing! The dream DOS experience!
You're most welcome! Glad to hear you're getting all the audio through and it's working great. I'm so happy with the way it sounds. I'd love a real MT-32, but this method is quite a bit cheaper.
Re: Guide Setting up Remote MIDI Emulation (Midilink, Munt, Windows)
Posted: Mon Dec 07, 2020 10:58 pm
by Caldor
I decided to make a video showing this.
https://youtu.be/jNTjbjOPMtI
Re: Guide Setting up Remote MIDI Emulation (Midilink, Munt, Windows)
Posted: Sat Dec 12, 2020 5:13 pm
by ToothbrushThreepwood
What would I have to change if I want to run this in a portable setting without wifi/LAN? E.g. running munt on a RPi next to the MiSTer, is there a way to connect MIDI between the two with cables/connectors?
Re: Guide Setting up Remote MIDI Emulation (Midilink, Munt, Windows)
Posted: Thu Mar 04, 2021 1:57 pm
by jca
ToothbrushThreepwood wrote: ↑Sat Dec 12, 2020 5:13 pm
What would I have to change if I want to run this in a portable setting without wifi/LAN? E.g. running munt on a RPi next to the MiSTer, is there a way to connect MIDI between the two with cables/connectors?
https://github.com/dwhinham/mt32-pi/wik ... connection
Re: Guide Setting up Remote MIDI Emulation (Midilink, Munt, Windows)
Posted: Wed Mar 24, 2021 10:11 pm
by jrronimo
ToothbrushThreepwood wrote: ↑Sat Dec 12, 2020 5:13 pm
What would I have to change if I want to run this in a portable setting without wifi/LAN? E.g. running munt on a RPi next to the MiSTer, is there a way to connect MIDI between the two with cables/connectors?
You could also do it using a crossover network cable. This would connect the MiSTer's network port directly to the Raspberry Pi's network port. You would need to set up each device with a Static IP. Normally you would use 169.254.xyz.xyz with a subnet mask of 255.255.0.0. xyz can be any number from 1-254.
...but then your MiSTer isn't on your local network for updates or anything.
Re: Guide Setting up Remote MIDI Emulation (Midilink, Munt, Windows)
Posted: Thu Sep 09, 2021 12:16 am
by Shogun
I just have to say this is the coolest thing I've seen in a while. I am trying to explain how amazing it is to people that I am sending midi data over wifi and I'm just getting blank looks. Thanks for the guide!
Re: Guide Setting up Remote MIDI Emulation (Midilink, Munt, Windows)
Posted: Thu Sep 23, 2021 4:50 pm
by Shogun
Well it was neat for a bit but then I woke up one morning and UPMIDI.exe had a red "x" through the window. I was just leaving everything open on my computer so I thought maybe it just crashed but after that happened munt has stopped working. I tried running the tools munt provides to remove and reinstall everything, tried setting everything up again, and rebooting multiple times all to no avail. I don't get what happened it was working fine and then just stopped. I read around and it sounds like others have experienced similar instability with munt.
Screenshot of how everything is configured on my desktop and the ini file (confirmed the IP is correct):
- qZGtIn0.png (318.77 KiB) Viewed 14165 times
UART settings in AO486
- bHyB4NT.png (327.74 KiB) Viewed 14165 times
If anyone has seen this before or knows of something to try let me know.
Re: Guide Setting up Remote MIDI Emulation (Midilink, Munt, Windows)
Posted: Thu Sep 23, 2021 6:02 pm
by bbond007
The UDPMIDI app is not receiving any data, hence "Packets Received = 0"
This would suggest a networking problem, but it could be something else.
If you are using DHCP, Is it possible your IP was updated...
That has happed to me before, so now I use hostname (not IP).
I would first rule out networking problem by logging in via SSH and issuing the command:
ctrl-c to stop
If that is successful, I would suggest starting MidiLink manually via SSH to see if its having some other issue.
Code: Select all
uartmode 0
midilink BAUD 31520 UDP
Ideally (when MIDI is playing) you should see a stream of hex numbers like you are in the matrix
good luck!
Re: Guide Setting up Remote MIDI Emulation (Midilink, Munt, Windows)
Posted: Thu Sep 23, 2021 7:17 pm
by Shogun
Thanks for that. I was able to ping my IP and I ran the commands and can see the hex streaming. So everything is looking good functionality wise it looks like you said something network related. Is there anything else I can try?
- zUQt924.png (247.24 KiB) Viewed 14164 times
Code: Select all
MIDILINK_PRIORITY = -20
MUNT_OPTIONS =
MP3_VOLUME = -1
MUNT_VOLUME = -1
MODEM_VOLUME = -1
FSYNTH_VOLUME = -1
MIXER_CONTROL = Master
MUNT_ROM_PATH = /media/fat/linux/mt32-rom-data
FSYNTH_SOUNDFONT = /media/fat/linux/soundfonts/SC-55.sf2
UDP_SERVER = 192.168.0.170
UDP_SERVER_PORT = 1999
UDP_SERVER_FILTER = FALSE
UDP_FLOW = 0
TCP_SERVER_PORT = 23
TCP_TERM_UPLOAD = /media/fat/UPLOAD
TCP_TERM_DOWNLOAD = /media/fat
TCP_TERM_MP3 = /media/fat/MP3
TCP_TERM_MIDI = /media/fat/MIDI
TCP_TERM_SYNTH = FluidSynth
TCP_TERM_ROWS = 23
TCP_FLOW = 3
TCP_SOUND = TRUE
DELAYSYSEX = TRUE
#USB_SERIAL_MODULE = /media/fat/pl2303.ko
[AO486]
MIDI_BAUD = 31250
UDP_BAUD = 38400
#TCP_SOUND_CONNECT = /media/fat/SOUNDS/connect_sav.wav
Re: Guide Setting up Remote MIDI Emulation (Midilink, Munt, Windows)
Posted: Thu Sep 23, 2021 8:49 pm
by bbond007
Shogun wrote: ↑Thu Sep 23, 2021 7:17 pm
Thanks for that. I was able to ping my IP and I ran the commands and can see the hex streaming. So everything is looking good functionality wise it looks like you said something network related. Is there anything else I can try?
That output looks wrong...
You should not be getting
USOCK IN messages at all! UDPMIDI.EXE does not send anything.
And I also find it pretty suspicious that the
USOCK IN data exactly matches previous
USOCK OUT, almost like you have your MiSTer's IP set in the INI (UDP_SERVER) instead of your PC's IP
I think your MiSTer may be talking to itself...
Re: Guide Setting up Remote MIDI Emulation (Midilink, Munt, Windows)
Posted: Thu Sep 23, 2021 9:54 pm
by Shogun
I tell ya its always user error with these guys sheesh.
Thanks for the help I'm jamming out in full midi now!
Re: Guide Setting up Remote MIDI Emulation (Midilink, Munt, Windows)
Posted: Wed Oct 06, 2021 2:14 am
by bbond007
Shogun wrote: ↑Thu Sep 23, 2021 4:50 pm
Well it was neat for a bit but then I woke up one morning and UPMIDI.exe had a red "x" through the window.
Yes, then red "X" is caused usually by minimizing the window, or quite possibly computer lock screen has same effect.
Anyway, I did the original UDPMIDI.EXE in C# which was perhaps a bad choice as the MIDI API is using a lot of older (unmanaged) API's. As a result the code is pretty hacky.
The simpler approach is to redo the app in c/c++, so I have started to do that and have something working now and will make it available soon...
Re: Guide Setting up Remote MIDI Emulation (Midilink, Munt, Windows)
Posted: Mon Oct 18, 2021 8:21 pm
by bbond007
Re: Guide Setting up Remote MIDI Emulation (Midilink, Munt, Windows)
Posted: Sat Sep 07, 2024 6:14 pm
by MrDo
Is there an alternative to LoopMIDI?
Its always running in the background, despite choosing "Stop LoopMIDI" from the system tray icon. It prevents my PC from going to sleep, so had to uninstall it in the end.
Re: Guide Setting up Remote MIDI Emulation (Midilink, Munt, Windows)
Posted: Sat Sep 07, 2024 8:06 pm
by breiztiger