HardwareHeaven.com
Looking for the skin chooser?
 
 
  • Home

  • Reviews

  • Articles

  • News

  • Tools

  • GamingHeaven

  • Forums

  • Network

 

Go Back   HardwareHeaven.com > Forums > Hardware and Related Topics > kX Project Audio Driver Support Forum > Effects and the DSP


Reply
 
Thread Tools
Old Jun 17, 2005, 01:37 PM   #31
HardwareHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 5,507
Rep Power: 61
Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!

BTW: I am not sure if those arrays get updated when you change the addresses dynamically (i.e. within microcode) or not. You would have to test it to find out for sure. In any case, you know that you can always use get_tram_addr to get those values.
Russ is offline   Reply With Quote


Old Jun 17, 2005, 01:45 PM   #32
h/h member-shmember
 
Join Date: Dec 2002
Location: Evil Empire
Posts: 2,606
Rep Power: 66
Max M. is a name known to allMax M. is a name known to allMax M. is a name known to allMax M. is a name known to allMax M. is a name known to allMax M. is a name known to all

>if those arrays get updated when you change the addresses dynamically

No, they don't. (they are used only at load/initialization time)
Max M. is offline   Reply With Quote
Old Jun 17, 2005, 03:09 PM   #33
HardwareHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 5,507
Rep Power: 61
Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!

Quote:
Originally Posted by Max M.
>if those arrays get updated when you change the addresses dynamically

No, they don't. (they are used only at load/initialization time)
Yeah, after thinking about it, I figured that was probably the case, as otherwise it would have to be updated 48000 times per second,. Thanks for the info.

Tril, Aside from the above, aren't you calculating those addresses yourself within the C++ code, anyway?
Russ is offline   Reply With Quote
Old Jun 17, 2005, 06:32 PM Threadstarter Thread Starter   #34
S-3D enthusiast
 
Tril's Avatar
 
Join Date: Sep 2004
Location: Canada
Posts: 1,675
Rep Power: 62
Tril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud of
System Specs

Quote:
Tril, Aside from the above, aren't you calculating those addresses yourself within the C++ code, anyway?
Yes. Thank you for taking the time to explain the variables, pointers, etc. I don't think I'll need them but I'm saving this information for future reference.

The exported to c++ code comes from the da file I made. I have the da code file. It's only missing the correct iTramsize and addresses. I can easily make a save function in my plugin that uses the adresses and the iTramsize that are calculated. I know how to make a file and output text to it. I'll use guid generator for the guid line. When clicking a file it will create a .da file and it will putput the correct text to it. I'll make the plugin execute the command that is used to edit dane plugins. That will make the dane editor appear. The user will have to press on save and save the plugin to his/her repertory of choice and then go there to doubleclick on the plugin.

I could make the saving plugin and the registering of the plugin automatic. When pressing on save it would generate the file in a folder chosen by the plugin and it would call the "register the plugin" command. The plugin registered box would then appear and the user would click on ok. So that means that the user would only have to click on save and ok. That is much easier for someone who doesn't know what to do when the editor pops up.

If I do that I have to choose where to save the plugin. It could be in the kX driver folder by reading the location in the registry. But I never had to program somthing to read the registry so I don't know how it's done.

I'm open to advices on what way to go for the save function. The automatic save seems a good idea and the location of the save in the kX installation folder seems to be a logical solution to choosing where to put the plugin. I'll read some tutorials on how to read the registry and I'll probably do it this way. Russ is welcome to direct me to the right tutorial on reading the registry.

Last edited by Tril; Jun 17, 2005 at 06:35 PM. Reason: typo correction
Tril is offline   Reply With Quote
Old Jun 17, 2005, 11:40 PM   #35
HardwareHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 5,507
Rep Power: 61
Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!

Regarding the GUID, again, I do not think you need to generate GUID's from within your plugin. I think you should only need 1 additional GUID that could be generated ahead of time, and be hard coded into your plugin, and re-use it whenever you use your save option.

Regarding registry access, that is not a problem, but I do not see anywhere in the registry that indicates where kx was installed...

For registry access you can use a ksettings objects (see this post for some details), or:
(from the CodeGuru Visual C++ FAQs)
Registry: How can I access the registry?
Registry: How can I write data to the registry?
Registry: How can I read in data from the registry?


-Russ
Russ is offline   Reply With Quote
Old Jun 18, 2005, 12:50 AM   #36
DriverHeaven Senior Member
 
ROBSCIX's Avatar
 
Join Date: Mar 2004
Posts: 1,732
Rep Power: 0
ROBSCIX is on a distinguished road

Why use the registry?..wouldn't it be easier for the Plugin to write a parameter file and the other plugin can access it. Perhaps I don't understand the problem correctly.
ROBSCIX is offline   Reply With Quote
Old Jun 18, 2005, 02:48 AM   #37
HardwareHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 5,507
Rep Power: 61
Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!

I think he meant only to read the registry to get the kx installation location, and to use that location to save the plugin, etc.
Russ is offline   Reply With Quote
Old Jun 18, 2005, 06:03 AM Threadstarter Thread Starter   #38
S-3D enthusiast
 
Tril's Avatar
 
Join Date: Sep 2004
Location: Canada
Posts: 1,675
Rep Power: 62
Tril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud of
System Specs

Quote:
Originally Posted by Russ
I think he meant only to read the registry to get the kx installation location, and to use that location to save the plugin, etc.
That's what I meant. If it's completely automatic I have to choose for the user where to save the plugin. I thought the install path was saved in the registry in the kX folder but it seems that I was wrong. I saw some kX folders written in the registry before. It's not the install path but the save locations, etc. So, where should I save the plugin?

Quote:
Originally Posted by Russ
Regarding the GUID, again, I do not think you need to generate GUID's from within your plugin. I think you should only need 1 additional GUID that could be generated ahead of time, and be hard coded into your plugin, and re-use it whenever you use your save option.
You are right. I guess it was too obvious so I did not think about it.

The only thing left to do before coding the save function is to choose where to save the plugin. Everything else is sorted out.

EDIT :
I thought that I could read the registry here :
HKCU\Software\Microsoft\Windows\CurrentVersion\Exp lorer\Shell Folders
and read the key Personal. I could save the plugin there. What do you think. Is it the correct place to read that info in the registry and is it a good choice? It's there in windows 2k. I suppose it's the same with windows XP but I don't know about windows 98.

Last edited by Tril; Jun 18, 2005 at 06:21 AM. Reason: Added some more.
Tril is offline   Reply With Quote
Old Jun 18, 2005, 07:08 PM   #39
HardwareHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 5,507
Rep Power: 61
Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!

I am not sure, I suppose you could check for the existance of the default (kX) installation folder, and save it there if it exists, otherwise prompt the user to specify that location.
Russ is offline   Reply With Quote
Old Jun 19, 2005, 10:44 PM Threadstarter Thread Starter   #40
S-3D enthusiast
 
Tril's Avatar
 
Join Date: Sep 2004
Location: Canada
Posts: 1,675
Rep Power: 62
Tril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud of
System Specs

I added a save button. It read in the registry where the "TimeBalanceV2" plugin is located and places the new plugin called "TimeBalanceV2 light" in the same folder. It registers the plugin.

To register the plugin I used the code :
Code:
ShellExecute( NULL, "register", (const char *)Path, NULL, NULL, SW_SHOWNORMAL );
It works for me but would that work for everyone?

register executes :
Code:
kxmixer --shell --register-dane %1
Where %1 is the path of the plugin. Would it have been better to execute this command rather than rely on "register" to be associated in windows with the command "kxmixer --shell --register-dane %1"?

This new addition is useful if you want to use this plugin together with plugins that uses a lot of iTram such as "Reverb Lite", "Stereo Chorus" and "Surrounder+".
Tril is offline   Reply With Quote
Old Jun 20, 2005, 12:33 AM   #41
DriverHeaven Senior Member
 
ROBSCIX's Avatar
 
Join Date: Mar 2004
Posts: 1,732
Rep Power: 0
ROBSCIX is on a distinguished road

Question tril, so this new concept the Timebalance light..will that put a new version of the plugin that has edit boxes so you can enter that amounts determined by the main plugin OR are the valuse hardcoded into the timbalancelight?...that would be cool too. This is a good idea then it'll free up some resources huh?...if you need betea testers Happy to help...let me know.
ROBSCIX is offline   Reply With Quote
Old Jun 20, 2005, 01:17 AM Threadstarter Thread Starter   #42
S-3D enthusiast
 
Tril's Avatar
 
Join Date: Sep 2004
Location: Canada
Posts: 1,675
Rep Power: 62
Tril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud of
System Specs

The values are hardcoded in a the plugin called "TimeBalanceV2 light". This second plugin is generated by "TimeBalanceV2". It's the same link as before. Download the plugin again.

Anyone that downloads the plugin is a beta tester as the plugin is still in development.

What's left to do is a skin and interface improvements.
Tril is offline   Reply With Quote
Old Jun 20, 2005, 01:22 AM   #43
DriverHeaven Senior Member
 
ROBSCIX's Avatar
 
Join Date: Mar 2004
Posts: 1,732
Rep Power: 0
ROBSCIX is on a distinguished road

Cool, Very cool very Inventive way to solve the resource issue. So what is the iTram difference between the two?.I mean to say how much less iTram is used by timebalancelight then the original?
I am downloading it right now...thx again for your contribution.
ROBSCIX is offline   Reply With Quote
Old Jun 20, 2005, 01:50 AM Threadstarter Thread Starter   #44
S-3D enthusiast
 
Tril's Avatar
 
Join Date: Sep 2004
Location: Canada
Posts: 1,675
Rep Power: 62
Tril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud of
System Specs

Quote:
Originally Posted by ROBSCIX
So what is the iTram difference between the two?.I mean to say how much less iTram is used by timebalancelight then the original?
The original uses 4006 iTram. The light version can use from 10 to 4006. That depends on the position of your speakers. With my speaker setup, the light version has an iTramsize of 185.
Tril is offline   Reply With Quote
Old Jun 20, 2005, 02:06 AM   #45
DriverHeaven Senior Member
 
ROBSCIX's Avatar
 
Join Date: Mar 2004
Posts: 1,732
Rep Power: 0
ROBSCIX is on a distinguished road

OK, cool so Tril I downloaded from the original link you said..I am using 3538..and I get an invalid plugin library...whats going on dude?...I have your original version registered..I can't do the new one though..I think 3538g...
ROBSCIX is offline   Reply With Quote
Old Jun 20, 2005, 02:25 AM Threadstarter Thread Starter   #46
S-3D enthusiast
 
Tril's Avatar
 
Join Date: Sep 2004
Location: Canada
Posts: 1,675
Rep Power: 62
Tril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud of
System Specs

That's strange. I just downloaded the plugin to make sure the link is correct. I executed the plugin and it registered.

I don't know why it does not work for you. I think it happened before with a plugin from Russ. A file that is installed with the compiler was needed to use the plugin. Without this file, the plugin did not register.

Try to download it again. I removed some libraries that I included when trying different things. They are not required anymore. It may solve the problem or not.
Tril is offline   Reply With Quote
Old Jun 20, 2005, 02:37 AM   #47
DriverHeaven Senior Member
 
ROBSCIX's Avatar
 
Join Date: Mar 2004
Posts: 1,732
Rep Power: 0
ROBSCIX is on a distinguished road

Ok, I'll DL it again and see if it registers..let you know..
ROBSCIX is offline   Reply With Quote
Old Jun 20, 2005, 02:41 AM   #48
DriverHeaven Senior Member
 
ROBSCIX's Avatar
 
Join Date: Mar 2004
Posts: 1,732
Rep Power: 0
ROBSCIX is on a distinguished road

NOPE, grabbed it from the first page of this thread. It says it's compiled for 3538..Try and register and it says invalid plugin library...I can register the first version though..just not this new improved version..weird..what do you think is going on?
ROBSCIX is offline   Reply With Quote
Old Jun 20, 2005, 03:25 AM   #49
HardwareHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 5,507
Rep Power: 61
Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!

Quote:
Originally Posted by Tril
Would it have been better to execute this command rather than rely on "register" to be associated in windows with the command "kxmixer --shell --register-dane %1"?
Either way should work fine. The only issue with your current method would be if a user messed up thier file association for .da files. The second method would avoid that problem. You could also use a third method, which is to just create the 2 registry keys yourself, thus registering it.

BTW: That was a good idea to save it in the same location as TimeBalanceV2.

Last edited by Russ; Jun 20, 2005 at 03:32 AM.
Russ is offline   Reply With Quote
Old Jun 20, 2005, 03:28 AM   #50
HardwareHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 5,507
Rep Power: 61
Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!

I just gave it a quick test, and had no problems registering it, or saving.
Russ is offline   Reply With Quote
Old Jun 20, 2005, 03:37 AM   #51
HardwareHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 5,507
Rep Power: 61
Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!

I see a dependency for MSVCP60D.DLL, that could be causing the problem (which of course I have, so I would not have a problem registering it).
Russ is offline   Reply With Quote
Old Jun 20, 2005, 04:06 AM Threadstarter Thread Starter   #52
S-3D enthusiast
 
Tril's Avatar
 
Join Date: Sep 2004
Location: Canada
Posts: 1,675
Rep Power: 62
Tril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud of
System Specs

Quote:
Originally Posted by Russ
I see a dependency for MSVCP60D.DLL, that could be causing the problem (which of course I have, so I would not have a problem registering it).
What can I do? Is there a way to compile the plugin with the MSVCP60D.DLL statically linked inside the plugin dll so that it works even if the MSVCP60D.DLL file is not present?

ROBSCIX, I suggest you download the MSVCP60D.DLL file and put it in the system32 folder. If the plugin registers after that, we'll know for sure that it is the problem.
Tril is offline   Reply With Quote
Old Jun 20, 2005, 04:12 AM   #53
HardwareHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 5,507
Rep Power: 61
Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!

Your best bet is to just include it with the plugin like Tiger did with his synth (your only other choice would be to try and replace whatever functions you are using from that .dll with other functions (if possible) to remove the dependancy).
Russ is offline   Reply With Quote
Old Jun 20, 2005, 05:13 AM Threadstarter Thread Starter   #54
S-3D enthusiast
 
Tril's Avatar
 
Join Date: Sep 2004
Location: Canada
Posts: 1,675
Rep Power: 62
Tril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud of
System Specs

I use std::ofstream to write the .da file. I think that's what is causing the dependancy (from looking at the linker verbose output). I don't think I can remove the dependancy. Is it legal for me to host the MSVCP60D.DLL file to share with my plugin?
Tril is offline   Reply With Quote
Old Jun 20, 2005, 05:40 AM   #55
HardwareHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 5,507
Rep Power: 61
Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!

Could you use something like CFile instead of ofstream.

Yes, MSVCP60.DLL is a redistributable file.
Russ is offline   Reply With Quote
Old Jun 20, 2005, 05:57 AM Threadstarter Thread Starter   #56
S-3D enthusiast
 
Tril's Avatar
 
Join Date: Sep 2004
Location: Canada
Posts: 1,675
Rep Power: 62
Tril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud of
System Specs

Quote:
Originally Posted by Russ
Could you use something like CFile instead of ofstream.
Maybe. Never heard of it before. I'll look up some info on it and I'll try to use it.
Tril is offline   Reply With Quote
Old Jun 20, 2005, 06:15 AM   #57
HardwareHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 5,507
Rep Power: 61
Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!

BTW: Do you have Dependancy Walker (it usually comes with C++)? It is what I use to check the dependancies (it shows .dll dependancies, and which functions from those .dll's you are using, etc). If you do not have it, you can download it from:

http://www.dependencywalker.com/
Russ is offline   Reply With Quote
Old Jun 21, 2005, 01:27 AM   #58
DriverHeaven Senior Member
 
ROBSCIX's Avatar
 
Join Date: Mar 2004
Posts: 1,732
Rep Power: 0
ROBSCIX is on a distinguished road

Russ, Tril I got the MS runtime put it in the system directory and it registered..thx guys..well now wee know for future reference....Registered the light version etc..everything works as it is supposed to thanks for the help and thanks for the plug in Tril, Nice work.

Last edited by ROBSCIX; Jun 21, 2005 at 01:33 AM.
ROBSCIX is offline   Reply With Quote
Old Jun 21, 2005, 05:21 AM Threadstarter Thread Starter   #59
S-3D enthusiast
 
Tril's Avatar
 
Join Date: Sep 2004
Location: Canada
Posts: 1,675
Rep Power: 62
Tril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud of
System Specs

I have Dependancy Walker. It came with c++. I never used it before because I did not know I had it. Thanks for pointing me to it. It's like c++. There are a lot of very useful functions that you can use but most of the time you don't even know that they exist. You just need someone that know them to tell you the name of the function so you can look up info on msdn or elsewhere.

ROBSCIX, I'm glad that it works and that you like it.
Tril is offline   Reply With Quote
Old Jun 22, 2005, 02:49 AM   #60
DriverHeaven Senior Member
 
ROBSCIX's Avatar
 
Join Date: Mar 2004
Posts: 1,732
Rep Power: 0
ROBSCIX is on a distinguished road

Well yeah I do like it. I think it makes everything a little more "high End". Having the ability to add delay to every speaker as so to optimize signal output based on physical location around the listener and the ability to move the listener within that predefined listening space also is a very innovative addition to KX. That is why I mentioned that I would like to help develop the plugin. Keep up the good work and know your efforts are appreciated and your work is used and enjoyed.
ROBSCIX is offline   Reply With Quote
Reply

Bookmarks

Thread Tools