BACKGROUND OF THE INVENTIONThe present invention relates to a method and device for automatically composing a piece of music in accordance with various musical conditions.
With a widespread use of personal computers, everyone has now come to be able to freely enjoy various types of music through the “computer music” technique, which uses a computer to play a musical instrument, compose a piece of music (music piece), arrange a composed music piece and synthesize to a tone color. Particularly, in the field of music composition using a computer, even people without expert knowledge of music can compose easily by just entering and setting various musical conditions as directed by the computer. In addition, automatic music composing devices have recently been proposed which analyze characteristics of a melody to an original music piece by classifying the melody into harmonic and non-harmonic tones and further classifying the non-harmonic tones. The proposed automatic music composing devices then synthesize a new melody in accordance with the analysis results and chord progression to thereby automatically compose a music piece.
For example, Japanese Patent Laid-open Publications Nos. SHO-63-311395, SHO-63-250696 and HEI-1-167783 disclose automatic composing techniques which take non-harmonic tones into account as mentioned above. Further, in U.S. Pat. No. 4,926,737, there is disclosed a technique which extracts characteristic parameters out of a motif melody and creates a new melody on the basis of the thus-extracted parameters. In addition, Japanese Patent Laid-Open Publication No. HEI-3119381 teaches an automatic composing technique which analyzes time series forming a melody of an original music piece so as to calculate linear predictive coefficients and create a new melody on the basis of the calculated linear predictive coefficients. Furthermore, Japanese Patent Laid-open Publication Nos. HEI-4-9892 and HEI-4-9893 disclose technique of analyzing a melody on the basis of chords and tonality in a melody. All of the prior techniques create a new melody in accordance with a given chord progression and by use of extracted characteristic parameters or analyzed data of a melody. These techniques, however, required user's special knowledge of music.
Furthermore, Japanese Patent Laid-Open Publication No. SHO-60-107079 shows a technique which prestores many kinds of note patterns (patterns of pitch variation tendency and note combination) for a single measure and selects a desired one of the prestored note patterns so as to automatically compose a music piece comprised of a plurality of measures. This technique, however, can only compose a music piece with a limited note combination (positions of individual positions within a measure) because the note combination is fixedly contained in the pattern.
Moreover, Japanese Patent Laid-open Publication No. HEI-6-75576 discloses a technique which prestores many pieces of correlative melody information, selects a desired piece of the correlative melody information for convolutional integral operations thereon so as to form melody outline information (information indicative of a time-varying pitch tendency), and automatically composes a music piece on the basis of the melody outline information. However, this publication fails to describe in detail a manner in which notes are allocated to the formed melody outline and only discloses that a music piece is created by entering musical rules.
Because the known automatic composing techniques in the filed of computer music as discussed above are merely based on such processing as to satisfy a variety of preset musical conditions (such as a chord progression, musical genre and rhythm (type), they can not perform normal composing operations hitherto done by a human being, such as first creating words and then creating music suitable for the words.
Further, in the prior art automatic music composing devices which analyze melodic characteristics of an original music piece and compose a new music piece on the basis of results of the analysis, the analysis results were used directly without being substantially modified. Even where the analysis results were modified partly, the partial modification did not mean anything more than mere random rewriting of the analysis results, due to the fact that it could not be clearly recognized how the modification acts in the course of the automatic composition. Therefore, these automatic music composing devices could not achieve automatic composition of a music piece as contemplated by an operator or user.
SUMMARY OF THE INVENTIONIt is therefore an object of the present invention to provide a method and device for automatically composing a music piece which allow users, having no special musical knowledge about chord progression, to easily perform operations for the music piece composition.
It is another object of the present invention to provide a method and device which are capable of composing a music piece in such a manner that a user's intention is easily reflected in the music piece.
It is still another object of the present invention to provide a method and device which are capable of automatically composing a music piece with increased ease on the basis of words for the music piece to be composed.
In order to accomplish the objects, the present invention provides an automatic music composing device which comprises a supply section for supplying music template information including at least information indicative of a pitch variation tendency in each of a plurality of sections forming a music piece, an input section for, in response to an operation of a user, inputting information indicative of a tendency relating to the number of notes contained in each of sections of a music piece to be composed, and a determination section for determining a length and pitch of each note to be contained in each of the sections of the music piece to be composed, on the basis of the music template information and the information indicative of a pitch variation tendency in each of the sections inputted by the input section.
The above-mentioned information indicative of a pitch variation tendency in each of the sections may be that of a pitch envelope which is relatively accurate information, or more generalized information of a general pitch variation tendency. The information indicative of a tendency relating to the number of notes in each section is information relating to each individual note to exist in the phrase. Each such section corresponds to a short independent portion of a melody called a “phrase”. The information relating to each individual note in the phrase which is most familiar to nonprofessional users may be words for a music piece. Although there are of course some exceptions from the view point of the musical theory, individual syllables in the words in most cases can be regarded as corresponding more or less to individual notes, and thus it is very preferable to make use of such an idea in automatic music composing techniques because the idea greatly simplifies user's data entry for music composition. The information indicative of a tendency relating to the number of notes in a single phrase can be entered by the user making and entering words suitable for the phrase. For languages such as Japanese where in most cases each letter corresponds to one syllable, this is very convenient because entering words in characters results directly in entry of syllable information.
Of course, for other languages such as English where letters of words do not correspond to syllables on a one-to-one basis, syllables of the words phrases can be analyzed on the basis of entered letters of the words, so that the thus-analyzed syllable information can be used as the above-mentioned information indicative of a tendency relating to the number of notes. However, the simplest method will be to enter a desired words phrase in the form of scat having a single syllable like “Du” rather than entering the words in letters. In such a case, entering, in addition to syllable information of the words, information indicating long vowels as necessary may be very useful in determining a length of note corresponding to each note. In this manner, a length and pitch of each note to be contained in each phrase can be determined on the basis of entry of the information indicative of a tendency relating to the number of notes in each of the sections, and thus data of a music piece can be generated automatically.
According to the present invention thus arranged, the user only has to enter the information indicative of a tendency relating to the number of notes in each phrase in the form of words information or syllable information such as scat, with the result that the user need not have any special knowledge of music. Further, because the information indicative of a tendency relating to the number of notes can be entered by the user entirely freely, a music piece with free note arrangement (position and length of each note in a measure), and besides, the user's intention can be reflected easily on the music piece.
Preferably, the above-mentioned supply section includes a memory having prestored therein a plurality of pieces of the music template information for a plurality of different music pieces, and a selection section for selecting from the memory a desired piece of the music template information. This permits automatic composition, free of any musical problem, by use of music template information for an already-composed music piece without requiring the user's special knowledge of music.
The supply section may further include a section which, in response to an operation of the user, changes the contents of the piece of the music template information selected by the selection section. Because the change is made to the music template information, it allows the user's intention to be easily reflected in the music piece composed.
The present invention also provides a method of automatically composing music using a computer which comprises the steps of supplying music template information including at least information indicative of a pitch variation tendency in each of a plurality of sections forming a music piece, inputting, in response to an operation of a user, information indicative of a tendency relating to a number of notes in each of sections of a music piece to be composed, and determining a length and pitch of each note to be contained in each of the sections, on the basis of the music template information and the information indicative of a tendency relating to a number of notes in each of sections inputted by the input section.
The present invention further provides a method of automatically composing music using a computer which comprises the steps of analyzing musical characteristics for each of a plurality of sections forming a music piece and, on the basis of the analyzed musical characteristics, supplying music template information including at least information indicative of a pitch variation tendency in the section and information relating to a number of notes and a position of each the note in the section, storing the supplied music template information into a memory, the memory storing a plurality of pieces of the music template information for a plurality of music pieces, selecting from the memory a desired piece of the music desired template information in response to an operation of a user, editing contents of the selected piece of the music template information in response to an operation of the user, and determining a position, length and pitch of each note to be contained in each of the sections, on the basis of the piece of the music template information selected and edited in the steps of selecting and editing, so as to generate music data.
The present invention further provides a machine-readable recording medium which contains a program to be executed by a computer for implementing the automatic music composing method proposed above.
An automatic music composing device in accordance with another aspect of the present invention comprises an information supply section for supplying information including at least syllable data corresponding to words for a music piece to be composed, a setting section for setting characteristic data to characterize the music piece to be composed, and a music piece generation section for generating the music piece corresponding to the words on the basis of the information including the syllable data supplied by the information supply section and the characteristic data set by the setting section.
The characteristic data characterizing the music piece to be composed are for example the arrangement of passages, key, time and pitch range of the music piece, which may be designated by the user or prestored within the music composing device. Normally, a music piece may be automatically composed by just designating the characteristic data, but the present invention is designed to automatically generate a music piece well matching the user-specified syllable data corresponding to the words in consideration of its relations with the syllable data.
An automatic music composing device in accordance with still another aspect of the present invention comprises a performance data input section for inputting performance data that represents a music piece having a plurality of sections, a characteristic extraction section for analyzing the performance data for each of the sections so as to extract musical characteristics of the section, a storage section for storing the musical characteristics of each of the sections extracted by the extraction section as characteristic data to characterize the music piece, and a music piece generation section for generating performance data representing a new music piece, on the basis of the characteristic data stored in the storage section.
If performance data representing a music piece are for example MIDI data, the performance data input section supplies the performance data along with data indicative of phrase divisions, measure lines, etc. The characteristic extraction section analyzes the performance data for each phrase and measure line in order to extract the musical characteristics, such as pitch and rhythm patterns, for each phrase and measure. Therefore, the characteristic extraction section extracts a plurality of the musical characteristics for a single music piece. The storage section stores, as characteristic data for a music piece, the plurality of the musical characteristics extracted by the characteristic extraction section. The music piece generation section generates a new music piece on the basis of the characteristic data stored in the storage section. Thus, if it is desired to edit a portion of the music piece generated by the music piece generation section, the present invention greatly facilitates the desired editing by modifying those of the stored characteristic data that are associated with the relevant phrase and measure line.
BRIEF DESCRIPTION OF THE DRAWINGSFor better understanding of the above and other features of the present invention, the preferred embodiments of the invention will be described in detail below with reference to the accompanying drawings, in which:
FIG. 1 is a flowchart illustrating an example of a program run by a computer to implement a function of an automatic music composing device according to the present invention;
FIG. 2 is a hardware block diagram showing a structure of an electronic musical instrument which includes a memory containing the program for the automatic music composing device ofFIG. 1;
FIG. 3 is a flowchart showing details of the former half of an analyzing and extracting process ofFIG. 1;
FIG. 4 is a flowchart showing details of the latter half of the analyzing and extracting process ofFIG. 1;
FIG. 5 is a diagram showing exemplary results of the analyzing and extracting process which is performed on musical characteristics for the whole of a music piece;
FIG. 6 is a diagram showing results of the analyzing and extracting process which vary with the progression of a music piece;
FIG. 7A to7G are diagrams showing examples of words data entering screens;
FIGS. 8A and 8B are diagrams showing exemplary data formats in words and music memories, respectively, within a working memory ofFIG. 2;
FIG. 9 is a flowchart illustrating details of the former half of a measure division setting process ofFIG. 1;
FIG. 10 is a flowchart illustrating details of the latter half of the measure division setting process ofFIG. 1;
FIG. 11 is a flowchart illustrating details of the former half of a process for setting beats of the first and last syllables of each phrase shown inFIG. 1;
FIG. 12 is a flowchart illustrating details of the latter half of the process for setting beats of the first and last syllables;
FIG. 13 is a diagram showing examples of beats set by the process for setting beats of the first and last syllables detailed inFIGS. 11 and 12;
FIG. 14 is a flowchart illustrating details of a rhythm pattern generating process ofFIG. 1;
FIGS. 15A and 15B are diagrams showing examples of beat priority setting tables to be used for determining occurrence frequencies at individual tone generation timing in a phrase and determining note-assigning priority during the rhythm pattern generating process detailed inFIG. 14;
FIG. 16 is a flowchart illustrating details of a pitch pattern generating process ofFIG. 1;
FIG. 17 shows examples of pitch patterns selected in the pitch pattern generating process detailed inFIG. 16;
FIG. 18 is a graph conceptually illustrating a process for setting pitches of syllables other than the first and last syllables on the basis of a template specified in the pitch pattern generating process ofFIG. 16;
FIG. 19 is a diagram conceptually illustrating a process for assigning syllables other than the first and last syllables via a template in the pitch pattern generating process ofFIG. 16; and
FIGS. 20A and 20B are diagrams explanatory of a manner in which syllable information is entered in the form of scat.
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTSFIG. 2 is a hardware block diagram showing a structure of an electronic musical instrument containing a computer processing program that implements an embodiment of an automatic music composing device according to the present invention.
The electronic musical instrument is controlled by a microcomputer comprised of a microprocessor unit (CPU)1, aprogram memory2 and a workingmemory3.
TheCPU1 controls the overall operation of the electronic musical instrument. As shown, to thisCPU1 are connected, via a data and address bus1D, theprogram memory2, the workingmemory3, a performance data memory (RAM)4, a depressedkey detection circuit5, a switchoperation detection circuit6, adisplay circuit7 and atone source circuit8.
Theprogram memory2 is a read-only memory (ROM) which has stored therein various programs to be run by theCPU1, various data and various marks and letters. In thisprogram memory2, there is also stored an operating program for implementing an automatic music composing method according to the principle of the present invention.
The workingmemory3 is allocated in predetermined address areas of a random access memory (RAM) for use as various registers and flags for temporarily storing performance information and various data which occur as theCPU1 executes the programs.
The performance data memory (RAM)4 is provided to prestore, for a plurality of music pieces, various performance-related data such as music piece templates, pitch patterns and rhythm patterns, i.e., data indicating musical characteristics of an analyzed music piece.
Keyboard9 connected to the depressedkey detection circuit5 has a plurality of keys for designating the pitch of any tone to be generated and key switches provided in corresponding relations to the keys. Depending on the applications, thekeyboard9 may also include a key-touch detection means such as a key-depression velocity or force detecting device.
The depressedkey detection circuit5, which comprises circuitry including a plurality of key switches corresponding to the keys on thekeyboard9, outputs a key-on event information signal upon detection of each new depressed key and a key-off event information signal upon detection of each new released key. The depressedkey detection circuit5 also generates key touch data by determining the key-depression velocity or force and outputs the generated touch data as velocity data. In this embodiment, each of the key-on and key-off event information and velocity data is expressed on the basis of the MIDI standards and contains data indicative of a key code of the depressed or released key and a channel to which tone generation of the key is assigned.
On anoperation panel1A, there are provided an analyzing switch to initiate an analysis and extraction of musical characteristics of an already-composed (existing) music piece, an arranging switch to initiate automatic composition of a music piece based on the results of the analysis and extraction, ten-keys to enter numerical value data, a keyboard to enter letter data, and various other operators to enter various musical conditions relating to automatic music piece composition. Although theoperation panel1A includes other operators for selecting, setting and controlling the pitch, color, effect, etc. of each tone to be generated, these operators will not be described in detail because they are well known in the art.
The switchoperation detection circuit6 detects an operational condition of each of the switches and operators to provide switch event information corresponding to the detected condition to theCPU1 via the data and address bus1D.
Thedisplay circuit7 shows on adisplay1B various information such as the controlling conditions of theCPU1 and contents of various setting data, and thedisplay1B may comprise for example a liquid crystal display (LCD) that is controlled by thedisplay circuit7.
The above-mentionedoperation panel1A anddisplay1B together constitute a GUI (Graphical User Interface).
Thetone source circuit8 has a plurality of tone generation channels, by means of which it is capable of generating plural tones simultaneously. Thetone source circuit8 receives performance information (data complying with the MIDI standards) supplied via the data and address bus1D, and it generates tone signals on the basis of the received data. Any tone signal generating method may be used in thetone source circuit8 depending on an application intended. For example, any conventionally-known tone signal generating method may be used such as: the memory readout method where tone waveform sample value data stored in a waveform memory are sequentially read out in accordance with address data that change in correspondence to the pitch of tone to be generated; the FM method where tone waveform sample value data are obtained by performing predetermined frequency modulation operations using the above-mentioned address data as phase angle parameter data; or the AM method where tone waveform sample value data are obtained by performing predetermined amplitude modulation operations using the above-mentioned address data as phase angle parameter.
The tone signals thus generated by thetone source circuit8 are sounded or audibly reproduced via asound system1C comprised of amplifiers and speakers (not shown).
In ahard disk201, there may be stored various data such as music template information as stored in theperformance data memory4 and the above-mentioned operating program for automatic composition as stored in theprogram memory2. By prescoring the operating program in thehard disk201 rather than in theROM2 and loading the operating program into theRAM3, theCPU1 can operate in exactly the same way as where the operating program is stored in theROM2. This greatly facilitates version-up of the operation program, addition of an operating program, etc. A CD-ROM (compact disk)202 may be used as a removably-attachable external recording medium for recording various data such as performance data, music template information and an optional operating program similarly to the above-mentioned. Such an operating program and data stored in the CD-ROM202 can be read out by a CD-ROM drive203 to be transferred for storage into thehard disk201. This facilitates installation and version-up of the operating program. The removably-attachable external recording medium may of course be other than the CD-ROM, such as a floppy disk and magneto optical disk (MO).
Acommunication interface204 may be connected to the bus1D so that the microcomputer system can be connected via theinterface204 to acommunication network205 such as a LAN (Local Area Network), internet and telephone line network and can also be connected to an appropriate severcomputer206 via thecommunication network205. Thus, where the operating program and various data are not contained in thehard disk201, these operating program and data can be received from theserver computer206 and downloaded into thehard disk201. In such a case, the microcomputer of the electronic musical instrument, i.e., a “client”, sends a command requesting theserver computer206 to download the operating program and various data by way of thecommunication interface204 andcommunication network205. In response to the command, theserver computer206 delivers the requested operating program for automatic composition and data to the microcomputer via thecommunication network205. The microcomputer completes the necessary downloading by receiving the operating program and data via thecommunication network204 and storing these into thehard disk201.
It should be understood here that the microcomputer of the electronic musical instrument may be implemented by installing the operating program and various data corresponding to the present invention in any commercially available personal computer. In such a case, the operating program and various data corresponding to the present invention may be provided to users in a recorded form on a recording medium, such as a CD-ROM or floppy disk, which is readable by a personal computer that is used implement automatic composition according to the present invention. Where the personal computer is connected to a communication network such as a LAN, the operating program and various data may be supplied to the personal computer via the communication network similarly to the above-mentioned.
Next, a description will be made about exemplary operation of the automatic music composing device according to the present invention, with reference to FIG.1.
FIG. 1 is a flowchart illustrating an exemplary step sequence taken when the electronic musical instrument ofFIG. 2 is operated as the automatic music composing device, which executes an analysis and extraction of musical characteristics of an already-composed music piece atsteps12 to15 and stores results of the analysis and extraction as a composition template. The automatic music composing device automatically composes a music piece through operations ofsteps17 to24 on the basis of the stored composition template that is modified by the user as appropriate.
Atstep11, a determination is made as to whether the analyzing switch has been actuated on theoperation panel1A. If the analyzing switch has been actuated (YES), the operations ofsteps12 to15 are executed; otherwise (NO), theCPU1 jumps to step16.
Atstep12, various information on the score of the already-composed music piece is read in. For example, the title, musical style, genre, melody, chord progression, words, key, time, tempo, measure lines, phrase divisions are input by use of the GUI (operation panel1A anddisplay1B),keyboard1B, etc. If the already-composed music piece can be read in as MIDI data, the melody, key, tempo, etc. may be analyzed on the basis of the MIDI data with the unanalyzable title, musical style, etc. being introduced by the user via the GUI. Atstep13, the score information input through the operation ofstep12 is stored into a predetermined region of the workingmemory3.
Atnext step14, theCPU1 executes a process to analyze and extract the musical characteristics of the music piece on the basis of the score information having been input in the above-mentioned manner.FIGS. 3 and 4 show details of the analyzing and extracting process, where operations ofsteps31 to3B ofFIG. 3 are performed for each individual phrase contained in the score information while operations ofsteps41 to4A ofFIG. 4 are performed for the whole of the score information. The analyzing and extracting process is carried out in the following step sequence.
Step31: The score information of the already-composed music piece is read out from the workingmemory13, and the number of the phrases contained in the score information is determined and stored into a number-of-phrases register FN.
Step32: A counter register CNT is set to a value of “1”.
Step33: The operations ofsteps34 to39 are performed for the phrase of the phrase number designated by the counter register CNT as a “phrase in question”. The operations ofsteps34 to36 analytically extracts pitch-related factors out of the score information, while the operations Steps37 to39 analytically extracts rhythm-related factors out of the score information.
Step34: The melody of the phrase in question is converted into individual pitch difference data using the first pitch of the phrase as a pitch converting basis.
Step35: The pitch pattern of the phrase in question is detected on the basis of the pitch difference data obtained atstep34. In this case, a line graph plotted by connecting every pitch difference data within the phrase may be used as the pitch pattern. However, because such a line graph connecting every pitch difference data will considerably complicate a later-described pitch contrast/imitate determination, this embodiment uses, as the pitch pattern of the phrase, a line graph plotted by connecting only four pitches, i.e., the first and last and highest and lowest pitches in the phrase. If, however, the first or last pitch is the same as the highest or lowest pitch, a line graph connecting two or three of the pitches is used as the pitch pattern of the phrase. Alternatively, a line graph may be used which is plotted by extracting the maximal and minimal pitches from the graph connecting every pitch difference data and connecting the extracted pitches and first and last pitches of the phrase.
Step36: The first and last pitches of the phrase are detected.
Step37: Bouncing and syncopation are removed from the rhythm pattern of the phrase to detect a primitive rhythm pattern of the phrase. Although the original rhythm pattern of the score information may be directly used as the primitive rhythm pattern, it will considerably complicate the later-described pitch contrast/imitate determination. Thus, this embodiment includes sets of detecting patterns to be used for detecting bouncing and syncopation and basic patterns obtained by removing such bouncing and syncopation from the detecting patterns, and it removes bouncing and syncopation from the phrase's rhythm pattern by replacing a portion of the phrase's rhythm pattern matching one of the detecting patterns with the corresponding basic pattern, so as to create the primitive rhythm pattern.
Step38: A comparison is made between the numbers of notes present in the former and latter halves of the phrase, in order to detect a note density in the phrase; for example, for example, where the phrase has two measures, a comparison is made between the numbers of notes present in the former and latter measures of the phrase. If the difference in the number of notes between the former and latter measures is three or more, one of the measures that has more notes is determined as dense and the other measure having less notes is determined as sparse. If, however, the difference in the number of notes present between the two measures is two or less, then the measures are determined as having an equal number of notes, not as dense and sparse.
Step39: A determination is made as to whether there is a rest at the head of the phrase, i.e., whether there is a time delay at the first beat of the phrase.
Step3A: A determination is made as to whether the current values in the counter register CNT and phrase number register FN are equal. If the determination is in the affirmative (YES), this means that the operations ofsteps33 to39 have been completed for all the phrases contained in the score information, and thus theCPU1 executes operations at and afterstep41 ofFIG. 4 so as to conduct the analyzing and extracting process for the whole of the score information. If, however, the current values in the counter register CNT and phrase number register FN are not equal, this means that there are still one or more phrases to be subjected to the analyzing and extracting process, and thus theCPU1 reverts to step33 by way ofstep3B.
Step3B: Because of the negative determination atstep3A, theCPU1 reverts to step33 after incrementing the counter register CNT by “1”.
A description will next be made about the analyzing and extracting process for the whole of the score information ofsteps41 to4A of FIG.4.
Step41: Pitch range for the whole of the score information is detected on the basis of the highest and lowest pitches contained in the information.
Step42: On the basis of the line graph obtained atstep35, it is examined here whether the individual phrases are approximate or similar in pitch pattern to each other. If the examination shows that the phrases are approximate or similar in pitch pattern, the phrases following the first phrase are determined as imitating the pitches of the first phrase.
Step43: From the whole score information are detected such notes having the shortest and longest duration (i/e/., the shortest and longest notes).
Step44: On the basis of the primitive rhythm obtained atstep37, it is examined whether the individual phrases are approximate or similar in rhythm pattern to each other. If the examination shows that the phrases are approximate or similar in rhythm pattern, the phrases following the first phrase are determined as imitating the rhythm pattern of the first phrase.
Step45: It is examined what proportion (percentage) of the whole score information (i.e., the whole music piece) the phrases detected at step at39 as having a rest account for. If the rate is 0 percent, the phrase occupancy is treated as “null”, if the proportion is greater than 0 percent but smaller than 80 percent, the phrase occupancy is treated as “medium”, and if the proportion is more than 80 percent, the phrase occupancy is treated as “high”.
Step46: It is examined what proportion (percentage) of the whole score information (i.e., the whole music piece) the phrases having syncopation removed therefrom atstep37 account for. If the proportion is 0 percent, the phrase occupancy is treated as “null”, if the proportion is greater than 0 percent but smaller than 80 percent, the phrase occupancy is treated as “medium”, and if the proportion is more than 80 percent, the phrase occupancy is treated as “high”, atstep45.
Step47: The pitches in the whole score information are smoothed so as to obtain a pitch curve; for example, the pitch curve may be obtained by connecting the pitch of every note with a spline or Bezier curve.
Step48: The volume values in the whole score information are smoothed so as to obtain a strength/weakness curve; for example, the strength/weakness curve may be obtained by connecting the velocity value of every note with a spline or Bezier curve.
Step49: The pitch and strength/weakness curves obtained atsteps47 and48, respectively, are added together and set as an emotional fluctuation curve. Alternatively, the emotional fluctuation curve may be obtained by multiplying or averaging the pitch and strength/weakness curves.
Step4A: A determination is made as to whether the whole score information is melodic or rhythmic. If the tempo value is greater than a predetermined value, the whole score information is determined as rhythmic; otherwise, the whole score information is determined as melodic. Alternatively, if the average value of the duration time is greater than a predetermined value, the whole score information may be determined as melodic; otherwise, the whole score information may be determined as rhythmic.
Atstep15, the results of the analyzing and extracting process are stored into theperformance data memory4 as a composition template. Consequently, a plurality of results of the user's analysis and extraction will be stored into theperformance data memory4. The above-described analyzing and extracting process may be performed for a specific number of music pieces, each representing a different genre, to store the processed results of the musical pieces in advance.
FIG. 5 is a diagram showing exemplary results of the above-described analyzing and extracting process performed on musical characteristics for the whole of an overall music piece, and the processed results are stored in memory in a plurality of items: musical form; general musical motif; general rhythm condition; and pitch condition.
In the musical form block ofFIG. 5 is stored a musical form of the music piece in terms of a passage pattern such as “A—B—C—C′” or “A—A′—B—B′”.
The musical motif block includes a genre storing location, an image music piece storing location, a composer storing location and melodic/rhythmic selection location. In the genre storing location is stored a name of genre of a music piece to be composed. Although “8 beat” is stored in the illustrated example, the genre name to be stored in this location may be “dance and pop music” (rap, Euro-beat or pop ballad), “soul music” (such as dance funk, soul ballad or R & B), “rock music” (such as soft 8 beat, 8 beat or rock'n roll), “jazz music” (such as swing, jazz ballad or jazz bossa nova), “Latin music” (such as bossa nova, samba, rumba, beguine, tango or reggae), “march music”, “enka” (which is a type of Japanese popular song full of melancholy), and “shoka” (which are Japanese songs for schoolchildren).
In the image storing location of the musical motif block ofFIG. 5 is stored a name of a particular music piece that appears similar in musical image to the music piece to be composed. In the composer storing location is stored the name or the like of the composer of the music piece to be composed. In the melody/rhythmic selection location is stored the result ofstep49 of FIG.4. The stored contents in these locations will influence the creation of pitch and rhythm patterns of the music piece to be composed so as to characterize the music piece during automatic composition thereof.
The general rhythm condition block ofFIG. 5 includes a time storing location, a tempo storing location, a shortest note storing block location, a first-beat delay frequency storing location and a syncopation frequency storing location.
In the time storing location is stored the time of the music piece; time “ 4/4” is stored in the illustrated example. In the tempo storing location is stored a tempo of the music piece which is expressed in the form of a metronome mark or speed-indicating characters; in the illustrated example, a metronome mark is stored which indicates 120 quarter-notes per minute. In the shortest note storing location is stored a note having the shortest duration detected atstep43 ofFIG. 4; an eighth note is stored in the illustrated example. In the first- beat delay frequency storing location is stored a frequency (“null”, “medium” or “high”), detected atstep45 ofFIG. 4, at which the first beat is delayed. In the syncopation frequency storing location is stored a frequency of syncopation (“null”, “medium” or “high”), detected atstep46 of FIG.4.
The general pitch condition block ofFIG. 5 includes a pitch range storing location and a musical key storing location. In the pitch range storing location is stored a pitch range, detected atstep41 ofFIG. 4, which is represented in key codes of the highest and lowest pitches in the range; key codes “A2-E4” are stored in the illustrated example. The pitch range stored in this location will influence the creation of a pitch pattern of the music piece during the automatic composition. In the key storing location is stored a musical key, analytically detected atstep12 ofFIG. 1, in its corresponding code; a key “Fm (F minor)” is stored in the illustrated example. The musical key stored in this location will influence the creation of a scale of the music piece during the automatic composition.
FIG. 6 is a diagram showing exemplary results of the musical characteristics analyzing and extracting process which vary with the progression of a music piece. The results are stored in memory in the illustrated format in correspondence with the passages of the musical form of FIG.5. The results represent three major musical characteristics that relate to an emotional fluctuation curve of the whole music piece and pitches and rhythms analyzed and extracted for each of the phrases forming the passages of the music piece.
In an emotional fluctuation block ofFIG. 6, there is stored a curve representing an emotional fluctuation in the whole music piece that is obtained atstep49. The emotional fluctuation curve will influence pitch and rhythm patterns and volume during automatic composition.
Pitch block ofFIG. 6 for storing pitch-related information of the individual phrases in each of the passages includes a pitch pattern storing location, a first/last tone storing location, an activeness/quietness storing location and a contrast/imitate storing location. In the pitch pattern storing location is stored a pitch pattern of each phrase analytically extracted atstep35 of FIG.3. The pitch pattern stored in this location is multiplied by the above-mentioned emotional fluctuation curve so as to influence the emotional rising and falling in the whole music piece.
In the first/last tone storing location are stored the first and last pitches of each phrase, analytically extracted atstep36 ofFIG. 3, in their degrees (I, II, III, IV, V, VI, VII, etc.). In the activeness and quietness storing location are stored a curve representing degrees of activeness and quietness in the whole music piece. The curve representing degrees of activeness and quietness is plotted by connecting, with a spline or Bezier curve, average pitch values, numbers of bouncing and syncopation detected atstep37 ofFIG. 3, average pitch difference values detected atstep34 for the individual phrases, or values obtained by arithmetically processing these values. In the contrast/imitate storing location is stored each passage which is a subject for the contrast/imitate consideration. In the illustrated example, the third and fourth passages “C” and “C′” are approximate or similar to each other, and thus the former half of the contrast/imitate storing location for the fourth passage C′ has a statement “imitating the former half of the third passage C′” and the latter half of the contrast/imitating storing location for the fourth passage C′ has a statement “imitating the latter half of the third passage C′”. Other storing locations than the above-mentioned may be provided as necessary, such as one for storing data that acts to make the pitches resemble the intonation found in the words.
Further, rhythm block ofFIG. 6 includes a denseness/sparseness storing location, a phrase head delay specifying locations, a contrast/imitate storing location and a syncopation specifying location. In the denseness/sparseness storing location is stored a denseness/sparseness pattern of the individual phrases detected atstep38 ofFIG. 3; in the illustrated example, the dense state is shown by a half-tone dot mesh block and the sparse or uniform state is shown by a blank or absence of the half-tone dot mesh block. In the phrase head delay specifying location are stored data indicating presence or absence of a rest at the head of each phrase detected atstep39 ofFIG. 3; the illustrated example shows that there are such delays in the former phrases of the third passage C and fourth passage C′ while there is no such delay in the latter phrases of the third passage C and fourth passage C′. In the contrast/imitate storing location is stored each passage that is a subject for the contrast/imitate consideration, as in the above-mentioned contrast/imitate storing location of the pitch block. Finally, in the syncopation specifying location is stored “absence” or “presence” indicating whether or not syncopation has been removed atstep37 of FIG.3.
Referring back toFIG. 1, a determination is made atstep16 as to whether the editing switch has been turned ON or activated on theoperation panel1A. If the editing switch has been turned ON on theoperation panel1A (YES), theCPU1 executes an automatic composition process ofsteps17 to24; if not (NO), theCPU1 ends the execution of the program. Namely, the activation of the editing switch can cause the electronic musical instrument to operate as the automatic music composing device. Thus, in response to the activation of the editing switch, automatic composition is executed through operations ofsteps17 to24.
When the editing switch is activated to cause the electronic musical instrument to operate as the automatic music composing device, it is necessary for the user to set various musical conditions atstep17 and enter words atstep18. Once the musical conditions are set and the words are entered by the user, theCPU1 executes operations ofsteps19 to23 in accordance with the musical conditions and words and internal musical conditions prestored within the device, so as to automatically compose a music piece. Finally, atstep24, the music piece is completed by the user modifying the automatically composed music piece.
More specifically, atstep17, the user sets the user musical conditions using the GUI (operation panel1A anddisplay1B) to enter data in the individual blocks and locations on the screens as shown inFIGS. 5 and 6 (hereinafter these screens will be called “musical condition setting screens”). Preferably, the musical condition setting screens are provided by reading out one of the plurality of music templates analytically extracted out of an already-composed music piece as shown inFIGS. 5 and 6 to store the read-out music template into a buffer memory, and then using the thus-stored music template. The contents of the buffer-stored music template (FIGS. 5 and 6) may be edited by the user as necessary. Alternatively, the user may create a desired music template (FIGS. 5 and 6) on his own. Atnext step18, the user enters words data on screen as shown inFIG. 7 using the above-mentioned GUI.
FIGS. 7A to7G show exemplary screens for use in entering the words. In the screen ofFIG. 7A, there are shown only passage marks “A” and “B” corresponding to passages set in accordance with the musical form. To the right of the passage marks on the screen, the user sequentially enters words comprising syllable data relating to the words of a music piece to be composed, phrase dividing marks, measure line marks and long vowel marks. The illustrated example assumes that one line of each passage corresponds to four measures.
In order to designate a phrase (a short independent portion of melody line), the user enters space marks (triangle marks “Δ” in the illustrated example) at locations corresponding to phrase-dividing points, as shown in FIG.7B. Such space marks become phrase-dividing marks.
Measure line marks “/” may be entered at each location of a measure line in order to designate a boundary, i.e., division between measures, as shown in FIG.7C. Also, long vowel marks “-” may be entered after predetermined syllable data, as shown in FIG.7D. The note length allocated to the syllable data may be controlled by entering a plurality of the long vowel marks in succession.
Further, accent marks “.” may be added to each appropriate syllable data. The pitch and velocity of each syllable data with the accent mark will be set slightly higher than other syllable data during a subsequent automatic composition. The intonation of the syllable data may be entered in a broken line, as shown in FIG.7F. Further, the syllable data located at each climax portion of the music piece may be designated in a half-tone dot mesh block, as shown in FIG.7G.
While the entry of the syllable data and the setting of the phrase dividing marks are essential to this embodiment, the entry of the measure line marks “/”, long vowel marks “-” accent marks “.” and intonation and climax indications is optional, i.e., may be made only when the user thinks they are necessary. Also, divisions between syllables and rhyming points may be set as needed.
The thus-entered words data are stored into a words memory area within the workingmemory3.FIG. 8A shows an exemplary stored format of Japanese words data corresponding toFIGS. 7D to7G. Namely, the words data, such as the syllable data, measure line marks, phrase dividing marks and long vowel marks, entered in the manner shown inFIG. 7D are sequentially stored at consecutive addresses as shown in FIG.8A. In the illustrated example, measure line mark “/” is stored at address “1”, syllable data “ha” at address “2”, long vowel mark “-” at address “3”, syllable data “ru” at address “4”, and so on.
At each address location for the syllable data having the accent mark attached thereto as shown inFIG. 7E, data “1” is stored which indicates presence of an accent, whereas at each address location for the syllable data having no accent mark attached thereto, data “0” is stored which indicates absence of an accent.
Further, at each address location for the syllable data having intonation imparted thereto as shown inFIG. 7F, one of data “H”, “M” and “L” standing for high, medium and low, respectively, is stored which corresponds to the intonation-indicating beat line. At each address location for the syllable data designated as part of a climax portion as shown inFIG. 7G, data “1” is stored. Although data “1” indicating the climax portion designation is not shown inFIG. 8A, data “1” is present in the syllable data “bo ku no to mo da/chi -”.
Once the user's setting of the musical conditions and entry of the words data are completed, theCPU1 executes operations ofsteps19 to23 in accordance with the user musical conditions and words data and internal musical conditions prestored within the electronic musical instrument, so as to automatically compose a music piece. The internal musical conditions prestored within the electronic musical instrument include those that act to present genre-specific or composer-specific characteristics, that act to make rhythm patterns easy to sing, that act to make pitch patterns easy to sing, that act to raise pitches and increase note lengths to achieve a tone jump, and that act to make pitch patterns and rhythm patterns resemble each other in rhyming points.
Referring back toFIG. 1, atstep19, theCPU1 executes a measure division setting process on the basis of the words data entered in the above-mentioned manner. While the entry of the syllable data and the setting of the phrase dividing marks are absolutely necessary in the embodiment, the entry of the other words data (measure line marks “/”, ling sound marks “-”, accent marks “.” and intonation and climax indications) are optional or may be made only when the user thinks they are necessary. Thus, atstep19, a process is executed for dividing all syllable data of a single phrase into at least two measures on the basis of the entered words data.FIGS. 9 and 10 show details of the measure division setting process, which is performed in the following step sequence.
Step91: The phrase number register FN is set to a value of “1”.
Step92: From the words memory, all the words data are read out which form a phrase of the phrase number designated by the phrase number register FN. In the case of the words memory shown inFIG. 8A,15 words data from the measure line mark “/” residing at address “1” to the measure line mark “/” residing at address “15” are read out as the words data for phrase number “1”.
Step93: The number of the words data read out at the precedingstep92 for the phrase of phrase number “1” is stored into a number-of-data register SN.
Step94: A variable register C is set to a value of “1”.
Step95: The “C”th words data corresponding to the set value in the variable register C is read out.
Step96: A determination is made as to whether the words data read out at precedingstep95 is a measure line mark “/”. If the read-out words data is a measure line mark “/” (YES), theCPU1 moves to step97; otherwise, theCPU1 moves to step98.
Step97: Because a measure line position is designated by the user, the address location for the measure line mark “/” is determined as a measure division point.
Step98: A determination is made as to whether the words data read out atstep95 is a long vowel mark “-”. If the read-out words data is a long vowel mark “-” (YES), theCPU1 moves to step99, otherwise, theCPU1 moves to step9A.
Step99: The data immediately before the words data (syllable data) preceding the read-out long vowel mark “-” is determined as a candidate for measure division.
Step9A: A determination is made as to whether any accent is designated for the words data (syllable data) read out atstep95. If answered in the affirmative, theCPU1 goes to step9B, but if no accent is designated for the read-out words data, theCPU1 proceeds to step9C.
Step9B: The data immediately before the read-out words data having the accent is determined as a measure division candidate.
Step9C: The variable register C is incremented by one in order to read out next words data.
Step9D: A determination is made as to whether the incremented value of the variable register C is greater than the value of the number-of-data register SN. If the incremented value of the variable register C is greater (YES), this means that readout of all the words data of the phrase has been completed, so that theCPU1 moves to step101 of FIG.10. If, however, the incremented value of the variable register C is not greater than the value of the number-of-data register SN, this means that the phrase has further words data to be read out, and hence theCPU1 reverts to step95 ofFIG. 9 so as to repeat the above-described operations for next words data.
Step101: Because this embodiment assumes that each phrase consists of two measures, it is determined whether there exit two or more measure line marks “/”. If two or more measure line marks exist (YES), theCPU1 jumps to step107, but if there exits no or only one measure line mark (NO), theCPU1 performs operations ofsteps102 to106 so as to determine a measure line.
Step102: Now that there exits no or only one measure line mark as determined atstep101, theCPU1 goes to step103 if only one measure line mark exits, but goes to step104 if no measure line mark exits.
Step103: Now that only one measure line mark exits in the phrase as determined at precedingstep102, if there are two or more measure line candidates determined atstep99 or9B, one of the candidates is selected randomly, so as to finally determine the one measure division point determined from the measure line mark “/” and the randomly selected candidate as two measure line locations. If there exits only one candidate for measure division point, the candidate is determined as a measure line location. If there exits no measure line candidate, one of the divisions between the syllable data is selected randomly and set as a measure line location.
Step104: Now that precedingstep102 has ascertained that no measure line mark “/” exists in the phrase, it is further determined whether there are two or more measure line candidates determined atstep99 or9B. With an affirmative determination, theCPU1 goes to step105, but if there is no such a candidate, theCPU1 proceeds to step106.
Step105: Now that it has been determined thathere are two or more measure line candidates in the phrase with no measure line mark existing therein, the first and last ones of the candidates are determined as measure line locations.
Step106: If only one measure line candidate exists in the phrase, this candidate and one division randomly selected from among the divisions between the syllable data are determined as measure line locations. If, however, no measure line candidate exists in the phrase, two divisions randomly selected from among the divisions between the syllable data are determined as measure line locations.
Step107: Measure line marks are inserted at the two measure line locations determined by the operation of one ofsteps103,105 and107.
Step108: A determination is made as to whether the stored value in the phrase number register FN has reached the phrase number of the last phrase. If answered in the affirmative, theCPU1 returns to end this measure division setting process, but if the stored value of the phrase number register FN has not reached the last phrase number, theCPU1 branches to step109.
Step109: Now that the last phrase number has not been reached as determined at precedingstep108, the value of the phrase number register FN is incremented by one, and theCPU1 reverts to step92 ofFIG. 9 so as to repeat the above-described operations for a next phrase.
Upon completion of the above-described measure division setting process ofstep19, theCPU1 proceeds to step20 ofFIG. 1 to execute a process for determining beats of the first and last syllables of each phrase.FIGS. 11 and 12 show details of the beat setting process, which is performed in the following step sequence.
Step111: The phrase number register FN is set to a value of “1”.
Step112: From the words memory, all the words data are read out which form a phrase of the phrase number designated by the phrase number register FN.
Step113: A determination is made as to whether there is an indication, in the rhythm pattern contrast/imitate row on the musical condition setting screen shown inFIG. 6, to imitate a rhythm pattern. If there is such an indication (YES), theCPU1 goes to step114; otherwise, theCPU1 proceeds to step115.
Step114: Now that there is the indication to imitate a rhythm pattern as defined at precedingstep113, the first beat of a phrase to be imitated is determined as the first beat of the phrase in question.
Step115: A determination is made as to whether there is an indication, in the phrase head delay specifying location on the musical condition setting screen shown inFIG. 6, to effect a delay at the head of the phrase. If there is such an indication (YES), theCPU1 goes to step116; otherwise, theCPU1 proceeds to step120 of FIG.12.
Step116: Now that there is the indication to effect a delay at the head of the phrase as defined at precedingstep115, it is further determined here whether “NULL” is indicated in the first-beat delay frequency storing location on the musical condition setting screen for the whole music piece of FIG.5. If “NULL” is indicated in the first-beat delay frequency specifying location (YES), theCPU1 moves to step120 ofFIG. 12, but if “MEDIUM” or “HIGH” is indicated (NO), then theCPU1 proceeds to step117.
Step117: Now that the first beat delay frequency is “MEDIUM” or “HIGH” as determined atstep116, it is further determined whether the first beat delay frequency is “HIGH” and also a random number generator (which randomly generates values from “0” to “99”) is currently generating a random number value not less than “20” If answered in the affirmative, theCPU1 goes to step119, but if answered in the negative, theCPU1 proceeds to step118. Thus, when the first beat delay frequency is “HIGH”, an affirmative determination is yielded at this step with a probability of 80 percent.
Step118: Now that a negative determination has been yielded at precedingstep117, it is further determined here whether the first beat delay frequency is “MEDIUM” and also the random number generator is currently generating a random number value not less than “50”. If answered in the affirmative, theCPU1 goes to step119, but if answered in the negative, theCPU1 proceeds to step120 of FIG.12. Thus, when the first beat delay frequency is “MEDIUM”, an affirmative determination is yielded at this step with a probability of 50 percent.
In this way, whether or not the first beat of the phrase in question should be delayed can be decided depending on the delay frequency “HIGH” or “MEDIUM”. The above-mentioned values “20” and “50” are only illustrative, and the user may of course optionally set other values for the same purpose.
Step119: Because of an affirmative determination at precedingstep117 or118, former and latter halves (hereinafter called a “top” and “bottom”) of each beat, except for the top of the first beat, are determined randomly in order to delay the first beat of the phrase.
Step120: Because there is no instruction to delay the phrase head as determined atstep115 and the phrase delay frequency is “NULL” as determined atstep116, or because a negative determination has been yielded atstep117 or118, a further determination is made as to whether there is any unallocated (undetermined) beat of the preceding phrase. If answered in the affirmative, theCPU1 goes to step122, but if answered in the negative, theCPU1 proceeds to step121.
Step121: Now that the phrase delay frequency is “NULL” as determined atstep116 and there is no unallocated beat of the preceding phrase as determined atstep120, the top of the first beat is determined as beat timing.
Step122: Becausestep120 has determined that there is some unallocated beat of the preceding phrase although the phrase delay frequency is “NULL” as determined atstep116, beat timing is randomly determined within a range from the first to fourth beats of the phrase in question including the unallocated beat.
Step123: Now that the first syllable beat has been set in the above-mentioned manner, this step determines the last syllable beat of the phrase in correspondence with the setting of the first syllable beat. Namely, beat timing to be occupied by the last syllable beat is set in such a manner to correspond to the unallocated beat(s) in the measure in which the first syllable of the phrase resides. For example, if the initial beat timing in the measure where the first syllable resides is at the bottom of the third beat, this means that beats up to the top of the third beat are unallocated, so that the last syllable beat timing is determined to occupy up to the top of the third beat in the succeeding measure; if the initial beat timing in the measure where the first syllable resides is at the top of the third beat, this means that beats up to the bottom of the second beat are unallocated, so that the last syllable beat timing is determined to occupy up to the top of the second beat in the succeeding measure.
Step124: The thus-determined beats of the first and last syllables are stored at the address locations of the corresponding syllable data in the words memory.
Step125: A determination is made as to whether the stored value in the phrase number register FN has reached the last phrase number. If answered in the affirmative, theCPU1 returns to end this beat setting process, but if the stored value of the phrase number register FN has not reached the last phrase number, theCPU1 branches to step126.
Step126: Now that the stored value of the phrase number register FN has not reached the last phrase number as determined at precedingstep125, the value of the phrase number register FN is incremented by one, and theCPU1 reverts to step112 ofFIG. 11 so as to execute the above-described beat determining process for a next phrase.
FIG. 13 shows examples of beats determined by the beat determining process. Example 1 shows a case where words data forming a phrase correspond to “/ha-ru o a i su ru/hi to wa-” ofFIG. 7D, the first syllable is set as the top of the first beat by the operation ofstep121, and the last syllable is set as the bottom of the fourth beat by the operation ofstep123.Candidate1 of example2 shows a case where words data forming a phrase are “ha ru/o a i su ru/hi to wa”, the first syllable is set as the bottom of the fourth beat by the operation ofstep119 or122, and the last syllable is set as the bottom of the third beat by the operation ofstep123.Candidate2 of example2 shows a case where the first syllable is set as the bottom of the third beat by the operation ofstep119 or122, and the last syllable is set as the top of the third beat by the operation ofstep123.Candidate3 of example 2 shows a case where the first syllable is set as the top of the third beat by the operation ofstep119 or122, and the last syllable is set as the bottom of the second beat by the operation ofstep123.
Once the beats of the first and last syllables have been set in the above-mentioned manner, theCPU1 next executes a rhythm pattern generating process ofstep21.FIG. 14 shows details of the pattern generating process which is performed in the following step sequence.
Step141: The phrase number register FN is set to a value of “1”.
Step142: From the words memory, all the words data are read out which form a phrase of the phrase number designated by the phrase number register FN.
Step143: Priority for allocating notes, i.e., beat priority is determined on the basis of occurrence frequency at the individual tone generating timing within the phrase according to the musical conditions chosen or set as shown in FIG.6. Namely,step143 creates a beat priority setting table as shown in FIG.15 and sets tone generation timing of each syllable. Specifically, occurrence frequency for frequency-related items (more-importance-to-beat, denseness/sparseness condition and contrast/imitate) is allotted to the top and bottom of beats forming each measure in the beat priority setting table.FIG. 15A shows an example of the beat priority setting table corresponding tocandidate1 of example 1 shown in FIG.13. Because the first and last syllables of the phrase fall at the top of the first beat and the bottom of the fourth beat, respectively, and the total number of measures in the phrase is “2”, the beat priority setting table is created to cover a range from the top of the first beat in the first measure to the bottom of the fourth beat in the second measure as shown in FIG.15A.
In the “more-importance-to-beat” location or row of the beat priority setting table, there is used frequencies of weight value “1” that is preset in accordance with the genre. InFIG. 15A, the frequencies of the more-importance-to-beat are “8” at the top of the first beat, “4” at the bottom of the first beat, “6” at the top of the second beat, “2” at the bottom of the second beat, “7” at the top of the third beat, “3” at the bottom of the third beat, “5” at the top of the fourth beat, and “1” at the bottom of the fourth beat, respectively. Each of the more-importance-to-beat values at the top and bottom of the beats is multiplied by the weight value “1” and added to a total frequency. The more-importance-to-beat frequency values may be set optionally by the user.
In the “denseness/sparseness” condition row, flag values are set at the locations of the top and bottom of the beats corresponding to the denseness/sparseness chosen or set on the musical condition setting screen shown inFIG. 6. A weight value “4” is applied to the denseness/sparseness conditions. For example, because in the example ofFIG. 6, the former halves of the first and second measures in passage A are set to the dense state while the latter halves of these measures are set to the sparse state, flag value “1” is set for the former halves (that is, the top and bottom of the first and second beats) of the first and second measures on the beat priority setting table. Weight value “4” is added to the total frequency values of the top and bottom of the beats for which the flag values are set. Reffering more specifically to the “denseness/sparseness” storing location in the illustration ofFIG. 6, the upper of the two rows indicates whether first and second measures of each phrase are in the dense or sparse condition, and the lower row indicates whether third and fourth measures of each measure are in the dense or sparse condition. For the dense condition, an appropriate display is made to show a degree of such a dense condition in notes.
In the “contrast/imitate” row, flag values are set at the locations of the top and bottom of the beats corresponding to the rhythm pattern detected atstep37 of FIG.3. When any passage to be imitated is designated on the musical condition setting screen shown inFIG. 6, that designated passage itself is set here. A weight value for the contrast/imitate is “4”. For example, none of passages A, B and C is to be contrasted/imitated inFIG. 6, and hence flag values are set on the beat priority setting table at the locations corresponding to the rhythm pattern detected atstep37; however, no flag value is set inFIG. 15A because it corresponds to the musical condition setting screen created by the user. Thus, in the case where the musical condition setting screen is based on the analysis and extraction of an already-composed music piece or where the passage limitation is set in the “contrast/imitate” row, a flag value “1” is set at each note position of the passage to be imitated. Weight value “4” is added to the total frequency values of the top and bottom of the beats for which the flag values are set in the contrast/imitate row.
In the “total frequency” row is stored a total of the frequency values of the above-mentioned “more-importance-to-heat”, “denseness/sparseness” and “contrast/imitate” rows for the top and bottom of each relevant beat. In the illustrated example, the total frequency for the top of the first beat is “12” which is a sum of “8” representing the “more-importance-to-beat” frequency value and “4” representing the “denseness/sparseness” condition. The total frequencies for the bottom of the first beat, top of the second beat, bottom of the second beat, top of the third beat, bottom of the third beat, top of the fourth beat and bottom of the fourth beat are “8”, “10 ”, “6”, “7”, “3”, “5” and “1”, respectively.
Finally, in a “measure-by-measure priority” row, priority numbers are allocated, in descending order of the total frequency, to the top and bottom of individual beats in each relevant measure. If the total frequency values are the same, the earlier has priority over the later. In the illustrated example ofFIG. 15A, both of the first and second measures have the same priority ordering; that is, the top and bottom of the first beat has priority numbers “1” and “3”, respectively, the top and bottom of the second beat have priority numbers “2” and “5”, respectively, the top and bottom of the third beat have priority numbers “4” and “7”, respectively, and the top and bottom of the fourth beat have priority numbers “6” and “8”.
FIG. 15B shows another example of the beat priority setting table corresponding tocandidate3 of example 2 shown in FIG.13. Because incandidate3 of example 2, the first and last syllables of the phrase fall at the top of the third beat and bottom of the second beat, respectively, and the total number of measures in the phrase is “2”, the beat priority setting table is created to cover a range from the top of the third beat in the first measure to the bottom of the second beat in the third measure as shown in FIG.15B.
In the “more-importance-to-beat”, “denseness/sparseness” and “contrast/imitate” rows, frequency values set for the top of the third beat in the first measure to the bottom of the second beat in the third measure are the same as in the above-described example of FIG.15A. In a “measure-by-measure priority” row, priority numbers are allocated, in descending order of the total frequency, to the top and bottom of individual beats in each relevant measure. Thus, in the first measure ofFIG. 15B, the top and bottom of the third beat have priority numbers “1” and “3”, respectively, and the top and bottom of the fourth beat have priority numbers “2” and “4”, respectively. In the second measure, the top and bottom of the first beat have priority numbers “1” and “3”, respectively, the top and bottom of the second beat have priority numbers “2” and “5”, respectively, the top and bottom of the third beat have priority numbers “4” and “7”, respectively, and the top and bottom of the fourth beat have priority numbers “6” and “8”, respectively. In the third measure, the top and bottom of the first beat have priority numbers “1” and “3”, respectively, and the top and bottom of the second beat have priority numbers “2” and “4”, respectively.
Step144: Tone generation timing of each syllable is determined in accordance with the thus-created beat priority setting table and the number of syllables in the phrase in question. If the read-out words data is a long vowel mark “-”, the allocation of tone generation timing is inhibited over the first to fourth sections following the syllable data immediately before the read-out mark “-”, depending on the number of syllables in the phrase.
For example, according to the beat priority setting table as shown inFIG. 15A, the number of syllables in the first measure is “7”, and thus tone generation timing is allocated to sections in the measure having priority numbers “1” to “7” In this case, the allocation of tone generation timing is inhibited for a single section following the syllables data “ha” immediately before the long vowel mark “-”, so that tone generation timing is set to the section, except for mark “-” of priority number “3”, having priority numbers “1”, “2” and “4” to “8”. The second measure has three syllable data and includes one long vowel mark “-”, so that tone generation timing is set to the sections having priority numbers “1” to “3”.
Further, according to the beat priority setting table as shown inFIG. 15B, the first measure has two syllable data and includes one long vowel mark “-”, so that tone generation timing is set to the section having priority numbers “1” and “2”. The second measure has five syllable data with no long vowel mark “-”, so that tone generation timing is set to the sections having priority numbers “1” to “5”. The third measure has three syllable data and includes one long vowel mark “-”, so that tone generation timing is set to the sections having priority numbers “1” to “3”.
Step145: Note length of each syllable data is determined on the basis of the tone generation timing determined at precedingstep144. A rest is also inserted as needed. The rest inserting frequency will vary depending on which of “MELODIC” and “RHYTHMIC” is selected on the musical condition setting screen of FIG.5.
For example, according to the beat priority setting table as shown inFIG. 15A, the first syllable “ha” in the first measure is set to the length of a quarter note while including section having no tone generation timing allocated thereto, and each of the second syllable “ru” to seventh syllable “ru” is set to the length of an eighth note. The first syllable “hi” and second syllable “to” in the second measure are both set to the length of an eighth note. The third syllable “ha” in the second measure, as combined with the sections (first to fourth sections) having no tone generation timing allocated thereto, is set to the length of a half note; this third syllable “ha” may have a variable length ranging from the quarter note length to the half note length depending on a rest inserting state.
According to the beat priority setting table as shown inFIG. 15B, the first syllable “ha” and second syllable “ru” in the first measure are both set to the length of a quarter note, each of the first syllable “o” to fourth syllable “su” in the second measure is set to the length of an eighth note, and the fifth syllable “ru” is set to the length of a quarter note; this fifth syllable “ru” may have a variable length ranging from the quarter note length to the half note length depending on a rest inserting state. The first syllable “hi” and second syllable “to” in the third measure are both set to the length of an eighth note, and the third syllable “ha” as combined with the sections (first to fourth sections) having no tone generation timing allocated thereto is set to the length of a half note; this third syllable “ha” may have a variable length ranging from the quarter note length to the dotted half note length depending on a rest inserting state.
Step146: The rhythm pattern determined by the operation of precedingstep145 is stored into a music piece memory. That is, the note lengths of the syllable data set atstep145 are stored, as duration data, into a music piece memory area within the workingmemory3.FIG. 8B shows a data storage format, in the music piece memory, of the rhythm pattern that has been set, on the basis of the words data in the words memory ofFIG. 8A, according to the beat priority setting table as shown in FIG.15A. That is, the stored contents of the words memory ofFIG. 8A are converted to those of FIG.8B through the rhythm pattern generating process of FIG.14. The music piece memory ofFIG. 8B contains the syllable data and measure line marks extracted from the words memory ofFIG. 8A, as well as note lengths or duration data that have been set with respect to the extracted syllable data through the rhythm pattern generating process of FIG.14. In practice, numerical values corresponding to the note lengths or duration are stored, although the duration data are represented in notes in FIG.8B. Further, pitch data, velocity data, volume data, etc. are set with respect to the syllable data and stored into the music piece memory through processes as will be later described in detail.
Step147: A determination is made as to whether the stored value in the phrase number register FN has reached the last phrase number. If answered in the affirmative, theCPU1 returns to end this rhythm generating process, but if the stored value of the phrase number register FN has not reached the last phrase number, theCPU1 branches to step148.
Step148: Now that the stored value of the phrase number register FN has not reached the last phrase number as determined at precedingstep147, the value of the phrase number register FN is incremented at one, and theCPU1 reverts to step142 ofFIG. 14 so as to execute the above-described rhythm generating process for a next phrase.
Once a rhythm pattern has been set in the above-mentioned manner, theCPU1 next executes a pitch pattern generating process ofstep22 of FIG.1.FIG. 16 shows details of the pitch generating process which is performed in the following step sequence.
Step161: The phrase number register FN is set to a value of “1”.
Step162: From the words memory, all the words data are read out which form a phrase of the phrase number designated by the phrase number register FN.
Step163: The number of the read-out syllable data is stored into the number-of-data register SN.
Step164: Tone pitches are determined for the first and last syllables of the phrase designated by the phrase number register FN. That is, when degrees (I, II, III, IV, V, VI, VII) are designated in the first and last tones location of the musical condition setting screen shown inFIG. 6, tone pitches corresponding to the designated degrees are determined. When such degrees are not designated in the “first and last tones” location of the musical condition setting screen, tone pitches are set on the basis of the “emotional fluctuation” location of the musical condition setting screen shown in FIG.6. However, the first tone pitch in the music piece is selected from among tonic chord components. Although not specifically shown in the musical condition setting screen ofFIG. 6, the first tone pitch in each phrase may be set on the basis of a pitch of a specific tone by designating a link with the first or last tone in the preceding phrase.
Now that tone pitches have been set atstep164 for the first and last syllables of the phrase, operations ofsteps165 to167 are performed to determine a pitch for each remaining syllable in the phrase.
Step165: A determination is made as to whether any pitch pattern is designated in the “phrase pitch pattern” location of the musical condition setting screen shown in FIG.6. If answered in the affirmative, theCPU1 jumps to step167; otherwise, theCPU1 goes to step166.
Step166: Now that no pitch pattern is designated in the phrase pitch pattern location as determined at precedingstep165, one of different pitch patterns ofFIG. 17 is selected which is closest to the graphic pattern shown in the emotional fluctuation row of the musical condition setting screen shown in FIG.6. InFIG. 17 there are a total of 16 different pitch patterns, which are classified into four major types: pitch patterns (A) to (C) represent linear melody; pitch patterns (D) to (L) represent wave-like melody; pitch patterns (M) and (N) represent quickly moving melody; and pitch patterns (P) and (Q) represent harmonic melody. Of course, various other pitch patterns may be provided. New pitch patterns may be created by sampling curves written by the user with a touch pen or the like.
Step167: Tone pitches are set for (SN−2) syllables other than the first and last syllables on the basis of the templates selected atstep165 or166. For example, in the case where the number of syllables is “9” and a pitch pattern as shown inFIG. 18 is specified, tone pitches set, by use of the pitch patter, for the second to eighth syllables. Because tone pitches for the first and last syllables have already been set atstep164 as degrees I and I+1, this step allocates the second to eighth syllables, other than the first and last syllables, uniformly to the pitch pattern and quantize them to the respective closest degrees so as to set a scale. Thus, in the case ofFIG. 18, the second, fourth and seventh syllables are set to degree IV, the third syllable to degree V, the fifth and sixth syllables to degree III, and the eighth syllable to degree VI.
When the syllables other than the first and last are allocated uniformly on a template, they may sometimes not resemble the shape of the pitch pattern. More specifically, in such a case where the number of syllables is “6” as shown inFIG. 19, a pitch pattern as shown in (A) ofFIG. 19 is specified, if the four syllables other than the first and last are allocated uniformly on the template, the allocated shape of the syllables will resemble the shape of the original template. However, where the number of syllables is “5” and the three syllables other than the first and last are allocated uniformly on the same template, the allocated shape of the syllables will not resemble the shape of the original template as shown in (B) in FIG.19. So, in such a case, the respective allocated positions of the second and third syllables are slightly displaced forward in such a manner that the forward portion of the allocated shape resembles the corresponding portion of the template shape as detected at acurve17C. The syllables to be thus displaced in their allocated positions and direction of the displacement may be calculated using arithmetic operations based, for example, on the least squares method.
Instead of allocating the syllables uniformly on the template, sampling may be conducted as shown in (D) ofFIG. 19 in accordance with the rhythm pattern generated atstep21. Also in this case, the allocated position of any of the syllables may be displaced if the allocated shape does not resemble the original template.
Amplitude levels in the pitch pattern are set depending, for example, on the activeness/quietness pattern set in the “activeness/quietness” location of the musical condition setting screen shown inFIG. 6 or on the climax portion of the syllable data indicated in the half-tone dot mesh block of FIG.7G. In the pitch pattern ofFIG. 18, the upper amplitude dead point is degree V and the lower amplitude dead point is degree III, but if the activeness/quietness pattern represents activeness or a climax is set in that portion, the amplitude levels will increase in that portion and the upper and lower amplitude dead points will change to degrees VII and I. Conversely, if the activeness/quietness pattern represents quietness, the amplitude levels will decrease.
Referring back toFIG. 1, atstep23, velocity values are set in accordance with the accent marks “.” attached to predetermined places near selected syllable data as shown inFIG. 7E, and the thus-set velocity values are reflected in the velocity of the corresponding syllable data in the music piece memory as shown in FIG.8B. In the illustrated example ofFIG. 8B, the velocity value set for each syllable data having the accent mark “.” attached thereto is “5” while the velocity value set for each syllable data having no accent mark “.” attached thereto is “4”. Volume value is set in accordance with the emotional fluctuation curve for the whole music piece that is set via the musical condition setting screen shown inFIG. 6, and the thus-set velocity values are reflected in the velocity of the corresponding syllable data in the music piece memory as shown in FIG.8B. In the illustrated example ofFIG. 8B, the volume value set for each syllable data in accordance with the emotional fluctuation curve is “5”.
Step24 executes an operation for the user to manually modify the music piece composed by theCPU1 through the operations ofsteps19 to23. At this step, the data of the automatically composed music piece are read out from the music piece memory and visually presented on thedisplay1B. Then, operations are performed to modify the rhythms and pitches within each phrase and throughout the music piece, so as to modify the music piece data as needed; for example, connections between the phrases may be modified to facilitate singing of the music piece. If a phrase is to long, a breathing pause may be inserted. Portions of the music piece where high-pitched tones last too long and where an abrupt rhythm change occurs may also be modified. The user preferably effects modifications by actually listening to the playing of the music piece to check to see whether the music piece has too many disjunct motions, has good musical consistency, etc. The music piece data having been manually modified in this way are stored back into the music piece memory.
A succession of the operations ofsteps17 to24 described above permits automatic composition of a music piece corresponding to words designated by the user.
Whereas the preferred embodiment has been described above in relation to the case where musical conditions are set by the user, an already-composed music piece may be analyzed to extract its musical conditions, or the extracted musical condition may be modified by the user.
Further, although the preferred embodiment has been described above in relation to the case where syllable data are in Japanese, it should be obvious that the present invention is also applicable to syllable data in any other languages. In such a case, syllables may be analyzed and determined, from entered words information, on the basis of phonetic symbols such as monophthong, diphthong, explosive, nasal, double consonant and fricative consonant, so that a music piece can be composed on the basis of such determined syllable information in a similar manner to the above-mentioned. In a simpler form, the user may enter the syllable information in the form of scat. For example, words as shown inFIG. 20A may be entered in scat as shown inFIG. 20B, where “D” represents each scat syllable, “-” indicates a long vowel, and “/” a phrase end or division. By thus using scat syllable information “D” and long vowel indicating information “-” to enter syllable information corresponding to desired words, the present music composing scheme should be practiced very easily even by users in non-syllabic-language spoken countries.
Furthermore, although the preferred embodiment has been described above as setting the denseness/sparseness and contrast/imitate conditions by just selecting between denseness and sparseness and whether or not to effect the contrast/imitate, such denseness/sparseness and contrast/imitate conditions may be set by designating their values. In such a case, numerical values in the denseness/sparseness and contrast/imitate rows on the beat priority setting table ofFIG. 15 may be within a range from “1” to “4” corresponding to the degrees.
The first aspect of the present invention achieves the benefit that a music piece can be automatically Composed in proper consistency with already-created words.
The second aspect of the present invention achieves the benefit that when automatically composing a music piece by analyzing a melody of an original music piece, proper modifications can be made to the analyzed results so that the music piece can be automatically composed easily as contemplated by a user.