justin = { main feed , music , code , askjf , pubkey };
Ask Justin Frankel
No reasonable question unanswered since 2009!

Suggested topics: programming, music, sleep, coffee, etc.

Note: please do not ask questions about REAPER features, bugs or scheduling, use the forums instead.


Name: Ask: Human (enter yes):
[back to index] | [unreplied] | [replied] | [recent comments] | [all]

Question: Would you mind sharing REAPER's default 0dB pan law formula? I'm using 2*x + x^2 - 2*x^3 ATM, which seems pretty close...
Asked by Tale (77.170.68.x) on April 3 2013, 5:54pm
Reply on April 3 2013, 7:17pm (edited at April 4 2013, 2:10pm):
    For 'Stereo balance / mono pan (default)': panpos is -1..1, law in this case would be 1.0:
    
    gain=law*sqrt(2)* (1.0 + (sqrt(2) * 0.5 / law - 1)/(sqrt(2)-1) * (1/cos(panpos*0.25*PI)-1.0))
    
    leftscale = cos((panpos+1.0)*0.25*PI)*gain;
    rightscale = sin((panpos+1.0)*0.25*PI)*gain;
    
    I think that's right, if it doesn't work for you I'll copy and paste the C code.. (edit: removed some redundant code relating to the non-balance pan mode; edit again: fixed thxtale)

Comment:
    Your Name:   -- Site Owner's Name:  (for human-verification)

    Comment:    

    
  
[back to index] | [unreplied] | [replied] | [recent comments] | [all]
Copyright 2024 Justin Frankel. | RSS