InRect

object InRect extends ProductReader[InRect]

A UGen that tests if two signals lie both within a given ranges. The two input signals can be understood as horizontal and vertical coordinates, therefore the test become one that determines whether the input is within a given "rectangle".

If x >= left and x <= right and y > top and y <= bottom , outputs 1.0, otherwise outputs 0.0.

===Examples===

// detect whether mouse is in specific horizontal and vertical range
play {
 val x  = MouseX.kr; val y = MouseY.kr(1, 0)
 val in = InRect.kr(x = x, y = y, left = 0.4, top = 0.2, right = 0.6, bottom = 0.4)
 in * PinkNoise.ar(0.3)
}
See also
Companion
class
trait Product
trait Mirror
trait ProductReader[InRect]
class Object
trait Matchable
class Any

Type members

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Inherited from
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Inherited from
Mirror

Value members

Concrete methods

def ar(x: GE, y: GE, left: GE, top: GE, right: GE, bottom: GE): InRect
Value Params
bottom

upper margin of vertical test range (inclusive)

left

lower margin of horizontal test range (inclusive)

right

upper margin of horizontal test range (inclusive)

top

lower margin of vertical test range (inclusive)

x

"horizontal" signal to test

y

"vertical" signal to test

def ir(x: GE, y: GE, left: GE, top: GE, right: GE, bottom: GE): InRect
Value Params
bottom

upper margin of vertical test range (inclusive)

left

lower margin of horizontal test range (inclusive)

right

upper margin of horizontal test range (inclusive)

top

lower margin of vertical test range (inclusive)

x

"horizontal" signal to test

y

"vertical" signal to test

def kr(x: GE, y: GE, left: GE, top: GE, right: GE, bottom: GE): InRect
Value Params
bottom

upper margin of vertical test range (inclusive)

left

lower margin of horizontal test range (inclusive)

right

upper margin of horizontal test range (inclusive)

top

lower margin of vertical test range (inclusive)

x

"horizontal" signal to test

y

"vertical" signal to test

def read(in: RefMapIn, key: String, arity: Int): InRect