From 9497415dbf845fa9793203b67163e8f2fd728705 Mon Sep 17 00:00:00 2001 From: ejj28 Date: Tue, 3 Mar 2020 15:39:22 -0500 Subject: [PATCH] Updated documentation --- README.md | 17 ++++++++++++++--- docs/index.md | 17 ++++++++++++++--- mididrumhero.py | 4 +++- 3 files changed, 31 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 4764292..2cf0210 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,18 @@ A bridge between E-Kits and Clone Hero ## Usage -- [Download and install vJoy](https://github.com/jshafer817/vJoy/releases) + +### Installation +- [Download and install vJoy for Windows 10 Only](https://github.com/jshafer817/vJoy/releases) +- [Download and install vJoy for other Windows versions](https://github.com/shauleiz/vJoy/releases) - [Download MidiDrumHero](https://github.com/ejj28/mididrumhero/releases/download/v1.0.0/mididrumhero_win64_v1.0.0.zip) and extract -- Open **mididrumhero.exe** and follow the instructions, entering the MIDI ID of your drum kit and hitting the drum pads you'd like to use when prompted -- In Clone Hero, set your mappings for the vJoy controller in the controls menu + +### Configuring +- Use **monitor.exe** to find the Midi note values of the drum pads you would like to map +- Use **configure.exe** to add your pads. Upon first run you may get a warning about a config file not existing; this is fine, a new one will be created. For each pad, enter the proper Midi note number, the button number you would like to map the pad to, and the velocity at which you would like to set the hit threshold at. A good default value is 10; if your drums are sensitive and are registering erroneous hits, adjust the sesitivity as needed. +- When done adding/removing mappings, press the Save button + +### Running +- Open **mididrumhero.exe** +- A list of detected Midi input devices will be shown; enter the number on the left of the device you would like to use +- MidiDrumHero will now convert your E-kit's Midi signals to gamepad button presses \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index 3050964..04d7073 100644 --- a/docs/index.md +++ b/docs/index.md @@ -2,9 +2,20 @@ A bridge between E-Kits and Clone Hero ## Usage -- [Download and install vJoy](https://github.com/jshafer817/vJoy/releases) + +### Installation +- [Download and install vJoy for Windows 10 Only](https://github.com/jshafer817/vJoy/releases) +- [Download and install vJoy for other Windows versions](https://github.com/shauleiz/vJoy/releases) - [Download MidiDrumHero](https://github.com/ejj28/mididrumhero/releases/download/v1.0.0/mididrumhero_win64_v1.0.0.zip) and extract -- Open **mididrumhero.exe** and follow the instructions, entering the MIDI ID of your drum kit and hitting the drum pads you'd like to use when prompted -- In Clone Hero, set your mappings for the vJoy controller in the controls menu + +### Configuring +- Use **monitor.exe** to find the Midi note values of the drum pads you would like to map +- Use **configure.exe** to add your pads. Upon first run you may get a warning about a config file not existing; this is fine, a new one will be created. For each pad, enter the proper Midi note number, the button number you would like to map the pad to, and the velocity at which you would like to set the hit threshold at. A good default value is 10; if your drums are sensitive and are registering erroneous hits, adjust the sesitivity as needed. +- When done adding/removing mappings, press the Save button + +### Running +- Open **mididrumhero.exe** +- A list of detected Midi input devices will be shown; enter the number on the left of the device you would like to use +- MidiDrumHero will now convert your E-kit's Midi signals to gamepad button presses #### Need help? Ping me (ejj28) on the Clone Hero Discord server \ No newline at end of file diff --git a/mididrumhero.py b/mididrumhero.py index 3f99cd3..5eb02a7 100644 --- a/mididrumhero.py +++ b/mididrumhero.py @@ -71,9 +71,11 @@ def millis(): midi_events = i.read(10) for x in midi_events: - if x[0][0] != 248 and x[0][2] != 0: + if x[0][2] != 0: for b in range(len(configData)): + if x[0][1] == configData[b]["midi"] and x[0][2] > configData[b]["velocity"] and states[b] == False: + vController.set_button(configData[b]["button"], 1) lastHitTime[b] = millis() states[b] = True