CN112863465B - Context information-based music generation method, device and storage medium - Google Patents

Context information-based music generation method, device and storage medium Download PDF

Info

Publication number
CN112863465B
CN112863465B CN202110107935.XA CN202110107935A CN112863465B CN 112863465 B CN112863465 B CN 112863465B CN 202110107935 A CN202110107935 A CN 202110107935A CN 112863465 B CN112863465 B CN 112863465B
Authority
CN
China
Prior art keywords
sequence
music
melody
information
tuple list
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
CN202110107935.XA
Other languages
Chinese (zh)
Other versions
CN112863465A (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.)
Sun Yat Sen University
Original Assignee
Sun Yat Sen University
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 Sun Yat Sen University filed Critical Sun Yat Sen University
Priority to CN202110107935.XA priority Critical patent/CN112863465B/en
Publication of CN112863465A publication Critical patent/CN112863465A/en
Application granted granted Critical
Publication of CN112863465B publication Critical patent/CN112863465B/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/0008Associated control or indicating means
    • G10H1/0025Automatic or semi-automatic music composition, e.g. producing random music, applying rules from music theory or modifying a musical piece
    • 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
    • G10H2210/00Aspects or methods of musical processing having intrinsic musical character, i.e. involving musical theory or musical parameters or relying on musical knowledge, as applied in electrophonic musical tools or instruments
    • G10H2210/101Music Composition or musical creation; Tools or processes therefor
    • G10H2210/111Automatic composing, i.e. using predefined musical rules
    • 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
    • G10H2210/00Aspects or methods of musical processing having intrinsic musical character, i.e. involving musical theory or musical parameters or relying on musical knowledge, as applied in electrophonic musical tools or instruments
    • G10H2210/101Music Composition or musical creation; Tools or processes therefor
    • G10H2210/145Composing rules, e.g. harmonic or musical rules, for use in automatic composition; Rule generation algorithms therefor
    • 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
    • G10H2250/00Aspects of algorithms or signal processing methods without intrinsic musical character, yet specifically adapted for or used in electrophonic musical processing
    • G10H2250/311Neural networks for electrophonic musical instruments or musical processing, e.g. for musical recognition or control, automatic composition or improvisation

Landscapes

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

Abstract

The invention discloses a music generation method, a device and a storage medium based on context information, wherein the method comprises the following steps: acquiring a music information file; converting a plurality of notes in the music information file into a first sequence of element lists; a melody generation step; extracting the tail of the first melody sequence to obtain a first tail sound sequence; inputting the first tail sound sequence into a preset neural network model based on the context information to obtain a first tail sound sequence; repeating the melody generating step, the step between the melody generating step and the melody connecting step, and the melody connecting step N times; taking the second tuple list sequence obtained in the Nth melody connection execution step as a final tuple list sequence; and decoding the final tuple list sequence to obtain a new music information file. By adopting the embodiment of the invention, the practicability of music generation can be improved.

Description

Context information-based music generation method, device and storage medium
Technical Field
The present invention relates to the field of artificial intelligence technologies, and in particular, to a method and apparatus for generating music based on context information, and a storage medium.
Background
The music generation method can be classified into a rule-based system and a neural network system according to the structure of the model and the manner in which the data is processed. The main ideas of the rule-based system are: based on a set of pre-made parameters, typically implemented through a set of tests or rules, to compose musical compositions of the same style or genre. The computer needs to meet the tests or rules when generating music, and finally the music works meeting the requirements are obtained. The main ideas of the neural network system are as follows: the program itself contains little or no specific music theory. They automatically learn the intrinsic rules from example material provided by the user or programmer and then generate a musical composition similar to the example material based on these self-learned rules.
Prior to the popularity of neural networks, the generation of music using rule-based systems was the most common music generation solution. However, these solutions involve a large number of subjective choices that are difficult to verify, resulting in the quality of the resulting work often being unsatisfactory.
In recent years, in order to achieve automatic generation of high-quality music, many researchers have proposed new schemes based on neural networks. With the advent of more and more music data sets, music generation models will be able to better learn the style of music from the corpus and generate new score. At present, a music generation model based on a neural network mainly comprises a cyclic neural network, a convolution neural network and a generation type countermeasure network.
However, current neural network-based music generation methods fail to generate chords or notes shorter in duration than the sixteenth note or in irregular rhythms, nor emphasize the specificity of the ending portion of the music so that the generated music lacks a distinct ending.
Disclosure of Invention
The embodiment of the invention provides a music generating method, a device and a storage medium based on context information, which adopts a tuple list to represent any rhythm and any chord in a music information file, and finally generates an ending sequence through an ending generating model, so that the generated music has obvious ending characteristics, and the practicability of the generated music is improved.
A first aspect of an embodiment of the present application provides a music generating method based on context information, the method including:
acquiring a music information file; the music information file contains a plurality of notes and ordering information among the notes;
converting a plurality of notes in the music information file into a first tuple list sequence, and taking the first tuple list sequence as an initial tuple list sequence; each tuple in the first tuple list sequence corresponds to a note, and each tuple contains duration information and pitch information of the corresponding note; the pitch information includes absolute pitch information of a corresponding note;
melody generation step: generating a first melody sequence according to the initial tuple list sequence;
extracting the tail of the first melody sequence to obtain a first tail sound sequence; the tail consists of M tuples arranged at the last of the first melody sequence, wherein M is more than or equal to 1;
inputting the first tail sound sequence into a preset neural network model based on the context information to obtain a first tail sound sequence;
melody connection step: connecting the first ending sequence with the first melody sequence to obtain a second tuple list sequence, and taking the second tuple list sequence as the initial tuple list sequence;
repeating the melody generating step, the steps from the melody generating step to the melody connecting step, and the melody connecting step for N times, wherein N is greater than or equal to 1; taking the second tuple list sequence obtained in the Nth melody connection execution step as a final tuple list sequence;
and decoding the final tuple list sequence to obtain a new music information file.
In a possible implementation manner of the first aspect, the converting the plurality of notes in the music information file into a first tuple list sequence, and taking the first tuple list sequence as an initial tuple list sequence, further includes:
traversing all the tones of the initial tuple list sequence in a semitone displacement mode, and changing absolute pitches of notes corresponding to the initial tuple list sequence to obtain the initial tuple list sequence with enlarged data volume.
In a possible implementation manner of the first aspect, the converting the plurality of notes in the music information file into a first tuple list sequence, and taking the first tuple list sequence as an initial tuple list sequence specifically includes:
representing each note in the music information file as a corresponding tuple, each tuple containing duration information and pitch information of the corresponding note; the duration information is represented by a rational number, and the pitch information is represented by a character string.
In a possible implementation manner of the first aspect, the generating a first melody sequence according to the initial tuple list sequence specifically includes:
extracting past information and future information of the initial tuple list sequence; the past information is a forward sequence with respect to the initial tuple list sequence, and the future information is a reverse sequence with respect to the initial tuple list sequence;
and inputting the past information and the future information into a deep bidirectional LSTM network model to obtain a first melody sequence.
In a possible implementation manner of the first aspect, the neural network model based on the context information is a model based on a deep unidirectional LSTM network.
In a possible implementation manner of the first aspect, the music information file is a MIDI file.
A second aspect of the embodiments of the present application provides a music generating apparatus based on context information, including:
the music acquisition module is used for acquiring a music information file; the music information file contains a plurality of notes and ordering information among the notes;
a data encoding module for converting a plurality of notes in the music information file into a first tuple list sequence and using the first tuple list sequence as an initial tuple list sequence; each tuple in the first tuple list sequence corresponds to a note, and each tuple contains duration information and pitch information of the corresponding note; the pitch information includes absolute pitch information of a corresponding note;
a melody generating module, configured to generate a first melody sequence according to the initial tuple list sequence;
the ending generating module is used for extracting the end of the first melody sequence to obtain a first tail sound sequence; the tail consists of M tuples arranged at the last of the first melody sequence, wherein M is more than or equal to 1;
the ending generating module is further configured to input the first tail sound sequence into a preset neural network model based on context information, so as to obtain a first ending sequence;
the ending generating module is further configured to connect the first ending sequence with the first melody sequence to obtain a second tuple list sequence, and use the second tuple list sequence as a final tuple list sequence;
and the music decoding module is used for decoding the final tuple list sequence to obtain a new music information file.
A third aspect of the embodiments of the present application provides a computer readable storage medium, including a stored computer program, where the computer readable storage medium is controlled to execute the music generating method based on the context information according to the above embodiments when the computer program runs.
Compared with the prior art, the method, the device and the storage medium for generating the music based on the context information provided by the embodiment of the invention adopt the tuple list representation method to represent the special rhythm and chord in the music information file, and completely convert the time value and the pitch information in the music information file into the tuple list sequence. In the tuple, the duration of each note is represented by a positive rational number, capable of representing any duration; since the pitch attribute is stored in the form of a string, a plurality of pitches can be filled in while also well supporting the representation of chords. A tail generation model is also introduced, specifically for generating a tail, ensuring that the generated music has obvious tail characteristics. The ending generating model can ensure that all ending has ending feeling, does not depend on post-processing, greatly reduces the dependence on the self composing capability of a user, and greatly improves the practicability of music generation and the practicability of generated music.
In addition, before the melody sequence is generated, the tone of the music in the tuple sequence can be expanded, so that the sufficient data can be ensured under each tone number. It not only ensures that the music generation model can generate music of any tonality, but also greatly expands the available music data set.
Drawings
Fig. 1 is a flowchart of a music generating method based on context information according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a music generating apparatus based on context information according to an embodiment of the present invention;
FIG. 3 is an exemplary diagram of a method for representing a list of tuples according to an embodiment of the present invention;
FIG. 4 is a schematic diagram illustrating the operation of a melody generating module according to an embodiment of the present invention;
fig. 5 is a schematic diagram illustrating the operation of an end generating module according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, a first aspect of an embodiment of the present invention provides a music generating method based on context information, the method including:
s10, acquiring a music information file; the music information file includes a plurality of notes and ranking information between the plurality of notes.
S11, converting a plurality of notes in the music information file into a first tuple list sequence, and taking the first tuple list sequence as an initial tuple list sequence; each tuple in the first tuple list sequence corresponds to a note, and each tuple contains duration information and pitch information of the corresponding note; the pitch information includes absolute pitch information of a corresponding note.
S12, melody generation: a first melody sequence is generated from the initial tuple list sequence.
S13, extracting the tail end of the first melody sequence to obtain a first tail sound sequence; the end consists of M tuples arranged at the end of the first melody sequence, M being greater than or equal to 1.
S14, inputting the first tail sound sequence into a preset neural network model based on the context information to obtain a first tail sound sequence.
S15, melody connection: and connecting the first ending sequence with the first melody sequence to obtain a second tuple list sequence, and taking the second tuple list sequence as the initial tuple list sequence.
S16, repeatedly executing the melody generation step, the steps from the melody generation step to the melody connection step and the melody connection step for N times, wherein N is greater than or equal to 1; and taking the second tuple list sequence obtained by the Nth execution of the melody connection step as a final tuple list sequence.
S17, decoding the final tuple list sequence to obtain a new music information file.
In S16, the loop is executed for N times from S12 to S16, which is to repeatedly iterate the tuple list, and the iteration can ensure the whole harmony of the recorded music in the finally output music information file to the greatest extent.
Compared with the prior art, the method, the device and the storage medium for generating the music based on the context information provided by the embodiment of the invention adopt the tuple list representation method to represent the special rhythm and chord in the music information file, and completely convert the time value and the pitch information in the music information file into the tuple list sequence. In the tuple, the duration of each note is represented by a positive rational number, capable of representing any duration; since the pitch attribute is stored in the form of a string, a plurality of pitches can be filled in while also well supporting the representation of chords. A tail generation model is also introduced, specifically for generating a tail, ensuring that the generated music has obvious tail characteristics. The ending generating model can ensure that all ending has ending feeling, and meanwhile, the post-processing is not relied on, so that the dependence on the self-composing capability of a user is greatly reduced.
Illustratively, S11 further comprises, thereafter:
traversing all the tones of the initial tuple list sequence in a semitone displacement mode, and changing absolute pitches of notes corresponding to the initial tuple list sequence to obtain the initial tuple list sequence with enlarged data volume.
In contrast to the conventional method of unifying the musical tones of the music data to the basic tone, in this step, the pitch of all the music data in the sequence of the tuple list is traversed by the semitone displacement in the range of [ -6, +6) for all the musical tones, so that equal parts of the music data are ensured to be available under any musical tone and sufficient amount of the music data provide learning materials for the model. Eventually, the amount of available music data can be expanded up to 12 times compared to the original data set.
Since only the main sound is changed without changing the tuning class when the data is enhanced, the style characteristics of the music information file are preserved. Although the transposition changes the absolute pitch of the notes, the rhythm of the notes, the relative pitch between notes, are not changed. Therefore, the rest of the information of the music information file is unchanged except for the change of the musical range, and the style of the music information file is not changed.
Illustratively, S11 specifically includes:
representing each note in the music information file as a corresponding tuple, each tuple containing duration information and pitch information of the corresponding note; the duration information is represented by a rational number, and the pitch information is represented by a character string.
Referring to fig. 3, each note in the music information file is represented as a tuple: (D, P), wherein D represents the duration of the note, expressed in rational numbers; p represents the pitch of a note and is represented by a string. In particular, when the note is a chord, P will contain a plurality of pitches, and in this representation the chord will be converted into a string containing a plurality of pitch information; and when the note is a rest, P will contain a symbol indicating that it is an unsigned note.
The tuple list representation method can well represent the music information files containing special rhythm type and chords, and lays a foundation for the implementation of the music generation method supporting the two special notes.
It should be noted that fig. 3 is a schematic example of a data element list with special rhythms and chords. For the conventional cadence, its time value is expressed in decimal form; for a particular cadence pattern, its time value is expressed in fractional form. For a single tone, its pitch is represented as a corresponding tone name and tone group; for a chord, its pitch is converted to a digital sequence.
Illustratively, S12 specifically includes:
extracting past information and future information of the initial tuple list sequence; the past information is a forward sequence with respect to the initial tuple list sequence and the future information is a reverse sequence with respect to the initial tuple list sequence.
And inputting the past information and the future information into a deep bidirectional LSTM network model to obtain a first melody sequence.
The first melody sequence is generated using a bi-directional structure whose basic idea is to represent each sequence in forward and reverse directions to two separate recursive hidden layers, eventually connected to the same output layer. The bi-directional structure provides complete, symmetrical past and future information for each note generated, which enables a more accurate prediction and generation of melody sequences.
Referring to fig. 4, a tuple list sequence L is an input layer, a melody sequence M is an output layer, and H is a hidden layer. After the input music information file is obtained, the music information file is sampled and encoded, and converted into the initial tuple list sequence l= (L) 1 ,…,l t ,…,l T ) Where T represents the length of the original tuple list sequence. Then, the past information and the future information are extracted from L as inputs of the N-layer depth bidirectional LSTM network model. Finally, the network will output a melody sequence m= (M 1 ,…,m k ,…,m K ) And transmitting to an ending generation module, wherein K represents the length of the melody sequence.
In practice, a deep bi-directional LSTM network can be seen as optimizing a differentiable error function:
Figure BDA0002918203630000081
wherein S is train Represents the total number of sequences in the training data and w is the weight between the network nodes. The model training aim is to minimize the cross entropy loss function, namely the Melody sequence M= (M) obtained by comparison model generation 1 …,m k ,…,m K ) And real data
Figure BDA0002918203630000082
Differences between them. For a particular input sequence j, the error function may be expressed as:
Figure BDA0002918203630000083
wherein K is j Is the length of the sequence j, C num Is the number of classifications. In each iteration of the step, the model calculates the weight w and bias value b by the following formula:
S dw (r)=β·S dw (r-1)+(1-β)dw 2 (r-1),
S db (r)=β·S db (r-1)+(1-β)db 2 (r-1),
Figure BDA0002918203630000084
Figure BDA0002918203630000091
in the above formula, S dw (r) and S db (r) is the exponentially weighted average of dw and db in the r-th iteration, β is the momentum value, α is the learning rate, and w (r) and b (r) are the updated values of the weights w and bias values b, respectively, after the r-th iteration. Epsilon is a decimal to provide stability of the value. If the verification error is not obvious after the R-th iterationThe model considers it to have converged.
Illustratively, the context information based neural network model is a deep unidirectional LSTM network based model.
To accurately predict and take into account information that is not available after the end, neural network models use deep unidirectional LSTM networks to generate the end portion. As shown in fig. 5, the input of the neural network model is the tail sequence c= (C) 1 ,…,c i ,…,c I ) Wherein I represents the length of the coding sequence. The tailnote sequence C is extracted from the end of the first melody sequence M. The output of this deep LSTM network is the ending sequence E, a fixed duration set of notes. The neural network model will link the first melody sequence M and the first ending sequence E as a new tuple list sequence L * . If the generation has not ended, L * Will be used as the original tuple sequence for the melody iteration generation to the next one. Otherwise, L * Will be decoded, converted and output as a new music information file.
During the generation process, the neural network model can continuously adjust the connection between the melody sequence M and the ending sequence E to make the transition sound more natural, and the ending generator can continuously reevaluate the new tuple list sequence L * Whether or not update to new end E is required * . It should be noted that this nonlinear creation process also corresponds to the way a human composer writes a spectrum.
Illustratively, the music information file is a MIDI file.
Referring to fig. 2, an embodiment of the present invention provides a music generating apparatus based on context information, including: the music retrieval module 20, the data encoding module 21, the melody generation module 22, the ending generation module 23, and the music decoding module 24.
A music acquisition module 20 for acquiring a music information file; the music information file contains a plurality of notes and ordering information among the notes;
a data encoding module 21 for converting a plurality of notes in the music information file into a first tuple list sequence, and taking the first tuple list sequence as an initial tuple list sequence; each tuple in the first tuple list sequence corresponds to a note, and each tuple contains duration information and pitch information of the corresponding note; the pitch information includes absolute pitch information of a corresponding note;
a melody generation module 22 for generating a first melody sequence from the initial tuple list sequence;
an ending generating module 23, configured to extract the end of the first melody sequence to obtain a first tail sound sequence; the tail consists of M tuples arranged at the last of the first melody sequence, wherein M is more than or equal to 1;
the ending generating module 23 is further configured to input the first tail sound sequence into a preset neural network model based on context information, to obtain a first ending sequence;
the ending generating module 23 is further configured to connect the first ending sequence with the first melody sequence to obtain a second tuple list sequence, and use the second tuple list sequence as a final tuple list sequence;
the music decoding module 24 is configured to decode the final tuple list sequence to obtain a new music information file.
Referring to fig. 2, a music generating apparatus frame of the present invention is shown. The device consists of a music acquisition module 20, a data encoding module 21, a melody generation module 22, a tail generation module 23 and a music decoding module 24, wherein the data encoding module 21 is responsible for converting an input music information file (MIDI) into a tuple list sequence; the melody generation module 22 will generate a new melody sequence based on the existing tuple list sequence; the ending generating module 23 extracts the ending sound sequence from the melody sequence and based on this output a matching ending part ending sequence, combines the melody sequence and the ending sequence. If the iteration has not ended, the combined sequence is taken as input to the melody generation module 22, otherwise it is fed to the music decoding module for decoding and output in MIDI file format as a new music information file.
A third aspect of the embodiments of the present application provides a computer readable storage medium, including a stored computer program, where the computer readable storage medium is controlled to execute the music generating method based on the context information according to the above embodiments when the computer program runs.
The computer readable storage medium of the embodiments of the present invention may be a computer readable signal medium or a computer readable storage medium or any combination of the two. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include at least the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable read-only memory (CDROM). In addition, the computer-readable storage medium may even be paper or other suitable medium upon which the program is printed, as the program may be electronically captured, via, for instance, optical scanning of the paper or other medium, then compiled, interpreted, or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory.
While the foregoing is directed to the preferred embodiments of the present invention, it will be appreciated by those skilled in the art that changes and modifications may be made without departing from the principles of the invention, such changes and modifications are also intended to be within the scope of the invention.

Claims (8)

1. A music generation method based on context information, comprising:
acquiring a music information file; the music information file contains a plurality of notes and ordering information among the notes;
converting a plurality of notes in the music information file into a first tuple list sequence, and taking the first tuple list sequence as an initial tuple list sequence; each tuple in the first tuple list sequence corresponds to a note, and each tuple contains duration information and pitch information of the corresponding note; the pitch information includes absolute pitch information of a corresponding note;
melody generation step: generating a first melody sequence according to the initial tuple list sequence;
extracting the tail of the first melody sequence to obtain a first tail sound sequence; the tail consists of M tuples arranged at the last of the first melody sequence, wherein M is more than or equal to 1;
inputting the first tail sound sequence into a preset neural network model based on the context information to obtain a first tail sound sequence;
melody connection step: connecting the first ending sequence with the first melody sequence to obtain a second tuple list sequence, and taking the second tuple list sequence as the initial tuple list sequence;
repeating the melody generating step, the steps from the melody generating step to the melody connecting step, and the melody connecting step for N times, wherein N is greater than or equal to 1; taking the second tuple list sequence obtained in the Nth melody connection execution step as a final tuple list sequence;
and decoding the final tuple list sequence to obtain a new music information file.
2. The context information based music generating method of claim 1, further comprising, after said converting a plurality of notes in said music information file into a first tuple list sequence and taking said first tuple list sequence as an initial tuple list sequence:
traversing all the tones of the initial tuple list sequence in a semitone displacement mode, and changing absolute pitches of notes corresponding to the initial tuple list sequence to obtain the initial tuple list sequence with enlarged data volume.
3. The method for generating music based on context information according to claim 1, wherein said converting a plurality of notes in said music information file into a first sequence of tuple list and using said first sequence of tuple list as an initial sequence of tuple list comprises:
representing each note in the music information file as a corresponding tuple, each tuple containing duration information and pitch information of the corresponding note; the duration information is represented by a rational number, and the pitch information is represented by a character string.
4. The method for generating music based on context information according to claim 1, wherein said generating a first melody sequence from said initial tuple list sequence comprises:
extracting past information and future information of the initial tuple list sequence; the past information is a forward sequence with respect to the initial tuple list sequence, and the future information is a reverse sequence with respect to the initial tuple list sequence;
and inputting the past information and the future information into a deep bidirectional LSTM network model to obtain a first melody sequence.
5. The method for generating music based on context information according to claim 1, wherein the neural network model based on context information is a model based on deep unidirectional LSTM network.
6. The music generating method based on context information according to claim 1, wherein the music information file is a MIDI file.
7. A music generating apparatus based on context information, comprising:
the music acquisition module is used for acquiring a music information file; the music information file contains a plurality of notes and ordering information among the notes;
a data encoding module for converting a plurality of notes in the music information file into a first tuple list sequence and using the first tuple list sequence as an initial tuple list sequence; each tuple in the first tuple list sequence corresponds to a note, and each tuple contains duration information and pitch information of the corresponding note; the pitch information includes absolute pitch information of a corresponding note;
a melody generating module, configured to generate a first melody sequence according to the initial tuple list sequence;
the ending generating module is used for extracting the end of the first melody sequence to obtain a first tail sound sequence; the tail consists of M tuples arranged at the last of the first melody sequence, wherein M is more than or equal to 1;
the ending generating module is further configured to input the first tail sound sequence into a preset neural network model based on context information, so as to obtain a first ending sequence;
the ending generating module is further configured to connect the first ending sequence with the first melody sequence to obtain a second tuple list sequence, and use the second tuple list sequence as a final tuple list sequence;
and the music decoding module is used for decoding the final tuple list sequence to obtain a new music information file.
8. A computer readable storage medium, characterized in that the computer readable storage medium comprises a stored computer program, wherein the computer program, when run, controls a device in which the computer readable storage medium is located to perform a music generating method based on context information according to any of claims 1-6.
CN202110107935.XA 2021-01-27 2021-01-27 Context information-based music generation method, device and storage medium Active CN112863465B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110107935.XA CN112863465B (en) 2021-01-27 2021-01-27 Context information-based music generation method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110107935.XA CN112863465B (en) 2021-01-27 2021-01-27 Context information-based music generation method, device and storage medium

Publications (2)

Publication Number Publication Date
CN112863465A CN112863465A (en) 2021-05-28
CN112863465B true CN112863465B (en) 2023-05-23

Family

ID=76009447

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110107935.XA Active CN112863465B (en) 2021-01-27 2021-01-27 Context information-based music generation method, device and storage medium

Country Status (1)

Country Link
CN (1) CN112863465B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113797541B (en) * 2021-09-06 2024-04-09 武汉指娱互动信息技术有限公司 Music game level generation method, device, equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6297439B1 (en) * 1998-08-26 2001-10-02 Canon Kabushiki Kaisha System and method for automatic music generation using a neural network architecture
JP2001337674A (en) * 2000-05-25 2001-12-07 Yamaha Corp Portable communication terminal device
JP2016099446A (en) * 2014-11-20 2016-05-30 カシオ計算機株式会社 Automatic music composition device, method, and program
CN109036355A (en) * 2018-06-29 2018-12-18 平安科技(深圳)有限公司 Automatic composing method, device, computer equipment and storage medium
KR101939001B1 (en) * 2017-12-06 2019-01-15 한국과학기술원 Method and System for Audio and Score Alignment of Music Using Neural Network-Based Automatic Music Transcription
CN109448683A (en) * 2018-11-12 2019-03-08 平安科技(深圳)有限公司 Music generating method and device neural network based
CN109448697A (en) * 2018-10-08 2019-03-08 平安科技(深圳)有限公司 Poem melody generation method, electronic device and computer readable storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9195656B2 (en) * 2013-12-30 2015-11-24 Google Inc. Multilingual prosody generation

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6297439B1 (en) * 1998-08-26 2001-10-02 Canon Kabushiki Kaisha System and method for automatic music generation using a neural network architecture
JP2001337674A (en) * 2000-05-25 2001-12-07 Yamaha Corp Portable communication terminal device
JP2016099446A (en) * 2014-11-20 2016-05-30 カシオ計算機株式会社 Automatic music composition device, method, and program
KR101939001B1 (en) * 2017-12-06 2019-01-15 한국과학기술원 Method and System for Audio and Score Alignment of Music Using Neural Network-Based Automatic Music Transcription
CN109036355A (en) * 2018-06-29 2018-12-18 平安科技(深圳)有限公司 Automatic composing method, device, computer equipment and storage medium
CN109448697A (en) * 2018-10-08 2019-03-08 平安科技(深圳)有限公司 Poem melody generation method, electronic device and computer readable storage medium
CN109448683A (en) * 2018-11-12 2019-03-08 平安科技(深圳)有限公司 Music generating method and device neural network based

Also Published As

Publication number Publication date
CN112863465A (en) 2021-05-28

Similar Documents

Publication Publication Date Title
Bretan et al. A unit selection methodology for music generation using deep neural networks
US5736666A (en) Music composition
CN111554255B (en) MIDI playing style automatic conversion system based on recurrent neural network
CN111583891B (en) Automatic musical note vector composing system and method based on context information
CN112669815B (en) Song customization generation method and corresponding device, equipment and medium thereof
CN112863465B (en) Context information-based music generation method, device and storage medium
CN108062417B (en) Method for generating music based on images of complex network
US5418323A (en) Method for controlling an electronic musical device by utilizing search arguments and rules to generate digital code sequences
Liu et al. Joint multi-pitch detection and score transcription for polyphonic piano music
Pérez-Sancho et al. Genre classification of music by tonal harmony
CN111754962B (en) Intelligent auxiliary music composing system and method based on lifting sampling
CN116343723B (en) Melody generation method and device, storage medium and computer equipment
CN113707112A (en) Recursive jump connection deep learning music automatic generation method based on layer standardization
CN113035161A (en) Chord-based song melody generation method, device, equipment and storage medium
Garani et al. An algorithmic approach to South Indian classical music
Janssen et al. Algorithmic Ability to Predict the Musical Future: Datasets and Evaluation.
WO2023074581A1 (en) Musical piece abridging device, musical piece abridging method, musical score editing device, musical score editing system, program, and information recording medium
US10431191B2 (en) Method and apparatus for analyzing characteristics of music information
CN109448684B (en) Intelligent music composing method and system
CN116052621A (en) Music creation auxiliary method based on language model
JP7251684B2 (en) Arrangement generation method, arrangement generation device, and generation program
Kan et al. Generation of irregular music patterns with deep learning
CN105630831A (en) Humming retrieval method and system
Prang et al. Signal-domain representation of symbolic music for learning embedding spaces
CN113920969A (en) Information processing method, information processing device, electronic equipment and storage medium

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