|
|||||||
![]() |
|
|
Thread Tools |
|
|
#1 |
|
DriverHeaven Lover
Join Date: Sep 2003
Location: Romania
Posts: 123
Rep Power: 0 ![]() |
mixy 4x2 update
latest mixy 4x2 version is: v022
Hello, i just finished adding mono mix option to my little mixer and i wanted to let you guys now, u can get it here http://www.geocities.com/picacioiu/ direct link is http://www.geocities.com/picacioiu/mixy4x2v020_3538.bin I hope that starting a new thread does not disturb you too much, And 1 question, what should i change to make it work with 3538i (i didnt tested it yet with 3538i) Last edited by townkat; Aug 17, 2005 at 09:34 PM. |
|
|
|
|
|
#2 |
|
HardwareHeaven Extreme Member
Join Date: Jan 2005
Posts: 5,563
Rep Power: 62 ![]() ![]() ![]() ![]() ![]() ![]() |
You should not have to change anything for 3538i. You should only need to recompile it with updated SDK from 3538i.
|
|
|
|
|
|
|
|
DriverHeaven Lover
Join Date: Sep 2003
Location: Romania
Posts: 123
Rep Power: 0 ![]() |
uhh, so fast
, thnx alot |
|
|
|
|
|
#4 |
|
HardwareHeaven Extreme Member
Join Date: Jan 2005
Posts: 5,563
Rep Power: 62 ![]() ![]() ![]() ![]() ![]() ![]() |
Your welcome.
BTW: I had not had a chance to check out this plugin as of yet. The version that comes with 3538i is the first chance I have had to even look at at. I just thought that I would say that it looks nice. I look forward to trying it out. |
|
|
|
|
|
|
|
DriverHeaven Lover
Join Date: Sep 2003
Location: Romania
Posts: 123
Rep Power: 0 ![]() |
mixy 4x2 v021
- compiled now for 3538i u can get it here http://www.geocities.com/picacioiu/ direct link is http://www.geocities.com/picacioiu/m...v021_3538i.bin cya ps. i am trying to use the method i've seen in info plugin for mixy edit boxes (saving strings), if anyone can help with a short explanation of how is info string saving working i apreciate that alot, thnx Last edited by townkat; Aug 16, 2005 at 08:05 PM. |
|
|
|
|
|
#6 |
|
HardwareHeaven Extreme Member
Join Date: Jan 2005
Posts: 5,563
Rep Power: 62 ![]() ![]() ![]() ![]() ![]() ![]() |
Hmm, I get the "invalid plugin libary" error when trying to register the new 3538i version.
|
|
|
|
|
|
|
|
DriverHeaven Lover
Join Date: Sep 2003
Location: Romania
Posts: 123
Rep Power: 0 ![]() |
try now, it was an upload problem, the file was 1kb only
|
|
|
|
|
|
#8 |
|
HardwareHeaven Extreme Member
Join Date: Jan 2005
Posts: 5,563
Rep Power: 62 ![]() ![]() ![]() ![]() ![]() ![]() |
Ok, that worked.
|
|
|
|
|
|
|
|
DriverHeaven Lover
Join Date: Sep 2003
Location: Romania
Posts: 123
Rep Power: 0 ![]() |
glad to hear that and sorry for the problem
cya |
|
|
|
|
|
#10 |
|
HardwareHeaven Extreme Member
Join Date: Jan 2005
Posts: 5,563
Rep Power: 62 ![]() ![]() ![]() ![]() ![]() ![]() |
As for the string thing:
The save_plugin_settings and load_plugin_settings functions are called whenever the plugin is loaded or saved, etc. A kSettings object is passed by reference through the function for you to use. You need only to specify where in the registry to save (use the plugin name for global plugin settings, or use pgm_id for per plugin (i.e. per instance) settings), the name of the value, and the string itself. The info plugin's source code pretty much shows you exactly how to do it. i.e. cfg.write(section,"info_text",str_param); In the above, "cfg" is the kSettings object from the load/save function's parameters. "section" is where in the registry (under HKEY_CURRENT_USER\Software\kX) the value will be saved to (the info plugin uses the pgm_id to save settings on a per plugin basis). The "info_text" is the name of the key/value. str_param is the char[] that contains your string. To save multiple strings, you would use the same section, but change the other 2 parameters to represent the name value and the string value, etc. Does this help? Last edited by Russ; Aug 16, 2005 at 10:14 PM. Reason: typo |
|
|
|
|
|
|
|
DriverHeaven Lover
Join Date: Sep 2003
Location: Romania
Posts: 123
Rep Power: 0 ![]() |
when i try to add this:
virtual int save_plugin_settings(kSettings &); in my mixy.h i get the folowing error Creating library Debug/demo.lib and object Debug/demo.exp simple.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall iMixyPlugin::save_plugin_settings(class kSettings &)" (?save_plugin_settings@iMixyPlugin@@UAEHAAVkSettin gs@@@Z) Debug/demo.dll : fatal error LNK1120: 1 unresolved externals Error executing link.exe. i mention that my programming skills are some low, thnx |
|
|
|
|
|
#12 |
|
HardwareHeaven Extreme Member
Join Date: Jan 2005
Posts: 5,563
Rep Power: 62 ![]() ![]() ![]() ![]() ![]() ![]() |
...using the 3538i SDK?
It sounds like you forgot to add the implementation of the function(s) to mixy.cpp. i.e. Code:
// add the following to the iMixyPlugin class definition in mixy.h
/*----------------------------------------------------*/
virtual int save_plugin_settings(kSettings &);
virtual int load_plugin_settings(kSettings &);
/*----------------------------------------------------*/
// add the following to mixy.cpp
/*----------------------------------------------------*/
int iMixyPlugin::save_plugin_settings(kSettings &cfg)
{
// add your save code here
return 0;
}
int iMixyPlugin::load_plugin_settings(kSettings &cfg)
{
// add your load code here
return 0;
}
/*----------------------------------------------------*/
|
|
|
|
|
|
|
|
DriverHeaven Lover
Join Date: Sep 2003
Location: Romania
Posts: 123
Rep Power: 0 ![]() |
that works, i am stuck here now
i have 5 edit boxes named edit[5] int iMixyPlugin::save_plugin_settings(kSettings &cfg) { if(pgm_id>0) { char key_name[32]; char kname[10]; CString chnames; sprintf(key_name,"pgm_%d",pgm_id); for (int i=0; i<5; i++) { plugin->edit[i]->GetWindowText(chnames); } plugin->edit[i]->GetWindowText(chnames); does not work anymore, i had this line in void iMixyPluginDlg::on_destroy() and it was workin, i also tryed with edit[i]->GetWindowText(chnames); and same problem thnx Last edited by townkat; Aug 17, 2005 at 08:44 AM. |
|
|
|
|
|
|
|
DriverHeaven Lover
Join Date: Sep 2003
Location: Romania
Posts: 123
Rep Power: 0 ![]() |
ok, its almost done now
is there any way to use edit[i]->GetWindowText( in int iMixyPlugin::save_plugin_settings(; ? i am using now ON_CONTROL(EN_UPDATE,MIXY_PLG_EDIT, and i create edit boxes with MIXY_PLG_EDIT parameter but this disadvantage me because i want to create edit boxes in a for loop and MIXY_PLG_EDIT[5] array is not posible thnx |
|
|
|
|
|
#15 |
|
h/h member-shmember
Join Date: Dec 2002
Location: Evil Empire
Posts: 2,639
Rep Power: 69 ![]() ![]() ![]() ![]() ![]() ![]() |
i suppose you have declared edit[5] as a member of iMixyPluginDlg class and probaly as private member (and that's the right way).
So... the edits cannot be accessed from anywhere except iMixyPluginDlg itself. >plugin->edit[i]->GetWindowText(chnames); could not ever work since "plugin" is a pointer to iKXPlugin (the base of your iMixyPlugin class) and it does not even know what that "edit[?]" is. More over, "plugin" itself is not a member of iMixyPlugin (probably you mean "cp" instead) .... Well, there're many ways to access iMixyPluginDlg's edit[i] from within iMixyPlugin (like ((iMixyPluginDlg*) cp)->edit[i]->GetWindowText(...; // only if edit[] declared as public) However more classical way could be something like: 1. implement some kind of "GetTextOfEdits(int i, char* text, ..) function in iMixyPluginDlg 2. get text with ((iMixyPluginDlg*) cp)->GetTextOfEdits(bla-bla-bla) 3. etc. (could be better) I think you really need some C++ book (e.g. "classes, class members and class members access") Last edited by Max M.; Aug 17, 2005 at 01:29 PM. |
|
|
|
|
|
#16 |
|
h/h member-shmember
Join Date: Dec 2002
Location: Evil Empire
Posts: 2,639
Rep Power: 69 ![]() ![]() ![]() ![]() ![]() ![]() |
ah, and btw. even that way i mentioned above is wrong. Plugin (iMixyPlugin) can receive load/save_plugin_settings when Plugin's Window (iMixyPluginDlg) does not exist at all, (user may never open it or it is already closed). So in most situations you cannot get the text of "edits" from within
save_plugin_settings because there're no "edits" at this moment. (E.g. you need a differrent way to save that text. Probably something like: when text is changed, iMixyPluginDlg immediately lets iMixyPlugin to know that new text value, so that iMixyPlugin can store these strings on its own and save them at any time.... something like... just somewhat similar to plugin's "parameters" implementation) Last edited by Max M.; Aug 17, 2005 at 01:27 PM. |
|
|
|
|
|
|
|
DriverHeaven Lover
Join Date: Sep 2003
Location: Romania
Posts: 123
Rep Power: 0 ![]() |
thnx max,
i have the folowing code now void iMixyPluginDlg::editor_change(void) { CString tmp; for (int i=0; i<5; i++) { edit[i]->GetWindowText(tmp); strncpy(plugin->str_param[i],tmp,sizeof(plugin->str_param[i])); } } something is wrong because i only have edit box 1 working, the rest do not load the saved data. |
|
|
|
|
|
#18 |
|
HardwareHeaven Extreme Member
Join Date: Jan 2005
Posts: 5,563
Rep Power: 62 ![]() ![]() ![]() ![]() ![]() ![]() |
You would need seperate events for each Edit control, and seperate variables (or an array) to store the text from each edit control.
i.e. Code:
BEGIN_MESSAGE_MAP(iMixyPluginDlg, CKXPluginGUI)
// 1 for each edit control
ON_CONTROL(EN_UPDATE, EDITCTRL1, edit1_changed)
ON_CONTROL(EN_UPDATE, EDITCTRL2, edit2_changed)
ON_CONTROL(EN_UPDATE, EDITCTRL3, edit3_changed)
ON_CONTROL(EN_UPDATE, EDITCTRL4, edit4_changed)
ON_CONTROL(EN_UPDATE, EDITCTRL5, edit5_changed)
END_MESSAGE_MAP()
void iMixyPluginDlg::edit1_changed(void)
{
CString tmp;
edit[0]->GetWindowText(tmp);
strncpy(plugin->str_param[0],tmp,sizeof(plugin->str_param[0]));
}
void iMixyPluginDlg::edit2_changed(void)
{
CString tmp;
edit[1]->GetWindowText(tmp);
strncpy(plugin->str_param[1],tmp,sizeof(plugin->str_param[1]));
}
// etc, and str_param would have to be an array to hold 5 char[256] elements
Last edited by Russ; Aug 17, 2005 at 04:52 PM. |
|
|
|
|
|
|
|
DriverHeaven Lover
Join Date: Sep 2003
Location: Romania
Posts: 123
Rep Power: 0 ![]() |
iuhuu,
Thnx alot Russ and Max M., mixy 4x2 v022 - edit boxes behaviour improved, now saving with dsp setings save. u can get it here http://www.geocities.com/picacioiu/ direct link is http://www.geocities.com/picacioiu/m...v022_3538i.bin (rename to .kxl) i belive thats all i can do with edit boxes behaviour, i would also like to be able to save the strings to presets , if anyone have idea how to do that let me know pls. |
|
|
|
|
|
|
|
DriverHeaven Lover
Join Date: Sep 2003
Location: Romania
Posts: 123
Rep Power: 0 ![]() |
look at the time of your edit russ and my post
, i understanded the idea before your edit but the example is great anyway thnx again, cya |
|
|
|
|
|
#21 |
|
HardwareHeaven Extreme Member
Join Date: Jan 2005
Posts: 5,563
Rep Power: 62 ![]() ![]() ![]() ![]() ![]() ![]() |
I Just gave it a quick test, and it works good
![]() As for saving strings with presets, I cannot think of anyway to do it at the moment. You could use a similar method as above, only saving the preset text using the plugin name instead of pgm_id, but unfortunatly there is no virtual function for saving the presets where you could do such a thing. |
|
|
|
|
|
|
|
DriverHeaven Lover
Join Date: Sep 2003
Location: Romania
Posts: 123
Rep Power: 0 ![]() |
its just stranged that they are now saving when u save dsp setings..
thnx for testing cya
|
|
|
|
|
|
#23 | |
|
HardwareHeaven Extreme Member
Join Date: Jan 2005
Posts: 5,563
Rep Power: 62 ![]() ![]() ![]() ![]() ![]() ![]() |
Quote:
|
|
|
|
|
|
|
#24 |
|
h/h member-shmember
Join Date: Dec 2002
Location: Evil Empire
Posts: 2,639
Rep Power: 69 ![]() ![]() ![]() ![]() ![]() ![]() |
>You would need seperate events for each Edit control
>... btw., that can be probably hacked with ON_CONTROL_RANGE Code:
BEGIN_MESSAGE_MAP(iMixyPluginDlg, CKXPluginGUI)
// 1 for all edit controls
ON_CONTROL_RANGE(EN_UPDATE, EDITCTRL1, EDITCTRL5, edit_changed)
END_MESSAGE_MAP()
// it could be only one! ;)
void iMixyPluginDlg::edit_changed(UINT nID)
{
CString tmp;
UINT i = nID - EDITCTRL1;
edit[i]->GetWindowText(tmp);
strncpy(plugin->str_param[i], tmp, sizeof(plugin->str_param[i]));
}
// i've not checked it though...
|
|
|
|
|
|
|
|
DriverHeaven Lover
Join Date: Sep 2003
Location: Romania
Posts: 123
Rep Power: 0 ![]() |
thnx max , plugin crashes if i use that method
russ kx dsp window have in its right up corner two butons, 1 for load settings, and one for save setting. If i change the content of mixy edit boxes and i save with that button and then i clear the dsp wondow and i load the saved settings the data is back ok. So the edit box data can be saved with save setting but not with presets. cya |
|
|
|
|
|
#26 | |
|
HardwareHeaven Extreme Member
Join Date: Jan 2005
Posts: 5,563
Rep Power: 62 ![]() ![]() ![]() ![]() ![]() ![]() |
Quote:
Presets are a different thing, and as I stated previously, I do not know of any way (at least not any simple way... you could always ditch the whole kX preset thing and create your own) to store strings with presets. |
|
|
|
|
|
|
|
|
DriverHeaven Lover
Join Date: Sep 2003
Location: Romania
Posts: 123
Rep Power: 0 ![]() |
ok, i totaly agree
thnx again |
|
|
|
|
|
#28 |
|
HardwareHeaven Extreme Member
Join Date: Jan 2005
Posts: 5,563
Rep Power: 62 ![]() ![]() ![]() ![]() ![]() ![]() |
I can think of a hack way to store the string with the preset (aside from making your own). If you limit the max text to a "x" number of characters, and then create a "x" number of dummy parameters for each edit control, you can store each character as an integer (by it's unicode value or whatever). It would definitley be a hack, but it should work.
|
|
|
|
|
|
#29 |
|
HardwareHeaven Extreme Member
Join Date: Jan 2005
Posts: 5,563
Rep Power: 62 ![]() ![]() ![]() ![]() ![]() ![]() |
BTW: I tried using ON_CONTROL_RANGE as suggested by Max and had no problems.
|
|
|
|
|
|
|
|
DriverHeaven Lover
Join Date: Sep 2003
Location: Romania
Posts: 123
Rep Power: 0 ![]() |
ok, ill try again then
thnx |
|
|
|
![]() |
| Thread Tools | |
|
|