SwiftUI knob and toggle controls for use with AUv3 components. Uses the excellent Composable Architecture for Swift by Point-Free.
The controls are attached to AUParameter entities, so changes in the control will affect their associated AUParameter value. This works the other way as well: external changes to the AUParameter -- say from a MIDI controller or preset load -- will be reflected in the control. Below is a demonstration on iOS:
And below shows rendering on macOS:
There is a circular knob that acts like a vertical slider. It normally shows the setting's name, but when being manipulated it shows the current value.
- Vertical dragging changes the value of the knob
- Moving horizontally away from the center of the knob will increase resolution of vertical movements
- Touching the title will show an editor to allow typing a value
- When present, uses
ScrollViewProxy
to make sure that the editor is visible when it appears
The toggle view just works on boolean values:
Here is a combination of several knobs into two distinct groups. The groups are embedded in a scroll view so as to operate under narrow device width constrains:
There is a simple demonstration application that runs on both macOS and iOS which shows the linkage via AUv3 parameters between AUv3 controls and AppKit/UIKit controls -- changes to one control cause a change in a specific AUParameter, which is then seen by the other control. To build and run, open the Xcode project file in the Demo folder. Make sure that the AUv3Controls package Package.swift file is not current open or else the demo will fail to build.