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 available. The links are in the first post. I haven't tested the 3537 version so I can't confirm if the gui works in that version.

    The plugin now has two modes. When you change the mode, text is displayed in the header of the window, telling the user to close and reopen the window. The mode only change once the window has close and reopened.

    I changed the coordinates system. It did not make sense to put the 0 in the lower left corner. It's now in the middle.

    Please report any bugs or strange behaviour you encounter with the plugin. If the plugin becomes good enough, I'll give the source code to Eugene so he can put it in the next driver release.

    Currently, the user has to manually close and reopen the window. In the future it will probably be automatic because of help from Eugene.
     
  2. Russ

    Russ Well-Known Member

    Joined:
    Jan 17, 2005
    Messages:
    5,722
    Likes Received:
    13
    Trophy Points:
    48
    I just took a quick look at the new version. Looks very nice. The only possible issue I see with switching between the 2 modes, is that you put the info (to close and reopen the window) in the title bar, which could go unnoticed. It is not really a big deal, as you did mention that you need to do that in this thread, so people should know to do that even without seeing the message in the title bar..
     
  3. Tril

    Tril Triple screen racing ftw

    Joined:
    Sep 26, 2004
    Messages:
    1,665
    Likes Received:
    19
    Trophy Points:
    48
    The title bar was the best place I could come up with. At first I wanted to make a label that displays text on multiples line to display a longer message but it did not work. That's because I don't know how to make a label that displays more than one line of text.
     
  4. Russ

    Russ Well-Known Member

    Joined:
    Jan 17, 2005
    Messages:
    5,722
    Likes Received:
    13
    Trophy Points:
    48
    You can use CStatic or a multi-line CEdit control to display mutiple lines of text.
     
  5. Russ

    Russ Well-Known Member

    Joined:
    Jan 17, 2005
    Messages:
    5,722
    Likes Received:
    13
    Trophy Points:
    48
    BTW: With the above controls, it is simply a matter of creating the controls using the appropriate styles, and the size you want, and then use SetWindowText to set the text you want. It will auto word-wrap, or you can force a new line using "\r\n".

    <edit>
    You probably want the font to match the font used in the kX controls, in which case, you can use SetFont( get_font()->operator CFont *() )
     
    Last edited: Aug 29, 2005
  6. ROBSCIX

    ROBSCIX New Member

    Joined:
    Mar 28, 2004
    Messages:
    1,732
    Likes Received:
    4
    Trophy Points:
    0
    Great, I am installing 3538i later today, so I downloaded it and I will give it a try. This plugin has come along way tril! Glad to see it. I am happy it wasn't just a passing idea that never gets developed passed idea phase. I will be more than happy to test it out for you. I haven't been using this module for a few days as I have been using 3538h for testing another plugin, and for other reasons. I built a new desk. all my speakers are at optimal placment except for me center it's about 6' back from the ideal placment, so I will use Time balance to fix this..thx again for the plug..and glad its still being developed.
     
  7. Russ

    Russ Well-Known Member

    Joined:
    Jan 17, 2005
    Messages:
    5,722
    Likes Received:
    13
    Trophy Points:
    48
    Tril check your code for attaching the skin. I am not sure what is going on, but today, for some reason, all of my loaded plugins are using your skin.

    <EDIT> Additonally KX Mixer now has no controls on it at all... I think the skin is not detatching itself correctly or something (again, I am not familair with it so I cannot say for sure).
     
    Last edited: Aug 29, 2005
  8. Tril

    Tril Triple screen racing ftw

    Joined:
    Sep 26, 2004
    Messages:
    1,665
    Likes Received:
    19
    Trophy Points:
    48
    You probably executed the skin by mistake by doubleclick on one of the .kxs file.You need to excute the file kxskin.kxs in the system32 folder to solve the problem.

    I knew that this could happen but I had forgotten about it. It will certainly create problems for users that make the same mistake. I will add a note in the first post.
     
  9. Russ

    Russ Well-Known Member

    Joined:
    Jan 17, 2005
    Messages:
    5,722
    Likes Received:
    13
    Trophy Points:
    48
    Doh, I think you are right. I just reset the settings (to remove the skin registrations) to fix it.
     
  10. 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. Link in first post.

    • I have added a display of the speakers positions in advanced mode. It moves the speakers when you change the x and y coordinates. I had to increase the window size of the plugin to make that fit. I move small labels. There are some graphic errors when labels overlap but it's not too bad. It displays very well when the speakers are far apart enough.
    • I reduced the size of the window of the plugin in basic mode. I now know how to make windows of different sizes by using different skins.
    I don't know if the commands that are used in 3538i to move the buttons of the GUI work in 3537. If they don't, the buttons will be placed incorrectly in basic mode.
     
  11. eyagos

    eyagos New Member

    Joined:
    Dec 11, 2002
    Messages:
    259
    Likes Received:
    0
    Trophy Points:
    0
    Is only me, or it does not sounds at all ?!? There must be an error.

    Other thing is that in advanced mode, I don't see the close button. If I delete the skin files, I can see it, and the speakers positions too.
     
  12. Tril

    Tril Triple screen racing ftw

    Joined:
    Sep 26, 2004
    Messages:
    1,665
    Likes Received:
    19
    Trophy Points:
    48
    I must have made a mistake. Maybe I did not upload the correct versions of the files.

    EDIT : It should be fixed now, I had zipped the wrong files.
     
    Last edited: Sep 3, 2005
  13. ROBSCIX

    ROBSCIX New Member

    Joined:
    Mar 28, 2004
    Messages:
    1,732
    Likes Received:
    4
    Trophy Points:
    0
    Cool, you used my idea for the moving speakers? Hey thats cool I thought it would look pretty cool I'll have to check it out later on..
     
  14. Tril

    Tril Triple screen racing ftw

    Joined:
    Sep 26, 2004
    Messages:
    1,665
    Likes Received:
    19
    Trophy Points:
    48
    I just fixed that error. It was working correctly in advanced mode but not in basic mode. Basically, I had forgotten to call the code to calculate and set the delays in basic mode.
     
  15. aspectus

    aspectus New Member

    Joined:
    Aug 3, 2005
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    0
    Very very nice. Looking forward to skinning the official release!

    I don't know if it's my speakers or what, but one of the most impressive effects of using this mother is that I ran a flat EQ now, since bass and treble are much more 'rich' sounding. something to do with constructive/destructive interference I suppose.

    Great idea and implimentation of the Z coord!

    The shift from x,y being 0,0 to now x,y being -2.5,2-5 is real annoying for me in a room full of junk and crooked walls where it is next to impossible to find 'center', but i was able to managed it using sticky tape to hold tape measure here and there. :) It would be handy to have the choice of setting it back to rear,left 0,0 center, if that makes any sense whatsoever.

    Cheers!
     
  16. Tril

    Tril Triple screen racing ftw

    Joined:
    Sep 26, 2004
    Messages:
    1,665
    Likes Received:
    19
    Trophy Points:
    48
    The idea was to place the listener at (0, 0, 0) and take measurements from there for the speakers.

    Do you mean like it was before. As in this pic http://pages.globetrotter.net/samaust/Files/TimeBalanceTril.png

    If that's what you are asking for, it's possible. Confirm to me if this is what you want. I'll add a combo box for this. It's easy to do.

    In a later version, I could display the delays for each speaker. Someone asked me to add this. I don't know yet where I would display that information. Maybe under or above the speakers positions. For now, if you want to see the time delays, use DebugView. It shows the calculated speed of sound and the time delays.

    I wrote 'Speakers Positions' on the interface but it should be 'Speaker's Positions'. Would it be better if I wrote 'Speaker's Placement' instead?
     
  17. aspectus

    aspectus New Member

    Joined:
    Aug 3, 2005
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    0
    Tril, yes I believe you understand what I mean, but to be sure:

    My left rear is in a corner. A previous version (I think it was the one shown in that image) allowed me to call that corner 0,0. So it was from the corner of my room, just a few inches away from the rear-left speaker, that I was able to use to measure all speaker positions from.

    The new version makes me pick a random point called 0,0, and measure x,y from there, which is difficult because there are things in the way and I had to tape the tape measure to the ceiling to get accurate x,y measurements.

    Now I realize that, for my setup, rear-left is not optimum to start measuring from, as my front-left is actual the left-most speaker (wall runs from rear-left towards front-left, but then nooks out left well before the front-left. If that wall carried on, my front-left would be outside the house, so I had to do math to get the values. So I guess it is only worth implimenting if user can choose any of the four corners (choices would be LR or RR or LF or RF or RandomCenter [i dunno what else to call it, maybe UserDefinedAreaCenter? :duh: ]).

    Still easy to impliment? Am I making more or less sense? Sorry its way past bed time.

    Cheers!
     
  18. Tril

    Tril Triple screen racing ftw

    Joined:
    Sep 26, 2004
    Messages:
    1,665
    Likes Received:
    19
    Trophy Points:
    48
    It makes sense and it's still easy to do. I don't need to change the range of the sliders, only the displayed values. I'll add a combo box to choose where are x = 0 and y = 0 are. The choices will be : FL, FR, RL, RR, C. Center is the current system where 0, 0 is when the x and y sliders are in the center. The directions of the axis will be kept for all choices : x positive toward the right and y positive toward the front.
     
  19. ROBSCIX

    ROBSCIX New Member

    Joined:
    Mar 28, 2004
    Messages:
    1,732
    Likes Received:
    4
    Trophy Points:
    0
    Hey Tril, I usually put the Time plugin on the output side of the surrounder, No wouldn't surrounder introduce some delay errors..take the rear delay slider for instance? I am just trying to decide if I should set that slider to zero and allow your plugin to compensate. What do you think? Proper dolby digital positions for rear speake placment according to information I found is beside the listener but they are specific to say NOT behind. Dolby surround and prologic suggest behind. But not Dolby Digital. So what is your take on this. I have't been using yout ime plugin for a while as I was using the DSP for the guitar but I am setting it back up, but all these new questions come to mind now. I haven't tried it yet, but what is your take on this information? I want to do listening test now but..lat kids..and all..just curius as to what you think about thuis...thx
     
  20. Tril

    Tril Triple screen racing ftw

    Joined:
    Sep 26, 2004
    Messages:
    1,665
    Likes Received:
    19
    Trophy Points:
    48
    I took a quick look at the surrounder's microcode. It seems that when you choose a delay of 0, a delay of 2 samples is used on the inputs in_L and in_R. That's a limitation of using delays and setting them to the lowest possible value. The minimum you can set is two not zero.

    Nothing. If I had 5.1 speakers, I would place them where there is room even if it's better to place them somewhere else.

    Personnaly, I would not use the delay in surrounder and I would only use the TimeBalanceV2 plugin. The only problem is that if the TimeBalanceV2 plugin is set correctly, the rear speakers will be delayed by 2 samples more than necessary. It's not too dramatic. Two samples correspond to about 1.5 cm or 0.591 in. You could position your speakers 1.5 cm closer to you or change the distance of the speakers in the plugin to make them 1.5 cm farther but it's not really important. Your mistakes in measuring the distances may well be higher than that.[​IMG]
     

Share This Page

visited