Guqin abbreviated character score making method and device based on conditional LSTM-GAN

The conditional LSTM-GAN neural network is used to convert subtracted notation into a melody vector sequence, which solves the problem of low efficiency of guqin notation work, realizes efficient automatic notation of guqin notation, reduces the complexity of manual operations, and promotes the inheritance of guqin culture.

CN118762675APending Publication Date: 2024-10-11GUANGZHOU PRESCHOOL TEACHERS COLLEGE +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410738249.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-07
Publication Date
2024-10-11

AI Technical Summary

Technical Problem

In the prior art, the guqin notation work relies on purely manual operations, which is inefficient and complex, and it is difficult to effectively use ancient subtracted notation to generate playable music scores.

Method used

Using a method based on conditional LSTM-GAN, by training the word embedding model and LSTM-GAN neural network, the subtracted spectrum is converted into a melody vector sequence, including note number, note length and rest length, to achieve the connection between the subtracted spectrum and the melody. End-to-end generation.

Benefits of technology

It reduces the human labor and complexity in notation work, improves the efficiency of guqin notation, and promotes the inheritance and innovation of guqin culture.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118762675A_ABST
    Figure CN118762675A_ABST
Patent Text Reader

Abstract

The invention discloses a Guqin abbreviated character score making method and device based on conditional LSTM-GAN, and belongs to the field of artificial intelligence. The method comprises the following steps of: training a word embedding model by utilizing a subtraction word spectrum dictionary set to obtain a trained word embedding model; inputting a to-be-predicted subtraction character spectrum into the trained word embedding model to obtain a to-be-predicted word embedding vector; the condition LSTM-GAN is trained, the trained condition LSTM-GAN is obtained, the word embedding vector to be predicted is input into the trained condition LSTM-GAN, a predicted melody vector sequence is generated, the melody vector sequence comprises music attribute data, and the music attribute data comprises a note number, a note length and a rest length. By means of the method, the abbreviated character notation is automatically made, a large amount of work for making the guqin notation is reduced, and the work efficiency of making the abbreviated character notation is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence, and in particular to a method and device for notating guqin reduced-character notation based on conditional LSTM-GAN. Background Art

[0002] Guqin music is recorded in Jianzi notation, in which characters are decomposed and reconstructed from ancient Chinese characters. Jianzi notation only records the pitch and playing techniques of the guqin music. One Jianzi notation corresponds to a certain pitch, but the time value is not specified. To make the dormant ancient guqin music become a piece of music that can be played and appreciated, it needs to be achieved through "scoring". Guqin scoring is a highly professional job that places extremely high demands on the score-scoring personnel. Many tasks in the existing technology can only be completed manually, which is time-consuming and laborious. In order to obtain more playable music scores from Jianzi notation music scores and promote cultural inheritance and innovation, it is extremely important to improve the efficiency of Jianzi notation scoring work. Summary of the invention

[0003] The purpose of this application is to solve one of the technical problems existing in the prior art to at least a certain extent.

[0004] To this end, one purpose of an embodiment of the present application is to provide a method and device for notating guqin abridged notation based on conditional LSTM-GAN.

[0005] To achieve the above-mentioned purpose, an embodiment of the present application provides a method for notating guqin reduced-character notation based on conditional LSTM-GAN, comprising the following steps:

[0006] The word embedding model is trained using the reduced character spectrum dictionary set to obtain a trained word embedding model;

[0007] Input the to-be-predicted reduced word spectrum into the trained word embedding model to obtain the to-be-predicted word embedding vector;

[0008] Training the conditional LSTM-GAN to obtain the trained conditional LSTM-GAN;

[0009] The word embedding vector to be predicted is input into the trained conditional LSTM-GAN to generate a predicted melody vector sequence, wherein the melody vector sequence includes music attribute data, and the music attribute data includes note number, note length and rest length.

[0010] Further, in some embodiments of the present application, the word embedding model is trained using the reduced word spectrum dictionary set to obtain the trained word embedding model, which includes the following steps:

[0011] Determine the pre-selected Jianzi music score, and obtain the Jianzi music score dictionary set;

[0012] Mapping the musical notation characters in the reduced musical notation dictionary set to different character strings one-to-one according to a unified specification, and obtaining character string data corresponding to the reduced musical notation dictionary set;

[0013] The character string data is input into the word embedding model for training to obtain a trained word embedding model.

[0014] Further, in some embodiments of the present application, the step of inputting the to-be-predicted reduced word spectrum into the trained word embedding model to obtain the to-be-predicted word embedding vector comprises the following steps:

[0015] Obtaining character string data corresponding to the spectrum word in the reduced spectrum to be predicted;

[0016] The character string data corresponding to the character in the to-be-predicted reduced character spectrum is input into a trained word embedding model to obtain the to-be-predicted word embedding vector.

[0017] Furthermore, in some embodiments of the present application, the conditional LSTM-GAN includes a generator and a discriminator, and the generator and the discriminator each include at least one LSTM layer; the training of the conditional LSTM-GAN to obtain the trained conditional LSTM-GAN includes the following steps:

[0018] Obtain the reduced character score training data;

[0019] Grouping the Jianzi spectrum training data to obtain multiple groups of first Jianzi spectrum for training;

[0020] Generate a first word embedding vector corresponding to the first reduced character spectrum by using the trained word embedding model;

[0021] Constructing a first melody vector sequence corresponding to the first reduced character spectrum;

[0022] Taking the first word embedding vector and the noise vector sequence as input of the generator;

[0023] The input is learned through the LSTM layer in the generator to output a second melody vector sequence

[0024] concatenating the second melody vector sequence and the first word embedding vector, and using the concatenated result and the first melody vector sequence as inputs of the discriminator;

[0025] Learning the concatenated result through the LSTM layer in the discriminator, and calculating the probability that the second melody vector sequence is the first melody vector sequence;

[0026] Determining whether the probability is greater than a predetermined threshold;

[0027] If the probability is not greater than the predetermined threshold, update the first word embedding vector and the first melody vector sequence, and use the updated first word embedding vector and the second melody vector sequence output before updating as inputs of the generator, and return to execute the step of learning the input through the LSTM layer in the generator and outputting the second melody vector sequence until the probability is greater than the predetermined threshold, thereby obtaining a trained conditional LSTM-GAN.

[0028] Further, in some embodiments of the present application, the step of constructing a first melody vector sequence corresponding to the first reduced word score includes the following steps:

[0029] Creating a melody file corresponding to the first reduced score;

[0030] The melody file is parsed to generate the first melody vector sequence.

[0031] Furthermore, in some embodiments of the present application, the melody file is a MIDI file, and the step of parsing the melody file to generate the first melody vector sequence includes the following steps:

[0032] Extract the BPM value of the MIDI file;

[0033] Extracting the note number, the on-time value of the note and the off-time value of the note corresponding to the musical notation of the first reduced musical notation in the MIDI file;

[0034] The note length of the first melody vector sequence and the rest length of the first melody vector sequence are calculated using a length calculation formula, and the length calculation formula is:

[0035]

[0036] Wherein, x represents the note length or the rest length, t is the time in seconds; when calculating the note length, t is equal to the closing time value of the current note minus the opening time value of the current note; when calculating the rest length, t is equal to the opening time value of the current note minus the closing time value of the previous note; φ(k) is an operator that constrains the k value to be the closest value in the value set representing the note length or the value set representing the rest length;

[0037] The first melody vector sequence including the note number, the note length and the rest length is generated.

[0038] Further, in some embodiments of the present application, the step of inputting the embedding vector of the word to be predicted into the trained conditional LSTM-GAN to generate a predicted melody vector sequence includes the following steps:

[0039] Inputting the embedding vector of the word to be predicted into the generator of the trained conditional LSTM-GAN;

[0040] The generator generates a melody vector sequence, and outputs the generated melody vector sequence as the predicted melody vector sequence.

[0041] Furthermore, in some embodiments of the present application, the value of the music attribute data further includes a continuous value, and the method further includes the following steps:

[0042] Determine a musical scale that best matches the note number with continuous values, determine a value set of the note numbers in the musical scale, and select a note number in the value set of the note number that is closest to the note number with continuous values ​​as the note number of the predicted melody;

[0043] Selecting a value in the value set of the note length that is closest to the note length having a continuous value as the note length of the predicted melody;

[0044] Selecting a value in the rest length value set that is closest to the rest length having a continuous value as the rest length of the predicted melody;

[0045] The note number, note length and rest length of the predicted melody are stored to obtain a predicted melody sequence.

[0046] Furthermore, in some embodiments of the present application, the method further includes the following steps: converting the predicted melody sequence into a melody file or a target piano score.

[0047] To achieve the above-mentioned purpose, another aspect of the embodiment of the present application provides a guqin reduced-character notation notation device based on conditional LSTM-GAN, the device comprising:

[0048] The word embedding model training module is used to train the word embedding model using the reduced character spectrum dictionary set to obtain a trained word embedding model;

[0049] A word embedding vector acquisition module, used to input the to-be-predicted reduced word spectrum into the trained word embedding model to obtain the to-be-predicted word embedding vector;

[0050] An LSTM-GAN training module, used for training the conditional LSTM-GAN to obtain the trained conditional LSTM-GAN;

[0051] Melody prediction module: input the word embedding vector to be predicted into the trained conditional LSTM-GAN to generate a predicted melody vector sequence, wherein the melody vector sequence includes music attribute data, and the music attribute data includes note number, note length and rest length.

[0052] The advantages and beneficial effects of the present application will be partly given in the following description, and partly will become apparent from the following description, or will be understood through the practice of the present application.

[0053] The embodiments of the present application include at least the following beneficial effects: the automatic notation scheme of Guqin Jianzi Score based on conditional LSTM-GAN provided by the present application obtains the relationship between Jianzi Score and melody by inputting Jianzi Score as an embedded vector into the conditional LSTM-GAN neural network for learning, realizes the end-to-end generation between Jianzi Score and melody, reduces a lot of manual labor in notation work, reduces the complexity of pure manual operation in Guqin notation notation process, improves the efficiency of Jianzi Score notation work, and promotes the development of Guqin notation work. By training the LSTM-GAN neural network to obtain a trained conditional LSTM-GAN, and then using the trained conditional LSTM-GAN to predict the melody vector sequence of Jianzi Score Qin score that needs to be notated, generates music attribute data including note number, note length and rest length, and provides selection for notation personnel, which can reduce the professional requirements for notation personnel, reduce the complexity of notation work, and improve the efficiency of notation. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 This is an example diagram of the Jianzi notation piano score;

[0055] Figure 2 It is a flowchart of the steps of the method for notating guqin reduced-character notation based on conditional LSTM-GAN according to an embodiment of the present application;

[0056] Figure 3 A flowchart of the steps of training a word embedding model using a reduced character spectrum dictionary set to obtain a trained word embedding model according to an embodiment of the present application;

[0057] Figure 4 A flowchart of the steps for training a conditional LSTM-GAN according to an embodiment of the present application;

[0058] Figure 5 A flowchart of the steps of constructing a first melody vector sequence corresponding to a first reduced character score according to an embodiment of the present application;

[0059] Figure 6 A flowchart of the steps of parsing a melody file to generate a first melody vector sequence according to an embodiment of the present application;

[0060] Figure 7 is an exemplary diagram of the correspondence between the value of note length and the note;

[0061] Figure 8 is an exemplary corresponding relationship diagram between rest length values ​​and rests;

[0062] Fig. 9 are exemplary parameters of a conditional LSTM-GAN neural network according to an embodiment of the present application;

[0063] Fig.10 It is a flowchart of the steps of the method for notating guqin reduced-character notation based on conditional LSTM-GAN according to an embodiment of the present application;

[0064] Fig.11 is a sample diagram of different scales with note names and note numbers;

[0065] Fig.12 It is a schematic diagram of conditional LSTM-GAN. DETAILED DESCRIPTION

[0066] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. They are only examples of circuits, systems, devices and methods that are consistent with some aspects of the embodiments of the present application as detailed in the attached claims.

[0067] It is understood that the terms "first", "second", etc. used in this application may be used in this article to describe various technical features, but unless otherwise specified, these technical features are not limited by these terms. These terms are only used to distinguish one technical feature from another technical feature, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. For example, without departing from the scope of the embodiments of the present application, the first element may also be referred to as the second element, and similarly, the second element may also be referred to as the first element.

[0068] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0069] The terms "at least one", "multiple", "each", "any", etc. used in this application, at least one includes one, two or more, multiple includes two or more, each refers to each of the corresponding multiple, and any refers to any one of the multiple.

[0070] It should be understood that the terms "center", "longitudinal", "lateral", etc. indicate the orientation or position relationship based on the drawings, and are only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the elements referred to must have a specific orientation, be constructed and operated in a specific orientation. The term "and / or" includes any and all combinations of one or more of the related listed items. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood according to the specific circumstances.

[0071] The following describes in detail a method and device for notating guqin reduced-character notation based on conditional LSTM-GAN in an embodiment of the present application in conjunction with the accompanying drawings.

[0072] Before describing the embodiments of the present application in detail, some nouns and terms involved in the embodiments of the present application are first described. The nouns and terms involved in the embodiments of the present application are subject to the following explanations.

[0073] Jianzi notation: Jianzi notation is a type of guqin notation composed of notation characters decomposed and reconstructed from ancient Chinese characters. It only records the pitch and playing techniques of guqin music, but does not stipulate the time value.

[0074] Dafen: The process of playing a piece of music according to the score. Since Jianzipu does not directly record the musical notes, but records the string positions and fingerings, and its rhythm has a large room for flexibility, the score maker must be familiar with the general rules and performance techniques of the music, understand the mood of the music, and recreate it, striving to reproduce the original appearance of the original music.

[0075] Melody file: A file that records the relevant attributes of the melody and can be executed or converted by a computer or other intelligent terminal to obtain melody output.

[0076] MIDI file: A commonly used melody file. MIDI files contain musical score information such as notes, pitch, volume, duration, beats, etc., but do not contain actual audio data. Instead, they specify the way the sound is expressed through instructions.

[0077] Note number: In a MIDI file, each note name (such as C3, D6, C9, D#6, etc.) has a unique corresponding note number.

[0078] A scale is a sequence of notes in a mode that is arranged in a ladder-like manner, starting with the tonic and ending with the tonic, from low to high (called ascending), or from high to low (called descending). Scales can be divided into major scales, minor scales, and pentatonic scales. These scales are widely used in music creation and performance, bringing rich colors and changes to music.

[0079] MusicXML file: A commonly used melody file that records the pitch, volume, duration, beat and other information of the music score.

[0080] BPM: Beats per minute, describes the number of beats produced in one minute. BPM is the tempo mark of the entire song. It is an independent tempo standard outside the score, usually with one quarter note as one beat.

[0081] Word2Vec: is a model for generating word vectors, which can map words or phrases to real vectors in a high-dimensional vector space. These vectors can usually capture the semantic and syntactic relationships between words, so that semantically similar words are also close in distance in the vector space.

[0082] RNN: Recurrent neural network is a neural network that processes sequence data and captures temporal dependencies and long-term dependencies in sequences by cyclically transferring internal states.

[0083] LSTM: Long Short-Term Memory Neural Network is a special recurrent neural network designed to solve the gradient vanishing and gradient exploding problems of traditional RNN when processing long sequences. LSTM controls the flow of information by introducing a gating mechanism, so that it can learn and remember dependencies over long time spans.

[0084] GAN: Generative Adversarial Network is a machine learning framework that generates samples that are difficult to distinguish from real data through adversarial training of generators and discriminators.

[0085] ReLU function, linear rectification function, also known as rectified linear unit, is an activation function commonly used in deep learning and neural networks.

[0086] The tanh function, or hyperbolic tangent function, is a common nonlinear function and is often used as an activation function in neural networks.

[0087] Guqin music is recorded in Jianzi notation, which is composed of ancient Chinese characters decomposed and reconstructed. Jianzi notation only records the pitch and playing techniques of the guqin music. A Jianzi notation corresponds to a certain pitch, but does not specify the time value. In order to make the dormant ancient guqin music become a piece of music that can be played and appreciated, it needs to be achieved through "playing the score". Figure 1 , Figure 1 Shown is the piano score in reduced notation after being scored.

[0088] Since the qin score does not directly record the musical sound, but only records the string position and fingering, and its rhythm has a large room for flexibility, the score composer must be familiar with the general rhythm and performance techniques of the qin music, try to understand the mood of the music, recreate it, and strive to reproduce the original appearance of the original music. Therefore, to present a long-lost ancient qin music work again through the score composing method, it has very high requirements for the playing experience, cultural accomplishment, and qin learning skills of the score composer. Guqin score composing is a highly professional job, and the requirements for score composers are extremely high. Many tasks in the existing technology can only be completed by pure manual labor, which is time-consuming and laborious. In order to obtain more music scores for performance from the reduced-character score qin score, promote cultural inheritance and innovation, it is extremely important to improve the efficiency of the reduced-character score composing work.

[0089] In view of the above technical problems, the present application embodiment provides a method for composing guqin reduced-character notation based on conditional LSTM-GAN. Figure 2 , the method comprises the following steps:

[0090] S101, training a word embedding model using the reduced word spectrum dictionary set to obtain a trained word embedding model;

[0091] S201, inputting the to-be-predicted reduced word spectrum into the trained word embedding model to obtain the to-be-predicted word embedding vector;

[0092] S301, training the conditional LSTM-GAN to obtain a trained conditional LSTM-GAN;

[0093] S401, input the word embedding vector to be predicted into the trained conditional LSTM-GAN to generate a predicted melody vector sequence, wherein the melody vector sequence includes music attribute data, and the music attribute data includes note number, note length and rest length.

[0094] The dictionary of Jianzi notation includes all the characters in the existing Jianzi notation that can be played. By inputting the characters of Jianzi notation into the word embedding model for training, the semantic and syntactic relationships between the characters can be captured, so that the distances between semantically similar characters in the vector space are also similar.

[0095] Conditional LSTM-GAN is a neural network including an LSTM network and a GAN network. By inputting the word embedding vector of the reduced word score into the LSTM-GAN, end-to-end generative learning with the reduced word score condition can be performed. The word embedding vector to be predicted is input into the trained conditional LSTM-GAN, and a melody vector sequence including music attribute data is finally output. The melody vector sequence can be converted into a melody file for melody output after manual or computer processing, or converted into a target (such as modern) piano score that can be played by personnel. By adopting the guqin reduced word score scoring method based on conditional LSTM-GAN provided in the embodiment of the present application, the semantic and syntactic relationship of the reduced word score can be captured through the word embedding model; by inputting the reduced word score as an embedding vector into the conditional LSTM-GAN neural network for learning, the relationship between the reduced word score and the melody is obtained, thereby realizing the end-to-end generation between the reduced word score and the melody, reducing a large amount of manual labor in the scoring work, reducing the complexity of the purely manual operation of the guqin score scoring process, improving the efficiency of the reduced word score scoring work, and promoting the development of the guqin score scoring work.

[0096] See also Figure 3 Further, in an embodiment of the present application, step S101 uses the reduced-character notation dictionary set to train the word embedding model, and obtaining the trained word embedding model includes step S102, determining the pre-selected reduced-character notation characters, and obtaining the reduced-character notation dictionary set.

[0097] The method of guqin performance mainly includes at least 21 fingerings for the right hand, at least 26 fingerings for the left hand, 7 string positions, and 13 micro positions. Through certain permutations and combinations, more than 50,000 reduced-character score characters can be obtained. Since many combination results in more than 50,000 score characters do not exist in actual performance, they are reduced to 5 commonly used left-hand fingerings and 8 right-hand fingerings, and finally 3640 commonly used score characters are obtained. Exemplarily, in some embodiments of the present application, 3640 pre-selected score characters available for playing are determined by manual screening, thereby obtaining a reduced-character score dictionary set. It should be understood that the determination of the pre-selected reduced-character score characters can also be obtained by other means, such as by a computer performing screening according to established rules, and the present application embodiment is not limited to this.

[0098] Step S101 includes step S103, mapping the musical notation characters in the Jianzi musical notation dictionary set to different character strings one-to-one according to a unified specification, and obtaining character string data corresponding to the Jianzi musical notation dictionary set.

[0099] Since the characters in the Jianzi spectrum are decomposed and reconstructed from ancient Chinese characters, they are not commonly used Chinese characters and cannot be encoded using Unicode. In order to obtain vectors that can be input into the LSTM-GAN neural network, the characters in the Jianzi spectrum need to be uniformly encoded first. In an embodiment of the present application, the characters in the Jianzi spectrum dictionary are entered into a computer, and the computer processes the characters to obtain character string data corresponding to the characters, thereby obtaining a unified encoding. It should be understood that this step can be performed in any suitable manner to map the characters in the Jianzi spectrum dictionary to different character strings in a one-to-one manner according to a unified specification, thereby obtaining character string data corresponding to the Jianzi spectrum dictionary set, and the embodiment of the present application is not limited to this.

[0100] Step S101 includes step S104, inputting the character string data into the word embedding model for training to obtain a trained word embedding model.

[0101] In the embodiments of the present application, by inputting the string data into the word embedding model, the semantic and syntactic relationship between the spectrum characters can be captured, so that the distances between semantically similar spectrum characters in the vector space are also similar. Exemplarily, in some embodiments of the present application, the word embedding model adopts the Word2Vec model. It should be understood that the present application can flexibly adopt different word embedding models to train the spectrum characters of the reduced character spectrum, so as to obtain a trained word embedding model, and the embodiments of the present application are not limited to this.

[0102] Further, in the embodiment of the present application, step S201 inputs the to-be-predicted reduced word spectrum into the trained word embedding model to obtain the to-be-predicted word embedding vector, including the following steps:

[0103] S202, obtaining character string data corresponding to the spectrum word in the reduced spectrum to be predicted;

[0104] S203, inputting the character string data corresponding to the character in the reduced character spectrum to be predicted into the trained word embedding model to obtain the embedding vector of the word to be predicted.

[0105] In step S103, the spectral characters in the reduced character spectrum dictionary have been mapped one-to-one to different character strings according to a unified specification. Therefore, it is only necessary to extract the spectral characters in the reduced character spectrum to be predicted and select the corresponding character string to obtain the character string data corresponding to the reduced character spectrum to be predicted. The character string data is input into the trained word embedding model to obtain the embedding vector of the word to be predicted corresponding to the spectral characters in the reduced character spectrum to be predicted.

[0106] Conditional LSTM-GAN needs to be trained to achieve end-to-end generation of reduced word scores and melodies. Specifically, conditional LSTM-GAN includes a generator and a discriminator, and both the generator and the discriminator include at least one LSTM layer. Figure 4 and Fig.12In the embodiment of the present application, step S301 trains the conditional LSTM-GAN, and obtaining the trained conditional LSTM-GAN includes a training data preparation process and a training process. The training data preparation process includes the following steps:

[0107] S301, obtaining reduced-character spectrum training data;

[0108] S302, grouping the Jianzi music score training data to obtain multiple groups of first Jianzi music scores for training;

[0109] S303, generating a first word embedding vector corresponding to the first subtracted word spectrum through the trained word embedding model;

[0110] S304: construct a first melody vector sequence corresponding to the first reduced character score.

[0111] Specifically, multiple Jianzi notation piano scores that have been completed are selected, and Jianzi notation training data is obtained by extracting the notation characters in the Jianzi notation piano scores. Exemplarily, in an embodiment of the present application, 100 Jianzi notation piano scores that have been completed are selected, and the notation characters in the Jianzi notation piano scores are extracted as Jianzi notation training data. The Jianzi notation training data are grouped to obtain multiple groups of first Jianzi notations for training. The character string data corresponding to the first Jianzi notation is input into a trained word embedding model, and a first word embedding vector corresponding to the first Jianzi notation is generated by the trained word embedding model. A first melody vector sequence corresponding to the first Jianzi notation is constructed, thereby obtaining multiple groups of first word embedding vectors and first melody vector sequences corresponding to each other.

[0112] In the embodiment of the present application, the melody vector includes music attribute data, and the music attribute data includes notes, note lengths, and rest lengths. Figure 1 As shown in the figure, the completed Jianzi notation piano score contains the pitch, note length, key signature, BPM value, etc. corresponding to the Jianzi notation. Figure 5 , step S304 constructs a first melody vector sequence corresponding to the first Jianzi score, including step S3041, to produce a melody file corresponding to the first Jianzi score. Specifically, since the first Jianzi score is a score extracted from the Jianzi score piano score that has been completed, a melody file can be produced using the pitch, note length, key signature, BPM value, etc. corresponding to the score. Exemplarily, in an embodiment of the present application, the Jianzi score piano score is produced into a melody file by entering the pitch, duration, etc. of the score in a music production tool. It should be understood that different music production tools can be flexibly selected to produce melody files of different formats, such as Cubase and MidiEditor tools for producing MIDI files, and MuseScore tools for producing MusicXML files, etc., which are not limited in the embodiment of the present application.

[0113] Further, in an embodiment of the present application, step S304 constructs a first melody vector sequence corresponding to the first reduced-character score, including step S3042, parsing the melody file to generate the first melody vector sequence. Exemplarily, in an embodiment of the present application, the melody file adopts a MIDI file. It should be understood that the melody file can be any file in any other format containing music attribute data such as pitch, notes, time value, etc. corresponding to the reduced-character score piano score, and the embodiment of the present application does not limit this. In an embodiment of the present application, since the MIDI file has a small amount of data and occupies a small storage space, it takes less time to parse the MIDI file and has high efficiency.

[0114] See also Figure 6 Further, in the embodiment of the present application, the melody file adopts a MIDI file, and step S3042 of parsing the melody file to generate a first melody vector sequence includes the following steps:

[0115] S3042-1, extract the BPM value of the MIDI file;

[0116] S3042-2, extracting the note number, the opening duration and the closing duration of the note corresponding to the musical notation of the first reduced musical notation in the MIDI file;

[0117] S3042-3, using a length calculation formula to calculate the note length of the first melody vector sequence and the rest length of the first melody vector sequence, the length calculation formula is:

[0118]

[0119] Where x represents the note length or rest length, and t is the time in seconds; when calculating the note length, t is equal to the current note's off-time minus the current note's on-time minus the previous ...

[0120] S3042-4, generate a first melody vector sequence including note numbers, note lengths and rest lengths.

[0121] Specifically, when the musical notation of the reduced musical notation is input into the computer to obtain the corresponding character string, the note number corresponding to the musical notation of the reduced musical notation is input at the same time. By way of example, in the embodiment of the present application, the note number adopts the numerical value corresponding to the note number in the MIDI file. The MIDI file contains the BPM value, pitch and duration, the pitch is represented by the note number, and the duration is in seconds. The note length and rest length in the melody vector are in beats. By way of example, in the embodiment of the present application, the corresponding relationship between the value of the note length and the note can be found in Figure 7For the correspondence between the rest length and the rest, see Figure 8 . Figure 7 The values ​​of the note lengths shown are the values ​​included in the exemplary value set of the note lengths of the embodiment of the present application. For example, the value set of the note lengths includes 0.25 beats, 0.5 beats, 0.75 beats, 1 beat, 1.5 beats, 2 beats, 3 beats, 4 beats, 6 beats, 8 beats, 16 beats and 32 beats. Figure 8 The values ​​of the rest lengths shown are the values ​​included in the value set of the rest lengths exemplified in the embodiment of the present application. The value set of the rest lengths includes 0 beats, 1 beat, 2 beats, 4 beats, 8 beats, 16 beats and 32 beats. It should be understood that the value set of the note length and the rest length is not limited to Figure 7 and Figure 8 The values ​​shown can be used to flexibly select the note length and rest length. For example, you can add smaller or larger values ​​to make the melody expression richer. Figure 7 and Figure 8 The illustrations are exemplary only.

[0122] When the BPM value is 100, it means there are 100 beats per minute. If the note number corresponding to the current reduced notation is 114, and the current note starts at the 4th second and ends at the 6th second, then extract the note number 114 of the current note, the note on value is 4, and the note off value is 6, and the note length is calculated in the following way:

[0123] t 音符时值 =t 当前音符关闭时值 -t 当前音符开启时值 =6-4=2;

[0124]

[0125] If the previous note ends at the 3rd second, the rest length of the current note is calculated as follows:

[0126] t 休止符时值 =t 上一音符关闭时值 -t 当前音符开启时值 =4-3=1;

[0127]

[0128] Thus, a note generates a melody vector containing {114,3,2}. Since the MIDI file contains multiple notes, the MIDI file after parsing generates a melody vector sequence containing note numbers, note lengths, and rest lengths. It can be understood that the above is only an example of how to use the formula to calculate the note length and rest length, and does not mean that the above values ​​are actually included in the embodiments of the present application.

[0129] The embodiment of the present application obtains word embedding vectors by using a word embedding model, and obtains a melody vector sequence by parsing a MIDI file, which can be used as the vector of LSTM-GAN input. In this process, a paired reduced-character score-note number database is established. When scribbling a new reduced-character score, the work of manually checking the score characters and the corresponding note numbers of the reduced-character score is reduced, thereby improving the efficiency of scribbling.

[0130] In the embodiment of the present application, the training process includes the following steps:

[0131] S305, using the first word embedding vector and the noise vector sequence as input of the generator;

[0132] S306, learning the input through the LSTM layer in the generator, and outputting a second melody vector sequence;

[0133] S307, concatenating the second melody vector sequence and the first word embedding vector, and using the concatenated result and the first melody vector sequence as inputs of the discriminator;

[0134] S308, learning the concatenated result through the LSTM layer in the discriminator, and calculating the probability that the second melody vector sequence is the first melody vector sequence;

[0135] S307, determining whether the probability is greater than a predetermined threshold;

[0136] S308, if the probability is not greater than the predetermined threshold, update the first word embedding vector and the first melody vector sequence, and use the updated first word embedding vector and the second melody vector sequence output before the update as the input of the generator, return to execute the step of learning the input through the LSTM layer in the generator and outputting the second melody vector sequence until the probability is greater than the predetermined threshold, and obtain the trained conditional LSTM-GAN.

[0137] During the training process, the generator and the discriminator are trained adversarially at the same time. By converting the musical notation of the reduced musical notation into word embedding vectors as the input of the LSTM layer and using the musical notation of the reduced musical notation as the condition of the neural network, end-to-end generative learning from the reduced musical notation to the melody is achieved.

[0138] See also Fig. 9, exemplarily showing the relevant parameters of the conditional LSTM-GAN neural network used in the embodiment of the present application. The GAN network includes a generator and a discriminator. The generator is composed of a recurrent neural network, including an input layer, a fully connected layer, two LSTM layers and an output layer. The discriminator is also composed of a recurrent neural network, including an input layer, two LSTM layers and a linear layer. The LSTM layers of the generator and the discriminator each include 400 units. It can be understood that the generator and the discriminator can flexibly select different layers, and the LSTM layer can flexibly select different units, which is not limited in the embodiment of the present application. In an exemplary embodiment, the vector output from the second LSTM layer in the discriminator is input to the linear layer, and then a sigmoid activation function is input, which estimates the decision output of "true" or "false" with a probability value in the range of [0,1]. When the probability value is greater than a predetermined threshold, it is considered that the predicted melody vector generated by the generator successfully deceives the discriminator, and the discriminator obtains "true" as the decision output, ends the training of the LSTM-GAN, and obtains a trained conditional LSTM-GAN. It should be understood that the predetermined threshold is a value greater than 0.5 and less than 1. By selecting different predetermined thresholds, different trained conditional LSTM-GAN neural networks can be obtained, and different predicted melodies can also be obtained. The score-playing personnel can compare different predicted melodies and select the most suitable melody as the melody of the reduced-character score to be predicted. The embodiment of the present application obtains a trained conditional LSTM-GAN by training an LSTM-GAN neural network, and then uses the trained conditional LSTM-GAN to predict the melody vector sequence of the reduced-character score piano score that needs to be scored, and generates music attribute data including note numbers, note lengths, and rest lengths for selection by score-playing personnel, which can reduce the professional requirements for score-playing personnel and reduce the complexity of score-playing work.

[0139] Further, in the embodiment of the present application, step S401, inputting the embedding vector of the word to be predicted into the trained conditional LSTM-GAN, and generating the predicted melody vector sequence includes the following steps:

[0140] S402, input the embedding vector of the word to be predicted into the generator of the trained conditional LSTM-GAN;

[0141] S403: The generator generates a melody vector sequence, and outputs the generated melody vector sequence as a predicted melody vector sequence.

[0142] The generator of the trained conditional LSTM-GAN takes the embedding vector of the word to be predicted and the noise vector sequence as input. The generator and the discriminator learn the embedding vector of the word to be predicted at the same time. When the probability generated by the discriminator reaches a predetermined threshold, the melody vector sequence generated by the generator is output as the predicted melody vector sequence.

[0143] Further, in the embodiment of the present application, the value of the music attribute data of the predicted melody vector sequence output by the trained conditional LSTM-GAN also includes a continuous value. Fig.10 The method for notating guqin reduced-character notation based on conditional LSTM-GAN provided in the embodiment of the present application further includes the following steps:

[0144] S501, determining a musical scale that best matches the note number with a continuous value, determining a value set of the note number in the musical scale, and selecting a note number in the value set of the note number that is closest to the note number with a continuous value as the note number of the predicted melody;

[0145] S502, selecting a value in the note length value set that is closest to the note length having a continuous value as the note length of the predicted melody;

[0146] S503, selecting a value in the rest length value set that is closest to the rest length having a continuous value as the rest length of the predicted melody;

[0147] S504, storing the note number, note length and rest length of the predicted melody to obtain a predicted melody sequence.

[0148] Specifically, the music attribute data of the predicted melody vector sequence output by the trained conditional LSTM-GAN include note numbers, note lengths and rest lengths, wherein the note numbers, note lengths and rest lengths all have continuous values. A continuous value refers to any numerical value that can be represented by a computer within a given range. In an embodiment of the present application, the given range of the note number, note length and rest length is a non-negative number, that is, the note number, note length and rest length can be any numerical value of a non-negative number that can be represented by a computer, such as 0.1, 1.36, 3.57, etc. It can be understood that the above numerical values ​​are only exemplary and do not represent that the note number, note length and rest length in the embodiment of the present application actually have these numerical values. In contrast to continuous values ​​are discrete values, which are usually integers or a finite number of specific numerical values. In order to obtain note numbers, note lengths and rest lengths with discrete values, it is necessary to optimize the music attribute data. Exemplarily, in some embodiments of the present application, the note number with a continuous value is optimized, including using the φ(k) operator to determine the note number with a continuous value as the closest value in the value set of the note number with a discrete value. See also Fig.11, exemplarily showing the note names of different scales, each note name corresponds to a different note number according to a different pitch. By comparing the note number in the predicted melody vector with the value of the note number contained in different scales, the scale that best matches the note number with a continuous value can be determined. When determining the scale, since the notes contained in different scales are determined, the value set of the note number in the scale can be determined. By limiting the value of the value set k in the φ(k) operator to the note number in the determined scale, the note number closest to the note number with a continuous value in the value set of the note number is selected as the note number of the predicted melody, the out-of-tune notes can be mapped to their closest in-beat notes, thereby obtaining the note number of the same scale. Music melodies with the same scale are more in line with the rules of performance, making the predicted melody closer to the real melody and improving the accuracy of the predicted melody.

[0149] For example, in some embodiments of the present application, see Figure 7 and Figure 8 By determining the value set of discrete note length and rest length, the value closest to the note length with continuous value in the value set of note length can be selected by the φ(k) operator as the note length of the predicted melody, and the value closest to the rest length with continuous value in the value set of rest length can be selected by the φ(k) operator as the rest length of the predicted melody. The predicted melody sequence can be obtained from the predicted melody vector sequence, and the predicted melody sequence includes the music attribute data of the reduced score to be predicted.

[0150] Further, in an embodiment of the present application, step S601 is also included, and the predicted melody sequence is converted into a melody file or a target piano score. The predicted melody sequence includes data on the note number, note length and rest length of the reduced score to be predicted. By converting the predicted melody sequence into a melody file, the melody can be output on an electronic music tool, wherein the electronic music tool includes but is not limited to a computer application, MP3 player, MP4 player, or an intelligent terminal including a music playing function that can be used to make and play audio files. The predicted music attribute data can be converted into a target piano score, such as a modern piano score such as a five-line score and a simplified score, by manual or other methods such as melody recognition and voice conversion, which can be played by people. Those skilled in the art can flexibly choose different ways to convert the predicted melody sequence into an audio file or a target piano score, and the embodiment of the present application is not limited to this. Through step S601, the reduced score can be converted into a melody file or piano score familiar to the public, which simplifies a lot of work for the score-playing personnel and promotes the development of guqin culture.

[0151] In summary, the guqin reduced-character notation notation method based on conditional LSTM-GAN in this application has the following advantages:

[0152] (1) By using the Jianzi notation as the embedding vector input condition for LSTM-GAN neural network learning, the relationship between the Jianzi notation and the melody is obtained, and the end-to-end generation between the Jianzi notation and the melody is realized. This reduces a lot of manual labor in the notation work, reduces the complexity of pure manual operation in the guqin notation process, improves the efficiency of the Jianzi notation work, and promotes the development of guqin notation work.

[0153] (2) The trained conditional LSTM-GAN neural network is trained to obtain the trained conditional LSTM-GAN, which is then used to predict the melody vector sequence of the reduced-character musical notation score to be scored, and to generate music attribute data including note numbers, note lengths, and rest lengths for the score-makers to select. This can reduce the professional requirements for the score-makers and the complexity of the score-making work.

[0154] (3) A database of paired Jianzi notation and musical note numbers has been established. This reduces the work of manually verifying the musical notation characters and the corresponding musical note numbers when transcribing new Jianzi notation musical notations, thus improving the efficiency of transcribing musical notations.

[0155] The embodiment of the present application also provides a guqin reduced-character notation notation device based on conditional LSTM-GAN, the device comprising:

[0156] The word embedding model training module is used to train the word embedding model using the reduced character spectrum dictionary set to obtain a trained word embedding model;

[0157] A predicted word embedding vector acquisition module is used to input the to-be-predicted word spectrum into the trained word embedding model to obtain the to-be-predicted word embedding vector;

[0158] LSTM-GAN training module, used to train the conditional LSTM-GAN to obtain the trained conditional LSTM-GAN;

[0159] The melody prediction module is used to input the embedding vector of the word to be predicted into the trained conditional LSTM-GAN to generate a predicted melody vector sequence, wherein the melody vector sequence includes music attribute data, and the music attribute data includes note number, note length and rest length.

[0160] It can be understood that the guqin abridged notation notation device based on conditional LSTM-GAN also has the advantages and benefits of the guqin abridged notation notation method based on conditional LSTM-GAN.

[0161] It should be noted that the embodiments described in this application are intended to more clearly illustrate the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0162] In the above description of this specification, the description with reference to the terms "one embodiment / example", "another embodiment / example" or "certain embodiments / examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0163] Although the embodiments of the present application have been shown and described, those skilled in the art will appreciate that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present application, and that the scope of the present application is defined by the claims and their equivalents.

[0164] The above is a specific description of the preferred implementation of the present application, but the present application is not limited to the described embodiments. Technical personnel familiar with the field may make various equivalent modifications or substitutions without violating the spirit of the present application. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present application.

Claims

1. A method for guqin reduced-character notation based on conditional LSTM-GAN, characterized in that: The following steps are involved: The word embedding model is trained using the reduced character spectrum dictionary set to obtain a trained word embedding model; Input the to-be-predicted reduced word spectrum into the trained word embedding model to obtain the to-be-predicted word embedding vector; Training the conditional LSTM-GAN to obtain the trained conditional LSTM-GAN; The word embedding vector to be predicted is input into the trained conditional LSTM-GAN to generate a predicted melody vector sequence, wherein the melody vector sequence includes music attribute data, and the music attribute data includes note number, note length and rest length.

2. The method for guqin reduced-character notation based on conditional LSTM-GAN according to claim 1 is characterized in that: The method of training the word embedding model using the reduced word spectrum dictionary set to obtain the trained word embedding model comprises the following steps: Determine the pre-selected Jianzi music score, and obtain the Jianzi music score dictionary set; Mapping the musical notation characters in the reduced musical notation dictionary set to different character strings one-to-one according to a unified specification, and obtaining character string data corresponding to the reduced musical notation dictionary set; The character string data is input into the word embedding model for training to obtain the trained word embedding model.

3. The method for guqin reduced-character notation based on conditional LSTM-GAN according to claim 2 is characterized in that: The step of inputting the to-be-predicted reduced word spectrum into the trained word embedding model to obtain the to-be-predicted word embedding vector comprises the following steps: Obtaining character string data corresponding to the spectrum word in the reduced spectrum to be predicted; The character string data corresponding to the character in the to-be-predicted reduced character spectrum is input into a trained word embedding model to obtain the to-be-predicted word embedding vector.

4. The method for guqin reduced-character notation based on conditional LSTM-GAN according to claim 1 is characterized in that: The conditional LSTM-GAN includes a generator and a discriminator, and each of the generator and the discriminator includes at least one LSTM layer; the training of the conditional LSTM-GAN to obtain the trained conditional LSTM-GAN includes the following steps: Obtain the reduced character spectrum training data; Grouping the Jianzi spectrum training data to obtain multiple groups of first Jianzi spectrum for training; Generate a first word embedding vector corresponding to the first reduced character spectrum by using the trained word embedding model; Constructing a first melody vector sequence corresponding to the first reduced character spectrum; Taking the first word embedding vector and the noise vector sequence as input of the generator; The input is learned through the LSTM layer in the generator to output a second melody vector sequence concatenating the second melody vector sequence and the first word embedding vector, and using the concatenated result and the first melody vector sequence as inputs of the discriminator; Learning the concatenated result through the LSTM layer in the discriminator, and calculating the probability that the second melody vector sequence is the first melody vector sequence; Determining whether the probability is greater than a predetermined threshold; If the probability is not greater than the predetermined threshold, update the first word embedding vector and the first melody vector sequence, and use the updated first word embedding vector and the second melody vector sequence output before updating as inputs of the generator, and return to execute the step of learning the input through the LSTM layer in the generator and outputting the second melody vector sequence until the probability is greater than the predetermined threshold, thereby obtaining a trained conditional LSTM-GAN.

5. The method for guqin reduced-character notation based on conditional LSTM-GAN according to claim 4 is characterized in that: The step of constructing a first melody vector sequence corresponding to the first reduced word score comprises the following steps: Creating a melody file corresponding to the first reduced score; The melody file is parsed to generate the first melody vector sequence.

6. The method for guqin reduced-character notation based on conditional LSTM-GAN according to claim 5 is characterized in that: The melody file is a MIDI file, and the step of parsing the melody file and generating the first melody vector sequence comprises the following steps: Extract the BPM value of the MIDI file; Extracting the note number, the on-time value of the note and the off-time value of the note corresponding to the musical notation of the first reduced musical notation in the MIDI file; The note length of the first melody vector sequence and the rest length of the first melody vector sequence are calculated using a length calculation formula, and the length calculation formula is: Wherein, x represents the note length or the rest length, t is the time in seconds; when calculating the note length, t is equal to the closing time value of the current note minus the opening time value of the current note; when calculating the rest length, t is equal to the opening time value of the current note minus the closing time value of the previous note; φ(k) is an operator that constrains the k value to be the closest value in the value set representing the note length or the value set representing the rest length; The first melody vector sequence including the note number, the note length and the rest length is generated.

7. The method for guqin reduced-character notation based on conditional LSTM-GAN according to claim 4 is characterized in that: The step of inputting the embedding vector of the word to be predicted into the trained conditional LSTM-GAN to generate a predicted melody vector sequence comprises the following steps: Inputting the embedding vector of the word to be predicted into the generator of the trained conditional LSTM-GAN; The generator generates a melody vector sequence, and outputs the generated melody vector sequence as the predicted melody vector sequence.

8. The method for guqin reduced-character notation based on conditional LSTM-GAN according to claim 1, characterized in that: The value of the music attribute data also includes a continuous value, and the method further includes the following steps: Determine a musical scale that best matches the note number with continuous values, determine a value set of the note numbers in the musical scale, and select a note number in the value set of the note number that is closest to the note number with continuous values ​​as the note number of the predicted melody; Selecting a value in the value set of the note length that is closest to the note length having a continuous value as the note length of the predicted melody; Selecting a value in the rest length value set that is closest to the rest length having a continuous value as the rest length of the predicted melody; The note number, note length and rest length of the predicted melody are stored to obtain a predicted melody sequence.

9. The method for guqin reduced-character notation based on conditional LSTM-GAN according to claim 1, characterized in that: The method further comprises the following steps: converting the predicted melody sequence into a melody file or a target musical score.

10. A guqin reduced-character notation notation device based on conditional LSTM-GAN, characterized in that: The device comprises: The word embedding model training module is used to train the word embedding model using the reduced character spectrum dictionary set to obtain a trained word embedding model; A word embedding vector acquisition module, used to input the to-be-predicted reduced word spectrum into the trained word embedding model to obtain the to-be-predicted word embedding vector; An LSTM-GAN training module, used for training the conditional LSTM-GAN to obtain the trained conditional LSTM-GAN; Melody prediction module: input the word embedding vector to be predicted into the trained conditional LSTM-GAN to generate a predicted melody vector sequence, wherein the melody vector sequence includes music attribute data, and the music attribute data includes note number, note length and rest length.