Dane and KX Register Access

Discussion in 'Effects and the DSP' started by Maddogg6, Mar 15, 2007.

  1. Russ

    Russ Well-Known Member

    Joined:
    Jan 17, 2005
    Messages:
    5,722
    Likes Received:
    13
    Trophy Points:
    48
    First you tell it to use the Standard Windows Libraries instead of MFC.

    Then remove the MFC headers (usually the header files begin with AFX* (replace with Windows.h)).

    Then remove any MFC classes that you are using (this is a little more complicated, but if you look up info on the class in MSDN, you should be able to determine if it is a MFC class). You would not have to worry about this so much, as you probably do not use any MFC classes on your own, so it would just be a matter of not using kx GUI.

    BTW: If you think you are lost now using kX GUI, I think you are going to be lost even more trying to use the generic plugin GUI class (at least without some skeleton code that shows the basic stuff to use for reference (no examples in the SDK)).
     
    Last edited: Mar 17, 2007
  2. Max M.

    Max M. h/h member-shmember

    Joined:
    Dec 7, 2002
    Messages:
    2,690
    Likes Received:
    9
    Trophy Points:
    63
    >I think that FxBus and epiloglt are special cases, and they do use resources when we use them in our code.

    no, no - they both never use resources (connected or not - all they use is hardware i/o registers - they are always there - you cannot "allocate" them you cannot "free" them so in that context they are not "resources" at all)

    >do outputs use a GPR?

    yes, 'outputs' are 'gprs'. ('inputs' are those variable that are not registers - but a sort of 'placeholders')

    >For example, the compressor plugin ... total = 13 GPRs ... counter shows ... 11

    Yes, kX does not count 'inputs' in its "GPR" meter (sorry, i misinformed you in prev. thread - i forgot this was a sort of fixed at v36, but note: inputs are still counted in plugin 'info') - more over it actually also counts hw i/o correctly (e.g. does they are not counted in 'GPRs meter' - another misinfo from me) - except fxbuses.

    Hmm, this makes me to concern that FXBus implementation is dirty - i start to think that it does allocate gprs when loading and only after that replaces allocated gprs by fxbus registers (without freeing 'replaced and unused gprs')
    - hmm, this is the thing to think of (if so then we have been wasting 16/32 registers for 5 years :)) - i need to consult with E. on this...
    (looks like i just could not believe it can be done so wrong... doh!)

    edit: although see: [img]http://kxdev.narod.ru/fxbuses.png[/img] - definitely - we need to ask E. what the heck is this :) (screenshot shows that my concerns are unfounded - and it just counts fxbuses because they are declared as outputs but it did not really allocate any dummy gprs - e.g. it's all ok)


    edit2: grayed out 'fxbus panic' info to avoid confusing
     
    Last edited: Mar 17, 2007
  3. Russ

    Russ Well-Known Member

    Joined:
    Jan 17, 2005
    Messages:
    5,722
    Likes Received:
    13
    Trophy Points:
    48
    I knew it was either inputs or outputs...

    Just for clarification:
    Inputs do not count as a GPR? (i.e. they do not use a GPR resource?)

    I understand that the plugin 'info' is a register counter and not a GPR counter (i.e. TRAM addresses (read, write, and the address pointers are all counted as a register in the plugin 'info')).

    Thanks for the info.
     
  4. Maddogg6

    Maddogg6 Tail Razer

    Joined:
    Jun 21, 2005
    Messages:
    4,027
    Likes Received:
    26
    Trophy Points:
    0
    hehe - You're most likely right - Im just asking the Q's as they come to me.
    Unfortunately the become my 'blinders' - when I don't understand concepts.

    It just seems like there sooo much going on 'behind' the scenes.
    I mean I understand headers are used to reveal functions contained in libs in a way that keeps the libs 'private' - this is kinda a new concept for me.

    the last thing I want to do is get on yur nerves. :uhoh: . I'll let you all get some much deserved peace... lolz

    Thanks again for all the help
     
  5. Max M.

    Max M. h/h member-shmember

    Joined:
    Dec 7, 2002
    Messages:
    2,690
    Likes Received:
    9
    Trophy Points:
    63
    >Inputs do not count as a GPR? (i.e. they do not use a GPR resource?)

    Yes. 'input' is an abstract concept.
     
  6. Russ

    Russ Well-Known Member

    Joined:
    Jan 17, 2005
    Messages:
    5,722
    Likes Received:
    13
    Trophy Points:
    48
    Well much of the Windows API is C code or C/C++ mix.
    MFC wraps this stuff up into C++ classes (it is the C++ classes that makes things easier). You can do this yourself and make your own GUI lib (wrapper classes), but it is not something that is easy to do for a beginner, and some of the WinAPI is undocumented.
     
  7. Maddogg6

    Maddogg6 Tail Razer

    Joined:
    Jun 21, 2005
    Messages:
    4,027
    Likes Received:
    26
    Trophy Points:
    0
    So - is the the 'supposed to be' - but.....


    this is the reality (for FXBuss anyway)..
    ??

    too late :rofl:

    phwew - so... its not just me thats defective *small sigh of relief*
     
  8. Russ

    Russ Well-Known Member

    Joined:
    Jan 17, 2005
    Messages:
    5,722
    Likes Received:
    13
    Trophy Points:
    48
    Thanks again :)
    So, I guess it is just FxBus that throws off the GPR counter.

    No, I think it is just mis-counted by the GPR counter, but the plugin loader knows the true count (otherwise it would not load when you do not have enough free GPRs).
     
    Last edited: Mar 17, 2007
  9. Lex Nahumury

    Lex Nahumury DH Senior Member

    Joined:
    Jan 5, 2003
    Messages:
    1,944
    Likes Received:
    6
    Trophy Points:
    0
    Yep of course,.. not using KXGUI is the whole point!
    (That's what i have been yelling all along as you may know)

    I just wanted to make sure that using (free) >VC6 suites (.NET/PSDK etc.etc.)
    to produce a .kxl while NOT using KXGUI is 'trouble free'.

    'Trouble free' in the sense that one;
    - can write .kxl plugins with a Free MS compiler/IDE
    - doesn't need to supply any additional M$xxx DLLs,
    - can produce Debug as well as Release builds,
    - doesn't has to update his/her plugins (all the time) with every new kX driver release
    ... and whatever I forgot

    Do you agree that these statements are correct?
     
  10. Russ

    Russ Well-Known Member

    Joined:
    Jan 17, 2005
    Messages:
    5,722
    Likes Received:
    13
    Trophy Points:
    48
    Yes, I would agree with that (and yes, I know what you meant).
     
  11. Lex Nahumury

    Lex Nahumury DH Senior Member

    Joined:
    Jan 5, 2003
    Messages:
    1,944
    Likes Received:
    6
    Trophy Points:
    0
    :rofl: 'fxbus panic' :rofl:
    Man,.. how do you come up with such phrases?
     
  12. Lex Nahumury

    Lex Nahumury DH Senior Member

    Joined:
    Jan 5, 2003
    Messages:
    1,944
    Likes Received:
    6
    Trophy Points:
    0
    Ok and thanks for the testing.

    Btw; there's no need to write a GUI lib from scratch.
    Depending on license issues there are enough free opensource alternatives to MFC.
    Even VSTGUI (which is all about skinned controls) is opensource now.
    FLTK is also a nice one IMO. (I have used it alot for quick VST dev/testing)
    Anyway, shouldn't be to hard to adapt something for kX plugins.
     
  13. Russ

    Russ Well-Known Member

    Joined:
    Jan 17, 2005
    Messages:
    5,722
    Likes Received:
    13
    Trophy Points:
    48
    Do those GUI libs add any dependencies of there own?

    (i.e. do they add any dependencies to an exe/dll that uses them?)

    <edit>
    Nevermind, I'll look up the info.
    </edit>
     
    Last edited: Mar 17, 2007
  14. Lex Nahumury

    Lex Nahumury DH Senior Member

    Joined:
    Jan 5, 2003
    Messages:
    1,944
    Likes Received:
    6
    Trophy Points:
    0
    nope. btw they are even cross platform.
     
  15. Russ

    Russ Well-Known Member

    Joined:
    Jan 17, 2005
    Messages:
    5,722
    Likes Received:
    13
    Trophy Points:
    48
    Ok, thanks for the info, I will check them out.
     

Share This Page

visited