I made a TimeBalance plugin

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

  1. Russ

    Russ Well-Known Member

    Joined:
    Jan 17, 2005
    Messages:
    5,722
    Likes Received:
    13
    Trophy Points:
    48
    One more thing:
    I took a look at your C++ code to see why the fix was necessary, and I noticed something that you might want to change.

    BTW: You can use memcpy to copy the defaults instead of using a loop (if you want to)).

    BTW2: My phaser does have a similair issue (although with my phaser it should have corrected itself (but is probably a related problem)), so I am glad that you caught that :).

    In any case, back to the point:

    Approx. 25 of your parameters (when being set) call your general_parameters function (which writes 10 tram addresses). This means that anytime that set_all_params is called, your are writing to the DSP approx. 250 times (re-writing those same 10 tram addresses approx. 25 times).

    Personally I would modify the set_all_params function, such that it only calls your general_parameters functions once.

    i.e. (something along the following lines)
    Copy all the new paramters to the _param array.
    Call set_param for those couple of paramters that do not call the general_parameters function.
    Call general_params once.

    Just a thought...
     
  2. Tril

    Tril Triple screen racing ftw

    Joined:
    Sep 26, 2004
    Messages:
    1,665
    Likes Received:
    19
    Trophy Points:
    48
    Good idea. I admit I was a bit lazy.:p
     
  3. Chester01

    Chester01 New Member

    Joined:
    Jan 12, 2004
    Messages:
    492
    Likes Received:
    0
    Trophy Points:
    0
    I have said this once however it may have been ignored for good reason, why dont we use the existing distance data to calculate gain correction also? all you have to do is use the inverse square law http://hyperphysics.phy-astr.gsu.edu/hbase/acoustic/invsqs.html#c3 to calculate out the difference in volume for each speaker and 'swap' them so that the speaker that is furthest recieves the most gain the second furthest the second most etc. I have done this in conjunction with the plugin however I assume it could be implimented quite easily (i am not a programer so I could be way off here)... Thanks!
     
  4. Remboooo

    Remboooo New Member

    Joined:
    Nov 23, 2004
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Tril, could you please repost the plugin? The links for version 3537 are dead :(
     
  5. Tril

    Tril Triple screen racing ftw

    Joined:
    Sep 26, 2004
    Messages:
    1,665
    Likes Received:
    19
    Trophy Points:
    48
    Version 3537 is back. I thought nobody used 3537 anymore as 3538m now provides good asio performance and it has ufx compiled for it.
     
  6. frost_DK

    frost_DK New Member

    Joined:
    Feb 16, 2007
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Tril-->
    Hey
    I´m sorry i haven´t been active for a while (has been out of town for a while)..
    I really aprisiate you effort to help me, and finally it is working.. It is a very nice plugin, and i´m using it with much pleasure.
    so keep up the good work :D

    By the way..
    Does a plugin for phase ajustments exist? I am thinking of a plugin that kan adjust the phase for a signal in intervals of 90degrees or simular?

    Mvh

    Rune
     
  7. Chester01

    Chester01 New Member

    Joined:
    Jan 12, 2004
    Messages:
    492
    Likes Received:
    0
    Trophy Points:
    0
    Tril; would it be possible to integrate a loudness correction algorithm into the time balance plugin using the dimensions that are given to figure out the time delay to figure out how much louder to make a speaker so that at the listening position it will be the same percieved volume

    See: Inverse Square Law for Sound about the inverse square law (i presume you are already aware of the inverse square law though :)
     
  8. Tril

    Tril Triple screen racing ftw

    Joined:
    Sep 26, 2004
    Messages:
    1,665
    Likes Received:
    19
    Trophy Points:
    48
    Anyone is free to modify the plugin and release a new version once the new features work well. The code is included with the driver.

    This feature was requested before but I did not know how to implement it and I was not sure that it was possible to do.

    I don't plan on working on any plugins again. I've lost interest and I no longer have a kX compatible soundcard in my pc.

    EDIT : I just noticed that thus thread has over 10,000 views. Seems like a lot of people are interested in this plugin.
     
    Last edited: Sep 14, 2008
  9. Chester01

    Chester01 New Member

    Joined:
    Jan 12, 2004
    Messages:
    492
    Likes Received:
    0
    Trophy Points:
    0
    thanks for the response! I am not able to code however to anyone who would be willing to do the coding i can explain what would need to be done; please ask for more detailed info if this example does not help...

    First i will assume that the TimeBalanceV2 plugin somewhere in its memory has calculated the distance from the listener to each speaker by the x,y,z information the user enters into the GUI. What needs to be done is to compare the relative distances and sort them from greatest to least. The furthest speaker will have no change in volume, the second furthest speaker will have a negative gain of whatever the following equation yields:
    10*log((D1)^2/((D5)^2)) = the reduction in db for the shorter distanced speaker

    where D1 is the shortest distance and D5 is the further distance; the result should be a negative number (you could apply positive gian to the further speaker however this could lead clipping depending on a perticular setup so I feel it wise to use negative gain :))

    we then would take D2, D3, D4 and substitute them into "D1" while D5 remains the same... this gives us "G1, G2, G3, and G4" to be applied to their respective distances. I am not sure how the current code is setup however it will not require any other data to be entered in by the user; it is really a matter of programing

    another cool thing we could calculate and compensate for with the distance of the speaker from the listener would be the high frequency atmospheric adsorption of the air (Calculation method of absorption of sound by the atmosphere air damping dissipation - sengpielaudio) this would require the humidity to be very accurate though and would take what i assume would be alot more programming as it would require an eq to be built into the plugin :)

    shit we could add a sine generator and we could play 3 test tones (say 1khz, 10 khz and 20khz) and figure out the response of the amplifier with a multimiter and compensate for that :D lol
     

Share This Page

visited