Skip to content

undertext/pitch_detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pitch detection

The main purpose of this github repository is to show how you can detect a pitch of the sound. I will try to describe all the steps to achieve this in a simple manner.

How to use

// Create audio input object to capture the sound.
// For desktop/laptop computers you can use MicrophoneAudioInput class.
AudioInputInterface audioInput = MicrophoneAudioInput.getAudioInput();

// Create frequency detector object.
FundamentalFrequencyDetector frequencyDetector = new FFTFundamentalFrequencyDetector(audioInput, 4096);

// Create tuner object.
GuitarTuner tuner = new DefaultGuitarTuner(frequencyDetector);

// Finally start the tuner and get results, then stop the tuner.
tuner.start();
TuneInfo info = tuner.tune();
System.out.println(info.note);
System.out.println(info.delta);
tuner.stop();

Build Status codecov

About

Small library for guitar pitch detection

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages