Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add coremidimap tool #15

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Add coremidimap tool #15

wants to merge 7 commits into from

Conversation

huddx01
Copy link
Contributor

@huddx01 huddx01 commented Mar 17, 2024

Add iOS/macOS cpp code, to build a binary for direct CoreMIDI routing/mirroring/capturing without any additional hardware.

huddx01 added 7 commits March 15, 2024 03:39
coremidimap - A tool for iOS/macOS, to mirror CoreMIDI traffic from any source to any destination without blocking ports (for other Apps).

- No 3rd party hardware needed for debugging purposes, when it runs on iOS.
- Ported regtool to a osx compatible version.
- For this, RtMidi.h/RtMidi.cpp were used (as a replacement for asound.h).
- See: https://github.com/thestk/rtmidi
- Build via:  "g++ -std=c++11  -D__MACOSX_CORE__ -o regtool_osx regtool_osx.cpp RtMidi.cpp -framework CoreMIDI -framework CoreAudio -framework CoreFoundation"
By using #ifdef __cplusplus and extern "C", it is ensured that the declarations in sysex.h are correctly handled by both C and C++ compilers. The explicit conversions with reinterpret_cast are necessary to inform the C++ compiler about the intended type conversion while ensuring type safety.

The C++ compatibility is needed for tools/regtool_osx.cpp (Port for MacOS), as it is based on the RtMidi.h/.cpp files as a replacement of alsa, which are used in regtool.c.
- Fixed handling of lager sysexes in midiread() function
- Made some cosmetics in cli Output (usage, etc...)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant