CN111696500B - MIDI sequence chord identification method and device - Google Patents

MIDI sequence chord identification method and device Download PDF

Info

Publication number
CN111696500B
CN111696500B CN202010554464.2A CN202010554464A CN111696500B CN 111696500 B CN111696500 B CN 111696500B CN 202010554464 A CN202010554464 A CN 202010554464A CN 111696500 B CN111696500 B CN 111696500B
Authority
CN
China
Prior art keywords
pitch
chord
tone
midi
original
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010554464.2A
Other languages
Chinese (zh)
Other versions
CN111696500A (en
Inventor
计紫豪
李晨啸
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fuyiyue Technology Hangzhou Co ltd
Original Assignee
Fuyiyue Technology Hangzhou Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuyiyue Technology Hangzhou Co ltd filed Critical Fuyiyue Technology Hangzhou Co ltd
Priority to CN202010554464.2A priority Critical patent/CN111696500B/en
Publication of CN111696500A publication Critical patent/CN111696500A/en
Application granted granted Critical
Publication of CN111696500B publication Critical patent/CN111696500B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10HELECTROPHONIC MUSICAL INSTRUMENTS; INSTRUMENTS IN WHICH THE TONES ARE GENERATED BY ELECTROMECHANICAL MEANS OR ELECTRONIC GENERATORS, OR IN WHICH THE TONES ARE SYNTHESISED FROM A DATA STORE
    • G10H1/00Details of electrophonic musical instruments
    • G10H1/36Accompaniment arrangements
    • G10H1/38Chord
    • G10H1/383Chord detection and/or recognition, e.g. for correction, or automatic bass generation
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10HELECTROPHONIC MUSICAL INSTRUMENTS; INSTRUMENTS IN WHICH THE TONES ARE GENERATED BY ELECTROMECHANICAL MEANS OR ELECTRONIC GENERATORS, OR IN WHICH THE TONES ARE SYNTHESISED FROM A DATA STORE
    • G10H1/00Details of electrophonic musical instruments
    • G10H1/0008Associated control or indicating means
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10HELECTROPHONIC MUSICAL INSTRUMENTS; INSTRUMENTS IN WHICH THE TONES ARE GENERATED BY ELECTROMECHANICAL MEANS OR ELECTRONIC GENERATORS, OR IN WHICH THE TONES ARE SYNTHESISED FROM A DATA STORE
    • G10H1/00Details of electrophonic musical instruments
    • G10H1/0033Recording/reproducing or transmission of music for electrophonic musical instruments
    • G10H1/0041Recording/reproducing or transmission of music for electrophonic musical instruments in coded form
    • G10H1/0058Transmission between separate instruments or between individual components of a musical system
    • G10H1/0066Transmission between separate instruments or between individual components of a musical system using a MIDI interface

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Auxiliary Devices For Music (AREA)

Abstract

The invention discloses a MIDI sequence chord identification method and a device, which belong to the field of intelligent composition, and specifically comprise the following steps: acquiring MIDI files and target tracks; identifying musical tunability on the target track according to the MIDI file; determining a plurality of fine granularity of chord identification, and determining chord progress under each fine granularity according to MIDI files and music tonality; and fusing the chord actions at a plurality of fine granularity to obtain the final chord action of the MIDI sequence. The MIDI sequence chord identification method and the MIDI sequence chord identification device can identify the chord according to different fine granularity so as to improve the accuracy of chord identification, and the method is simple and can be industrially applied.

Description

MIDI sequence chord identification method and device
Technical Field
The invention relates to the field of artificial intelligence composition, in particular to a MIDI sequence chord identification method and device.
Background
MIDI is an industry standard electronic communication protocol that describes the communication protocol, digital interface, and specifications that connect various electronic musical instruments, computers, and related audio devices for playing, editing, and recording music. Is one way of symbolizing music and is also the most commonly used way of representing music in computer composition.
Chords refer to tones of two or more pitches combined together, while chord progression is an ordered set of chords in time. From the general practical age of classical music to today, chord progression has been the basis for western popular music styles and classical music. In a music style, chord progression is a decisive feature for creating melodies and rhythms. Different chording will give different listening to the music. In general, chords are divided into three major functions, primary chords as major functions, tertiary, fifth and seventh chords as subordinate functions, and secondary, fourth and sixth chords as subordinate functions. The chords of the main function are the most stable among the three, and the chord of the general music is designed from stable to unstable to stable chords. Knowing the chord progression of a piece of music can understand the structural skeleton of the piece of music and simultaneously understand the emotion flow of the whole piece of music.
With the increasing development of computer music, it is hoped that the computer can more deeply understand the music style, structure, emotion and style, and chord progression is the basis for the different possibilities of music. Most of the existing works are chord recognition based on waveform music.
Currently, the main stream chord identification methods are generally of two types: one is to perform spectrum analysis on the waveform layer, such as obtaining the rhythm starting point, mel cepstrum coefficient, etc. of the waveform file, and then train the spectrum features through neural network to predict the chord progression of unknown spectrum. The problem with this type of approach is that: it is a difficult matter to obtain waveform files with subtle labeling chords, and because of the black box nature of neural networks, accuracy is usually improved, only by increasing the amount of data. Thus, this method stays at the laboratory level and there is no way to apply it directly to the floor.
The other is to infer the chord at the MIDI level, the most classical case is the method of chord identification in Google Magenta, which constructs a hidden Markov chain, and uses Viterbi algorithm to obtain the chord with the highest probability in a period of time, and iterates the process to finally obtain the chord. The problem with this type of approach is that: the fine granularity of chord progression is not controllable, and there is no way to accurately identify chord progression among many MIDI sequences with speed variations or tonality variations.
In view of the above, none of the chord progression identification methods currently available today reach an industrially applicable level. And the existing MIDI sequence chord identification method is extremely limited. Therefore, there is an urgent need for a technical solution for identifying MIDI sequence chord progression that can be industrially applied in a floor-standing manner.
Disclosure of Invention
The invention aims to provide a MIDI sequence chord progression identification method and device, which can solve the problems that the existing chord progression identification is inaccurate and cannot be industrially applied.
In order to achieve the above purpose, the technical scheme provided by the invention is as follows:
a MIDI sequence chord identification method, comprising the steps of:
acquiring MIDI files and target tracks;
identifying musical tunability on the target track according to the MIDI file;
determining a plurality of fine granularity of chord identification, and determining chord progress under each fine granularity according to MIDI files and music tonality;
and fusing the chord actions at a plurality of fine granularity to obtain the final chord action of the MIDI sequence.
A MIDI sequence and chord progression identification apparatus, a computer memory, a computer processor and a computer program stored in the computer memory and executable on the computer processor, wherein there is a set of relationship size tuning heights stored in the computer memory, and the computer processor implements the MIDI sequence and chord progression identification method as described above when executing the computer program.
Compared with the prior art, the invention has the beneficial effects that at least the following steps are included:
the MIDI sequence chord identification method and the MIDI sequence chord identification device can identify the chord according to different fine granularity so as to improve the accuracy of chord identification, and the method is simple and can be industrially applied.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a block flow diagram of a method for identifying MIDI sequence chords provided by an embodiment of the present invention;
FIG. 2 is a flow chart of musical tone recognition provided by an embodiment of the present invention;
FIG. 3 is a large tuning high aggregate distribution line graph provided by an embodiment of the invention;
FIG. 4 is a small tuning high aggregate distribution line graph provided by an embodiment of the present invention;
FIG. 5 is a flow chart of chord identification provided by an embodiment of the present invention;
fig. 6 is a schematic diagram of chord progression fusion at multiple fine granularity provided by an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the detailed description is presented by way of example only and is not intended to limit the scope of the invention.
The method aims to solve the problem that the existing MIDI sequence chord progression identification method cannot be directly applied to industry due to the fact that data samples are few in deep learning, and also aims to solve the problem that the identification result is inaccurate due to uncontrollable fine granularity in the existing MIDI sequence chord progression identification method. The embodiment of the invention provides a MIDI sequence chord identification method and device, and the method and the device are described one by one.
Fig. 1 is a flowchart of a MIDI sequence chord progression identification method according to an embodiment of the present invention. As shown in fig. 1, the MIDI sequence chord progression identification method includes the steps of:
step 1, obtaining MIDI files and target tracks.
MIDI files refer to files prefixed with 'mid' or 'MIDI'. Each MIDI file contains a plurality of music tracks, the chord identification provided by the invention is to identify the single track data in MIDI, the processed track is considered as a target track, and the data of the target track in the MIDI file is directly read according to the target track when the data is read.
And 2, identifying the musical tone on the target track according to the MIDI file.
Musical tone is a generic term for the dominant and tuning categories of a tone. For example, a major mode using C as a dominant tone is a "C major" mode, a minor mode using a as a dominant tone is a "a minor" mode, and so on. There are mainly 24 tones in general music.
And 2, the method is mainly used for identifying the adjustability, namely identifying the overall adjustability of the target track, and defaulting that the target track is unchanged in the middle. If so, the recognition result is a tonality of a number of sustained small sections.
Fig. 2 is a flowchart of musical tone recognition provided by an embodiment of the present invention. As shown in fig. 2, in one embodiment, identifying musical tones on a target track from MIDI files includes:
(a) For all notes of the MIDI file on the target track, a pitch distribution histogram is constructed with the abscissa as the pitch class and the ordinate as the number of pitches.
In the standard MIDI music system, which specifies a pitch range of 128 values in total, from 0 to 127. Each pitch can be divided into 12 pitch classes according to its chromaticity characteristics, which correspond to pitches of the same chromaticity characteristics.
Classifying all notes of the MIDI file on the target track according to the pitch class of each note, and counting the number of each pitch class to form a pitch distribution histogram with 12 pitch classes on the abscissa and the number of each pitch class on the ordinate.
(b) And screening pitch categories with the number of not 0 from the pitch distribution histogram to form an original pitch set.
All pitches corresponding to a certain pitch class do not appear on a target track, namely the pitch class is not used in a statistical track, at the moment, the number of the pitch classes in a pitch distribution histogram is 0, the pitch class is ineffective to schedule identification and chord identification, so that the pitch class is excluded, the pitch class which is not 0 is taken to form an original pitch set, the original pitch set comprises the pitch class and the number corresponding to the pitch class, and a histogram or a line graph which takes an abscissa as the pitch class and takes an ordinate as the number corresponding to the pitch class can be constructed to represent the original pitch set.
(c) And when the length of the original pitch set is equal to 7, performing the tone hard matching, namely matching the same matched pitch set from a pitch set library to determine tone main tones, determining tone according to the relation size tone high set, and determining the tone by combining the tone main tones and the tone.
One basic pitch consists of 7 pitch classes, so when the pitch of the original pitch set is identified, it is first determined whether the length of the original pitch set, i.e. the number of pitch classes in the original pitch set, is equal to 7, and when equal to 7, hard matching is used, i.e. the original pitch set is directly matched with the matching pitch set from the pitch set library, and the pitch identification is 100% correct.
The slave pitch set library is a database for establishing a one-to-one mapping relation between the tone and the matched pitch sets, and each matched pitch set in the pitch set library consists of 7 pitch categories and has unique tone comprising a main tone and a tone. The pitch pool comprises a total of 12 major and 12 minor tones of 24 tones, and the pitch pool has strong expansibility, and when detecting some more complex MIDI, more complex tones, such as advantageously sub-tone, multi-Li' an tone, etc., can be added directly to the pitch pool.
The relation size adjustment is also called parallel size adjustment, and refers to a pair of size adjustment with the same adjustment number, and the relation size adjustment are mutually related big adjustment or related small adjustment. The relation size adjustment refers to a big adjustment and a small adjustment with the same tone number, the same tone string relation and different main tone heights. For example, the matching pitch set I in the pitch set library, with the composition pitch categories { "C", "D", "E", "F", "G", "A", "B" }, with the tonality being C major; the pitch class of matching pitch set II is { "A", "B", "C", "D", "E", "F", "G" }, and the tone is the A small tone. Thus, the C major and A minor corresponding to the matching pitch set I and the matching pitch set II are relative magnitudes.
In one embodiment, when the tone is hard matched, matching a matched pitch set identical to the original pitch set from a pitch set library, and taking a tone main sound of the matched pitch set as a tone main sound of the original pitch set;
calculating cross-correlation coefficients of the original pitch set and a relation size tuning high set respectively, and taking a major or minor tone corresponding to the large cross-correlation coefficient as a tuning mode of the original pitch set;
the tonality of the original pitch set is determined in combination with tonality dominant and tonality.
Fig. 3 is a high tuning set distribution line diagram provided by an embodiment of the present invention. Fig. 4 is a small tuning high aggregate distribution polyline provided by an embodiment of the present invention. When the cross-correlation coefficient is calculated, the cross-correlation of the histogram or the line diagram of the original pitch set and the large tuning high-set distribution line diagram is calculated to obtain one cross-correlation coefficient, and meanwhile, the cross-correlation of the histogram or the line diagram of the original pitch set and the small tuning high-set distribution line diagram is calculated to obtain the other cross-correlation coefficient, and then the large tune or the small tune corresponding to the larger cross-correlation coefficient is selected from the two cross-correlation coefficients to be the tuning adjustment of the original pitch set. For example, assuming that the cross-correlation coefficient of the histogram or the line graph of the original pitch set and the small tuning high set distribution line graph is 0.9 and the cross-correlation coefficient of the histogram or the line graph of the original pitch set and the small tuning high set distribution line graph is 0.8, the small tone corresponding to 0.8 is the tone adjustment of the original pitch set, and the tone adjustment and the tone main tone constitute the tone.
Because the histogram of the original pitch set of the target track and the pitch distribution set line graph of the relation size tone are all arrays with the dimension of 12, the correlate function of the numpy library is called to calculate the cross-correlation coefficients of the large tone tuning high set distribution line graph and the histogram of the original pitch set and the small tone tuning high set distribution line graph and the histogram of the original pitch set respectively.
(d) When the length of the original pitch set is not equal to 7 or the same matched pitch set is not matched from the pitch set library, the soft-tone matching is performed, i.e. the tone is determined according to the correlation of the matched pitch set and the original pitch set in the pitch set library.
The soft-tone matching is a method adopted by which the original pitch set of the target track cannot be matched to the corresponding tone by means of hard-matching, by determining the final tone by calculating the correlation of the pitch distribution set histogram of the original pitch set of the target track with all the matching pitch distribution set line graphs of known tone in the pitch set library.
In another embodiment, in the soft matching of the tone, the cross correlation coefficient of each matched pitch set in the pitch set library and the original pitch set is calculated, and the tone of the matched pitch set corresponding to the maximum cross correlation coefficient is used as the tone of the original pitch set.
And when the tone is in soft matching, the correlate function of the numpy library is also called, the cross correlation coefficient of the original pitch set distribution histogram of the target track and the tone-matching pitch set line graphs of all tones in the pitch set library is calculated, and the tone of the tone-matching pitch set corresponding to the maximum cross correlation coefficient is used as the tone of the original pitch set.
In practical applications, since a MIDI is easily determined to be a key of a dominant tone, a five-degree tone is added after the most relevant tone is determined to improve the accuracy of tone recognition. That is, in another embodiment, in the case of soft matching of the tone, after the original tone of the original pitch set is determined according to the correlation between the matched pitch set and the original pitch set, the last five degrees of tone of the original tone are obtained;
comparing the original pitch set corresponding to the original pitch with the upper five-degree pitch set corresponding to the upper five-degree pitch, finding a first pitch category which does not belong to the upper five-degree pitch set from the original pitch set, and finding a second pitch category which does not belong to the original pitch set from the upper five-degree pitch set;
and taking the original tone or the upper five-degree tone corresponding to the pitch set to which the first pitch class or the second pitch class with the largest number of pitch classes belongs as the final tone.
For example, assuming that the original pitch set is { "C", "D", "E", "F", "G", "a", "B" }, the last five-degree pitch set is { "E", "f#", "g#", "a", "B", "c#", and "d#" }, the first pitch class that does not belong to the last five-degree pitch set is found to be { "C", "D", "F", "G" }, and the second pitch class that does not belong to the original pitch set is found to be { "f#", "g#", "c#", "d#" } from the last five-degree pitch set. If the total number of notes in the MIDI file containing the first pitch class is 44, the total number of notes in the second pitch class is 37; the corresponding primitive pitch range of the original pitch set to which the first pitch class belongs is taken as the final pitch.
And 3, determining a plurality of fine granularity of chord identification, and determining chord progression under each fine granularity, namely, step chord marking according to the MIDI file and the musical tone.
In an embodiment, the bar_beans parameter characterizes the fine granularity of chord identification, i.e., the chord is identified in minimum units of beats. The chord results obtained by recognition are different from one another in the selected fine granularity, because the accuracy of the final recognition chord progression can be improved by recognizing the chords at a plurality of fine granularities, and therefore, the different fine granularities are determined first. In this embodiment, 1 beat, 2 beat, and 4 beat can be used as one fine granularity.
Fig. 5 is a flowchart of chord identification provided by an embodiment of the present invention. As shown in fig. 5, in one embodiment, determining each fine-grained lower chord progression from MIDI files and musical tones includes:
(a) And analyzing the MIDI file to obtain the playing speed of the MIDI, the time interval between two adjacent playing speeds and the piano rolling diagram.
The playing speed is represented by bpm, and if MIDI is played at non-uniform speed, the interval between two adjacent playing speeds is also required to be obtained. The piano roller shutter is represented by piano_roll, and is a two-dimensional array, the abscissa is time step, the ordinate is pitch, and each value in the two-dimensional array represents the loudness of each pitch at each time step.
(b) And carrying out statistical processing on the piano roller shutter according to the fine granularity to obtain a pitch statistical array.
In one embodiment, the statistical processing of the piano roller shutter according to the fine granularity to obtain the pitch statistical array comprises:
compressing the piano roller shutter according to fine granularity into a pre-statistics array frames;
after normalization processing is carried out on the pre-statistics array, extracting the maximum normalization value of each pitch class, and forming an intermediate statistics array frame by each pitch class and the corresponding maximum normalization value;
and extracting pitch categories larger than a threshold value in the intermediate statistical array to form a pitch statistical array tunes.
In the embodiment, the compressing mode is to add all pitches in the beat corresponding to each fine granularity according to rows to obtain a loudness value of each pitch in the fine granularity, then use 128 pitches as ordinate, fine granularity as abscissa, loudness values of each pitch in the fine granularity as element values to form a 1×128 one-dimensional array as a pre-statistics array frames.
The normalization mode is to divide all loudness values in the pre-statistics array frames by the maximum loudness value to obtain normalization values, wherein the normalization values are numerical values between 0 and 1, namely, each pitch corresponds to one normalization value between 0 and 1, then the normalization values of all pitches corresponding to each pitch category are counted, the maximum normalization of the pitch is extracted as the maximum normalization value of the pitch category, then the pitch category and the corresponding maximum normalization value form an intermediate statistics array frame, and the intermediate statistics array frame is a 1 multiplied by 12 one-dimensional array because the total number of the pitch categories is 12.
After the intermediate statistical array frame is obtained, the pitch classes with larger maximum normalization value are extracted to form a pitch statistical array, so that a threshold value is set for screening, and the pitch classes larger than the threshold value in the intermediate statistical array are screened to form a pitch statistical array tones. The threshold is set to 0.1 by way of example, and may be modified according to practical application, and is not particularly limited herein.
(c) When the pitch statistics array is in the length range, chords which are uniquely matched with the pitch statistics array are obtained from a chord database, and are determined to be decision chords of the MIDI file under the current fine granularity, and the corresponding correlation degree is 100.
The length range of the pitch statistics array is set, that is, the number range of the pitch categories in the pitch statistics array is (a, b), a is the minimum value of the length range, b is the maximum value of the length range, a < b, when the pitch statistics array is in the length range, the number x of the pitch categories in the pitch statistics array satisfies a < x less than or equal to b.
The chord database is a database of one-to-one mapping of tone pitch classes and chords, each chord containing a+1 to b tone pitch classes, for example, chord C is composed of { "C", "D", "E" }. The chord database covers all common chords mentioned in the music theory, has strong expandability, and can directly add chords in the database if more complex curved formulas are encountered.
When the tone pitch statistic array is within the length range, it is preliminarily considered that the chord of the tone pitch statistic array should be matched in the chord database, and therefore, the chord identical to the tone pitch statistic array is searched for as a uniquely matched chord from the chord database, and the chord is the decision chord of the MIDI file under the current fine granularity, and the corresponding correlation degree is 100 because the matched chord is identical to the tone pitch class of the tone pitch statistic array.
(d) When the pitch statistic array is larger than the maximum value of the length range, calculating the correlation degree between all chords in the chord database and the original pitch set according to the musical scale, and further determining the decision chord and the corresponding correlation degree of the MIDI file under the current fine granularity.
When the length of the pitch statistics array is greater than the maximum value b of the length range, the number of the pitch categories exceeds the number of the pitch categories contained in each chord of the chord database, and the chord cannot be directly matched and determined, so that the nearest chord is determined to be the decision chord by adopting a mode of calculating the correlation degree.
In another embodiment, when the pitch statistics array is greater than the maximum value of the length range, traversing all chords in the chord database, and acquiring the same pitch class composition set as the pitch statistics array for each chord;
when the length of the set is smaller than the minimum value of the length range, directly outputting the decision chord of the MIDI file under the current fine granularity as music tonality, wherein the corresponding relativity is-1;
when the length of the set is larger than the minimum value of the length range, calculating a first correlation degree of each chord and the musical tone in the chord database, and simultaneously calculating a second correlation degree of each chord and an original pitch set frame, wherein the sum of the first correlation degree and the second correlation degree is taken as a final correlation degree of each chord;
when the maximum total correlation is larger than the correlation threshold, the chord corresponding to the maximum total correlation is selected as the decision chord of the MIDI file under the current fine granularity, and the corresponding total correlation is the final correlation of the decision chord.
When the maximum total correlation degree max_similarity is obtained, the correlation degree threshold value is needed to be judged, and when the maximum total correlation degree is larger than the correlation degree threshold value, the chord max_chord used for calculating the maximum total correlation degree is used as the judging chord of the MIDI file under the current fine granularity, and the corresponding total correlation degree is the final correlation degree of the judging chord. When the maximum total correlation is smaller than or equal to the correlation threshold, the decision chord of the MIDI file under the current fine granularity is directly output as music tonality, and the corresponding correlation is-1. The correlation threshold may be, for example, 2.
In the embodiment, the dot product of each chord and musical tone in the chord database is directly calculated as the correlation degree.
(e) When the pitch statistics array is smaller than the minimum value of the length range, the decision chord of the MIDI file under the current fine granularity is directly output as the musical tone, and the corresponding correlation degree is-1.
(f) The decision chord and the corresponding duration are combined into a chord progression.
Chord progression refers to chord and duration composition, examples being: [ 'EbM', 4, 'Ab',2, 'Bb7',2, 'c_minor',2], indicates the chord progression of the track: ebM9, ab, bb7, C_Minor; the duration of each chord is 4 beats, 2 beats, respectively. Of particular note is that the data in the default MIDI files in this method are all 4/4 beats.
And 4, fusing the chord progression under a plurality of fine granularity to obtain the final chord progression of the MIDI sequence.
Through step 3, chord actions under each fine granularity can be obtained, and in order to improve the accuracy of chord action identification, chord actions under each fine granularity also need to be fused, specifically, chord actions under a plurality of fine granularities are fused, and obtaining the final chord action of the MIDI sequence includes:
for each beat, the chord with the greatest correlation and the corresponding duration are selected to constitute the final chord progression of the MIDI sequence.
Fig. 6 is a schematic diagram of chord progression fusion at multiple fine granularity provided by an embodiment of the present invention. As shown in fig. 6, the first row is the output of the best step=1, there are four chords ("c_minor", "Eb", "c_minor", "Bb") corresponding to the four correlations (80, 100, -1, 100), respectively, the second row is two chords ("Eb" ) corresponding to the two correlations (95, 100), and the third row is one chord ("EbM 9") corresponding to the one correlation (90). The label fusion method aligns three outputs on a time axis, compares the conditions of higher correlation degree in a beat-by-beat mode, records the higher correlation degree to a final result, and finally carries out chord progression ("Eb", 1, "Eb",1, "Bb",1, "Bb", 1), wherein the added number after each chord represents the continuous beat number of the chord.
The MIDI sequence chord identification method provided by the embodiment can identify the chord according to different fine granularity so as to improve the accuracy of chord identification, is simple and can be industrially applied.
The embodiment also provides a MIDI sequence chord progression identification device, a computer memory, a computer processor and a computer program stored in the computer memory and executable on the computer processor, wherein the computer memory stores a relation size tuning height set, and the computer processor realizes the MIDI sequence chord progression identification method when executing the computer program.
It should be noted that, the apparatus for identifying a MIDI sequence and the method for identifying a MIDI sequence and a chord provided in the above embodiments belong to the same concept, and detailed implementation processes of the apparatus are shown in the method for identifying a MIDI sequence and a chord, which are not described herein.
In practical applications, the computer memory may be a volatile memory at the near end, such as a RAM, or may be a volatile memory, such as a ROM, a FLASH, a floppy disk, a mechanical hard disk, or may be a remote storage cloud. The computer processor may be a Central Processing Unit (CPU), a Microprocessor (MPU), a Digital Signal Processor (DSP), or a Field Programmable Gate Array (FPGA), i.e. the MIDI sequence and chord identification method steps may be implemented by these processors.
The MIDI sequence chord progression identification device provided by the embodiment can conduct chord progression identification according to different fine granularity so as to improve the accuracy of chord progression identification, and the method is simple and can be industrially applied.
The foregoing detailed description of the preferred embodiments and advantages of the invention will be appreciated that the foregoing description is merely illustrative of the presently preferred embodiments of the invention, and that no changes, additions, substitutions and equivalents of those embodiments are intended to be included within the scope of the invention.

Claims (8)

1. A MIDI sequence chord identification method, comprising the steps of:
acquiring MIDI files and target tracks;
identifying musical tunability on the target track according to the MIDI file;
determining a plurality of fine granularity of chord identification, determining chord progression under each fine granularity according to MIDI files and music tonality, comprising:
analyzing the MIDI file to obtain the playing speed of MIDI, the time interval between two adjacent playing speeds and the rolling diagram of piano; carrying out statistical processing on the piano roller shutter according to the fine granularity to obtain a pitch statistical array; when the pitch statistic array is in the length range, obtaining the chord uniquely matched with the pitch statistic array from a chord database, determining the chord as the decision chord of the MIDI file under the current fine granularity, wherein the corresponding correlation degree is 100; when the pitch statistics array is larger than the maximum value of the length range, calculating the correlation degree between all chords in the chord database and the original pitch set according to the musical scale, and further determining the decision chord and the corresponding correlation degree of the MIDI file under the current fine granularity; when the pitch statistics array is smaller than the minimum value of the length range, directly outputting the decision chord of the MIDI file under the current fine granularity as music tonality, wherein the corresponding relativity is-1; forming the decision chord and the corresponding duration into a chord progression;
fusing chords at a plurality of fine granularity, comprising: and aligning the correlation degrees on a time axis, comparing the similarity degrees beat by beat, taking the chord with high correlation degrees as a final chord, and selecting the chord with the maximum correlation degree and the corresponding duration time for each beat to form the final chord of the MIDI sequence.
2. The MIDI sequence chord progression identification method according to claim 1, wherein the identifying musical key on the target track from the MIDI file comprises:
constructing a pitch distribution histogram with the abscissa as a pitch class and the ordinate as the number of pitches for all notes of the MIDI file on the target track;
screening pitch categories with the number of not 0 from the pitch distribution histogram to form an original pitch set;
when the length of the original pitch set is equal to 7, performing the tone hard matching, namely matching the same matched pitch set from a pitch set library to determine tone main tones, determining tone according to the relation size tone high set, and determining the tone by combining the tone main tones and the tone;
when the length of the original pitch set is not equal to 7 or the same matched pitch set is not matched from the pitch set library, the soft-tone matching is performed, i.e. the tone is determined according to the correlation of the matched pitch set and the original pitch set in the pitch set library.
3. A MIDI sequence chord progression identification method according to claim 2, wherein when the tone is hard matched, the same matched tone pitch set as the original tone pitch set is matched from the tone pitch set library, and the tone pitch master of the matched tone pitch set is used as the tone pitch master of the original tone pitch set;
calculating cross-correlation coefficients of the original pitch set and a relation size tuning high set respectively, and taking a major or minor tone corresponding to the large cross-correlation coefficient as a tuning mode of the original pitch set;
the tonality of the original pitch set is determined in combination with tonality dominant and tonality.
4. A MIDI sequence chord progression identification method according to claim 2, wherein in the soft matching of the tone pitch, the cross correlation coefficient of each matching pitch set in the pitch set library with the original pitch set is calculated, and the tone pitch of the matching pitch set corresponding to the largest cross correlation coefficient is taken as the tone pitch of the original pitch set.
5. A MIDI sequence chord progression identification method according to claim 2 or 4, wherein upon soft matching of the tone, after determining the tone of the original tone pitch set based on the correlation of the matching tone pitch set with the original tone pitch set, the last five degrees of tone of the tone pitch set are obtained;
comparing the original pitch set corresponding to the original pitch with the upper five-degree pitch set corresponding to the upper five-degree pitch, finding a first pitch category which does not belong to the upper five-degree pitch set from the original pitch set, and finding a second pitch category which does not belong to the original pitch set from the upper five-degree pitch set;
and taking the original tone or the upper five-degree tone corresponding to the pitch set to which the first pitch class or the second pitch class with the largest number of pitch classes belongs as the final tone.
6. The MIDI sequence chord progression identification method according to claim 1, wherein the statistically processing the piano roller shutter according to the fine granularity to obtain the pitch statistical array comprises:
compressing the piano roller shutter graph into a pre-statistics array according to the fine granularity;
after normalization processing is carried out on the pre-statistics array, extracting the maximum normalization value of each pitch class, and forming an intermediate statistics array by each pitch class and the corresponding maximum normalization value;
and extracting pitch categories larger than a threshold value in the intermediate statistical array to form a pitch statistical array.
7. The MIDI sequence chord identification method according to claim 1, wherein when the pitch statistic array is greater than the maximum value of the length range, all chords in the chord database are traversed, and the same pitch class composition set as the pitch statistic array is obtained for each chord;
when the length of the set is smaller than the minimum value of the length range, directly outputting the decision chord of the MIDI file under the current fine granularity as music tonality, wherein the corresponding relativity is-1;
when the length of the set is larger than the minimum value of the length range, calculating a first correlation degree of each chord and the musical tone in the chord database, and simultaneously calculating a second correlation degree of each chord and the original pitch set, wherein the sum of the first correlation degree and the second correlation degree is taken as the total correlation degree of each chord;
when the maximum total correlation is larger than the correlation threshold, the chord corresponding to the maximum total correlation is selected as the decision chord of the MIDI file under the current fine granularity, and the corresponding total correlation is the final correlation of the decision chord.
8. A MIDI sequence chord progression identification apparatus, a computer memory, a computer processor and a computer program stored in the computer memory and executable on the computer processor, wherein there is a set of relationship size tuning heights stored in the computer memory, the computer processor implementing the MIDI sequence chord progression identification method according to any one of claims 1 to 7 when executing the computer program.
CN202010554464.2A 2020-06-17 2020-06-17 MIDI sequence chord identification method and device Active CN111696500B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010554464.2A CN111696500B (en) 2020-06-17 2020-06-17 MIDI sequence chord identification method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010554464.2A CN111696500B (en) 2020-06-17 2020-06-17 MIDI sequence chord identification method and device

Publications (2)

Publication Number Publication Date
CN111696500A CN111696500A (en) 2020-09-22
CN111696500B true CN111696500B (en) 2023-06-23

Family

ID=72481713

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010554464.2A Active CN111696500B (en) 2020-06-17 2020-06-17 MIDI sequence chord identification method and device

Country Status (1)

Country Link
CN (1) CN111696500B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112927667B (en) * 2021-03-26 2024-05-14 平安科技(深圳)有限公司 Chord identification method, device, equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1996004642A1 (en) * 1994-08-01 1996-02-15 Zeta Music Partners Timbral apparatus and method for musical sounds
CN102479509A (en) * 2010-11-29 2012-05-30 财团法人资讯工业策进会 Melody recognition method and device thereof
CN107301857A (en) * 2016-04-15 2017-10-27 青岛海青科创科技发展有限公司 A kind of method and system to melody automatically with accompaniment
US10008188B1 (en) * 2017-01-31 2018-06-26 Kyocera Document Solutions Inc. Musical score generator
CN109166566A (en) * 2018-08-27 2019-01-08 北京奥曼特奇科技有限公司 A kind of method and system for music intelligent accompaniment
CN109493879A (en) * 2018-12-24 2019-03-19 成都嗨翻屋科技有限公司 Music rhythm rhythm analyzes extracting method and device
CN109859739A (en) * 2019-01-04 2019-06-07 平安科技(深圳)有限公司 Melody generation method, device and terminal device based on speech synthesis
CN110580713A (en) * 2019-08-30 2019-12-17 武汉大学 Satellite video target tracking method based on full convolution twin network and track prediction

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4244133B2 (en) * 2002-11-29 2009-03-25 パイオニア株式会社 Music data creation apparatus and method
GB2443656B (en) * 2006-11-13 2009-10-07 Sony Comp Entertainment Europe A data storage device and method
US9035162B2 (en) * 2011-12-14 2015-05-19 Smule, Inc. Synthetic multi-string musical instrument with score coded performance effect cues and/or chord sounding gesture capture
WO2013164661A1 (en) * 2012-04-30 2013-11-07 Nokia Corporation Evaluation of beats, chords and downbeats from a musical audio signal
CN103093748B (en) * 2013-01-31 2014-11-05 成都玉禾鼎数字娱乐有限公司 Method of automatically matching chord for known melody
CN104134380A (en) * 2013-05-03 2014-11-05 张胜祥 Electronic musical instrument simulation learning tool
US9967158B2 (en) * 2015-06-05 2018-05-08 Cisco Technology, Inc. Interactive hierarchical network chord diagram for application dependency mapping
CN107229629B (en) * 2016-03-24 2021-03-19 腾讯科技(深圳)有限公司 Audio recognition method and device
US10379502B2 (en) * 2016-04-11 2019-08-13 Accenture Global Solutions Limited Control system with machine learning time-series modeling
US10424280B1 (en) * 2018-03-15 2019-09-24 Score Music Productions Limited Method and system for generating an audio or midi output file using a harmonic chord map
CN109979483B (en) * 2019-03-29 2020-11-03 广州市百果园信息技术有限公司 Melody detection method and device for audio signal and electronic equipment
CN110569870A (en) * 2019-07-25 2019-12-13 中国人民解放军陆军工程大学 deep acoustic scene classification method and system based on multi-granularity label fusion
CN110459196A (en) * 2019-09-05 2019-11-15 长沙市回音科技有限公司 A kind of method, apparatus and system adjusting singing songs difficulty

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1996004642A1 (en) * 1994-08-01 1996-02-15 Zeta Music Partners Timbral apparatus and method for musical sounds
CN102479509A (en) * 2010-11-29 2012-05-30 财团法人资讯工业策进会 Melody recognition method and device thereof
CN107301857A (en) * 2016-04-15 2017-10-27 青岛海青科创科技发展有限公司 A kind of method and system to melody automatically with accompaniment
US10008188B1 (en) * 2017-01-31 2018-06-26 Kyocera Document Solutions Inc. Musical score generator
CN109166566A (en) * 2018-08-27 2019-01-08 北京奥曼特奇科技有限公司 A kind of method and system for music intelligent accompaniment
CN109493879A (en) * 2018-12-24 2019-03-19 成都嗨翻屋科技有限公司 Music rhythm rhythm analyzes extracting method and device
CN109859739A (en) * 2019-01-04 2019-06-07 平安科技(深圳)有限公司 Melody generation method, device and terminal device based on speech synthesis
CN110580713A (en) * 2019-08-30 2019-12-17 武汉大学 Satellite video target tracking method based on full convolution twin network and track prediction

Also Published As

Publication number Publication date
CN111696500A (en) 2020-09-22

Similar Documents

Publication Publication Date Title
US7250567B2 (en) Automatic musical composition classification device and method
Dixon et al. Towards Characterisation of Music via Rhythmic Patterns.
US20210335333A1 (en) Computing orders of modeled expectation across features of media
US8442816B2 (en) Music-piece classification based on sustain regions
US20110225196A1 (en) Moving image search device and moving image search program
US10297241B2 (en) Sound signal processing method and sound signal processing apparatus
CN111739491B (en) Method for automatically editing and allocating accompaniment chord
CN113192471A (en) Music main melody track identification method based on neural network
CN111696500B (en) MIDI sequence chord identification method and device
Hou et al. Transfer learning for improving singing-voice detection in polyphonic instrumental music
CA2740638A1 (en) Method for analyzing a digital music audio signal
CN112634841B (en) Guitar music automatic generation method based on voice recognition
Lindenbaum et al. Musical key extraction using diffusion maps
CN110134823B (en) MIDI music genre classification method based on normalized note display Markov model
Febirautami et al. Determining characteristics of popular local songs in indonesia's music market
Ramirez et al. A rule-based evolutionary approach to music performance modeling
JP3934556B2 (en) Method and apparatus for extracting signal identifier, method and apparatus for creating database from signal identifier, and method and apparatus for referring to search time domain signal
Ciamarone et al. Automatic Dastgah recognition using Markov models
Peiris et al. Supervised learning approach for classification of Sri Lankan music based on music structure similarity
Yao et al. [Retracted] Research on Segmentation Experience of Music Signal Improved Based on Maximization of Negative Entropy
Paiement Probabilistic models for music
JP2004531758A5 (en)
Tideman Organization of Electronic Dance Music by Dimensionality Reduction
Saikkonen Structural analysis of recorded music
MOLGORA Musical instrument recognition: a transfer learning approach

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant