Automatic Guitar String Detection Based on the Inharmonicity Coefficient
Συγγραφείς
Αλέξανδρος Ηλιάδης, Χρυσούλα Αλεξανδράκη
Σύνοψη
This paper explores the automatic detection of guitar strings, a topic closely related to the Music Information Retrieval task of automatic music transcription. The guitar, like most stringed musical instruments, is characterized by the ability to play a note of the same pitch on different strings and positions on the fretboard, thus offering more than one choice of finger placement during the performance of a musical excerpt. For this reason, guitar tablature notation has become more popular than the conventional symbolic representation of sheet music. However, for the automatic tablature transcription of a guitar audio recording, it is necessary not only to estimate the pitch and the duration of a note but also to detect the string on which it was played. The proposed methodology incorporates elements from relevant literature to implement a novel string detection algorithm based on the inharmonicity introduced by the guitar strings. In this context, inharmonicity refers to the shift of the partial frequencies of a note from harmonics to non-integer multiples of its fundamental frequency. This shift is determined by the physical parameters of a vibrating string, such as its length, diameter and tension, resulting in a different inharmonicity coefficient on different strings and frets. The inharmonicity coefficient of a string-fret pair is computed through spectral analysis of the monophonic audio signal of a corresponding note. Specifically, after applying the Short-Time Fourier Transform to the audio signal, several shifted partial frequencies are tracked and the ratio of each one of them to the fundamental frequency of the note is calculated. Following, a curve fitting procedure is carried out which results in the value of the computed inharmonicity coefficient. By repeating this process and computing the inharmonicity coefficient for at least one fret per string, its theoretical value across the entire fretboard is estimated. Hence, after a quick adaptation process where the inharmonicity coefficient is computed over a set of specific note samples, the system is ultimately ready to classify new notes into string-fret pairs. To evaluate the proposed approach a dataset consisting of isolated note samples from an electric guitar was utilized. Specifically, this dataset comprises three distinct subsets of note samples corresponding to separate audio recordings from the three discrete guitar pickups, while encompassing every string-fret pair up to the 12th fret. The algorithm was evaluated separately on all three subsets based on four different adaptation schemes, using the accuracy of classifying note samples into string-fret pairs as the criterion. These distinct adaptation schemes are defined primarily by the number of audio samples associated with selected frets that are used for adapting the algorithm to a specific guitar. By averaging over all available audio samples, the classification accuracy was estimated to be approximately 95% for each adaptation scheme. These results were deemed satisfactory and inspired future investigations for further improving the effectiveness of the algorithm, as well as for assessing its performance for real-time tablature transcriptions.