Skip to content

Latest commit

 

History

History
11 lines (6 loc) · 854 Bytes

README.md

File metadata and controls

11 lines (6 loc) · 854 Bytes

Tone Generator in Swift

A direct port of Matt Gallagher's tone generator on Cocoa with Love to Swift.

The original example was in Objective-C and I originally ported it for the Theramin project, but I also saw a lot of people asking for a Swift version on StackOverflow, so I'm publishing this separately.

The one difference is I refactored out the tone generation logic all into ToneGenerator.swift so it can be copied and pasted into other projects. I also used SwiftUI so I'm setting the frequency directly on the generator instead of reading from the view.

Both this and the original code from Matt Gallagher are MIT licensed.