Query-by-Example Music Information Retrieval by Score-Informed Source Separation and Remixing Technologies

,


Introduction
One of the most promising approaches in music information retrieval is query-by-example (QBE) retrieval [1][2][3][4][5][6][7], where a user can receive a list of musical pieces ranked by their similarity to a musical piece (example) that the user gives as a query.This approach is powerful and useful, but the user has to prepare or find examples of favorite pieces, and it is sometimes difficult to control or change the retrieved pieces after seeing them because another appropriate example should be found and given to get better results.For example, even if a user feels that vocal or drum sounds are too strong in the retrieved pieces, it is difficult to find another piece that has weaker vocal or drum sounds while maintaining the basic mood and timbre of the first piece.Since finding such music pieces is now a matter of trial and error, we need more direct and convenient methods for QBE.Here we assume that QBE retrieval system takes audio inputs and treat low-level acoustic features (e.g., Mel-frequency cepstral coefficients, spectral gradient, etc.).
We solve this inefficiency by allowing a user to create new query examples for QBE by remixing existing musical pieces, that is, changing the volume balance of the instruments.To obtain the desired retrieved results, the user can easily give alternative queries by changing the volume balance from the piece's original balance.For example, the above problem can be solved by customizing a query example so that the volume of the vocal or drum sounds is decreased.To remix an existing musical piece, we use an original sound source separation method that decomposes the audio signal of a musical piece into different instrument parts on the basis of its musical score.To measure the similarity between the remixed query and each piece in a database, we use the Earth Movers Distance (EMD) between their Gaussian Mixture 2 EURASIP Journal on Advances in Signal Processing Models (GMMs).The GMM for each piece is obtained by modeling the distribution of the original acoustic features, which consist of intensity and timbre.
The underlying hypothesis is that changing the volume balance of different instrument parts in a query grows diversity of the retrieved pieces.To confirm this hypothesis, we focus on the musical genre since musical diversity and musical genre have a certain level of relationship.A music database that consists of various genre pieces is suitable for the purpose.We define the term genre classification shift as the change of musical genres in the retrieved pieces.We target genres that are mostly defined by organization and volume balance of musical instruments, such as classical music, jazz, and rock.We exclude genres that are defined by specific rhythm patterns and singing style, e.g., waltz and hip hop.Note that this does not mean that the genre of the query piece itself can be changed.Based on this hypothesis, our research focuses on clarifying the relationship between the volume change of different instrument parts and the shift in the musical genre of retrieved pieces in order to instruct a user in how to easily generate alternative queries.To clarify this relationship, we conducted three different experiments.The first experiment examined how much change in the volume of a single instrument part is needed to cause a genre classification shift using our QBE retrieval system.The second experiment examined how the volume change of two instrument parts (a two-instrument combination for volume change) cooperatively affects the shift in genre classification.This relationship is explored by examining the genre distribution of the retrieved pieces.These experimental results show that the desired genre classification shift in the QBE results was easily achieved by simply changing the volume balance of different instruments in the query.The third experiment examined how the source separation performance affects the shift.The retrieved pieces using sounds separated by our method are compared with those using original sounds before mixing down in producing musical pieces.The experimental result showed that the separation performance for predictable feature shifts depends on an instrument part.

Query-by-Example Retrieval by Remixed Musical Audio Signals
In this section, we describe our QBE retrieval system for retrieving musical pieces based on the similarity of mood between musical pieces.
where F N is the number of frequency bins of the power spectrogram and F L (i) and F H (i) are the indices of lower and upper bounds for the ith subband, respectively.The intensity of each subband helps to represent acoustic brightness.We use octave filter banks that divide the power spectrogram into n octave subbands: where n is the number of subbands, which is set to 7 in our experiments.These filter banks cannot be constructed because they have ideal frequency response; we implemented these by division and sum of the power spectrogram.

Acoustic Timbre Features.
Acoustic timbre features consist of spectral shape features and spectral contrast features, which are known to be effective in detecting musical moods [8,9].The spectral shape features are represented by spectral centroid S 3 (t), spectral width S 4 (t), spectral rolloff S 5 (t), and spectral flux S 6 (t): (3)  The spectral contrast features are obtained as follows.Let a vector, (X(i, t, 1), X(i, t, 2), . . ., X(i, t, F N (i))), ( 4 ) be the power spectrogram in the tth frame and ith subband.By sorting these elements in descending order, we obtain another vector, where as shown in Figure 3 and F N (i) is the number of the ith subband frequency bins:  X(i, t, 1) Here, the spectral contrast features are represented by spectral peak S 7 (i, t), spectral valley S 8 (i, t), and spectral contrast S 9 (i, t): where β is a parameter for extracting stable peak and valley values, which is set to 0.2 in our experiments.
2.3.Similarity Calculation.Our QBE retrieval system needs to calculate the similarity between musical pieces, that is, a query example and each piece in a database, on the basis of the overall mood of the piece.
To model the mood of each piece, we use a Gaussian Mixture Model (GMM) that approximates the distribution of acoustic features.We set the number of mixtures to 8 empirically, although a previous study [8] used a GMM with 16 mixtures since we used smaller database than that study for experimental evaluation.Although the dimension of the obtained acoustic features was 33, it was reduced to 9 by using the principal component analysis where the cumulative percentage of eigenvalues was 0.95.
To measure the similarity among feature distributions, we utilized Earth Movers Distance (EMD) [10].The EMD is based on the minimal cost needed to transform one distribution into another one.

Sound Source Separation Using Integrated Tone Model
As mentioned in Section 1, musical audio signals should be separated into instrument parts beforehand to boost and reduce the volume of those parts.Although a number of sound source separation methods [11][12][13][14] have been studied, most of them still focus on dealing with music performed on either pitched instruments that have harmonic sounds or drums that have inharmonic sounds.For example, most separation methods for harmonic sounds [11][12][13][14] cannot separate inharmonic sounds, while most separation methods for inharmonic sounds, such as drums [15], cannot separate harmonic ones.Sound source separation methods based on the stochastic properties of audio signals, for example, independent component analysis and sparse coding [16][17][18], treat particular kind of audio signals which are recorded with a microphone array or have small number of simultaneously voiced musical notes.However, these methods cannot separate complex audio signals such as commercial CD recordings.We describe our sound source separation method which can separate complex audio signals with both harmonic and inharmonic sounds in this section.
The input and output of our method are described as follows: input power spectrogram of a musical piece and its musical score (standard MIDI file); standard MIDI files for famous songs are often available thanks to Karaoke applications; we assume the spectrogram and the score have already been aligned (synchronized) by using another method; output decomposed spectrograms that correspond to each instrument.
To separate the power spectrogram, we approximate the power spectrogram which is purely additive.By playing back each track of the SMF on a MIDI sound module, we prepared a sampled sound for each note.We call this a template sound and used it as prior information (and initial values) in the separation.The musical audio signal corresponding to the decomposed power spectrogram is obtained by using the inverse short-time Fourier transform with the phase of the input spectrogram.
In this section, we first define the problem of separating sound sources and the integrated tone model.This model is based on a previous study [19], and we improved implementation of the inharmonic models.We then derive an iterative algorithm that consists of two steps: sound source separation and model parameter estimation.

Integrated Tone Model of Harmonic and Inharmonic Models.
Separating the sound source means decomposing the input power spectrogram, X(t, f ), into a power spectrogram that corresponds to each musical note, where t and f are the time and the frequency, respectively.We assume that X(t, f ) includes K musical instruments and the kth instrument performs L k musical notes.
We use an integrated tone model, J kl (t, f ), to represent the power spectrogram of the lth musical note performed by the kth musical instrument ((k, l)th note).This tone model is defined as the sum of harmonic-structure tone models, H kl (t, f ), and inharmonic-structure tone models, I kl (t, f ), multiplied by the whole amplitude of the model, w (J)  kl : where w (J) kl and (w (H) kl , w (I) kl ) satisfy the following constraints: The harmonic tone model, H kl (t, f ), is defined as a constrained two-dimensional Gaussian Mixture Model (GMM), which is a product of two one-dimensional GMMs, This model is designed by referring to the HTC source model [20].Analogously, the inharmonic tone model, I kl (t, f ), is defined as a constrained two-dimensional GMM that is a product of two one-dimensional GMMs, u (I)  klm E (I) klm (t) and v (I) kln F (I) kln ( f ).The temporal structures of these tone models, E (H)  klm (t) and E (I)  klm (t), are defined as an identical mathematical formula, but the frequency structures, F (H)  kln ( f ) and F (I) kln ( f ), are defined as different forms.In the previous study [19], the inharmonic models are implemented in a nonparametric way.We changed the inharmonic model by implementing in a parametric way.This change improves generalization of the integrated tone model, for example, timbre modeling and extension to a bayesian estimation.
The definitions of these models are as follows: All parameters of J kl (t, f ) are listed in Table 2. Here, M H and N H are the numbers of Gaussian kernels that represent temporal and frequency structures of the harmonic tone model, respectively, and M I and N I are the numbers of Gaussians that represent those of the inharmonic tone model.β and κ are coefficients that determine the arrangement of Gaussian kernels for the frequency structure of the inharmonic model.If 1/(log β) and κ are set to 1127 and 700, F ( f ) is equivalent to the mel scale of f Hz.Moreover u (H) klm , v (H) kln , u (I) klm , and v (I) kln satisfy the following conditions: As shown in Figure 5, function F (I) kln ( f ) is derived by changing the variables of the following probability density function: Sum of these (a) Equally-spaced Gaussian kernels along the log-scale frequency, Sum of these

Diffusion of harmonic components along frequency axis β, κ
Coefficients that determine the arrangement of the frequency structure of inharmonic model from g = F ( f ) to f , that is,

Iterative Separation Algorithm.
The goal of this separation is to decompose X(t, f ) into each (k, l)th note by multiplying a spectrogram distribution function, Δ (J) (k, l; t, f ), that satisfies ∀k, l, t, f : With Δ (J) (k, l; t, f ), the separated power spectrogram, X (J) kl (t, f ), is obtained as Then, let Δ (H) (m, n; k, l, t, f ) and Δ (I) (m, n; k, l, t, f ) be spectrogram distribution functions that decompose X (J) kl (t, f ) into each Gaussian distribution of the harmonic and inharmonic models, respectively.These functions satisfy ∀k, l, m, n, t, f : 0 With these functions, the separated power spectrograms, X (H)  klmn (t, f ) and X (I) klmn (t, f ), are obtained as To evaluate the effectiveness of this separation, we use an objective function defined as the Kullback-Leibler (KL) divergence from X (H)  klmn (t, f ) and X (I) klmn (t, f ) to each Gaussian kernel of the harmonic and inharmonic models: The spectrogram distribution functions are calculated by minimizing Q (Δ) for the functions.Since the functions satisfy the constraint given by ( 18), we use the method of Lagrange multiplier.Since Q (Δ) is a convex function for the spectrogram distribution functions, we first solve the simulteneous equations, that is, derivatives of the sum of Q (Δ)  and Lagrange multipliers for condition (18) are equal to zero, and then obtain the spectrogram distribution functions, A Self-archived copy in Kyoto University Research Information Repository https://repository.kulib.kyoto-u.ac.jp and decomposed spectrograms, that is, separated sounds, on the basis of the parameters of the tone models.
Once the input spectrogram is decomposed, the likeliest model parameters are calculated using a statistical estimation.We use auxiliary objective functions for each (k, l)th note, Q (Y )  k,l , to estimate robust parameters with power spectrogram of the template sounds, Y kl (t, f ).The (k, l)th auxiliary objective function is defined as the KL divergence from Y (H)  klmn (t, f ) and Y (I) klmn (t, f ) to each Gaussian kernel of the harmonic and inharmonic models: where Then, let Q be a modified objective function that is defined as the weighted sum of Q (Δ) and Q (Y ) k,l with weight parameter α: We can prevent the overtraining of the models by gradually increasing α from 0 (i.e., the estimated model should first be close to the template spectrogram) through the iteration of the separation and adaptation (model estimation).The parameter update equations are derived by minimizing Q.
We experimentally set α to 0.0, 0.25, 0.5, 0.75, and 1.0 in sequence and 50 iterations are sufficient for parameter convergence with each alpha value.Note that this modification of the objective function has no direct effect on the calculation of the distribution functions since the modification never changes the relationship between the model and the distribution function in the objective function.For all α values, the optimal distribution functions are calculated from only the models written in (21).Since the model parameters are changed by the modification, the distribution functions are also changed indirectly.The parameter update equations are described in the appendix.
We obtain an iterative algorithm that consists of two steps: calculating the distribution function while the model parameters are fixed and updating the parameters under the distribution function.This iterative algorithm is equivalent to the Expectation-Maximization (EM) algorithm on the basis of the maximum a posteriori estimation.This fact ensures the local convergence of the model parameter estimation.

Experimental Evaluation
We conducted two experiments to explore the relationship between instrument volume balances and genres.Given the query musical piece in which the volume balance is changed, the genres of the retrieved musical pieces are investigated.Furthermore, we conducted an experiment to explore the influence of the source separation performance on this relationship, by comparing the retrieved musical pieces using clean audio signals before mixing down (original) and separated signals (separated).Ten musical pieces were excerpted for the query from the RWC Music Database: Popular Music (RWC-MDB-P-2001 no.1-10) [21].The audio signals of these musical pieces were separated into each musical instrument part using the standard MIDI files, which are provided as the AIST annotation [22].The evaluation database consisted of 50 other musical pieces excerpted from the RWC Music Database: Musical Genre (RWC-MDB-G-2001).This excerpted database includes musical pieces in the following genres: popular, rock, dance, jazz, and classical.The number of pieces are listed in Table 3.
In the experiments, we reduced or boosted the volumes of three instrument parts-vocal, guitar, and drums.To shift the genre of the retrieved musical piece by changing the volume of these parts, the part of an instrument should have sufficient duration.For example, the volume of an instrument that is performed for 5 seconds in a 5-minute musical piece may not affect the genre of the piece.Thus, the above three instrument parts were chosen because they satisfy the following two constraints: (1) played in all 10 musical pieces for the query, (2) played for more than 60% of the duration of each piece.

Volume Change of Single
Instrument.The EMDs were calculated between the acoustic feature distributions of each query song and each piece in the database as described in Section 2.3, while reducing or boosting the volume of these musical instrument parts between 20 and +20 dB. Figure 6 shows the results of changing the volume of a single instrument part.The vertical axis is the relative ratio of the EMD averaged over the 10 pieces, which is defined as EMD ratio = average EMD of each genre average EMD of all genres The results in Figure 6 clearly show that the genre classification shift occurred by changing the volume of any as shown in Figure 6(c).These results indicate a reasonable relationship between the instrument volume balance and the genre classification shift, and this relationship is consistent with typical impressions of musical genres.

Volume Change of Two Instruments (Pair).
The EMDs were calculated in the same way as the previous experiment.
Figure 7 shows the results of simultaneously changing the volume of two instrument parts (instrument pairs).If one of the parts is not changed (at 0 dB), the results are the same as those in Figure 6.
Although the basic tendency in the genre classification shifts is similar to the single instrument experiment, classical music, which does not appear as the genre with the highest similarity in Figure 6, appears in Figure 7(b) when the vocal part is boosted and the drum part is reduced.The similarity of rock music decreased when we separately boosted either the guitar or the drums, but it is interesting that rock music can keep the highest similarity if both the guitar and drums are boosted together as shown in Figure 7(c).This result closely matched with the typical impression of rock music, and it suggests promising possibilities for this technique as a tool for customizing the query for QBE retrieval.

Comparison between
Original and Separated Sounds.The EMDs were calculated while reducing or boosting the volume of the musical instrument parts between −5 and +15 dB. Figure 8 shows the normalized EMDs that are shifted to 0 when the volume control ratio is 0 dB.Since all query songs are popular music, EMDs between query songs and popular pieces in the evaluation database tend to be smaller than the pieces of other genres.In this experiment, EMDs were normalized because we focused on the shifts in the acoustic features.
By changing the volume of the drums, the EMDs plotted in Figure 8(c) have similar curves in both of the original and separated conditions.On the other hand, by changing the volume of the guitar, the EMDs plotted in Figure 8(b) showed that a curve of the original condition is different from a curve of the separation condition.This result indicates that the shifts of features in those conditions were different.Average source separation performance of the guitar part was −1.77 dB, which was a lower value than those of vocal and drum parts.Noises included in the separated sounds

Discussions
The aim of this paper is achieving a QBE approach which can retrieve diverse musical pieces by boosting or reducing the volume balance of the instruments.To confirm the performance of the QBE approach, evaluation using a music database which has wide variations is necessary.A music database that consists of various genre pieces is suitable for the purpose.We defined the term genre classification shift as the change of musical genres in the retrieved pieces since we focus on the diversity of the retrieved pieces not on musical genre change of the query example.
Although we conducted objective experiments to evaluate the effectiveness of our QBE approach, several questions remain as open questions.
(1) More evidences of our QBE approach by subjective experiments are needed whether the QBE retrieval system can help users search better results.For source separation, we use the MIDI representation of a musical signal.Mixed and separated musical signals contain variable features: timbre difference from musical instruments' individuality, characteristic performances of instrument players such as vibrato, and environments such as room reverberation and sound effects.These features can be controlled implicitly by changing the volume of musical instruments and therefore QBE systems can retrieve various musical pieces.Since MIDI representations do not contain these features, diversity of retrieved musical pieces will decrease and users cannot evaluate the mood difference of the pieces if we use only musical signals which are synthesized from MIDI representations.
In the experiments, we used precisely synchronized SMFs at most 50 milliseconds of onset timing error.In general, synchronization between CD recordings and their MIDI representations is not enough for separation.Previous studies on audio-to-MIDI synchronization methods [23,24] can help this problem.We experimentally confirmed that onset timing error under 200 milliseconds does not decrease source separation performance.Another problem is that the proposed separation method needs a complete musical score with melody and accompaniment instruments.A study of source separation method with a MIDI representation of specified instrument part [25] will help solving the accompaniment problem.
In this paper, we aimed to analyze and decompose a mixture of harmonic and inharmonic sounds by appending the inharmonic model to the harmonic model.To achieve this, a requirement must be satisfied: one-to-one basis-source mapping based on structured and parameterized source model.The HTC source model [20], on which our integrated model is based, satisfies the requirement.Adaptive harmonic spectral decomposition [26] has modeled a harmonic structure in a different way.They are suitable for multiple-pitch analysis and applied to polyphonic music transcription.On the other hand, the nonnegative matrix factorization (NMF) is usually used for separating musical instrument sounds and extracting simple repeating patterns [27,28] and only approximates complex audio mixture since the one-to-one mapping is uncertified.Efficient feature extraction from complex audio mixtures will be promising by combining lower-order analysis using structured models such as the HTC and higher-order analysis using unconstrained models such as the NMF.

Conclusions
We have described how musical genres of retrieved pieces shift by changing the volume of separated instrument parts and explained a QBE retrieval approach on the basis of such genre classification shift.This approach is important because it was not possible for a user to customize the QBE query in the past, which required the user to always find different pieces to obtain different retrieved results.By using the genre classification shift based on our original sound source separation method, it becomes easy and intuitive to customize the QBE query by simply changing the volume of instrument parts.Experimental results confirmed our hypothesis that the musical genre shifts in relation to the volume balance of instruments.
Although the current genre shift depends on only the volume balance, other factors such as rhythm patterns, sound effects, and chord progressions would also be useful for causing the shift if we could control them.In the future, we plan to pursue the promising approach proposed in this paper and develop a better QBE retrieval system that easily reflects the user's intention and preferences.

Figure 1 :
Figure 1: Overview of QBE retrieval system based on genre classification shift.Controlling the volume balance causes a genre classification shift of a query song, and our system returns songs that are similar to the genre-shifted query.

Figure 2 :
Figure 2: Distributions of the first and second principal components of extracted features from the no. 1 piece of the RWC Music Database: Popular Music.Five figures show the shift of feature distribution by changing the volume of the drum part.The shift of feature distribution causes the genre classification shift.

6 EURASIP
frequency structure of harmonic tone model

Figure 4 :
Figure 4: Overall, temporal, and frequency structures of the harmonic tone model.This model consists of a two-dimensional Gaussian Mixture Model, and it is factorized into a pair of one-dimensional GMMs.
(b) Gaussian kernels obtained by changing the random variables of the kernels in (a).

A
Self-archived copy in Kyoto University Research Information Repository https://repository.kulib.kyoto-u.ac.jpTable 2: Parameters of integrated tone model.Symbol Description w (J) kl Overall amplitude w (H) kl , w (I) kl Relative amplitude of harmonic and inharmonic tone models u (H) klm Amplitude coefficient of temporal power envelope for harmonic tone model v (H) kln Relative amplitude of the nth harmonic component u (I) klm Amplitude coefficient of temporal power envelope for inharmonic tone model v (I) kln Relative amplitude of the nth inharmonic component τ kl Onset time ρ (H) kl Diffusion of temporal power envelope for harmonic tone model ρ (I) kl Diffusion of temporal power envelope for inharmonic tone model ω (H) kl F0 of harmonic tone model σ (H) kl

Figure 7 :
Figure 7: Genres that have the smallest EMD (the highest similarity) while reducing or boosting the volume of two instrument parts.(a), (b), and (c) are the cases of the vocal-guitar, vocal-drums, and guitar-drums, respectively.(a) Genre classification shift caused by changing the volume of vocal and guitar.(b) Genre classification shift caused by changing the volume of vocal and drums.(c) Genre classification shift caused by changing the volume of guitar and drums.

12 EURASIP
Journal on Advances in Signal Processing of the guitar part induced this difference.By changing the volume of the vocal, the plotted EMDs of popular and dance pieces have similar curves, but the EMDs of jazz pieces have different curves, although the average source separation performance of the vocal part is the highest among these three instrument parts.This result indicates that the separation performance for predictable feature shifts depends on the instrument part.

( 2 )
In our experiments, we used only popular musical pieces as query examples.Remixing query examples except popular pieces can shift genres of retrieved results.

Table 1 :
Acoustic features representing musical mood.

Table 3 :
Number of musical pieces for each genre.