Key determination device, method and program
The key determination device addresses inaccurate key determination in modulated songs by using both melody and chords, with trichord and tetrachord analysis and embroidery sound exclusion, achieving accurate key determination across genres and skill levels.
Patent Information
- Application Number
- JP2023097373
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-06-14
- Publication Date
- 2024-12-26
AI Technical Summary
Conventional key determination methods based on chords or melody alone are inadequate for songs where the melody is modulated, leading to inaccurate key determination.
A key determination device that simultaneously determines the key from both melody and chords, using a key relationship table to prioritize between the two results, incorporating trichord and tetrachord analysis for melody and embroidery sound exclusion.
Accurately determines the key in complex songs by considering both melody and chords, correcting for modulation and excluding non-scale notes, suitable for various genres and skill levels.
Smart Images

Figure 2024178957000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to a tone determination device, method, and program. [Background technology]
[0002] Conventionally, products have been developed that display computer graphics in accordance with a piece of music played by a performer on, for example, an electronic piano, to produce visual effects that match the piece of music (for example, Patent Document 1). Such products require a technology that determines the key of the piece of music being played in real time.
[0003] In the conventional technology, a determination process is executed based on the result of determining whether or not the notes performed in real time constitute a chord, either determining the key from the chord or determining the key from the melody. [Prior art documents] [Patent documents]
[0004] [Patent Document 1] JP 2020-144346 A Summary of the Invention [Problem to be solved by the invention]
[0005] However, in the above conventional technology, depending on the piece of music being played, there are cases where the chords are simple but the melody is modulated, and such chord progressions cannot be picked up by determining the key only from the chords. In other words, in the case of a piece of music other than those suitable for determining the key only from the chords or the melody, there was a problem that determining the key only from either one of them does not work well. [Means for solving the problem]
[0006] A key determination device in one embodiment executes a key determination process that determines a melody to be a first key based on a melody included in input data, a key determination process that determines a chord to be a second key based on a chord included in the input data, and a key determination result output process that references a key relationship table and outputs either the first key or the second key as a key determination result for the input data. Effect of the Invention
[0007] According to the present invention, it is possible to perform good tone determination. [Brief description of the drawings]
[0008] [Figure 1] 1 is an external view of an electronic keyboard instrument in which an embodiment of a key determination device is mounted; [Diagram 2] 1 is a block diagram showing an example of the configuration of system hardware of an electronic keyboard instrument in which an embodiment of a key determination device is installed. [Diagram 3] 4 is a main flowchart showing an example of the overall processing of the electronic keyboard instrument. [Figure 4] FIG. 1A is a key relation table, and FIG. 1B is a diagram showing an example of a key-by-key tetrachord constituent note table showing the key scale note configuration of a tetrachord for each key in the major key scale. [Diagram 5] FIG. 1A is a diagram showing an example of a key-by-key trichord constituent note table showing the key scale note configuration of a trichord for each key in the major key scale, and FIG. 1B is a diagram showing an example of a key-by-key trichord constituent note table showing the key scale note configuration of a trichord for each key in the minor key scale. [Figure 6] 13 is a flowchart showing a detailed example of a key determination process. [Figure 7] 13 is a flowchart showing a detailed example of a key determination process from a melody. [Figure 8] 13 is a flowchart showing a detailed example of a trichord determination process and a tetrachord determination process. [Figure 9] 13 is a flowchart showing a detailed example of an embroidery sound deletion process. [Figure 10] FIG. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0009] DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, an embodiment of the present invention (hereinafter referred to as "the present embodiment") will be described in detail with reference to the drawings.
[0010] In this embodiment, instead of selectively executing the key determination process from the melody and the key determination process from the chord, both are executed in parallel to output the first key and the second key, respectively, and the key relationship between the first key and the second key is determined by referring to a key relationship table described later with reference to Fig. 4(a), and the current key determination result is output with priority given to either the first key or the second key according to the determined key relationship. In this way, by considering both the first key, which is the result of the key determination process from the melody, and the second key, which is the result of the key determination process from the chord, in parallel, it is possible to obtain a more accurate key determination result regardless of the performance style, difficulty of the performance, music genre, etc.
[0011] In addition, in this embodiment, in the key determination process from the melody, a trichord determination process is performed to determine the key to which a tritone sequence of melody notes in the musical sound data belongs as the first key based on the tritone sequence of the melody notes in the musical sound data, and a tetrachord determination process is performed to determine the key to which a quadruple sequence of melody notes in the musical sound data belongs as the first key based on the quadruple sequence of the melody notes in the musical sound data. This process makes it possible to perform more accurate key determination based on the melody in the musical sound data.
[0012] FIG. 1 is an external view of an electronic keyboard instrument 100 on which an embodiment of a key determination device is mounted. The electronic keyboard instrument 100 is, for example, an electronic piano, and includes at least a keyboard 101, a liquid crystal display 102, and a group of switches 103. The electronic keyboard instrument 100 also includes a speaker on the rear, side, or back of the housing. In the electronic keyboard instrument 100, computer graphics can be displayed on the liquid crystal display 102 in accordance with the music played by the performer using the keyboard 101, to produce visual effects that match the music. The group of switches 103 includes various switches that turn the power of the electronic keyboard instrument 100 on and off, adjust the volume, and specify the tone color of the musical sound output. Although not shown in particular, the electronic keyboard instrument 100 may also include switches for adding performance effects, bend wheels, pedals, and the like.
[0013] Fig. 2 is a block diagram showing an example of the hardware configuration of a control system 200 of the electronic keyboard instrument 100 of Fig. 1 in which an embodiment of the key determination device is installed. In the control system 200, a CPU (processor) 201, a ROM (read only memory) 202, a RAM (random access memory) 203, a sound source LSI (large scale integrated circuit) 204, a key scanner 205 to which the keyboard 101 is connected, a display controller 206 to which the liquid crystal display 102 is connected, an I / O (input / output) controller 207 to which a group of switches 103 is connected, and a Bluetooth MIDI & AUDIO interface 208 for importing musical sound data having a musical sound format such as MIDI (Musical Instrument Digital Interface) and music (audio) data from an external device by, for example, Bluetooth (registered trademark) wireless communication are each connected to a system bus 212. Furthermore, a D / A converter 209, an amplifier 210, and a speaker 211 are sequentially connected to the output side of the sound source LSI 204. In addition, although not specifically shown, a video interface for displaying image data generated in the control system 200 on an external television monitor or the like may be provided.
[0014] The CPU 201 executes the control program stored in the ROM 202 while using the RAM 203 as a work memory, thereby executing the control operation of the electronic keyboard instrument 100 of Fig. 1. In particular, the CPU 201 operates as a key determination device that executes the main processing shown in the flowchart of Fig. 3 and the key determination processing described later using the flowcharts of Fig. 6 to Fig. 9. The ROM 202 also stores the above control program and various fixed data, as well as various table data described later using Figs. 3, 4, and 5.
[0015] Fig. 3 is a main flow chart showing an example of main processing of an electronic keyboard instrument. This processing is processing in which the CPU 201 in Fig. 2 loads a control program stored in the ROM 202 into the RAM 203 and executes it. Although not shown in the figure, a timer increment processing is also executed during the execution of the main processing, which increments the counter value of an interrupt counter at a predetermined time interval.
[0016] As shown in FIG. 3, when the power supply of the electronic keyboard instrument 100 is turned on, the CPU 201 executes an initial process (initialization process) including clearing the data in the RAM 203 and the image on the liquid crystal display 102 (step S301).
[0017] Thereafter, the CPU 201 repeatedly executes the series of processes from steps S302 to S307 until the power supply to the electronic keyboard instrument 100 is turned off.
[0018] In the above series of processes, the CPU 201 first detects the operation of each switch in the group of the switches 103 via the I / O controller 207, and executes switch processing to execute the corresponding process (step S302).
[0019] Next, in the above series of processes, the CPU 201 executes keyboard processing to detect the performer's key press / release operation on the keyboard 101 via the key scanner 205 (step S303). In the key press processing, the CPU 201 detects key press data such as the note-on timing, note number (pitch), and velocity (strength of key press) of the key on the keyboard 101 pressed by the performer. In the key release processing, the CPU 201 detects key release data such as the note-off timing, note number, and the like of the key released by the performer.
[0020] Next, in the above series of processes, the CPU 201 executes a key determination process (step S304). In this key determination process, the CPU 201 performs key determination on input data indicating musical tones, which are the key-on data or key-off data input by the performer playing on the keyboard 101, and outputs a current key determination result for the input data. In this process, the CPU 201 operates as a key determination device. The input data is not limited to key press / release data input from the keyboard 101, but may be reproduced musical tone data input from an external device (such as a personal computer) via the Bluetooth MIDI & AUDIO interface 208 in FIG. 2, for example. The key determination process in step S304 will be described in detail below with reference to the flowcharts of FIGS.
[0021] Next, in the above series of processes, the CPU 201 generates image data that matches the key of the song currently being played by the performer, for example, based on the current key determination result output as a result of the key determination process in step S304, and executes image display processing to display the image on the liquid crystal display 102 in Fig. 1 via the display controller 206 in Fig. 2 (step S305). This allows the performer to enjoy the display of images that change in sync with their performance. The generated image may be displayed on an external television monitor or the like via a video interface (not shown). Furthermore, as described above, in accordance with the reproduced musical sound data input from an external device, for example, via the Bluetooth MIDI & AUDIO interface 208, the musical sound data may be passed through, for example, the sound source LSI 204 in FIG. 2 and output from the speaker 211 via the D / A converter 209 and the amplifier 210, and the image data generated as described above may be displayed on an external television monitor or the like.
[0022] Next, in the above series of processes, the CPU 201 executes a sound source sound generation process (step S306). In this sound source sound generation process, the CPU 201 provides the sound source LSI 204 with data indicating the tone color, pitch, and velocity of the musical tone to be generated, or provides the sound generation control data indicating the tone pitch of the musical tone to be muted, based on the note-on event generated in the keyboard process in step S303. The sound source LSI 204 reads out waveform data stored in the ROM 202 or a waveform ROM (not shown) built in the sound source LSI 204 according to the sound generation control data indicating the tone color, pitch, velocity, length, etc., to generate predetermined musical tone data. This musical tone data is converted into an analog musical tone signal by the D / A converter 209, amplified by the amplifier 210, and output from the speaker 211. Furthermore, the CPU 201 instructs the sound source LSI 204 to mute the tone of the pitch (note number) indicated by the note-off event based on the note-off event, whereby the sound source LSI 204 mutes the corresponding musical tone data that was being sounded.
[0023] In the above series of processes, the CPU 201 finally executes other processes (for example, envelope control of the musical sound data being generated by the sound source LSI 204), and returns to the process of step S302.
[0024] Next, the key determination process in step S304 in FIG. 3 will be described in detail below. As described above, in this embodiment, the key determination process from the melody and the key determination process from the chords are not executed selectively, but both are executed in parallel to output the first key and the second key, respectively. The key relationship between the first key and the second key is determined by referring to a key relationship table, and depending on the determined key relationship, either the first key or the second key is given priority in outputting the current key determination result.
[0025] FIG. 4(a) is a diagram showing an example of a key relation table. This key relation table shows key relations, which are relations between the respective tonics of a plurality of keys. In FIG. 4(a), the vertical axis shows key M, which indicates the key determination result from the melody, which will be described later. The leftmost column 420 written in capital letters shows major keys as the key determination result, and the column 421 to the right of the leftmost column 420 written in lowercase letters shows minor keys as the key determination result. For example, the horizontal gray row 401 in FIG. 4(a) is the row to be referred to when key M, which indicates the key determination result from the melody, is C major (written as C) or Am (written as A minor).
[0026] In Fig. 4(a), the horizontal axis indicates the key C indicating the key determination result from the chord described later, the top row 422 written in lowercase alphabetical characters indicates the minor key as the key determination result, and the next row 423 below the top row 422 written in uppercase alphabetical characters indicates the major key as the key determination result. For example, the vertical gray column 402 in Fig. 4(a) is the column to be referred to when the key C indicating the key determination result from the chord is C major (written as C) or Am (written as A minor, written as a).
[0027] In FIG. 4(a), data corresponding to the symbols “○”, “M”, or “c” is set in the square where the horizontal row of any key on the vertical axis intersects with the vertical column of any key on the horizontal axis.
[0028] For example, data corresponding to the symbol "o" is set in a memory location corresponding to the intersection of row 401, where the key determination result from the melody is the key of C or Am, and column 402, where the key determination result from the chord is also the key of C or Am. This data corresponding to the symbol "o" is set when the key of the key determination result from the melody and the key of the key determination result from the chord match.
[0029] Next, for example, data corresponding to the symbol "M" is set in a storage location corresponding to a square where a row 401 in which the key determination result from the melody is the key C or Am intersects with a column 402 in which the key determination result from the chord is the key C or Am, and a column 403 in which the key is F major (notation: F) or Dm (D minor, notation: d), or a column 404 in which the key is G major (notation: G) or Em (E minor, notation: e), which are adjacent to the left and right of the column 402 in which the key determination result from the chord is the key of a close relative (dominant key) in the circle of fifths of music theory. A close relative key is a key that is closely related to a certain key (dominant key). Data corresponding to the symbol "M" indicates that the key determination result from the melody is adopted. Note that data corresponding to the symbol "c" described later indicates that the key determination result from the chord is adopted.
[0030] Also, for example, data corresponding to the symbol "M" is set in a storage location corresponding to the intersection of a row 401 in which the key determination result from the melody is the key C or Am and a column 402 in which the key determination result from the chord is the key C or Am, which is two adjacent columns on the left and right, a column 405 in which the key is B♭ major (notation: B♭) or Gm (G minor, notation: g), or a column 406 in which the key is D major (notation: D) or Bm (B minor, notation: b). B♭ major or Gm is a subdominant key of a subdominant key when viewed from C major or Am, and D major or Bm is a dominant key of a dominant key when viewed from C major or Am. In this embodiment, each data of the subdominant key of a subdominant key or the dominant key of a dominant key is considered to be a close key in the circle of fifths in music theory, between the key determined from the melody and the key determined from the chord.
[0031] In this way, in the key relationship table of FIG. 4(a), closely related keys are shown in the circle of fifths as dominant keys or dominant keys of dominant keys, which move by a fifth.
[0032] The same applies even if the relationship between the vertical and horizontal axes is reversed. For example, data corresponding to the symbol "M" is set in a memory location corresponding to the intersection of column 402, in which the key determination result from chords is the key C or Am, and row 407, in which the key F major (notation: F) or Dm (D minor, notation: d), or row 408, in which the key G major (notation: G) or Em (E minor, notation: e), which are adjacent to row 401, in which the key determination result from melody is the key C or Am, respectively, and the key of the key determination result from chords is in a related key (dominant key or subdominant key).
[0033] For example, data corresponding to the symbol "M" is also set in the memory locations corresponding to the intersection of column 402, where the key determination result from the chords is in the key of C or Am, and row 409, where the key determination result from the melody is in the key of C or Am, or row 410, where the key determination result from the melody is in the key of D major (notation: D) or Bm (notation: b), which are two adjacent rows above and below each other in row 401. In this way, data corresponding to the symbol "M" is also set in the memory locations corresponding to the intersection of column 402, where the key determination result from the chords is in the key of C or Am, and which are two adjacent rows above and below each other in row 401.
[0034] In this way, in the key relationship table of Figure 4 (a), closely related keys are shown in the circle of fifths as dominant keys or dominant keys of dominant keys, or subdominant keys or subdominant keys of subdominant keys, which move by a fifth.
[0035] Other than the above, data corresponding to the symbol "c" is set in the memory locations corresponding to the squares where the key determined from the melody and the key determined from the chord are in distant keys according to the circle of fifths in music theory.
[0036] In this embodiment, in the key relationship table of Figure 4(a), when a combination is set in which data corresponding to the symbol "○" indicates that the first key, which is the key determination result from the melody, and the second key, which is the key determination result from the chord, are in a matching relationship, the first key = second key is output as the current key determination result.
[0037] Furthermore, in the key relationship table of Figure 4(a), when a combination is set in which data corresponding to the symbol "M" is set, in which the first key and the second key are closely related keys, the first key, which is the key determination result from the melody, is given priority and is output as the current key determination result.
[0038] Furthermore, in the key relationship table of Figure 4(a), when the first key and the second key are in a combination in which data corresponding to the symbol "c" is set, which is a remote key relationship, the second key, which is the key determination result from the chord, is given priority and is output as the current key determination result.
[0039] The reason why this algorithm is adopted in this embodiment is as follows. When modulating the key, the chord does not change, but in the performance of the melody, it is common to change to a related key, such as to a dominant key, to a dominant key of a dominant key, to a subdominant key, or to a subdominant key of a subdominant key. Therefore, in this case, it is better to prioritize the key determination result from the melody.
[0040] For example, the key determination result from the chord is fixed at C, but if the melody changes from C to B♭, the key determination result from the melody may change from C to its subdominant key, F. In such a case, it is best to give priority to the key determination result F from the melody as a whole. On the other hand, in popular songs and pop music, for example, there are many cases where the key is always C, but then changes to a semitone at the end to make it more exciting. As in this example, when the key of the song changes from C to C#, the keys are completely different, so in such cases the chord must have changed. Therefore, in this embodiment, the key determination result from the chord should be prioritized.
[0041] However, in the example shown in Fig. 4(a), there are two ranges of related keys (two consecutive squares in Fig. 4(a) where data corresponding to the symbol "M" is set), but for jazz, for example, the range of related keys may be broadened a bit. In other words, by switching the key relationship table shown in Fig. 4(a) according to the musical genre to which the input data song belongs, it is possible to effectively handle key determination for songs of various genres.
[0042] In this manner, in this embodiment, by preparing (and storing in ROM 202) a plurality of key relationship tables as shown in FIG. 4(a) for the key determination results from chords and the key determination results from melodies, it becomes possible to perform key determination for major music genres such as classical, pop, and jazz.
[0043] The key relationship table shown in Fig. 4(a) is stored as table data in the ROM 202 in Fig. 2. Any data structure may be adopted as long as it is possible to access any key on the vertical axis of Fig. 4(a) by the first key, which is the result of key determination from the melody, and any key on the horizontal axis of Fig. 4(a) by the second key, which is the result of key determination from the chord, and data corresponding to the symbols set for each key are read out from the storage positions corresponding to the squares where they intersect.
[0044] In this way, in this embodiment, by taking into consideration in parallel both the first key, which is the result of the key determination process from the melody, and the second key, which is the result of the key determination process from the chords, it is possible to obtain more accurate key determination results regardless of the performance style, difficulty of the performance, musical genre, etc.
[0045] Next, a process of determining the key from the melody will be described. When determining the tone sequence of a melody, when a three-tone sequence is encountered, for example, many Japanese children's songs are of the so-called "yona-uki" scale, which only has the intervals of do-re-mi-so-la. The Yona-nuki scale is a Western scale that does not include the fourth note Fa and the seventh note Si from the tonic note Do (Do-Re-Mi-So-La). This corresponds to the Ryo mode of Gagaku, and was named by those involved in Western music as a characteristic of Japanese scales. It also corresponds to the five notes of the black keys on keyboard instruments. In such cases, when the melody is pronounced Do Re Mi, it is not clear whether it is C major, F major, or G major. However, particularly in genres such as nursery rhymes, if you determine that the three-note sequence Do Re Mi is most likely to be C major, confirm the key, and proceed with the determination, you can determine the key fairly quickly.
[0046] If an F or B comes along afterwards, it may be determined that the key was in fact G major rather than C major. As shown by the key determination process of step S304 in the loop process of steps S302 to S307 in Figure 3, the key determination process from the melody is executed repeatedly in real time, so a change from initially being C major to being G major can be easily corrected.
[0047] The above-mentioned three-note melody is called a trichord. Fig. 5(a) is an example of a trichord-by-key constituent note table showing the key scale note configuration of a trichord for each key in the major key scale, and Fig. 5(b) is an example of a trichord-by-key constituent note table showing the key scale note configuration of a trichord for each key in the minor key scale. Each corresponds to a diatonic scale. In Fig. 5(a) and (b), the leftmost columns 501 and 502 on the vertical axis show major keys and minor keys, respectively. In the trichord determination in the key determination process from the melody in this embodiment, if any of the three-note sequences in the row direction of the gray part of each row of the major scale in Figure 5(a) or the minor scale in Figure 5(b) is detected, the major key or minor key indicated by the symbol at the position corresponding to the detected three-note sequence in the leftmost column 501 or 502 of Figure 5(a) or (b) becomes the first key candidate as the key determination result from the melody at that time.
[0048] For example, in the nursery rhyme "Mary Had a Little Lamb," the melody "Mi Re Do Re Mi Mi Mi Re Re Re Mi So So Mi Re Do Re Mi Mi Mi Re Re Mi Re Do" has only the scale of Do Re Mi So, so it is determined to be in C major. However, as long as there is no left hand accompaniment, it could be in G major or F major. In order to quickly find such cases, the process of determining the key from the melody in this embodiment focuses on determining the trichord in the melody. If the trichord is determined quickly at the beginning, cases like the nursery rhyme "Mary Had a Little Lamb" can be avoided. Of course, this is not permanently true, and as will be described in more detail below, the present embodiment allows for proper correction if a new determination is made later.
[0049] The concept of this embodiment described above can be similarly applied to melodies other than the Yona-less scale, such as the so-called Niro-less scale.
[0050] The above concept applies to the case where a three-note sequence is consecutive in a melody, but the same concept can be applied to the case where a four-note sequence is consecutive. A four-note sequence in a melody is called a tetrachord. FIG. 4(b) is a diagram showing an example of a tetrachord constituent note table for each key, which shows the key scale note configuration of a tetrachord for each key in the diatonic major key scale. In FIG. 4(b), the leftmost column 430 on the vertical axis shows the major key. Tetrachords include combinations of three whole tones. The combinations that result in three whole tones in one scale are fixed. For example, in the key of C major, the four notes Fa, So, La, and Si contain three whole tones (three whole tones). Therefore, when such a combination appears, it can be determined that the key is C major. In this way, since the combinations of tetrachords are fixed for each key, it is possible to perform key determination processing from the melody by referring to a table of tetrachord constituent notes for each key, such as the example shown in Figure 4(b). That is, in the tetrachord determination in the key determination process from the melody in this embodiment, if any of the four-tone series including tritones in the row direction of the gray part of each row of the scale in Figure 4(b) is detected, then for example a major key, indicated by the symbol at the position corresponding to the row of the detected four-tone series in the leftmost column 430 of Figure 4(b), becomes the first key candidate as a key determination result from the melody at that time.
[0051] The trichord constituent note tables for each key shown in Fig. 5(a) and (b) or the tetrachord constituent note table for each key shown in Fig. 4(b) are stored as table data in the ROM 202 in Fig. 2, similar to the key relation table in Fig. 4(a). Any data structure may be adopted as long as it has a database function for determining whether or not a sequence of three or four notes in the musical tone data, which is the input data, matches a sequence of three or four notes in a gray portion in any row direction on the table, and specifying the key of the matching row.
[0052] A specific key determination process of this embodiment based on the concept of the key determination process described above will be described in detail below with reference to Figures 4 and 5. Figure 6 is a flowchart showing a detailed example of the key determination process that is repeatedly executed in step S304 of Figure 3.
[0053] In FIG. 6, the CPU 201 of FIG. 2 first executes a process of determining the key from the melody (step S601) and a process of determining the key from the chords (step S602) in parallel, and stores the respective determination results, for example, in a variable Mkey on the RAM 203 as the first key (step S603), and in a variable Ckey on the RAM 203 as the second key (step S604).
[0054] The process of determining the key from the melody will be described later with reference to the flowcharts of FIGS.
[0055] After executing the key determination process from the chord in step S602, the CPU 201 starts counting beats for the input data (step S605). The CPU 201 updates the value of a beat count variable in the RAM 203, for example, every time the beat count is incremented by one.
[0056] Next, the CPU 201 determines whether or not the value of the beat count variable in the RAM 203 has reached 16 beats in the input data (step S606).
[0057] In the judgment of step S606, for example, while a predetermined number of beats (e.g., 16 beats) has not been reached in the input data of a certain song without key determination from chords (while the judgment of step S606 is YES), the CPU 201 refers to the key relationship table (step S607) and determines the key (step S609).
[0058] On the other hand, if the predetermined number of beats is reached without determining the key from the chord (NO in step S606), the CPU 201 adopts the first key stored in the variable Mkey (step S608) and confirms the key (step S609).
[0059] FIG. 7 is a flowchart showing a detailed example of the key determination process from the melody in step S601 of FIG. First, the CPU 201 determines whether or not the key has been determined at the current time by a key determination process based on the chord (step S701).
[0060] If the key has been confirmed and the determination in step S701 is YES, the CPU 201 does not execute the trichord determination process and tetrachord determination process described below, but proceeds to the embroidery sound deletion process in step S708.
[0061] If the key has not been determined and the determination in step S701 is NO, the CPU 201 first executes a trichord determination process (step S702). FIG. 8A is a flowchart showing a detailed example of the trichord determination process in step S702 of FIG.
[0062] Trichord means a three-tone sequence, but in this embodiment, it is used to mean a sequence of three connected tones with a whole tone interval. The white keys Do-Re-Mi, Fa-So-La, So-La-Si, etc. on the keyboard 101 (Fig. 1) fit the condition. In the case of a scale with no notes, such as Yona-nuki, which is often used in children's songs, Fa and Si often do not appear, so in such songs, if the conditions for a trichord are met, there is a high probability that it is a Do-Re-Mi trichord. Therefore, when the white keys Do-Re-Mi appear, it is determined that the first key M key is C major.
[0063] In FIG. 8(a), the CPU 201 rearranges the four notes obtained as input data in ascending order of pitch (step S801). For example, when the input data contains the notes So, Do, Re, Mi, it will be sorted as Do, Re, Mi, So. In this case, the range is not relevant, and only the note names are sorted, focusing on the type of note.
[0064] Next, the CPU 201 judges whether or not there are two whole tones in the interval between each of the four tones after the above rearrangement (step S802). In the above arrangement, there are two whole tones in the interval between the next tones. For example, in the sequence of notes Do, Re, Mi, and So, Do, Re, Mi matches this.
[0065] If the determination in step S802 is YES, the CPU 201 outputs the major key with the lowest note of the three notes corresponding to the two diatonic intervals as the first key Mkey (step S803). For example, when the four notes Do, Re, Mi, and So are input, Do, Re, Mi correspond to a trichord, and in this case, the major key with Do as the tonic note is C major, so the first key Mkey is C major. Thereafter, the CPU 201 ends the Trichord determination process in step S702 of FIG. 7, which is shown in FIG. 8(a).
[0066] If the determination in step S802 is NO, the CPU 201 determines whether or not there is a musical interval in which a whole tone and a semitone are consecutive (step S804).
[0067] If the determination in step S804 is YES, the minor key with the lowest note of the three notes corresponding to the two intervals as the tonic note is output as the first key Mkey (step S805). For example, the first key Mkey is determined as C minor with the tonic note C of C, D, E, and F. In the case of a minor key trichord, the tonic note is C, D, E, and F, so a sequence of notes with intervals of a whole step and a semitone is searched for. Thereafter, the CPU 201 ends the Trichord determination process in step S702 of FIG. 7, which is shown in FIG. 8(a).
[0068] If the determination in step S804 is NO, the CPU 201 does not set the first key Mkey, and ends the trichord determination process in step S702 of FIG. 7 shown in FIG. 8(a).
[0069] Returning to the explanation of the processing in FIG. 7, after the trichord determination processing in step S702, the CPU 201 refers to the trichord constituent note table for each key in FIG. 5(a) or (b) described above, and determines whether the first key Mkey matches any trichord (step S703) by the operation described above.
[0070] If the determination in step S703 is YES, the first key Mkey is finalized (step S704). After that, the CPU 201 ends the key determination process from the melody in step S601 in FIG.
[0071] If the determination in step S703 is NO, a tetrachord determination process is executed (step S705). FIG. 8B is a flowchart showing a detailed example of the tetrachord determination process in step S705 of FIG.
[0072] In Fig. 8(b), the CPU 201 rearranges the 16 notes obtained as input data from the lowest pitch to the highest (step S810). Tetrachord means a four-note sequence, but in this embodiment, it means the key-specific four-note sequence shown in Fig. 4(b). For example, in the key of C major, the interval is Fa, So, La, Si, and only C major has three whole tones in a row. Similarly, only G major has the three whole tones of Do, Re, Mi, Fa#, and only F major has the three whole tones of Si♭, Do, Re, Mi, tetrachord. In this way, if you find a three whole tone tetrachord in the first four notes, the key is determined, so you need to look for this between 4 and 16 notes.
[0073] Next, the CPU 201 determines whether or not the intervals between the respective 16 tones after the above-mentioned rearrangement are four tones (whole tone-whole tone-whole tone) (step S811).
[0074] If the determination in step S811 is YES, the CPU 201 outputs the major key having the note a semitone above the highest note of the top four notes as the first key Mkey (step S812). After that, the CPU 201 ends the tetrachord determination process in step S705 of Fig. 7, which is shown in Fig. 8(b).
[0075] If the determination in step S811 is NO, the CPU 201 does not set the first key Mkey, and ends the tetrachord determination process in step S705 of FIG. 7, shown in FIG. 8(b).
[0076] Returning to the explanation of the processing in FIG. 7, after the tetrachord determination processing in step S705, the CPU 201 refers to the tetrachord constituent note table for each key in FIG. 4(b) described above, and determines whether the first key Mkey matches any tetrachord (step S706) by the operation described above.
[0077] If the determination in step S706 is YES, the first key Mkey is finalized (step S707). After that, the CPU 201 ends the key determination process from the melody in step S601 in FIG.
[0078] If the determination in step S701 is YES or the determination in step S706 is NO, the CPU 201 executes an embroidery sound deletion process (step S708).
[0079] Fig. 9 is a flow chart showing a detailed example of the embroidery sound deletion process in step S708 in Fig. 7. Embroidery sounds are ornament sounds that particularly modify the melody and appear frequently, half a tone or whole tone below or above the melody and then return. Figure 10(a) shows the opening score of the piece "Fur Elise." The first right hand melody, Mi Re# Mi Re# Mi Re#, corresponds to the embroidery notes. It is called embroidery notes because it goes from Mi to Re# and back to Mi, giving the impression of embroidery. In the case of whole tones, it often corresponds to a scale note, but in the case of semitones, a note that is not a scale note (a non-harmonic note) is used, so if such embroidery notes are used to determine the key, the key determination will not be accurate. For example, a key that is actually Am may be determined to be Em. For this reason, it is desirable not to use it as a key determination note if it meets the conditions for embroidery notes.
[0080] In FIG. 9, the CPU 201 stores in advance the current sound in a variable CT on the RAM 203, the previous sound in a variable PT, and the sound one step before that in a variable PPT. Then, the CPU 201 first determines whether or not the previous sound PT and the current sound CT are at a semitone interval (step S901). For example, when MiRe#Mi is played, Mi is in CT, Re# is in PT, and Mi is in PPT. CT and PPT need to have the same note names as well as the same pitch.
[0081] If the determination in step S901 is NO, the embroidery sound condition is not satisfied, so the CPU 201 does not execute the embroidery sound deletion, and ends the embroidery sound deletion process in step S708 in FIG. 7 shown in the flowchart in FIG.
[0082] If the determination in step S901 is YES, it is determined whether or not the key has been determined at the present time (step S902).
[0083] If the determination in step S902 is YES, the CPU 201 determines whether the PT is a scale note (step S903).
[0084] If the determination in step S903 is YES, the sound is not an embroidery sound, so the CPU 201 does not delete the embroidery sound, and ends the embroidery sound deletion process in step S708 in FIG. 7 shown in the flowchart in FIG.
[0085] If the determination in step S902 or S903 is NO, the CPU 201 ignores the notes one octave lower than the PPT and does not include them in the embroidery sound determination (step S904). This is because when a performer plays the keyboard 101 (FIG. 1) with both hands, it is not clear which notes are embroidery sounds, so it is necessary to ignore notes one octave lower than the part where a semitone is determined (accompaniment notes). In the example of the musical score in FIG. 10(a), notes one octave lower than the first E note are not subjected to embroidery sound determination.
[0086] After the process of step S904, the CPU 201 determines whether or not the CT and PPT have the same pitch (step S905).
[0087] If the determination in step S905 is NO, the sound is not an embroidery sound, and the CPU 201 does not delete the embroidery sound, and ends the embroidery sound deletion process in step S708 in FIG. 7 shown in the flowchart in FIG.
[0088] If the determination in step S905 is YES, the CPU 201 determines whether the CT and PPT are within two beats (step S906). This is because embroidery sounds are ornamental sounds, and so sounds that are too long do not qualify.
[0089] If the determination in step S906 is NO, it is determined that the sound is not an embroidery sound, and the CPU 201 does not delete the embroidery sound, and ends the embroidery sound deletion process in step S708 of FIG. 7 shown in the flowchart of FIG.
[0090] If the determination in step S906 is YES, the CPU 201 assumes that the sound is an embroidery sound, and stores PT in the variable PTS on the RAM 203, which indicates the embroidery sound (step S907).
[0091] Finally, the sound of the variable PTS is removed from the sounds used for key determination (step S908). After that, the CPU 201 ends the embroidery sound deletion process of step S708 in FIG.
[0092] Returning to the explanation of Fig. 7, after the embroidery sound deletion process in step S708, the CPU 201 executes key determination based on the melody sequence (step S709) and determines the first key Mkey, which is the key determination result from the melody (step S710). After that, the CPU 201 ends the key determination process from the melody in step S601 of Fig. 6 shown in the flowchart of Fig. 7. There have been various methods for key determination using melody sequences in the past, but the method of checking which key scale the input data sounds are closest to at regular intervals is thought to be most suitable for determining trichord and tetrachord, and embroidery sounds in this case.
[0093] FIG. 10(b) is an example of a musical score in which the key cannot be determined appropriately from the chords alone. The key determined from the chords, Ckey, is determined to be C major (CM) from the first measure to the third measure. On the other hand, the key determined from the melody, Mkey, is determined to be CM from the first measure to the first beat of the second measure, and since the second beat of the second measure specifies a B♭ pitch that is not included in CM, it is determined that the key has been modulated to F major (FM) by the third measure. In the third measure in FIG. 10(b), the CPU 201 refers to the table in FIG. 4(a) to obtain data corresponding to the symbol "M" from the storage location corresponding to the square at the intersection of row 407 (Mkey=FM) and column 402 (Ckey=CM), and as a result, the first key Mkey corresponding to the data "M" is adopted, and the key is determined to be FM. By applying the present invention, the key is determined based on the Mkey in the third bar of the musical score in Figure 10(b) using the key (Mkey) determined from the melody and the key (Ckey) determined from the chords, so that the key can be determined accurately. Figure 10(c) is an example of a musical score where the key is modulated up a semitone to build excitement at the end, as is often the case in pop music. Tonality basically spreads on the circle of fifths as the key increases, for example, in the direction of increasing sharps, it goes from CM to GM to DM to AM. Therefore, the dominant key a fifth above and the dominant key of that fifth above are considered to be close relatives. Conversely, the subdominant key a fifth below and the subdominant key of that fifth below are also considered to be close relatives. Furthermore, if the key is a semitone away, there are almost no notes in common with the original key, and in this case it is treated as a distant key in terms of tonality. In the musical score example in Figure 10(c), the key is CM from the first bar to the second bar, and modulates to the distant key D♭M in the third bar. In reality, it is believed that there are almost no cases in which the key determined from the melody and the key determined from the chords are distant keys. Even if such a case does exist, by applying the present invention, by referring to the table in Figure 4(a), the key determined from the melody (M key) and the key determined from the chords (C key) are used to determine the key based on the C key in the case of the musical score in Figure 10(c), so the key can be determined satisfactorily.
[0094] As described above, when something is played in real time, whether only the melody or only the chords are input, whether it is played with both hands, whether it is a melody such as a nursery rhyme, or whether it is a complex piece such as jazz, it is possible to make a well-balanced key determination from both the chords and the melody. In addition, the addition of trichord and tetrachord judgment functions makes it possible to quickly judge the pitch of songs that use a scale without the four notes. Furthermore, embroidery note judgment has been implemented, so that notes that are merely decorative and are not included in the scale notes can be excluded from the key judgment, resulting in more accurate judgment results. This embodiment is characterized by having an algorithm for determining the key from the melody and an algorithm for determining the key from the chords, and by providing a priority table for each determination result, it is possible to determine which one to prioritize after producing both determination results, which has the following effects: (1) Even beginners who cannot play chords and can only play melodies can quickly and correctly determine the key by using the key determined from the melody. (2) Because the system simultaneously determines the key from both the melody and the chords, it is possible to determine the key of any song with a nearly accurate result, regardless of the genre of the song. (3) Optimal key determination results can be obtained regardless of the performance style, from beginners to advanced players. (4) Since it is possible to know whether the key determination result from the melody or the key determination result from the chords has been adopted, it is possible to link these as visual expression parameters for image generation processing, etc., to add new visual expressions. Furthermore, this embodiment has the following features. (1) The system provides trichord and tetrachord judgment for key determination from the melody, so that the key can be determined quickly even for songs that use a scale without the four notes, such as nursery rhymes. (2) The trichord and tetrachord judgments only work when the key is uncertain, so even if they are incorrect, the system is designed so that the correct key is restored by the subsequent input notes. (3) In determining the key from the melody, embroidery notes including notes other than the scale notes are determined and excluded when determining the key, which enables even more accurate determination.
[0095] In addition, the present invention is not limited to the above-mentioned embodiment, and various modifications can be made in the implementation stage without departing from the gist of the invention. In addition, the functions executed in the above-mentioned embodiment may be implemented in appropriate combinations as much as possible. The above-mentioned embodiment includes various steps, and various inventions can be extracted by appropriate combinations of the multiple components disclosed. For example, if an effect can be obtained even if some components are deleted from all the components shown in the embodiment, the configuration from which the components are deleted can be extracted as an invention. [Explanation of symbols]
[0096] 100 Electronic Keyboard Instruments 101 Keyboard 102 Liquid crystal display 103 Switch 201 CPU 202 ROM 203 RAM 204 Sound source LSI 205 Key Scanner 206 Display Controller 207 I / O Controller 208 Bluetooth MIDI & AUDIO Interface 209 D / A Converter 210 Amplifier 211 Speaker
Claims
1. a key determination process for determining the key to be a first key based on a melody included in the input data; a key determination process based on a chord included in the input data and determined to be a second key; a key determination result output process for outputting either the first key or the second key as a key determination result for the input data by referring to a key relation table; A tuning determination device that performs the above.
2. the key relationship table defines whether the first key and the second key have a matching relationship, a closely related key relationship, or a distant key relationship; The adjustment determination device according to claim 1 .
3. the key determination result output process refers to the key relationship table, and if the first key and the second key are in a closely related key relationship, outputs the first key; referring to the key relationship table, if the first key and the second key are in a remote key relationship, the key determination result output process outputs the second key. The adjustment determination device according to claim 1 .
4. After the key determination process based on the chord, a beat count process is performed to count the number of beats. until the number of beats reaches a set number of beats, the key determination result output process refers to the key relationship table and outputs either the first key or the second key; after the number of beats reaches a set number of beats, the first key is output as a key determination result for the input data. The adjustment determination device according to any one of claims 1 to 3.
5. The key determination process from the melody executes at least one of a trichord determination process for determining, based on a tritone sequence of melody notes in the input data, a key to which the tritone sequence belongs as the first key, and a tetrachord determination process for determining, based on a quadruple sequence of melody notes in the input data, a key to which the quadruple sequence belongs as the first key. The adjustment determination device according to any one of claims 1 to 3.
6. 4. The key determination device according to claim 1, wherein the key determination process from the melody includes an embroidery sound deletion process for excluding embroidery sounds from a key determination target.
7. 4. The key determination device according to claim 1, wherein a plurality of said key relationship tables are provided for each music genre to which the tune of said input data belongs.
8. The computer a key determination process for determining the key to be a first key based on a melody included in the input data; a key determination process based on a chord included in the input data and determined to be a second key; a key determination result output process for outputting either the first key or the second key as a key determination result for the input data by referring to a key relation table; A key determination method to be performed.
9. On the computer, a key determination process for determining the key to be a first key based on a melody included in the input data; a key determination process based on a chord included in the input data and determined to be a second key; a key determination result output process for outputting either the first key or the second key as a key determination result for the input data by referring to a key relation table; A program that executes the following.
Citation Information
Patent Citations
Note property judging deivce and automatic accompaniment device
JP1993011763A
Key determining device
JP1994089094A
Key determination device and key determination program
JP2012068548A
Code analysis device, method, and program
JP2018054854A
Information processing apparatus, information processing method, performance data display system, and program
JP2020144346A
