{"id":20974404,"url":"https://github.com/devinacker/ymfmidi","last_synced_at":"2025-05-14T12:31:59.217Z","repository":{"id":139511936,"uuid":"369357136","full_name":"devinacker/ymfmidi","owner":"devinacker","description":"OPL3 MIDI player using the ymfm emulation core","archived":false,"fork":false,"pushed_at":"2024-08-24T16:51:15.000Z","size":298,"stargazers_count":44,"open_issues_count":2,"forks_count":7,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-02T18:23:12.820Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devinacker.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.txt","contributing":null,"funding":null,"license":"COPYING.txt","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":"2021-05-20T22:54:57.000Z","updated_at":"2025-01-05T16:08:00.000Z","dependencies_parsed_at":"2024-02-29T00:26:02.848Z","dependency_job_id":"9bbe510d-e6ce-459e-9ef9-23fd3542c8e6","html_url":"https://github.com/devinacker/ymfmidi","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devinacker%2Fymfmidi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devinacker%2Fymfmidi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devinacker%2Fymfmidi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devinacker%2Fymfmidi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devinacker","download_url":"https://codeload.github.com/devinacker/ymfmidi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254142406,"owners_count":22021522,"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":[],"created_at":"2024-11-19T04:28:40.395Z","updated_at":"2025-05-14T12:31:58.913Z","avatar_url":"https://github.com/devinacker.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ymfmidi\n\nymfmidi is a MIDI player based on the OPL3 emulation core from [ymfm](https://github.com/aaronsgiles/ymfm).\n\n# Support\n\n### Features\n\n* Supports both 4-operator and 2-operator instruments\n* Supports some Roland GS, Yamaha XG, and GM Level 2 features (e.g. multiple instrument banks and percussion channels)\n* Can emulate multiple chips at once to increase polyphony\n* Can output to WAV files\n* Can play files containing multiple songs (XMI, MIDI format 2)\n* Supported sequence formats:\n    * `.hmi`, `.hmp` HMI Sound Operating System\n    * `.mid` Standard MIDI files\n    * `.mus` DMX sound system / Doom engine\n    * `.rmi` Microsoft RIFF MIDI\n    * `.xmi` Miles Sound System / Audio Interface Library\n* Supported instrument patch formats:\n    * `.ad`, `.opl` Miles Sound System / Audio Interface Library\n    * `.op2` DMX sound system / Doom engine\n    * `.tmb` Apogee Sound System\n    * `.wopl` Wohlstand OPL3 editor\n\nMore sequence and instrument file formats will probably be supported in the future.\n\n\n# Usage\n\nymfmidi can be used as a standalone program (with SDL2), or incorporated into other software to provide easy OPL3-based MIDI playback.\n\nFor standalone usage instructions, run the player with no arguments. The player uses patches from [DMXOPL](https://github.com/sneakernets/DMXOPL) by default, but an alternate patch set can be specified as a command-line argument.\n\nTo incorporate ymfmidi into your own programs, include everything in the `src` and `ymfm` directories (except for `src/main.cpp` and `src/console.*`), preferably in its own subdirectory somewhere. After that, somewhere in your code:\n* `#include \"player.h\"`\n* Create an instance of `OPLPlayer`, optionally specifying a type of chip (the default is `OPLPlayer::ChipOPL3`) and number of chips to emulate (the default is 1)\n* Call the `loadSequence` and `loadPatches` methods to load music and instrument data from a path, an existing `FILE*`, or a buffer in memory\n* (Optional) Call the `setLoop`, `setSampleRate`, `setGain`, and `setFilter` methods to set up playback parameters\n* Periodically call one of the `generate` methods to output audio in either signed 16-bit or floating-point format\n* (Optional) Call the `reset` method to restart playback at the beginning\n\nA proper static lib build method will be available sooner or later.\n\n### Real-time MIDI control\n\nIn addition to loading a MIDI file, it's also possible to send MIDI messages to an `OPLPlayer` instance in real time using some of its public methods.\n\nTo send a standard two- or three-byte MIDI message:\n\n```\n\tvoid midiEvent(uint8_t status, uint8_t data0, uint8_t data1 = 0);\n```\n\nHelper methods are also available for the most common messages:\n\n```\n\tvoid midiNoteOn(uint8_t channel, uint8_t note, uint8_t velocity);\n\tvoid midiNoteOff(uint8_t channel, uint8_t note);\n\tvoid midiPitchControl(uint8_t channel, double pitch); // range is -1.0 to 1.0\n\tvoid midiProgramChange(uint8_t channel, uint8_t patchNum);\n\tvoid midiControlChange(uint8_t channel, uint8_t control, uint8_t value);\n\t\n\tvoid midiSetBendRange(uint8_t channel, uint8_t semitones);\n```\n\nSystem Exclusive messages can also be sent directly to the player (primarily for enabling supported GS or XG features):\n\n```\n\tvoid midiSysEx(const uint8_t *data, uint32_t length);\n```\n\nIt is not required to include the opening `0xF0` byte that normally precedes a sysex event; this is due mainly to the way that these events are stored in MIDI files. If `data` includes this opening byte, it should also be included in `length`, but will otherwise be ignored.\n\n# License\n\nymfmidi and the underlying ymfm library are both released under the 3-clause BSD license.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevinacker%2Fymfmidi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevinacker%2Fymfmidi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevinacker%2Fymfmidi/lists"}