- Home /
How to detect chords in unity?
Currently I am looking for a way to detect chords from playing the guitar(or through a microphone).
I know that you could do it in Unity seeing the case like yousician, but I couldn't find out how to do it.
Could anyone teach me how or give me a link to any website that could help me create it?
Answer by CmdrZin · Dec 14, 2020 at 08:26 PM
You basically need the frequency spectrum of the audio and then test for groups of frequencies.
see https://docs.unity3d.com/ScriptReference/AudioSource.GetSpectrumData.html
for hints.
Thank you for your answer! But I still don't fully understand the "test for groups of frequencies" part.
I assume that for certain chords there is a certain patterns of frequencies and I have to create a script to identify and match the patterns. (Sorry that I'm not fully understanding the basic knowledge for detecting the chords)
Is there a reference or library for what frequencies to check for specific chords?
Your answer
Follow this Question
Related Questions
Detecting audio file attached to audio source at runtime. 1 Answer
Audio Stutter after watching Unity Ads on iOS 0 Answers
Problem with audio 1 Answer
How to include audio volume value into Windows volume mixer? 1 Answer
Only play audio if it isn't already -- if (!audio.isPlaying) not working 2 Answers