hatari and midi
Moderators: simonsunnyboy, npomarede, thothy, Moderator Team
- 607
- Captain Atari

- Posts: 262
- Joined: Tue Aug 16, 2016 3:20 pm
- Location: Amersfoort, the Netherlands
- Contact:
Re: hatari and midi
Do I understand right that MIDI support is going to be added to the main Hatari release, so we don't need to rely on copson's program anymore? That would be neat. 
- Eero Tamminen
- Fuji Shaped Bastard

- Posts: 3899
- Joined: Sun Jul 31, 2011 1:11 pm
Re: hatari and midi
MIDI support was in Hatari already earlier, its PortMidi (needed only on Mac & Windows) output was just buggy. Federico provided fix for that, which is now in Hatari.
If you're on Mac, you can try Troed's latest nightly build from: https://troed.ddns.net/d/b90229b625/
If you're on Mac, you can try Troed's latest nightly build from: https://troed.ddns.net/d/b90229b625/
- 607
- Captain Atari

- Posts: 262
- Joined: Tue Aug 16, 2016 3:20 pm
- Location: Amersfoort, the Netherlands
- Contact:
Re: hatari and midi
But isn't 2.3.1 still the latest released version?Eero Tamminen wrote: ↑Fri Dec 31, 2021 1:08 pm MIDI support was in Hatari already earlier, its PortMidi (needed only on Mac & Windows) output was just buggy. Federico provided fix for that, which is now in Hatari.
If you're on Mac, you can try Troed's latest nightly build from: https://troed.ddns.net/d/b90229b625/
- Eero Tamminen
- Fuji Shaped Bastard

- Posts: 3899
- Joined: Sun Jul 31, 2011 1:11 pm
Re: hatari and midi
Yes, v2.3.1 is the latest release version. Troed provides builds of latest Hatari sources.
In general non-release versions of Hatari should work pretty well. Hatari has some automated tests (added by Thomas) which verify that no significant features have broken, and Hatari developers of course use the latest source version themselves, not releases.
In general non-release versions of Hatari should work pretty well. Hatari has some automated tests (added by Thomas) which verify that no significant features have broken, and Hatari developers of course use the latest source version themselves, not releases.
- dressupgeekout
- Atarian

- Posts: 5
- Joined: Wed Jan 05, 2022 8:28 pm
- Location: California
- Contact:
Re: hatari and midi
Hey gang. I've been trying out Hatari w/ PortMidi support on macOS (10.13 "High Sierra") and it's been a little unstable for me. First was a crash in the SDL GUI, I made this change:
https://github.com/dressupgeekout/hatar ... 387f4dacb4
Motivated by this backtrace:
http://dressupgeekout.com/paste/charlot ... idi_bt.txt
Anyway, there's my branch. I'm happy to test things for you all. Maybe I should subscribe to the developers mailing list going forward, huh?
https://github.com/dressupgeekout/hatar ... 387f4dacb4
Motivated by this backtrace:
http://dressupgeekout.com/paste/charlot ... idi_bt.txt
Anyway, there's my branch. I'm happy to test things for you all. Maybe I should subscribe to the developers mailing list going forward, huh?
- dressupgeekout
- Atarian

- Posts: 5
- Joined: Wed Jan 05, 2022 8:28 pm
- Location: California
- Contact:
Re: hatari and midi
I even made a little video showing it all working with my MacBook! MIDI output, at least.
https://www.youtube.com/watch?v=FTTV06ed0M4
https://www.youtube.com/watch?v=FTTV06ed0M4
- DarkLord
- Ultimate Atarian

- Posts: 5657
- Joined: Mon Aug 16, 2004 12:06 pm
- Location: Prestonsburg, KY - USA
- Contact:
Re: hatari and midi
That's pretty sweet.
So can you use Hatari to load up one of the HD adapted games that
support MIDI like the Space Quest series or Ultima III and IV and
hear that wonderful MIDI output?
That would be coolness incorporated.
So can you use Hatari to load up one of the HD adapted games that
support MIDI like the Space Quest series or Ultima III and IV and
hear that wonderful MIDI output?
That would be coolness incorporated.
Welcome To DarkForce! http://www.darkforce.org "The Fuji Lives.!"
Atari SW/HW based BBS - Telnet:darkforce-bbs.dyndns.org 1040
Atari SW/HW based BBS - Telnet:darkforce-bbs.dyndns.org 1040
Re: hatari and midi
yes, midi works in games also.
I tested Ultima III/IV with Qsynth using an MT32 soundfont and sounds corrrectly.
F.
Atari STE 4096, Atari Falcon
- Eero Tamminen
- Fuji Shaped Bastard

- Posts: 3899
- Joined: Sun Jul 31, 2011 1:11 pm
Re: hatari and midi
Thanks for the backtrace + patch and sorry for the very late reply! I had quickly looked at this, but did not understand how it could happen [1], and then unfortunately forgot about it...dressupgeekout wrote: ↑Thu Jan 06, 2022 2:58 am Hey gang. I've been trying out Hatari w/ PortMidi support on macOS (10.13 "High Sierra") and it's been a little unstable for me. First was a crash in the SDL GUI, I made this change:
https://github.com/dressupgeekout/hatar ... 387f4dacb4
Motivated by this backtrace:
http://dressupgeekout.com/paste/charlot ... idi_bt.txt
[1] The fields to which the PortMidi device names are copied, are of FILANAME_MAX size:
Code: Select all
$ grep sMidi.*PortName src/includes/configuration.h
char sMidiInPortName[FILENAME_MAX];
char sMidiOutPortName[FILENAME_MAX];=> Are you saying that your Mac PortMidi device file names are longer than 1024 bytes???
Yes, that would b great!dressupgeekout wrote: ↑Thu Jan 06, 2022 2:58 am Anyway, there's my branch. I'm happy to test things for you all. Maybe I should subscribe to the developers mailing list going forward, huh?
Re: hatari and midi
Hello all,
I'm trying to get Hatari working with MIDI on my Mac (macOS Big Sur Version 11.6.5). I've loaded Hatari V2.3.1. I'm booting TOS 2.06. I can get a MIDI program named Atari Tunesmith running in Hatari but I can't get any of its MIDI output out to my Mac. I'm not sure what I'm doing wrong or what else I need to do. I notice there is this bit about MIDI in Hatari's settings but the "Write MIDI output to" text box and button are disabled plus the "Input Port" and "Output Port" dropdowns only have "Off" as a choice.

Thank you so much in advance for any thoughts anyone can offer.
Matt
I'm trying to get Hatari working with MIDI on my Mac (macOS Big Sur Version 11.6.5). I've loaded Hatari V2.3.1. I'm booting TOS 2.06. I can get a MIDI program named Atari Tunesmith running in Hatari but I can't get any of its MIDI output out to my Mac. I'm not sure what I'm doing wrong or what else I need to do. I notice there is this bit about MIDI in Hatari's settings but the "Write MIDI output to" text box and button are disabled plus the "Input Port" and "Output Port" dropdowns only have "Off" as a choice.

Thank you so much in advance for any thoughts anyone can offer.
Matt
Re: hatari and midi
Do you have connected a MIDI interface to your Mac?MDCragg wrote: ↑Thu May 19, 2022 10:26 pm Hello all,
I'm trying to get Hatari working with MIDI on my Mac (macOS Big Sur Version 11.6.5). I've loaded Hatari V2.3.1. I'm booting TOS 2.06. I can get a MIDI program named Atari Tunesmith running in Hatari but I can't get any of its MIDI output out to my Mac. I'm not sure what I'm doing wrong or what else I need to do. I notice there is this bit about MIDI in Hatari's settings but the "Write MIDI output to" text box and button are disabled plus the "Input Port" and "Output Port" dropdowns only have "Off" as a choice.
Thank you so much in advance for any thoughts anyone can offer.
Matt
Re: hatari and midi
So far I’ve only tried to get it to work with a software synthesizer. I can try plugging in a hardware synth.
Re: hatari and midi
I do not use MIDI on Hatari (or at all). However, I think some changes have been done after 2.3.1’s release that improve MIDI on the Mac.
I would go to this website which has the MacOS development versions for Hatari:
https://sync.wtf/hatari_macos/
Bob C
I would go to this website which has the MacOS development versions for Hatari:
https://sync.wtf/hatari_macos/
Bob C
- Eero Tamminen
- Fuji Shaped Bastard

- Posts: 3899
- Joined: Sun Jul 31, 2011 1:11 pm
Re: hatari and midi
On Linux it works fine with software synthetizer. But you need to start your (virtual or real) MIDI device before you start (or at least reset) Hatari, because PortMidi iterates through the available devices only when it's initialized, it does not noticed anything being added after that.
And you definitely need latest development version (Nicolas is doing a release of it soonish), because there are bugs in Hatari v2.3.1 PortMidi MIDI event handling which cause PortMidi event handling to break e.g. on some SysEx MIDI events. Those issues are fixed only in the development version.
PS. This is the main fix, but there are also some other minor things: https://git.tuxfamily.org/hatari/hatari ... f51e90b201
And you definitely need latest development version (Nicolas is doing a release of it soonish), because there are bugs in Hatari v2.3.1 PortMidi MIDI event handling which cause PortMidi event handling to break e.g. on some SysEx MIDI events. Those issues are fixed only in the development version.
PS. This is the main fix, but there are also some other minor things: https://git.tuxfamily.org/hatari/hatari ... f51e90b201
Re: hatari and midi
Progress!!! I downloaded v2.4.0-devel (May 20 2022) / Hatari.20220520_142100.dmg and launched it. It sees Cycling 74 Max (which I have on my machine). I can choose either "To Max 1" or "To Max 2" in Hatari then run Atari Tunesmith and I am getting MIDI output to my Mac's generic built-in synthesizer. I'll have to figure out how to work with Max to get MIDI to either my software or hardware synths or play around with other MIDI devices to see if Hatari recognizes them. Getting any kind of MIDI output from Hatari is a HUGE win.
Thank you so much for the feedback here and thank you to whomever is working on these successive Hatari iterations so they include MIDI output. I appreciate it so much!
Matt
Thank you so much for the feedback here and thank you to whomever is working on these successive Hatari iterations so they include MIDI output. I appreciate it so much!
Matt
Last edited by MDCragg on Sun May 22, 2022 5:19 am, edited 2 times in total.
Re: hatari and midi
Hello -
I'm on MacOS 10.14 and been having limited success with MIDI on Hatari v2.3.1. Some programs like Tunesmith work fine, others, like Cubase or MSG 4 do not. If I launch one of the programs where MIDI doesn't work, it seems to bork MIDI functionality to the point where I have to re-launch the app before the working programs will work again.
I've tried v2.4.0-devel (June 11 2022), but I just get a white window - this is the case with both emuTOS or TOS 2.06.
When launching from the command line, I get some errors about JackRouter, and some warnings about MMU emulation, and finally a Bus error writing to an address, but I get those same errors when successfully launching v2.3.1.
Any tricks to get the latest builds working correctly on MacOS?
thanks!
Paul
I'm on MacOS 10.14 and been having limited success with MIDI on Hatari v2.3.1. Some programs like Tunesmith work fine, others, like Cubase or MSG 4 do not. If I launch one of the programs where MIDI doesn't work, it seems to bork MIDI functionality to the point where I have to re-launch the app before the working programs will work again.
I've tried v2.4.0-devel (June 11 2022), but I just get a white window - this is the case with both emuTOS or TOS 2.06.
When launching from the command line, I get some errors about JackRouter, and some warnings about MMU emulation, and finally a Bus error writing to an address, but I get those same errors when successfully launching v2.3.1.
Any tricks to get the latest builds working correctly on MacOS?
thanks!
Paul
instagram: @tooManyOscilloscopes
blog: paulcarbone.com/blog
blog: paulcarbone.com/blog
- Eero Tamminen
- Fuji Shaped Bastard

- Posts: 3899
- Joined: Sun Jul 31, 2011 1:11 pm
Re: hatari and midi
Could you try with Hatari default config, and if that works, provide the config with which you get just the while window?
(Only issues preventing the v2.4 release since end of May have been related to Falcon emulation.)
Re: hatari and midi
There are no tricks to get the macOS development builds to work, they are more or less the same as real release archives.forty2 wrote: ↑Fri Jun 17, 2022 1:04 am Hello -
I'm on MacOS 10.14 and been having limited success with MIDI on Hatari v2.3.1. Some programs like Tunesmith work fine, others, like Cubase or MSG 4 do not. If I launch one of the programs where MIDI doesn't work, it seems to bork MIDI functionality to the point where I have to re-launch the app before the working programs will work again.
I've tried v2.4.0-devel (June 11 2022), but I just get a white window - this is the case with both emuTOS or TOS 2.06.
When launching from the command line, I get some errors about JackRouter, and some warnings about MMU emulation, and finally a Bus error writing to an address, but I get those same errors when successfully launching v2.3.1.
Any tricks to get the latest builds working correctly on MacOS?
thanks!
Paul
I'm running the build from yesterday without issue, both with x64 (macOS 10.14) and Aarch64 (macOS 12).
However, there was a problem with ST-HIGH Monochrome recently that was fixed only a few days ago. So perhaps you could try to download the very latest build from https://sync.wtf/hatari_macos/ to be sure it's not that bug.
- Eero Tamminen
- Fuji Shaped Bastard

- Posts: 3899
- Joined: Sun Jul 31, 2011 1:11 pm
Re: hatari and midi
Can you try the latest 2.4.0-devel snapshot? It would be good to have verification before 2.4 is released, on whether your issue is the same as what was fixed recently.
Re: hatari and midi
Hi - so sorry for the lag.
I've tested the one from 7/30 Hatari.20220730_101541.dmg.zip which seems to work: Launches, and sends MIDI on programs that didn't previously work.
I tried the latest one from today Hatari.20220804_122909.dmg.zip which did not launch. Let me know if you want me to try anything else on the later builds?
I've tested the one from 7/30 Hatari.20220730_101541.dmg.zip which seems to work: Launches, and sends MIDI on programs that didn't previously work.
I tried the latest one from today Hatari.20220804_122909.dmg.zip which did not launch. Let me know if you want me to try anything else on the later builds?
instagram: @tooManyOscilloscopes
blog: paulcarbone.com/blog
blog: paulcarbone.com/blog
- Eero Tamminen
- Fuji Shaped Bastard

- Posts: 3899
- Joined: Sun Jul 31, 2011 1:11 pm
Re: hatari and midi
That's really odd. There should be no relevant differences between July 30th and today (August 4th), only testing and documentation changes:forty2 wrote: ↑Thu Aug 04, 2022 5:30 pm Hi - so sorry for the lag.
I've tested the one from 7/30 Hatari.20220730_101541.dmg.zip which seems to work: Launches, and sends MIDI on programs that didn't previously work.
I tried the latest one from today Hatari.20220804_122909.dmg.zip which did not launch. Let me know if you want me to try anything else on the later builds?
https://git.tuxfamily.org/hatari/hatari.git/log/
Unless it's not change in Hatari, but in how Mac daily builds are done: viewtopic.php?p=436415#p436415
Note that you do not need to use daily builds any more for Hatari PortMidi support fixes.
Hatari v2.4.0 was released last month: https://download.tuxfamily.org/hatari/2.4.0/
And v2.4.1 release binaries are just being built. For release notes, see: https://git.tuxfamily.org/hatari/hatari ... -notes.txt
(Soon to be updated also at: https://hatari.tuxfamily.org/doc/release-notes.txt)
Re: hatari and midi
v2.4.0 seems to work, as does MIDI. Thanks!
BUT...
If I hit F12 to the main menu, and go to 'Devices' and then 'Back to Main Menu', it crashes. Happens on the few betas I've tried, but not on 2.3.1, and on both the included EmuTOS and 2.06. It doesn't happen on other sub-menu pages, and I only have valid MIDI devices selected (printer & RS-232 deselected).
If I make changes via the Preferences dialog, it's fine.
Weird, eh?
BUT...
If I hit F12 to the main menu, and go to 'Devices' and then 'Back to Main Menu', it crashes. Happens on the few betas I've tried, but not on 2.3.1, and on both the included EmuTOS and 2.06. It doesn't happen on other sub-menu pages, and I only have valid MIDI devices selected (printer & RS-232 deselected).
If I make changes via the Preferences dialog, it's fine.
Weird, eh?
instagram: @tooManyOscilloscopes
blog: paulcarbone.com/blog
blog: paulcarbone.com/blog
- Eero Tamminen
- Fuji Shaped Bastard

- Posts: 3899
- Joined: Sun Jul 31, 2011 1:11 pm
Re: hatari and midi
Ok, so the issue is in the SDL GUI Midi settings handling. There was a bug fixed for that in 2.4.0, which had triggered only on Mac, but your crash might also be due to (another) run-time check in Mac system libraries.forty2 wrote: ↑Fri Aug 05, 2022 12:03 am v2.4.0 seems to work, as does MIDI. Thanks!
BUT...
If I hit F12 to the main menu, and go to 'Devices' and then 'Back to Main Menu', it crashes. Happens on the few betas I've tried, but not on 2.3.1, and on both the included EmuTOS and 2.06. It doesn't happen on other sub-menu pages, and I only have valid MIDI devices selected (printer & RS-232 deselected).
If I make changes via the Preferences dialog, it's fine.
Weird, eh?
Could you run Hatari from console and if there's some complaint / assert output to the console just before the crash, paste it here?
Re: hatari and midi
This is worrying. That build is made the same way as the next release build will be done. Can you let me know the reason why it isn't launching? (Launching the hatari binary from commandline usually gives more info if the macOS UI doesn't)
Thank you,
Troed
Re: hatari and midi
Troed,
I do not use MIDI, but I also cannot get the latest nightly to run.
When I run it from the commandline, this is what I see:
dyld[58763]: Library not loaded: '/opt/local/lib/libncurses.6.dylib'
Referenced from: '/Applications/Games/Hatari/Hatari.app/Contents/Frameworks/libreadline.8.1.dylib'
Reason: tried: '/opt/local/lib/libncurses.6.dylib' (no such file), '/usr/lib/libncurses.6.dylib' (no such file)
zsh: abort ./hatari
If a Mac user does not feel comfortable using the command-line (Terminal), you can get similar information by selecting Report when Hatari does not start. Then you look for "Termination Reason". When I did this, I saw this similar information:
Termination Reason: Namespace DYLD, Code 1 Library missing
Library not loaded: '/opt/local/lib/libncurses.6.dylib'
Referenced from: '/Volumes/*/Hatari.app/Contents/Frameworks/libreadline.8.1.dylib'
Reason: tried: '/opt/local/lib/libncurses.6.dylib' (no such file), '' (no such file)
(terminated at launch; ignore backtrace)
Bob C
I do not use MIDI, but I also cannot get the latest nightly to run.
When I run it from the commandline, this is what I see:
dyld[58763]: Library not loaded: '/opt/local/lib/libncurses.6.dylib'
Referenced from: '/Applications/Games/Hatari/Hatari.app/Contents/Frameworks/libreadline.8.1.dylib'
Reason: tried: '/opt/local/lib/libncurses.6.dylib' (no such file), '/usr/lib/libncurses.6.dylib' (no such file)
zsh: abort ./hatari
If a Mac user does not feel comfortable using the command-line (Terminal), you can get similar information by selecting Report when Hatari does not start. Then you look for "Termination Reason". When I did this, I saw this similar information:
Termination Reason: Namespace DYLD, Code 1 Library missing
Library not loaded: '/opt/local/lib/libncurses.6.dylib'
Referenced from: '/Volumes/*/Hatari.app/Contents/Frameworks/libreadline.8.1.dylib'
Reason: tried: '/opt/local/lib/libncurses.6.dylib' (no such file), '' (no such file)
(terminated at launch; ignore backtrace)
Bob C

