TouchKeyMap
internal struct TouchKeyMap
Mapping of UITouch instances from touch events to the Key instances that are played by the touches.
-
The sampler that is generating sound
Declaration
Swift
var sampler: Sampler?
-
Remove all assignments.
Declaration
Swift
mutating func releaseAll()
-
Release any key that is attached to the given touch.
Declaration
Swift
mutating func release(_ touch: UITouch)
Parameters
touch
the touch to remove
-
Assign a key to the given touch. If the touch is already assigned, release the previous assignment.
Declaration
Swift
mutating func assign(_ touch: UITouch, key: Key) -> Bool
Parameters
touch
the touch to attach to
key
the key to press