k y m a • t w e a k y — the kyma collective ||
view the current website
||
February 2015 Archive
/
WebHome
/ How.ConvertRectangleToPolar
Edit
|
Attach
|
Ref'd By
|
Printable
|
More
|
Advanced Search
|
Help
Search
How Section
How do I...
Add a question...
Home
Topics
More...
All Sections
Products
Order
Company
Community
Share
Learn
Login
/
Register
Change password
Forgot password?
%SESSION_IF_AUTHENTICATED%
Site Map
%SESSION_ENDIF%
Symbolic Sound
Home
Kyma Forum
Eighth Nerve
TWiki Links
%SESSION_IF_AUTHENTICATED%
TWiki Shorthand
TWiki Formatting FAQ
What is TWiki?
%SESSION_ENDIF%
twiki.org
Question (or Task)
I have a MIDI touch pad controller that puts out X-Y controller values. I would like to use the angle and radius of where I touch on the pad as a controller in Kyma.
Solution(s)
You can use two different modules in Kyma to achieve this:
ArcTan
and
SqrtMagnitude
.
Each of these modules require the X coordinate to be in the left channel of the
Input
and the Y coordinate to be in the right channel of the
Input
. You can do this by placing two
Constants
into the
Left
and
Right
inputs of a
ChannelJoin
Sound. In the left channel
Constant
, put in
!X
, and in the right channel
Constant
put in
!Y
. (If you want the origin of the circle to be the center of the touch paf, you should use the VCS editor to change the range of the
!X
and
!Y
controllers to be -1 to +1.)
To get the angle, put the
ChannelJoin
into the
ArcTan
. The output will be in the range of -1 to +1, with -1 corresponding to -180° and +1 corresponding to +180°. You can use this Sound in an expression in any parameter field to control the parameter with the angle of the touch on the touch pad.
To get the radius, put the
ChannelJoin
into the
SqrtMagnitude
. The output will be in the range of 0 to +1, with 0 corresponding to the center of the pad and +1 corresponding to the edge of the pad. You can use this Sound in an expression in any parameter field to control the parameter with the radius of the touch on the touch pad.
--
KurtHebel
- 17 Feb 2004
WebForm
Question:
How can I convert X-Y touch pad controllers to radius-angle controllers?
Keywords:
angle, radius, x, y, rectangular coordinates, polar coordinates
Current Rev: r1.1 - 17 Feb 2004 - 21:06 GMT -
KurtHebel
, Revision History:
Diffs
| r1.1
© 2003-2014 by the contributing authors. / You are
TWikiGuest