I made a TimeBalance plugin

Discussion in 'Effects and the DSP' started by Tril, Jun 2, 2005.

  1. Tril

    Tril Triple screen racing ftw

    Joined:
    Sep 26, 2004
    Messages:
    1,665
    Likes Received:
    19
    Trophy Points:
    48
    New version of the plugin available. Links in the first post.

    I added a combo box to choose where are the reference coordinates for x and y (where x = 0 and y = 0). The choices are FL, FR, RL, RR, C. It was a request from aspectus. It does not change the direction toward which x and y are positive.
     
  2. aspectus

    aspectus New Member

    Joined:
    Aug 3, 2005
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    0
    Very nice. I was able to remeasure my distances in about 1/4 the time it took me with the previous version.

    Now excuse me while I make a coffee and contemplate in what possible way you might further improve the functionality of your plugin...

    Nope I can't come up with anything, except to increase max distances beyond 5 metres, but then I'm sure there is practical reason for this limitation, probably even explained somewhere in this long thread.

    Also, maybe it would be better to label the temperature slider 'finesse' or something strange like that. Hell, I had a real smart reason for that, now I have forgotten why. Or maybe label it 'aspectus', then anyone who read this thread will know it is a 'nitpicker class adjustment'. ;)

    Thanks again!

    By the way, I would write up a quick start guide if you say so.

    P.S. I have no idea whatsoever why this text may appear larger than normal, it was 'Verdana 1' when I started typing, a setting I have never changed.
     
  3. Tril

    Tril Triple screen racing ftw

    Joined:
    Sep 26, 2004
    Messages:
    1,665
    Likes Received:
    19
    Trophy Points:
    48
    There is a reason. The plugin has something called itramsize. That defines how much delay the plugin can have in total. It's all the delays added together. Before the user adjusts the plugin, the amount of delay needed is unknown. It depends on the positions of the speakers. What I did is set the parameters that use the most delays and see how much that takes. That's how I found a iTramsize equal to 4190. If iTramsize is not large enough for the settings a user selects, the plugin will work incorrectly.


    That way of proceeding does not make much sense because the highest possible delays is obtained when one speaker is in a corner and all the other speakers and the listener are in the opposite corner. Nobody uses that kind of setup because it does not make any sense.

    I'll eventually reduce iTramsize to a more normal value (how much a normal speakers setup would use + a little more for headroom) and add a function that verifies that you are not trying to use more iTram than is available. It will display an error message if you use too much and the program won't try to use more iTram than is available. You will have to move the speakers in positions that don't use too much iTram. It will probably reduce the required iTram a lot but the amount required will have to be chosen (by the programmer) well not to block functionality.

    Something nice would have been something Russ tried a while ago. He had a delay plugin that asked for how much delay you needed before loading the microcode. Unfortunately, it did not work perfectly because of limitations in how current driver release work. If it worked, I would add this to my plugin with the verification function. It would allow you to load the plugin with as low or as high iTramsize as you want.

    I'll try to improve the first post when I have the time to explain better how the plugin work and how to adjust it.
     
  4. ROBSCIX

    ROBSCIX New Member

    Joined:
    Mar 28, 2004
    Messages:
    1,732
    Likes Received:
    4
    Trophy Points:
    0
    yeah, Thats what I figured I would just set surrounder to 0.0 and use time delay. Tril is time balance still usable for a solution when compensating for SMALL distances? Like as a trim to perfect the listening "square"? When I look at it , there are alot of big distances.
     
  5. Tril

    Tril Triple screen racing ftw

    Joined:
    Sep 26, 2004
    Messages:
    1,665
    Likes Received:
    19
    Trophy Points:
    48
    The speed of sound does not change with distance. Maybe you'll make bigger measurements mistakes with bigger distances.;) There is no reason for the plugin to work differently for big and small distances. There is one sample of delay for every ~0.75 cm. Even if the distance is small, there will still be many samples of delay.
     
  6. ROBSCIX

    ROBSCIX New Member

    Joined:
    Mar 28, 2004
    Messages:
    1,732
    Likes Received:
    4
    Trophy Points:
    0
    No I meant just trimming off say 2-3 inches, but I guess it' fine for that. When I said big distances..like the 5m BY 5m Square?..thats pretty big..is this how you have your set up. Well I guess if you have the room..great. I have to have mine right here..thx
     
  7. Tril

    Tril Triple screen racing ftw

    Joined:
    Sep 26, 2004
    Messages:
    1,665
    Likes Received:
    19
    Trophy Points:
    48
    I'm far from the 5m by 5m 5.1 speaker setup. This size was chosen to please the most people using the plugin. 5m seemed reasonnable. I only have four speakers and they are from two different pc speakers sets. They are with the computer in my small bedroom (smaller than 5mx5m). I haven't used my speakers and the plugin much lately. I mainly use my new headphones. They cost me more than the two cheap speaker sets added together so I would feel bad if I did not use them.
     
  8. Tril

    Tril Triple screen racing ftw

    Joined:
    Sep 26, 2004
    Messages:
    1,665
    Likes Received:
    19
    Trophy Points:
    48
    Is anyone having problems with TimeBalanceV2 in 3538j?

    It works fine on my computer but someone reported to me that TimeBalanceV2 did not work on his computer. It mutes the sound. He reported that TimeBalanceV2 light works.

    Now, I'm trying to figure out what could be the cause of the problem. The DSP code from both is almost the same so if it works in one, it should work in the other.

    I found a small bug. When you load the plugin, the addresses of the iTram are wrong. The numbers are too big for the iTramsize the plugin uses. They get correct after you move a slider or press reset. I fixed the plugin by modifying the file da_TimeBalanceV2.cpp, recompiled and sent him the updated plugin and it still does not work. That was not his problem.
     
  9. Russ

    Russ Well-Known Member

    Joined:
    Jan 17, 2005
    Messages:
    5,722
    Likes Received:
    13
    Trophy Points:
    48
    @Tril, I did some basic testing with it in 3538j, and had no problems.
     
  10. Dr_Love

    Dr_Love New Member

    Joined:
    Nov 26, 2006
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    Hi everyone. U have used v2 in my carputer setup for some time now and I love it, but now I have made some changes to my speaker setup (mostly placement) and now it's not that clear where to measure the distances to the speakers from, example: I now use a 3-way system in my front doors and the distance to listening position vary very much depending on if I measure from my tweeter at the dashboard or the bass/mid in the lower part of my door side. I guess it's the tweeter-distance that’s important but I don't get the results I was hoping for. What do U all think.

    Best regards LK
     
  11. Russ

    Russ Well-Known Member

    Joined:
    Jan 17, 2005
    Messages:
    5,722
    Likes Received:
    13
    Trophy Points:
    48
    I am not sure how well it would work, or if there are enough resources availalble with your sound card to do it, but you might try using 2 TimeBalance plugins to be able to specify the position of the tweeter, and bass/midrange seperately.

    i.e.
    Use Crossover plugins to split the signal to match your hardware crossovers.
    Connect the output of the crossovers to 2 seperate TimeBalance plugins, and adjust the positions in each as appropriate.
    Mix the outputs of each channel of the 2 TimeBalance plugins back together, etc.
     
    Last edited: Feb 4, 2007
  12. frost_DK

    frost_DK New Member

    Joined:
    Feb 16, 2007
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Hey all
    I´m using this plugin with great pleasure, But i have resently formatted my computer, and reinstalled windows and all.. I have installed the KX3538m driver and for some reason my TimebalanceV2 isen´t working anymore.. It just mutes the sound. It is a clean install, and i have downloaded the .dll to my windows/system32 lib.
    I hobe one of you have a sollution to my problem, because i´m using this in my car, and the sound i terrible without this plugin ;)

    Mvh
    Frost_DK
    PS this is my first post so be gentle guys ;)
     
  13. Chester01

    Chester01 New Member

    Joined:
    Jan 12, 2004
    Messages:
    492
    Likes Received:
    0
    Trophy Points:
    0
    I may have mentioned this before however I feel it would be worth mentioning again, since this plugin has all the information needed, why not plug in that data into the inverse square law and volume compensate for your speakers also? basically build in a gain control that is effected by the distance between the speakers and the listener... just a thought
     
  14. Tril

    Tril Triple screen racing ftw

    Joined:
    Sep 26, 2004
    Messages:
    1,665
    Likes Received:
    19
    Trophy Points:
    48
    The plugin and the source code are included in the latest release of the drivers. When you install the drivers, it automatically install all the necessary files to make it work.

    The plugin provided in the first post was compiled for 3538i and the latest version of the kX drivers is now 3538m.


    I've heard of one person for which TimeBalanceV2 did not work but TimeBalanceV2 light worked. I never found out why.
     
  15. frost_DK

    frost_DK New Member

    Joined:
    Feb 16, 2007
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Tril:
    Yes I know.. and it is the 3538m i have installed.. the plugin is avalible, but when I use it, it does nok work. When connected is just mutes the sound.. Like there is no connection between the input and the output.. When i goes around the plugin the sound plays as normal.. Hope you have a suggestion how to make it work.. I have tried to install the 3538i and install the plugin manuelly.. but it does not help :(

    Thanks for your input..

    Mvh
     
  16. Russ

    Russ Well-Known Member

    Joined:
    Jan 17, 2005
    Messages:
    5,722
    Likes Received:
    13
    Trophy Points:
    48
    @frost_dk,
    Does it work after clicking Reset, or adjusting any of the sliders?

    @Tril,
    Please see my latest reply in the ".kxl plugin and default settings" thread.
     
  17. Tril

    Tril Triple screen racing ftw

    Joined:
    Sep 26, 2004
    Messages:
    1,665
    Likes Received:
    19
    Trophy Points:
    48
    It does the same thing for me too. It is a bug in the plugin code. I just found it.

    When you load the plugin in the DSP, it calls set_defaults, which calls set_all_params, which calls set_param. set_param calls general_parameters. This function calculates the delays. It uses _params[FLDIST_ID] and many other valriable in its calculations. These variable are not initialised until set_param has been called for all the IDs.


    The solution is to add

    Code:
    for (int i = 0; i < TIMEBALANCE_PARAMS_COUNT; i++) 
            _params[i] = default_params[i];
    in set_defaults before it calls set_all_params. This initialises the variables.


    BTW, I successfully compiled the plugin with Microsoft Visual Studio .NET 2003 by using the includes and libs Eugene recommended (those in WDK).

    I added the following at the top of the include of the IDE :
    \inc\mfc42
    \inc\api

    I added the following at the top of the libraries of the IDE :
    \lib\mfc\i386
     
  18. Russ

    Russ Well-Known Member

    Joined:
    Jan 17, 2005
    Messages:
    5,722
    Likes Received:
    13
    Trophy Points:
    48
    Ok, my situation was a little different (all variables used in my calculations were intialized, and the plugin dump showed the correct default values), so I guess the 2 problems were unrelated after all. In any case, I am glad you figured it out (and thanks for sharing the info about VS .NET 2003).
     
  19. Tril

    Tril Triple screen racing ftw

    Joined:
    Sep 26, 2004
    Messages:
    1,665
    Likes Received:
    19
    Trophy Points:
    48
    frost_DK, I made some changes to the plugin code and I recompiled it for 3538m. It is available in the first post of this thread. I would like you to try it out to see if it fixes your problem.

    It's nice to see that someone successfully used it in a car environment. I started writing it at the request of someone to use it in his car but this someone never came back to the forum to tell me his experience.
     
  20. Russ

    Russ Well-Known Member

    Joined:
    Jan 17, 2005
    Messages:
    5,722
    Likes Received:
    13
    Trophy Points:
    48
    @Tril,
    It should be noted that the new version has an additional dependency (MSVCR71D.DLL).
     

Share This Page

visited