Working MIDI app for the Mac! lazarus / 33-macOS - Mac OS X ---------------------------------------------------------------------- carl_caulkett 路 2024-10-04 13:29 * Mac Mini M1 * macOS 14.6.1 * Lazarus 3.99 * FPC 3.3.1 I've completed a test app which uses the Apple CoreMIDI library to communicate with a MIDI device, in this case an Osmose keyboard. It was based on a post made in 2013! It is geared towards my own particular needs, namely to pass a CC0 value followed by a ProgramChange message. If you search for CoreMidi there are a few hits, pretty much all of them asking for help. Hopefully this will help someone 馃檹馃徑 ---------------------------------------------------------------------- carl_caulkett 路 2024-10-05 22:11 After a day of heavy refactoring and restructuring, I have made the first steps towards making this a cross-platform app, using an interface to decouple the front end from the OS specific code. I haven't started on the Linux or Windows code yet but the macOS code is working nicely! ---------------------------------------------------------------------- bobby100 路 2024-10-06 13:15 I am using portmidi on MacOS, Linux and on FreeBSD. It works fine. On Windows, I use Windows Multimedia API. If you want to take a look: https://github.com/BobanSpasic/PSS-Revive/tree/main Under ext_units you'll find midi.pas (Windows), and portmidi.pas (Linux, MacOS, FreeBSD). Under units, you'll find untUnPortMIDI.pas, that is a supplement to midi.pas in order to have the functionality of portmidi.pas. If you can get your units to have some similar functionality and API, I would be glad to use them instead of portmidi and have one less dependency. For Linux, MarkMLI did a lot of work on Alsa MIDI: https://github.com/MarkMLl/asound Unfortunately, for someone like me, who does not understand how Alsa sequencer works, this one looks extremely complicated, and MarkMLI wasn't really friendly in helping with it. Although I appreciate his work, I needed an alternative. After a lot of experimenting, portmidi worked nice for me, except under Windows 64bit (no 64bit DLL found to download). ---------------------------------------------------------------------- carl_caulkett 路 2024-10-06 13:23 Thanks a lot! I'll certainly check it out 馃槂 ---------------------------------------------------------------------- Thaddy 路 2024-10-06 13:31 for win 64, look how to install here: https://schollz.com/tinker/portmidi/#:~:text=Install%20portmidi%20on%2 0Windows%20First%20install%20MSYS2.%20This,with%20the%20following%20co mmand%3A%201%3E%20pacman%20-S%20mingw-w64-x86_64-portmidi ---------------------------------------------------------------------- bobby100 路 2024-10-06 13:43 Thanks Thaddy. EDIT: got portmidi to work for Win64, thanks Thaddy, and I see now that I finished just MidiOut for portmidi in my app, but no MidiIn. Got to get some free time to finish this...