Documentation
¶
Overview ¶
/home/megalith/megasound/keydetector/keydetector.go
/home/megalith/megasound/keydetector/krumhansl.go
/home/megalith/megasound/keydetector/pcp.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputePCP ¶
ComputePCP analyzes an audio stream and returns the detected key with Camelot Wheel notation.
func KrumhanslKeyProfiles ¶
func PCPKeyProfiles ¶
PCPKeyProfiles returns predefined key profiles for all major and minor keys based on music theory principles. These profiles correspond to the harmonic relationships between the 12 notes in the chromatic scale for each key.
Types ¶
type KeyDetector ¶
func NewKeyDetector ¶
func NewKeyDetector(s megasound.Streamer, sampleRate int) *KeyDetector
func (*KeyDetector) DetectKey ¶
func (kd *KeyDetector) DetectKey() (KeyResult, error)
type KeyProfile ¶
KeyProfile represents a key profile with its precomputed norm.
type KeyResult ¶
KeyResult represents the detected key with additional information like Camelot Wheel notation.
func KrumhanslSchmuckler ¶
KrumhanslSchmuckler computes the most likely key based on PCP and includes Camelot Wheel notation.