[Clam-devel] Control mapping

Pau Arumi parumi at iua.upf.edu
Thu May 31 12:55:38 PDT 2007


Xavier Amatriain wrote:
> I am trying to figure out what kind of magic mapping is going on in the
> spectralNetwork example for the NetworkEditor. It is clear that there a
> couple of max values that are wrong in the .ui file (they are set to
> 0!). But for the others I can't figure out where the ranges are taken
> from... It looks a bit weird to have frequencies going into the MHz :)
> And it is clear that it is not a linear mapping from the slider values
> to the controls in CLAM because putting "reasonable" values in does not
> seem to work.


yes it doesn't work the obvious way.
first of all have into account that the sliders and knobs we are
using output integer values, so for with a prefix
"InControlFloat_" we do a simple fixed mapping: the control is
the widget value divided by 100.

see the wiki:
http://clam.iua.upf.edu/wikis/clam/index.php/Network_Editor_tutorial#Building_Interfaces_with_the_Prototyper
InControlFloat__ProcessingName__InControlName
     The same as the previous one but sends double by dividing by 
100


in know by experience that this makes tuning sliders and steps(!)
in qtdesigner very inconvenient.

the good news is that there is a quick (and good?) fix; now that
controls have bounds we could make the mapping happen
automatically in the prototyper. so that instead of giving a
range to the slider it will use the port bounds.

so, when do you have the demo? maybe it can be ready for that.

pau




More information about the clam-devel mailing list