WHEN listening to music, humans experience the sound

Transcription

1 116 IEEE TRANSACTIONS ON AUDIO, SPEECH, AND LANGUAGE PROCESSING, VOL. 16, NO. 1, JANUARY 2008 Instrument-Specific Harmonic Atoms for Mid-Level Music Representation Pierre Leveau, Emmanuel Vincent, Member, IEEE, Gaël Richard, Senior Member, IEEE, and Laurent Daudet, Member, IEEE Abstract Several studies have pointed out the need for accurate mid-level representations of music signals for information retrieval and signal processing purposes. In this paper, we propose a new mid-level representation based on the decomposition of a signal into a small number of sound atoms or molecules bearing explicit musical instrument labels. Each atom is a sum of windowed harmonic sinusoidal partials whose relative amplitudes are specific to one instrument, and each molecule consists of several atoms from the same instrument spanning successive time windows. We design efficient algorithms to extract the most prominent atoms or molecules and investigate several applications of this representation, including polyphonic instrument recognition and music visualization. Index Terms Mid-level representation, music information retrieval, music visualization, sparse decomposition. I. INTRODUCTION WHEN listening to music, humans experience the sound they perceive in view of their prior knowledge, using a collection of global properties, such as musical genre, tempo, and orchestration, as well as more specific properties, such as the timbre of a particular instrument. Bridging the gap between audio waveforms and such high-level properties constitutes the aim of semantic audio analysis, which has attracted a lot of research effort recently. Ultimately, machine listening systems with close-to-human performance would lead to improvements for many signal processing applications, including user-friendly browsing of music archives and interactive sound modification. On the one hand, starting from the audio waveform, a large number of low-level features have been proposed for the description of timbre and harmony within short time frames, such as the popular Mel-frequency cepstral coefficients (MFCCs) [1], chroma vectors [2], and other features standardized in MPEG-7 Manuscript received October 19, 2006; revised August 10, This work was supported in part by the European Commission under Contract FP K-SPACE, CNRS, and the EPSRC under Grant GR/S75802/01. The associate editor coordinating the review of this manuscript and approving it for publication was Dr. Malcolm Slaney. P. Leveau was with the Institut Jean Le Rond d Alembert, LAM team, University Pierre et Marie Curie-Paris 6, F Paris, France, and the Département TSI, GET-ENST, F Paris, France. He is now with Aldebaran Robotics, Paris, France ( L. Daudet is with the Institut Jean Le Rond d Alembert, LAM team, University Pierre et Marie Curie-Paris 6, F Paris, France ( jussieu.fr). Emmanuel Vincent is with the METISS Project, IRISA-INRIA, Rennes cedex, France ( G. Richard is with the Département TSI, GET-ENST, F Paris, France ( Digital Object Identifier /TASL [3]. Based on these features, algorithms have been developed for genre or artist classification [4], instrument recognition [5], key finding [6], and structural segmentation [7]. Recent algorithms achieve good success rates, but seem to have reached a performance ceiling such that increasing complexity no longer significantly improves performance. This experimental observation can be partly explained by two factors [4]. First, low-level features only provide a rough description of polyphonic (i.e., multi-instrumental) data since they model the input sound as a whole, whereas humans are generally able to describe, to some extent, each instrument separately. Second, these features, being defined on short time frames, do not easily account for long-term dependencies or rare events. Existing algorithms typically use bag-of-frames approaches: features are extracted at fixed time lags, each lag corresponding to a frame, sometimes with additional derivative or variance features. Hence, a given musical extract is described by a collection of framewise features called a bag of frames. Then, classes (e.g., instruments, groups of instruments, musical genres) are modeled in this feature space using machine learning algorithms such as K-Nearest Neighbors [8], Gaussian mixture models [8], [9], or support vector machines [9]. By contrast, humans may assess temporal variations at different time scales for each instrument and discriminate similar data based on time-localized cues observed in a few time frames only. On the other hand, a significant amount of work has been devoted to the processing of music in a symbolic framework, most commonly using the musical instrument digital interface (MIDI) as the input format [10], [11], [12]. This score-like format exhibits several advantages over audio, since it is based on a considerably reduced amount of data, while incorporating much higher-level information in the form of note events and orchestration. This allows the use of advanced musicological models that may improve performance for certain tasks [10]. However, the main limitation of MIDI is that it loses some fine information available in audio signals such as frequency and amplitude modulations and spectral envelopes, which may be valuable for other tasks. Ideally, we would like to enjoy the best of both worlds by jointly processing audio and symbolic representations. However, most music is available in audio format only, and perfect polyphonic audio-to-midi converters are out of reach of today s technology [13]. An alternative solution is to derive intermediate signal representations emphasizing some semantic properties of music without seeking to estimate actual musical scores. To address the limitations of low-level features, these mid-level representations should fulfill two goals /$ IEEE

2 LEVEAU et al.: INSTRUMENT-SPECIFIC HARMONIC ATOMS FOR MID-LEVEL MUSIC REPRESENTATION 117 Describing instruments separately as much as possible. Incorporating long-term structures. This idea was introduced in [14] along with a possible mid-level representation involving different parametric sound objects, including weft objects consisting of harmonic sinusoidal partials. Other mid-level representations were proposed more recently for rhythmic [15] and harmonic content [16]. A limitation of these various representations is that they do not provide orchestration information, i.e., the instruments that are playing. This information is however crucial for genre classification [10] and would also allow separate visualization or processing of each instrument. An interesting approach that includes knowledge on instruments to represent signals has been made in [17]. The author introduced a nonresynthesizable representation that shows instrument presence probabilities as a function of time and pitch range, without onset detection or pitch estimation. In this paper, we propose a new mid-level representation of music signals that incorporates explicit instrument labels and intends to provide a single front-end for many information retrieval and signal processing tasks. This representation is derived from recent advances in the field of sparse approximation concerning the modeling of signal structures. The signal is decomposed into a small number of sound atoms or molecules, where each atom is a sum of windowed harmonic sinusoidal partials, and each molecule is a group of atoms spanning successive time windows. This signal model aims at representing harmonic instruments, namely wind instruments, bowed strings instruments, or tonal parts of singing voice. The additivity of the signal model makes it directly applicable to chords and multi-instrument pieces. As such, it is not suited for nonharmonic instruments (e.g., drums) and slightly inharmonic instruments (e.g., piano). However, by taking advantage of the flexibility of sparse representations, it would be possible to include other types of atoms designed for these specific sources. In this paper, each atom is labeled with a specific instrument by prior learning of the amplitudes of its partials on isolated notes. The instantaneous amplitudes and frequencies of the partials and their temporal variations can provide additional timbre information. Our goal is to get representations that exhibit some information on the played notes, such as intensity, pitch, onset, offset, and timbre. Clearly, more complex musicological models would be needed for accurate score transcription, where the goal is to minimize the estimation errors of the aforementioned parameters [13]. Nevertheless the representations described in this paper still allow the inference of higher-level knowledge, such as the orchestration, the pitch range, the most typical intervals between notes, etc. This paper is organized as follows. In Section II, we present the rationale for the signal model and provide a mathematical definition of atoms and molecules. We subsequently design efficient algorithms to extract the most prominent atoms or molecules (Sections III and IV) and to learn the model parameters (Section V). In Section VI, we illustrate two applications of the proposed representation: music visualization and music instrument recognition on solo and duo pieces. Finally, we conclude in Section VII and provide perspectives on further research. II. SIGNAL MODEL Generally speaking, the goal of sparse approximation is to represent a discrete-time signal as a weighted sum of atoms, taken from a fixed dictionary, plus a residual where is a finite set of indexes. The precision of the approximation can be measured by the signal-toresidual ratio (SRR) in decibels (db) defined by SRR. The term sparse refers to the desirable goal for a decomposition that the number of selected atoms be as low as possible for a given SRR and much lower than the length of the signal in number of samples. When the atoms are similar to the signal, high sparsity and high SRR can be achieved at the same time. Sparse decomposition provides a natural framework for midlevel representation. Indeed, the set of atoms representing the observed signal may be partitioned into multiple subsets, where each subset represents a different instrument and where atoms from different subsets possibly overlap in time. Also, atoms may have complex temporal structures. Various dictionaries have been used for audio signals so far. Dictionaries of windowed sinusoidal atoms have been used for speech modification in [18], then for audio coding in [19]. Complex expansions of these atoms, namely Gabor atoms, have been used for audio signal decompositions in [20] and applied to audio coding in [21], [22]. Other waveforms have been used: damped sinusoids [23], local cosines in addition to dyadic wavelet bases [24], chirped Gabor atoms [25], [26]. The latter are time-localized complex sinusoidal signals with linearly varying frequency defined by where is a finite-length window and denote, respectively, the scale, time location, frequency, and chirp rate parameters. In the remainder of this paper, atoms are denoted by complex-valued signals, since in practice, sparse decompositions of real-valued signals can involve pairs of atoms consisting of one complex-valued atom and its conjugate, as presented in [20], [21], and [23]. Chirped Gabor atoms can efficiently represent most nonpercussive musical sounds, which consist of sinusoidal partials with slowly varying frequency and amplitude. However, the resulting decompositions cannot be considered as mid-level representations, since they do not exhibit any pitch or timbre information. Sparsity can be increased by designing an appropriate dictionary where the atoms exhibit more similarity with the analyzed signal. Obviously, this requires some prior knowledge about the signal. In this section, we define instrument-specific harmonic atoms and molecules based on the assumption that the analyzed signal involves instruments producing harmonic sinusoidal partials only and that the set of possible instruments is known. (1) (2)

3 118 IEEE TRANSACTIONS ON AUDIO, SPEECH, AND LANGUAGE PROCESSING, VOL. 16, NO. 1, JANUARY 2008 A. Instrument-Specific Harmonic Atoms We define a harmonic atom as a sum of windowed sinusoidal partials at harmonic frequencies with constant amplitudes but linearly varying fundamental frequency. Using chirped Gabor atoms to represent the partials, each harmonic atom is expressed as (3) where is the scale parameter, the time location, the fundamental frequency, the fundamental chirp rate, the vector of partial amplitudes, and the vector of partial phases. The number of partials is defined from so that the frequency of the uppermost partial is just below the Nyquist frequency, with a maximum of 30 partials. In addition to the definition of harmonic atoms in [27], the proposed definition takes into account possible frequency variations using a chirp parameter and assumes that the partial amplitudes are fixed a priori instead of being determined from the analyzed signal. Also, the partial amplitudes satisfy the constraint so that the resulting atoms have unit energy. This condition is fulfilled if we assume that is large enough so that the Gabor atoms are pairwise orthogonal for different values of. As mentioned in [27], the quasi-orthogonality of the partials for an atom of fundamental frequency depends on the scale and the window. We only consider the quasi-orthogonality of flat harmonic atoms here since the search step in Section III-B is performed only on such atoms; the chirp rates are determined by a subsequent parameter tuning step as will be explained. In fact, for the lowest considered fundamental frequency, the modulus of the inner product between two consecutive partials of a flat harmonic atom is. The most distinctive feature of the proposed model is that the vector of partial amplitudes is learned on isolated notes, so as to represent a single instrument among all instruments possibly present in the polyphonic signal. More precisely, the frequency range of each instrument is partitioned into several pitch classes, and each vector is associated with a single instrument/pitch class. Each class may contain several amplitude vectors denoted by, with. The learning of these vectors is detailed in Section V. In addition to providing explicit instrument labels, instrument-specific amplitude vectors also potentially increase the accuracy of the representation by better discriminating instruments playing at the same time, as shown previously with different models for score transcription, source separation, and instrument recognition [28] [30]. The proposed model hence shares similar principles to template-based instrument recognition algorithms [28]. (4) Fig. 1. Representation of a solo flute signal as a collection of harmonic molecules. Each atom is represented by a parallelogram centered at its time-pitch coordinates (u; f ), whose width, height, and inclination are, respectively, proportional to its scale s, weight, and fundamental chirp rate c. Each molecule is depicted as a rectangle covering several atoms. B. Instrument-Specific Harmonic Molecules While they help to describe instruments separately, instrument-specific harmonic atoms are time-localized and therefore do not capture long-term temporal content. A more informative mid-level representation may be obtained by replacing the atomic decomposition (1) by a better structured decomposition. To this aim, we propose to decompose the signal as a set of instrument-specific harmonic molecules, where each molecule is a group of instrument-specific harmonic atoms satisfying the following constraints. The atoms span a range of time locations, with exactly one atom per location. All atoms have the same instrument label. The log-variation of fundamental frequency between any two consecutive atoms is bounded by a threshold Fig. 1 displays some example molecules modeling a solo flute signal. It can be observed that the fundamental frequencies, the weights, and the fundamental chirp rates of the atoms vary over time within each molecule. The two following sections are dedicated to the extraction of isolated atoms (III) and molecules (IV). III. EXTRACTION OF PROMINENT ATOMS Given the two models of music signals defined above, the goal is now to decompose a signal using either one of these models at a reasonable computational cost. We concentrate in this section on the atomic decomposition (1) using the flat (constant ) atomic model described in Section II-A. Many sparse decomposition techniques have been proposed in the literature. As in [20], we consider a given sparse decomposition to be optimal when it results in the best SRR among all decompositions with the same number of atoms. The matching pursuit (MP) algorithm, introduced in [20], extracts the atoms (5)

4 LEVEAU et al.: INSTRUMENT-SPECIFIC HARMONIC ATOMS FOR MID-LEVEL MUSIC REPRESENTATION 119 iteratively in order to maximize the SRR at each iteration. It is therefore only optimal at every step and not globally. In practical cases, this algorithm has been shown to provide near-optimal decompositions at small computational cost on standard dictionaries. However, it cannot be applied to a dictionary of harmonic atoms with fine resolution for each parameter, since the large number of parameters per atom would result in an extremely large dictionary. Thus, we propose a modified MP algorithm, where each iteration consists of selecting the best atom from a dictionary with coarse resolution and tuning some of the parameters of this atom to maximize the SRR, as in [20]. Such an approach may be related to weak matching pursuit [31], that consists in selecting an atom that may not be optimal but whose modulus of its inner product with the signal is within close bounds of the optimal. In our case, such bounds cannot be computed in a straightforward manner. The asymptotic convergence towards zero of the proposed algorithms is not proven, which in practice is not a problem since we stop the algorithm after few iterations. A. Sampling of the Dictionary The resolution of the dictionary is not imposed by the algorithm and can be chosen so as to achieve a suitable tradeoff between SRR and computational cost. For the applications in Section VI, the harmonic atoms are generated from a Hann window, and their discretized parameters and are sampled as follows, assuming a sampling frequency of khz. The scale is set to a single value, corresponding to a duration of 1024 samples (46 ms). The time location is set to equally spaced frames, with a step of 512 samples (23 ms). The fundamental frequency is logarithmically sampled, with a step of ( tone). The fundamental chirp rate is set to 0. The vector of partial amplitudes is one of the vectors for the instrument and the pitch class that is the closest to. The logarithmic sampling of contrasts with the linear sampling used in [27] and is a natural choice for western music. Additional scales could be chosen for applications requiring a high resynthesis quality, such as audio coding. As proposed in [20] and [23], the vector of partial phases is not discretized, but computed from the data as a function of the other parameters in order to maximize the SRR where the inner product between two signals is defined by. B. Modified MP Algorithm The modified MP algorithm involves the following steps, as illustrated in Fig. 2. 1) The inner products between the signal and all the atoms of the dictionary are computed. (6) Fig. 2. Flow chart of the modified MP algorithm for the extraction of prominent harmonic atoms. 2) The atom that gives the largest absolute inner product is selected 3) The fundamental frequency, the fundamental chirp rate, and the partial phases of this atom are tuned in order to maximize the SRR with and fixed. The optimization is performed under the constraint that lies between the two neighboring bins of the fundamental frequency grid. Once done, the atom parameters and weight are stored. 4) The tuned atom is subtracted from the signal, and the inner products are updated on the residual for all atoms temporally overlapping with. The algorithm is iterated from step 2) until a target SRR has been achieved or a given number of atoms has been extracted. This atom tuning scheme leads to significant additional computational cost since the efficient inner product update described in [20] cannot be implemented here. Parameter tuning is conducted using a conjugate gradient algorithm detailed in Appendix I. We emphasize that this algorithm is applied to the whole signal as in [20] and [32], as opposed to a number of approaches ([21] and [22]) employing MP on a frame-by-frame basis. IV. EXTRACTION OF PROMINENT MOLECULES The modified MP algorithm presented in Section III extracts atoms that exhibit significant harmonic structures in the analyzed signal, but that are independently extracted, with no explicit link between each other. One could perform a clustering step after atomic decompositions by grouping neighboring atoms into molecules. However, such a procedure would not lead to optimal molecules: the weights of the individual atoms are optimized independently from each other while the atoms are not orthogonal. This typically occurs when a long signal structure is analyzed with short atoms, for example a long sinusoid with short Gabor atoms, as pointed out in [33]. Indeed, the early extracted atoms catch a large part of the signal energy, while the subsequent ones are extracted to fill the (7)

5 120 IEEE TRANSACTIONS ON AUDIO, SPEECH, AND LANGUAGE PROCESSING, VOL. 16, NO. 1, JANUARY 2008 holes. In this case, the energy of the atoms may not follow the instantaneous energy of the analyzed structure. To overcome this issue, molecules are here directly extracted in the iterative process, leading to a representation where atoms have their parameters tuned to better fit the underlying music notes. A molecule is a set of neighboring atoms with their respective weights. The corresponding waveform is a linear combination of atoms (8) In our case, the atoms within a molecule follow the constraints that have been defined in Section II-B. To stay consistent with the MP framework, finding the optimal molecule, in the least square sense, consists in finding the combination of weighted atoms that maximizes with the constraint. Given the atoms of one molecule and with no constraint set on the norm of, the optimal weights are computed with an orthogonal projection using the Gram determinant 1 If the constraint is set, the optimal weight vector to (9) is colinear (10) Thus, the modulus of the inner product between the signal and the molecule signal, which we call the total weight of the molecule,is (11) The computation of the orthogonal projection of on every set of atoms to get the coefficients would be very costly. Thus, an additive structure based on the inner products between the signal and the individual atoms is desirable in order to facilitate a dynamic programming scheme. A heuristic weight is thus chosen a priori to estimate the best molecule (i.e., maximizing ) (12) This is the exact weight of the molecule if the atoms are orthogonal. This is clearly not the case in our study because the time frequency supports of the atoms overlap. However, this has little effect on the choice of the best molecule, since the ratio between and is typically similar for the top candidate molecules. Nevertheless, it is worth noting that optimizing with respect to would lead to the selection of molecules that are the longest possible, since adding any atom to a molecule increases its weight. We address this issue by introducing a two-step approach, each in- 1 The Gram determinant G(x ;x ;...;x ) is the determinant of the Gram matrix defined by its elements G = hx ;x i. Fig. 3. Flow chart of the proposed algorithm for the extraction of prominent harmonic molecules. volving dynamic programing. First, a search time interval is delimited using the time support of the best molecule containing a preselected seed atom (equivalent to the best atom that is selected in the atomic algorithm, described in Section III). This support is obtained by extending the molecule until the atoms aggregated at the extremities fall below a predefined energy threshold. Second, the estimation of the best molecule is performed: it consists in searching the best atom path spanning this time interval. This two-step approach is also motivated by the difficulty to compare paths with different time supports. Once the best path has been found, the atom parameters are tuned, and the atom weights are computed in order to maximize the SRR. The whole iterative decomposition algorithm is depicted in Fig. 3. The first two steps of the algorithm (namely inner products initialization and selection of the seed atom) are similar to those of the atomic approach. The subsequent steps are detailed below. A. Search for the Best Atom Path The selection of a molecule is equivalent to the search of the best path on several instrument-specific time pitch grids. These grids are built as follows: each node of the grid for instrument is indexed by its discrete time location and fundamental frequency, asdefined in Section III-A. It also carries a value which is the maximum of the squared absolute inner products between the signal and the atoms of parameters and over all the vectors of partial amplitudes for the instrument and the pitch class that is the closest to. Hence, the weight of a path is defined by (13)

6 LEVEAU et al.: INSTRUMENT-SPECIFIC HARMONIC ATOMS FOR MID-LEVEL MUSIC REPRESENTATION 121 Fig. 4. Selection of the forward path. The frequency log-variation threshold D is assumed to be equal to the frequency discretization step and the pitch search region is delimited by the two diagonal lines. The current best path is composed of black atoms. The little segments before the black atoms show the possible previous atoms for each black atom. The node corresponding to the seed atom is called the seed node. The search for the best atom path involves two steps. First, a single time search interval is delimited for all instruments using a Viterbi algorithm [34] on a restricted region. Then, it is used again to find the best path within this interval for each instrument. 1) Viterbi Algorithm: Suppose that a path is searched from an initial time towards increasing time (forward path search). Considering an instrument grid, at time and pitch, the Viterbi algorithm is based on the principle (14) where is the set of pitch bins that can reach the pitch bin, subject to the condition (5). Practically, the best path is constructed iteratively from the initial time to the final time, keeping track of the intermediate best paths along the search. Once a stopping condition is reached, a backtracking operation gives the best path. This algorithm has a complexity equal to, where is the number of time bins of the path. Note that the total number of fundamental frequency bins does not affect complexity. Indeed, the search region is triangular, so that the number of considered fundamental frequencies is proportional to the path duration. This algorithm is applied for the two steps described below. 2) Delimiting the Time Search Interval: The search interval is delimited by computing a backward path and a forward path starting from the seed node. The algorithms for building these two paths are strictly symmetric. Only the algorithm for the forward path is detailed below. The path that gives the largest weight under the constraints set in Section II-B can be estimated via the Viterbi algorithm described above, as illustrated in Fig. 4. A transition is allowed between two successive atoms when their fundamental frequencies satisfy the constraint (5), resulting in a triangle-shaped pitch search region. The forward limit ( for the backward limit) of the time search interval is attained when the value of the last node of the current best path becomes lower than a threshold defined as follows: (15) where is the weight of the first seed atom selected in the entire decomposition, is the weight of the seed atom of the current molecule. and are fixed ratios. The term is a global energy threshold that prevents the selection of background noise atoms. is typically chosen so that this threshold lies slightly below the energy threshold corresponding to the target SRR. The term introduces an adaptive energy threshold for each molecule, which avoids the selection of atoms belonging to subsequent or previous notes or to reverberation. Note that must be larger than, otherwise it has no effect on because is almost always larger than. Typical values for and are given in Section VI. 3) Estimation of the Best Path: Once the time search interval has been determined, the Viterbi algorithm is applied for each instrument on the rectangular grid delimited by the search interval and the whole instrument pitch range, this time without constraining the initial and final nodes. One path per instrument is thus obtained, and the path with the largest weight is finally selected. Note that the initial seed atom is not used anymore and may not be included in the final molecule. B. Tuning of Atom Parameters In order to improve the parameter resolution of the atoms of the selected molecule compared to that of the dictionary, the parameters and are tuned for each atom at a time so as to maximize the SRR under the constraint that stays between the two neighboring bins of the fundamental frequency grid, while keeping the parameters of other atoms fixed. This tuning is conducted using a conjugate gradient algorithm [35], as described in Appendix I. C. Computation of the Atom Weights As pointed out in Section IV, the atoms contained in a molecule are not orthogonal. Thus, the optimal weights are computed a posteriori using (9) as in [23]. D. Signal and Inner Products Update Once the optimal weights are computed, the molecule is subtracted from the signal by subtracting each atom scaled by the corresponding weight. The inner products are updated on the residual for all atoms temporally overlapping with at least one atom of the molecule. The algorithm is then iterated from the seed atom selection until no remaining atom satisfies constraint (15), a target SRR has been achieved, or a predefined number of atoms has been extracted. These stopping criteria are chosen so as to avoid the extraction of spurious low energy molecules. E. Complexity and Scalability The computational load is dominated by the update of the inner products and the parameter tuning for each algorithm. The following discussion evaluates the complexity of a single iteration of the algorithm. We recall that is the maximum log-fundamental frequency deviation between two consecutive atoms in a molecule, the number of partials of an instrument-specific harmonic atom, and the number of atoms per set. With the number of time steps of the atom path and the scale in number of samples, the number of instruments in the

7 122 IEEE TRANSACTIONS ON AUDIO, SPEECH, AND LANGUAGE PROCESSING, VOL. 16, NO. 1, JANUARY 2008 dictionary, and the number of fundamental frequencies, the load of the Viterbi algorithm is and the atom weights optimization. As we will see, they can be neglected with regard to the following operations. Given an iteration of the algorithm, the computation of inner products involves first a computation of the inner products between the signal and Gabor atoms where is the scale in number of samples. Note that for the first iteration, is the total number of time frames because all the inner products must be initialized. Then, the inner products between the resulting projections and the partial amplitudes vectors are computed with this complexity:. The parameter tuning has the following complexity:, where is the number of iteration of the gradient algorithm. In Section VI, the representations are evaluated with a set of five instruments, considering that each of the instruments in the ensemble plays a maximum of one note at a time, an assumption that is verified in the large majority of playing conditions for the five considered instruments. With the chosen parameters presented in Section VI, each algorithm takes approximately one minute to process one second of signal with the current Matlab implementation on a machine equipped with a Pentium IV 3-GHz processor. The computational load is mainly devoted to the tuning of the parameters (over 50% of the load) and to the update of the inner products (about 30%). However, it must be mentioned that this computational load is needed only once for the decomposition algorithms: once performed, each of the postprocessing procedures (see Section VI) are extremely fast (a fraction of real time). We assess the potential of the proposed representations for ensembles taken within a set of five monophonic instruments, which admittedly is a restricted context. These representations and the associated instrument recognition algorithms for solo performances would however be directly applicable to instruments playing chords. Indeed, each chord could be decomposed at no additional computation load as a sum of atoms or molecules, each one corresponding to a different note. The proposed representations would also be applicable to a larger number of instruments, e.g., 40 instead of 5. In this context, the contribution of the inner products with the vectors would become prominent and increase the computational load linearly with the number of instruments in the dictionary, which remains tractable. Moreover, hierarchical procedures [36] can be used to reduce the contribution of this load. V. LEARNING THE DICTIONARY PARAMETERS For the following experiments, the vectors of partial amplitudes are learned for each instrument/pitch class on isolated notes from three databases: the RWC Musical Instrument Sound Database [37], IRCAM Studio On Line [38], and the University of Iowa Musical Instrument Samples [39]. We select five instruments that produce harmonic notes: oboe (Ob), clarinet (Cl), cello (Co), violin (Vl), and flute (Fl). While recently developed approaches involve unsupervised and data-driven methods to build dictionaries [40], the learning is here done in a supervised way: atoms are associated to a pitch and a label. TABLE I TOTAL NUMBER OF TRAINING TIME FRAMES PER INSTRUMENT AND AVERAGE NUMBER PER PITCH CLASS For each isolated note signal, the time frame with maximal energy is computed, and all the subsequent time frames whose energy lies within a certain threshold of this maximum are selected. This relative threshold is set to a ratio of 0.05 in the following. The partial amplitudes are computed for each of these training frames by (16) where and are tuned in order to maximize the SRR on this frame, using the conjugate gradient algorithm described in Appendix I. The vector of amplitudes is then associated to the pitch class that is the closest to. The resulting number of vectors per instrument and per pitch class are indicated in Table I. The size of the dictionary varies linearly as a function of the number of amplitude vectors. Since the number of vectors is too large to ensure computationally tractable decompositions, we choose to reduce the number of vectors by vector quantization: amplitude vectors are kept for each class using the k-means algorithm with the Euclidean distance. The choice of this distance is justified by the SRR objective, as shown in Appendix II. This operation also helps avoiding overfitting by averaging the training data and removing outliers. VI. APPLICATIONS In this section, we evaluate the potential of the proposed representations for music visualization and polyphonic instrument recognition. The number of atoms per instrument/pitch class is set to, the noise level ratios and to 0.03 and 0.2 respectively, and the frequency log-variation threshold to (1/10 tone). The atom parameters are discretized as specified in Section III-A. A. Music Visualization The proposed mid-level representations can be used to visualize short- or long-term harmonic content and orchestration by plotting the estimated atoms or molecules on a time-pitch plane with instrument-specific colors. The representations provide a simple solution to the task of joint pitch and instrument transcription for polyphonic music signals, while the majority of polyphonic transcription algorithms output pitch estimates only. It is a common view that this task could be addressed instead by performing monophonic pitch transcription and instrument

8 LEVEAU et al.: INSTRUMENT-SPECIFIC HARMONIC ATOMS FOR MID-LEVEL MUSIC REPRESENTATION 123 Fig. 5. Visualization of a flute and clarinet duo, compared to the ground truth piano roll. Each atom is represented by a grayscale patch centered at its time-pitch coordinates (u; f ), whose width, height and inclination are respectively proportional to its scale s, weight, and chirp rate c. Each molecule is depicted as a dashed-line rectangle covering several atoms. The grayscale indicates the instrument associated with each atom. recognition on the outputs of a blind source separation algorithm, which should consist of a single instrument. However single-channel source separation algorithms typically rely on factorial Gaussian mixtures or hidden Markov models which exhibit exponential complexity with respect to the number of instruments, which makes them unusable so far for more than two instruments known a priori [29]. Another similar view is that this task could be solved by performing first polyphonic pitch transcription, then extracting each note via harmonicitybased source separation and applying monophonic instrument recognition to the separated note signals. However harmonicity does not provide sufficient information to reliably transcribe and separate notes sharing partials at the same frequencies, which typically results in erroneous instrument labels [30]. By contrast, our algorithms rely on timbre information at all steps, thus avoiding erroneous pitch estimates whose timbre does not correspond to any existing instrument. Also, it has linear complexity with respect to the number of possible instruments, which is much lower than the complexity of previous algorithms [29], [28] based on the same idea. Fig. 5 displays the representations computed from a recorded 10-s flute and clarinet excerpts extracted from a commercial CD, with a target SRR of 15 db or a maximal number of 250 atoms per second. The upper melodic line is played by the flute, the lower one by the clarinet. The atomic decomposition provides a relevant representation of the music being played, as shown by comparison with the ground truth piano roll. However, some of the extracted atoms have a large fundamental chirp rate that does not correspond to the actual variation of fundamental frequency of the music notes: the parameter tuning of an individual atom is perturbed by the residual coming from the extraction of a neighboring atom. The molecular decomposition seems close to what can be expected for a time pitch music representation: notes appear quite clearly as localized patches, instruments are often well identified. Compared to the visualization of the output of the atomic

9 124 IEEE TRANSACTIONS ON AUDIO, SPEECH, AND LANGUAGE PROCESSING, VOL. 16, NO. 1, JANUARY 2008 TABLE II CONTENTS OF THE TEST DATABASE FOR SOLO INSTRUMENT RECOGNITION decomposition, the aforementioned drawback is considerably reduced, and the frequency and amplitude modulations within the music notes are here clearly visible. The relevance of the representation lets us expect that this decomposition could be sufficient as a front-end for key finding [41] or melodic similarity assessment [42], and perhaps for polyphonic pitch transcription using efficient postprocessing methods based on musicological rules [13]. B. Solo Musical Instrument Recognition Musical instrument recognition on solo phrases has been handled in [43] [45], [9] with bag-of-frames approaches. The performances are now close to what expert musicians can do. In [44], expert musicians showed an average performance of 67% for the identification of 10-s excerpts among 27 instruments, while the complete system described in [46] reaches 70% for a similar test case. These methods cannot be employed directly for multi-instrument music without learning appropriate models for every possible instrument combination. The nature of the presented decomposition output suggests an application to musical instrument recognition, since each atom is associated with a specific instrument. Before validating this claim on polyphonic music signals, we evaluate the instrument discriminating power on solo excerpts as a benchmark. In this case, one way of identifying the underlying instrument waveform is to compute a score for each instrument class and to select the instrument with the largest score. We propose to express this score as a function of the absolute weights of all the extracted atoms from this class (17) where is the set of indexes of the atoms that come from instrument, and to select the instrument with the largest score. The coefficient is optimized to balance the importance of high- and low-energy atoms. On a development set whose contents are similar to the test set but come from different sources, the best classification accuracy was achieved for. The goal of this experiment on real solo phrases is to provide a benchmark of the performances of the algorithm on realistic signals. In other words, before applying it to polyphonic signals we have to check that it has good discrimination capabilities for the instruments waveforms. The decomposition algorithms are applied on a test database of 2-s solo excerpts, obtained by partitioning five tracks from different commercial CDs for each instrument, discarding silence intervals. The number of excerpts is shown in Table II. This yields 95% confidence intervals smaller than 0.1% on the measured recognition accuracies. However, it is worth noting that this confidence interval is rather optimistic since it relies on the independence of the test samples, whereas test samples coming from the same recording cannot reasonably be considered as independent. The algorithms are stopped when the SRR becomes larger than 10 db or the number of extracted atoms reaches 100 atoms per second. The classification results obtained from the atomic decomposition and the molecular decomposition are given in Table III in the form of a confusion matrix. The average recognition accuracy equals 77.3% for the atomic decomposition and 73.2% for the molecular decomposition. Note that all instruments are often confused with the flute, which could be due to the fact that the flute exhibits some prototypical characteristics common to all instruments, as suggested in [4]. If a larger number of instruments is considered, for instance 40, the decomposition algorithm would still be tractable since the computation time is approximately linear with the number of instruments and that less atoms per pitch class can be kept (e.g., 8 instead of 16). However, the raw music instrument recognition results should drop, as for any music instrument recognition algorithm. In this case, the atoms would still align to the correctly played pitches, but the instrument labels would not be reliable enough to derive a good annotation of the signal. Nevertheless music instrument recognition in a such open context would be possible for families of instruments (simple reed, double reed, bowed strings, brass, etc.), whose prototypical characteristics given by the physical production mode of the sounds can be caught in the partial amplitudes vectors. The proposed classification systems exploit a reduced part of what constitutes musical timbre, namely the spectral envelope of the harmonic content. Hence they can be compared to standard solo instrument recognition algorithms exploiting spectral envelope features. We apply the algorithm described in [9] to ten MFCCs, which are known to represent the prominent characteristics of spectral envelopes. This algorithm uses support vector machines (SVMs) within a pairwise classification strategy. While it cannot be considered as a state-of-the-art system, it gives a good indication of what a very good classifier can do with widely approved features for timbre discrimination. It achieves an average recognition accuracy of 77.6% when the SVM is trained on the same isolated note signals as in Section V. This score is only slightly higher than the ones reported above. It should be remarked that the confusions do not happen on the same instruments. For instance, the SVM(MFCC)-based system fails at identifying the Clarinet, while the Violin is the weak point of our algorithms. It must be remarked that the overall scores are lower than figures appearing in other works on music instrument recognition. It is mainly related to the differences between the training set, composed of isolated notes recorded in almost anechoic conditions, and the test set, made of real recordings with subsequent room effects, and sometimes double notes for string instruments. The adaptation of amplitude parameters learning on real recordings gives a track for investigations. Indeed, the similarity of training data and the test data is a critical aspect for the success of a classifier. Other experiments we have performed with the SVM-based classifier with more features [46] have shown results increased

10 LEVEAU et al.: INSTRUMENT-SPECIFIC HARMONIC ATOMS FOR MID-LEVEL MUSIC REPRESENTATION 125 TABLE III RESULTS OF SOLO INSTRUMENT RECOGNITION USING THE ATOMIC DECOMPOSITION (FIRST COLUMNS), THE MOLECULAR DECOMPOSITION (MIDDLE COLUMNS), AND THE SVM(MFCC)-BASED ALGORITHM (LINES: TESTED, COLUMNS: ESTIMATED) by 10% if the classifier is learned on solos. A similar increase of performances can be expected for our classifier, leading to results that can be a good basis for further processing. C. Polyphonic Musical Instrument Recognition While as effective as standard feature-based approaches for solo musical instrument recognition, the proposed mid-level representations are naturally capable of handling polyphonic music. The experiment that will be described aim at showing that this task is possible without changing the learning step. By contrast, feature-based approaches would have to learn one classifier for every combination of instruments, which would quickly become prohibitive given the combinatorial explosion of the number of classes for which sufficient training data must be collected:, where is the number of instruments playing and the number of possible instruments. Moreover, some features, such as inharmonic content features, cannot be robustly extracted in polyphonic signals anymore. Polyphonic music instrument recognition is still an emerging topic, and very few studies involve extensive tests on real recordings. These approaches involve bag-of-frames techniques [5], template-based approaches [28], [47] [49], or prior source separation [50]. Among all the listed works, some of them cannot be easily implemented, others have a computational complexity too high to be performed on the entire database. For example, [5] requires the definition of 20 classes (15 duos, 5 solos) for our instrument set, and if a pairwise strategy was applied as in VI-B, it would need the training of 190 classifiers which is nearly intractable. Some methods ([28], [47]) are based on computational auditory scene analysis and composed of different complex modules necessitating fine and dedicated tuning, and with no available public implementation. [48] [50] state that the total number of instruments is known and that the involved instruments are different; moreover, [48] remains extremely complex and cannot be applied on the entire database. Thus, the experiments will only be performed for the two algorithms that have been developed. To show the potential of the approach, we provide polyphonic instrument recognition results on a database, even if they cannot be directly compared to the results of another algorithm. The test database is composed of 2-s excerpts involving four instrument pairs: ClFl, CoFl, FlFl, and CoVl. These excerpts are obtained by partitioning duo tracks from different commercial CDs. Note that, because the partitioning is unsupervised, some excerpts may contain one instrument only instead of two. The stopping criteria for the decomposition algorithms are an SRR of 15 db or a maximal number of 250 atoms per second. The following scoring method is chosen: each time frame is associated with one or two instrument labels by selecting the two atoms with the largest absolute weight, or one atom only if there is only one in this frame. Then, the label of the entire excerpt is decided by a majority vote, weighted by the sum of the absolute weights of the atoms in each frame. This method does not take any musicological knowledge into account, for example the separation of the melodic lines. Implementing a melodic line tracking in the time pitch plane is left for further research, but definitely possible in this framework. Three distinct accuracy scores are computed. The score A measures the recognition accuracy of the actual duo or of a single instrument of the actual duo if only one is detected. For instance, if the ground truth label is CoFl, the correct detections are Co, CoFl, and Fl. The score B counts a good detection when all the detected instruments belong to the actual duo. Considering the example above, the labels CoCo and FlFl are also accepted. Finally, the score C indicates the recognition accuracy of detecting at least one instrument of the actual duo. In our example, the labels CoVl, CoOb, CoCl, ClFl, ObFl, and FlVl are added. The scores obtained using a random draw would equal 15%, 25%, and 55%, respectively, for duos of different instruments (ClFl, CoFl, and CoVl) and 10%, 10%, and 30%, respectively, for duos of identical instruments (FlFl), considering all the labels with equal probability. The scores obtained from the atomic decomposition and the molecular decomposition are presented in Tables IV and V, respectively. The molecular algorithm shows a better performance for the score A than the atomic algorithm, and slightly lower performances for scores B and C. It must be noted that the scores are computed on 2-s segments, which is a quite short period to take a decision. 10-s decisions give higher results, but in this case the number of evaluations does not lead to statistically meaningful scores. Here again, the more structured decompositions coming from the molecular decomposition (see the example of duo on Fig. 5) let us expect that the performances can be improved by using adequate postprocessing, for example to split molecules that may contain several notes and by constructing molecule-based features exhibiting amplitude and frequency modulations.

11 126 IEEE TRANSACTIONS ON AUDIO, SPEECH, AND LANGUAGE PROCESSING, VOL. 16, NO. 1, JANUARY 2008 TABLE IV RESULTS OF INSTRUMENT RECOGNITION ON DUOS USING THE ATOMIC DECOMPOSITION (A: ACTUAL DUO OR SOLO, B: PRESENT INSTRUMENTS ONLY, C:AT LEAST ONE PRESENT INSTRUMENT) TABLE V RESULTS OF INSTRUMENT RECOGNITION ON DUOS USING THE MOLECULAR DECOMPOSITION (A: ACTUAL DUO OR SOLO, B: PRESENT INSTRUMENTS ONLY, C:AT LEAST ONE PRESENT INSTRUMENT) D. Remark and Perspectives for Music Instrument Recognition For both experiments, on solo and duo performances, it is important to note that there are several ways to build the decision procedure. The procedure for the solo case involves the amplitudes of the atoms, and thus gives the most importance to the most energetic atoms, while the one in the duos case involves a frame-based decision weighted by the atom amplitudes, which rather emphasizes instruments that are playing on most of the time frames. In the solo case, preliminary experiments have shown that a weighted frame-based method performs worse than the presented amplitude-based method (seven to ten points less for the overall score), but better than a purely frame-based method (one hard decision taken per time frame). On the opposite, in the duo case, the weighted frame-based method performs as well as a purely frame-based method. As a perspective, the balance between the structure-based decisions (atoms or molecules) versus frame-based decisions is a subject of study, but beyond the scope of this paper. VII. CONCLUSION We have introduced in this paper a novel mid-level representation of music signals, based on the decomposition of a signal into a small number of harmonic atoms or molecules bearing explicit musical instrument and pitch labels. The key feature of this system is that the parameters of each atom are learned from real recordings of isolated notes. Deterministic greedy algorithms derived from matching pursuit can be used to extract these decompositions from real polyphonic recordings, with good accuracy and reasonable complexity. These decompositions, although very compact and prone to some transcription errors (as any such system without high-level musicological models), retain some of the most salient features of the audio data. In fact, this object-based decomposition could be used in numerous applications such as object-based audio coding, sound indexing, and modification. Such postprocessing on the decomposition outputs will have to be evaluated compared to task-specific audio processing. In this paper, the potential of these representations has been thoroughly demonstrated on the task of automatic musical instrument recognition. On monophonic excerpts, the proposed algorithms obtained have nearly equivalent performances than a standard MFCC feature-based approach. Furthermore, the full benefits come when considering polyphonic music, where a basic postprocessing method leads to encouraging results on realistic signals. Future work will be dedicated to a number of possible improvements, and in particular to the extension of the dictionary to include additional atoms capturing more diverse timbre information such as intrinsic amplitude and frequency modulations, transient characteristics, or noise components, as well as perceptual criteria. APPENDIX I The tuning of the parameters and is performed via a conjugate gradient algorithm, where the partial phases are reestimated at each iteration using (6). The maximization of the SRR is equivalent to the maximization of the square inner product between the atom and the signal (18) Assuming that the partial atoms (denoted for conciseness) are pairwise orthogonal, this gives The gradient of this quantity is defined by Denoting by with This can also be written (19) (20) the sample-wise product of two signals, and and, we obtain (21) (22) (23) A fast computation of this gradient can be achieved by storing the signals and.

Automatic Transcription: An Enabling Technology for Music Analysis Simon Dixon simon.dixon@eecs.qmul.ac.uk Centre for Digital Music School of Electronic Engineering and Computer Science Queen Mary University

Introduction Data production rate has been increased dramatically (Big Data) and we are able store much more data than before E.g., purchase data, social media data, mobile phone data Businesses and customers

Chapter 4 The Scientific Data Mining Process When I use a word, Humpty Dumpty said, in rather a scornful tone, it means just what I choose it to mean neither more nor less. Lewis Carroll [87, p. 214] In

, pp.347-354 http://dx.doi.org/10.14257/ijmue.2014.9.8.32 A Sound Analysis and Synthesis System for Generating an Instrumental Piri Song Myeongsu Kang and Jong-Myon Kim School of Electrical Engineering,

Musical Pitch Identification Manoj Deshpande Introduction Musical pitch identification is the fundamental problem that serves as a building block for many music applications such as music transcription,

Music Mood Classification CS 229 Project Report Jose Padial Ashish Goel Introduction The aim of the project was to develop a music mood classifier. There are many categories of mood into which songs may

Music Classification by Composer Janice Lan janlan@stanford.edu CS 229, Andrew Ng December 14, 2012 Armon Saied armons@stanford.edu Abstract Music classification by a computer has been an interesting subject

EM Clustering Approach for Multi-Dimensional Analysis of Big Data Set Amhmed A. Bhih School of Electrical and Electronic Engineering Princy Johnson School of Electrical and Electronic Engineering Martin

Emotion Detection from Speech 1. Introduction Although emotion detection from speech is a relatively new field of research, it has many potential applications. In human-computer or human-human interaction

A Learning Based Method for Super-Resolution of Low Resolution Images Emre Ugur June 1, 2004 emre.ugur@ceng.metu.edu.tr Abstract The main objective of this project is the study of a learning based method

1 Example of Time Series Analysis by SSA 1 Let us illustrate the 'Caterpillar'-SSA technique [1] by the example of time series analysis. Consider the time series FORT (monthly volumes of fortied wine sales

MIDI: sound control Juan P Bello Interpreting MIDI MIDI code is the language used to communicate between devices Still, each device might decide to interpret the code in its own way according to its capabilities

Making Sense of the Mayhem: Machine Learning and March Madness Alex Tran and Adam Ginzberg Stanford University atran3@stanford.edu ginzberg@stanford.edu I. Introduction III. Model The goal of our research

An Introduction to Data Mining for Wind Power Management Spring 2015 Big Data World Every minute: Google receives over 4 million search queries Facebook users share almost 2.5 million pieces of content

Flat Clustering K-Means Algorithm 1. Purpose. Clustering algorithms group a set of documents into subsets or clusters. The cluster algorithms goal is to create clusters that are coherent internally, but

Clustering Clustering is an unsupervised learning method: there is no target value (class label) to be predicted, the goal is finding common patterns or grouping similar examples. Differences between models/algorithms

Using simulation to calculate the NPV of a project Marius Holtan Onward Inc. 5/31/2002 Monte Carlo simulation is fast becoming the technology of choice for evaluating and analyzing assets, be it pure financial

TCOM 370 NOTES 99-4 BANDWIDTH, FREQUENCY RESPONSE, AND CAPACITY OF COMMUNICATION LINKS 1. Bandwidth: The bandwidth of a communication link, or in general any system, was loosely defined as the width of

Introduction to time series analysis Margherita Gerolimetto November 3, 2010 1 What is a time series? A time series is a collection of observations ordered following a parameter that for us is time. Examples

Data, Measurements, Features Middle East Technical University Dep. of Computer Engineering 2009 compiled by V. Atalay What do you think of when someone says Data? We might abstract the idea that data are

SIGNAL SPECTRA AND EMC One of the critical aspects of sound EMC analysis and design is a basic understanding of signal spectra. A knowledge of the approximate spectral content of common signal types provides

Clustering and scheduling maintenance tasks over time Per Kreuger 2008-04-29 SICS Technical Report T2008:09 Abstract We report results on a maintenance scheduling problem. The problem consists of allocating

1 Mathematical Harmonies Mark Petersen What is music? When you hear a flutist, a signal is sent from her fingers to your ears. As the flute is played, it vibrates. The vibrations travel through the air

DATA MINING CLUSTER ANALYSIS: BASIC CONCEPTS 1 AND ALGORITHMS Chiara Renso KDD-LAB ISTI- CNR, Pisa, Italy WHAT IS CLUSTER ANALYSIS? Finding groups of objects such that the objects in a group will be similar

Automatic parameter regulation for a tracking system with an auto-critical function Daniela Hall INRIA Rhône-Alpes, St. Ismier, France Email: Daniela.Hall@inrialpes.fr Abstract In this article we propose

International Symposium on Performance Science ISBN 978-94-90306-02-1 The Author 2011, Published by the AEC All rights reserved An accent-based approach to performance rendering: Music theory meets music

Component Ordering in Independent Component Analysis Based on Data Power Anne Hendrikse Raymond Veldhuis University of Twente University of Twente Fac. EEMCS, Signals and Systems Group Fac. EEMCS, Signals

Decision Trees as a Predictive Modeling Method Gerry Hobbs, Department of Statistics, West Virginia University Abstract Predictive modeling has become an important area of interest in tasks such as credit

Research methods - II 3 2. Simple Linear Regression Simple linear regression is a technique in parametric statistics that is commonly used for analyzing mean response of a variable Y which changes according

Machine Learning using MapReduce What is Machine Learning Machine learning is a subfield of artificial intelligence concerned with techniques that allow computers to improve their outputs based on previous

BIDM Project Predicting the contract type for IT/ITES outsourcing contracts N a n d i n i G o v i n d a r a j a n ( 6 1 2 1 0 5 5 6 ) The authors believe that data modelling can be used to predict if an