HardwareHeaven.com

HardwareHeaven.com

Looking for the skin chooser?
 
 
  • Home

  • Hardware reviews

  • Articles

  • News

  • Tools

  • Gaming at HardwareHeaven

  • Forums

 

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


Reply
 
Thread Tools
Old Feb 25, 2007, 11:43 PM   #1
Tail Razer
 
Maddogg6's Avatar
 
Join Date: Jun 2005
Location: Bernyurass, AZ - USA
Posts: 4,027
Rep Power: 0
Maddogg6 will become famous soon enoughMaddogg6 will become famous soon enough

Q: about VC2003 Projects for KX +

Ok - guys, if anyone gets the urge to break out the big 'jug-o-booze' - just ignore this post...
I have a few questions.... (I realize its asking a bit, so simple yes/no answers, while not encouraged, won't be ridiculed, but understood.)

Ok - I can compile the KX demo plugin successfully (woot!)

I have been having fun with that as well as playing around with the DX samples...

- although NO DX D3D samples will compile and I always get this error:
Quote:
k:\DXSDK\Samples\C++\Common\Src\d3dapp.cpp(1582): error C2051: case expression not constant
which, in all cases so far indicates this common window message handling CASE is a problem:
Code:
1582  case HRESULT_FROM_WIN32( ERROR_FILE_NOT_FOUND ):
            _tcscpy( strMsg, _T("Could not load required media." ) );
            break;
Looking at the error tells me that 'ERROR_FILE_NOT_FOUND' - seems to not be an Integer. I looked for the declaration of that 'ERROR_..' constant with no avail... Google has found me nothing relevant. I was getting bug-eyed looking for that answer...

So I dropped that DX stuff in hopes its something simple and stupid on my part and not a sign of bigger problems - at least somethings working, so I'll stick to that for now... (I only included this info as it may be an indicator to my system setup/problems .. ??)

anyway back to KX.... I searched these forums, figuring some one has had to ask what I would assume are noob Q's - but I didnt see anything that answered my Q's.

Im looking at dynamica example and notice theres no '.vcproj' project file. Actually the KX demo is the only one that does have a .vcproj file.
This is a bit confusing to me.

I can for instance, load the dynamica.CPP file - but I cant build/compile (I presume) until I create a new project.

Can I, and what kind of project should I make.? I presume a VC compiled KX plugin is a DLL but renamed to '.kxl' - is this correct?

Is there some way to use the KX demo as a 'template' for a new project? OR

is there a 'template' some where I haven't noticed in the KX SDK (did VC6 not support templates like VC2003 does?) OR

should I add the KX demo Project to the opened dynamica.cpp file?

(those seem to be the ways to 'create' a project so I can build/compile.)

Or am I forced into using a command line to compile those examples?

Ok - next subject:
What I am of attempting is; to copy/paste in attempt to remake the auto-mute plugin, but, instead of sensing if a signal present on FXBIN, I would have a 'check box' to 'swap' inputs by changing dane dynamically.
I see I can 'SET DSP registers' and I also I realize I could do a dane 'skip' based on a register this check box can control, but for illustration purposes..

I was thinking I could change dane code instead of 'just' manipulating dsp registers. Is this possible?. Is it 'simple' for an idiot to follow?

Also - do we use the VS 'visual designer' to make tweak screen GUI layouts - or is that going a bit too far for a noob like me for now ?? I see I can adjust the controls 'LEFT' and 'TOP' params to control 'layout' - so not a big deal but it seems like it would be a bit of a pain.

One more Q - If I try to open the demo's 'plgmth.h' header within the solution explorer, it gives me a 'system can not find specified file' error - and sure enough its not in the demo projects folder... is that an indicator of a problem r what is going on with that?

Thanks in advance for anyone with the king kong sized patients enough to read all that much less answer any of it.

Mark
Maddogg6 is offline   Reply With Quote


Old Feb 26, 2007, 02:34 AM   #2
HardwareHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 5,563
Rep Power: 62
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 D3D thing, what sample is that? I do not even have a file called "d3dapp.cpp". Maybe it is an older sample that is not included in the latest DX SDK?

In any case, it sounds ike you are missing a #include somehwere.
That error appears to be defined in 'winerror.h'.

As for kX plugins, I find it easiest to do the following:
Copy all files from the demo plugin folder (except da_demo.cpp and demo.da) to a new folder.
Then with the following files:
demo.h
demo.cpp
demo.dsp
demo.dsw
simple.cpp

Rename demo.* files to your new plugin/project name.*.
Do a search and replace all (with "Preserve Case" option (I use UltraEdit for this)), and replace all references to the word 'demo' (in the above files) with the name of your plugin (as it should appear in the source code, not the DSP, i.e. using C++ namng conventions (i.e. no spaces, etc)). It usually takes me less than a minute to do all the files. Then you just open the workspace and edit the source code.

When you export your dane source code to C++, just make sure you edit the da_your_plugin.cpp file to use the C++ name instead of the name used in the DSP (anywhere the name appears that is not enclosed in quotes).

As for plgmath.h, it used to be in the demo plugin folder, but it was moved in later versions of the SDK to the 'SDK/h/interface' folder. That should not give you any problems.

Yes, it is a .dll renamed to .kxl.

Using the Visual Designer (dialog editor)?, unfortunatley, no. You manually create and place your controls in your code, as in the demo plugin.

Yes, you can change the DSP code from C++ using the various write_instruction functions, but maybe we should wait until you get to that point, and you can tell us exctly what you want to do, with the Dane source code, and we can tell you if you can do it, and how, etc.

Did I miss anything?
Russ is offline   Reply With Quote
Old Feb 26, 2007, 04:24 AM Threadstarter Thread Starter   #3
Tail Razer
 
Maddogg6's Avatar
 
Join Date: Jun 2005
Location: Bernyurass, AZ - USA
Posts: 4,027
Rep Power: 0
Maddogg6 will become famous soon enoughMaddogg6 will become famous soon enough

Quote:
Originally Posted by Russ View Post
Regarding the D3D thing, what sample is that? I do not even have a file called "d3dapp.cpp". Maybe it is an older sample that is not included in the latest DX SDK?
I guess that possible - but EVERY D3D example gives the exact same error
My latest test was 'Text3D' - same error pointing to the same d3dapp.cpp - is always seen in the 'common' section of the solution explorer. And it seems this 'common' file is common to all the D3D examples.

Quote:
In any case, it sounds ike you are missing a #include somehwere.
That error appears to be defined in 'winerror.h'.
Hmm - it seems I have a few versions of that file - varying in size and date.
But the one that came with the PSDK ('K:\MS Visual Studio .NET\Vc7\PlatformSDK\Include' - 597KB - 7/31/2002) is in a folder defined in VC. As is one that came with WDK ('K:\WDK\inc\api' - 901KB - 11/2/2006)
Both files have that declared as '2L' - I assume is a LONG INTEGER with a value of '1' (we can assign types this way - yes?) - but not an 'INTEGER' the error indicates its expecting.. ?? *scratches head*
Maybe I need to brush up on my types.

edit:
It shows:
including file: K:\WDK\inc\api\winerror.h
When compiling btw.. so its defines, included - but makes no sense to me.

Or: (from the d3dapp.cpp file)
Quote:
case D3DAPPERR_MEDIANOTFOUND:
case HRESULT_FROM_WIN32( ERROR_FILE_NOT_FOUND ):
_tcscpy( strMsg, _T("Could not load required media." ) );
break;

case D3DAPPERR_RESETFAILED:
_tcscpy( strMsg, _T("Could not reset the Direct3D device." ) );
break;
Should that be 'case ERROR_FILE_NOT FOUND'
Instead of 'case HRESULT_FROM_WIN32( ERROR_FILE_NOT_FOUND )'
Looks like an array OR its a function - and maybe that function is not returning a same type result the rest of the CASE's types are defined as. ??
Says something about 'fored inline'...
Anyway...

Quote:
As for kX plugins, I find it easiest to do the following:
Copy all files from the demo plugin folder (except da_demo.cpp and demo.da) to a new folder.
Then with the following files:
demo.h
demo.cpp
demo.dsp
demo.dsw
simple.cpp

Rename demo.* files to your new plugin/project name.*.
Do a search and replace all (with "Preserve Case" option (I use UltraEdit for this)), and replace all references to the word 'demo' (in the above files) with the name of your plugin (as it should appear in the source code, not the DSP, i.e. using C++ namng conventions (i.e. no spaces, etc)). It usually takes me less than a minute to do all the files. Then you just open the workspace and edit the source code.
Ahh ok - Have ya tried making/exporting a project template? - or there problems with that not obvious to me? Like it wont make the da_pluginName.cpp for us with a template..??

Quote:
When you export your dane source code to C++, just make sure you edit the da_your_plugin.cpp file to use the C++ name instead of the name used in the DSP (anywhere the name appears that is not enclosed in quotes).
I'll keep this in mind - but I havent noticed what it is your pointing out.


Quote:
Using the Visual Designer (dialog editor)?, unfortunatley, no. You manually create and place your controls in your code, as in the demo plugin.
I kinda assumed this - I just wanted to make sure I wasn't doing 'the long' way, when a 'visual' way was possible.

Quote:
Yes, you can change the DSP code from C++ using the various write_instruction functions, but maybe we should wait until you get to that point, and you can tell us exctly what you want to do, with the Dane source code, and we can tell you if you can do it, and how, etc.
Well I envisioned:
If check box.checked {
change dane code some how
}
if check box.unchecked {
change dane code some how
}
I guess I looking for a function for a 'load_dsp_code('dane_code.da')' or what ever like the 'set_dsp_register(VOL2_P, (dword)cBtoG(value))' - but yeah, I having a hard time imagining how one would change dane code dynamically.
The set dsp register is pretty simple idea.
I'm guessing the plugin loader knowledge comes into play here with this ??


Quote:
Did I miss anything?
2 more things -
1) you provided info that wasnt directly answering my original Q - none the less was very helpful - but Im still curious...
Ok lets assume I am capable - and I want to start from a completely clean slate - what kind of project would I make for a KX Plugin - there are quite a few templates to choose from, my first instinct is a 'MFC DLL'? but I have a bad track record with my instincts.

2) so.. how do I compile the dynamica example or any other examples - the demo one is the only one with a .vcproj' file.

Thanks again (and again and again ..... infinity... and again)

Mark

Last edited by Maddogg6; Feb 26, 2007 at 04:44 AM.
Maddogg6 is offline   Reply With Quote
Old Feb 26, 2007, 06:01 AM   #4
HardwareHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 5,563
Rep Power: 62
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 Maddogg6 View Post
Both files have that declared as '2L' - I assume is a LONG INTEGER with a value of '1' (we can assign types this way - yes?) - but not an 'INTEGER' the error indicates its expecting.. ?? *scratches head*
Yes, it is a long integer, but with a value of 2.
But the error did not mention anything about a type (did it?)? It says that the 'case expression is not constant'. I am not sure what the problem is with that (I show it as a value of 0x80070002), I think I would have to see the full code myself to see what is wrong.

I think I do have the same samples, but I think they must have been changed, as I do not have that file, and I did a search for the above case statement and could not find it anywhere either.

Quote:
Have ya tried making/exporting a project template? - or there problems with that not obvious to me? Like it wont make the da_pluginName.cpp for us with a template..??
I actually started to make one once, way back when I was first using VC .NET with kX, but stopped when I switched to VC 6. I will have to look around and see if I still have it. Maybe I will finish it (but it would be very basic).

Quote:
Well I envisioned:
If check box.checked {
change dane code some how
}
if check box.unchecked {
change dane code some how
}
I guess I looking for a function for a 'load_dsp_code('dane_code.da')' or what ever like the 'set_dsp_register(VOL2_P, (dword)cBtoG(value))' - but yeah, I having a hard time imagining how one would change dane code dynamically.
The set dsp register is pretty simple idea.
I'm guessing the plugin loader knowledge comes into play here with this ??
Look in kxplugin.h for the various write_instruction functions. What you would be doing is changing an instruction to do something else (you would not want to do anything like load_dsp_code here). If this is the route that your want to go (instead of just setting registers), then write your Dane could based around the idea of modifying one of more of the instructions (but not adding/removing any).

i.e.
Change "macs out, t1, 0, 0" to "macs out, t2, 0, 0", you can change any part of (or the whole) instruction(s).

Quote:
2 more things -
1) you provided info that wasnt directly answering my original Q - none the less was very helpful - but Im still curious...
Ok lets assume I am capable - and I want to start from a completely clean slate - what kind of project would I make for a KX Plugin - there are quite a few templates to choose from, my first instinct is a 'MFC DLL'? but I have a bad track record with my instincts.
I believe it is a 'regular dll using shared mfc dll', but I am not positive. I have never gone this route with kX plugins, because there is no benefit in doing so. Any code generated would not be usable in a plugin, so the best you can get is a blank workspace with (maybe) the right settings. If you want to go that route, look at the makefile that is in the demo plugin folder, and lookup all the compiler switches, etc.

Quote:
2) so.. how do I compile the dynamica example or any other examples - the demo one is the only one with a .vcproj' file.
Again, same as above.
I would do this similair to what I described previously.
Look in the dynamica sources to see what plugin name it uses (dynamica).
Copy over demo.dsp and demo.dsw from the demo plugin and rename them to dynamica.*. Edit these 2 files, replacing any references to 'demo' with 'dynamica', and then use that workspace.

Last edited by Russ; Feb 26, 2007 at 06:22 AM. Reason: typos
Russ is offline   Reply With Quote
Old Feb 26, 2007, 06:06 AM   #5
S-3D enthusiast
 
Tril's Avatar
 
Join Date: Sep 2004
Location: Canada
Posts: 1,676
Rep Power: 64
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

You can change the content of registers.

Here's an example for a plugin that mutes the output. Suppose the following is what the dane code does.

Out = In * register

register is 0x7fffffff if the mute checkmark is unchecked. Result : you hear the sound.
register is 0x0 if the mute checkmark is checked. Result : you mute the sound.
Tril is offline   Reply With Quote
Old Feb 27, 2007, 01:21 PM   #6
DriverHeaven Junior Member
 
Join Date: Mar 2006
Location: Notts, UK
Posts: 68
Rep Power: 0
JohnN is on a distinguished road

Quote:
Originally Posted by Russ View Post
Did I miss anything?
New GUID?

@Maddogg6

When I 1st came here about 1 year back, I knew nothing of kX and it's programming.

Since then I've tried DANE and found how to create controls in that.
I was then sucked in by the pretty graphics which others had done in VC.

So, like you, I too managed to build the demo (w00t !).

From then on, I've just reverse engineered the examples in the SDK.
I used Dynamica for it's roatary controls.
Learnt how the skin the plugin - although the background skin is still called demo.jpg :-)
Learnt how to use Message Maps (?) for VU meters.
Got my fader and button controls from MX8.
etc...

I can only recommend a similar path.

Tweak demo.cpp and learn from the results !

And I dynamically change the DSP code to re-route my mixer sends to different outputs (thanks Max !)

As for re-building Dynamica, I would expect you should be able to add / replace the project files in the SDK demo with Dynamica's and get it working. But I don't really see the point.

Do you have a particular project in mind?

BR
JN
__________________
AMD 64 skt 939 4000+, 2G DDR, XFX6800GT, 80G + 200G, Audigy2 Value, IKEA room
JohnN is offline   Reply With Quote
Old Feb 27, 2007, 04:27 PM Threadstarter Thread Starter   #7
Tail Razer
 
Maddogg6's Avatar
 
Join Date: Jun 2005
Location: Bernyurass, AZ - USA
Posts: 4,027
Rep Power: 0
Maddogg6 will become famous soon enoughMaddogg6 will become famous soon enough

Russ knew I was already aware of the GUID stuff - Ive been giving him head aches for some time now...

Quote:
As for re-building Dynamica, I would expect you should be able to add / replace the project files in the SDK demo with Dynamica's and get it working. But I don't really see the point.
Well - simply to learn from - ya know - tweak it and such - or simply test to make sure VC is working for me - as I had a TON of problems just getting it to compile for me.

Quote:
Do you have a particular project in mind?
Well - I had a use for an 'auto mute' (see other thread) that basically acted as a gate for 1 input - if a signal was present on another input. To automatically use FXBUSS 6/7 if AC3 was decoded - otherwise use prologica rear output into epilogs rear out - but never both - FXBuss 6/7 would have 'priority' if active.

And, Dynamica seems to use some algos I would see as useful (envelopes)
converting control into 'time' instead of abstract numbers etc..
But forgot about all those in fx pack folder too.

So - I figured Id re-make that, only instead of sensing input - Id first make it a simple check box that swapped inputs - simple dane & simple copy-paste C++ to learn from.

I am also learning filters more - and my goal is to to try some simple amp simulation - it seems Lex has done so, so now I know some thing decent can be done with that - I would like to give it a go my self if I can.
But - baby steps... I know.

As for renaming project files - yes thats what Russ recommended too.
Which leads me to my latest Q....

@Russ:
This was a typo I take it - as I would end up with duplicated 'myplugin.cpp'
Quote:
Then with the following files:
demo.h
demo.cpp
demo.dsp
demo.dsw
simple.cpp

Rename demo.* files to your new plugin/project name.*.
It looks like other plugins use the simple.cpp still. What is the purpose of that file - it looks like it is what 'registers' the plugin with KX??

But efx doesnt have that - or any thing that looks like 'plugin' source.. so Im a bit confused with what that demo is showing me. Looks like new 'gui controls' or 'form elements' or what ever is the name for new 'gadgets' or gizmos' we can see or use in a KX C++ compiled Plugin. (3DBar, CMKnob, Static Counter)
I guess Im not sure whats 'demo' or whats 'KX SDK' at times.

@Trill:
Thanks - I do see how that is possible - But I thought I noticed other pugins that were changing the dane code - but it wasn't obvious to me in 'how'.
Im still looking at the headers to get a grasp on all the functions and such.

My original thought were to have several filters I can 'swap' between - like presets - but I now see how presets are simply 'register value arrays' in most cases - when I thought they were actually changing more of the dane code (whole algos even - I *thought*)
Im finding out many of my assumptions are simply wrong - and prolly becoming 'blinders' for me. ??

*goes back to the KX SDK samples*
Maddogg6 is offline   Reply With Quote
Old Feb 27, 2007, 04:42 PM   #8
HardwareHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 5,563
Rep Power: 62
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 Maddogg6 View Post
@Russ:
This was a typo I take it - as I would end up with duplicated 'myplugin.cpp'
No...
Quote:
Rename demo.* files to your new plugin/project name.*.
Demo.* means only files with demo in the name, so it does not include simple.cpp.

Quote:
It looks like other plugins use the simple.cpp still. What is the purpose of that file - it looks like it is what 'registers' the plugin with KX??
Yup, that is pretty much it.

Quote:
But efx doesnt have that - or any thing that looks like 'plugin' source..
fx_efx is the custom controls that Tiger made for use with the EFX plugins (it is not a plugin).

Quote:
- but I now see how presets are simply 'register value arrays' in most cases - when I thought they were actually changing more of the dane code (whole algos even - I *thought*)
No, presets are parameter arrays (not register value arrays). That is a big difference, because parameters by themselves mean nothing to the Dane code, it is what your C++ code does with those parameters that makes the difference. In most case it probably calculates a value based on one or more parameter values, and sets a DSP register, but it might just as well change an instruction, or whatever.

<edit>
To clarify the above, imagine a checkbox, it can either be checked or unchecked (a value of 0 or 1). It's state would be a parameter (0 or 1), but this means nothing to the DSP code. Rather, your C++ code would look at that parameter, and do something based on the value (set a DSP register, modify the DSP code in some way, or maybe just change something in the GUI (i.e. link 2 sliders together)).
</edit>

Last edited by Russ; Feb 27, 2007 at 05:09 PM.
Russ is offline   Reply With Quote
Old Feb 28, 2007, 09:43 PM   #9
DriverHeaven Junior Member
 
Join Date: Mar 2006
Location: Notts, UK
Posts: 68
Rep Power: 0
JohnN is on a distinguished road

Had a go at building the "dynamica" project, and it wasn't too bad !

I assume it's not against any rules, so here it is (~3M):-

http://homepage.ntlworld.com/john.ni...X/Dynamica.zip

Just unzip it to your SDK directory. I think the "demo" files are still in there, but what the heck...
I use VC6, by the way.

As here's a piccy of my build in action so to speak!

http://homepage.ntlworld.com/john.nicholls/kX/dyno.jpg

All I did as a test was to write TEST over the main background image !

In case you don't know the full process to get the pretty graphics:-

WARNING this will over-write the original "dynamica", unless you change the GUID - which I wasn't sure how to do without the DANE source. Perhaps you can just change it the "da_dynamica.cpp"

>Build the project
>Go to the "dynamica/debug" directory
>You'll find "dynamica.kxl" @ 181kB
>Run concat.bat (I wont be offended if you open it first to check what it does )
>This concatenates the "kxdynamica.kxs" graphics file with the .kxl file and is as instructed by E
>You should now have "dynamica.kxl" @ 279kB
>Double click to register it.
>load it into DSP and play !

Now you can hack the oringinal and have fun. Be ready for crashes, though, if you're as limited a programmer as me !



Hey, I've had to re-install kX a few times due to my programming blunders !

One issue, there's no DANE source code. You could re-write it from the "da_dynamica.cpp" file, but that wont be fun.

Hope it works.

BR
JN
__________________
AMD 64 skt 939 4000+, 2G DDR, XFX6800GT, 80G + 200G, Audigy2 Value, IKEA room
JohnN is offline   Reply With Quote
Old Feb 28, 2007, 10:01 PM Threadstarter Thread Starter   #10
Tail Razer
 
Maddogg6's Avatar
 
Join Date: Jun 2005
Location: Bernyurass, AZ - USA
Posts: 4,027
Rep Power: 0
Maddogg6 will become famous soon enoughMaddogg6 will become famous soon enough

@ Russ:
Doh - your right - you said it right - I read it wrong
'Rename DEMO.*' - (I just washed my eyes and cant do a damned thing with em)

And ok - I get the difference between the 'parameters' and registers - I noticed I wasnt the only one to make that mistake (*forgets what thread that was*)

* slaps self, as its only fair to Russ for his patients.*
Im trying... really - I am...

@John:
Quote:
Now you can hack the oringinal and have fun. Be ready for crashes, though, if you're as limited a programmer as me !
Yup that sounds like me... mmm hmmm

Quote:
Hey, I've had to re-install kX a few times due to my programming blunders !
So far so good here - but this will prolly mean I spoke too soon - *reaches for latest KX install files*

But....
Very cool - it looks just like dynamics processor - which I didnt know as I put compiling OPP's (other peoples Projects) aside for now and am concentrating on filters. But I will have fun playing with this none the less.
Thank you.

Mark.
Maddogg6 is offline   Reply With Quote
Old Mar 1, 2007, 12:47 PM   #11
DriverHeaven Junior Member
 
Join Date: Mar 2006
Location: Notts, UK
Posts: 68
Rep Power: 0
JohnN is on a distinguished road

Quote:
Originally Posted by Maddogg6 View Post
So far so good here - but this will prolly mean I spoke too soon - *reaches for latest KX install files*
I'm pleased it worked !

BR
JN
__________________
AMD 64 skt 939 4000+, 2G DDR, XFX6800GT, 80G + 200G, Audigy2 Value, IKEA room
JohnN is offline   Reply With Quote
Old Mar 9, 2007, 09:41 PM Threadstarter Thread Starter   #12
Tail Razer
 
Maddogg6's Avatar
 
Join Date: Jun 2005
Location: Bernyurass, AZ - USA
Posts: 4,027
Rep Power: 0
Maddogg6 will become famous soon enoughMaddogg6 will become famous soon enough

Quote:
Originally Posted by Russ View Post
As for kX plugins, I find it easiest to do the following:
Copy all files from the demo plugin folder (except da_demo.cpp and demo.da) to a new folder.
Then with the following files:
demo.h
demo.cpp
demo.dsp
demo.dsw
simple.cpp

Rename demo.* files to your new plugin/project name.*.
Do a search and replace all (with "Preserve Case" option (I use UltraEdit for this)), and replace all references to the word 'demo' (in the above files) with the name of your plugin (as it should appear in the source code, not the DSP, i.e. using C++ namng conventions (i.e. no spaces, etc)). It usually takes me less than a minute to do all the files. Then you just open the workspace and edit the source code.

When you export your dane source code to C++, just make sure you edit the da_your_plugin.cpp file to use the C++ name instead of the name used in the DSP (anywhere the name appears that is not enclosed in quotes).
Ok - I wanted to Name my C++ plugin 'Slap N Spank Echo'.
But attempting to rename the files - I got errors (presumably from long file names and/or the spaces) - So I instead used 'SlapNSpankEcho'.
Now I would like to use A different name so they show up in the KX DSP as 'Slap and Spank Echo'.

First, I end up with this for the exported to C++ Dane source: (saved as 'da_SlapNSpankEcho.cpp'
Code:
// kX DSP Generated file

// 10kX microcode
// Patch name: 'SlapNSpankEcho'

char *Slap N Spank Echo_copyright="Copyright (c) 2007";
// NOTE: The present DSP microcode dump is protected by the 
// license agreement bundled with the appropriate software 
// package containing this microcode,
// regardless the particular copyright notice is present in the dump.

char *SlapNSpankEcho_engine="kX";
char *SlapNSpankEcho_comment="Based on Russ G Slap Back Echo";
char *SlapNSpankEcho_created="03/06/2007";
char *SlapNSpankEcho_guid="35d4b6ff-e678-4abd-a284-b54cf1aa0cd2";

char *Slap N Spank Echo_name="SlapNSpankEcho";
int SlapNSpankEcho_itramsize=0,SlapNSpankEcho_xtramsize=96002;

dsp_register_info SlapNSpankEcho_info[]={
	
.
.
.
};

dsp_code SlapNSpankEcho_code[]={
.
.
.

};
What can/do I change here to ONLY change how its displayed in the KX DSP menus/module title.?

Thanks,
Mark
Maddogg6 is offline   Reply With Quote
Old Mar 9, 2007, 11:15 PM   #13
HardwareHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 5,563
Rep Power: 62
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:
char *Slap N Spank Echo_name="SlapNSpankEcho";
The above determines the name used in the DSP. Change the text in the quotes to how you want it to appear.

If you look back at the text you quoted, you will see that it says to rename everything (that does not appear in quotes) to use the C++ name (which must use C++ naming conventions (no spaces, etc)).

i.e.
char *SlapNSpankEcho_name="Slap N Spank Echo";
Russ is offline   Reply With Quote
Old Mar 10, 2007, 01:25 AM   #14
DH Senior Member
 
Join Date: Jan 2003
Location: The Netherlands
Posts: 1,932
Rep Power: 64
Lex Nahumury is just really niceLex Nahumury is just really niceLex Nahumury is just really niceLex Nahumury is just really nice

@maddog6:
This is what I generaly do.
Now you can also differentiate between menu_name and dsp_name.
Code:
// in plugin.h
#define NOISEGATE_ACTUALNAME	"NoiseGate"	// name that appears in DSP window.
#define NOISEGATE_KXMENUNAME	"ProFx:NoiseGate"// name that appears in FX Menu


// in plugin.cpp
int iNoiseGatePlugin::request_microcode() 
{
	info=NoiseGate_info; 
	code=NoiseGate_code;
	info_size=sizeof(NoiseGate_info);
	if(NoiseGate_code[0].op!=0xff) code_size=sizeof(NoiseGate_code);
	else	code_size=0;
	itramsize=NoiseGate_itramsize;
	xtramsize=NoiseGate_xtramsize;
	strncpy(name,NOISEGATE_ACTUALNAME,sizeof(name));// force different name

	return 0;
};

// in da_plugin.cpp
char *NoiseGate_name = NOISEGATE_KXMENUNAME;
Note that I 'unrolled' the macro.

HTH,

/Lex.
Lex Nahumury is offline   Reply With Quote
Old Mar 10, 2007, 02:32 AM Threadstarter Thread Starter   #15
Tail Razer
 
Maddogg6's Avatar
 
Join Date: Jun 2005
Location: Bernyurass, AZ - USA
Posts: 4,027
Rep Power: 0
Maddogg6 will become famous soon enoughMaddogg6 will become famous soon enough

Thanks guys...
Yeah its kinda confusing what some of the labels are.
Like - the 'linking' (not linker tho) of the Dane 'control' s and how we address then in the plugin.cpp or was it plugin.h (?? Id have to look again to be sure now)... but yes - Im trying to get a better handle on that stuff now..

Part of my problem may be from doing the 'search & replace' - becuase sreching for 'demo' may still return ' "demo" ' (in quotes). Im thinking I need to do some regexp S&R to feel confident I wont replace wrong entries.

Not sure if that make sense, but my brain is feeling like jelly at the moment.


Thanks again guys.

Mark
Maddogg6 is offline   Reply With Quote
Old Mar 10, 2007, 03:14 AM   #16
HardwareHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 5,563
Rep Power: 62
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 Maddogg6 View Post
Thanks guys...
Part of my problem may be from doing the 'search & replace' - becuase sreching for 'demo' may still return ' "demo" ' (in quotes). Im thinking I need to do some regexp S&R to feel confident I wont replace wrong entries.
The only time that would be a problem is that one case with the da_plugin.cpp file where the plugin name is in quotes. What I usually do is to name the plugin such that it uses the C++ name (in the .da file), before exporting it to C++, and then it is exported using the correct C++ name, and you only need to change the name in quotes (if you want it to be something different).
Russ is offline   Reply With Quote
Reply

Thread Tools