|
| 1 | +# Drum MIDI Remapper |
| 2 | + |
| 3 | +A .NET tool for remapping MIDI drum notes between different standards and custom mappings. Designed to help musicians and producers adapt MIDI drum tracks for compatibility with various drum kits, DAWs, and hardware. |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | +--- |
| 9 | + |
| 10 | +## Quick Start |
| 11 | + |
| 12 | +```bash |
| 13 | +git clone https://github.com/Abstractize/drum-midi-remapper.git |
| 14 | +cd drum-midi-remapper |
| 15 | +dotnet build |
| 16 | +dotnet run --project src/ClI -- GuitarPro StevenSlate midis/test.mid |
| 17 | +``` |
| 18 | + |
| 19 | +- Replace `GuitarPro`, `StevenSlate`, and `midis/test.mid` with your desired mapping and MIDI file. |
| 20 | + |
| 21 | +## Requirements |
| 22 | + |
| 23 | +- [.NET 9.0 SDK or newer](https://dotnet.microsoft.com/download) |
| 24 | +- Compatible with Windows, macOS, and Linux |
| 25 | + |
| 26 | +## Features |
| 27 | + |
| 28 | +- Remap MIDI drum notes using customizable mapping files |
| 29 | +- Support for popular drum mapping standards (e.g., General MIDI, Roland, Yamaha) and custom mappings |
| 30 | +- Batch processing of MIDI files |
| 31 | +- Command-line interface for easy automation |
| 32 | +- Cross-platform support via .NET |
| 33 | + |
| 34 | +## Usage |
| 35 | + |
| 36 | +Run the tool with the following command: |
| 37 | + |
| 38 | +```bash |
| 39 | +dotnet run --project src/ClI -- <SourceMap> <TargetMap> <InputMidiFile> |
| 40 | +``` |
| 41 | + |
| 42 | +- `<SourceMap>` and `<TargetMap>`: Mapping names (see **Available Mappings**) |
| 43 | +- `<InputMidiFile>`: Path to your MIDI file |
| 44 | + |
| 45 | +The `--project src/ClI` option tells `dotnet` to run the CLI project directly. |
| 46 | + |
| 47 | +## Available Mappings |
| 48 | + |
| 49 | +Mappings are stored in the **Services/Resources/Maps/** directory. Specify the mapping name as a command-line argument when running the tool. |
| 50 | + |
| 51 | +**Included mappings:** |
| 52 | +- GuitarPro |
| 53 | +- LogicPro |
| 54 | +- ProTools |
| 55 | +- StevenSlate |
| 56 | + |
| 57 | +You can use these standards or create your own custom mapping. |
| 58 | + |
| 59 | +## Configuration |
| 60 | + |
| 61 | +Mappings are defined as JSON files in the **Services/Resources/Maps/** directory. You can create or modify mapping files to suit your needs. See the sample files for format and usage. |
| 62 | + |
| 63 | +### Example Mapping File |
| 64 | + |
| 65 | +Example (**Services/Resources/Maps/ExampleMap.json**): |
| 66 | + |
| 67 | +```json |
| 68 | +{ |
| 69 | + "name": "ExampleMap", |
| 70 | + "mapping": { |
| 71 | + "Kick": 36, |
| 72 | + "Snare": 38, |
| 73 | + "HiHatClosed": 42, |
| 74 | + "HiHatOpen": 46, |
| 75 | + "TomLow": 41, |
| 76 | + "TomMid": 45, |
| 77 | + "TomHigh": 48, |
| 78 | + "Crash": 49, |
| 79 | + "Ride": 51 |
| 80 | + } |
| 81 | +} |
| 82 | +``` |
| 83 | + |
| 84 | +Customize the `"name"` and MIDI note numbers as needed for your drum kit or standard. |
| 85 | + |
| 86 | +> **Note:** The numbers correspond to MIDI note numbers as used by the [DryWetMIDI](https://melanchall.github.io/drywetmidi/) library. |
| 87 | +> For a full list of MIDI note numbers and their corresponding drum sounds, refer to the [General MIDI Percussion Key Map](https://www.midi.org/specifications-old/item/gm-level-1-sound-set), your drum kit's documentation, or the [DryWetMIDI documentation](https://melanchall.github.io/drywetmidi/articles/notes.html). |
| 88 | +
|
| 89 | +## Example |
| 90 | + |
| 91 | +**Input:** A MIDI file mapped for GuitarPro |
| 92 | +**Command:** |
| 93 | +```bash |
| 94 | +dotnet run --project src/ClI -- GuitarPro StevenSlate midis/test.mid |
| 95 | +``` |
| 96 | +**Output:** A MIDI file remapped for StevenSlate drums. |
| 97 | + |
| 98 | +## Troubleshooting & FAQ |
| 99 | + |
| 100 | +- **Build errors:** Ensure you have the correct .NET SDK installed. |
| 101 | +- **Mapping not found:** Check the spelling and existence of your mapping file in **Services/Resources/Maps/**. |
| 102 | +- **MIDI file issues:** Verify your input file is a valid MIDI file. |
| 103 | + |
| 104 | +## Contributing |
| 105 | + |
| 106 | +Contributions are welcome! Please open issues or submit pull requests. |
| 107 | + |
| 108 | +### Adding a New Mapping |
| 109 | + |
| 110 | +1. Create a new JSON mapping file in the **Services/Resources/Maps/** directory. |
| 111 | +2. Add your mapping details following the format shown above. |
| 112 | +3. Update the mapping enum in `Models/DrumMapType.cs` to include your new mapping. |
| 113 | +4. Submit a pull request with your changes. |
| 114 | + |
| 115 | +This helps keep all mappings organized and available for everyone. |
| 116 | + |
| 117 | +## Related Projects |
| 118 | + |
| 119 | +- [DryWetMIDI](https://melanchall.github.io/drywetmidi/) - MIDI processing library used by this tool |
| 120 | + |
| 121 | +## License |
| 122 | + |
| 123 | +MIT License |
0 commit comments