Re: [hatari-devel] PortMidi issues (was: preparing hatari 2.3.1)

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hi Nicolas,

I noticed that manual GUI section doesn't even
mention PortMidi:
https://hatari.tuxfamily.org/doc/manual.html#The_Devices_Dialog

I'll add screenshot also of PortMidi version and
some information about it and some notes about
pros & cons of each.


I think in the long run it would be better if
PortMidi support would be selectable at run-time,
as currently on Mac one would need to build two
version of Hatari for full experience, one to
support MIDI programs (with portmidi) and one for
MIDI networking & debug output (withput portmidi).


	- Eero

On 12/26/20 2:09 AM, Eero Tamminen wrote:
On 12/25/20 9:21 PM, Vincent Barrilliot wrote:
Sorry to pop in. What do you mean with "portmidi support is buggy" ?

Unlike Hatari's "raw" MIDI device support, Hatari
PortMidi support doesn't work fully, some MIDI SW
fails with it.

It's even listed in the Hatari bugs list:
https://git.tuxfamily.org/hatari/hatari.git/tree/doc/bugs.txt#n53

(+ I just pushed more info about it.)


Because of PortMidi itself lacking proper docs,
the person contributing PortMidi support to
Hatari disappearing, and it not being very
relevant for Linux, nobody's had the motivation
for the large effort to debug both PortMidi &
Hatari PortMidi support code enough to fix it.

It was very annoying to debug because *every*
mouse move in their GUIs generates Hatari MIDI
trace output (Nicolas?), so I just changed that
particular error to LOG_WARN.


We will still be able to buid Hatari with MIDI support enabled, right?

I'm not sure whether you mean PortMidi support or
MIDI support. MIDI device file support is always
built in, unless Hatari build detects PortMidi
headers, in which case it builds PortMidi support
instead.

However, PortMidi is only needed for MIDI support
on Windows and Mac, because those don't provide
MIDI devices as files.  MIDI support worked on
Linux long before support for PortMidi library
was added.

I have no idea why hatari.spec file listed
portmidi-devel as build dep.  Besides the bug(s),
other issues in using PortMidi for MIDI are:

* One can't then use MIDI interface for networking
   or debug messages, because PortMidi supports
   only MIDI events, not raw data

* It can't be toggled on & off at any time like
   raw MIDI devices can (which is unexpected by
   Hatari Python UI)

* If the configured PortMidi device isn't present,
   PortMidi causes thread deadlock with libSDL
   audio thread when Hatari exits (at least earlier
   it had such issue)


Only advantage of PortMidi on Linux is that one
doesn't need a real (or virtual) MIDI device
(file), it can connect directly to ALSA (MIDI)
devices, i.e. one doesn't need to do raw MIDI
device file setup (described e.g. in Hatari
midi-linux.txt doc).


But portmidi-devel will no longer be mandatory so if it's not there we will just be no MIDI support in the built hatari, correct ?

The change I proposed is only dropping PortMidi
devel package from hatari.spec build deps so that
Hatari gets built with (IMHO superior) raw MIDI
device file support instead.


     - Eero

Le 25/12/2020 à 19:57, Eero Tamminen a écrit :
Hi Nicolas,

I propose dropping portmidi-devel from hatari.spec
deps, as portmidi support is buggy, and not needed
on Linux.  See attached patch.

The other patch updates version info in docs &
sources to v2.3.1 in case that helps (remember to
change '??' in hatari.spec & release-notes.txt to
the correct date before commiting).





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/