lichen-community-systems / Flocking

Flocking - Creative audio synthesis for the Web
GNU General Public License v2.0
692 stars 60 forks source link

Resolves gh-271: Provides a new onPortsChanged event. #272

Closed colinbdclark closed 5 years ago

colinbdclark commented 5 years ago

Also updates the flock.ui.midiSelector component to automatically rerender itself when ports change. Minor bug fixing and namespacing in flock.ui.midiSelector.

Note that @the-t-in-rtf has some work on a better, auto-refreshing MIDI selector component, but it still needs some work and should be harmonized with the work in the new flocking-midi repository. My impression is that the flock.ui.selectBox component should also be rewritten from scratch in a proper model idiom, perhaps with the use of gpii.binder.

But for now, this pull request should provide the requisite features requested by users such as the developer of Bubbles. :)

colinbdclark commented 5 years ago

Ok, this change is buggy in the case where a selected port is unplugged; the select box will correctly update itself, but the new port is not actually connected.

Despite my initial optimism, this feature really needs to be introduced in the context of the new flocking-midi rewrite—too many layers of spaghetti and lack of tests here to introduce new changes.