This is a simple iOS application that plays Terry Riley's "In C" score using one or more AudioUnit samplers. The score varies with each generation, but the algorithm that currently does it is fairly simplistic. At times though, It does create some nice interplay among the voices.
The Swift code is fairly straightforward and it only uses stock iOS CoreAudio and AVFramework frameworks.
NOTE: the code now uses and requires Xcode 8 / Swift 4.
- InAppSettingsKit -- old but dependable framework for showing and editing app settings in-app.
- SwiftyUserDefaults -- nice Swift interface into NSUserDefaults.
- ASValueTrackingSlider -- great bit of code for showing UISlider values (see image above)
All have entries in the CocoaPods Podfile.
For some info on SoundFont files look here. The repository
comes with four SoundFont files, though the largest one -- FluidR3_GM
-- is too large to store natively on
Github so it has been broken into three files: FluidR3_GM.sf2.1
, FluidR3_GM.sf2.2
, and FluidR3_GM.sf2.3
.
To make theFluidR3\_GM
file, you will need to run a simple Bash script -- FluidR3\_GM.sh
-- like so:
% ./FluidR3_GM.sh
There is also a simple Python script called catalog.py
which will generate a SoundFont catalog in Swift. Each *.sf2
that is in the ./SoundFonts directory
will get its own *.swift
file with its own SoundFont
instance that describes all of the patches or presets that
were found in the *.sf2
file. If you add a new SoundFont file to this directory, you will also need to add it to the
Xcode project for the SwiftMIDI
framework so that it gets installed in the iOS application bundle. You will also need
to add the generated *.swift
file as well so that the application knows what presets are available in the SoundFont
file.