Improved synchronization of pre-recorded musical accompaniment to user musical performance

The method synchronizes pre-recorded accompaniment with a user's performance by dynamically adapting the timing of the accompaniment to match the user's tempo, addressing tempo discontinuities and ensuring continuous velocity for improved musical interaction.

CN115335896BActive Publication Date: 2024-12-06ANTESCOFO
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202180014594.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2020-02-20
Filing Date
2021-02-01
Publication Date
2024-12-06
Estimated Expiration
2041-02-01

AI Technical Summary

Technical Problem

Existing systems fail to achieve real-time synchronization between human musicians and pre-recorded accompaniment due to reliance on high-level musical parameters, tempo discontinuities, and inconsistent windowing strategies, leading to unpredictable feedback and discontinuities in the resulting time graph.

Method used

A method involving a processing unit that analyzes a user's musical performance, detects tempo and lag differences, and applies a synchronization function to adapt the pre-recorded accompaniment's timing, ensuring continuous velocity and convergence to the user's tempo using a dynamically calculated compensation duration.

Benefits of technology

The method provides consistent, adaptive synchronization that maintains continuous velocity and integrates high-level musical knowledge, overcoming tempo discontinuities and ensuring smooth interaction between musicians and pre-recorded accompaniment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115335896B_ABST
    Figure CN115335896B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a method for synchronizing a pre-recorded musical accompaniment with a user's musical performance, the user's musical performance being captured by at least one microphone, the at least one microphone delivering an input acoustic signal to be fed into a processing unit, the processing unit comprising a memory for storing data of the pre-recorded musical accompaniment, and providing an output acoustic signal based on the pre-recorded musical accompaniment data to be fed into at least one speaker, the at least one speaker playing the musical accompaniment for the user, wherein the processing unit: - analyzes the input acoustic signal to detect musical events and musical tempo in the input acoustic signal, - compares the detected musical events with the pre-recorded musical accompaniment data to determine at least one lag diff between the timing of the detected musical events and the timing of the musical events of the played musical accompaniment, the lag diff to be compensated, - adapts the timing of the output acoustic signal based on: * the lag diff, and * a synchronization function F given by the following formula: Formula (I), wherein x is a time variable, $tempo is the musical tempo of the user, and w is the duration of the compensation of the lag diff, #imgabs0#
Need to check novelty before this filing date? Find Prior Art

Description

[0001] The present disclosure relates to data processing that provides real-time musical synchronization between human musicians and pre-recorded music data that provides accompaniment for the human musicians.

[0002] The goal is to capture the performer's musical intent and map it to the musical intent of the pre-recorded accompaniment to achieve acceptable musical behavior.

[0003] Some systems are known which address the problem of real-time musical synchronization between musicians and accompaniment.

[0004] Document D1: Christopher Raphael (2010): “Music Plus One and Machine Learning”, in Proceedings of the 27th International Conference on Machine Learning (ICML), Haifa, Israel, 21-28,

[0005] A learning system is involved in which the intentions of the musicians are predicted from a model trained on actual performances of the same performer. Despite the problem of data availability for training, synchronization here depends on high-level musical parameters (e.g., musicological data) rather than probabilistic parameters of the events. Furthermore, statistical or probabilistic predictions destroy the extreme variability of performances between concerts (and by the same performer). Furthermore, this method relies on synchronizing musician events with computer actions. Computer actions do not model high-level musical parameters and are therefore impractical.

[0006] Document D2: Roger B Dannenberg (1997): "Abstract time warping of compound events and signals", in Computer Music Journal, 61-70,

[0007] The basic assumption that the musicians' tempo is continuous and remains between two events is adopted, resulting in a piecewise linear prediction of the musical position for synchronization. In any real-world setting, tempo discontinuities are a fact that causes such approximations to fail. Moreover, this approach only considers the musicians' time-map and destroys the pre-recorded accompaniment time-map (which is assumed to be fixed), and therefore loses important high-level musical knowledge.

[0008] Document D3: Arshia Cont, Jose Echeveste, Jean-Louis Giavitto and Florent Jacquemard (2012): “Correct Automatic Accompaniment Despite Machine Listening or Human Errors in Antescofo”, in Proceedings of the International Computer Music Conference (ICMC), Ljubljana (Slovenia),

[0009] The concept of expectation is combined with the cognitive model of the brain to estimate the musician's time map. In order to incorporate high-level music knowledge for accompaniment synchronization, two types of synchronization are introduced: Tight Synchronization is used to ensure that certain key positions are tightly synchronized.

[0010] While appropriate, its technical solution introduces discontinuities in the resulting time graph. Such discontinuities should be avoided when synchronizing continuous audio or video streams. Smooth Synchronization attempts to produce a resulting continuous time graph by assuming that the resulting accompaniment tempo is equal to the tempo of the musician and using that value to predict its position.

[0011] Despite this proper tempo detection, the real-time tempo is prone to error and may result in unpredictable discontinuities. Furthermore, the coexistence of both strategies in the same recital can cause further discontinuities in the resulting time graph.

[0012] Document D4: Dawen Liang, Guangyu Xia, and Roger B. Dannenberg (2011): “A framework for coordination and synchronization of media”, in Proceedings of the International Conference on New Interfaces for Musical Expression (p. 167-172),

[0013] It is proposed to compromise between sporadic synchronization such as Tight above and only tempo synchronization such as Loose to synchronize the time graph dynamically to achieve the goal of converging the values ​​to the reference accompaniment time graph. A constant window spanning the music duration w into the future is used to force the accompaniment to compensate for deviations at time t so that it converges at t+w. This results in a continuous curve that is piecewise linear on the music position output.

[0014] However, this strategy has two disadvantages:

[0015] - Tempo discontinuities exist despite position continuity. Such discontinuities lead to false feedback to the musician, as the accompaniment tempo may change when the musician is at the incorrect tempo,

[0016] - Constant windowing is inconsistent with intermediate updates. An example is when there is an initial lag at time t that will not change the predicted musician time map, resulting in a persistent lag.

[0017] The present disclosure aims to improve this situation.

[0018] For this purpose, a method is proposed for synchronizing a pre-recorded musical accompaniment with a user's musical performance.

[0019] The user musical performance is captured by at least one microphone, the at least one microphone delivering an input acoustic signal to be fed into a processing unit,

[0020] The processing unit comprises a memory for storing data of a pre-recorded musical accompaniment and provides an output acoustic signal based on the pre-recorded musical accompaniment data to be fed into at least one loudspeaker, the at least one loudspeaker playing the musical accompaniment for the user,

[0021] The processing unit:

[0022] - analyzing the input acoustic signal to detect musical events in the input acoustic signal and determine the tempo in the user's musical performance,

[0023] - comparing the detected musical event with pre-recorded musical accompaniment data to determine at least one lag diff between the timing of the detected musical event and the timing of the musical event of the played musical accompaniment, said lag diff being compensated,

[0024] -Adapting the timing of outputting the acoustic signal based on:

[0025] * the lag diff, and

[0026] *The synchronization function F is given by:

[0027]

[0028] Where x is a time variable, $tempo is the determined tempo of the user's musical performance, and w is the duration of the compensation of the lag diff.

[0029] Therefore, the concept of a "time graph" can be used to model the musical intent incoming from a human musician compared to a pre-recorded accompaniment. A time graph is a function that maps physical time t to musical time p (in beats).

[0030] In a non-real-time (or offline) setting, and given the strong assumption that the velocity estimate from the device is correct, the time map position p is the product of the beats from time 0 to t multiplied by this velocity.

[0031] However, when the musician does not follow the tempo set in the score, the estimated tempo in the current playing of the accompaniment needs to be adapted in the near future defined by the compensation duration w, and the use of the synchronization function F ensures convergence to the current user tempo after said compensation duration.

[0032] In an embodiment, the musical accompaniment data defines a musical score, and wherein the variable x is a time value corresponding to the duration of a variable number of beats of said musical score.

[0033] In an embodiment, the compensation duration w has a duration of at least one beat on a musical score defined by the musical accompaniment data.

[0034] In an embodiment, the compensation duration w is selected.

[0035] Preferably, it is set to one beat duration, but possibly more, according to a user selection, which may be input, for example, via an input to the processing unit.

[0036] In an embodiment where the accompaniment data defines a musical score, the position pos on the score at which the musician is to play is predicted by a linear relationship defined as pos(x)=$tempo*x, where x is the number of musical beats counted on the score, and if a lag diff is detected, a synchronization function F(x) is used to define the number of beats x corresponding to the lag time diff. diff , so that:

[0037] F(x diff )-pos(x diff )=diff.

[0038] In this embodiment, the prediction until the next beat x is determined based on the synchronization function F(x) by applying the transformation function A(t) diff +w, the transformation function is given by:

[0039]

[0040] where p is the current position played by the musician on the sheet music at the current time t0.

[0041] In the embodiment where the accompaniment data defines the musical score, the processing unit further estimates that at the future synchronization time t sync The future position of the musician playing on the score and the speed of the musical accompaniment are determined (in the following Figure 3 The number e2) is applied to the output acoustic signal until the future synchronization time t sync until.

[0042] In this embodiment, and when using the transformation function A(t), the tempo of the musical accompaniment applied to the output acoustic signal is determined as the derivative of A(t) at the current time t0:

[0043] Speed ​​= A'(t0) = F'(x diff )

[0044] (which is analytically known).

[0045] In an embodiment, the determination of music events in the input acoustic signal comprises:

[0046] - extracting acoustic features (such as acoustic pressure, or identified harmonic frequencies over time) from the input acoustic signal,

[0047] - using stored data of a pre-recorded musical accompaniment to determine at least musical events in the accompaniment, and

[0048] - assigning musical events, such as the attack time of a specific note, to input acoustic features based on the musical events determined from said stored data.

[0049] In practice, the allocation of musical events may be done on the score, and for example on the solo part, and therefore determined thereby, rather than the "accompaniment" itself. These may be in a symbolic music notation format, such as conventional MIDI. Therefore, the expression "stored data of the accompaniment score" is to be interpreted broadly, and may cover the case when such data further comprises the score of the solo track which is not the accompaniment itself.

[0050] The association of score events is more generally performed in pre-recorded accompaniments (time graphs).

[0051] The present disclosure is also directed to a device for synchronizing a pre-recorded musical accompaniment with a user's musical performance, comprising a processing unit to execute the method presented above.

[0052] It is also directed to a computer program comprising instructions which, when a processing unit executes the program, cause the processing unit to carry out the method presented above.

[0053] It is also directed to a computer-readable medium comprising instructions which, when executed by a processing unit, cause a computer to perform the method.

[0054] Therefore, in order to achieve real-time synchronization between musicians and pre-recorded accompaniment, the present disclosure specifically solves the following shortcomings in the prior art:

[0055] - the musicians’ timing graphs are not imported from the device and are predicted taking into account high-level musical knowledge, such as the inherent timing graphs in pre-recorded accompaniments;

[0056] - discontinuities in tempo (and not necessarily position) when predicting a time map for accompaniment output are both musically (by the musician) and technically (for continuous media such as audio or video streams) unacceptable. This alone disqualifies all prior art approaches based on piecewise linear prediction;

[0057] - The resulting real-time timing diagram used to drive the pre-recorded accompaniment depends on both the musician timing diagram (mastering intention) and the pre-recorded accompaniment timing diagram (high-level musical knowledge).

[0058] Further details and advantages of embodiments are given in the detailed description below and are presented in the accompanying drawings, in which:

[0059] - Figure 1 An example of an embodiment of an apparatus for performing the aforementioned method is shown,

[0060] - Figure 2 is an example of an algorithm comprising the steps of the aforementioned method according to an embodiment,

[0061] - Figure 3 3a and 3b show examples of synchronized time diagrams using the synchronization function F(x) and the corresponding musicians' time diagrams.

[0062] The present disclosure proposes to solve the problem of real-time synchronization of pre-recorded accompaniment with musicians. For this purpose, a device DIS (described below) is used. Figure 1 ).

[0063] In an embodiment, the device DIS comprises at least:

[0064] -Input interface INP,

[0065] a processing unit PU comprising a storage memory MEM and a processor PROC cooperating with the memory MEM, and

[0066] -Output interface OUT.

[0067] The memory MEM may store, among other things, instruction data of a computer program according to the present disclosure.

[0068] Furthermore, the music accompaniment data is stored in the processing unit (eg in the memory MEM). The music accompaniment data is therefore read by the processor PROC to drive the output interface OUT to feed an output acoustic signal to at least one loudspeaker SPK (a partition or a headphone) based on the pre-recorded music accompaniment data.

[0069] The device DIS further comprises a machine listening module MLM, which may comprise independent hardware (e.g. Figure 1 ), or alternatively, may be made of hardware shared with the processing unit PU (ie the same processor and possibly the same memory unit).

[0070] The user US can hear the accompaniment music played by the loudspeaker SPK and can play the musical instrument according to the accompaniment music, thus emitting sounds captured by the microphone MIC connected to the input interface INP. The microphone MIC can be incorporated in the user's instrument (for example in an electric guitar) or separated (for voice or acoustic instrument recording). The captured sound data is then processed by the machine listening module MLM and more generally by the processing unit PU.

[0071] More precisely, the captured sound data is processed to identify the delay or advance of the music played by the user compared to the accompaniment music, and then the playing speed of the accompaniment music is adapted to the user's performance. For example, the speed of the accompaniment music can be adapted accordingly. The time difference between the accompaniment music and the music played by the user detected by the module MLM is hereinafter referred to as the "lag" at the current time t and is denoted as diff.

[0072] More precisely, musician events may be detected in real time by a machine listening module MLM, which then outputs legato of musical events and tempo data on the detection of such events in real time from the score. This embodiment may be similar to the embodiment disclosed in, for example, Conte (2010). In an embodiment in which the machine listening module MLM has hardware separate from the processing unit PU, the module MLM is thus exchangeable and may thus be any module that provides "events" and optionally hereinafter tempo in real time on a given score by listening to the musicians playing.

[0073] As indicated above, the machine listening module MLM preferably operates in "real time", ideally with a lag of less than 15 milliseconds, which corresponds to the perception threshold (ability to react to events) in most currently common listening algorithms.

[0074] The processing unit PU performs dynamic synchronization due to pre-recorded accompaniment music data on the one hand and tempo recognition in the musician's performance on the other hand. At each real-time instance t, the processing unit (PU) takes as input its own previous prediction at the previous time t-ε and the incoming events and tempo from the machine listening. The resulting output is an accompaniment time graph containing the prediction at time t.

[0075] The synchronization is dynamic and adaptive due to the predicted output at time t, based on a dynamically calculated lag correlation window (labeled as w below). A dynamic synchronization strategy is introduced and its value is mathematically guaranteed to converge at a later time t_sync. The synchronization expectation horizon t_sync itself depends on the lag time at time t, which is related to previous examples and feedback from the environment.

[0076] The results of the adaptive synchronization strategy will be consistent (the same settings produce the same synchronization predictions). The adaptive synchronization strategy should also adapt to the interactive context.

[0077] The device DIS takes musician events and tempo as live input and outputs a prediction of a pre-recorded accompaniment, both of which are available before starting. The role of the device DIS is to take a musician time graph (as a result of the live input) and dynamically construct a corresponding synchronized time graph.

[0078] Instead of relying on a constant window length (as in the prior art), the parameter w is interpreted here as a stiffness parameter. Typically, w may correspond to a fixed number of beats of the score (e.g. one beat, corresponding to a quarter note of a 4 / 4 measure). Its current value tv in time may be given by the real tempo of the accompaniment (tv=w*real tempo), which, however, does not necessarily correspond to the current musician tempo. The prediction window length w is determined dynamically (as described below with reference to Figure 3 Detailed), as a function of the current lag diff at time t, and ensure convergence until a later synchronization time t_sync.

[0079] In an embodiment, a synchronization function F is introduced, which serves to help construct a synchronization time graph and compensate for the lag diff in an ideal setting, where the speed is assumed to be a constant value in a short time frame. Given a musician position p (on the score) and a musician speed at time t, the musician speed is hereinafter labeled "$tempo", F is a quadratic function that joins the time graph point (0,1) to (w,w*$tempo) and checks that its derivative is equal to the parameter $tempo. The lag at time t between the real-time music position of the musician on the score and the real-time music position of the accompaniment track on the same score (both in beats) is denoted as diff. Therefore, the parameter diff accurately reflects the difference between the position in beats on the score of the musician event detected in real time and the position on the score of the accompaniment music to be synchronized (in beats).

[0080] Here we show that the synchronization function F can be expressed as follows:

[0081]

[0082] And if diff = 0, then F(x) simply becomes F(x) = $tempo*x

[0083] where $tempo is the true tempo value provided by the module MLM and w is the prediction window that ultimately corresponds to the time it takes to compensate for the lag diff until the next adjustment of the musical accompaniment when the musician plays.

[0084] Furthermore, it is shown that for any event detected at time t, and the accompaniment lags by diff beats ahead, there exists a single solution to the equation F(x)-$tempo*x=diff diff This unique solution defines the adaptive scenario on which the prediction is calculated and changes the portion of the accompaniment graph from x diff Redefine as:

[0085]

[0086] A detailed explanation of the adaptive function A(t) is given below.

[0087] By construction, the synchronous accompaniment time diagram is at time t_sync = t + w – x diff The position and velocity of the synchrotron converge to the musician's time graph. This mathematical construction ensures the continuity of the velocity until the synchronization time t_sync.

[0088] Figure 3 Adaptive dynamic synchronization is presented for updating the accompaniment time graph at time t, where an event is detected and the initial lag of the accompaniment is the diff beat advance ( Figure 3a). The accompaniment graph according to t is defined as the transformed part of the function F. The synchronized time graph constructed by F(x) is depicted in Figure (3a) and converted into the musician time graph on Figure (3b). Assuming that the musician speed remains constant in the interval, the position and speed converge at time t_sync. This time graph is continuously re-evaluated at each interaction of the system with the human musician. The continuity of the speed up to time t_sync can be noticed.

[0089] It can be given as follows Figure 3 A simple explanation of . Based on the previous prediction, the predicted position pos (in beats x) that the musician should play is determined by a linear relationship such as pos(x) = $tempo*x. This corresponds to Figure 3 However, a lag diff is detected between the position p played by the musician and the predicted position pos. The synchronization function F(x) is calculated as defined above, and x is calculated diff , so that F(x diff )-pos(x diff ) = diff. The prediction can then be determined based on F(x) until the next beat x diff +w. This corresponds to Figure 3 A dashed rectangle. Figure 3 This "rectangle" of a actually imports Figure 3 b and is transformed by applying the transformation function A(t), which is given by:

[0090]

[0091] where p is the current position on the score that the musician is playing at the current time t0. Then A(t) can be calculated to give the position that the musician should play at the future time t sync The correct position in the sync Before, the speed of the accompaniment is adapted. This corresponds to the new slope e2 ( Figure 3 b) to compare with the previous slope e1. The corrected speed ctempo can therefore be given as the derivative of A(t) at the current time t0 or:

[0092] ctempo=A'(t0)=F'(x diff )

[0093] It is analytically known.

[0094] Reference Figure 2, step S1 starts receiving an input signal related to a musician's performance. In step S2, acoustic features are extracted from the input signal to identify musical events in the musician's performance related to events in the score defined in the pre-recorded musical accompaniment data. In step S3, the timing of the most recently detected event is compared with the timing of the corresponding one in the score, and a time lag diff corresponding to the timing difference is determined.

[0095] Based on the time lag and the selected duration w (usually the duration of the selected number of beats in the musical score), in step S4, the synchronization function F(x) can be determined. Then, in step S5, x diff It can be represented by F(x diff )-$tempo*x diff =The only solution given by diff.

[0096] x diff The determination of then makes it possible to use the transformation function A(t) determined in step S6 to shift from the synchronization diagram to the musician time diagram, as described above with reference to Figure 3 a and Figure 3 In the musician time diagram, in step S7, the speed of the output signal played based on the pre-recorded accompaniment data can be corrected (from Figure 3 b) to smoothly adjust the position of the output signal on the score to the next synchronization time t in the future. sync The position of the input signal at Figure 3 b. The synchronization time t in step S8 sync (Arrow Y from test S8) Afterwards, the process can be implemented again by extracting new features from the input signal.

[0097] Qualitatively, this embodiment helps to achieve the following advantages:

[0098] It solves the consistency problem in the prior art. It automatically adapts to the initial lag and its horizon based on the context. The mathematical form and solution are bijective. This means that the same musician time graph leads to the same synchronization trajectory, while in a traditional constant window this value would be different based on the context and parameters.

[0099] • The method ensures speed continuity at time t_sync, where the prior art exhibits discontinuity in all available methods.

[0100] • The adaptive strategy provides a compromise between the two extremes described above as tight and loose, and within a single framework. The tight strategy corresponds to low values ​​of the stiffness parameter w, while the loose strategy corresponds to higher values ​​of w.

[0101] • The strategy is computationally efficient: the accompaniment synchronization is only calculated once using the accompaniment time map as long as the predicted time map does not change. The existing techniques require calculation and prediction at every stage of the interaction, no matter how it changes.

[0102] Furthermore, high-level musical knowledge can be integrated into the synchronization mechanism in the form of a time graph. For this purpose, the prediction is extended to a non-linear curve on the time graph. This extension allows the form to be used to integrate musical expressiveness, such as accelerandi and fermata (i.e., with adaptive speed) and other common expressive musical specifications of performer timing. This addition also enables the possibility of automatically learning such parameters from existing data.

[0103] • It enables adding high-level musical knowledge (if it exists) to the existing framework using mathematical formalisms with convergence proofs, thus overcoming the handcrafted functional approach typically found in the prior art.

[0104] • It extends the common prior art "constant velocity" approximation that results in piecewise linear prediction to a more realistic non-linear velocity prediction.

[0105] • It enables the possibility to automatically learn predictive time maps from musicians or pre-recorded accompaniments to fully exploit the expressive power.

[0106] Additional delays are usually imposed by hardware implementations and network communications. Compensating for this delay in an interactive setting may not be simplified to a simple conversion of the read head (as seen in the synchronization of air audio / video streams). The value of such delays can vary from 100 milliseconds to 1 second, which is far beyond the acceptable psychoacoustic limit of the human ear. The synchronization strategy takes this value as input optionally, and all output predictions are expected based on the interactive scenario. Therefore and for relatively small delay values ​​(in the middle range of 300ms corresponding to most Bluetooth and AirMedia streaming formats), the user does not have to adjust the lag before the performance. The general method expressed here in "music time" rather than "physical time" allows automatic adjustment of such parameters.

[0107] More generally, the present disclosure is not limited to the detailed features presented above as examples of embodiments; it encompasses further embodiments.

[0108] In general, the wording related to "playing the accompaniment" on the "speakers" and the concept of "pre-recorded musical accompaniment" will be interpreted broadly. In fact, the method is applicable to any "continuous" media including, for example, audio and video. In fact, video+audio content can also be synchronized using the same method as presented above. In general, the aforementioned "speakers" can be replaced by automatic video projection, and the video frames can therefore be interpolated in a position output simply based on the prediction for synchronization as presented above.

Claims

1. A method for synchronizing a pre-recorded musical accompaniment with a user's musical performance, The user musical performance is captured by at least one microphone, the at least one microphone delivering an input acoustic signal to be fed into a processing unit, The processing unit comprises a memory for storing data of the pre-recorded musical accompaniment and provides an output acoustic signal based on the pre-recorded musical accompaniment data to be fed into at least one loudspeaker, the at least one loudspeaker playing the musical accompaniment for the user, The processing unit: - analyzing the input acoustic signal to detect musical events in the input acoustic signal to determine the tempo of the user's musical performance, - comparing the detected musical event with the pre-recorded musical accompaniment data to determine at least one lag diff between the timing of the detected musical event and the timing of the musical event of the played musical accompaniment, said lag diff being compensated, - adapting the timing of the output acoustic signal based on: * the lag diff, and *The synchronization function F is given by: Where x is a time variable, $tempo is the determined tempo in the user's musical performance, and w is the duration of the compensation of the lag diff.

2. The method according to claim 1, characterized in that The musical accompaniment data defines a musical score, and wherein the variable x is a time value corresponding to the duration of a variable number of beats of the musical score.

3. The method according to claim 1, characterized in that w has a duration of at least one beat on the musical score defined by the musical accompaniment data.

4. The method according to claim 1, characterized in that: The duration w is selected.

5. The method according to claim 1, characterized in that The accompaniment data defines a musical score, the position pos on which the musician plays is predicted by a linear relationship defined as pos(x)=$tempo*x, where x is the number of musical beats counted on the musical score, and if a lag diff is detected, the synchronization function F(x) is used to define the number of beats x corresponding to the lag diff diff , so that: F(x diff )-pos(x diff )=diff。 6. The method according to claim 5, characterized in that The prediction until the next beat x is determined based on the synchronization function F(x) by applying the transformation function A(t) diff +w, the transformation function is given by: Where p is the current position played by the musician on the score at the current time t0.

7. The method according to claim 1, characterized in that The accompaniment data defines the musical score, and the processing unit further estimates the future synchronization time t sync The future position of the musician's performance on the score and determining the speed (e2) of the musical accompaniment to be applied to the output acoustic signal until the future synchronization time t sync until.

8. The method according to claim 7, characterized in that The prediction until the next beat x is determined based on the synchronization function F(x) by applying the transformation function A(t) diff +w, the transformation function is given by: where p is the current position played by the musician on the score at the current time t0, and wherein the tempo of the musical accompaniment applied to the output acoustic signal denoted ctempo is determined as the derivative of A(t) at the current time t0 such that: ctempo=A'(t0)=F'(x diff )。 9. The method according to claim 1, characterized in that: The determination of music events in the input acoustic signal comprises: - extracting acoustic features from said input acoustic signal, - using the stored data of said pre-recorded musical accompaniment to determine at least musical events in the accompaniment, and - assigning musical events to input acoustic features based on musical events determined from said stored data.

10. Apparatus for synchronising a pre-recorded musical accompaniment with a user musical performance, comprising a processing unit to perform a method according to any one of the preceding claims.

11. A computer readable medium comprising instructions which, when executed by a processing unit, cause a computer to perform a method according to any one of claims 1 to 9.