rsc3/doc/help/ugen/controls/mouse-x.help.scrbl

39 lines
739 B
Text
Raw Normal View History

2022-08-24 13:53:18 +00:00
#lang scribble/manual
@(require (for-label racket))
@title{(mouse-x rate minval maxval warp lag)}
2022-08-28 10:27:01 +00:00
2022-08-24 13:53:18 +00:00
Cursor UGen. Report mouse location on root window of the machine
that the synthesis server is running on. For a linear mapping set
warp to 0, for an exponential mapping set warp to 1.
2022-08-28 10:27:01 +00:00
@racketblock[
2022-08-24 13:53:18 +00:00
(import (rsc3))
2022-08-28 10:27:01 +00:00
]
2022-08-24 13:53:18 +00:00
2022-08-28 10:27:01 +00:00
@racketblock[
2022-08-24 13:53:18 +00:00
(audition
(out 0 (mul (sin-osc ar (mouse-x kr 40 10000 1 0.1) 0) 0.1)))
2022-08-28 10:27:01 +00:00
]
2022-08-24 13:53:18 +00:00
2022-08-28 10:27:01 +00:00
@racketblock[
2022-08-24 13:53:18 +00:00
(audition
(out 0 (mce2 (mul (sin-osc ar (mouse-x kr 20 2000 1 0.1) 0)
(mouse-y kr 0.01 0.1 0 0.1))
(mul (sin-osc ar (mouse-y kr 20 2000 1 0.1) 0)
(mouse-x kr 0.01 0.1 0 0.1)))))
2022-08-28 10:27:01 +00:00
]
2022-08-24 13:53:18 +00:00
Auto-pilot variant
2022-08-28 10:27:01 +00:00
@racketblock[
2022-08-24 13:53:18 +00:00
(audition
(out 0 (mul (sin-osc ar (mouse-x* kr 40 10000 1 0.1) 0) 0.1)))
2022-08-28 10:27:01 +00:00
]
2022-08-24 13:53:18 +00:00