Kyma Forum
  Tips & Techniques
  Pan detection

Post New Topic  Post A Reply
profile | register | preferences | faq | search

next newest topic | next oldest topic
Author Topic:   Pan detection
simon smith
Member
posted 19 April 2010 11:22         Edit/Delete Message   Reply w/Quote
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
posted 22 April 2010 14:21         Edit/Delete Message   Reply w/Quote
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
posted 09 June 2010 01:54         Edit/Delete Message   Reply w/Quote
I will indeed try this!

Many thanks. S

(Sorry for such a delayed response)

IP: Logged

Lokutus
Member
posted 11 June 2010 08:37         Edit/Delete Message   Reply w/Quote
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
posted 11 June 2010 09:05         Edit/Delete Message   Reply w/Quote

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
posted 26 June 2010 10:29         Edit/Delete Message   Reply w/Quote
quote:
Originally posted by Lokutus:

0.5 + 0.5 * (!AmplitudeR - !AmplitudeL)

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

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply

Contact Us | Symbolic Sound Home

This forum is provided solely for the support and edification of the customers of Symbolic Sound Corporation.


Ultimate Bulletin Board 5.45c