MidiLink 2.0 looking for testers. (no MIDI devices required)

https://github.com/MiSTer-devel/Main_MiSTer/wiki

Moderators: Mug UK, Zorro 2, Greenious, spiny, Sorgelig, Moderator Team

User avatar
Paradroyd
Captain Atari
Captain Atari
Posts: 293
Joined: Tue Sep 10, 2013 10:50 pm
Contact:

Re: MidiLink 2.0 looking for testers. (no MIDI devices required)

Postby Paradroyd » Wed Jan 16, 2019 6:14 am

BBond007 wrote:
Paradroyd wrote:But now, it seems to be adding my domain, "paradroyd.com" to everything with a dot in it, regardless if it should or not. I'll attach another screenshot...


That is because I was counting the number of 'c' in the string vs '.'

I don't know why as they are not even close on the keyboard.

It should be fixed now...


I understand..I've been bash scripting all day...nothing on this level, but a typo is a typo.

So now it mostly works. Typing the host name by itself doesn't work, but typing the hostname with a single trailing dot does work, so it seems maybe a count is off by one somewhere...
20190116_000047.jpg


FQDNs with multiple dots seem to work fine. I was able to get to a couple of BBSs by FQDN fine.
You do not have the required permissions to view the files attached to this post.
- Paradroyd
@paradroyd on Twitter, @paradroyd@mastodon.sdf.org on Mastodon

BBond007
Captain Atari
Captain Atari
Posts: 414
Joined: Wed Feb 28, 2018 3:23 am

Re: MidiLink 2.0 looking for testers. (no MIDI devices required)

Postby BBond007 » Wed Jan 16, 2019 6:32 am

Paradroyd wrote:I understand..I've been bash scripting all day...nothing on this level, but a typo is a typo.


I found another issue. Sorry :(

this time != vs ==

Try again :)

thanks!

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5801
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: MidiLink 2.0 looking for testers. (no MIDI devices required)

Postby Sorgelig » Wed Jan 16, 2019 6:39 am

Fluidsynth plays correctly.
So, only mt32d has problem with tempo. And probably it's only in shell. Need to test it with Minimig/ao486 - it's possible there won't be such problem.

User avatar
Paradroyd
Captain Atari
Captain Atari
Posts: 293
Joined: Tue Sep 10, 2013 10:50 pm
Contact:

Re: MidiLink 2.0 looking for testers. (no MIDI devices required)

Postby Paradroyd » Wed Jan 16, 2019 6:45 am

BBond007 wrote:
Paradroyd wrote:I understand..I've been bash scripting all day...nothing on this level, but a typo is a typo.


I found another issue. Sorry :(

this time != vs ==

Try again :)

thanks!


No need to apologize. I'm just glad to have a modem option at all!

It seems to be fixed. both short host names and FQDNs are working.
20190116_003936.jpg

Thanks!
You do not have the required permissions to view the files attached to this post.
- Paradroyd
@paradroyd on Twitter, @paradroyd@mastodon.sdf.org on Mastodon

BBond007
Captain Atari
Captain Atari
Posts: 414
Joined: Wed Feb 28, 2018 3:23 am

Re: MidiLink 2.0 looking for testers. (no MIDI devices required)

Postby BBond007 » Wed Jan 16, 2019 8:03 am

Sorgelig wrote:Fluidsynth plays correctly.
So, only mt32d has problem with tempo. And probably it's only in shell. Need to test it with Minimig/ao486 - it's possible there won't be such problem.


The new kernel/menu really sound good!

FluidSynth 100%
mpg123 sounds perfect, but leaves a lingering high pitch sound (on analog) afterwards
"aplay sine.wav" kills that high pitch sound.

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5801
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: MidiLink 2.0 looking for testers. (no MIDI devices required)

Postby Sorgelig » Wed Jan 16, 2019 11:27 pm

here is the test version of ao486 with ALSA support:
ao486.zip


Works good. Tested with Tie Fighter + Roland (MUNT).
So hybrid emulation is here now :)

BBond007 wrote:mpg123 sounds perfect, but leaves a lingering high pitch sound (on analog) afterwards

May be mpg123 leaves some non-zero sample at the end? I don't know how it's handled by ALSA.

So it's pretty much ready for new Linux release, but still has something to be done:
1) update midilink sources: sound card modules are built-in, so no insmod required.
2) After each start of ao486, the Midilink resets to TCP mode. Would be good to keep it as local MIDI emulation now will be preferred mode.

For future plans (after release):
May be it would be worth to copy snd-dummy + MiSTer PCM audio into a single audio card, so it will be easier to improve it further with specific features and no asound.conf will be required.
Not sure when i will have time for this. If you want, then it would be good to make it done.
You do not have the required permissions to view the files attached to this post.

BBond007
Captain Atari
Captain Atari
Posts: 414
Joined: Wed Feb 28, 2018 3:23 am

Re: MidiLink 2.0 looking for testers. (no MIDI devices required)

Postby BBond007 » Thu Jan 17, 2019 2:53 am

Sorgelig wrote:Works good. Tested with Tie Fighter + Roland (MUNT).
So hybrid emulation is here now :)


Yes it is! I'm very excited.

Although I've not finished tuning MUNT yet, so I have added an additional option in MidiLink.INI

MUNT_OPTIONS =

-m : Manual buffering mode (buffer does not grow)
-a : Automatic buffering mode (default)
-x msec : Maximum buffer size in milliseconds
-i msec : Minimum (initial) buffer size in milliseconds
-l mode : Analog emulation mode (0 - Digital, 1 - Coarse, 2 - Accurate, 3 - Oversampled 2x, default: 2)

The problem with the sometimes inconsistent tempo is that the HPS ARM is on the low end of what is required for MUNT, so it really needs to be tuned. People have reported the same issue with older model RPis.

Also, I'm not sure about the best compiler optimizations to use for the HPS.

https://retropie.org.uk/forum/topic/125 ... n-on-rpi-3

Overall, I think it still sounds pretty good for most thing and it does work as well as it did on the USB anyway.

GODS sounds really good. Even better than my real Roland MT-32!

Sorgelig wrote:So it's pretty much ready for new Linux release, but still has something to be done:
1) update midilink sources: sound card modules are built-in, so no insmod required.
2) After each start of ao486, the Midilink resets to TCP mode. Would be good to keep it as local MIDI emulation now will be preferred mode.


1. is done.
2. I have made a pull request for Main_MiSTer that changes the order the order of the options with FSYNTH being default.

For people testing. this new MiSTer is required for the latest build of the MidiLink linux space stuff.

I have also included /etc/asound.conf so all that should be necessary to test audio is the new ao486.rbf.

Thanks!
You do not have the required permissions to view the files attached to this post.

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5801
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: MidiLink 2.0 looking for testers. (no MIDI devices required)

Postby Sorgelig » Thu Jan 17, 2019 4:04 am

BBond007 wrote:The problem with the sometimes inconsistent tempo is that the HPS ARM is on the low end of what is required for MUNT, so it really needs to be tuned. People have reported the same issue with older model RPis.

I see. Actually the tempo issue exists only when midi is played on HPS which is just for testing than real usage. If you play from ao486, then it wont affect the tempo as it's controlled by ao486. I've listened MUNT music from TIE Fighter long time (was keeping game playing while doing other things) and didn't find noticeable oddities in music.
So if low specs don't affect other parts of MIDI emulation then it's not an issue.
Just one important thing need to be assured: MIDI emulation (MUNT/FSYNTH) must be run on CPU0 (as the whole OS). CPU1 is for MiSTer binary. So, check the settings of soft-synths to make them run on CPU0 only.

BBond007
Captain Atari
Captain Atari
Posts: 414
Joined: Wed Feb 28, 2018 3:23 am

Re: MidiLink 2.0 looking for testers. (no MIDI devices required)

Postby BBond007 » Thu Jan 17, 2019 8:22 am

Sorgelig wrote:I see. Actually the tempo issue exists only when midi is played on HPS which is just for testing than real usage. If you play from ao486, then it wont affect the tempo as it's controlled by ao486. I've listened MUNT music from TIE Fighter long time (was keeping game playing while doing other things) and didn't find noticeable oddities in music.
So if low specs don't affect other parts of MIDI emulation then it's not an issue.
Just one important thing need to be assured: MIDI emulation (MUNT/FSYNTH) must be run on CPU0 (as the whole OS). CPU1 is for MiSTer binary. So, check the settings of soft-synths to make them run on CPU0 only.


Right, mt32d is intensive and it effects aplaymidi but it can't effect ao486. aplaymidi sounds a little off even with my real MT-32.

I'll work on the CPU stuff.

Tie fighter with FluidSynth --> http://y2u.be/oV_VTLaLwKUwKU

Frontier : Elite II with MUNT --> http://y2u.be/mXWncU4Hccc

NegSol
Captain Atari
Captain Atari
Posts: 329
Joined: Sat Dec 05, 2015 9:22 pm

Re: MidiLink 2.0 looking for testers. (no MIDI devices required)

Postby NegSol » Thu Jan 17, 2019 3:23 pm

Congrats on the progress guys! :mrgreen:
I will test it soon. - to my knowledge this kind of hybrid emulation using only one board is unprecedented. Great to see this develop this quickly. :D

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5801
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: MidiLink 2.0 looking for testers. (no MIDI devices required)

Postby Sorgelig » Thu Jan 17, 2019 9:05 pm

Updated uartmode script:
uartmode.zip

1) common kill_all function
2) kill mt32d and fluidsynth explicitly otherwise they won't be killed if midilink is killed.
3) taskset midilink to CPU0 - it seems children processes respect the affinity mask, so no complicated actions are required.
You do not have the required permissions to view the files attached to this post.

BBond007
Captain Atari
Captain Atari
Posts: 414
Joined: Wed Feb 28, 2018 3:23 am

Re: MidiLink 2.0 looking for testers. (no MIDI devices required)

Postby BBond007 » Fri Jan 18, 2019 12:01 am

Sorgelig wrote:Updated uartmode script:
uartmode.zip
1) common kill_all function
2) kill mt32d and fluidsynth explicitly otherwise they won't be killed if midilink is killed.
3) taskset midilink to CPU0 - it seems children processes respect the affinity mask, so no complicated actions are required.


I've updated the install with the new uartmode command.

Also I'm now launching mt32d and fluidsynth with the cpu mask just to make 100% sure.

Thanks!

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5801
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: MidiLink 2.0 looking for testers. (no MIDI devices required)

Postby Sorgelig » Fri Jan 18, 2019 1:14 am

I've updated MiSTer code as well for more convenient UART/MIDI management

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5801
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: MidiLink 2.0 looking for testers. (no MIDI devices required)

Postby Sorgelig » Fri Jan 18, 2019 1:39 am

It seems everything for local MIDI is done now, so it's time to integrate it into new Linux release.

BBond007
Captain Atari
Captain Atari
Posts: 414
Joined: Wed Feb 28, 2018 3:23 am

Re: MidiLink 2.0 looking for testers. (no MIDI devices required)

Postby BBond007 » Fri Jan 18, 2019 3:07 am

Sorgelig wrote:I've updated MiSTer code as well for more convenient UART/MIDI management


Thanks!

I like that a lot better.

I think it might also be nice to have a option to reset midilink without changing options. Stuck notes with midi is something that just happens when the host OS gets reset while music is playing. Also some games reconfigure the MT-32/mt32d default sound bank mapping and PCM samples which can make the next program sound all wrong.

Sorgelig wrote:It seems everything for local MIDI is done now, so it's time to integrate it into new Linux release.


Almost... there might be an issue

it seems that now my UM-ONE is showing on /dev/midi1 and not /dev/midi as it was before... and there is no /dev/midi

That messes up the menu's logic as well as MidiLink :(

Hopefully its just something I've inadvertently enabled in the kernel.

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5801
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: MidiLink 2.0 looking for testers. (no MIDI devices required)

Postby Sorgelig » Fri Jan 18, 2019 4:20 am

in menu it's possible to change /dev/midi to /dev/midi* to cover all indexes.
But if you need to use the device then it will be a real pain to find the right one.

BBond007
Captain Atari
Captain Atari
Posts: 414
Joined: Wed Feb 28, 2018 3:23 am

Re: MidiLink 2.0 looking for testers. (no MIDI devices required)

Postby BBond007 » Fri Jan 18, 2019 4:56 am

Sorgelig wrote:in menu it's possible to change /dev/midi to /dev/midi* to cover all indexes.
But if you need to use the device then it will be a real pain to find the right one.


I have figured out the problem.

Adding snd-dummy to the kernel as static module causes this.

I removed it for testing purposes and it went back to /dev/midi.

Anyway, so the behavior is consistent so there is no problem as it will always be /dev/midi1.

BBond007
Captain Atari
Captain Atari
Posts: 414
Joined: Wed Feb 28, 2018 3:23 am

Re: MidiLink 2.0 looking for testers. (no MIDI devices required)

Postby BBond007 » Fri Jan 18, 2019 5:58 am

NegSol wrote:Congrats on the progress guys! :mrgreen:
I will test it soon. - to my knowledge this kind of hybrid emulation using only one board is unprecedented. Great to see this develop this quickly. :D


Here is an updated menu based on the changes Sorgelig made with the addition of an option to reset the UART connection without making any changes.

This will definitely clear stuck notes - like if you reset or crash while MIDI is playing with MUNT/Fluidsynth as those process are recycled.

Resetting should also clear stuck notes on actual MIDI modules as well. When MidiLink starts it now turns all notes off as part if its init process.
You do not have the required permissions to view the files attached to this post.

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5801
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: MidiLink 2.0 looking for testers. (no MIDI devices required)

Postby Sorgelig » Fri Jan 18, 2019 6:31 am

What you've changed in zImage?

BBond007
Captain Atari
Captain Atari
Posts: 414
Joined: Wed Feb 28, 2018 3:23 am

Re: MidiLink 2.0 looking for testers. (no MIDI devices required)

Postby BBond007 » Fri Jan 18, 2019 6:55 am

Sorgelig wrote:What you've changed in zImage?


Nothing...

I'm running current "MiSTer-devel/Linux-Kernel_4.5.0_MiSTer" with "MiSTer_defconfig"

I changed MidiLink to look for "/dev/midi1'" vs "'dev/midi' (and the menu) after I determined that snd-dummy was the cause for my UM-ONE USB MIDI device to change names...

BBond007
Captain Atari
Captain Atari
Posts: 414
Joined: Wed Feb 28, 2018 3:23 am

Re: MidiLink 2.0 looking for testers. (no MIDI devices required)

Postby BBond007 » Fri Jan 18, 2019 7:41 am

Sorgelig wrote:It seems everything for local MIDI is done now, so it's time to integrate it into new Linux release.


For me it now works very well.

Tomorrow I will start updating the WIKI reflecting the new features.

Very much stuff to cover:

- MUNT (ROMS, etc...)
- FluidSynth (Soundfonts, etc...)
- MUNT vs FluidSynth
------ Which one to use?
- UDP for external MIDI (UDPMIDI.EXE)
- UDP for network game play
- TCP option
------ TCP for modem emulation
------ TCP for MP3 player
------ TCP for Zmodem file transfers

User avatar
Paradroyd
Captain Atari
Captain Atari
Posts: 293
Joined: Tue Sep 10, 2013 10:50 pm
Contact:

Re: MidiLink 2.0 looking for testers. (no MIDI devices required)

Postby Paradroyd » Fri Jan 18, 2019 7:56 am

BBond007 wrote:
For me it now works very well.

Tomorrow I will start updating the WIKI reflecting the new features.

Very much stuff to cover:


This has been an amazing process to watch unfold!
- Paradroyd
@paradroyd on Twitter, @paradroyd@mastodon.sdf.org on Mastodon

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5801
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: MidiLink 2.0 looking for testers. (no MIDI devices required)

Postby Sorgelig » Fri Jan 18, 2019 6:52 pm

BBond007 wrote:Tomorrow I will start updating the WIKI reflecting the new features.

it's better to move Midilink.ini to /media/fat/linux folder. Config folder is usually cluttered with many files. Config folder is mostly for automatically created configs not requiring manual editing.

NegSol
Captain Atari
Captain Atari
Posts: 329
Joined: Sat Dec 05, 2015 9:22 pm

Re: MidiLink 2.0 looking for testers. (no MIDI devices required)

Postby NegSol » Fri Jan 18, 2019 8:40 pm

Ok - I tried to get midi running but failed. No "internal" midi sound. Guess I will have to wait until you update the wiki. It looks like everything is running but I can see in htop that multiple instances of fluidsynth and mt32d spawn. Is this behavior expected? Should it be just one?

BBond007
Captain Atari
Captain Atari
Posts: 414
Joined: Wed Feb 28, 2018 3:23 am

Re: MidiLink 2.0 looking for testers. (no MIDI devices required)

Postby BBond007 » Fri Jan 18, 2019 9:54 pm

NegSol wrote:Ok - I tried to get midi running but failed. No "internal" midi sound. Guess I will have to wait until you update the wiki. It looks like everything is running but I can see in htop that multiple instances of fluidsynth and mt32d spawn. Is this behavior expected? Should it be just one?


Did you use the new ao486.rbf?

viewtopic.php?f=117&t=35031&start=100#p364323

If that does not work:

#cat/dev/MrAudio

and see if the write count is increasing.
Last edited by BBond007 on Fri Jan 18, 2019 10:12 pm, edited 2 times in total.


Return to “MiSTer”

Who is online

Users browsing this forum: SegaMan, Sorgelig and 14 guests