Multiple Java VMs on OSX

Multiple Java VM on OSX Introduction Eclipse Globally Summary Resources Introduction Table of Contents Let’s start by reviewing the baroque installation of Java on OSX. Try these (highlighted) commands in a terminal.

So, when you install Java, /usr/bin/java is the vm command. It’s a symbolic link to the “current version”. In my case Current […]

Posted in Java | Leave a comment

Multiselect UITableView with limited selections

Swift Language

Multiselect UITableView with limited selections Simple example of creating a multi-select UITableView, but allow only a limited number of selected cells. Introduction How to Summary Resources Introduction Table of Contents I wanted a multi-select table view but limit the number of selected cells. The “answers” on StackOverflow were quite awful – which is true > […]

Posted in Swift | 2 Responses

tvOS Framework Target bug

There be bugs here Getting past the simple project stage with your tvOS app? Maybe you’re putting reusable/common code in frameworks and then linking to them from your tv project. What could go wrong? Introduction The Problem Summary Resources Introduction   Table of Contents So I created an Xcode workspace. Then under Framework & Library, […]

Posted in tvOS | Leave a comment

tvOS: playing audio

Playing MIDI on tvOS According to Apple’s App Programming Guide for tvOS, AVFoundation is supported in tvOS. Groovy! Let’s use AVMIDIPlayer to play a file! Set up Result Summary Update Resources Set up Table of Contents AVMIDIPlayer’s init func wants two URLs: one to a MIDI file and another to a SoundFont or DLS file. […]

Posted in MIDI, tvOS | Tagged , | 2 Responses

Apple TV tvOS hello world app in Swift

Apple TV TVML tvOS hello world app in Swift Introduction Getting started Server side Swift code Security Summary Update Resources Introduction Table of Contents So, you saw the shiny new AppleTV demo on the Apple Live Event. Finally we can write apps for the beast! Like most of you, I downloaded the Xcode 7.1 beta […]

Posted in Apple, Swift, tvOS | 2 Responses

Swift NSTableView and NSArrayController

Swift Language

Swift NSTableView and NSArrayController In my NSTableView column chooser example, I used a table data source and delegate to manage the table’s data. Just like iOS. Cocoa offers other options. In this example, I’ll look at “binding” to an NSArrayController. Introduction Data Model Array Controller Table View Binding the columns Adding/Removing rows Summary Resources Introduction […]

Posted in Cocoa, Swift | Tagged , | 7 Responses

Swift NSTable Column Chooser

Swift Language

Swift NSTable Column Chooser Although I wrote NeXTStep programs back in the 1980s for my dissertation, I haven’t written many Cocoa programs. The extra Apple Developer fee for OSX apps was something I didn’t want to pay in addition to the iOS fee. OK, I’m cheap. But how many bags of cat food would that […]

Posted in Cocoa, Swift | Tagged | 1 Response

iOS: trimming audio files with Swift

Swift Language

iOS: trimming audio files I’ve written about how to record audio on iOS using Swift. But, how do you trim the recording? Introduction Summary Resources Introduction Table of Contents One way to trim an audio file is to use AVFoundation’s AVAssetExportSession. You create an export session instance, set its parameters, and then tell it to […]

Posted in Computer Music, Core Audio, Swift | Tagged , | 6 Responses

Swift 2 OptionSetType

Swift Language

Swift 2 OptionSetType Swift 2/iOS 9 broke my calendar/date code. What’s going on? Introduction RawOptionSetType OptionSetType Some Other Examples Summary Resources Introduction Table of Contents If you have an app that does anything with dates, you most likely have code someplace like this. You get the date’s components, do something with them, and construct a […]

Posted in Swift | Tagged , | 1 Response

Swift 2 AVAudioSequencer

Swift Language

Swift 2 AVAudioSequencer There’s a brand new MIDI sequencer class in Swift 2 beta! It’s the AVAudioSequencer. Introduction AVAudioSequencer Setup AVAudioEngine Setup AVMusicTrack Summary Update Resources Introduction Table of Contents At WWDC15 there was a presentation entitled “What’s New in Core Audio“. If you were able to get past the first 29 minutes of a […]

Posted in Apple, Computer Music, Core MIDI, MIDI, Swift | Tagged , | 12 Responses