Frando / rust-faust

Easily use FAUST DSPs in Rust
Apache License 2.0
52 stars 11 forks source link

Add support for UI label metadata #5

Closed Jikstra closed 2 years ago

Jikstra commented 2 years ago

https://faustdoc.grame.fr/manual/syntax/#ui-label-metadata

I implemented ParamsBuilder::declare, which is getting called throug FaustDsp::build_user_interface_static. Screenshot_20220723_195909

Sadly it's getting called before the actual widget is getting inserted, so declare is inserting a "default" Node.

To make add_widget properly work with this, i had to change it a bit. As it didn't check if the self.inner hashmap already contains a Node with this id. It now checks for this, and if it exists, updates the existing Node.