GithubHelp home page GithubHelp logo

bradhowes / auv3host Goto Github PK

View Code? Open in Web Editor NEW
9.0 4.0 0.0 229 KB

Simple host for a collection of the same AUv3 component

License: MIT License

Swift 98.48% Shell 1.52%
auv3 auv3-plugin swift swift5 coreaudio ios

auv3host's Introduction

AUv3Host

This is a simple host application for an AUv3 component. I use it to test out my SoundFonts AUv3 extension. It is very loosely based on code from Apple. My version allows for multiple instances of the same AUv3 component with user-defined presets for a collection. At present, only the iOS version is usable -- the macOS version is more or less the same as Apple's code, but it will not compile in the current state.

Customizing

If you want to use this host for your own testing purposes, you will simply need to change the definition of the componentToLoad constant defined in the AudioUnitHost file. This controls what AUv3 component AudioUnitHost will instantiate. For this to work, you must have run the host app that contains your AUv3 component with the same type signature that is found in the componentToLoad constant. If the component is not found, you will receive a prompt saying so from the app.

Using

Right now, you can control the following:

  • number of instances of the component defined in the componentToLoad variable (see above)
  • definition of presets that hold the settings for all of the components

Presets are just a collection of fullState values from the active AUv3 components -- if there are 4 instances, then a preset will have a collection of 4 values, one from each of the fullState attributes of an AUv3 component.

There currently two sound buttons:

  • Play -- start playing a repeating scale of notes for each AUv3 instance
  • Note -- play a single note for the currently active AUv3 component. Useful to hear the output of just one component.

Dependencies

The project itself consists of three internal Swift packages:

  • AudioUnitHost -- the hosting code for the AUv3 components
  • PresetDocumentManager -- handles preset creation, updating, and deletion as well as saving and restoring from UserDefaults
  • TypedFullState -- conversion between the fullState type of [String: Any] and a typed-Any representation that implements the Codable protocol. Used to save/restore values to/from UserDefaults.

Additionally, the code also depends on the external AUv3Support Swift package that my AUv3 components also depend on. It also relies on Apple's Swift Atomics to provide thread-safe changes to a few values using native Swift constructs.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.