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 Apr 21, 2005, 12:21 AM   #1
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!

Echo plugins

Hi all,
One of the first plugins I ever tried to make in kX, was a basic echo plugin, and since I do not see any basic echo plugins included with kx, I thought I would make that plugin available for anyone else that might want to use such a thing.

There are two versions, one is a basic echo (echo with feedback/multiple echo), and the other is a slapback (single echo). Also, I made a few different versions of each to suit different needs (different max delays (250/500/1000ms), and differrent mono/stereo versions (1000ms versions are mono only)). They are small so I put them all in one zip file. Both versions (echo and slapback) have a basic slider, to control the amount of delay (a setting of 0 means no delay, thus no echo), and the echo plugins also have a feedback slider. You can download the zip file (echo.zip) here:

-Russ
Russ is online now   Reply With Quote


Old Apr 21, 2005, 02:37 AM   #2
Apple Fanboy?
 
dj_stick's Avatar
 
Join Date: Jun 2003
Location: Basement of the first floor
Posts: 17,469
Rep Power: 188
dj_stick is godlike in his statusdj_stick is godlike in his statusdj_stick is godlike in his statusdj_stick is godlike in his statusdj_stick is godlike in his statusdj_stick is godlike in his statusdj_stick is godlike in his statusdj_stick is godlike in his statusdj_stick is godlike in his statusdj_stick is godlike in his statusdj_stick is godlike in his status
System Specs

what version of kX are these compiled for?
__________________
Chris - The Aussie Super Mod
Hardwareheaven Rules - Sig Request Thread

How you can help HardwareHeaven by using Digg!

Hardwareheaven Super-Moderator

Quote:
Originally Posted by OmegaRED View Post
You know, there's "off topic" and then there's so freakin' off topic it you gotta wear a straitjacket to join the conversation.
dj_stick is offline   Reply With Quote
Old Apr 21, 2005, 02:39 AM Threadstarter Thread Starter   #3
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!

They are not .dll's, they are just .da's, so they are not limited to any specific kX version.
Russ is online now   Reply With Quote
Old May 20, 2005, 02:47 AM Threadstarter Thread Starter   #4
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 added another plugin to this group. It is called SlapbackFX and is a version of the Slapback plugin, and can be used in place of all of the previous Slapback plugins. What is different about this one, is that it presents you with an options dialog, where you can choose whether it should be mono or stereo, and allows you to choose the maximum delay (per channel if stereo) that you would like to have (in samples or milliseconds). This allows you to customize the plugin to suit your needs and eliminates the need for multiple versions of the same plugin in order to have a mono/stereo option, and different delay amounts, etc. Let me know if you like the idea of using an options dialog like this, etc. This one is compiled for kX 3538 and is available at the same (above) link (SlapbackFX.zip).

-Russ
Russ is online now   Reply With Quote
Old May 20, 2005, 03:11 PM   #5
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 options dialog is a good idea.

I think you should write microseconds instead of ultraseconds.
10^-6 in SI units is micro.
Tril is offline   Reply With Quote
Old May 21, 2005, 01:10 AM Threadstarter Thread Starter   #6
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
I think you should write microseconds instead of ultraseconds.
Doh, you are right (I knew that too, my brain just wasn't cooperating with me I guess, hehe). I made the correction.

Thanks,
Russ
Russ is online now   Reply With Quote
Old May 21, 2005, 03:31 AM Threadstarter Thread Starter   #7
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 noticed a small bug in the code (I had made a change in one part of the code and forgot to make the change in another part of the code) that could cause the calculation of the Tram address to be wrong. I fixed the bug, and also made a version of the regular (multi) Echo plugins that use the options dialog as well (EchoFX, availalble at the same link, also compiled for kX 3538).

Last edited by Russ; May 21, 2005 at 08:31 AM.
Russ is online now   Reply With Quote
Old May 21, 2005, 01:18 PM Threadstarter Thread Starter   #8
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 found a bug with the Options dialog. I create the dialog during request_microcode(), and it turns out that if the tweak window is open when you unload the plugin, that request_microcode() is called 2 more times causing the Options dialog to be created twice before unloading. I am not sure why it does this, but I should be able to code a workaround for that problem.

-Russ
Russ is online now   Reply With Quote
Old May 21, 2005, 06:20 PM   #9
DH Senior Member
 
Join Date: Jan 2003
Location: The Netherlands
Posts: 1,930
Rep Power: 62
Lex Nahumury is just really niceLex Nahumury is just really niceLex Nahumury is just really niceLex Nahumury is just really nice

Quote:
Originally Posted by Russ
I create the dialog during request_microcode()....
-Russ
Try to do this in init().
It is called before request_microcode(). Maybe helps.
/LeMury
Lex Nahumury is offline   Reply With Quote
Old May 21, 2005, 10:44 PM Threadstarter Thread Starter   #10
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!

Thanks for the suggestion, I tried that as well and unfortunatley the same thing happens in init(). I wonder why it does this, I mean why would iKXPlugin::init() get called when unloading the plugin if the tweak window is open? Anyone have any other thoughts/ideas?

Thanks,
-Russ
Russ is online now   Reply With Quote
Old May 22, 2005, 12:58 AM Threadstarter Thread Starter   #11
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!

Currently the only workaround I have is to use a global BOOL variable initialized to FALSE, that I set to TRUE at the IKX_UNLOAD event, and then I only create the dialog if that variable is FALSE. It seems to work, but I do not like using a global variable like this (I would prefer to use a member variable, but I am not sure where I could initialize it, as it will not work in init().). Additionally, I would still like to know the reason behind why init() and request_microcode() is called in this situation as it seems non-logical. Do you think that is a bug?

-Russ

BTW: I have not updated the files for download as of yet, as I am still doing some testing.
Russ is online now   Reply With Quote
Old May 23, 2005, 02:05 AM Threadstarter Thread Starter   #12
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 updated the files.
Russ is online now   Reply With Quote
Old May 25, 2005, 04:03 PM Threadstarter Thread Starter   #13
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 added 3537 versions of my plugins to the download page (although they are untested as I am using 3538).
Russ is online now   Reply With Quote
Old May 28, 2005, 01:55 AM   #14
DH Senior Member
 
Join Date: Jan 2003
Location: The Netherlands
Posts: 1,930
Rep Power: 62
Lex Nahumury is just really niceLex Nahumury is just really niceLex Nahumury is just really niceLex Nahumury is just really nice

Quote:
Originally Posted by Russ
..I mean why would iKXPlugin::init() get called when unloading the plugin if the tweak window is open?
Yes, it looks like a bug to me since it appears to call set_param or set_default too while microcode is already unloaded.
This causes kX driver to output debug error msg.

/LeMury
Lex Nahumury is offline   Reply With Quote
Old May 28, 2005, 01:24 PM Threadstarter Thread Starter   #15
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!

Are you going to contact Eugene about this?
Russ is online now   Reply With Quote
Old May 30, 2005, 10:10 PM   #16
DH Senior Member
 
Join Date: Jan 2003
Location: The Netherlands
Posts: 1,930
Rep Power: 62
Lex Nahumury is just really niceLex Nahumury is just really niceLex Nahumury is just really niceLex Nahumury is just really nice

Quote:
Originally Posted by Russ
Are you going to contact Eugene about this?
Done.
I'm not shure but IIRC it was reported before. Can't remember.
Anyway;
Just tried your echo plugs.
Nice option dialog!
How about ;
- slider readout in ms
- slider mouse scroll
- de-click on delaytime slider adjust
- stereo ping-pong echo
- MTC->Tempo(bpm)->delaytime

(just some ideas)

/LeMury
Lex Nahumury is offline   Reply With Quote
Old May 30, 2005, 11:00 PM Threadstarter Thread Starter   #17
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!

Thanks for the feedback and ideas. My first goal was getting the options dialog to work, and the effect stuff was second, so they are just very basic at the moment. I was thinking that using a dialog like this would be useful for something like an individual outputs plugin (for testing, etc), like we talked about before (rather than having several seperate plugins for each output, you have one and just choose which output you want in the option dialog, etc), and for conserving resources in general. I would definitley like to make the slider adjustments smoother if nothing else (any tips on that?) and I was planning on changing the readout to be in ms, once I moved the controls to C++ code. Ultimately, I was hoping to add a pitch shift option for the echo, but I not sure I am going to be able to do it, as I still have a long way to go with my reading on digital filter theory and the math that goes along with it.

-Russ
Russ is online now   Reply With Quote
Old May 31, 2005, 12:10 AM   #18
DH Senior Member
 
Join Date: Jan 2003
Location: The Netherlands
Posts: 1,930
Rep Power: 62
Lex Nahumury is just really niceLex Nahumury is just really niceLex Nahumury is just really niceLex Nahumury is just really nice

Yep, I understood that the options dialog had priority in your echo plugin.
btw; You may want to store settings once user selection has been made
thereby avoiding the options dialog to re-appear on reboot/restart kxmixer.exe.

/LeMury
Lex Nahumury is offline   Reply With Quote
Old May 31, 2005, 12:23 AM Threadstarter Thread Starter   #19
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!

Ahh, I missed that one. Thanks.
Russ is online now   Reply With Quote
Old May 31, 2005, 02:45 PM Threadstarter Thread Starter   #20
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!

Do you (or anyone else) know of an event or flag that I can use to determine whether the plugin is being loaded by the user or by kX? I see the flag in the registry that stores the plugins last state but that is only updated when you exit kxmixer, and not when the plugins are loaded/unloaded. I have some ideas I can try, but I thought I would first check and see if there is something that I may have overlooked.

-Russ
Russ is online now   Reply With Quote
Old May 31, 2005, 08:02 PM   #21
DH Senior Member
 
Join Date: Jan 2003
Location: The Netherlands
Posts: 1,930
Rep Power: 62
Lex Nahumury is just really niceLex Nahumury is just really niceLex Nahumury is just really niceLex Nahumury is just really nice

Easiest way is to use a kSettings object and write/read to/from registry.

/LeMury
Lex Nahumury is offline   Reply With Quote
Old May 31, 2005, 09:49 PM Threadstarter Thread Starter   #22
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 please explain a bit more. I do not see any examples that use kSettings within a plugin. Isn't it just a wrapper class for registry access or is there more to it? (i.e. I am not sure if you are offering a tip for accessing the registry, or if you are speaking about a way to determine how the plugin was loaded/unloaded).

-Russ
Russ is online now   Reply With Quote
Old May 31, 2005, 11:51 PM   #23
DH Senior Member
 
Join Date: Jan 2003
Location: The Netherlands
Posts: 1,930
Rep Power: 62
Lex Nahumury is just really niceLex Nahumury is just really niceLex Nahumury is just really niceLex Nahumury is just really nice

I don't know if it fits your needs, but you could save a flag/settings or whatever in reg,
which you read back on plug load and then do a conditional dialog popup.
(just a thought)

/LeMury
Lex Nahumury is offline   Reply With Quote
Old Jun 1, 2005, 04:32 PM Threadstarter Thread Starter   #24
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!

The underlying problem is still how to determine that kX is restoring settings (from a saved config or at startup, etc). To use such a flag, I would need a specific function/event/condition to tell the plugin to set the flag, but I know of no such function/event/condition. In other words, to use such a flag, I would need some event that would make using such a flag unnecessary (i.e. an On_Restore_Settings event or similair, that only fires when kX is loading a saved configuration from file, or at startup, etc.)).

In any case, thanks for the reply, I know you are busy with your own stuff.
-Russ
Russ is online now   Reply With Quote
Old Jun 2, 2005, 08:31 PM Threadstarter Thread Starter   #25
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!

Here is a .da verison of a ping pong echo plugin. It is mono in, stereo ping pong out. This one is set for 250 ms max delay.
Code:
name "Echo_PP";
copyright "Copyright (c) 2004 by Russ.";
created "06/20/2005";
engine "kX";
; comment "echo - mono in - stereo ping pong out - max delay 250 msec";
guid "5ed9be6b-21d3-491d-9168-8007f3a2ae9d";	   

	xtramsize 24001
; Registers
	input in;
	output out_L, out_R;
	control Delay=0x0, Feedback=0x0;
	temp tmp, tmp_in;

	xdelay write wd0 at 0x0;
	xdelay read rd0 at 0x0;
	xdelay write wd1 at 12001;
	xdelay read rd1 at 12001;
	
; Code
	 macs 	 tmp_in,  in,  0x0,  0x0;
	 acc3 	 out_L,  tmp_in,  0x0,  0x0;
	 acc3 	 out_R,  tmp_in,  0x0,  0x0;
	 macs 	 wd0,  tmp_in,  rd1,  Feedback;	 
	 macs 	 wd1,  rd0,  0x0,  0x0;
	 acc3 	 tmp,  Delay,  0x0,  0x0;
	 skip 	 ccr,  ccr,  0x8,  0x1;
	 macs 	 tmp,  0x7fffffff,  0x0,  0x0;
	 macs 	 out_L,  out_L,  rd0,  tmp;
	 macs 	 out_R,  out_R,  rd1,  tmp;
	 macs 	 &rd0,  &wd0,  0x1770000,  Delay;
	 macs 	 &rd1,  &wd1,  0x1770000,  Delay;
end
Do not forget to make sure there is a blank line after 'end' when you paste the above into Dane.

For a 500 ms version, make the following changes:
----------------------------------------------
xtramsize 48001
...
xdelay write wd1 at 24001
xdelay read rd1 at 24001
...
macs &rd0, &wd0, 0x2EE0000, Delay
macs &rd1, &wd1, 0x2EE0000, Delay
----------------------------------------------

I will add the ping pong version as an option to the EchoFX plugin, once I am able to resolve the restore settings issue.

-Russ
Russ is online now   Reply With Quote
Old Jun 3, 2005, 12:54 AM Threadstarter Thread Starter   #26
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!

Another issue related to the restore settings problem, is that I also have no way to determine which plugin instance it is trying to restore, as pgm_id is only filled in after the microcode is loaded, and thus it cannot be used as an instance flag in this case. As it stands now, in order to get this working as I intended, I would need some sort of notification that it is restoring settings, and included with that notification, I would need something that indicates what pgm_id it *wants* to use, and I need this information before request_microcode() is called. It is beginning to look like it is not going to be possible with the current kX SDK.

-Russ
Russ is online now   Reply With Quote
Old Jul 27, 2005, 04:54 AM Threadstarter Thread Starter   #27
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!

Well it seems that the new SDK (with 3538i) does include plugin notifications for when a plugin is loaded from a saved config (as well as the notification for when it is saved in that config), but unfortunatley it occurs too late in the loading process to be able to use for the options dialog (to be able to load dynamic microcode based on those settings). Since previous 3538 plugins need to be recompiled to work with 3538i anyway, and since it seems I am not going to be able to get it to work as I had hoped, I am not going to bother updating these plugins, and I will probably remove them all together from my download page (as they are not really all that useful in thier current state).

BTW: I would need to know the saved settings as early in the loading process as possible (i.e. before request_microcode), so that I can read those settings and fill in the dsp_code/dsp_register_info arrays accordingly, etc.

Last edited by Russ; Aug 9, 2005 at 12:32 PM.
Russ is online now   Reply With Quote
Old Aug 29, 2005, 07:00 PM   #28
kX Project Lead Programmer and Coordinator
 
Join Date: Dec 2002
Posts: 3,106
Rep Power: 73
Eugene Gavrilov has much to be proud ofEugene Gavrilov has much to be proud ofEugene Gavrilov has much to be proud ofEugene Gavrilov has much to be proud ofEugene Gavrilov has much to be proud ofEugene Gavrilov has much to be proud ofEugene Gavrilov has much to be proud ofEugene Gavrilov has much to be proud ofEugene Gavrilov has much to be proud of

>> I would need to know the saved settings as early in the loading process as possible

you can try calling update_microcode() right after receiving 'RESTORE_SETTINGS' event -- before connections are restored

E.
Eugene Gavrilov is offline   Reply With Quote
Old Aug 29, 2005, 09:06 PM Threadstarter Thread Starter   #29
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 had thought about that and wasn't sure if it would work because I noticed it didn't always work as expected in Dane. i.e. Adding inputs/outputs did not always work when updating microcode through Dane. If you think it might work, I will give it a try.

Thanks,
-Russ

<<<before connections are restored
That sounds promising...

Last edited by Russ; Aug 29, 2005 at 10:46 PM.
Russ is online now   Reply With Quote
Old Aug 30, 2005, 04:46 AM Threadstarter Thread Starter   #30
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 did some quick tests, and and think that is going to work.

thanks again,
-Russ
Russ is online now   Reply With Quote
Reply

Bookmarks

Thread Tools