TuningFork is a simple utility for processing microphone input and interpreting pitch, frequency, amplitude, etc.

Related tags

Audio TuningFork
Overview

Overview

Build Status Version Carthage compatible License git-brag-stats

TuningFork is a simple utility for processing microphone input and interpreting pitch, frequency, amplitude, etc.

TuningFork powers the Partita instrument tuner app.

Usage

Quick Start

CocoaPods

Add the following to your Podfile:

pod 'TuningFork'
Carthage

Add the following to your Cartfile:

github "comyarzaheri/TuningFork" "master"

Using a Tuner

import TuningFork

class MyTunerDelegate: TunerDelegate {
	func tunerDidUpdate(tuner: Tuner, output: TunerOutput) {
		// Dreams come true here
		print(output.pitch, output.octave) 
	}
}

let tuner = Tuner()
let delegate = MyTunerDelegate()
tuner.delegate = delegate
tuner.start()

License

TuningFork is available under the MIT License.

Contributors

Comments
  • Jumping values

    Jumping values

    I am trying build a UI around the values of output.distance, but it seems like the values I get to work with are jumping. How can I get smoother values? Tuning a guitar with constantly jumping values is difficult. Thank you!

    enhancement 
    opened by ServusJon 10
  • Problem running the first time

    Problem running the first time

    Hello! I don't know what's wrong with my code but I'm receiving this output:

    0dBFS level = 32768.0
    Csound version 6.05 (float samples) Sep 18 2015
    libsndfile-1.0.26pre6
        2015-11-03 10:22:25.253 TuningForkTest[260:15546] 1 MIDI sources
    2015-11-03 10:22:25.258 TuningForkTest[260:15546] MIDI source 0: Session 1
    

    This is my code:

    import UIKit
    import TuningFork
    
    class ViewController: UIViewController, TunerDelegate {
    
        let tuner = Tuner()
    
        override func viewDidLoad() {
            super.viewDidLoad()
            tuner.delegate = self
            tuner.start()
        }
    
        func tunerDidUpdate(tuner: Tuner, output: TunerOutput) {
            print(output.pitch)
            print(output.octave)
        }
    }
    
    bug 
    opened by jMarinhoX 3
  • AudioKit is not stopped when the tuner is stopped

    AudioKit is not stopped when the tuner is stopped

    If the tuner is started, stopped, and started again it will trigger a crash in the application. AudioKit.stop() can be called manually from the client, but should be called by the library.

    opened by pfaucon 1
  • Jumping values

    Jumping values

    I am trying build a UI around the values of output.frequency, but it seems like the values I get to work with are jumping. How can I get smoother values? Tuning a guitar with constantly jumping values is difficult. Thank you!

    opened by ServusJon 1
  • Chronos-Swift Dependency Analysis Error

    Chronos-Swift Dependency Analysis Error

    Followed instructions to use TuningFork in project by adding line in cocoapods and installing but doesn't compile in XCode 8.3. Error saying to check dependencies: “Swift Language Version” (SWIFT_VERSION) is required to be configured correctly for targets which use Swift. Use the [Edit > Convert > To Current Swift Syntax…] menu to choose a Swift version or use the Build Settings editor to configure the build setting directly. If I follow this conversion to current swift syntax, then I get 119 errors in Chronos-Swift and Tuning Fork which are locked files. Please help. I've heard TuningFork is great, but obviously no good with these errors!

    opened by TheDarkRoom 0
  • Correct the spelling of CocoaPods in README

    Correct the spelling of CocoaPods in README

    This pull requests corrects the spelling of CocoaPods 🤓 https://github.com/CocoaPods/shared_resources/tree/master/media

    Created with cocoapods-readme.

    opened by ReadmeCritic 0
  • Not getting Stable Frequency from Tuner

    Not getting Stable Frequency from Tuner

    Frequency Jumping value Issue:

    First of all, thank you to all contributors to make such a beautiful library for audio signal processing. I am working with the TuningFork in Swift language. I am getting Frequency values using these lines of source code:

    ` let tuner = Tuner2(threshold: 0.07, smoothing: 100) tuner.delegate = self tuner.start()

    func tunerUpdate(frequency: Double, amplitude: Double, output: TunerOutput?) { print(frequency) DispatchQueue.main.async { self.frequencyLabel2.text = "(frequency)" self.frequencyLabel.text = "(output?.frequency)" } } `

    I tried to play with the smoothing factor as well, but didn't get the expected result. I know underneath of it, it uses Audio kit class to fetch frequency. I'm playing constant tone of 440HZ using Online Tone Generator I'm getting following output on the console: 439.9840393066406 440.38458251953125 439.7295227050781 439.8203430175781 441.4441223144531 439.86761474609375 439.6636962890625 440.0050354003906 440.33563232421875 439.76751708984375 439.783447265625 440.5208740234375 439.9042053222656 439.4401550292969 440.30364990234375 440.1394348144531 439.8302001953125 439.8034973144531 440.6266784667969 439.9085693359375 439.7518005371094 440.29833984375 440.1784362792969 439.68890380859375 439.7640075683594 440.32940673828125 439.7660827636719 439.8304138183594 440.0731506347656 440.2150573730469 439.9083251953125 440.139404296875 440.3115539550781 439.6862487792969 439.5714416503906 440.3525085449219 440.2285461425781 439.4862976074219 440.1347351074219 440.0155334472656 439.7291564941406 440.0360107421875 440.4422912597656 439.9488220214844 439.7005615234375 440.00689697265625 440.3395080566406 440.0696716308594 439.83135986328125 440.4776916503906 439.94708251953125 439.6653137207031 440.0530090332031 440.1722412109375 439.7640075683594 439.76470947265625 440.46136474609375 439.9795837402344 439.6659240722656 440.28472900390625 440.18646240234375 439.7535705566406 439.69677734375 440.0879821777344 439.6529235839844 439.5359191894531 440.345458984375 440.1731872558594 439.7319030761719 439.70684814453125 439.95050048828125 439.6074523925781 439.70654296875 440.2434387207031 440.247314453125 439.6749572753906 440.07830810546875 439.9927062988281 439.74713134765625 439.5524597167969 440.1600036621094 439.83251953125 440.11181640625 440.08001708984375 440.29376220703125 439.70159912109375 439.84698486328125 441.3559265136719 439.7513122558594 440.255859375 440.0333251953125 440.4356689453125 439.6879577636719 439.8522644042969 440.4087829589844 439.8197326660156 439.828857421875 440.4480895996094 440.10369873046875 439.4685974121094 439.90777587890625 440.0578308105469 439.86865234375 439.73681640625 440.3212890625 440.132080078125 439.73968505859375 439.8338928222656 440.0824279785156 439.7405700683594 439.611328125 440.2831115722656 440.114990234375 439.9194030761719 440.2281188964844 440.4231872558594 439.6780090332031 439.51788330078125 440.2079772949219 440.201171875 439.6846618652344 440.13836669921875 440.3392028808594 439.7142028808594 439.7164306640625 440.0718994140625 439.81396484375 439.661865234375 440.21075439453125 439.94970703125 439.7055969238281 439.9032287597656 441.0694580078125 439.8079528808594 439.4620361328125 440.09283447265625 439.98638916015625 439.68292236328125 439.8896484375

    It is not giving me that much accurate frequency values as I am getting in TE Tuner application. Here is an example of both application with the same frequency: Te Tuner App example video Test App example video

    opened by jogasinghbajwa 0
Releases(0.2.0)
Owner
Comyar Zaheri
Comyar Zaheri
Titanium Amplitude - Use the native Amplitude iOS/Android SDK in Titanium

Titanium Amplitude Module A lightweight module to use the native Amplitude SDK's in Titanium. Example import Amplitude from 'ti.amplitude'; // Initia

Hans Knöchel 6 Jan 14, 2022
Swift Xcode Project that demonstrates how to set up a microphone input via AudioKit verions 5.

AudioKit Mic Input Swift Xcode Project that demonstrates how to set up a microphone input via AudioKit verions 5. Be sure to plug in headphones in ord

Mark Jeschke 0 Oct 23, 2021
Recording Indicator Utility lets you turn off the orange microphone recording indicator light for live events and screencasts.

Recording Indicator Utility Recording Indicator Utility lets you turn off the orange microphone recording indicator light, making it ideal for profess

Tyshawn Cormier 121 Jan 1, 2023
MusicScore - A music score library with MusicPart, Measure, Note, Pitch and Tempo representations in swift structs

MusicScore A music score library with MusicPart, Measure, Note, Pitch and Tempo

null 7 Sep 19, 2022
iOS framework that enables detecting and handling voice commands using microphone.

iOS framework that enables detecting and handling voice commands using microphone. Built using Swift with minumum target iOS 14.3.

Ahmed Abdelkarim 20 Aug 4, 2022
AudioKit is an audio synthesis, processing, and analysis platform for iOS, macOS, and tvOS.

AudioKit is an audio synthesis, processing, and analysis platform for iOS, macOS (including Catalyst), and tvOS. Installation To add AudioKit

AudioKit 9.5k Dec 31, 2022
Extensions and classes in Swift that make it easy to get an iOS device reading and processing MIDI data

MorkAndMIDI A really thin Swift layer on top of CoreMIDI that opens a virtual MIDI destination and port and connects to any MIDI endpoints that appear

Brad Howes 11 Nov 5, 2022
An iOS and macOS audio visualization framework built upon Core Audio useful for anyone doing real-time, low-latency audio processing and visualizations.

A simple, intuitive audio framework for iOS and OSX. Deprecated EZAudio has recently been deprecated in favor of AudioKit. However, since some people

Syed Haris Ali 4.9k Jan 2, 2023
Swift audio synthesis, processing, & analysis platform for iOS, macOS and tvOS

AudioKit AudioKit is an audio synthesis, processing, and analysis platform for iOS, macOS (including Catalyst), and tvOS. Installation To add AudioKit

AudioKit 8.7k Sep 30, 2021
Beethoven is an audio processing Swift library

Beethoven is an audio processing Swift library that provides an easy-to-use interface to solve an age-old problem of pitch detection of musical signals.

Vadym Markov 735 Dec 24, 2022
Simple command line utility for switching audio inputs and outputs on macOS

Switch Audio Simple command line utility for switching audio inputs and outputs

Daniel Hladík 3 Nov 22, 2022
AudioPlayer is a simple class for playing audio in iOS, macOS and tvOS apps.

AudioPlayer AudioPlayer is a simple class for playing audio in iOS, macOS and tvOS apps.

Tom Baranes 260 Nov 27, 2022
Soundable is a tiny library that uses AVFoundation to manage the playing of sounds in iOS applications in a simple and easy way

Soundable is a tiny library that uses AVFoundation to manage the playing of sounds in iOS applications in a simple and easy way. You can play

Luis Cárdenas 89 Nov 21, 2022
SoundManager - A simple framework to load and play sounds in your app.

SoundManager - A simple framework to load and play sounds in your app.

Jonathan Chacón 3 Jan 5, 2022
An advanced media player library, simple and reliable

About The SRG Media Player library provides a simple way to add universal audio / video playback support to any application. It provides: A controller

SRG SSR 145 Aug 23, 2022
SwiftySound is a simple library that lets you deal with Swift sounds easily

SwiftySound Overview SwiftySound is a simple library that lets you deal with Swift sounds easily. Static methods Sound.play(file: "dog.wav") Sound.pla

Adam Cichy 1.1k Dec 17, 2022
:musical_keyboard: A simple iOS synthesiser powered by Pure Data. Based on the Korg Monotron Delay.

Monotone Delay A simple iOS Synthesizer based on Pure Data. You can see a short demo of the app on youtube. If you want to buy the app you can find it

Justus Kandzi 17 Oct 16, 2022
A simple Spotify lyrics viewer menu bar app for macOS in Swift 3

lyricsify This is a simple macOS menu bar application that shows you the lyrics of current playing spotify track. All the lyricses are from Wikia webs

Mohamad Jahani 85 Dec 31, 2022
Dead-simple queue-oriented client for Spotify

Spotiqueue A terribly simple macOS app for keyboard-based, queue-oriented Spotify use. Many years ago i built a version which relied on a now-deprecat

paul 74 Dec 3, 2022