Mostly grammatical errors
This commit is contained in:
parent
cef1fa7dc2
commit
613ad227fa
|
|
@ -1,10 +1,12 @@
|
|||
# midiRebind
|
||||
Get/send midi commands to a GrandMA but can be configured to bind any custom SysEx message
|
||||
Was originally designed to get/send midi commands to a GrandMA but can be configured to bind any custom SysEx or midi (or whatever actually) message
|
||||
|
||||
To do so add a custom patch (or use a currently defined one, but chances are patches made for one SysEx won't work on another) and add a parser in the mapping directory
|
||||
|
||||
# Depends
|
||||
* Mostly mido (pip install mido) for the midi binding and blessings for the testing (pip install blessings)
|
||||
* test.py depends on the submodule minitest witch also depends on blessings but is not necessary
|
||||
* Mostly mido (pip install mido) for the midi binding and rtmidi (sudo apt install python-rtmidi)
|
||||
* test.py depends on the submodule minitest witch also depends on blessings (pip install blessings). test.py is not core of the program
|
||||
* This program is python3 compliant (as long as you install the python3 dependencies instead (pip3 install mido and install python3-rtmidi))
|
||||
|
||||
# Config Syntax
|
||||
|
||||
|
|
|
|||
|
|
@ -26,15 +26,18 @@ class MessageParse(BasicMessageParse):
|
|||
else:
|
||||
raise MatchError
|
||||
|
||||
# This funtion is MANDATORY, it makes the link between MessageParse and Action
|
||||
def CallAction(match,ActionObj):
|
||||
"Make the link between the regex and the action"
|
||||
pass
|
||||
|
||||
# An Action object MUST be included in the file.
|
||||
# Interitance and method override can be used, but aren't needed here
|
||||
# Action(config)
|
||||
Action=BasicAction
|
||||
class Action(BasicAction):
|
||||
"""The list of action to perform when a message is read"""
|
||||
def __init__(self, interface):
|
||||
super(Action, self).__init__(interface)
|
||||
|
||||
# This funtion is MANDATORY, it makes the link between MessageParse and Action
|
||||
def __call__(self,match):
|
||||
"Make the link between the regex and the action"
|
||||
print(match)
|
||||
|
||||
|
||||
# Same as above, import BasicMidiInterface as MidiInterface could be used instead
|
||||
# MidiInterface(config)
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ class BasicMidiInterface(object):
|
|||
print("[ERROR] Impossible to open output {} (available are {})".format(name,mido.get_output_names()))
|
||||
o=None
|
||||
return o
|
||||
|
||||
class BasicMessageParse(object):
|
||||
"""Classic System Specific Midi Message as Hex (BasicSyHexParse).
|
||||
Uses one method, parseMidi to parse the message and return a BasicMapping object with the mapping of the message inside"""
|
||||
|
|
|
|||
Loading…
Reference in New Issue