Hatari MIDI support
Moderators: simonsunnyboy, thothy, Moderator Team
Hatari MIDI support
Is there a way to use a MIDI keyboard with Hatari?
Re: Hatari MIDI support
yes, if you're using Linux :
http://hatari.tuxfamily.org/docs.html
Q: How can I use MIDI on Mac OS X or Windows?
A: MIDI currently only works on Linux (and maybe some *BSD systems) where Hatari can write the MIDI output to a device file in the /dev file system. On all other systems, MIDI is not supported.
http://hatari.tuxfamily.org/docs.html
Q: How can I use MIDI on Mac OS X or Windows?
A: MIDI currently only works on Linux (and maybe some *BSD systems) where Hatari can write the MIDI output to a device file in the /dev file system. On all other systems, MIDI is not supported.
- frank.lukas
- Hardware Guru
- Posts: 2011
- Joined: Tue Jan 29, 2008 5:33 pm
- Location: Germany
Re: Hatari MIDI support
OSX/macOS is also a BSD like OS and there is a/dev device folder too ...
fancy Atari Musik anDA Dance "Agare Hinu Harukana" 1998 ATARI http://www.youtube.com/watch?v=JX10fxb5eYE
-
- Atari Super Hero
- Posts: 844
- Joined: Sat Oct 26, 2013 11:19 pm
- Location: France
- Contact:
Re: Hatari MIDI support
With a standard USB class compliant midi interface, configure Hatari to access the right /dev/snd/midi*** for input and output.
It works for me under Linux with a Maudio keyboard or a Roland SC8850 and Cubase 3. I have never tried under OSX.
It works for me under Linux with a Maudio keyboard or a Roland SC8850 and Cubase 3. I have never tried under OSX.
Philippe
Firebee, Falcon CT60, STE, BeeKey, BeepiPi.
My photography http://phil-67.deviantart.com/
EasyAraMint, BeeKey and BeePi https://sites.google.com/site/beebox68k/
Firebee, Falcon CT60, STE, BeeKey, BeepiPi.
My photography http://phil-67.deviantart.com/
EasyAraMint, BeeKey and BeePi https://sites.google.com/site/beebox68k/
-
- Atari Super Hero
- Posts: 552
- Joined: Thu Aug 21, 2014 7:55 pm
- Location: UK
Re: Hatari MIDI support
See also this recent similar thread:
http://www.atari-forum.com/viewtopic.php?f=51&t=27649
Before 1.9.0, MIDI support on Hatari, even on the Linux version, didn't work too well, but from 1.9.0 MIDI support / functionality improved dramatically.
Part of the way through the development of V1.9, a specific tweak was also added to get around an incompatibility with the most popular versions of Cubase 2 (there was a problem with Cubase falling over when you navigated into any of the editor sub-screens) - since then I have been able to run Cubase 2 as well under Linux Hatari as on a real ST, which is really saying something if you know how smoothly Cubase 2 works on a real ST.
The current stable Linux version V2.0.0 presumably incorporates all of these improvements carried over from V1.9 - V2.0 is the one I'm using now, anyway.
http://www.atari-forum.com/viewtopic.php?f=51&t=27649
Before 1.9.0, MIDI support on Hatari, even on the Linux version, didn't work too well, but from 1.9.0 MIDI support / functionality improved dramatically.
Part of the way through the development of V1.9, a specific tweak was also added to get around an incompatibility with the most popular versions of Cubase 2 (there was a problem with Cubase falling over when you navigated into any of the editor sub-screens) - since then I have been able to run Cubase 2 as well under Linux Hatari as on a real ST, which is really saying something if you know how smoothly Cubase 2 works on a real ST.
The current stable Linux version V2.0.0 presumably incorporates all of these improvements carried over from V1.9 - V2.0 is the one I'm using now, anyway.
- Eero Tamminen
- Fuji Shaped Bastard
- Posts: 2315
- Joined: Sun Jul 31, 2011 1:11 pm
Re: Hatari MIDI support
MIDI output (Linux) support was added to Hatari v0.45 (2003), and MIDI input support to Hatari v1.2 (2009), from which point MIDI music output has worked pretty well (= was tested more extensively) e.g. in games.
There were additional fixes for different Cubase versions in Hatari v1.7 & v1.9, and as mentioned above, it was fixed for good for Cubase in v2.0. Some of those fixes were also needed by BadMood, Douglas' Doom game rewrite for Falcon.
There were additional fixes for different Cubase versions in Hatari v1.7 & v1.9, and as mentioned above, it was fixed for good for Cubase in v2.0. Some of those fixes were also needed by BadMood, Douglas' Doom game rewrite for Falcon.
Re: Hatari MIDI support
Once I connected my keyboard with hatari running the Maxymiser tracker, and it was pleasant to use it as a synth!
-
- Atari Super Hero
- Posts: 552
- Joined: Thu Aug 21, 2014 7:55 pm
- Location: UK
Re: Hatari MIDI support
I can only quote from the other thread I mentioned, in which (at the time) Nicolas (npomarede) was referring to V1.8....Eero Tamminen wrote:MIDI output (Linux) support was added to Hatari v0.45 (2003), and MIDI input support to Hatari v1.2 (2009), from which point MIDI music output has worked pretty well (= was tested more extensively) e.g. in games.
The problem I was having at the time was that Hatari V1.8 (no matter which MIDI software was involved) was only outputting MIDI data for a few seconds, then would stall. The program (sequencer, synth editor) would continue to run as though nothing had happened but no further MIDI data would be output until Hatari was restarted, after which the same problem could be repeated.npomarede wrote: ..many improvements were made to midi timings in the current devel version, and they will be in Hatari 1.9.
When using Hatari 1.8, there's nothing you can do, it's not some settings problem, it's the emulation that was not accurate enough.
However, I must stress that the changes Nicolas made to midi.c during the continuing development of V1.8 completely fixed this problem and were incorporated into V1.9 stable, leaving only a specific problem when going into the edit sub-menus in Cubase 2.
This particular issue was very kindly and quickly fixed during development of V1.9 once I had flagged it up and Cubase is now as usable on Linux Hatari as it is on a real ST, for which I'm truly grateful.
- Eero Tamminen
- Fuji Shaped Bastard
- Posts: 2315
- Joined: Sun Jul 31, 2011 1:11 pm
Re: Hatari MIDI support
It's possible that it had regressed at some point. It had worked fine with all the games I tested (Midimaze for networking, Leisure Suit Larry & Empire for music output) and many free MIDI program's from Tim's MIDI world (midimouse was my favorite) and Sequencer One I had gotten from a ST Format cover disk.
I don't think MIDI input had really been properly tested again after that, until v1.8. Or if somebody did test, they didn't bother to inform Hatari developers about issue...
I don't think MIDI input had really been properly tested again after that, until v1.8. Or if somebody did test, they didn't bother to inform Hatari developers about issue...
- Eero Tamminen
- Fuji Shaped Bastard
- Posts: 2315
- Joined: Sun Jul 31, 2011 1:11 pm
Re: Hatari MIDI support
FYI: Jari Klemola just provided MIDI support for OSX & Windows versions of Hatari:farvardin wrote:yes, if you're using Linux :
http://hatari.tuxfamily.org/docs.html
Q: How can I use MIDI on Mac OS X or Windows?
A: MIDI currently only works on Linux (and maybe some *BSD systems) where Hatari can write the MIDI output to a device file in the /dev file system. On all other systems, MIDI is not supported.
https://listengine.tuxfamily.org/lists. ... 00000.html
Once somebody else verifies that it works also on Windows (not just on OSX & Linux), the support goes in.
Re: Hatari MIDI support
Ah, I'll try to remember to try! I haven't got MIDI set up at the moment, but I might be able to do so this weekend... not sure, though.FYI: Jari Klemola just provided MIDI support for OSX & Windows versions of Hatari:
https://listengine.tuxfamily.org/lists. ... 00000.html
Once somebody else verifies that it works also on Windows (not just on OSX & Linux), the support goes in.
Re: Hatari MIDI support
so what is needed to make it work for osx is there a simple setup I don't get it 

Re: Hatari MIDI support
Is it possible for me to somehow pass midi out to DLS Music Device that is built in every osx? I have some apps that play midi files using this sound font. I just want to have Cubase running in Hatari and being able to hear these virutal sound banks. Here is a screenshot of osx app that plays midi files fine using probably GeneralUser GS v1.471.sf2 soundbank?
Is it possible to pass cubase midi out to Apple DLSMusicDevice ? and how would I set it up in Hatari?
Is it possible to pass cubase midi out to Apple DLSMusicDevice ? and how would I set it up in Hatari?
You do not have the required permissions to view the files attached to this post.
- Eero Tamminen
- Fuji Shaped Bastard
- Posts: 2315
- Joined: Sun Jul 31, 2011 1:11 pm
Re: Hatari MIDI support
I don't have Mac, but in general it should be enough to: select suitable MIDI interface from the Hatari GUI, and after that MIDI input/output should work fine. You may need to reboot emulation.
Troed has provided OSX build that includes the changes, if you cannot build Hatari from Mercurial yourself: https://troed.ddns.net/f/a44e383d76a446379312/
Troed has provided OSX build that includes the changes, if you cannot build Hatari from Mercurial yourself: https://troed.ddns.net/f/a44e383d76a446379312/
Re: Hatari MIDI support
Hello, this is my first post on this forum,
I’m musician and I would like to start adventure with Atari ST/STE demoscene. I should also mention that new to Linux and emulation
I’ve installed Hatari 2.1.0 on my laptop (Linux Mint). I was able to configure MIDI emulation and everything works fine. Next I tried to do this on my Raspberry Pi 3B (updated Raspbian), to achieve better performance I’ve compiled Hatari on Rasp with SDL 1.2.
Now, the problem is that I can’t get MIDI emulation to work on Raspberry Pi. Rasp version will not allow me to browse for midi input/output file – I can only select virtual device or softsynth (https://imgur.com/njBugJW). If I try to output midi to ie. VirMIDI 1-0 and connect VirMIDI 1-0 to timidity or qsynth – it does not work (no error logs, no nothing). However, if I select qsynth or timidity as midi output in Hatari – I will hear only first played note (Program – Notator or Cubase wont stop playing, but sound just stops and if I would like to repeat this experiment – I would need to restart Hatari app).
I do not know what I’m doing wrong and what I could do to make it work on Raspbian. Or maybe it is just not good idea to use Raspberry Pi? I would be very grateful for any advice.
I’m musician and I would like to start adventure with Atari ST/STE demoscene. I should also mention that new to Linux and emulation

I’ve installed Hatari 2.1.0 on my laptop (Linux Mint). I was able to configure MIDI emulation and everything works fine. Next I tried to do this on my Raspberry Pi 3B (updated Raspbian), to achieve better performance I’ve compiled Hatari on Rasp with SDL 1.2.
Now, the problem is that I can’t get MIDI emulation to work on Raspberry Pi. Rasp version will not allow me to browse for midi input/output file – I can only select virtual device or softsynth (https://imgur.com/njBugJW). If I try to output midi to ie. VirMIDI 1-0 and connect VirMIDI 1-0 to timidity or qsynth – it does not work (no error logs, no nothing). However, if I select qsynth or timidity as midi output in Hatari – I will hear only first played note (Program – Notator or Cubase wont stop playing, but sound just stops and if I would like to repeat this experiment – I would need to restart Hatari app).
I do not know what I’m doing wrong and what I could do to make it work on Raspbian. Or maybe it is just not good idea to use Raspberry Pi? I would be very grateful for any advice.
Re: Hatari MIDI support
I have tried it on Raspbian with not very good results. Didn't ran into the problems you have, but the performance of the PI 3B with my M-Audio USB MIDI interface was very bad. Lots of lost MIDI events. I think the shared USB Port of the PI is the bottle neck.
Re: Hatari MIDI support
Hi Kolli, that's why I do not even try to use any external device 
Funny, I just cloned v1.9.0 of Hatari and compiled it. In 1.9.0 on Raspbian I'm able to select file to write MIDI output (https://imgur.com/pkrubik), and as I connect VirMIDI to Qsynth - it works! Fact - Its not smooth, sound is a little laggy and distorted but its clearly issue with softsynth performance, not Hatari
As I would like to write compositions on more modern software and copy files to emulated Atari only to make sure that every sound can be played - I can live with that
I will eventualy think about configuring softsynth to consume less cpu or memory.

Funny, I just cloned v1.9.0 of Hatari and compiled it. In 1.9.0 on Raspbian I'm able to select file to write MIDI output (https://imgur.com/pkrubik), and as I connect VirMIDI to Qsynth - it works! Fact - Its not smooth, sound is a little laggy and distorted but its clearly issue with softsynth performance, not Hatari

As I would like to write compositions on more modern software and copy files to emulated Atari only to make sure that every sound can be played - I can live with that

I will eventualy think about configuring softsynth to consume less cpu or memory.
- Eero Tamminen
- Fuji Shaped Bastard
- Posts: 2315
- Joined: Sun Jul 31, 2011 1:11 pm
Re: Hatari MIDI support
Hatari v2.1 is normally built with PortMidi support, with that Hatari can connect directly to ALSA MIDI devices like QSynth. Just remember to start QSynth before Hatari, or it's not visible in the Hatari GUI MIDI setup lists.
Only older Hatari versions, and builds without PortMidi support require raw MIDI device file access (provided e.g. by kernel's virtual midi module, as explained in the midi-linux.txt document).
EDIT: minor clarifications to text.
Only older Hatari versions, and builds without PortMidi support require raw MIDI device file access (provided e.g. by kernel's virtual midi module, as explained in the midi-linux.txt document).
EDIT: minor clarifications to text.
Last edited by Eero Tamminen on Sat Apr 07, 2018 3:02 pm, edited 1 time in total.
Re: Hatari MIDI support
Eero Tamminen, you saved my time, thanks!
It looks like PortMIDI does not work for me, so I build 2.1.0 without PM and I'm now able to use midi. Thanks again!
It looks like PortMIDI does not work for me, so I build 2.1.0 without PM and I'm now able to use midi. Thanks again!
Re: Hatari MIDI support
USB MIDI is a complete disaster. Truly the worst thing to happen to music technology. It wasn't even developed by the MMA, they would never have made a standard that bad. It makes people think MIDI itself is responsible for loose timing, when really the problem is the USB interface and the protocol.kolli wrote:I have tried it on Raspbian with not very good results. Didn't ran into the problems you have, but the performance of the PI 3B with my M-Audio USB MIDI interface was very bad. Lots of lost MIDI events. I think the shared USB Port of the PI is the bottle neck.
Luckily, the Pi has a set of UART pins on the expansion header. I believe there's a Linux driver available to turn these pins into MIDI I/O. You need a couple of transistors and a few resistors to get a MIDI output. MIDI input requires an optocoupler (H11L1). There might be a board you can buy with MIDI I/O, although most of those hobby-type MIDI projects tend to be badly designed and unsafe.
It would be interesting to see how accurate the timing can be on a Pi running Linux compared to an Atari. Unfortunately there are no professional Linux sequencers, so you're always better off with an Atari.
Re: Hatari MIDI support
You're way ahead of me. I had no such luck so far with Linux Mint 18.3, Hatari 2.1, qjackctl/a2jmidid and Cubase 2. MIDI in shows no signs of life at all, while MIDI out gives me an error message from portmidi about bad MIDI data that requires a keypress for confirmation (!) and subsequently causes Hatari to exit. Some kind of error handling! That didn't exactly raise my level of confidence in any solution based on this library. I even updated it from the 200 version in Mint 18.3 to Ubuntu's 217, but that has the same questionable code in it still and behaves in the exact same way. Meanwhile, the whole setup works just fine with Reaper, which tells me that the jack setup is solid. Does anybody have an idea of what might be going on? While that portmidi hack is certainly a concern, it is probably not the root cause of this error condition to be triggered in the first place.woland360 wrote: I’ve installed Hatari 2.1.0 on my laptop (Linux Mint). I was able to configure MIDI emulation and everything works fine.
-
- Atari Super Hero
- Posts: 552
- Joined: Thu Aug 21, 2014 7:55 pm
- Location: UK
Re: Hatari MIDI support
My guess without trying it would be: Atari 1, Linux 0, simply because the Atari OS (that I am familiar with) is a single tasking OS and desktop Linux is a multitasking OS which will therefore have many conflicting demands on its time. The ST is much better at focusing on a single task.Foxie wrote: It would be interesting to see how accurate the timing can be on a Pi running Linux compared to an Atari. Unfortunately there are no professional Linux sequencers, so you're always better off with an Atari.
Re: Hatari MIDI support
I'm happy to report that it all works just fine once you build Hatari without portmidi in.IrataMule wrote:woland360 wrote: I had no such luck so far with Linux Mint 18.3, Hatari 2.1, qjackctl/a2jmidid and Cubase 2.