{"id":21377411,"url":"https://github.com/zeyu-li/midi_interface","last_synced_at":"2025-03-16T09:44:57.506Z","repository":{"id":120381478,"uuid":"275668929","full_name":"Zeyu-Li/Midi_interface","owner":"Zeyu-Li","description":"A interface for MIDIUtil :musical_keyboard:","archived":false,"fork":false,"pushed_at":"2023-05-19T01:55:10.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-22T22:09:24.107Z","etag":null,"topics":["midi-interface","midiutil"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Zeyu-Li.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":"2020-06-28T21:12:12.000Z","updated_at":"2023-05-19T01:55:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"947a0647-f511-4254-855e-03bac7edd33e","html_url":"https://github.com/Zeyu-Li/Midi_interface","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/Zeyu-Li%2FMidi_interface","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zeyu-Li%2FMidi_interface/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zeyu-Li%2FMidi_interface/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zeyu-Li%2FMidi_interface/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Zeyu-Li","download_url":"https://codeload.github.com/Zeyu-Li/Midi_interface/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243852432,"owners_count":20358270,"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":["midi-interface","midiutil"],"created_at":"2024-11-22T09:20:46.985Z","updated_at":"2025-03-16T09:44:57.477Z","avatar_url":"https://github.com/Zeyu-Li.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Midi Interface by Andrew Li\n\nA Python interface for [MIDIUtil](https://pypi.org/project/MIDIUtil/)\n\n\n\nInstall with \n\n```shell\npython setup.py install\n```\n\n\\+\n\nYou need MIDIUtil, so\n\n```shell\npip install MIDIUtil\n```\n\n\n\n## Tests\n\nTo run a test, use the following command\n```shell\npy .\\tests\\test_1.py\n```\n\n\n\n\n## Use\n\nTo use, import with \n\n```python\nfrom Midi_interface.Midi import Midi\n```\n\n\n\n\nFunctions you can use\n\n```python\n\ndef set_tempo(self, tempo, time = 0):\n    ''' sets tempo of track at a given time given the time and the tempo, defaults to start of track '''\n    \ndef set_track(self, track):\n    ''' given new track (int) switch to that track '''\n    \ndef set_instrument(self, instrument_number):\n    ''' set the instrument of current track; use this website to find your instrument: https://www.midi.org/specifications/item/gm-level-1-sound-set '''\n  \ndef notes_to_midi(self, string_notes):\n    '''\n    converts list of notes ie [G3, Ab5, f#2] (supports octaves 0 to 9 inclusive)\n    to notes interpreted by this midi class\n    '''\n        \ndef push_notes(self, new_notes, duration):\n    ''' \n    given list of note pitch and duration, push to notes and duration attribute\n    (new note pitch can be a list or a single note, same with duration)\n    '''\n        \ndef encode_track(self):\n    ''' encodes the entirety of a single track '''\n\ndef output_mid(self, name):\n    '''\n    given mid output name (.mid extension not needed),\n    the .mid extension will be added\n    *Note if the mid file of the same name already exists, it will be OVERWRITTEN\n    '''\n```\n\n\n\n\\* Note, look at the tests if you need examples of how to implement things\n\n\n\n\n## Requires\n\n* [midiutil](https://pypi.org/project/MIDIUtil/)\n\nBut will install if you don't have it\n\n\n\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeyu-li%2Fmidi_interface","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzeyu-li%2Fmidi_interface","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeyu-li%2Fmidi_interface/lists"}