0
$\begingroup$

I'm looking for a precise way to compute the key of a song. BPM would be cool too. Analog is ok. I tried to approach it from the DFT angle, but got stuck and can't really put a finger on what's the issue. New perspective would allow me to get out of the mental hole I'm in.

$\endgroup$

migrated from sound.stackexchange.com Sep 5 at 16:04

This question came from our site for sound engineers, producers, editors, and enthusiasts.

  • $\begingroup$ this is no small problem. even if the input is monophonic (one note at a time, usually from a single instrument or voice) this is no small problem. and if it is polyphonic, a mix of an ensemble of instruments, it's a female canine. i dunno how Melodyne does it. if it is monophonic, you need a pitch detector and from that result you need to make a histogram of the detected pitches. from the notes most often played you must match that set to the set of notes of candidate key. and differentiating between relative major and minor (and other modes) with the same key signature is also hard. $\endgroup$ – robert bristow-johnson Sep 6 at 4:50
  • $\begingroup$ You can infer the scale by looking at the intervals (not the individual notes but their "distance"). The intervals are like a signature for the scale and they can reveal if the scale is minor or major. Still, as RBW says, this would only be possible for a one-voice melody, possibly not even from an instrument as you would then have to also deal with timbre. ( @robertbristow-johnson I have a feeling that melodyne does it with something akeen to Prony's method (see 2:20. I've been losing sleep too :) ) $\endgroup$ – A_A Sep 6 at 8:50
  • $\begingroup$ well @A_A , you can only possibly infer the mode of the musical tune from looking at only the intervals. you won't know the difference between A minor or B minor or C minor. t's like running a signal through a differentiator. you lose the DC component. $\endgroup$ – robert bristow-johnson Sep 6 at 18:21
0
$\begingroup$

Insert a tuner into the audio chain and take down the notes coming through. Use the circle of fifths to calculate the key as best as possible.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy