{"id":13862427,"url":"https://github.com/Wally869/MidiSplitter","last_synced_at":"2025-07-14T11:34:07.685Z","repository":{"id":140545945,"uuid":"261763805","full_name":"Wally869/MidiSplitter","owner":"Wally869","description":"Script to split midi files from a folder, into subsegments. The intent is to extract \"patterns\" from individual tracks and save them as individual Midi Files","archived":false,"fork":false,"pushed_at":"2020-11-28T16:12:40.000Z","size":57,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-05T06:05:46.809Z","etag":null,"topics":["analysis","midi","midi-files","midi-parser","music","music-analysis","music-generation","music-theory","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Wally869.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-05-06T13:16:47.000Z","updated_at":"2023-07-23T02:13:14.000Z","dependencies_parsed_at":"2024-01-21T04:12:13.542Z","dependency_job_id":null,"html_url":"https://github.com/Wally869/MidiSplitter","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/Wally869%2FMidiSplitter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wally869%2FMidiSplitter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wally869%2FMidiSplitter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wally869%2FMidiSplitter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Wally869","download_url":"https://codeload.github.com/Wally869/MidiSplitter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225974463,"owners_count":17553958,"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":["analysis","midi","midi-files","midi-parser","music","music-analysis","music-generation","music-theory","python"],"created_at":"2024-08-05T06:01:44.117Z","updated_at":"2024-11-22T22:31:07.877Z","avatar_url":"https://github.com/Wally869.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# MidiSplitter\n\n### Overview\n\nScript to split midi files from a folder, into subsegments.\nThe intent is to extract \"patterns\" from individual tracks\n\n\n### Dependencies\n\nfrom pip: glob, mido, numpy, gooey\n\nfrom github: MusiStrata (my repo: https://github.com/Wally869/MusiStrata)\n\n\n\n### Usage\n\nADDED GOOEY SUPPORT\n\nCan be called directly from cmd\nthe inputfolder argument can take lists so it is possible to operate on multiple folders at once\n\n```\n# No args\npython Splitter.py\n\n# see argparse parameters\npython Splitter.py -h \nusage: Splitter.py [-h] [-inputfolder INPUTFOLDER]\n                   [-outputfolder OUTPUTFOLDER] [-minmessages MINMESSAGES]\n                   [-exclusionmultiplier EXCLUSIONMULTIPLIER]\n                   [-useinstrumentsound USEINSTRUMENTSOUND]\n\nSplit Midi Songs\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -i INPUTFOLDER [INPUTFOLDER ..]\n  -o OUTPUTFOLDER\n  -m MINMESSAGES\n      Prune tracks with less midi messages than this number\n  -e EXCLUSIONMULTIPLIER\n      Multiplier for timedelta messages. Median of timedelta\n      multiplied by this determines section splitting\n  -u USEINSTRUMENTSOUND\n      Use the track instrument, or default to Acoustic Grand Piano\n```\n\n\n\n### Output\n\nAn input file of name \"test.mid\" will be output in a serie of mid files using the following naming scheme:\n\nTrack{TrackID}_{TrackInstrument}-{SectionID}.mid\n\nA report is also generated per song under the name \"-----SplitterReport-----.txt\".\nIt tracks some metrics, such as number of tracks before/after split, total number of segments,\nnumber of segments kept.\n\nIt also records parameters used when splitting, and gives a breakdown of the segments recorded\n\nTo Note: some segments can be excluded so SectionID is not guaranteed to be continuous\n\nA sample report:\n```text\nFilename: InputSplitter\\test.mid\nNbTracksBeforeSplit: 22\nNbTracksAfterSplit: 12\nNbSegmentsTotal: 46\nNbSegmentsKept: 25\n\nMinimum Messages: 20\nExclusion Multiplier: 5\n\n==========\nChannel: 0\nInstrument: Acoustic Grand Piano\nNbMessages: 703\n\n==========\nChannel: 1\nInstrument: Acoustic Grand Piano\nNbMessages: 198\n\n==========\nChannel: 2\nInstrument: Acoustic Grand Piano\nNbMessages: 503\n\n```\n\n### To Do\n\n- Better threshold selection than naive full-song median multiplication, and do it by channel\n- Implement threading (writing midi can be bottleneck I guess? Or handle songs seperately)\n- Fix errors whenever possible\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FWally869%2FMidiSplitter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FWally869%2FMidiSplitter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FWally869%2FMidiSplitter/lists"}