[Clam-devel] resizing InControl arrays (canvas display bug?)

Hernán Ordiales h at ordia.com.ar
Fri Jul 13 06:34:41 PDT 2007


On 7/13/07, Pau Arumi <parumi at iua.upf.edu> wrote:
> En/na Hernán Ordiales ha escrit:
> > hi,
> >
> > In my last commit i've added configurable amount of voices (max 6) and
> > ignoreResidual option to SMSHarmonizer.
> >
> > I have two questions related:
> >
> > 1) there is a way to limit directly DYN_ATTRIBUTE from configuration
> > and also see it reflected to configuration GUI?
> >
> > ATM, is limited when i get that property in this way:
> >
> >     int n_voices = mConfig.GetNumberOfVoices();
> >     if (n_voices>6) n_voices = 6;
> >
> >     mVoicesPitch.Resize(n_voices, "Pitch", this);
> >     mVoicesGain.Resize(n_voices, "Gain", this);
>
> If I understand you want the configuration form (widget) to vary
> depending on the number of voices. You can do that by writing a
> specific form class (there are examples lying around) instead of
> using the generated one.

mmm, i'm already have a configuration widget which vary depending on
the number of voices (check SMSHarmonizerConfig, is it the same you're
proposing?)
i mean one with limits, for this example, with a combo box that can
not reach values over 6


> > 2) Above code is working but there is a bug when you shrink controls
> > amount... (for example from 5 to 2) incontrol std::vector shrink seems
> > work ok, but seems related to canvas display, don't?
> >
> > how can I avoid this?
>
> It is a bug. See when a ProcessingBox gets initialized (with its
> number of ports). It seems that we need to call this init method
> after configuring a processing.

ok, thanks!

-- 
Hernán
http://h.ordia.com.ar
GnuPG: 0xEE8A3FE9




More information about the clam-devel mailing list