hatari and midi

A forum about the Hatari ST/STE/Falcon emulator - the current version is v2.3.0

Moderators: simonsunnyboy, thothy, Moderator Team

User avatar
607
Captain Atari
Captain Atari
Posts: 236
Joined: Tue Aug 16, 2016 3:20 pm
Location: Amersfoort, the Netherlands
Contact:

Re: hatari and midi

Post by 607 »

Does anyone have copson's program? I would like to use MIDI with Hatari. (or with Atari emulation in general, if it doesn't work with Hatari, I suppose...)
User avatar
607
Captain Atari
Captain Atari
Posts: 236
Joined: Tue Aug 16, 2016 3:20 pm
Location: Amersfoort, the Netherlands
Contact:

Re: hatari and midi

Post by 607 »

607 wrote: Mon Jul 19, 2021 10:42 am Does anyone have copson's program? I would like to use MIDI with Hatari. (or with Atari emulation in general, if it doesn't work with Hatari, I suppose...)
I got it! You can register an account at copson's website to download it. I'll let you know later if I get it working. :) (possibly with an edit to this post, if I get it working/give up quickly)
Edit: It does work! :D I couldn't get output to work, I think, and using MaxYMiser yields error messages about the pipe. Maybe I can figure that out later. But input works, and I have no issues with TTRAK! Except some sharp edges and a lag spike here and there, but I think that's to be expected.
User avatar
607
Captain Atari
Captain Atari
Posts: 236
Joined: Tue Aug 16, 2016 3:20 pm
Location: Amersfoort, the Netherlands
Contact:

Re: hatari and midi

Post by 607 »

607 wrote: Wed Jul 21, 2021 6:06 pm Edit: It does work! :D I couldn't get output to work, I think, and using MaxYMiser yields error messages about the pipe. Maybe I can figure that out later. But input works, and I have no issues with TTRAK! Except some sharp edges and a lag spike here and there, but I think that's to be expected.
Actually, I was mistaken. I was storing the MIDI in file on my external hard drive, and when I changed it to my (internal) SSD the lag spikes and sharp edges completely disappeared. Amazing! :D
I still couldn't get MaxYMiser to work, though. Here is the error message:
Image
User avatar
Eero Tamminen
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2414
Joined: Sun Jul 31, 2011 1:11 pm

Re: hatari and midi

Post by Eero Tamminen »

copson wrote: Wed Mar 03, 2021 6:27 pm A quick look in midi.c, I think I can see one issue: the "running status" is not supported as the runningStatus byte is commented out.
When byte is higher than 0x80, we have a status byte and it should be saved, as the commented code suggests.
However, it has also to be used when the first byte after a complete message is a non-status byte and it seems that this logic is lacking.

Something like this could maybe work:
...
Unfortunately not tested as I haven't figured out how to build with PortMIDI... Do you know where I declare that PortMIDI should be used for Linux/Windows cross compiling?
I tested it already earlier, but forgot to say that it did not help.

I've now looked into PortMidi sources and "pmBadData" error comes in following situations:
  • Previous sysex message was not terminated (with EOX: 0xf7) when new one starts
  • Sysex data that is not realtime (0xf8 bits are not set for it)
  • Non-sysex data does not have status bit (0x80) set
More info for PortMidi's data processing is in its header: https://github.com/philandstuff/portmid ... portmidi.h
And in the Pm_Write() function in: https://github.com/philandstuff/portmid ... portmidi.c
Post Reply

Return to “Hatari”