Compare commits

..

No commits in common. "eb4e3ae5197096c1ebb29b26a7bf3d1d9e0b2dca" and "fc318aa5c2ac028619fb16ad1d61913fe5d59857" have entirely different histories.

5 changed files with 4 additions and 56 deletions

View File

@ -23,7 +23,6 @@ python3 miredis.py -link
- Added verbose mode -v
- Added redis subscribe events
- Added Clitools program selection mode for Launchpads
- Added custom redis key event with Configuration file : miredis.json
## OSC

View File

@ -36,7 +36,7 @@ import os
import re
from collections import deque
from libs import log
import json
oscIP = "127.0.0.1"
oscPORT = 8000
@ -388,14 +388,7 @@ def MidinProcess(inqueue, portname):
# OSC : /midi/cc midichannel ccnumber value
SendOSC("/midi/cc",[msg[0]-175-1, msg[1], msg[2]])
#print("osc :","/midi/cc",[msg[0]-175-1, msg[1], msg[2]] )
for param in conf['params']:
if MidiChannel == param["chanIN"] and param["CC"] == msg[1]:
#print(param["name"]+"/"+ str(msg[1])+"/"+str(msg[2]))
toKeyevent(param["name"]+"/"+ str(msg[1])+"/"+str(msg[2]))
print("osc :","/midi/cc",[msg[0]-175-1, msg[1], msg[2]] )
if msg[0] == TIMING_CLOCK:
@ -1016,21 +1009,7 @@ def listdevice(number):
return midiname[number]
def loadConf():
global conf, nbparam
try:
ConFile = 'miredis.json'
f = open(ConFile,"r")
s = f.read()
conf = json.loads(s)
print("params", len(conf['params']))
nbparam = len(conf['params'])
print(conf)
return True
except Exception as e:
print("_loadPlaylist error when loading '{}':{}".format(ConFile,e))
def check():

View File

@ -1,27 +0,0 @@
{
"params": [
{
"_comment": "Laser CC, Music CC OUT ",
"name": "/velocity",
"chanIN" : 1,
"CC" : 1
},
{
"name": "/strength",
"chanIN" : 1,
"CC" : 3
},
{
"name": "/decay",
"chanIN" : 1,
"CC" : 5
},
{
"name": "/feedback ",
"chanIN" : 1,
"CC" : 114
}
]
}

View File

@ -75,8 +75,6 @@ import argparse
import redis
from libs import midix
import traceback
from pathlib import Path
#myHostName = socket.gethostname()
@ -124,6 +122,8 @@ r = redis.StrictRedis(host=redisIP , port=redisPORT, db=0)
midix.r = r
def Osc():
p = r.pubsub()
@ -160,8 +160,6 @@ if __name__ == '__main__':
import time
midix.check()
midix.loadConf()
midix.toKey("/beats","0.0")
midix.toKey("/bpm",120)
@ -178,4 +176,3 @@ if __name__ == '__main__':
#finally: