mirror of
https://github.com/cyberboy666/r_e_c_u_r.git
synced 2025-12-15 12:50:16 +01:00
improvements to consistency of displaying mod slot labels in the ui, some TODOs added
This commit is contained in:
@@ -290,7 +290,7 @@ class AutomationSourcePlugin(Plugin):
|
|||||||
# else,
|
# else,
|
||||||
# store as last value
|
# store as last value
|
||||||
|
|
||||||
print("WJSEND got pre-interpolated clip: %s" % [ f.f for f in frames if f is not None])
|
print("AutomationSourcePlugin[%s] got pre-interpolated clip: %s" % ( type(self), [ f.f for f in frames if f is not None]) )
|
||||||
|
|
||||||
#last = [ [None]*4, [None]*4, [None]*4 ]
|
#last = [ [None]*4, [None]*4, [None]*4 ]
|
||||||
last = {}
|
last = {}
|
||||||
@@ -362,7 +362,7 @@ class AutomationSourcePlugin(Plugin):
|
|||||||
|
|
||||||
process(self,findex,frame)
|
process(self,findex,frame)
|
||||||
|
|
||||||
print("\nWJSEND got interpolated clip: %s" % [ f.f for f in frames if f is not None ])
|
print("\nAutomationSourcePlugin got interpolated clip: %s" % [ f.f for f in frames if f is not None ])
|
||||||
|
|
||||||
self.distance_cache = {}
|
self.distance_cache = {}
|
||||||
|
|
||||||
|
|||||||
@@ -479,6 +479,12 @@ class Display(object):
|
|||||||
g = '%s'%bar[int(value*(len(bar)-1))]
|
g = '%s'%bar[int(value*(len(bar)-1))]
|
||||||
return g
|
return g
|
||||||
|
|
||||||
|
def get_mod_slot_label(self, slot):
|
||||||
|
sl = 'ABCD'[slot]
|
||||||
|
if slot != self.shaders.selected_modulation_slot:
|
||||||
|
sl = sl.lower()
|
||||||
|
return sl
|
||||||
|
|
||||||
def get_speed_indicator(self, value, convert = True):
|
def get_speed_indicator(self, value, convert = True):
|
||||||
if convert:
|
if convert:
|
||||||
value = (value * 2.0) - 1.0 # convert 0 to 1 to -1 to +1
|
value = (value * 2.0) - 1.0 # convert 0 to 1 to -1 to +1
|
||||||
|
|||||||
@@ -13,9 +13,14 @@ class LFOModulationPlugin(ActionsPlugin,SequencePlugin,DisplayPlugin, Automation
|
|||||||
active = False
|
active = False
|
||||||
|
|
||||||
# for keeping track of LFO levels
|
# for keeping track of LFO levels
|
||||||
level = [0.0]*MAX_LFOS #, 0.0, 0.0, 0.0]
|
level = [0.0]*MAX_LFOS
|
||||||
speed = 0.5
|
speed = 0.5
|
||||||
|
|
||||||
|
# TODO: enable assigning of LFOs to mod slots
|
||||||
|
# with combination/averaging...
|
||||||
|
# needs UI to control it and [ [ 0.0 ] * 4 ] * 4 to handle the mappings?
|
||||||
|
# currently each LFO maps directly to mod slot
|
||||||
|
|
||||||
stop_flag = False
|
stop_flag = False
|
||||||
pause_flag = False
|
pause_flag = False
|
||||||
def __init__(self, plugin_collection):
|
def __init__(self, plugin_collection):
|
||||||
@@ -63,7 +68,9 @@ class LFOModulationPlugin(ActionsPlugin,SequencePlugin,DisplayPlugin, Automation
|
|||||||
for lfo,value in enumerate(self.level):
|
for lfo,value in enumerate(self.level):
|
||||||
display.display_text.insert(END, "lfo {} level: {:4.2f}% {}\t".format(lfo,value*100,display.get_bar(value)))
|
display.display_text.insert(END, "lfo {} level: {:4.2f}% {}\t".format(lfo,value*100,display.get_bar(value)))
|
||||||
display.display_text.insert(END, "{}\t{}\n".format(self.last_lfo_status[lfo], display.get_bar(self.last_lfo_value[lfo])))
|
display.display_text.insert(END, "{}\t{}\n".format(self.last_lfo_status[lfo], display.get_bar(self.last_lfo_value[lfo])))
|
||||||
display.display_text.insert(END, "\t%s\n" % self.formula[lfo])
|
display.display_text.insert(END, "\tslot %s\t%s\n" % (display.get_mod_slot_label(lfo), self.formula[lfo]))
|
||||||
|
|
||||||
|
display.display_text.insert(END, "\n")
|
||||||
|
|
||||||
# AutomationSourcePlugin methods
|
# AutomationSourcePlugin methods
|
||||||
# methods/vars for AutomationSourcePlugin
|
# methods/vars for AutomationSourcePlugin
|
||||||
@@ -178,6 +185,7 @@ class LFOModulationPlugin(ActionsPlugin,SequencePlugin,DisplayPlugin, Automation
|
|||||||
return
|
return
|
||||||
|
|
||||||
for lfo in range(0,self.MAX_LFOS):
|
for lfo in range(0,self.MAX_LFOS):
|
||||||
|
# TODO: this is where would use assignable amounts and average across multiple inputs
|
||||||
if self.level[lfo]>0.0:
|
if self.level[lfo]>0.0:
|
||||||
self.pc.actions.call_method_name(
|
self.pc.actions.call_method_name(
|
||||||
"modulate_param_%s_to_amount_continuous"%lfo,
|
"modulate_param_%s_to_amount_continuous"%lfo,
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ class SoundReactPlugin(ActionsPlugin,SequencePlugin,DisplayPlugin):
|
|||||||
for sourcename in sorted(self.sources):
|
for sourcename in sorted(self.sources):
|
||||||
value = "{:8}:\t".format(sourcename)
|
value = "{:8}:\t".format(sourcename)
|
||||||
for i,level in enumerate(self.levels[sourcename]):
|
for i,level in enumerate(self.levels[sourcename]):
|
||||||
g = "ABCD"[i]+'%s '%self.pc.display.get_bar(level)
|
g = self.pc.display.get_mod_slot_label(i)+'%s '%self.pc.display.get_bar(level)
|
||||||
value += g
|
value += g
|
||||||
value += "\t"
|
value += "\t"
|
||||||
value += self.display_values.get(sourcename) or "{:4.2f}%".format(self.values.get(sourcename,0)*100) or "None"
|
value += self.display_values.get(sourcename) or "{:4.2f}%".format(self.values.get(sourcename,0)*100) or "None"
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ class WJSendPlugin(ActionsPlugin, SequencePlugin, DisplayPlugin, ModulationRecei
|
|||||||
#if arg_name in mods:
|
#if arg_name in mods:
|
||||||
v = mods.get(arg_name,0.0)
|
v = mods.get(arg_name,0.0)
|
||||||
g = '%s'%self.pc.display.get_bar(v)
|
g = '%s'%self.pc.display.get_bar(v)
|
||||||
output += "{}:{}|".format('ABCD'[slot],g)
|
output += "{}:{}|".format(self.pc.display.get_mod_slot_label(slot),g)
|
||||||
if is_selected:
|
if is_selected:
|
||||||
output+="]"
|
output+="]"
|
||||||
output += "\n"
|
output += "\n"
|
||||||
|
|||||||
@@ -87,15 +87,13 @@ class Frame:
|
|||||||
if type(d) is dict and len(d)==0: # skip empty dicts
|
if type(d) is dict and len(d)==0: # skip empty dicts
|
||||||
continue
|
continue
|
||||||
if key in ["selected_shader","layer_active_status","shader_params","shader_speeds","selected_shader_slots"]:
|
if key in ["selected_shader","layer_active_status","shader_params","shader_speeds","selected_shader_slots"]:
|
||||||
# skip these as dealt with above
|
# skip these as dealt with below
|
||||||
pass
|
pass
|
||||||
elif key in ['shader_modulation_levels']:
|
elif key in ['shader_modulation_levels']:
|
||||||
for layer in range(3):
|
for layer in range(3):
|
||||||
o = ""
|
o = ""
|
||||||
for slot in range(4):
|
for slot in range(4):
|
||||||
sl = 'ABCD'[slot]
|
sl = self.pc.display.get_mod_slot_label(slot)
|
||||||
if slot != self.pc.shaders.selected_modulation_slot:
|
|
||||||
sl = sl.lower()
|
|
||||||
o+= sl + "["
|
o+= sl + "["
|
||||||
for param in range(4):
|
for param in range(4):
|
||||||
o += self.pc.display.get_bar(d[layer][param][slot])
|
o += self.pc.display.get_bar(d[layer][param][slot])
|
||||||
@@ -104,8 +102,7 @@ class Frame:
|
|||||||
elif self.pc.get_plugin_for_class_name(key) is not None:
|
elif self.pc.get_plugin_for_class_name(key) is not None:
|
||||||
summary.append(self.pc.get_plugin_for_class_name(key).get_frame_summary(d))
|
summary.append(self.pc.get_plugin_for_class_name(key).get_frame_summary(d))
|
||||||
"""elif key in ["WJSendPlugin"]:
|
"""elif key in ["WJSendPlugin"]:
|
||||||
# tends to be heavy so save it for later
|
# for things that tend to be heavy so dont show
|
||||||
# TODO: ask plugin to format the data for summary?
|
|
||||||
not_shown[key] = d"""
|
not_shown[key] = d"""
|
||||||
else:
|
else:
|
||||||
line += "%s: %s" % (key, d)
|
line += "%s: %s" % (key, d)
|
||||||
|
|||||||
Reference in New Issue
Block a user