Discussion in 'Effects and the DSP' started by stylus02, Dec 2, 2009.
Beautiful interface there; are you going to do that to the whole driver or just your plugin?
everything is running. lfo- lamp, plugin controls added. positioning these control: bypass, reset, mute are not easy.. used the timer from "dynamica". readout a lfo register with get_dsp_register and push it to a label. bitmap position is set in "synchronize part" of sourcecode. the lamp is a cmknob member. have decreased timer intervall to 10ms ( i hope this is given in ms) for better results on higher lfo rates. upload workspace later after cleaning.
i want skin the kx modular. the whole driver, you mean the mixer? no, this would be a lot of work. (the modular is hard enough )
when you say the 'modular' do you mean the dsp/ the dsp plugins?
i mean this beast.
ah gotcha, I dont really use the synthesizer functionality... but good luck
Are you sure you need 10ms timer?
Normaly 50..100ms should be fast enough for such animations.
(I use ~70ms for peak meters)
SetTimer() is in msec.
SetTimer Function ()
mmm.. maybe 10ms are to short. a liquid animation should have 25 frames per second. 1000ms/ 25frames = 40ms would be enough. how delicate is a timer call in our situation?
Not sure what you mean with "delicate" but if you mean CPU cycles then it depends on what you do in your on_timer() callback isn't it?
That function is called every 10msec in your case, and I assume that's were all the redrawing stuff starts.
i mean such things like update grafics and sound with possible dropouts while moving windows, playing flash- movies in a webbrowser and so on. i only readout the dsp register and push it to a plugin->set_param(). SetPos() is done outside the ontimer() call in sync().
plugin->get_dsp_register(TRI1_P,&tri); //get lfo amplitude
plugin->set_param(TRI, tri); //push it to label TRI
But that is the same as calling SetPos() directly from onTimer()!
(you just took a little unneeded detour)
onTimer -> set_param() -> sync() -> setpos()
is the same as;
onTimer -> setpos()
In both cases setpos(), (which starts all the drawing stuff) is executed every 10msec.
Look, on todays fast PCs those few extra CPU cycles don't matter, but it is always a good thing to write Lean & Mean code.
it`s my opinion too. (also: more lines -> more errors -> nasty)
sometimes my kx dsp window and the plugins stuck a bit while moving. after closing some other windows it`s fine again. i recognized this on several kx driver installations. (not fatal, but it`s there sometimes)
i tried some intervalls. for my lfo lamp <20ms work much better than e.g. 50ms. so it`s just for a more "real" look.
want show you a led bar i have added to the demoskin. also the cleaned workspace.
now it`s time to do some work on plugins.
Separate names with a comma.