A microprocessor device for selection and recognition of musical pieces

Abstract: The invention relates to a microprocessor device for the selection and recognition of musical pieces, comprising means for generating musical notes connected to a governing microprocessor which by means of memories containing a plurality of libraries of reference pieces, compares an inputting musical piece with other pieces present in the libraries; which microprocessor, through a plurality of sequential phases, is able to recognise and identify the inputted notes and pair them with an identical piece in the libraries. Where no identical piece is found, a further phase, working on a basis of an error threshold, can identify musical pieces which are not identical to the inputted piece.

Description: The invention relates to a microprocessor device for the selection and recognition of musical pieces. In the musical field, and in particular in the field of electronic musical instruments, the operator has very often to recall musical pieces for reasons of study. To do this, he must search for the piece, which will already have been memorized, and recall it. Normally all electronic musical instruments are provided with a special archive where a plurality of pieces is memorized: the operator can recall a piece by using a function specifically dedicated to a search and play, so that the operator can then listen and use the piece for whatever purpose he has in mind. This procedure obviously takes time, and can lead to operator errors where two or more pieces might be similarly articulated and share many notes in common. This calls for a series of decisions on the part of the operator which require attention and concentration, for which reason the operator tries to perform such operations only when there is sufficient time and quiet at hand for their accurate execution. At the present is known from EP-A-0372 a device which performs the selection of musical pieces but not the recognition of said pieces. US A 5250745 document performs further the selection of musical pieces that fit the type of voice in term of timbre and pitch range of a singer, but not the recognition of said pieces. So, at present, there is no automatic device available for swiftly and reliably selecting and recognising a musical piece requested by the operator. The present invention proposes to obviate the technical problems described above, by providing a microprocessor device, as in claim 1, for the selection and recognition of musical pieces, recognizing a musical tune by comparing the performance of a user given by a source (as microphone, MIDI-input or musical keyboard) to musical tunes located in a library. The device, without regard to the musical ability of the operator, and automatically and rapidly, can identify a piece of music on the basis of evidence and supply of a minimum of constituent notes thereof, as well as independently of the octaves and key in which the piece is played. The above aim and others besides will better emerge hereinbelow, and are attained by a microprocessor device for the selection and recognition of musical pieces, as set out in the accompanying claims. Further characteristics and advantages will emerge from the description of a preferred embodiment of the invention, which will be made hereinbelow with reference to a single figure, intended as a purely illustrative and non-limiting example, which shows a schematic block diagram of the device according to the invention. In figure 1, 1 denotes a microphone which is used to pick up the musical sources playing a piece. A pitch-to-MIDI type tone/note convertor 2 connected to the microphone 1 generates musical notes: a midi interface 3 is connectable to any musical instrument 11, while 4 denotes a keyboard able to generate any type of musical piece. All of the above means for generating musical pieces 2, 3 and 4, useable together or independently, send their musical sequences to a means for performing musical pieces, denoted by a block 10 in the figure, constituted essentially by a sound generator, amplifiers and stereophonic systems. A command panel 5 is placed between the means for performing musical pieces 10 and the means for generating 2, 3 and 4, which command panel 5 exhibits, among other things, a switch 5a permitting a deviation from a first contact A to a second contact B. The command panel 5 is governed by a microprocessor 6 of a sort which is always present in any electronic musical instrument or organ of sound reproduction. The microprocessor 6, through its own actuation means (not illustrated), determines a commutation from said first contact A to said second contact B. A recognition microprocessor 7 compares the inputting musical notes from the means for generating 2, 3 and 4 with libraries 9 containing a plurality of archives in encoded form relating to musical pieces. A display 8 visualizes the title of the piece and the operator can also observe the selection procedure as it happens. Now follows a functional explanation of the device. The means for generating 2, 3 and 4 are used to generate a sequence of musical notes, which are then compared to the pieces resident in the libraries 9 of the recognition microprocessor 7, to verify whether the piece requested by the operator is included therein. Thus the recognition microprocessor 7, together with the libraries 9, represent a means for logically discriminating with which a logical comparison between the digitalized musical notes inputting from the means for generating 2, 3 and 4 and those present in the libraries 9 can be made such as to make a preliminary selection and recognition in real time of memorized musical pieces which include the notes sent on from the means for generating 2, 3 and 4. All of the preceding occurs when the switch 5a is derouted from the first contact A to the second contact B such that the relative procedure can be activated. Said means for logically discriminating provide for a sequential plurality of procedural phases, divided as hereinbelow. Each musical piece is characterised by a recognition pattern, which is an encoding of a sequence of notes identifying that particular piece. By means of the recognition microprocessor 7 a search is made in the libraries 9 for a piece having an identical recognition pattern to the inputting sequence. If a pattern recognition occurs, the musical piece is considered to have been recognised and is sent to the means for performing musical pieces 10, constituted by a musical instrument, to be played. If no exact pattern recognition occurs, the recognition microprocessor 7, by means of an evaluating program, identifies the most similar piece in the libraries to the inputting piece. When a piece is recognised, its title is flashed up on the display 8. At this point the operator can decide, through the command panel 5, when recognition or approximate recognition has taken place, whether to command a playthrough of the piece. The invention includes a particularly original solution for identifying pieces independently of the octaves and keys in which they are inputted. Each note is labelled with a MIDI code number by the recognition microprocessor 7; said number is well defined and normalized, being the remainder of the MIDI numerical code after division thereof by twelve (twelve being the number of notes in a musical octave). For example, if the MIDI code for a note is 56, the value attributed to said note is 8, being the remainder of 56 divided by 12. Subsequently, the recognition microprocessor 7, when the inputted notes are read in order to search for the desired musical piece, calculates the algebraic difference between the "normalized" values of a note and the succeeding note. Each element thus calculated can take on values which range from minus 11 to plus 11, since each note exhibits normalized values from 0 to 11. Substantially this pattern of recognition is organized according to a two-dimensional array as explained hereinbelow: patt-recogn (max lib songs) (max recogn notes), wherein max lib songs means the maximum number of pieces contained in the libraries 9, which in the applicant's case is 512. Max recogn. notes is the maximum number of notes used for recognising a searched-for piece. In the applicant's case this number is eight. Obviously the numbers both of max lib songs and max recogn. notes can vary according to needs. Each element of the array is represented by one byte which, as indicated above, belongs to a range of values included between - 11 and + 11. The pattern of recognition thus consists of a numerical sequence of values representing the difference between one note and the next. The true definition is performed by using a program based on two single-dimension arrays as follows: search (max lib songs) and errors (max lib songs). With the first single-dimension array all pieces having a corresponding pattern of recognition equal to the inputting pattern are memorized: the patterns generated by the means for generating 2, 3 and 4 are compared two at a time; and this first array is labelled by a word, that is, by eight bits. A routine known as "read inputs" is provided in the array search. This routine contains three subroutines each having the aim of analysing the inputting notes coming from the sources; that is, keyboard 4, the interface 3, and the tone/note convertor 2. Once it has calculated the difference between the first two notes of the piece sent by the means for generating 2, 3 and 4, the recognition microprocessor 7 begins to scan all pieces present in the libraries 9, and memorizes all those which correspond to the inputted piece: this is done through a first-search subroutine. Subsequently, this comparison is repeated by means of a next-search subroutine for all 1 the further notes transmitted by the means for generating 2, 3 and 4. The comparison process terminates, when the search array recognises the piece, through an exit recogn. subroutine in which the song status - song recognized is defined, establishing the identification condition. Obviously this occurs when the piece is recognised, that is when the search array confirms a perfect correspondence between a piece contained in the max lib songs and the note sequence sent by the means for generating 2, 3 and 4. If errors are evidenced, which is established through an errors array represented by 8 bits, a clear errors subroutine is activated, and an internal search of the libraries 9 is made to see the difference between the pattern of the sent notes and the corresponding note pattern of at least one piece included in the max lib songs. The above search is carried out within the calc errors subroutine. Further, as an error threshold has been fixed, above which there is no recognition of error, in this case a min errors subroutine is activated which allows a most similar piece to be identified, and thus identification of a song status - min errors. In the applicant's realization this error threshold has been numerically indicated with the value 6; this is purely a convention established on the basis of experimentations carried out. Should there exist more than one piece having the same minimum value, with regard to errors, the process selects in any case the last selected piece. In this case, there is a song status - song selected. Thus: if there is a song status - song recognized result, this means that a piece has been perfectly recognised; if there is a song status - min errors result, a most similar piece within the error threshold limit has been recognised; if there is a song status - not recognised result, no piece has been recognised in the libraries 9 having a note pattern corresponding to those inputted by the means for generating 2, 3 and 4, meaning that there is an error range which goes above the indicated error threshold. Summing up, it can be said that the means for logically discriminating represented by the sequential procedures of the combination of the recognition microprocessor 7 and the libraries 9 permits the sending, through the swich 5a, of a series of notes represented by a musical passage defined by one of the means for generating 2, 3 and 4, with the aim of determining a comparison between said libraries 9 in accordance with a procedural sequence which envisages the analysis of two notes at a time, obviously digitalised, coming from said means for generating 2, 3 and 4, and a comparison between the pattern of recognition of said notes represented as a sequence of encoded numbers identified by the difference bwtween an encoded note and the next note, and a pattern of recognition represented by the corresponding notes of memorized musical pieces. Said procedures also comprise a reading of said notes, a selective search to identify said pattern of recognitions, as well as the continuance of said search up until the search array provides a single identification among the patterns. If this correspondence is exact, a song status recognised message is given, which can then be played by the instruments 10; if this recognition is not achieved, there is a song status not recognised message and the piece is not played; if more than one pattern is recognised, a song status selected message is received envisaging a min error, that is, recognition of a piece with a smallest number of errors in accordance with a dtermined tolerance with respect to the reference piece. The procedure comprises a sequential search which begins with a routine called a first search, continues with a further subroutine called next search and terminates with a subroutine called exit recogn, with which the program managing all of the above phases identifies either an error condition or and identification condition. With the above sequential procedure it is possible to identify, from a series of notes inputted, with whatever tone and in whatever octave, those pieces having identical contents as corresponding mumerically encoded notes in the libraries 9 where a plurality of reference pieces are loaded. Thus the searched-for piece can be played. This procedure envisages a well-defined margin of error, speeds up selection and recognition, and eliminates operator error.

Claims: A microprocessor device for the selection and recognition of musical pieces, characterized in that it comprises means (1,2,3,4) for generating digitalized information representing musical notes performed by a user which are encodedly fed to the device to access a plurality of libraries (9) contained within a memory, which libraries (9) are constituted by reference musical notes for musical pieces; said means for generating and said memories being managed by a first microprocessor (7) to which said memories are connected and by a second microprocessor (6) to which said means (1,2,3,4) for generating are connected, said first microprocessor (7) also managing means for logically discriminating by comparing inputted notes sent from said means for generating via a correspondingly set switch (5a) , with said libraries (9) , for selecting and recognising in real time musical pieces which include said notes fed to the device. A microprocessor device, as in claim 1 , characterized in that said means for logically discriminating (7) performs sequential procedures defining a recognition pattern and includes means for performing a first procedural phase wherein the inputted notes are read in encoded form; means for performing a search phase wherein two notes from the inputted notes at a time are read; and means for performing a comparison which compares an inputted sequence with a memorized sequence in the libraries (9) , the comparison between said inputted and memorized sequences being represented as numerical sequences,which represent a difference between an encoded note in numerical form with a value from 0 to 11 and a following note similarly encoded, and means for performing the decision that if a perfect correspondence results then a musical piece has been recognized. A device, as in claim 2 , characterized in that a recognition error threshold is provided, if no perfect recognition of the piece to be recognized is made, below which recognition error threshold a musical piece is identifiable which contains a minimum error with respect to the inputted notes. A device, as in claim 2, characterized in that said means for logically discriminating (7) includes means for performing a situation in which the piece to be recognized is not identified when there is no correspondence between a sequence of numerical encoded note memorized within the memories (9) and a numerical encoded sequence corresponding to inputted note sequence. A device as in claim 2, characterized in that said means for discriminating (7) provide for a two-dimensional numerical array according to which said reference musical note is organized. A device, as in claim 4, characterized in that said recognition pattern provides two single-dimensional arrays, of which one relates to a search for musical pieces while another relates to any recognised errors. A device as in claim 6, characterized in that each bit of each array assumes a value from between - 11 to + 11. A device as in claim 2, characterized in that said numerical sequence representing a series of differences between encoded notes is calculated in accordance with a standard MIDI code.

Inventors: GALANTI MAURIZIO, GIUDICI GIOVANNI ANTONIO, GALANTI, MAURIZIO, GIUDICI, GIOVANNI ANTONIO
Applicants: GENERALMUSIC SPA, GENERALMUSIC S.P.A.
Application year: 1995
Main classification: G10H1
IPC codes: G10H1