{"id":23443465,"url":"https://github.com/r-koubou/midi-sampling","last_synced_at":"2025-10-06T20:07:37.692Z","repository":{"id":252798866,"uuid":"841341400","full_name":"r-koubou/midi-sampling","owner":"r-koubou","description":"Simple hardware MIDI instrument automated sampling tool","archived":false,"fork":false,"pushed_at":"2024-09-23T13:35:58.000Z","size":310,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-04-09T22:42:24.802Z","etag":null,"topics":["midi","sampling"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"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/r-koubou.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":"2024-08-12T08:03:30.000Z","updated_at":"2024-09-23T13:35:59.000Z","dependencies_parsed_at":"2024-08-29T10:07:36.950Z","dependency_job_id":"f4a08f78-30ee-411d-b5eb-37e3e3fbd852","html_url":"https://github.com/r-koubou/midi-sampling","commit_stats":null,"previous_names":["r-koubou/midi-sampling"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/r-koubou/midi-sampling","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-koubou%2Fmidi-sampling","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-koubou%2Fmidi-sampling/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-koubou%2Fmidi-sampling/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-koubou%2Fmidi-sampling/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/r-koubou","download_url":"https://codeload.github.com/r-koubou/midi-sampling/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-koubou%2Fmidi-sampling/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278671745,"owners_count":26025745,"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","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","sampling"],"created_at":"2024-12-23T18:19:32.085Z","updated_at":"2025-10-06T20:07:37.654Z","avatar_url":"https://github.com/r-koubou.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"midi-sampling\n================\n\n[日本語](README_ja.md)\n\n## Overview\n\n`midi-sampling` performs sampling from external MIDI sound sources. It allows you to specify arbitrary MIDI notes and velocities to control MIDI devices and carry out sampling.\n\nSince it operates from a console, it is lightweight and can automate sampling processes.\n\n## Requirements\n\n- Windows OS with Python 3.12 or later\n  - It might also work on macOS, but this has not been verified.\n- [pipenv](https://github.com/pypa/pipenv)\n- [ffmpeg](https://www.ffmpeg.org/)\n\n## Setup\n\n### Installing pipenv\n\nhttps://github.com/pypa/pipenv?tab=readme-ov-file#installation\n\n### Installing dependencies\n\nNavigate to the project directory and run the following command:\n\n```bash\npipenv install\n```\n\n### Installing ffmpeg\n\nhttps://www.ffmpeg.org/download.html\n\nAfter installation, add the directory containing `ffmpeg.exe` to the environment variable `PATH`.\n\n## How to Run\n\n### Activating the pipenv environment\n\nNavigate to the project directory and run the following command:\n\n```bash\npipenv shell\n```\n\nIf the prompt on the left side appears as `(midi-sampling)`, you are inside the pipenv environment.\n\n```bash\n(midi-sampling) C:\\Path\\To\\Project\\midi-sampling\u003e\n~~~~~~~~~~~~~~~\n```\n\n### Executing the Sampling\n\nRun the following command:\n\n```bash\npython -m midisampling \u003csampling-config-file.json\u003e \u003cMIDI-config-file.json\u003e\n```\n\n### Listing Devices\n\nRun the following command:\n\n```bash\npython -m midisampling.device\n```\n\n#### Output example\n\n```\n+------------------------------------------------------+\n|                    Audio Devices                     |\n+--------------------------------+---------------------+\n| Name                           | Platform            |\n+--------------------------------+---------------------+\n| Line(Steinberg UR28M)          | Windows WDM-KS      |\n| Microsoft Sound Mapper - Input | MME                 |\n| Primary Sound Capture Driver   | Windows DirectSound |\n| UR28M In (Steinberg UR28M)     | MME                 |\n| UR28M In (Steinberg UR28M)     | Windows DirectSound |\n| UR28M In (Steinberg UR28M)     | Windows WASAPI      |\n| Yamaha Steinberg USB ASIO      | ASIO                |\n+--------------------------------+---------------------+\n+------------------------------+\n|         MIDI Devices         |\n+------------------------------+\n| Name                         |\n+------------------------------+\n| Impact GX Mini               |\n| Microsoft GS Wavetable Synth |\n| MIDIOUT2 (Impact GX Mini)    |\n| Roland SC-8850 MIDI OUT 1    |\n| Roland SC-8850 MIDI OUT 2    |\n| Roland SC-8850 PART A        |\n| Roland SC-8850 PART B        |\n| Roland SC-8850 PART C        |\n| Roland SC-8850 PART D        |\n+------------------------------+\n```\n\n## Configuration Files\n\nSample files, `sampling-config.json` and `midi-config.example.json`, are included. Please adjust the settings according to your environment.\n\n\u003c!-- [BEGIN] Generated by documenttool/jsonschema_to_markdown.py --\u003e\n### Sampling Configuration\n\n*Configuration for device, sampling.*\n\n#### Properties\n\n- **`audio_channels`** *(integer, required)*: Number of channels in the sampled audio file.\n- **`audio_sample_rate`** *(integer, required)*: Sampling rate of the audio file.\n- **`audio_sample_bits`** *(integer, required)*: Bit depth of the sampled audio file. Must be one of: `[16, 24, 32]`.\n- **`audio_sample_bits_format`** *(string, required)*: Format of the bit depth of the sampled audio file. Must be one of: `[\"int\", \"float\"]`.\n- **`audio_in_device`** *(object, required)*\n  - **`name`** *(string, required)*: Name of the input device for the sampled audio file.\n  - **`platform`** *(string, required)*: Platform of the input device for the sampled audio file (e.g., `ASIO`, `MME`, `Windows DirectSound`, `Windows WASAPI`, `Core Audio` etc.).\n- **`asio_audio_ins`** *(array)*: Default: `[]`.\n  - **Items** *(integer)*: List of ASIO input channel numbers. Specify the input channel numbers of your device. The format starts from 0 (e.g., to use inputs 1 and 2, specify `[0, 1]`).\n- **`midi_out_device`** *(string, required)*: Name of the MIDI device used for sampling.\n#### Examples\n\n  ```json\n  {\n      \"audio_channels\": 2,\n      \"audio_sample_rate\": 48000,\n      \"audio_sample_bits\": 32,\n      \"audio_sample_bits_format\": \"int\",\n      \"audio_in_device\": {\n          \"name\": \"Yamaha Steinberg USB ASIO\",\n          \"platform\": \"ASIO\"\n      },\n      \"asio_audio_ins\": [\n          2,\n          3\n      ],\n      \"midi_out_device\": \"Roland SC-8850 PART A\"\n  }\n  ```\n\n### MIDI Sampling Configuration\n\n*Structure of the MIDI sampling configuration.*\n\nSee also `midi-config.example.json` and [schema files](midisampling/appconfig/json.schema.files/midi)\n\n\u003e TODO: Document JSON Schema\n\n### Audio process Configuration\n\n*Structure of the audio process configuration.*\n\n#### Definitions\n\n- \u003ca id=\"definitions/def_audioprocess_config\"\u003e\u003c/a\u003e**`def_audioprocess_config`** *(object)*: Cannot contain additional properties.\n  - **`format`**: Refer to *[#/definitions/def_format](#definitions/def_format)*.\n  - **`keep_wav_chunks`** *(array)*: A list of wave chunk names to keep via the audio process. if not specified, all chunks will be kept. Default: `[]`.\n    - **Items** *(string)*\n\n    Examples:\n    ```json\n    [\n        \"smpl\"\n    ]\n    ```\n\n    ```json\n    [\n        \"smpl\",\n        \"cue\"\n    ]\n    ```\n\n  - **`effects`** *(array)*: A list of audio process configurations.\n    - **Items**: Refer to *[#/definitions/def_effect](#definitions/def_effect)*.\n- \u003ca id=\"definitions/def_format\"\u003e\u003c/a\u003e**`def_format`** *(object)*: Format configuration Specifying it explicitly in dependent libraries prevents auto-detection and false conversions within. However, this is not guaranteed as it depends on the library. Cannot contain additional properties.\n  - **`bit_depth`** *(string)*: The bit depth of the audio file. If not specified, the bit depth of the input file will be auto detected by dependency library. Must be one of: `[\"int16\", \"int24\", \"int32\", \"float32\"]`.\n  - **`sample_rate`** *(integer)*: The sample rate of the audio file. If not specified, the sample rate of the input file will be auto detected by dependency library.\n  - **`channels`** *(integer)*: The number of channels of the audio file. If not specified, the number of channels of the input file will be auto detected by dependency library.\n- \u003ca id=\"definitions/def_effect\"\u003e\u003c/a\u003e**`def_effect`** *(object)*: Effect configuration. Cannot contain additional properties.\n  - **`index`** *(integer, required)*: The index of the effect in the chain.\n  - **`name`** *(string, required)*: A effect name.\n  - **`params`** *(object, required)*: A dictionary of parameters for the effect. Can contain additional properties.\n#### Examples\n\n  ```json\n  [\n      {\n          \"keep_wav_chunks\": [\n              \"smpl\"\n          ],\n          \"format\": {\n              \"bit_depth\": \"int32\",\n              \"sample_rate\": 48000,\n              \"channels\": 2\n          },\n          \"effects\": [\n              {\n                  \"index\": 0,\n                  \"name\": \"normalize\",\n                  \"params\": {\n                      \"target_db\": -10.0\n                  }\n              },\n              {\n                  \"index\": 1,\n                  \"name\": \"trim\",\n                  \"params\": {\n                      \"threshold_db\": -65.0,\n                      \"min_silence_duration\": 250\n                  }\n              }\n          ]\n      }\n  ]\n  ```\n\n\u003c!-- [END] Generated by documenttool/jsonschema_to_md.py --\u003e\n\n### Audio Process Parameters\n\nFor individual settings, please refer to the following:\n- [Audio Process Parameters](midisampling/waveprocess/Parameters.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr-koubou%2Fmidi-sampling","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fr-koubou%2Fmidi-sampling","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr-koubou%2Fmidi-sampling/lists"}