Guide Setting up Remote MIDI Emulation (Midilink, Munt, Windows)

Community created YouTube tutorials, interviews and helpful online information guides.
User avatar
jrronimo
Posts: 82
Joined: Sat Jul 04, 2020 6:03 pm
Has thanked: 39 times
Been thanked: 11 times

Guide Setting up Remote MIDI Emulation (Midilink, Munt, Windows)

Unread post 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.

  1. Get Tobias Erichsen's LoopMIDI from here

  2. Install it and run it.

  3. Once LoopMIDI opens, click the "+" at the bottom. It should add a line that says "loopMIDI Port"

  4. 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. 😆

  5. Run it

  6. 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.

  7. Download and install the Windows version of Munt, here

  8. Run it

  9. Select Options -> ROM Configuration and tell Munt where your CM-32L or MT-32 ROMs are.

  10. Click Tools -> New MIDI port...

  11. Select the line with "loopMIDI Port"

  12. You need to edit the /media/fat/linux/MidiLink.INI file on your MiSTer. I prefer the editor 'nano' for things like this.

  13. 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)

  14. Login with root/1

  15. Use the command: nano /media/fat/linux/MidiLink.INI

  16. Edit the line that says "UDP_SERVER" to have the IP address of your Windows computer

  17. 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!

flynnsbit
Top Contributor
Posts: 552
Joined: Sun May 24, 2020 8:07 pm
Has thanked: 185 times
Been thanked: 310 times
Contact:

Re: Guide Setting up Remote MIDI Emulation (Midilink, Munt, Windows)

Unread post by flynnsbit »

Thank you for this! I had MIDI on my list for this weekend.
User avatar
jrronimo
Posts: 82
Joined: Sat Jul 04, 2020 6:03 pm
Has thanked: 39 times
Been thanked: 11 times

Re: Guide Setting up Remote MIDI Emulation (Midilink, Munt, Windows)

Unread post 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. :D
JonnyTenebrous
Posts: 18
Joined: Tue May 26, 2020 11:27 am
Has thanked: 22 times
Been thanked: 4 times

Re: Guide Setting up Remote MIDI Emulation (Midilink, Munt, Windows)

Unread post 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!
User avatar
jrronimo
Posts: 82
Joined: Sat Jul 04, 2020 6:03 pm
Has thanked: 39 times
Been thanked: 11 times

Re: Guide Setting up Remote MIDI Emulation (Midilink, Munt, Windows)

Unread post 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. 🤣
User avatar
Caldor
Top Contributor
Posts: 930
Joined: Sat Jul 25, 2020 11:20 am
Has thanked: 112 times
Been thanked: 111 times

Re: Guide Setting up Remote MIDI Emulation (Midilink, Munt, Windows)

Unread post by Caldor »

I decided to make a video showing this.

https://youtu.be/jNTjbjOPMtI
ToothbrushThreepwood
Posts: 90
Joined: Sun May 24, 2020 8:39 pm
Has thanked: 32 times
Been thanked: 32 times

Re: Guide Setting up Remote MIDI Emulation (Midilink, Munt, Windows)

Unread post 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?
jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

Re: Guide Setting up Remote MIDI Emulation (Midilink, Munt, Windows)

Unread post 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
User avatar
jrronimo
Posts: 82
Joined: Sat Jul 04, 2020 6:03 pm
Has thanked: 39 times
Been thanked: 11 times

Re: Guide Setting up Remote MIDI Emulation (Midilink, Munt, Windows)

Unread post 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.
Shogun
Posts: 61
Joined: Wed Jun 24, 2020 7:41 pm
Location: Denver, CO
Has thanked: 29 times
Been thanked: 23 times

Re: Guide Setting up Remote MIDI Emulation (Midilink, Munt, Windows)

Unread post 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!
Shogun
Posts: 61
Joined: Wed Jun 24, 2020 7:41 pm
Location: Denver, CO
Has thanked: 29 times
Been thanked: 23 times

Re: Guide Setting up Remote MIDI Emulation (Midilink, Munt, Windows)

Unread post 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
qZGtIn0.png (318.77 KiB) Viewed 14163 times

UART settings in AO486

bHyB4NT.png
bHyB4NT.png (327.74 KiB) Viewed 14163 times

If anyone has seen this before or knows of something to try let me know.
bbond007
Top Contributor
Posts: 531
Joined: Tue May 26, 2020 5:06 am
Has thanked: 87 times
Been thanked: 211 times

Re: Guide Setting up Remote MIDI Emulation (Midilink, Munt, Windows)

Unread post 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:

Code: Select all

ping 192.168.0.170
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!
Shogun
Posts: 61
Joined: Wed Jun 24, 2020 7:41 pm
Location: Denver, CO
Has thanked: 29 times
Been thanked: 23 times

Re: Guide Setting up Remote MIDI Emulation (Midilink, Munt, Windows)

Unread post 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
zUQt924.png (247.24 KiB) Viewed 14162 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
bbond007
Top Contributor
Posts: 531
Joined: Tue May 26, 2020 5:06 am
Has thanked: 87 times
Been thanked: 211 times

Re: Guide Setting up Remote MIDI Emulation (Midilink, Munt, Windows)

Unread post 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...
Shogun
Posts: 61
Joined: Wed Jun 24, 2020 7:41 pm
Location: Denver, CO
Has thanked: 29 times
Been thanked: 23 times

Re: Guide Setting up Remote MIDI Emulation (Midilink, Munt, Windows)

Unread post by Shogun »

I tell ya its always user error with these guys sheesh. :lol:

Thanks for the help I'm jamming out in full midi now!
bbond007
Top Contributor
Posts: 531
Joined: Tue May 26, 2020 5:06 am
Has thanked: 87 times
Been thanked: 211 times

Re: Guide Setting up Remote MIDI Emulation (Midilink, Munt, Windows)

Unread post 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...
bbond007
Top Contributor
Posts: 531
Joined: Tue May 26, 2020 5:06 am
Has thanked: 87 times
Been thanked: 211 times

Re: Guide Setting up Remote MIDI Emulation (Midilink, Munt, Windows)

Unread post by bbond007 »

MrDo
Posts: 22
Joined: Fri Jan 21, 2022 5:08 pm
Has thanked: 4 times
Been thanked: 1 time

Re: Guide Setting up Remote MIDI Emulation (Midilink, Munt, Windows)

Unread post 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.

breiztiger
Top Contributor
Posts: 468
Joined: Sun May 24, 2020 7:17 pm
Has thanked: 35 times
Been thanked: 99 times

Re: Guide Setting up Remote MIDI Emulation (Midilink, Munt, Windows)

Unread post by breiztiger »

CPC-Power Staff
Post Reply