The aspects of the disclosed embodiments generally relate to real-time jamming assistance for groups of musicians. The present disclosure relates particularly, though not exclusively, to real-time analysis and presentation of suitable chords or notes or drum sounds to play along with other musicians with or without any pre-existing notation for the music that is being played along.
This section illustrates useful background information without admission of any technique described herein representative of the state of the art.
Numerous learning systems have been developed that analyse music that is pre-recorded or for which notes are already available. Such systems can display notes or chords for playing along at a set rhythm, often with further help of a metronome sound. Such systems are of great help for rehearsing to play pre-existing songs. However, as opposed to playing sheet music or music recorded somewhere by someone, it is possible and fun to just play along or jam in a group of two or more people. In such a jamming session, the players may simply start playing together (at same time or one by one) in a given musical style and musical key. Experienced players learn to recognise suitable patterns with which to proceed synchronised with other players without need to agree in advance and write down the notes or chords. Less experienced players typically just play a chord now and another then until they become skilled enough to begin playing along in an improvised manner without the support of sheet music.
The context of a jamming event drastically differs from that of self-exercising with help of a computer program that presents chords. First, there is no rhythm determined by a computer and often no metronome, either. The tempo may flow as the players please. Second, there are no predetermined progressions of the melody. Again, the players develop the music they play inspirationally. Absent the knowledge of what will come next, it is very difficult to play along without extensive experience. Whereas self-exercise systems may pre-analyse a song to be played, the jamming situation is incompatible with the pre-requisite requirements of such systems.
It is an object of the present disclosure to provide real-time jamming assistance to help playing music along with other musicians.
According to a first example aspect of the disclosed embodiments there is provided a method comprising:
receiving a real-time audio signal of played music that is played by at least one person;
tracking beat of the played music from the real-time audio signal and accordingly predicting a time of a next beat;
recognising from the real-time audio signal at least one of chords; notes; and drum sounds and accordingly detecting repetitions in the played music;
predicting a next development in the played music, based on the detected repetitions, comprising at least one of chords; notes; and drum sounds that will be played next, and respective timing based on the estimated time of the next beat; and
producing a real-time output based on the predicted next development in the played music;
wherein the method is performed automatically.
The tracking of the beat may be performed using at least one digital processor. The recognising of the at least one of chords; notes; and drum sounds and accordingly detecting repetitions in the played music may be performed using at least one digital processor. The predicting of the next development in the played music may be performed using at least one digital processor. The producing of the real-time output may be performed using at least one digital processor.
The received audio signal may combine signals representing plurality of instruments. The combining may be performed acoustically by capturing sound produced by plural instruments. Alternatively or additionally, the combining may be performed electrically by combining electric signals representing outputs of different instruments.
The receiving of the real-time audio signal of played music may be performed using a microphone. The microphone may be an internal microphone (e.g. of a device that performs the method) or an external microphone. Alternatively or additionally, the receiving of the real-time audio signal of played music may be performed using an instrument output such as a MIDI signal or string pickup. The instrument output may reproduce sound or vibration produced by an instrument and/or the instrument output may be independent of producing any sound or vibration by the instrument.
The tracking of the beat of the played music from the real-time audio signal may adapt to fluctuation of the tempo of the played music.
The tracking of the beat may comprise detecting a temporal regularity in the music. The tracking of the beat may simulate tapping the foot to the music by musicians.
The predicting of the at least one of chords; notes; and drum sounds may be performed by detecting self-similarity in the played music. Self-similarity may be calculated using analysing of the received real-time audio signal so as to extract an internal representation for the played music. The internal representation may comprise any of:
1) A sequence of feature vectors. The feature vectors may be numeric. Each feature vector may represent the musical contents of a short segment of audio. The short segment of audio may represent a frame of 10 ms to 200 ms of the audio signal. A sequence of successive frames represents longer segments of the received audio signal.
2) A sequence of high-level descriptors of the received audio signal. The high-level descriptors may comprise any one or more of chords; notes; and drum sound notes (human readable).
The internal representation may be denoted by R. T may refer to a latest frame. R(T) may refer to the internal representation for the latest frame. R(T−1) may refer to the second-latest frame. A total of N frames are buffered or kept in the memory. R(T−N+1) may refer to an oldest frame that is buffered. N may vary to cover the real-time audio signal for a period from half a minute to several days. The buffer may be maintained from one music or jamming session to another, optionally regardless whether an apparatus running the method would be shut down or software implementing the method would be closed.
A self-similarity matrix may be computed. The computation of the self-similarity matrix may comprise comparing a plurality of frames (e.g. every frame) in the memory against a plurality of other frames (e.g. every other frame). When a new frame is formed from the real-time audio signal, the matrix may be updated by comparing the frame against all the previously buffered frames. The matrix may be formed to contain similarity estimates between all pairs of the buffered frames. The similarity estimates may be calculated using a similarity metric between the internal representations R for the frames being compared. An inverse of the cosine (or Euclidean) distance between feature vectors may be used.
In an embodiment, hashing may be used to enable using longer periods of the received audio signal. For example, in the case of extremely long memory lengths N (for example several days), buffering the entire similarity matrix may be undesirable as required buffer size grows proportionally to a square of N. In this embodiment, only the internal representation itself is kept for frames that are older than a certain threshold. For those frames, hashing techniques such as locality sensitive hashing (LSH) may be used to detect a sequence of frames that matches the latest sequence of frames.
The detecting of the repetitions in the played music may comprise detecting close similarity of latest L frames to a sequence of frames that happened X seconds earlier. For example, repetition may be detected if the similarity is above a given threshold for the pair of representations R at times T and T−X, for the pair at times T−1 and T−X−1, and so forth until the pair at times T−L and T−X−L.
The predicting of the next development in the played music may comprise predicting coming frames from current time T onwards. Alternatively, the predicting of the next development in the played music may comprise predicting musical events that will happen from current time T onwards, where the musical events are described using one or more of chords; notes; and drum sounds.
The user may be allowed to select a desired musical style (such as rock, jazz, or bossa nova for example) and the predicting of the next development may be performed accordingly.
The producing of the real-time output may comprise displaying any one or more of: musical notation such as notes, chords, drum notes and/or activating given fret, instrument key or drum specific indicators. The displaying may be performed using a display screen or projector. The producing of the real-time output may comprise displaying a timeline with indication of events placed on the timeline such that the timeline comprises several rows on the screen. Current time on the timeline may be indicated to the user and any predicted musical events may be shown on the timeline. The producing of the real-time output with a visualisation may allow an amateur musician to play along with a song even though they would not know the song in advance or would not be able to predict “by ear” what should be played at a next time instant.
The producing of the real-time output may comprise visualising repeating sequences. When the latest L events indicate a repetition of a previously-seen sequence, the previously seen matching sequence(s) may be visually highlighted on the device screen.
A pre-defined library of musical patterns may be used to assist in the predicting of the next development in the played music. The library may contain any one or more musical patterns selected from a group consisting of: popular chord progressions; musical rules about note progressions; and popular drum sound patterns.
A user may be allowed to select one or more recorded songs and the recorded songs may be processed as if previously received in the real-time audio signal. Subsequently, when the user is performing in real time afterwards, the latest sequence of frames may be compared also against the internal representation formed based on the recorded songs and it may be detected if the user is performing one of the recorded songs or playing something sufficiently similar and use that song in the predicting of the next development in the played music.
By using recorded songs, the method may learn possible patterns while the user is still allowed to play with rhythm, musical key (free transposition to another key) and style of her own preference freely deviating from those of the recorded songs as in a jamming session with other musicians.
A musical key of the played music may be shown to the user. The musical key may determine a set of pitches or a scale that forms the basis for a musical composition.
The producing of a real-time output may comprise performing one or more instruments along with the played music.
According to a second example aspect of the disclosed embodiments there is provided a computer program comprising computer executable program code which when executed by at least one processor causes an apparatus at least to perform the method of the first example aspect.
According to a third example aspect of the disclosed embodiments there is provided a computer program product comprising a non-transitory computer readable medium having the computer program of the third example aspect stored thereon.
According to a fourth example aspect of the disclosed embodiments there is provided an apparatus configured to perform the method of the first example aspect. The apparatus may comprise a processor and the computer program of the second example aspect configured to cause the apparatus to perform, on executing the computer program, the method of the first example aspect.
According to a fifth example aspect of the disclosed embodiments there is provided an apparatus comprising means for performing the method of the first example aspect.
Any foregoing memory medium may comprise a digital data storage such as a data disc or diskette, optical storage, magnetic storage, or opto-magnetic storage. The memory medium may be formed into a device without other substantial functions than storing memory or it may be formed as part of a device with other functions, including but not limited to a memory of a computer, a chip set, and a sub assembly of an electronic device.
Different non-binding example aspects and embodiments of the present invention have been illustrated in the foregoing. The embodiments in the foregoing are used merely to explain selected aspects or steps that may be utilised in implementations of the present invention. Some embodiments may be presented only with reference to certain example aspects of the invention. It should be appreciated that corresponding embodiments may apply to other example aspects as well.
Some example embodiments of the present disclosure will be described with reference to the accompanying drawings, in which:
In the following description, like reference signs denote like elements or steps.
receiving 210 a real-time audio signal of played music that is played by at least one person;
tracking beat 220 of the played music from the real-time audio signal and accordingly estimating a time of a next beat;
recognising 230 from the real-time audio signal at least one of chords; notes; and drum sounds and accordingly detecting repetitions in the played music;
predicting 240 a next development in the played music, based on the detected repetitions, comprising at least one of chords; notes; and drum sounds that will be played next, and respective timing based on the estimated time of the next beat; and
producing 250 a real-time output based on the predicted next development in the played music.
In an embodiment, signals of a plurality of the instruments 110 are combined to the received audio signal. The combining is performed e.g. acoustically by capturing with one microphone sound produced by plural instruments 110 and/or electrically by combining electric signals representing outputs of different instruments 120.
The real-time audio signal of the played music is received e.g. using the internal microphone 122, external microphone 130 and/or an instrument input such as MIDI or electric guitar input.
The tracking 220 adapts, in an embodiment, to fluctuation of the tempo of the played music.
In an embodiment, the tracking of the beat comprises detecting a temporal regularity in the music. The tracking of the beat may simulate tapping the foot to the music by musicians.
The predicting of the at least one of chords; notes; and drum sounds can be performed by detecting self-similarity in the played music. Certain chord/note/drum sound progressions tend to be repeated and varied within a song. That allows a competent musician to start playing along a previously-unheard song after listening to it for a while, since they detect a part that they have heard earlier in the song. The jamming assistant 120 is provided to help also less experienced people with this respect.
In order to calculate self-similarity, the received real-time audio signal can be analysed and an internal representation for the played music can be extracted, such as a sequence of feature vectors and/or a sequence of high-level descriptors of the received audio signal.
The feature vectors can be numeric. Each feature vector may represent a short segment of music represented by the audio signal, such as frames of 10 ms to 200 ms of the audio signal. A sequence of successive frames represents longer segments of the received audio signal. The sequence may comprise at least 20, 50, 100, 200, 500, 1 000, 10 000, 20 000, 50 000, 100 000, 200 000, 500 000, 1 000 000, or 2 000 000, frames.
The high-level descriptors comprise, for example, chords, notes, and/or drum sound sounds or notes (in a human readable form).
Let us denote the internal representation by R and to a latest frame by T so that R(T) refers to the internal representation of the latest frame. R(T−1) then refers to the second-latest frame. Let us further assume that a total of N frames are buffered or kept in a memory of the jamming assistant, for example. R(T−N+1) will then refer to an oldest frame that is buffered. N can be chosen to cover the real-time audio signal for a period from half a minute up to several days. The buffer (of frames) is maintained in one embodiment from one music or jamming session to another, possibly regardless whether an apparatus running the method would be shut down or software implementing the method would be closed.
In an embodiment, a self-similarity matrix is computed in order to detect repetitions in the played music.
The self-similarity matrix is computed, for example, by comparing a plurality of frames (e.g. every frame) in the memory against a plurality of other frames (e.g. every other frame). When a new frame is formed from the real-time audio signal, the matrix can be updated by comparing the frame against all the previously buffered frames. The matrix can so be formed to contain similarity estimates between all pairs of the buffered frames. The similarity estimates can be calculated using a similarity metric between the internal representations R for the frames being compared. An inverse of the cosine (or Euclidean) distance between feature vectors may be used.
In an embodiment, hashing is used to enable using longer periods of the received audio signal. For example, in the case of extremely long memory lengths N (for example several days), buffering the entire similarity matrix may be undesirable as required buffer size grows proportionally to a square of N. In this embodiment, only the internal representation itself is kept for frames that are older than a certain threshold. For those frames, hashing techniques such as locality sensitive hashing (LSH) is then used to detect a sequence of frames that matches the latest sequence of frames. LSH as a technique differs from the use of the self-similarity matrix, but may serve the same purpose in detecting an earlier sequence of frames that is similar to the latest sequence of frames. Generally, LSH helps to reduce dimensionality of high-dimensional data by hashing input items such that similar items map to the same buckets with high probability. The number of buckets is much smaller than the universe of possible input items, which saves processing cost.
In an embodiment, the detecting of the repetitions in the played music comprises detecting that latest L frames are very similar to a sequence of frames that happened X seconds earlier. That two sequences of frames are very similar (i.e. sufficiently similar for indicating repetition in the played music) can be determined e.g. by comparing their similarity (e.g. inverse of Euclidean distance) to a set threshold. For example, repetition may be detected if the similarity is above a given threshold for the pair of representations R at times T and T−X, for the pair at times T−1 and T−X−1, and so forth until the pair at times T−L and T−X−L. When repetition is detected, the next development in the played music can be predicted for coming frames from current time T onwards.
The user can be allowed to select a desired musical style (such as rock, jazz, or bossa nova for example). The predicting of the next development can then be performed accordingly i.e. based on the selected style.
In step 240, the respective timing based on the estimated time of the next beat need not be limited to defining the time on the next beat. Instead, the next time to play the predicted development may be timed at an offset of some fraction of the time between beats from the next beat. The offset may be anything from k to I beats, wherein k=−1 and I is greater than or equal to 0, for example 0; N/8, N/16, N/32 wherein N is an integer greater or equal to 1. For example, the offset could be 5/8 or 66/16 beats i.e. more than one beats ahead but not necessarily with the same beat division as the base beat. Yet the timing would be based on the next beat.
In an example embodiment, the real-time outputting comprises displaying any one or more of: musical notation such as notes, chords, drum notes and/or activating given fret, instrument key or drum specific indicators. The displaying may be performed using a display screen or projector.
In an embodiment, the producing of the real-time output comprise visualising repeating sequences. When the latest L events indicate a repetition of a previously-seen sequence, the previously seen matching sequence(s) can be visually highlighted on the device screen as illustrated in
A pre-defined library of musical patterns is used in an embodiment to assist in the predicting of the next development in the played music. The library contain, for example, any one or more musical patterns selected from a group consisting of: popular chord progressions; musical rules about note progressions; and popular drum sound patterns. A user can select one or more recorded songs and the recorded songs can then be processed as if previously received in the real-time audio signal. Subsequently, when the user is performing in real time afterwards, the latest sequence of frames can be compared also against the internal representation formed based on the recorded songs and it can be detected if the user is performing one of the recorded songs or playing something sufficiently similar and use that song in the predicting of the next development in the played music. In an embodiment, the musical key of the recorded songs is detected on their processing and the comparison of similarity is performed with a further step of converting the musical key of the recorded songs to match that of the currently played music. In this embodiment, the jamming assistant can propose a next development based on a recorded song that would suit to the played music except for its musical key and so broader selection of useful reference material can be used. Furthermore, the jamming assistant can simplify transposition of the played music to better suit to the singer or singers (e.g. players of the instruments or pure vocalists).
By using recorded songs, it is possible to from learn possible patterns while the user is still allowed to play with rhythm, musical key (free transposition to another key) and style of her own preference freely deviating from those of the recorded songs as in a jamming session with other musicians.
A musical key of the played music can be shown to the user.
In an embodiment, the producing a real-time output may comprise performing one or more instruments along with the played music. For example, the jamming assistant can be configured to produce a corresponding midi-signal to be interpreted and played by a synthesizer with an instrument sound chosen by the user or selected by the jamming assistant (e.g. based on the recorded songs or pre-set rules, e.g. base or drums are less universally transportable from one instrument to another than e.g. flute, piano and violin).
Various embodiments have been presented. It should be appreciated that in this document, words comprise, include and contain are each used as open-ended expressions with no intended exclusivity.
The foregoing description has provided by way of non-limiting examples of particular implementations and embodiments of the present disclosure a full and informative description of the best mode presently contemplated by the inventors for carrying out the disclosed embodiments. It is however clear to a person skilled in the art that the present disclosure is not restricted to details of the embodiments presented in the foregoing, but that it can be implemented in other embodiments using equivalent means or in different combinations of embodiments without deviating from the characteristics of the present disclosure.
Furthermore, some of the features of the afore-disclosed embodiments of the present disclosure may be used to advantage without the corresponding use of other features. As such, the foregoing description shall be considered as merely illustrative of the principles of the present disclosure, and not in limitation thereof. Hence, the scope of the present disclosure is only restricted by the appended patent claims.
Number | Name | Date | Kind |
---|---|---|---|
6482087 | Egozy | Nov 2002 | B1 |
7297858 | Paepcke | Nov 2007 | B2 |
7820902 | Furukawa | Oct 2010 | B2 |
7985917 | Morris et al. | Jul 2011 | B2 |
9177540 | Serletic, II et al. | Nov 2015 | B2 |
9236039 | Katto | Jan 2016 | B2 |
9305531 | Miwa | Apr 2016 | B2 |
20030164084 | Redmann | Sep 2003 | A1 |
20050150362 | Uehara | Jul 2005 | A1 |
20060123976 | Both | Jun 2006 | A1 |
20070039449 | Redmann | Feb 2007 | A1 |
20070223675 | Surin | Sep 2007 | A1 |
20080190271 | Taub | Aug 2008 | A1 |
20100017034 | Nakadai | Jan 2010 | A1 |
20100126332 | Kobayashi | May 2010 | A1 |
20100192755 | Morris et al. | Aug 2010 | A1 |
20110273978 | Murayama | Nov 2011 | A1 |
20110289208 | Hara | Nov 2011 | A1 |
20130025435 | Rutledge et al. | Jan 2013 | A1 |
20150228260 | Okazaki et al. | Aug 2015 | A1 |
20170124898 | Shaffer | May 2017 | A1 |
20170263226 | Silverstein | Sep 2017 | A1 |
20180097856 | Dange | Apr 2018 | A1 |