{"id":16521959,"url":"https://github.com/meshula/labmidi","last_synced_at":"2025-03-21T09:30:41.437Z","repository":{"id":5616444,"uuid":"6824051","full_name":"meshula/LabMidi","owner":"meshula","description":"Midi IN and OUT. Standard midi file parser and player. Midi Softsynth implementation.","archived":false,"fork":false,"pushed_at":"2024-12-27T14:49:44.000Z","size":449,"stargazers_count":42,"open_issues_count":0,"forks_count":4,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-03-17T23:38:00.387Z","etag":null,"topics":["c-plus-plus","midi","music","music-player","music-theory","player"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/meshula.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-11-23T08:04:06.000Z","updated_at":"2025-01-01T09:28:59.000Z","dependencies_parsed_at":"2024-12-27T15:25:33.454Z","dependency_job_id":"262b4dce-68e5-4fc8-9cb2-005ed18e4c7c","html_url":"https://github.com/meshula/LabMidi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meshula%2FLabMidi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meshula%2FLabMidi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meshula%2FLabMidi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meshula%2FLabMidi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meshula","download_url":"https://codeload.github.com/meshula/LabMidi/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244771351,"owners_count":20507795,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c-plus-plus","midi","music","music-player","music-theory","player"],"created_at":"2024-10-11T16:58:52.794Z","updated_at":"2025-03-21T09:30:41.431Z","avatar_url":"https://github.com/meshula.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"LabMidi\n=======\n\nCross platform MIDI related utilities.\n\n    class MidiIn\n    Can read from a MIDI input port, typically provided by a keyboard\n\n    class MidiOut\n    Outputs to a MIDI port, typically consumed by a synthesizer\n\n    class MidiSoftSynth : public MidiOutBase\n    A software synthesizer that can be used as a MIDI output. Currently\n    only implemented for OSX (and presumably it would work for iOS as well).\n\n    class MidiSong\n    A song is a collection of tracks, which are a list of MIDI events. A song can\n    be parsed from a Standard MIDI file, or from a base64 encoded Standard MIDI file\n    with an appropriate header. MML (Music Macro Language) data may also be parsed,\n    passed in as either an MML string, or a file path. The version parsed is a restricted\n    form of Modern MML, and not nearly as sophisticated as what mml2mid can currently\n    process.\n\n    class MidiSongPlayer\n    Can play a single MidiSong. The class is initialized with a pointer\n    to a MidiSong. The data in the MidiSong is not retained in any way,\n    so after a MidiSongPlayer is instantiated it is fine to discard the\n    MidiSong object.\n\n    LabMidiUtil.h\n    Contains various routines to convert between note names, note numbers,\n    and frequency, as well as routines to fetch standard General MIDI names\n    for instruments.\n\nLike ofxMidi, I'm thinking of using PGMidi \u003chttps://github.com/petegoodliffe/PGMidi\u003e to implement the MidiIn and MidiOUt classes on iOS.\n\nBuilding\n--------\nCMake 3.15 or greater is required for building. Building in the usual way should work out of the box, as LabMidi\nhas no external dependencies.\n\nBuild Options:\n- LABMIDI_BUILD_EXAMPLES (ON/OFF): Build example applications (default: ON)\n- LABMIDI_BUILD_SHARED_LIBS (ON/OFF): Build as shared libraries (default: OFF)\n- LABMIDI_INSTALL (ON/OFF): Generate installation target (default: ON)\n\nExample:\n```cmake\ncmake -B build -DLABMIDI_BUILD_EXAMPLES=ON\ncmake --build build\n```\n\nUsage\n-----\nLabMidi can be used in other CMake projects either via find_package() or FetchContent:\n\n```cmake\n# Option 1: Using find_package\nfind_package(LabMidi REQUIRED)\ntarget_link_libraries(your_target PRIVATE Lab::Midi)\n\n# Option 2: Using FetchContent\ninclude(FetchContent)\nFetchContent_Declare(\n    labmidi\n    GIT_REPOSITORY your_repo_url\n    GIT_TAG your_tag\n)\nFetchContent_MakeAvailable(labmidi)\ntarget_link_libraries(your_target PRIVATE Lab::Midi)\n```\n\nSee the MidiApp source for examples of usage. Note that MidiApp.cpp currently has hard coded paths to the midi sample files.\nYou'll need to make sure you've set your working directory to the folder containing the resources folder. In XCode, under the Product menu, select Edit Schemes..., then the Options tab, then the target you want to run, and click the Use Custom Working Directory box. Fill in the path appropriately.\n\nMidiPlayer\n----------\n\nMidiPlayerApp -o 0 -f path/to/file.midi\n\nWill play file.midi on the 0th port.\n\nLicense\n-------\nBSD 3-clause. \u003chttp://opensource.org/licenses/BSD-3-Clause\u003e\n\nNote that the sample midi files in the assets directory were obtained from the jasmid\ndistribution on github, and they contain their own internal copyright notices.\n\nThanks\n------\nThanks to ofxMidi \u003chttps://github.com/chrisoshea/ofxMidi\u003e for inspiration, and jasmid \u003chttps://github.com/gasman/jasmid\u003e for a clean implementation of a standard midi file reader, which I\nused as a jumping off point for the LabMidi midi file parser. Thanks to RtMidi \u003chttp://www.music.mcgill.ca/~gary/rtmidi/\u003e for providing a robust platform abstraction.\nLabMidi is quite different from jasmid and ofxMidi because the focus is playing midi files, and providing basic routing functionality.\n\nThanks to qiao for posting lots of base64 encoded MIDI tracks at \u003chttps://github.com/qiao/euphony\u003e.\n\nThanks to \u003chttp://www.manythings.org/music/pianotheory/\u003e for posting a very cool web utility that calculates scales and chords.\nIt's dual licensed GPL and CC-0. I used the tables in that utility, choosing the CC-0 license for this usage.\n\nThere's 9,310 piano MIDI files here: \u003chttp://www.kuhmann.com/Yamaha.htm\u003e\n\nThanks to arle \u003chttp://www17.atpages.jp/~arle/index.php?%E3%83%8D%E3%82%BF\u003e for publishing mml2mid \u003chttp://hpc.jp/~mml2mid/\u003e,\nand to g200kg \u003chttp://www.g200kg.com/en/docs/webmodular/\u003e for an MML player.\n\nThanks to Andre Mazzone and Josh Fillstrup for helping get LabMidi up and running on Linux.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeshula%2Flabmidi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeshula%2Flabmidi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeshula%2Flabmidi/lists"}