Skip to content

A simple plugin for Unity for detecting the frequency / note of a monophonic audio source

License

Notifications You must be signed in to change notification settings

timmeh4242/PitchDetector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

PitchDetector is a simple plugin for Unity for detecting the frequency of an audio source (ie, judging a player's accuracy in a karaoke game).

For now, it's a simple experiment and largely just a vehicle for getting used to Unity's new ECS + Jobs framework. I've added the auto-correlation pitch detection method from PitchTracker, and then stumbled on the TarosDSP project; being that it was Java, I thought it'd be fun to bring over its FastYin implementation :)

Example

Setup is simple, just put GameObjectEntity, PitchDetector, and AudioSource components on your gameObject and hit Play. You can open the Entity Debugger window to enable / disable the different systems. There's a demo scene included with the project for testing and for helping those who are truly stuck.

What's Next

I'm not much for multi-threaded code, so for now it's all been commented out of FastYin, though performance is already quite good there. The plan is to eventually jobify + burst compile all implementations to get used to Unity's system and see what kinds of speedups we can achieve.

About

A simple plugin for Unity for detecting the frequency / note of a monophonic audio source

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages