Redis publish bugfix

This commit is contained in:
sam 2021-04-10 15:21:26 +02:00
parent 11ee70adcc
commit ba927a9ab4
3 changed files with 11 additions and 61 deletions

View File

@ -4,9 +4,10 @@ Miredis hooks to all midi devices connected and listen for events.
Miredis can optionnaly hook to opensourced Link protocol (200+ music & videos apps) -> "/beat" & "/bpm"
All events are forwarded to a redis server and an OSC server.
![Clitools](https://www.teamlaser.fr/images/miredispad.png)
Run :
Run (not with python 3.9)
python3 miredis.py
@ -23,7 +24,7 @@ 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
- Added custom redis 'key event', to be more semantic/hardware agnostic with Configuration file : miredis.json. i.e "/feedback/1/114/value" is generated each time a CC message on channel 1, CC 114 is recevied.
## OSC
@ -44,6 +45,8 @@ python3 miredis.py -link
/bpm bpm
/Your custom (see configuration file). Ex : /feedback midichannel ccnumber value
## Redis keys
@ -57,7 +60,7 @@ python3 miredis.py -link
"/bpm" value : "currentbpm"
custom ones
## Redis : midi events published to "/midi/last_event"
@ -67,3 +70,4 @@ python3 miredis.py -link
"/midi/cc/midichannel/ccnumber/ccvalue"
customs one like "/feedback/1/114/value"

View File

@ -395,7 +395,8 @@ def MidinProcess(inqueue, portname):
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]))
SendOSC(param["name"],[msg[0]-175-1, msg[1], msg[2]])
toKeyevent(param["name"]+"/"+ str(MidiChannel)+"/"+str(msg[1])+"/"+str(msg[2]))
if msg[0] == TIMING_CLOCK:

View File

@ -5,65 +5,10 @@
miredis
v0.1
Forward midi events to a redis.
# CC rotary -> midi CC.
cross 49
joystick UD 57
joystick LR 56
LEFT:
menu 7
play/pause 8
cue 9
beat 10
pitch + 19
pitch - 20
jog 54
headset 21
volume 50
load deck 27
beatlck 22
1 15
2 14
3 13
bass 46
medium 47
trebble 48
track - 11
track + 12
RIGHT:
menu 1
play/pause 2
cue 3
beat 4
pitch + 23
pitch - 24
jog 55
headset 25
volume 51
load deck 28
beatlck 26
1 16
2 17
3 18
bass 43
medium 44
treblle 45
track - 5
track + 6
Forward midi events to OSC and redis.
by Sam Neurohack
from /team/laser
from ProtonPhoton
"""
from libs import log