https://github.com/audiokit/controls
SwiftUI Knobs, Sliders, X-Y Pads, and more
https://github.com/audiokit/controls
Last synced: 5 months ago
JSON representation
SwiftUI Knobs, Sliders, X-Y Pads, and more
- Host: GitHub
- URL: https://github.com/audiokit/controls
- Owner: AudioKit
- License: mit
- Created: 2022-08-12T00:47:12.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-12T06:33:06.000Z (over 1 year ago)
- Last Synced: 2025-08-09T12:31:29.400Z (6 months ago)
- Language: Swift
- Size: 271 KB
- Stars: 143
- Watchers: 12
- Forks: 26
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Controls

User interface elements including knobs, sliders, XYPads, and more, all built off the same generic controls.
## Generic Controls
Two types of controls allow you to drag on a UI element and control either one or two parameters.
* Control - draggable control that can affect one value by planar motion, either horizontally, vertically, or both.
* Two Parameter Control - draggable control that can affect two independent parameters.
## Control Geometries
For both types of controls, there are a wide variety of ways to react to dragging, including
rectilinear and polar coordinate variations. See the API for more details.
## Implementations
These are examples of how to use the generic controls. They are somewhat customizable, so you
can easier use them directly or use them as a template for creating your own custom controls.
Single-parameter controls:
* ArcKnob - knob controlled by dragging along a circular path
* IndexedSlider - slider that controls an integer parameter and snaps to increments
* PitchModWheel - vertical slider than can be a pitch wheel or mod wheel
* Ribbon - horizontal slider
* SmallKnob - a knob in which you start by tapping in its bound and change the value by either horizontal or vertical motion.
Two-parameter controls:
* Joystick - polar coordinate control
* XYPad - XY control that doesn't snap
## Installation
Installation is done with Swift Package Manager. Be sure to tie your code to a version number
and not just a branch, because the API for these controls will change as necessary.
## Demo
Included with the package is a demo project (pictured above) and a playground to help you
get up and running quickly.
## Documentation
The docs are hosted on the [AudioKit.io website](https://www.audiokit.io/Controls/)
## Sponsorship
[Sponsor me on Github](https://github.com/sponsors/aure) and I'll create a control for you.