mod-audio/mod-ui

Midi CC unbinding doesn't work

Closed this issue · 1 comments

fps commented

I have a pedalboard that has a midi binding for channel 3, cc 0 (Gain2x2 in the below ttl). I want to change it to bind to Quack (_quack in the below ttl). Removing the former in the UI doesn't get reflected in the saved ttl file for the pedalboard (the binding for Gain2x2 persists).

Below is my train of thought hunting for the bug, but I got stuck.

21:25 < fps> where on the mod are the pedalboards stored?
21:26 < fps> oh, .pedalboards
21:28 < fps> ah ok, the previous binding for channel 3 on the old plugin wasn't removed
21:28 < fps> even though i removed it
21:29 < fps> can i just remove it manually from the ttl?
21:31 < fps> weird: these are the identical bindings now:
21:31 -!- Irssi: Pasting 9 lines to #moddevices. Press Ctrl-K if you wish to do this or Ctrl-C to cancel.
21:31 < fps>                
21:31 < fps>     ingen:value 1 ;
21:31 < fps>     midi:binding [
21:31 < fps>         midi:channel 3 ;            
21:31 < fps>         midi:controllerNumber 0 ;
21:31 < fps>         a midi:Controller ;
21:31 < fps>     ] ;
21:31 < fps>     a lv2:ControlPort ,          
21:31 < fps>         lv2:InputPort .            
21:31 < fps> which i have removed from the UI
21:31 < fps> this is the new one:
21:31 -!- Irssi: Pasting 9 lines to #moddevices. Press Ctrl-K if you wish to do this or Ctrl-C to cancel.
21:31 < fps> <_quack_/:bypass>               
21:31 < fps>     ingen:value 1 ;
21:31 < fps>     midi:binding [
21:31 < fps>         midi:channel 3 ;            
21:31 < fps>         midi:controllerNumber 0 ;
21:31 < fps>         a midi:Controller ;
21:31 < fps>     ] ;
21:31 < fps>     a lv2:ControlPort ,          
21:31 < fps>         lv2:InputPort .            
21:31 < fps> loading the pedalboard again seems to parse it from the top so only the first one is effective
21:32 < fps> anyways, it is removed in the UI, but still persists in the file after saving..
21:34 < fps> this happened before in different pedalboards.. saving under a different name makes no difference
21:39 < fps> ok, removing midi bindings seems to be generally broken
21:42 < fps> hmm, ok, so removing a midi binding per web ui sends a POST to:
21:42 < fps> http://modduo.local/effect/parameter/address//graph/_quack_/:bypass
21:42 < fps> with form data 
21:42 < fps> {"uri":"null","label":"GxQuack","minimum":0,"maximum":1,"value":1}
21:42 < fps> key, but no value
21:45 < fps> i have no idea how this route is handled in mod-ui.py though
21:47 < fps> https://github.com/moddevices/mod-ui/blob/master/mod/webserver.py#L783
21:47 < fps> hmmm
21:51 < fps> and gets passed through to this:
21:51 < fps> https://github.com/moddevices/mod-ui/blob/master/mod/host.py#L2810
21:51 < fps> with value being the empty string
21:51 < fps> that empty value is never checked for it seems, so unbinding doesn't seem to happen
fps commented
23:25 < fps> falktx: not sure if i followed the code correctly though. maybe the empty value in the POST has no relevance at all
23:26 < fps> falktx: actually if you look at the form data again:
23:26 < fps> "uri": null
23:26 < fps> and then line
23:26 < fps> https://github.com/moddevices/mod-ui/blob/master/mod/host.py#L2821
23:27 < fps>         if actuator_uri == kMidiUnlearnURI:
23:27 < fps>             return self.send_modified("midi_unmap %d %s" % (instance_id, portsymbol), callback, datatype='boolean')