See "apt search mingw" and the packages listed by it. You don't need programming toolchain for Windows, AFAIK Hatari Windows builds are done on Linux using MinGW. Portmidi "patch" is there, but Portmidi Windows library & headers needs to be in the build environment for it to be enabled / configured by CMake, and the DLL included into the resulting Hatari package.
Does anyone, to your knowledge, maintain a ready to install Windows Hatari which includes this patch?
I know how to build Hatari from source on Linux using Linux's built in compiler but I have no 'c' programming toolchain for Windows. Sorry to have to ask because I know Windows is not used by any of the devs, but what are the steps to build Hatari for Windows with the portmidi library included? Siriushardware wrote:So it looks as though what I would call the 'Mainstream Binary' for Windows does not currrently include the portmidi patch, even in the latest build. Maybe I'm just doing something stupid or there's something weird in my setup. I used a simple 16th note drum pattern in tests, single pitch at 120 bpm. But when I recorded Hatari MIDI out in Ableton, Bitwig and in Snoize's excellent Midi Monitor at OSX side, the jitter was there as well in a similar periodic form. Did not have a device connected during the capture.
I used the code below to capture the jitter (in midi.c, Midi_Data_WriteByte(), line 289 onwards). But my memory might fail on this as periodic jitter indeed suggests drift compensation. IIRC, ST was pretty tight though and jitter was around 1 ms. Maybe those tempo offsets are related to MFP timer freqs? I can't exactly remember how tight Cubase and MTPro were on hardware ST. I try to find Notator and see how it performs. However, I noticed that the tempos were slightly off from the set 120 bpm (119.88 bpm in both Cubases and 120.47 in MTPro).
Thought first that cracked versions do some funny business behind the scenes, but the jitter was also produced in MTPro (which is legit).
I tested with Cubase 2.01, Cubase 3.01 and MasterTracks Pro 3.6, using latest tip and 1.04 ROMs, OSX Sierra as host. Hope the PortMidi version will work also in Linux to help with large sysex dumps. No stuck notes and sysex at least up to 63kB works well. On OSX MIDI works great except for the jitter. ), I really had the feeling accuracy was now correct. It could also be a bug in Hatari But as some midi programs ('M' and 'Notator) had big issues at some points (loosing notes, getting stuck. How did you measure this drift ? By measuring delay between each byte output on /dev/midi (or equivalent) ? Is so maybe cubase needs a real device on the other side to ack each byte and compute some kind of clock where jitter would be lower. Isn't that what we are seeing ? Does it have any negative impact on the MIDI device connected on the other side (lag, missing notes ?)ĭepending on how the MFP timers are used by Cubase, it's also possible they chose a frequency that is not an exact multiple of the expected freq, so you need to have this adjustement steps, made by Cubase midi logic.
IIRC when I improved Hatari MIDI support at the ACIA level, I noticed some MIDI programs like cubase or others had some code to compensate for a possible clock drift, adjusting their rate to keep timings in a desired window. Would be great to get MIDI timing tight as there are really good sequencers available for ST. Can someone please jump in and figure out what is going on? I can provide the related code used to make the measurements. I don't know anything about timing in the emulator internals. The expected ideal curve would be a flat horizontal line at 0. Positive vertical value indicates that a noteOn command is generated late, and negative that it is generated early. Vertical axis is latency time in msecs, and horizontal axis is time in midi packets.
The attached graphs illustrate the issue. It is present in current Mercurial tip midi.c (i.e., even without my code, which I first suspected to be the reason). However, there's a weird periodic 12 ms jitter in Hatari MIDI output, at least in OSX.
MIDI support has been tested in OSX and it seems to work ok, including sysex. Eero has been most helpful and is reviewing the patch. I've implemented MIDI support for OSX and Windows Hatari.