NSRegularExpression capture groups: Chord Symbols

Swift Language

How to use NSRegularExpression with capture groups in Swift.

Posted in Swift | Tagged , | Leave a comment

NSTextField validation

Swift Language

Swift You want to sanitize user input before it gets into your model. Input validation can be brute force – you validate and set each field, or you can use Cocoa Bindings which will do both “automatically”. Introduction Using Bindings Error protocols Final thoughts Summary Resources Introduction Table of Contents I’ll start by setting up […]

Posted in Cocoa, Swift | Tagged , | Leave a comment

MIDIMetaEvent and that damn tuple

Swift Language

Swift and AudioToolbox pains Using C APIs in Swift is still a pain in the neck – even in Swift 4. Here is one of the problems with using the C AudioToolbox API. Introduction Summary Resources Introduction Table of Contents The problem is using C APIs in Swift where an array is imported to Swift […]

Posted in Core MIDI, Swift | Tagged , , , , , | 7 Responses

KVO Quick Spec unit tests

Swift Language

If you’re using KVO, how can you test the changes on your classes/structs?

Posted in Swift, Testing, Uncategorized | Tagged , , | Leave a comment

Ableton Link enabled Apps

Here is a list of Ableton Link enabled Apps. Click the title or the icon to open the iTunes page for the app. The prices listed are for the US store and are current right now. Go to the iTunes page for more current info. Of course, the list is always changing. If you have […]

Posted in Apple | Leave a comment

iOS MIDI interfaces

iOS MIDI Interfaces Here are a few current MIDI interfaces for iOS devices with Lightning connectors. If you know of any others, please let me know. Click the images to go to the product page. IK Multimedia iRig MIDI 2 iRig Pro Universal AUDIO/MIDI interface for iOS devices and macs iConnectMIDI1 Lightning Version, 1-in 1-out […]

Posted in iOS, MIDI | 4 Responses

Swift 3 Core MIDI

Swift Language

Swift 3 Core MIDI The Swift 3 betas bring many changes. Here’s an update for Core MIDI based on Swift 3 beta 3. Introduction Some changes Beta 6 changes Summary Resources Introduction Table of Contents There aren’t a great number of changes specifically to Core MIDI; it’s just as awful as it’s always been. Much […]

Posted in Core MIDI | 23 Responses

MusicSequence via a MIDI Virtual Source

Swift Language

MusicSequence via a MIDI Virtual Source Virtual MIDI sources and destinations are a bit confusing. This is one way to use a Virtual MIDI source. Introduction MIDI Setup MusicSequence Summary Resources Introduction Table of Contents If you want other apps to the “see” your app as a MIDI source, i.e. a producer of MIDI data, […]

Posted in Core MIDI, MIDI, Swift | Leave a comment

Swift script to create a Cocoa window

Swift Language

Swift script to create a Cocoa window Create a Cocoa window with a functioning button from a command line Swift script. How To Summary Resources How To Table of Contents You probably know that you can run a swift program from the command line like a script.

Previously you had to use this incantation: […]

Posted in Cocoa, Swift | 2 Responses

Multi-timbral AVAudioUnitMIDIInstrument

Swift Language

Multi-timbral AVAudioUnitMIDIInstrument in Swift Table of Contents Introduction Core Audio Unit AVFoundation Unit Summary Resources Introduction Table of Contents There is one sublcass of AVAudioUnitMIDIInstrument provided by Apple – the AVAudioUnitSampler. The only problem is that it is mono-timbral; it cannot play more than one timbre at a time. To create a new AVAudioUnit, we […]

Posted in AVFoundation, Core Audio, Swift | Tagged , | 29 Responses