[PD] earplug~

IOhannes m zmoelnig zmoelnig at iem.at
Mon Apr 20 10:14:10 CEST 2015

On 2015-04-20 09:35, Gilberto Agostinho wrote:
> Hello all,
> I am trying to use [earplug~] for a sound installation of mine, but I
> ran into a problem that I can't think of how to solve. I am feeding the
> angle values to [earplug~] through a [line] to smooth them out, but when
> the angle changes from 359.9 to 0 there is an audible click (since line
> is actually ramping down the value from 359.9 to 0 going through all the
> other angles). How is the best way of solving this?
> I am considering to fold the angle function so that effectively it only
> ranges from 90 and 270 degrees (180 is the centre for [earplug~]). By
> doing that, both 0 and 360 would become 180, thus avoiding the unwanted
> click, but that would mean that there is would be no distinction between
> sounds coming from the front and the back of the listener.
> Do you guys have any better ideas on how to solve this?

unwrap consecutive angles to make sure that the (naïve) difference
(=abs(x1-x0)) between the two angles is always <=180°. (so when going
from 170° to -170°, you unwrap the second value to 190°)

then [line].
(so you get steps: 170..180..190 rather than 170..0..-170)

than wrap the result back to 0°..360° (if that's beeded by [earplug~]).


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20150420/6ae81070/attachment-0001.sig>

More information about the Pd-list mailing list