MiSTer MidiLink

Kernel, Main, Utilities & Applications, Miscellaneous Devices.
bbond007
Top Contributor
Posts: 531
Joined: Tue May 26, 2020 5:06 am
Has thanked: 87 times
Been thanked: 211 times

MiSTer MidiLink

Unread post by bbond007 »

MidiLink Remote/UDP with Raspberry Pi:

(In response to --> viewtopic.php?p=1701#p1701)

Purpose:
To use Raspberry Pi as an external UDP MIDI device running Munt (or FluidSynth). --> https://youtu.be/4bIEVzRiq0I

Why? The HPS/ARM is on the low-end as far as performance for Munt and can exhibit tempo issues. In my testing performance in RaspBerry Pi 3 (Model B) is still not 100% perfect, but still more consistent (tempo wise) than local Munt. A 3amp PSU (with no in-line switch), active cooling (and perhaps overclock) definitely would help!

Required files NOT included:
  • CM32L_CONTROL.ROM
  • CM32L_PCM.ROM
Or (less desirable):
  • MT32_CONTROL.ROM
  • MT32_PCM.ROM
Optional (for FluidSynth): I preformed this setup on a Raspberry Pi 3 (Model B) with HiFiBerry DAC hat running RetroPie. The setup process might be slightly different for other Linux distros (such as Soulja Boy Linux). This guide also assumes that user "pi" exist.

HiFiBerry is not a requirement but the analog audio on the RPi is kind of noisy. It would also be possible to use a USB DAC for better quality - perhaps even one with line-in audio mixing.

Copy
midilink.tar.gz
(107.85 KiB) Downloaded 764 times
to RetroPie "roms" samba share.

Log in as "pi" (default passwd "raspberry")
Extract "midilink.tar.gz" to "/home/pi":

Code: Select all

#cd /home/pi
#tar -xvzf RetroPie/roms/midilink.tar.gz
Copy CM-32L ROMS to RetroPie "roms" samba share.
Install Munt ROMS on RPi:

Code: Select all

#cd /home/pi
#mv RetroPie/roms/CM32L_*.ROM /home/pi/mt32-rom-data/
Move included "mt32d" (Munt ALSA daemon) somewhere in the path - such as "/usr/bin":

Code: Select all

#sudo mv /home/pi/mt32d /usr/bin
Start MidiLink (Munt) on the RPi:

Code: Select all

#cd /home/pi
#sudo ./midilink UDPMUNT 
or (to suppress debug data) 
#sudo ./midilink UDPMUNT QUIET
*** While it's not completely necessary to run MidiLink as root (sudo), it will attempt to elevate its task priority (and that of Munt/FluidSunth) which may help performance. The included "mt32d" bin has been compiled with optimizations for the RPi 3 --> https://retropie.org.uk/forum/topic/125 ... n-on-rpi-3.
The source code RPi Midilink is unchanged from the MiSTer source --> https://github.com/MiSTer-devel/MidiLink_MiSTer ***

Optional FluidSynth install or skip to "MiSTer Configuration:"

Although FluidSynth on the HPS/ARM runs very well, running it on a Raspberry PI allows for much larger soundfonts (for example --> https://www.hedsound.com/2019/06/mt32-c ... ryone.html)
Ultima VI (Intro) with Hedsound MT-32/CM-64 SoundFont --> https://youtu.be/G8rvyhKOXmY

Installing FluidSynth:

Code: Select all

#sudo apt-get install fluidsynth
Copy "SC-55.sf2" to RetroPie "roms" share:
Install (FluidSynth) SoundFont:

Code: Select all

#cd /home/pi
#mv RetroPie/roms/SC-55.sf2 soundfonts/ 
If you use a different SoundFont (from SC-55.sf2) then you'll need to edit the included "/home/pi/MidiLink.INI"

Code: Select all

FSYNTH_SOUNDFONT = /home/pi/soundfonts/MT-32-32K-v1-r65-Full-Hedsound.sf2
Start MidiLink (FluidSunth) on the RPi:

Code: Select all

#cd /home/pi
#sudo ./midilink UDPFSYNTH 
or (to suppress debug data) 
#sudo ./midilink UDPFSYNTH QUIET
MiSTer Configuration:

Edit "/media/fat/linux/MidiLink.INI"

Code: Select all

UDP_SERVER = Hostname or IP address of Raspberry Pi.
MiSTer OSD Configuration:
  • Connection : MIDI
  • MidiLink : Remote
  • Type : UDP
I hope this helps... :ugeek:
User avatar
zomgugoff
Posts: 33
Joined: Sun May 24, 2020 8:54 pm

Re: MiSTer MidiLink

Unread post by zomgugoff »

Can something be done to prevent the INI from being overwritten after an update?
bbond007
Top Contributor
Posts: 531
Joined: Tue May 26, 2020 5:06 am
Has thanked: 87 times
Been thanked: 211 times

Re: MiSTer MidiLink

Unread post by bbond007 »

zomgugoff wrote: Sun Jun 07, 2020 7:17 am Can something be done to prevent the INI from being overwritten after an update?
How are you updating?

SD card utility or updater script?

I don't think the updater script updates it, but maybe I just don't notice?

If you are using then SD card utility then that probably is the expected behavior.

If it is the updater script then it might be a question for @Locutus73 --> viewtopic.php?f=27&t=175

Hope that helps...
User avatar
JeanFred64
Posts: 6
Joined: Sun May 24, 2020 9:23 pm

Re: MiSTer MidiLink

Unread post by JeanFred64 »

bbond007 wrote: Sun Jun 07, 2020 1:11 am MidiLink Remote/UDP with Raspberry Pi:
...
I hope this helps... :ugeek:
Thanks bbond007 for this guide

confirmed ... that's help :D
User avatar
zomgugoff
Posts: 33
Joined: Sun May 24, 2020 8:54 pm

Re: MiSTer MidiLink

Unread post by zomgugoff »

bbond007 wrote: Sun Jun 07, 2020 7:37 am
How are you updating?

SD card utility or updater script?

I don't think the updater script updates it, but maybe I just don't notice?

If you are using then SD card utility then that probably is the expected behavior.

If it is the updater script then it might be a question for @Locutus73 --> viewtopic.php?f=27&t=175

Hope that helps...
The updater script replaces it without backup. I'll have to ask Locutus72 about doing something to avoid it.

Also, would a stock RPi4 be able to keep up with MUNT/FluidSynth?
bbond007
Top Contributor
Posts: 531
Joined: Tue May 26, 2020 5:06 am
Has thanked: 87 times
Been thanked: 211 times

Re: MiSTer MidiLink

Unread post by bbond007 »

zomgugoff wrote: Mon Jun 08, 2020 2:49 pm Also, would a stock RPi4 be able to keep up with MUNT/FluidSynth?
FluidSynth is not demanding at all and works great on the HPS/ARM. Running it on the RPi4 would just allow for using larger SoundFonts.

I don't have a RPi4 to test. The only thing I know for sure that keeps up with Munt 100% is an x86 PC.
Locutus73
Core Developer
Posts: 51
Joined: Mon May 25, 2020 9:55 am
Has thanked: 1 time
Been thanked: 8 times

Re: MiSTer MidiLink

Unread post by Locutus73 »

zomgugoff wrote: Mon Jun 08, 2020 2:49 pm The updater script replaces it without backup. I'll have to ask Locutus72 about doing something to avoid it.
What does get updated? MidiLink.INI?
If so, I think it happens when Linux is updated, since it comes with the linux dir in the SDInstaller rar.
Maybe I could prevent it to be extracted along with ppp_options and maybe _samba.sh.
Any suggestion?

Regards.

Locutus73
User avatar
zomgugoff
Posts: 33
Joined: Sun May 24, 2020 8:54 pm

Re: MiSTer MidiLink

Unread post by zomgugoff »

Locutus73 wrote: Tue Jun 09, 2020 7:43 am
What does get updated? MidiLink.INI?
If so, I think it happens when Linux is updated, since it comes with the linux dir in the SDInstaller rar.
Maybe I could prevent it to be extracted along with ppp_options and maybe _samba.sh.
Any suggestion?

Regards.

Locutus73
I would go with changing the filename to include 'default' or something, so midilink.ini is never overwritten. Make it the user's responsibility to make a copy/rename the file to midilink.ini on first setup/update. That way, the 'default' file is always up to date after an update and the user can check for changes to make in their existing midilink.ini.
bigern77
Posts: 11
Joined: Sun Jul 12, 2020 8:50 pm
Has thanked: 3 times
Been thanked: 4 times

Re: MiSTer MidiLink

Unread post by bigern77 »

I'm experiencing tempo issues (music seems like it struggles to keep up) using Midilink UDP in ao486 with SoftMPU. Edit: I mostly fixed it, see below.

"Munt" running on: Win 10 laptop with an Intel Atom CPU @2.2 Ghz. (Specifically: Munt VSTI plugin running in Falcosoft Midi player.) MT-32 rom.
Games tested: Space Quest III and IV.

I set the priority of both Munt and UDPMidi processes in Win10 to 'high'.

Update:
The problem is about 95% gone simply by plugging in my laptop. I guess my CPU was being throttled by power management. I don't really understand how, as Windows task manager showed ~2.2 Ghz during playback when unplugged and the same Ghz during playback when plugged in. Maybe Intel speedstep is too eager. Either way, the music sounds very good now. Like I said, it's about 95% fixed; every so often, say every 1 minute, the music struggles to keep up or skips a note, but it's really quite slight and barely noticeable. I notice it because I have heard these songs thousands of times. :) Note: I have not yet reduced the priority and retested, so I don't know if that's helping or not.

On a side note, would the UDP flow control option in the MidiLink.cfg have any effect on this phenomenon?

-Derrick Reed from YouTube
bbond007
Top Contributor
Posts: 531
Joined: Tue May 26, 2020 5:06 am
Has thanked: 87 times
Been thanked: 211 times

Re: MiSTer MidiLink

Unread post by bbond007 »

bigern77 wrote: Mon Jul 13, 2020 2:56 am On a side note, would the UDP flow control option in the MidiLink.cfg have any effect on this phenomenon?
No, MIDI does not use any sort of flow control so the setting will not help.

Maybe try and use UDPMIDI.EXE --> Loop-MIDI --> MUNT (without VSTI plugin & Falcosoft Midi player) and see if that works any better...

I remember that setup working well on my cheap Atom windows 10 tablet/netbook, but unfortunately that device is no longer working (won't charge) so I can't confirm.
bigern77
Posts: 11
Joined: Sun Jul 12, 2020 8:50 pm
Has thanked: 3 times
Been thanked: 4 times

Re: MiSTer MidiLink

Unread post by bigern77 »

I switched from the VSTI plugin to just plain MUNT. Pretty much the same thing. A slowdown once or twice a minute. Still overall a good experience.
bbond007
Top Contributor
Posts: 531
Joined: Tue May 26, 2020 5:06 am
Has thanked: 87 times
Been thanked: 211 times

Re: MiSTer MidiLink

Unread post by bbond007 »

zomgugoff wrote: Mon Jun 08, 2020 2:49 pm Also, would a stock RPi4 be able to keep up with MUNT/FluidSynth?
RPi4 sounds pretty good!

I think RPi3 can maybe do OK as well.

My RPi3 I was testing with gets that little lightning bolt symbol indicating insufficient power even though I use adapters with 3amp.
Maybe it is defective :(

Keep in Mind, that ANY RPi solution is going to need some sort of external DAC unless you use HDMI for sound unless you want it to sound like FM radio..

Here is a comparison with my new RPi4 (MUNT) with My Roland old Roland MT-32 Rev0 --> https://youtu.be/6w8iJJ2MPL0

The LCD is a inexpensive 20x4 IC2. It looks excellent in person but apparently very difficult to video.

Let me know if there are comparisons of other games I can do now that I have everything set up to do so...
User avatar
MickGyver
Posts: 13
Joined: Sun May 24, 2020 6:59 pm

Re: MiSTer MidiLink

Unread post by MickGyver »

bbond007 wrote: Sun Aug 09, 2020 1:25 am RPi4 sounds pretty good!

I think RPi3 can maybe do OK as well.

My RPi3 I was testing with gets that little lightning bolt symbol indicating insufficient power even though I use adapters with 3amp.
Maybe it is defective :(

Keep in Mind, that ANY RPi solution is going to need some sort of external DAC unless you use HDMI for sound unless you want it to sound like FM radio..

Here is a comparison with my new RPi4 (MUNT) with My Roland old Roland MT-32 Rev0 --> https://youtu.be/6w8iJJ2MPL0

The LCD is a inexpensive 20x4 IC2. It looks excellent in person but apparently very difficult to video.

Let me know if there are comparisons of other games I can do now that I have everything set up to do so...
Nice! Any instructions how to build a RPI4 Munt like yours with the LCD etc.?
bbond007
Top Contributor
Posts: 531
Joined: Tue May 26, 2020 5:06 am
Has thanked: 87 times
Been thanked: 211 times

Re: MiSTer MidiLink

Unread post by bbond007 »

MickGyver wrote: Sun Aug 09, 2020 7:58 am Nice! Any instructions how to build a RPI4 Munt like yours with the LCD etc.?
There is really nothing difficult about interfacing the LCD... just 4 wires 3.3v, SDA1, SCL1 & ground.

I'll put my LCD driver/menu on github soon...

My LCD driver is actually a MIDI device (although a silent one) just like fluidsynth or mt32d.

Unfortunately, it currently only works with KB, and I'm thinking about alternatives such as IR remote or just buttons on GPIO pins.

MT-32 Rev0 or RPi4? --> https://youtu.be/OJDI_XB2y1A
yavimaya
Posts: 8
Joined: Sun May 24, 2020 8:37 pm
Been thanked: 1 time

Re: MiSTer MidiLink

Unread post by yavimaya »

I'm using your tutorial to use MUNT on MIDILINK by UPD and also UDA dac with this tutorial https://learn.adafruit.com/adafruit-i2s ... y-pi-usage, and worked GREAT!!!

But desired to use ES9018K2M dac also with i2c oled display SSD1306. Do you know any tips to achieve that?

Thank you :)
User avatar
zomgugoff
Posts: 33
Joined: Sun May 24, 2020 8:54 pm

Re: MiSTer MidiLink

Unread post by zomgugoff »

Are there any settings or files that could break PPP mode? It doesn't work on ao486 or Minimig now.
bbond007
Top Contributor
Posts: 531
Joined: Tue May 26, 2020 5:06 am
Has thanked: 87 times
Been thanked: 211 times

Re: MiSTer MidiLink

Unread post by bbond007 »

zomgugoff wrote: Wed Aug 12, 2020 3:07 am Are there any settings or files that could break PPP mode? It doesn't work on ao486 or Minimig now.
There are no MidiLink.INI settings which could break PPP as they are unrelated.
User avatar
zomgugoff
Posts: 33
Joined: Sun May 24, 2020 8:54 pm

Re: MiSTer MidiLink

Unread post by zomgugoff »

bbond007 wrote: Wed Aug 12, 2020 11:15 pm
zomgugoff wrote: Wed Aug 12, 2020 3:07 am Are there any settings or files that could break PPP mode? It doesn't work on ao486 or Minimig now.
There are no MidiLink.INI settings which could break PPP as they are unrelated.
I'm going to go ahead and just list the problem I found.

I have both a wifi dongle and a cabled network connection. After unplugging one or the other, PPP started working. It appears the presence of 2 IPs is causing a problem with PPP.
rhester72
Top Contributor
Posts: 1321
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 15 times
Been thanked: 213 times

Re: MiSTer MidiLink

Unread post by rhester72 »

I think what you mean to say is 'breaks networks horribly in general'. That's not a MiSTer problem.
Inspector77
Posts: 13
Joined: Tue Dec 29, 2020 6:24 pm

Re: MiSTer MidiLink

Unread post by Inspector77 »

Hello, currently the midilink driver does not transmit or receive Midi time Clock (MTC) or Midiclock, to synchronize the MISTer with external sequencers or musical devices, is it possible to enable this option?

In my Linux computer i use the virmidi modules “This module makes it possible to route midi data from apps that insist on using hw midi ports only. The virmidi module creates a virtual soundcard which only has 4 seq devices.”

thanks
duhproject
Posts: 7
Joined: Sat Jan 02, 2021 5:43 pm

Re: MiSTer MidiLink

Unread post by duhproject »

Hello!

I am having issue on my MiSter with the virtual modem on MIDI / REMOTE / TCP.

I've been using this since it was created and even tested early versions, so I felt like I knew my way around. But I decided recently to update everything on my MiSTer. Linux files, BOOT files, all cores, etc. All cores work great! However, MIDILINK virtual modem only works in the c64 more. I use the Minimig and ao486 cores all the time to connect to BBSs, but they no longer work.

Symptoms:
Only BAUD rate in OSD showing is 31250.
No AT commands respond using ANY baud rate in the core. My MIDILINK.INI sets 9600 for TCP_BAUD in ao486 and MINIMIG. I tried 38400 to match 31250 when shifted up and still no dice.
My MIDILINK.INI sets the c64 core for TCP_BAUD 2400 and it works perfectly fine.

Any ideas? I have been troubleshooting this for a couple hours now and can't figure out what I'm doing wrong.

Thanks!!!
duhproject
Posts: 7
Joined: Sat Jan 02, 2021 5:43 pm

Re: MiSTer MidiLink

Unread post by duhproject »

As an update, I just built a brand new sd card from scratch, and ao486 and minimig are showing the exact behavior and not working. So weird!
jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

Re: MiSTer MidiLink

Unread post by jca »

duhproject
Posts: 7
Joined: Sat Jan 02, 2021 5:43 pm

Re: MiSTer MidiLink

Unread post by duhproject »

Thank you!
User avatar
Alkadian
Top Contributor
Posts: 728
Joined: Thu May 28, 2020 9:55 am
Has thanked: 294 times
Been thanked: 119 times

Re: MiSTer MidiLink

Unread post by Alkadian »

Hi guys,

I have been playing with it for the last few days but I have reached the point where I honestly don't know I am doing wrong. I am sure I am missing the obvious but I can't figure it out.

I have followed the instructions kindly provided by @bbond007 both on raspberry pi 3 and on a raspberry pi 4 by following the installation steps to compile an optimised Munt version for the rpi4, as per the link provided again by @bbond007.

But both on the RPI's I cannot get it to work.

For example if I try to play Space Quest 3 with the Atari ST core, it gets stuck at the line 'LCD: MiSTer MidiLink! BB7' and nothing happens, no music at all through my speakers. Please refer to the full command lines below when mt32d is running:

Code: Select all

pi@raspberrypi:~ $ sudo ./midilink UDPMUNT QUIET

MiSTer MidiLink 2.9d BB7
ERROR: misc_get_core_name() : Unable to open --> '/tmp/CORENAME'
CORE --> ''
Checking for --> '/media/fat/linux/MidiLink.INI' : FALSE
Checking for --> 'MidiLink.INI' : TRUE
Settings:
  - MIDILINK_PRIORITY  --> -20
  - MUNT_OPTIONS       --> ''
  - MUNT_ROM_PATH      --> '/home/pi/mt32-rom-data'
  - MP3_VOLUME         --> Default (don't set)
  - MUNT_VOLUME        --> Default (don't set)
  - MUNT_CPU_MASK      --> 255
  - FSYNTH_CPU_MASK    --> 255
  - FSYNTH_VOLUME      --> Default (don't set)
  - MODEM_VOLUME       --> Default (don't set)
  - MIXER_CONTROL      --> Master
  - FSYNTH_SOUNTFONT   --> '/home/pi/soundfonts/SC-55.sf2'
  - UDP_SERVER         --> ''
  - UDP_SERVER_PORT    --> 1999
  - UDP_BAUD           --> Default (don't change)
  - UDP_BAUD_ALT       --> Undefined
  - MIDI_BAUD          --> Default (don't change)
  - UDP_SERVER_FILTER  --> FALSE
  - UDP_FLOW           --> (0) Diasble Flow-control
  - TCP_BAUD           --> Default (don't change)
  - TCP_BAUD_ALT       --> Default (don't change)
  - MIDI_BAUD          --> Default (don't change)
  - UDP_SERVER_FILTER  --> FALSE
  - UDP_FLOW           --> (0) Diasble Flow-control
  - TCP_BAUD           --> Default (don't change)
  - TCP_BAUD_ALT       --> Default (don't change)
  - TCP_DTR            --> (1) Normal
  - TCP_QUIET          --> (0) Normal
  - TCP_FLOW           --> Default (don't change)
  - TCP_ATH_DELAY      --> 900
  - TCP_SERVER_PORT    --> 23
  - TCP_TERM_ROWS      --> 22
  - 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_TRANS     --> NONE
  - TCP_SOUND          --> TRUE
  - TCP_SOUND_DIAL     --> Software
  - TCP_SOUND_RING     --> Software
  - TCP_SOUND_CONNECT  --> Software
  - USB_SERIAL_BAUD    --> Default (don't change)
  - USB_SERIAL_MODULE  --> ''
  - DELAYSYSEX         --> FALSE
  - MT32_LCD_MSG       --> 'MiSTer MidiLink! BB7'

Setting task priority --> -20
Checking for --> '/dev/midi1' : FALSE
Killing --> mpg123
Killing --> aplaymidi
Killing --> fluidsynth
Killing --> mt32d
Checking for --> '/dev/snd/pcmC0D0p' : TRUE
Starting --> mt32d : CPUMASK = 255
MT-32 emulator ALSA address is 128:0
Buffer resize: Requested 40 msec got 40 msec / 60 periods 
Set thread priority to -20
Set thread priority to -20
Starting MT-32 core
MT-32 emulator ready
Opening ALSA address --> 128:0
QUIET mode emabled.
Socket Listener created on port 1999.
UDP Socket input thread(2) created.
QUIET mode emabled.
Starting --> UDP Synth loop :)
LCD: MiSTer MidiLink! BB7
If I try to play The Secrets of Monkey Island with the AO486 core, I can hear sort of crackling noise through the speakers and I can see a few error messages coming through. Please refer to the full command lines below when mt32d is running:

Code: Select all

pi@raspberrypi:~ $ sudo ./midilink UDPMUNT QUIET

MiSTer MidiLink 2.9d BB7
ERROR: misc_get_core_name() : Unable to open --> '/tmp/CORENAME'
CORE --> ''
Checking for --> '/media/fat/linux/MidiLink.INI' : FALSE
Checking for --> 'MidiLink.INI' : TRUE
Settings:
  - MIDILINK_PRIORITY  --> -20
  - MUNT_OPTIONS       --> ''
  - MUNT_ROM_PATH      --> '/home/pi/mt32-rom-data'
  - MP3_VOLUME         --> Default (don't set)
  - MUNT_VOLUME        --> Default (don't set)
  - MUNT_CPU_MASK      --> 255
  - FSYNTH_CPU_MASK    --> 255
  - FSYNTH_VOLUME      --> Default (don't set)
  - MODEM_VOLUME       --> Default (don't set)
  - MIXER_CONTROL      --> Master
  - FSYNTH_SOUNTFONT   --> '/home/pi/soundfonts/SC-55.sf2'
  - UDP_SERVER         --> ''
  - UDP_SERVER_PORT    --> 1999
  - UDP_BAUD           --> Default (don't change)
  - UDP_BAUD_ALT       --> Undefined
  - MIDI_BAUD          --> Default (don't change)
  - UDP_SERVER_FILTER  --> FALSE
  - UDP_FLOW           --> (0) Diasble Flow-control
  - TCP_BAUD           --> Default (don't change)
  - TCP_BAUD_ALT       --> Default (don't change)
  - MIDI_BAUD          --> Default (don't change)
  - UDP_SERVER_FILTER  --> FALSE
  - UDP_FLOW           --> (0) Diasble Flow-control
  - TCP_BAUD           --> Default (don't change)
  - TCP_BAUD_ALT       --> Default (don't change)
  - TCP_DTR            --> (1) Normal
  - TCP_QUIET          --> (0) Normal
  - TCP_FLOW           --> Default (don't change)
  - TCP_ATH_DELAY      --> 900
  - TCP_SERVER_PORT    --> 23
  - TCP_TERM_ROWS      --> 22
  - 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_TRANS     --> NONE
  - TCP_SOUND          --> TRUE
  - TCP_SOUND_DIAL     --> Software
  - TCP_SOUND_RING     --> Software
  - TCP_SOUND_CONNECT  --> Software
  - USB_SERIAL_BAUD    --> Default (don't change)
  - USB_SERIAL_MODULE  --> ''
  - DELAYSYSEX         --> FALSE
  - MT32_LCD_MSG       --> 'MiSTer MidiLink! BB7'

Setting task priority --> -20
Checking for --> '/dev/midi1' : FALSE
Killing --> mpg123
Killing --> aplaymidi
Killing --> fluidsynth
Killing --> mt32d
Checking for --> '/dev/snd/pcmC0D0p' : TRUE
Starting --> mt32d : CPUMASK = 255
MT-32 emulator ALSA address is 128:0
Buffer resize: Requested 40 msec got 40 msec / 60 periods 
Set thread priority to -20
Set thread priority to -20
Starting MT-32 core
MT-32 emulator ready
Opening ALSA address --> 128:0
QUIET mode emabled.
Socket Listener created on port 1999.
UDP Socket input thread(2) created.
QUIET mode emabled.
Starting --> UDP Synth loop :)
LCD: MiSTer MidiLink! BB7
playSysexWithoutFraming: Message is too short (2 bytes)!
Rhythm: Attempted to play unmapped key 26 (velocity 46)
Rhythm: Attempted to play unmapped key 58 (velocity 24)
Rhythm: Attempted to play unmapped key 26 (velocity 46)
Rhythm: Attempted to play unmapped key 98 (velocity 14)
Just to confirm my MiSTer OSD Configuration:

Connection : MIDI
MidiLink : Remote
Type : UDP

I would really appreciate any help/assistance!

Thanks a lot!
bbond007
Top Contributor
Posts: 531
Joined: Tue May 26, 2020 5:06 am
Has thanked: 87 times
Been thanked: 211 times

Re: MiSTer MidiLink

Unread post by bbond007 »

Alkadian wrote: Sun Jan 24, 2021 10:23 am
Just to confirm my MiSTer OSD Configuration:

Connection : MIDI
MidiLink : Remote
Type : UDP

I would really appreciate any help/assistance!

Thanks a lot!
Everything looks good from your output..

I thing the problem is with Monkey Island config.

Just for a simple basic test, maybe try --> http://dosmid.sourceforge.net/

Also maybe try Monkey Island version included in "eXoFlynn Top 300 DOS Pack" --> viewtopic.php?f=13&t=1531

That one works very well with MIDI for me.

Also make sure your MiSTer is updated to the latest. There have been some recent changes to ao486 UART that make SoftMPU less necessary.
User avatar
Mellified
Posts: 145
Joined: Sat Aug 22, 2020 8:38 pm
Been thanked: 51 times

Re: MiSTer MidiLink

Unread post by Mellified »

Alkadian wrote: Sun Jan 24, 2021 10:23 am I would really appreciate any help/assistance!
When I was getting my actual MT-32 and SC-55 working with the ao486 mode I found it helpful to have bbond007s ScummVM software (script? core? psuedo-core?) running. This let me test things in MiSTer Linux absent the core settings.
User avatar
Alkadian
Top Contributor
Posts: 728
Joined: Thu May 28, 2020 9:55 am
Has thanked: 294 times
Been thanked: 119 times

Re: MiSTer MidiLink

Unread post by Alkadian »

bbond007 wrote: Mon Jan 25, 2021 3:27 am
Alkadian wrote: Sun Jan 24, 2021 10:23 am
Just to confirm my MiSTer OSD Configuration:

Connection : MIDI
MidiLink : Remote
Type : UDP

I would really appreciate any help/assistance!

Thanks a lot!
Everything looks good from your output..

I thing the problem is with Monkey Island config.

Just for a simple basic test, maybe try --> http://dosmid.sourceforge.net/

Also maybe try Monkey Island version included in "eXoFlynn Top 300 DOS Pack" --> viewtopic.php?f=13&t=1531

That one works very well with MIDI for me.

Also make sure your MiSTer is updated to the latest. There have been some recent changes to ao486 UART that make SoftMPU less necessary.
@bbond007,

Many thanks for getting back to me!
Please refer to my answers below:

1. I can confirm that I have used the Monkey Island version included in "eXoFlynn Top 300 DOS Pack". In fact I have tried all the 8 possible configurations as per the attached screenshot.

2. Yes, I am using the latest Mister v210109.

3. I have also tried DOSMid. Actually I do love it, thanks for suggesting it.Anyway, I have played a few midi files but again I can only hear some cracking noise through the speakers and the usual lines:

Code: Select all

pi@retropie:~ $ sudo ./midilink UDPMUNT QUIET

MiSTer MidiLink 2.9d BB7
ERROR: misc_get_core_name() : Unable to open --> '/tmp/CORENAME'
CORE --> ''
Checking for --> '/media/fat/linux/MidiLink.INI' : FALSE
Checking for --> 'MidiLink.INI' : TRUE
Settings:
  - MIDILINK_PRIORITY  --> -20
  - MUNT_OPTIONS       --> ''
  - MUNT_ROM_PATH      --> '/home/pi/mt32-rom-data'
  - MP3_VOLUME         --> Default (don't set)
  - MUNT_VOLUME        --> Default (don't set)
  - MUNT_CPU_MASK      --> 255
  - FSYNTH_CPU_MASK    --> 255
  - FSYNTH_VOLUME      --> Default (don't set)
  - MODEM_VOLUME       --> Default (don't set)
  - MIXER_CONTROL      --> Master
  - FSYNTH_SOUNTFONT   --> '/home/pi/soundfonts/SC-55.sf2'
  - UDP_SERVER         --> ''
  - UDP_SERVER_PORT    --> 1999
  - UDP_BAUD           --> Default (don't change)
  - UDP_BAUD_ALT       --> Undefined
  - MIDI_BAUD          --> Default (don't change)
  - UDP_SERVER_FILTER  --> FALSE
  - UDP_FLOW           --> (0) Diasble Flow-control
  - TCP_BAUD           --> Default (don't change)
  - TCP_BAUD_ALT       --> Default (don't change)
  - MIDI_BAUD          --> Default (don't change)
  - UDP_SERVER_FILTER  --> FALSE
  - UDP_FLOW           --> (0) Diasble Flow-control
  - TCP_BAUD           --> Default (don't change)
  - TCP_BAUD_ALT       --> Default (don't change)
  - TCP_DTR            --> (1) Normal
  - TCP_QUIET          --> (0) Normal
  - TCP_FLOW           --> Default (don't change)
  - TCP_ATH_DELAY      --> 900
  - TCP_SERVER_PORT    --> 23
  - TCP_TERM_ROWS      --> 22
  - 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_TRANS     --> NONE
  - TCP_SOUND          --> TRUE
  - TCP_SOUND_DIAL     --> Software
  - TCP_SOUND_RING     --> Software
  - TCP_SOUND_CONNECT  --> Software
  - USB_SERIAL_BAUD    --> Default (don't change)
  - USB_SERIAL_MODULE  --> ''
  - DELAYSYSEX         --> FALSE
  - MT32_LCD_MSG       --> 'MiSTer MidiLink! BB7'

Setting task priority --> -20
Checking for --> '/dev/midi1' : FALSE
Killing --> mpg123
Killing --> aplaymidi
Killing --> fluidsynth
Killing --> mt32d
Checking for --> '/dev/snd/pcmC0D0p' : TRUE
Starting --> mt32d : CPUMASK = 255
MT-32 emulator ALSA address is 128:0
Buffer resize: Requested 40 msec got 40 msec / 60 periods 
Set thread priority to -20
Set thread priority to -20
Starting MT-32 core
MT-32 emulator ready
Opening ALSA address --> 128:0
QUIET mode emabled.
Socket Listener created on port 1999.
UDP Socket input thread(2) created.
QUIET mode emabled.
Starting --> UDP Synth loop :)
LCD: MiSTer MidiLink! BB7
Rhythm: Attempted to play invalid key 9 (velocity 49)
Rhythm: Attempted to play invalid key 22 (velocity 49)
Rhythm: Attempted to play unmapped key 24 (velocity 9)
cplaySysexWithoutFraming: Message is too short (1 bytes)!
I have tried to recompile Munt from scratch both on my raspberry pi 3 and 4 by following the links provided in the first posts but to no avail.

Due to my limited knowledge I can't think of anything else!

I am lost :mrgreen:
Attachments
20210125_230447-screen.png
20210125_230447-screen.png (4.79 KiB) Viewed 48621 times
20210125_210331-screen.png
20210125_210331-screen.png (5.41 KiB) Viewed 48626 times
bbond007
Top Contributor
Posts: 531
Joined: Tue May 26, 2020 5:06 am
Has thanked: 87 times
Been thanked: 211 times

Re: MiSTer MidiLink

Unread post by bbond007 »

Alkadian wrote: Mon Jan 25, 2021 10:59 pm I have tried to recompile Munt from scratch both on my raspberry pi 3 and 4 by following the links provided in the first posts but to no avail.
I believe the mt32d I included was compiled with optimizations for RPi3.
Alkadian wrote: Mon Jan 25, 2021 10:59 pm 1. I can confirm that I have used the Monkey Island version included in "eXoFlynn Top 300 DOS Pack". In fact I have tried all the 8 possible configurations as per the attached screenshot.

2. Yes, I am using the latest Mister v210109.

3. I have also tried DOSMid. Actually I do love it, thanks for suggesting it.Anyway, I have played a few midi files but again I can only hear some cracking noise through the speakers and the usual lines:
Maybe its a BAUD rate issue:

Check "/media/fat/linux/MidiLink.INI"

and change

Code: Select all

UDP_BAUD = 31250
it used to need to be set to 38400 for ao486 but now 31250 is the correct setting.
User avatar
Alkadian
Top Contributor
Posts: 728
Joined: Thu May 28, 2020 9:55 am
Has thanked: 294 times
Been thanked: 119 times

Re: MiSTer MidiLink

Unread post by Alkadian »

bbond007 wrote: Mon Jan 25, 2021 11:23 pm Maybe its a BAUD rate issue:

Check "/media/fat/linux/MidiLink.INI"

and change

Code: Select all

UDP_BAUD = 31250
it used to need to be set to 38400 for ao486 but now 31250 is the correct setting.

You may also want to copy the "/sbin/midilink" from your MiSTer to your RPi. the "2.9d" version may have a bug were very large sysex messages were being truncated and skipped.
@bbond007,

Y O U A R E A S T A R!!!! Changing the UDP_BAUD from 38400 to 31250 worked like a charm!!!! :mrgreen:

Thank you so much for your very much appreciated help! I am so happy to finally hear the music coming through my speakers!! I will be spending all night playing The Secrets of Monkey Island :lol:

By the way Dosmid is fantastic, really!

EDIT:
One final question please, would you recommend CM-32L over MT-32?
Post Reply