• Home
  • Reviews
  • Articles
  • News
  • Tools
  • GamingHeaven
  • Forums
  • Network
 

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

Notices

Reply
 
LinkBack Thread Tools
Old Jun 2, 2005, 11:35 AM   #1
S-3D enthusiast
 
Tril's Avatar
 
Join Date: Sep 2004
Location: Canada
Posts: 1,409
Tril is on a distinguished road
System Specs

I made a TimeBalance plugin

I made a TimeBalance plugin. It adjusts four delays using two sliders. You can use it to position the "center" of the sound elsewhere than in the middle of the speakers. For example in a car, the driver is not located in the middle of the vehicle at the same distance from all the speakers. Using this plugin, you can delay the signals going to the four speakers to give the impression to the person sitted in the driver seat that the center of the soundstage is right in front of him rather than to his right behind him. You can also use it for small changes (trimming) to improve spatial imaging.

I'm not sure it works 100% so try it out and comment about it. If you are in the middle of the speakers and move the sound to the left, it's normal to have the impression that the sound is moving to the right. Once you move yourself to the left enough, the sound will center itself.

The coordinates are centered in the middle of the speakers.

The delay of each speaker is displayed as debug text. It was not required to know them to setup the plugin so I did not include them in the interface. If I want to know what is the delay of each speaker, I use DebugView.

This version is removed because the new version is better.


==================================================

New version below. It is much better than the last one. This new plugin is called TimeBalanceV2.

There are two modes. The Basic mode and the Advanced Mode.
  • In Basic mode you enter the distances between the listener and the speakers.
  • In advanced mode, you enter the coordinates of the speakers and of the listener. The avanced mode has the advantage that you can move the listener without having to readjust all the other sliders.
Advanced Mode :
Around the sliders of the listener, there are five distances displayed in blue. These are the distance between the listener and the five speakers.

Between the sliders of the speakers, the are six distances displayed in yellow. These are the distanced between the speakers.

All these distances are displayed to help adjusting the sliders.

How to use the plugin is simple. You connect the inputs and the outputs to the plugin. You adjust all the sliders by using measurements taken in your listening environnement.

I added a save button on the upper-left corner. That creates a new plugin called "TimeBalanceV2 Light" that uses the settings that were used when the button was clicked. It uses less ressources because it uses only what is necessary for the settings selected.

Example :
You adjust the plugin to your liking, press the save button, press ok, unload "TimeBalanceV2" and replace it "TimeBalanceV2 light". That way you leave more iTram free for other plugins.

There are three files in the zip file. Simply uncompress the three files in the same folder and register the kxl file. The two kxs files are the two skins of the plugin. You only have to place them in the same folder as the klx file for them to work.

Note : I have removed the download links for this plugin since it is now installed by the kX drivers install package.

I made an example of what I use with a picture (from an old version of the plugin, the interface has changed a lot since then) :
http://pages.globetrotter.net/samaus...alanceTril.png

Warning : Do not execute the .kxs files. If you do, the skin from my plugin will be used on all kx plugins thus creating problems. If you do it by mistake, execute the file kxskin.kxs and the situation will return to normal. This file is situated in the system32 folder of the computer (C:\WINDOWS\system32\kxskin.kxs in Windows XP).

Last edited by Tril; Oct 15, 2007 at 06:39 PM. Reason: Removed links
Tril is offline   Reply With Quote
Old Jun 2, 2005, 12:27 PM   #2
DriverHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 4,101
Russ has a spectacular aura aboutRuss has a spectacular aura aboutRuss has a spectacular aura about

Sounds interesting. Normally (i.e. with a car stereo), you would use Balance and Fader (i.e. volume differences) to center the image, but with this, you should be able to make it seem as if the speakers themselves are in different locations, etc. I will have to give it a try
Russ is online now   Reply With Quote
Old Jun 2, 2005, 04:07 PM   #3
S-3D enthusiast
 
Tril's Avatar
 
Join Date: Sep 2004
Location: Canada
Posts: 1,409
Tril is on a distinguished road
System Specs

For best results it may be necessary to use another plugin for volume difference together with this plugin. I haven't experimented much yet.

My computer speakers are too close together to test correctly all the range of the plugin so I can't test completely it with my current setup. The speakers are also closer to one end of the room than the other. I have a suboptimal testing environnement.

There is some waste of iTram. I reserved a bit more than necessary to make sure it did not go over. I did not know exactly before coding and trying the plugin how much iTram would be necessary because of rounding/truncation in the calculations, etc. I'll correct that later to conserve ressources.

It's nice to be able to use C++ instead of only Dane. I was able to use negative and positive values on the sliders instead of only positive. The range can also be changed more freely.
Tril is offline   Reply With Quote
Old Jun 2, 2005, 04:21 PM   #4
DriverHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 4,101
Russ has a spectacular aura aboutRuss has a spectacular aura aboutRuss has a spectacular aura about

My current setup is bad (for testing such a plugin) as well. I gave it a try, but with my current setup I could not really tell that the effect was doing much. You may also want to recommend optimal kx settings that should be used with this plugin, as I think some of Surrounders settings would be in direct contrast with your plugin. What settings are you using when testing, 4.0 - Quadro?
Russ is online now   Reply With Quote
Old Jun 2, 2005, 04:42 PM   #5
S-3D enthusiast
 
Tril's Avatar
 
Join Date: Sep 2004
Location: Canada
Posts: 1,409
Tril is on a distinguished road
System Specs

I made the plugin for uipe and the sound system in his/her car.My current setup is not using the default plugins. I only load what I need.

I have four speakers but I almost never use sound encoded for 4 or more channels. My front speakers are 2.1 but not with a separate subwoofer channel. There is a crossover in the speakers. The front speakers are not even 1 meter apart because they are on the desk. The back speakers are very old and very cheap computer speakers. Definitely not the best but better than none.

My back speakers are usually a copy of the front speakers. This setup with four speakers gives an impression of depth compared to only using the front speakers. That's why I use it.

I suppose you could use 4.0 - Rear=Front in surrounder and connect fL, fR, sL, sR to inFL, inFR, inRL, inRR. You could also use 4.0 - Quadro and connect fL to both inFL and inRL, connect fR to inFR, inRR. It would do the same thing.

Other setups can be used too. I would recommand to experiment a bit.
Tril is offline   Reply With Quote
Old Jun 2, 2005, 06:57 PM   #6
DriverHeaven Newbie
 
Join Date: May 2005
Posts: 4
uipe is on a distinguished road

Again and again THANKS

Tomorow if possible I will take my car to a Sound Quality Car installer so that he can help me configure my sound using this really cool plugin

I will post my install than

TRIL I AM YOUR BIGGEST FAN
uipe is offline   Reply With Quote
Old Jun 2, 2005, 09:15 PM   #7
S-3D enthusiast
 
Tril's Avatar
 
Join Date: Sep 2004
Location: Canada
Posts: 1,409
Tril is on a distinguished road
System Specs

Don't be too disappointed if it does not live up to your expectations. I hope it will be good enough for your needs.

If you have experience with alpine digital time correction. You could try to compare with this plugin and tell us if it is better/worse/equal/different.

EDIT :
I think I messed up on the equations. I was too eager to finish the plugin as soon as possible. I'll take the time to think about it more. I'll make some drawings to help visualize what should happen and I'll correct the code. The link wil be back in a few days.

Sorry for the inconvenience.

I hope uipe will see this before going to his sound quality car installer.

Last edited by Tril; Jun 3, 2005 at 12:16 AM.
Tril is offline   Reply With Quote
Old Jun 3, 2005, 03:55 PM   #8
S-3D enthusiast
 
Tril's Avatar
 
Join Date: Sep 2004
Location: Canada
Posts: 1,409
Tril is on a distinguished road
System Specs

Plugin updated with some corrections to the equations. See link in first post. It should now work better.

I also resized the iTram to use only the ressources required.

I'm not sure this plugin does the job perfectly because it does not use the positions of the speakers. For now it will do the job somewhat but I would like to make a plugin in which you enter the position of all the speakers and the position of the "center". The delays would be closer to what they should be to achieve great results. I'm thinking about having a graphical interface in this new plugin. It would display the position of the speakers and the position of the "center". I won't make it soon but it is now in my TODO list of personnals projects.

Last edited by Tril; Jun 3, 2005 at 04:12 PM.
Tril is offline   Reply With Quote
Old Jun 3, 2005, 07:28 PM   #9
DriverHeaven Senior Member
 
ROBSCIX's Avatar
 
Join Date: Mar 2004
Posts: 1,712
ROBSCIX is on a distinguished road

Cool, I'll test it out for ya.. I have been doing the same thing for awhile with the center channel. As my center channel was sitting alot closer to me than my L/R channels., So I would use the Simple delay Plugin to "move it Back" acoustically anyway. Works. I Will try this out later. Your idea about the GUI would be very good. Being able to set the L/R or Center channels using the delays would be quite handy...I'll help you do the graphics if you like..not sure how but I will be willing to help...
ROBSCIX is offline   Reply With Quote
Old Jun 3, 2005, 11:45 PM   #10
S-3D enthusiast
 
Tril's Avatar
 
Join Date: Sep 2004
Location: Canada
Posts: 1,409
Tril is on a distinguished road
System Specs

I should make it 5 channels. I used 4 before because I have four speakers.

What is the usual distance between speakers? I need to know that to know what would be the maximum delay of the plugin. I would appreciate if at least a few people tell me how far apart their speakers are from each others.

The graphics will wait. I can program it right away without graphics and the effect will work. The graphics would only be a plus. The only thing I'm missing is the distance between speakers.

My rear speakers are about 2m away from my front speakers and my front speakers are only 0,7m apart because that's the width of the desk. The rear speakers are 0,7m from each other too.

sqrt(2^2+0,7^2) = 2.119 m in diagonal (FR to RL or FL to RR).
48000 [samples/s] * 1/340 [s/m] * 2.119 [m] = 300 samples

With the position of my speakers, the maximum delay I would need is around 300 samples. I have 5 channels.

300 [samples/channel] * 5 [channels] = 1500 samples

I would need in total 1500 samples of delay.
Tril is offline   Reply With Quote
Old Jun 4, 2005, 04:57 PM   #11
DriverHeaven Newbie
 
Join Date: May 2005
Posts: 4
uipe is on a distinguished road

Sorry for the late anser but I have been having some things in faculty, so only next week will I have time to take an aftertoon just to tune my install.
uipe is offline   Reply With Quote
Old Jun 4, 2005, 08:50 PM   #12
DriverHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 4,101
Russ has a spectacular aura aboutRuss has a spectacular aura aboutRuss has a spectacular aura about

My speaker setup is very non typical, so my layout really wouldn't help you (i.e. my rear speakers are not behind me, etc).

Last edited by Russ; Jun 4, 2005 at 10:25 PM.
Russ is online now   Reply With Quote
Old Jun 4, 2005, 10:21 PM   #13
S-3D enthusiast
 
Tril's Avatar
 
Join Date: Sep 2004
Location: Canada
Posts: 1,409
Tril is on a distinguished road
System Specs

Uipe, I'm writing another plugin where you input the position of the speakers and of the listener. It should be more precise and give a better effect. Think of the current plugin as a prototype design which can be improved.

I'm wasting ressources. I was using a fixed write adress and changing the read adress to change the delay. In the next plugin, I'll change the write and the read address. I don't see why it should not be possible. There will be less waste that way.

I'll use a square of 5m by 5m as the maximum distance for now. It should be enough for almost anyone.
Tril is offline   Reply With Quote
Old Jun 5, 2005, 12:14 PM   #14
DriverHeaven Junior Member
 
Join Date: Oct 2003
Posts: 21
bobo1on1 is on a distinguished road

I have used this type of solution for quite some time, my right speaker is 50 centimeters further away than my left speaker, so I used a simple delay of 72 samples to correct the difference in time.
The difference with and without the delay is huge, with the delay the sound is actually coming from the center , without the delay all the voices are coming from the left.

How do I use this plugin? When I try to register it it says its an invalid plugin.
bobo1on1 is offline   Reply With Quote
Old Jun 5, 2005, 02:02 PM   #15
S-3D enthusiast
 
Tril's Avatar
 
Join Date: Sep 2004
Location: Canada
Posts: 1,409
Tril is on a distinguished road
System Specs

Quote:
Originally Posted by bobo1on1
I have used this type of solution for quite some time, my right speaker is 50 centimeters further away than my left speaker, so I used a simple delay of 72 samples to correct the difference in time.
The difference with and without the delay is huge, with the delay the sound is actually coming from the center , without the delay all the voices are coming from the left.

How do I use this plugin? When I try to register it it says its an invalid plugin.
It's compiled for 3538. I suppose you are using an older version of the drivers and that's why it does not work.

I'll post a new version of the plugin later today. It works a lot better. It is functionnal right now but I want to improve the interface a little before posting it. It needs a lot of iTram to work for different speakers placements. To use less resosurces, you could use it for calculating the delays and write your own delay plugin with those delays.

It works really well. When listening to music, previously the singer voice seemed to come from a large area. Now, it sounds more as if it comes from a single point. Impressive difference.


I have an idea. Russ or any other programmer could tell me if it is a good idea or if it's stupid. My plugin calculates the delays and set the read and write adresses. I could add an export(save) button to the plugin. Pressing the button would write a dane plugin using the delays calculated by my plugin.

That way, you adjust your system with my plugin that uses a lot of iTram. When satisfied, you press the export button. It writes to disk a dane file with the correct delays. You register that new plugin. You unload the ressource hog plugin and load the new plugin that only uses the necessary ressources.

I know that I would personnally find that useful and that I would use it. Dane files are only txt files so it should not be too hard. Is the code that calculates guid in the SDK?
Tril is offline   Reply With Quote
Old Jun 5, 2005, 03:53 PM   #16
DriverHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 4,101
Russ has a spectacular aura aboutRuss has a spectacular aura aboutRuss has a spectacular aura about

Sounds like a good idea to me. There are Windows Platform SDK functions for generating GUID's, i.e. CoCreateGuid, UuidCreateSequential, UuidCreate, etc. See the MFC sample GUIDGEN for example source code.

-Russ
Russ is online now   Reply With Quote
Old Jun 5, 2005, 04:10 PM   #17
S-3D enthusiast
 
Tril's Avatar
 
Join Date: Sep 2004
Location: Canada
Posts: 1,409
Tril is on a distinguished road
System Specs

New version available. See first post. Don't bash too much on the interface, I'm not an artist.
Tril is offline   Reply With Quote
Old Jun 5, 2005, 10:14 PM   #18
DriverHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 4,101
Russ has a spectacular aura aboutRuss has a spectacular aura aboutRuss has a spectacular aura about

I was thinking about it, and one of the problems with my options dialog is the need for per instance settings (because of the type of plugins I was using with it). But with this plugin, I imagine there would be no need for muliitple instances of it (at the same time on the same computer), and thus you could use methods similair to what I did with the options dialog with this plugin, but without the problems (because you would be saving the settings for future use). It would work similair to exporting .da files but you would not need export anything, and this way all your controls can still be C++ controls, etc. Let me know what you think, and I will post some of the details.

-Russ

Last edited by Russ; Jun 5, 2005 at 10:31 PM.
Russ is online now   Reply With Quote
Old Jun 5, 2005, 11:47 PM   #19
S-3D enthusiast
 
Tril's Avatar
 
Join Date: Sep 2004
Location: Canada
Posts: 1,409
Tril is on a distinguished road
System Specs

I don't understand what you want to do. From my point of view, I don't need it for that plugin. I don't see where you option dialog window would fit. Please tell me what you wanted to do with it.

Depending on the positions of the speakers and of the listener, the total amount of delay (iTram that is used) needed for all the speakers can vary. I had to set iTramsize at the maximum value that can be obtained with a 5 by 5 m square. Exporting the code with the exact iTramsize needed for a current setting is the best solution I've thought about so far.

If I don't add that export function to the plugin, it's easy to do it manually. You setup the plugin, right-click on it and click Edit. You can then save the dane plugin by clicking save. But you have to change the name and the guid. It's easy to do manually so maybe I don't really need to write that export function.
Tril is offline   Reply With Quote
Old Jun 5, 2005, 11:55 PM   #20
DriverHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 4,101
Russ has a spectacular aura aboutRuss has a spectacular aura aboutRuss has a spectacular aura about

You are right, it is easy enough to edit the microcode, but with a .kxl plugin, you would have to redo it everytime you reboot (or if you save it as a .da you lose the C++ controls), etc. I do not mean for you to use the options dialog, just similar methods of automatically manupulating the microcode based on saved settings.
i.e.
You save the settings in the registry, and the next time the plugin is loaded, it reads thoses settings, calculates the optimal iTramSize, etc, and uses that value when it loads the microcode.

Again, it is just an idea.

-Russ

Last edited by Russ; Jun 6, 2005 at 12:00 AM. Reason: typo
Russ is online now   Reply With Quote
Old Jun 6, 2005, 12:03 AM   #21
DriverHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 4,101
Russ has a spectacular aura aboutRuss has a spectacular aura aboutRuss has a spectacular aura about

Sorry, I think I misunderstood what you meant by exporting a .da file. I understand now. You meant to use this plugin only to calculate the necessary delays, and then the .da file would be non-adjustable? If that is the case, then you are right, and such a thing is probably not necessary for this plugin.

Never mind, your method is definatley better for this plugin.

Last edited by Russ; Jun 6, 2005 at 12:19 AM.
Russ is online now   Reply With Quote
Old Jun 6, 2005, 06:44 AM   #22
S-3D enthusiast
 
Tril's Avatar
 
Join Date: Sep 2004
Location: Canada
Posts: 1,409
Tril is on a distinguished road
System Specs

Quote:
Sorry, I think I misunderstood what you meant by exporting a .da file. I understand now. You meant to use this plugin only to calculate the necessary delays, and then the .da file would be non-adjustable? If that is the case, then you are right, and such a thing is probably not necessary for this plugin.
That's what I meant.
Tril is offline   Reply With Quote
Old Jun 10, 2005, 04:55 AM   #23
DriverHeaven Newbie
 
Join Date: Jun 2005
Posts: 2
shotty is on a distinguished road

If this doesn't make any sense, it's because I'm new to the whole KX project thing. I've got an Audigy 2.

I'm using the surrounder at the moment to get 5.1 surround sound. However, this takes up about 1700 iTram.

If the TimeBalance plugin uses 8000, then how can I have both of these at once?
shotty is offline   Reply With Quote
Old Jun 10, 2005, 08:59 AM   #24
S-3D enthusiast
 
Tril's Avatar
 
Join Date: Sep 2004
Location: Canada
Posts: 1,409
Tril is on a distinguished road
System Specs

Please re-download the plugin. 8000 iTram was an error I made. It takes about half that amount. I reuploaded the plugin a few days ago with the correction.
Tril is offline   Reply With Quote
Old Jun 16, 2005, 02:46 PM   #25
DriverHeaven Senior Member
 
ROBSCIX's Avatar
 
Join Date: Mar 2004
Posts: 1,712
ROBSCIX is on a distinguished road

Hey,this is great and it's about time sombody made one, I don't really understand all the settings yet, can you give me a breif oultine please?
ROBSCIX is offline   Reply With Quote