graphic gui elements in effect plugins

Discussion in 'Effects and the DSP' started by stylus02, Dec 2, 2009.

  1. Chester01

    Chester01 New Member

    Joined:
    Jan 12, 2004
    Messages:
    492
    Likes Received:
    0
    Trophy Points:
    0
    Beautiful interface there; are you going to do that to the whole driver or just your plugin? :)
     
  2. stylus02

    stylus02 New Member

    Joined:
    Jan 11, 2008
    Messages:
    283
    Likes Received:
    2
    Trophy Points:
    0
    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.

    plugin: (3545)
    http://freenet-homepage.de/stylish-stylus/kxmdemoskin_v1.0.kxl

    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 :))
     
    Last edited: Dec 10, 2009
  3. Chester01

    Chester01 New Member

    Joined:
    Jan 12, 2004
    Messages:
    492
    Likes Received:
    0
    Trophy Points:
    0
    when you say the 'modular' do you mean the dsp/ the dsp plugins?
     
  4. stylus02

    stylus02 New Member

    Joined:
    Jan 11, 2008
    Messages:
    283
    Likes Received:
    2
    Trophy Points:
    0
  5. Chester01

    Chester01 New Member

    Joined:
    Jan 12, 2004
    Messages:
    492
    Likes Received:
    0
    Trophy Points:
    0
    ah gotcha, I dont really use the synthesizer functionality... but good luck :)
     
  6. Lex Nahumury

    Lex Nahumury DH Senior Member

    Joined:
    Jan 5, 2003
    Messages:
    1,944
    Likes Received:
    6
    Trophy Points:
    0
    Are you sure you need 10ms timer?:eek:
    Normaly 50..100ms should be fast enough for such animations.
    (I use ~70ms for peak meters)

    SetTimer() is in msec.
    SetTimer Function ()
     
  7. stylus02

    stylus02 New Member

    Joined:
    Jan 11, 2008
    Messages:
    283
    Likes Received:
    2
    Trophy Points:
    0
    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?
     
  8. Lex Nahumury

    Lex Nahumury DH Senior Member

    Joined:
    Jan 5, 2003
    Messages:
    1,944
    Likes Received:
    6
    Trophy Points:
    0
    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.
     
  9. stylus02

    stylus02 New Member

    Joined:
    Jan 11, 2008
    Messages:
    283
    Likes Received:
    2
    Trophy Points:
    0
    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().

    void ikxmdemoskinPluginDlg::OnTimer(UINT)
    {
    dword tri;
    plugin->get_dsp_register(TRI1_P,&tri); //get lfo amplitude
    plugin->set_param(TRI, tri); //push it to label TRI
    }
     
    Last edited: Dec 10, 2009
  10. Lex Nahumury

    Lex Nahumury DH Senior Member

    Joined:
    Jan 5, 2003
    Messages:
    1,944
    Likes Received:
    6
    Trophy Points:
    0
    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.
     
  11. stylus02

    stylus02 New Member

    Joined:
    Jan 11, 2008
    Messages:
    283
    Likes Received:
    2
    Trophy Points:
    0
    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.
     
    Last edited: Dec 11, 2009
  12. stylus02

    stylus02 New Member

    Joined:
    Jan 11, 2008
    Messages:
    283
    Likes Received:
    2
    Trophy Points:
    0
  13. Lex Nahumury

    Lex Nahumury DH Senior Member

    Joined:
    Jan 5, 2003
    Messages:
    1,944
    Likes Received:
    6
    Trophy Points:
    0

Share This Page

visited