| Thanks, Tito. Working from your example, I was able to come up with what I
needed.
Art Hunkins
----- Original Message -----
From: "Tito Latini"
To:
Sent: Sunday, December 11, 2011 5:28 PM
Subject: Re: [Csnd] Pan Question
> Does this example work? (based on the example of the manual)
>
>
>
> -odac
>
>
> sr = 44100
> ksmps = 32
> nchnls = 4
> 0dbfs = 1
>
> instr 1
> kcc1 ctrl7 1, 10, 0, 1 ; 0.5 -> front, 0 or 1 -> rear
> kcc2 ctrl7 1, 9, 0, 0.5 ; 0 = center pos, 0.5 = final pos
> k2 tablei kcc1, 1, 1 ; sin of angle (sinusoid in f1)
> k3 tablei kcc1, 1, 1, .75, 1 ; cos of angle (sin offset 3/4 circle)
> arnd randomi 400, 1000, 50 ; produce random values
> asig poscil .7, arnd, 1 ; audio signal..
> a1,a2,a3,a4 pan asig, k2*kcc2, k3*kcc2, 2, 1, 1 ; sent in a circle
> (f2=1st quad sin)
> outq a1, a2, a3, a4
> endin
>
>
> f1 0 8192 10 1
> f2 0 8193 9 .25 1 0
>
> i1 0 36000
> e
>
>
>
> tito
>
> On Sun, Dec 11, 2011 at 02:53:01PM -0500, Art Hunkins wrote:
>> I've got a quad pan position question for which the math(s) is beyond me.
>> It's related to the example johnff has described in his documentation for
>> the pan opcode.
>>
>> I've a MIDI controller producing values from 0-1. I need to come up with
>> corresponding values for kx and ky in pan. This controller needs to map
>> onto "circular" values (of x and y) in which the controller's 0 and 1
>> represent direct to the rear, and .5 represents direct front; movement is
>> clockwise.
>>
>> In addition, all sounds originate at center position (.5, .5) and
>> gradually
>> move (via another controller which ranges from 0-1) to the position
>> represented by the above controller. (Thus this second controller moves
>> the
>> x,y axis from (.5,.5) to the new position specified by the first
>> controller.)
>>
>> I hope the above (muddled?) description is reasonably clear.
>>
>> Can someone give me the algorithm - especially the part representing the
>> final position on the x,y axis?
>>
>> TIA,
>>
>> Art Hunkins
>
>
> Send bugs reports to the Sourceforge bug tracker
> https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>
Send bugs reports to the Sourceforge bug tracker
https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
|