Skip to content

njazz/FaustSwiftUI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FaustSwiftUI

This is a SwiftUI-based dynamic UI renderer for Faust DSP JSON metadata. It parses the Faust UI JSON structure and displays corresponding SwiftUI controls like sliders, toggles, buttons, bargraphs etc.

Features

  • βœ… JSON-driven layout
  • βœ… Live binding via @ObservedObject with a FaustUIViewModel
  • βœ… Dynamic layout from vgroup, hgroup, tgroup primitives
  • πŸ”„ UI-to-DSP input controls (hslider, vslider, checkbox, button ...)
  • πŸ”„ DSP-to-UI output monitors (hbargraph, vbargraph)
  • πŸ”„ Style metadata (knob, menu, radio ...)
  • ❌ Load default values from JSON layout to ViewModel

Usage

let jsonData: Data = ... // Faust UI JSON from libfaust
let ui = try JSONDecoder().decode([FaustUI].self, from: jsonData)

FaustUIView(ui: ui, viewModel: FaustUIViewModel())

Supported Primitives

Type Description Implemented
vgroup Vertical group βœ…
hgroup Horizontal group βœ…
tgroup Tabbed group βœ…
hslider Horizontal slider βœ…
vslider Vertical slider βœ…
nentry Number entry box βœ…
button Momentary push button βœ…
checkbox Toggle button βœ…
hbargraph Horizontal bargraph βœ…
vbargraph Vertical bargraph βœ…

Supported Styles (via [style:...] metadata)

Style Description Implemented
knob Rotary knob βœ…
menu{...} Dropdown menu ❌
radio{...} Radio button menu ❌
led LED-style output ❌
numerical Numerical value display ❌

Supported Metadata

Key Description Implemented
style Widget style βœ…
unit Display value unit ❌
scale Value scaling ❌
tooltip Tooltip ❌
hidden Hidden components βœ…

About

FAUST UI metadata to SwiftUI bindings

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published