Swiftpack.co - Package - hexagons/LiveValues

LiveValues

License Cocoapods Platform

Values

Live values are automatically updated when they have changin values. Live values are ease to animate with the .live or .seconds static properites.

Install

Install with CocoaPods.

pod 'LiveValues'
import LiveValues

Types:

  • CGFloat --> LiveFloat
  • Int --> LiveInt
  • Bool --> LiveBool
  • CGPoint --> LivePoint
  • CGSize --> LiveSize
  • CGRect --> LiveRect
  • UIColor --> LiveColor

Static properites:

  • LiveFloat.live
  • LiveFloat.seconds
  • LiveFloat.secondsSince1970
  • LiveFloat.gyroX
  • LiveFloat.gyroY
  • LiveFloat.gyroZ
  • LiveFloat.accelerationX/Y/Z
  • LiveFloat.magneticFieldX/Y/Z
  • LiveFloat.deviceAttitudeX/Y/Z
  • LiveFloat.deviceGravityX/Y/Z
  • LiveFloat.deviceHeading

Functions:

  • liveFloat.delay(seconds: 1.0)
  • liveFloat.filter(seconds: 1.0)
  • liveFloat.filter(frames: 60)

Static functions:

  • LiveFloat.noise(range: -1.0...1.0, for: 1.0)
  • LiveFloat.wave(range: -1.0...1.0, for: 1.0)

MIDI

Here's an example of live midi values in range 0.0 to 1.0.

let midiAny = LiveFloat.midiAny
let midiValue = .midi("<address>")

You can find the addresses by enabeling logging like this:

MIDI.main.log = true

Github

link
Stars: 3

Dependencies

Used By

Total: 0