Recognizing chords in any position