markusschloesser / MackieC4_P3

A Mackie C4 Midi Remote Script for Ableton 11
20 stars 2 forks source link

Auto-Filter issues w re phase char #57

Closed markusschloesser closed 2 years ago

markusschloesser commented 3 years ago

Found it. This should be resolved now,

I am fairly confident this was the actual problem

 Param 16 tuple name <>
 Param 17 tuple name <>
 Param 18 tuple name <>
 Param 19 tuple name <>
 Param 20 tuple name <>

It looks like maybe there is a mismatch between the "parameters" in DEVICE_DICT and the parameters AutoFilter actually exposes (now) which makes this assignment parameter = get_parameter_by_name(self.__chosen_plugin, param_name) not always successful. We were seeing this particular "boost error" because the code was subsequently doing parameter = '' which caused the 'unicode' input value that caused the "boost error"

_Originally posted by @BilldarBagdar in https://github.com/markusschloesser/MackieC4_P3/issues/55#issuecomment-817138339_

markusschloesser commented 3 years ago

Auto-Filter and maybe other devices include special characters like phase °, which are problematic

BilldarBagdar commented 3 years ago

I just found the line AFL_BANK3 = (u'', u'', u'', u'', u'', u'S/C On', u'S/C Mix', u'S/C Gain') in my copy of _Generics.Devices

which aligns with the above "empty" param tuples above. Live's "device parameter banks" are size 8 so, "AFL (auto filter) bank3" would map to our bottom row of encoders (params, 17 - 24; encoders 25 - 32).

which means those 5 parameters, won't be mapped even if AutoFilter actually exposes some parameters there.

I added code to load from the actual device parameter if the "generic name" doesn't match, and got repeaters?

 # Param 0 tuple name <Frequency>              
 # Param 1 tuple name <Resonance>              
 # Param 2 tuple name <Env. Attack>            
 # Param 3 tuple name <Env. Release>           
 # Param 4 tuple name <Env. Modulation>        
 # Param 5 tuple name <LFO Amount>             
 # Param 6 tuple name <LFO Frequency>          
 # Param 7 tuple name <LFO Phase>              
 # Param 8 tuple name <Filter Type>            
 # Param 9 tuple name <LFO Quantize On>        
 # Param 10 tuple name <LFO Quantize Rate>     
 # Param 11 tuple name <LFO Stereo Mode>       
 # Param 12 tuple name <LFO Spin>              
 # Param 13 tuple name <LFO Sync>              
 # Param 14 tuple name <LFO Sync Rate>         
 # Param 15 tuple name <LFO Offset>            

above from Devices.py below from self.__chosen_plugin.parameters[param_index]

 # Param 16 tuple name <LFO Sync Rate>         
 # Param 17 tuple name <LFO Stereo Mode>       
 # Param 18 tuple name <LFO Spin>              
 # Param 19 tuple name <LFO Phase>             
 # Param 20 tuple name <LFO Offset>            

below from Devices.py

 # Param 21 tuple name <S/C On>                
 # Param 22 tuple name <S/C Mix>               
 # Param 23 tuple name <S/C Gain>              

problem is the midi mappings overlap "LFO Sync Rate" for example is mapped to 2 encoders after this update.

I will push the update so you can check it out but I don't know if we want to keep it this way.

markusschloesser commented 3 years ago

Do you also have an AFL_BANK3 line in Devices.py? AFL_BANK3 = (u'', u'', u'', u'', u'', u'S/C On', u'S/C Mix', u'S/C Gain') Are those first 5 strings also empty for you?

yes, empty