Initial setup
This commit is contained in:
parent
390d616b17
commit
6df64e1262
|
|
@ -0,0 +1,33 @@
|
|||
# Load the config and return an action class
|
||||
class Binding(object):
|
||||
"""Binding class, simple binding between note and actions"""
|
||||
|
||||
def __init__(self, config):
|
||||
self.config=config
|
||||
self.loadConfig()
|
||||
|
||||
def loadConfig(self):
|
||||
pass
|
||||
#Detect config error
|
||||
#Bind all actions to a return message
|
||||
#Make a easy list to acess list of actions
|
||||
def read(gmaMessage):
|
||||
"""Read the gmaMessage and return a list of action"""
|
||||
#Readmessage
|
||||
#Parse message with config
|
||||
#Handle Errors
|
||||
#Return Action or ActionList that can be .run
|
||||
return ActionList()
|
||||
|
||||
class ActionList(object):
|
||||
"""List of action to play after a message is receaved"""
|
||||
|
||||
def __init__(self,list):
|
||||
"""Takes the list of actions detected and
|
||||
pass
|
||||
|
||||
class Action(object):
|
||||
"""Action itself, a mapper for the midi library"""
|
||||
|
||||
def __init__(self,actiontype):
|
||||
self.actiontype=actiontype
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
[interface]
|
||||
input="Scarlett i6"
|
||||
output="Scarlett i6"
|
||||
inputchanel = 1
|
||||
outputchannel = 1
|
||||
|
||||
#Patching faders
|
||||
[patch:1] #Patches layer 1
|
||||
1 = cc/10 #Send (midi) control change (10) with value mapped to the fader (1) value (fader 1 => cc 10)
|
||||
5-50 = cc/11 #Map the faders 5-50 to the control change 11-45 (Straight patch)
|
||||
56 = note/152 #Map fader 56 to note 152
|
||||
56/val = lambda f: x>50 #Function choosing the value to send instead of a simple mapping
|
||||
|
||||
[executor]
|
||||
13 = note/10
|
||||
15 = cc/44/127 #Send control change with value 127
|
||||
17-27 = cc/45/127 # Send control change 45-55 with value 127
|
||||
38 = cc/65/124;cc/79/100;note/25 (Stack the action to link to)
|
||||
Loading…
Reference in New Issue