Sender Synth

Sequencer Demo

This app uses inter-app audio to create a simple synthesizer to generate audio.

First we'll get our synth set up:

    class ViewController: UIViewController {

    let oscillator = AKOscillatorBank()
        override func viewDidLoad() {

        AudioKit.output = oscillator

Then we'll set up our UI using some AudioKit UI elements:

       override func viewDidLoad() {

        AudioKit.output = oscillator


    func setupUI() {
        let stackView = UIStackView()
        stackView.axis = .vertical
        stackView.distribution = .fillEqually
        stackView.alignment = .fill
        stackView.translatesAutoresizingMaskIntoConstraints = false

        let adsrView = AKADSRView()
        let keyboardView = AKKeyboardView()


        stackView.widthAnchor.constraint(equalToConstant: view.frame.width).isActive = true
        stackView.heightAnchor.constraint(equalToConstant: view.frame.height).isActive = true

        stackView.centerXAnchor.constraint(equalTo: self.view.centerXAnchor).isActive = true
        stackView.centerYAnchor.constraint(equalTo: self.view.centerYAnchor).isActive = true

Now we'll link the synth and the UI:

    class ViewController: UIViewController, AKKeyboardDelegate {
    func noteOn(note: MIDINoteNumber) { note, velocity: 80)

    func noteOff(note: MIDINoteNumber) {
        oscillator.stop(noteNumber: note)
    let adsrView = AKADSRView() { att, dec, sus, rel in
            self.oscillator.attackDuration = att
            self.oscillator.decayDuration = dec
            self.oscillator.sustainLevel = sus
            self.oscillator.releaseDuration = rel

After we get our swift code set up we'll need to install Audiobus and add in the corresponding files. For detailed directions please follow allong with our full walk through and build your own Sender Synth app.