![]() |
![]() ![]() ![]() ![]() ![]()
|
next newest topic | next oldest topic |
Author | Topic: Pan detection |
simon smith Member |
![]() ![]() ![]() Is there a way to to detect where in the stereo field a sound/or frequency is coming from (ie 40% left) and from that derive a control signal. This may be obvious, if so just point me in the right direction. Many thanks S IP: Logged |
Phi Curtis Member |
![]() ![]() ![]() Hi Simon, I would put an amplitude follower on each channel, using the same settings for both. Then you could use the proportion of the output of one to the other to drive your control signal. So maybe you could start with something like: (((!AmplitudeR / !AmplitudeL) vmax: 0.01) / 10) clipTo01 The vmax: part is to avoid possibly dividing by 0. If the !AmplitudeR on the right is ten times or more the strength of !AmplitudeL, your controller will go to 1. Vice Versa and it will go toward zero (the clipTo01 keeps it within the bounds of 0 to 1). The problem with this is that if !AmplitudeR = !AmplitudeL, your result would be 0.1, when it should be 0.5. You could fix that by using an into: expression: ((((!AmplitudeR / !AmplitudeL) vmax: 0.01) / 10) clipTo01) into: #({0@0} {0.001@0} {0.1@0.5} {1@1}) I'm traveling and can't try it right now, but it seems like that should get you in the neighborhood. You might have to add some more input/output pairs into the into: expression to even out the response, but I'd do that by trial and error. There are, I'm sure, better ways, but that's what I would try first. Phil [This message has been edited by Phi Curtis (edited 23 April 2010).] IP: Logged |
simon smith Member |
![]() ![]() ![]() I will indeed try this! Many thanks. S (Sorry for such a delayed response) IP: Logged |
Lokutus Member |
![]() ![]() ![]() I think it would be easier to take the difference between the two amps, like this one: 0.5 + 0.5 * (!AmplitudeR - !AmplitudeL) Then the result is always between 0 and 1 having 0.5 in the middle. IP: Logged |
keph Member |
![]() ![]() ![]() Perhaps I missed it or it was an obvious implication, but I recommend the PeakDetector on each channel to get the amp level. The side benefit is that you can further contour the control signal through the use of Attack and Release time smoothing. IP: Logged |
Phi Curtis Member |
![]() ![]() ![]() quote: Yep, that works too. Leave it for me to think of the most needlessly complicated way. IP: Logged |
All times are CT (US) | next newest topic | next oldest topic |
![]() ![]() |
This forum is provided solely for the support and edification of the customers of Symbolic Sound Corporation.