Giter Site home page Giter Site logo

drmyc / iospitchdetectorvideoexporter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mgill404/iospitchdetectorvideoexporter

0.0 2.0 1.0 53.34 MB

Pitch detection and video exporting demonstration

Objective-C 61.25% C++ 3.28% Objective-C++ 11.54% Makefile 0.26% C 23.38% Ruby 0.29%

iospitchdetectorvideoexporter's Introduction

iOS Pitch Detector & Video Exporter

demo of pitch detection and video exporting. This guy uses an open source pitch tracker named dywapitchtrack (http://www.schmittmachine.com/dywapitchtrack.html) to track monophonic pitch from the microphone or an input file. The video exporter creates a CADisplay timer which takes a (retina!) photo of a UIView handed to it at a regular interval of 60 Hz. This video can then be combined with an audio file.

TO RUN

Navigate to the directory in terminal and type "pod install"

Using the Pitch Tracking

File Tracker

The file tracker can be used by selecting the 'pitch' option on the segmented control and then pressing either of the play buttons. A sinusoid audio file will then be played. The file contains the frequencies 110, 220, 330, 440, 550, 660, 770, and 880 at even increments. The pitch tracker will output to the debugger what it thinks the current pitch is. The format for the output is

Rec. Pitch: pitch in hertz

Microphone Tracker

The microphone tracker is always on while the application is running. You simply speak, sing, or make noise into the simulator or iOS device and the microphone tracker will output to the debugger what it thinks the pitch is. The text will be formatted as follows

Live Pitch: pitch in hertz

Using the Video Exporting

The video exporter is started by pressing the Record Video button. Wait some time and then press the button again to stop the recording. After the rendering has completed, a tone audio file will be added to the video created. The video will be saved to the Documents directory of the iPad or simulator.

Locating the files from Simulator

~/Library/Developer/CoreSimulator/Devices/[DEVICE UUID]/data/Containers/Data/Application/[APP UUID]/Documents

where [DEVICE UUID] and [APP UUID] will be giant strings that identify your app and device. Trial and error often works for me to find the correct folders.

The files videoTest.mov and final_videoTest.mov will be in the folder. The first file has no audio, and the second file has audio added to the file.

Locating the files from Device

In XCode 6, hit Shift Command 2 to open the devices window. Alternatively hit Window->Devices in the tool bar. Select your connected iOS device. Select AudioAPITesting in the section Installed Apps. Press the gear below Installed Apps. Select Download Container. Save the container and view it in Finder. Right click the container. Select Show Package Contents. Navigate to AppData->Documents and the files videoTest.mov and final_videoTest.mov should be in the folder.

Known issues

Microphone Pitch Tracking

The pitch tracking algorithm does not handle audio stopping very well. It will spit report a bunch of bad values when input to the microphone stops.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.