Method and terminal for generating music based on image

Through the method of subdividing the image to generate music, reading the brush data to generate scales and sound level timely values, it solves the problem of lack of interest in the cultivation of music literacy among young children and adolescents in the prior art, realizes the deep correlation and refinement of the music score and the image, and stimulates the potential of music.

CN115050344BActive Publication Date: 2025-08-19FUZHOU CI YIN QU INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210653028.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-09
Publication Date
2025-08-19
Estimated Expiration
2042-06-09

AI Technical Summary

Technical Problem

In the prior art, young children and adolescents lack interest in cultivating musical literacy, and the existing methods of converting graphics into music do not match their divergent imagination and cannot effectively stimulate music potential.

Method used

By reading brush data, the image drawing information is obtained, including graphic information, color information and drawing order, and the conversion request is judged to generate scale and pitch timely values. The music score is subdivided into scale, pitch, time value and drawing order to generate the target score.

Benefits of technology

It enhances the relationship between the music score and the image, provides a deeper sense of participation, and the granularity of the music score is refined and easy to modify, stimulating users' fun and motivation, and is suitable for the cultivation of musical sense in young children and teenagers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115050344B_ABST
    Figure CN115050344B_ABST
Patent Text Reader

Abstract

The present invention provides a method and terminal for generating music based on an image, comprising the steps of: obtaining image drawing information by reading brush data, the image drawing information including graphic information, color information, and drawing order information; determining whether a conversion request is received, and if so, obtaining a musical scale, pitch degree, and duration according to the graphic information and color information; and generating a target musical score according to the scale, pitch degree, duration, and drawing order information. The present invention subdivides the musical score into scales, pitch degrees, durations, and an appearance order, obtains various parts of the subdivided musical score according to the graphic information, color information, and drawing order information of an image generated during a user's drawing process, and then splices the various parts into a complete musical score, thereby strengthening the association between the finally generated musical score and the image, providing the user with a deeper sense of participation, and facilitating subsequent modification of the musical score by the user due to the finer granularity when saving the musical score.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of signal processing, and in particular to a method and a terminal for generating music based on images. Background Art

[0002] Existing early childhood education and adolescent education often ignore the cultivation of musical literacy, and boring music theory learning and simple song singing exercises usually cannot arouse children's interest, thus affecting the cultivation of musical sense from an early age; and although there are some methods to convert graphics into corresponding music, the settings are relatively simple and do not match the divergent imagination of children and adolescents when drawing, so they cannot arouse interest, thus missing the best age for music literacy and failing to further cultivate musical potential. Summary of the Invention

[0003] The technical problem to be solved by the present invention is to provide a method and a terminal for generating music based on images, so as to realize the conversion of images into music.

[0004] In order to solve the above technical problems, a technical solution adopted by the present invention is:

[0005] A method for generating music based on an image, comprising the steps of:

[0006] Acquire image drawing information by reading brush data, wherein the image drawing information includes graphic information, color information, and drawing order information;

[0007] determining whether a conversion request is received, and if so, obtaining a musical scale, a pitch level, and a duration according to the graphic information and the color information;

[0008] A target music score is generated according to the scale, pitch, duration and drawing order information.

[0009] In order to solve the above technical problems, another technical solution adopted by the present invention is:

[0010] A terminal for generating music based on an image, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:

[0011] Acquire image drawing information by reading brush data, wherein the image drawing information includes graphic information, color information, and drawing order information;

[0012] determining whether a conversion request is received, and if so, obtaining a musical scale, a pitch level, and a duration according to the graphic information and the color information;

[0013] A target music score is generated according to the scale, pitch, duration and drawing order information.

[0014] The beneficial effects of the present invention are as follows: the musical score is subdivided into scales, pitch degrees, durations, and order of appearance; the various parts of the subdivided musical score are obtained according to the graphic information, color information, and drawing order information of the image generated during the user's drawing process; the various parts are then spliced into a complete musical score; the musical score and the image drawn by the user are matched through details, thereby strengthening the association between the finally generated musical score and the image, providing the user with a deeper sense of participation; and because the granularity when saving the musical score is fine, it is also convenient for the subsequent user to modify the musical score. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 A flowchart of a method for generating music based on an image according to an embodiment of the present invention;

[0016] Figure 2-10 Schematic diagram of an example of a method for generating music based on an image according to an embodiment of the present invention;

[0017] Figure 11 This is a schematic structural diagram of a terminal for generating music based on images according to an embodiment of the present invention;

[0018] Description of labels:

[0019] 1. A terminal for generating music based on images; 2. A processor; 3. A memory. DETAILED DESCRIPTION

[0020] To illustrate the technical content, achieved objectives and effects of the present invention in detail, the following description is given in conjunction with the embodiments and accompanying drawings.

[0021] Please refer to Figure 1 , a method for generating music based on an image, comprising the steps of:

[0022] Acquire image drawing information by reading brush data, wherein the image drawing information includes graphic information, color information, and drawing order information;

[0023] determining whether a conversion request is received, and if so, obtaining a musical scale, a pitch level, and a duration according to the graphic information and the color information;

[0024] A target music score is generated according to the scale, pitch, duration and drawing order information.

[0025] As can be seen from the above description, the beneficial effects of the present invention are as follows: subdividing the musical score into scales, pitch degrees, durations, and order of appearance; obtaining the subdivided parts of the musical score based on the graphic information, color information, and drawing order information of the image generated during the user's drawing process; then splicing the parts into a complete musical score; and making the musical score and the image drawn by the user correspond through details, thereby strengthening the association between the final generated musical score and the image, providing users with a deeper sense of participation, and ensuring the enjoyment of the musical score. At the same time, the finer granularity when saving the musical score also facilitates user modification of the musical score.

[0026] Furthermore, the drawing order information is a drawing order corresponding to the graphic information or the color information;

[0027] The obtaining of the musical scale, pitch and duration according to the graphic information and the color information comprises:

[0028] Obtaining a first pitch and a first duration according to the graphic information;

[0029] obtaining a second pitch and a second scale according to the color information;

[0030] Generating the target music score according to the scale, pitch, duration and drawing order information includes:

[0031] Obtaining a first note according to the first pitch level and the first duration;

[0032] Obtaining a second note according to the second pitch degree and the second scale;

[0033] A target musical score is generated according to the first note, the second note, and the drawing order information.

[0034] From the above description, it can be seen that corresponding notes are generated for graphics and colors respectively, and the notes are arranged according to the order in which the graphics and colors are drawn by the user to obtain the target music score. Then, each operation of the user when drawing the image can be directly matched to the corresponding note, and music scores can be created by drawing, which enhances the fun of exploration.

[0035] Furthermore, before generating the target music score according to the musical scale, pitch, duration and drawing order information, the method further includes:

[0036] Get the default scale and default duration;

[0037] Generating the target music score according to the scale, pitch, duration and drawing order information further includes:

[0038] Obtaining a first note according to the first pitch level, the first duration, and the default scale;

[0039] obtaining a second note according to the second pitch degree, the second scale and the default duration;

[0040] A target musical score is generated according to the first note, the second note, and the drawing order information.

[0041] As can be seen from the above description, the default scale and default duration are pre-set, and the notes that lack corresponding attributes are filled in, which ensures the standardization and enjoyability of the final generated music score while ensuring the integrity of the notes.

[0042] Furthermore, before generating the target music score according to the musical scale, pitch, duration and drawing order information, the method further includes:

[0043] Obtaining first drawing order information corresponding to the graphic information;

[0044] Obtaining second drawing order information corresponding to the color information;

[0045] Generating the target music score according to the scale, pitch, duration and drawing order information includes:

[0046] Obtaining a first musical score according to the musical scale, pitch, duration, and first drawing order information;

[0047] Obtaining a second musical score according to the musical scale, pitch, duration, and second drawing order information;

[0048] The first music score and the second music score are concatenated to generate a target music score.

[0049] From the above description, it can be seen that the corresponding first musical score is generated according to the drawing order of the graphics, and the corresponding second musical score is generated according to the drawing order of the color information. A target musical score with a different note arrangement order can be obtained, providing users with more choices, and the drawing order information is finally processed by type, which can improve the efficiency of musical score generation.

[0050] Furthermore, obtaining the first pitch and the first duration according to the graphic information includes:

[0051] Determining a graphic type according to the graphic information, where the graphic type includes a closed graphic and an open graphic;

[0052] If the graphic type corresponding to the graphic information is a closed graphic, obtaining the first pitch level according to a preset first pitch level comparison table;

[0053] If the graphic type corresponding to the graphic information is an open graphic, the first pitch level is obtained according to a preset second pitch level comparison table.

[0054] As can be seen from the above description, a further distinction is made between closed and open figures. Closed figures such as circles, rectangles, and triangles are figures whose areas can be calculated, while open figures such as curves and straight lines do not have corresponding areas. Further subdividing the graphic information enriches the mode of the target score and avoids the situation where the mode in the target score is too single.

[0055] Furthermore, obtaining the second pitch and the second scale according to the color information includes:

[0056] Acquire color type and color brightness according to the color information;

[0057] Obtaining the second pitch level according to the color type and a preset third pitch level comparison table;

[0058] The second scale is obtained according to the color brightness and a preset first scale comparison table.

[0059] From the above description, it can be seen that the color information is split into color type and brightness, which correspond to the pitch and scale respectively. The area of the color block can also be added, and the second time value is determined based on the area of the color block. This further reduces the attributes that need to be preset in the note, making the generation of the note more random. The final target music score can be more variable, stimulating the user's curiosity and motivation.

[0060] Furthermore, it also includes receiving beat information;

[0061] Generating the target music score according to the scale, pitch, duration and drawing order information further includes:

[0062] The music score measures are filled according to the first note, the second note, the drawing order information and the beat information to generate a target music score.

[0063] From the above description, it can be seen that the notes are filled into the score measures according to the preset beat, so that the final target score has a more rhythmic sense. The beat information can be customized by the user, or the best-fit beat can be matched after the score is obtained according to the user's drawing process.

[0064] Furthermore, it also includes receiving lyrics information;

[0065] The step of generating a target musical score according to the musical scale, pitch, duration and drawing order information includes:

[0066] Matching the lyric information with the target musical score to obtain a correspondence between each word and each note, wherein the note includes the first note or the second note;

[0067] Determine whether the intonation of the word matches the note. If not, raise or lower the scale corresponding to the note by a preset height, and then return to the step of determining whether the intonation of the word matches the note. If so, display the target music score with the lyric information.

[0068] From the above description, it can be seen that after generating the target music score, the user can also fill in the lyrics, and the characters in the lyrics information are matched with the musical notes. Because Chinese characters have intonation, if the intonation and the musical notes do not match, it will cause problems such as unclear lyrics and unclear meaning of the lyrics. Before generating the final matching relationship, the scale of the musical notes is modified according to the intonation of the lyrics, so that the final intonation of the characters and the musical notes are more matched, thereby improving the user's singing experience.

[0069] Furthermore, it also includes receiving marking information;

[0070] The step of generating a target musical score according to the first note, the second note, and the drawing order information includes:

[0071] The first note or the second note is modified according to the marking information.

[0072] As can be seen from the above description, in the complete creation process, notes usually correspond to many marks, such as crescendo, decrescendo, dot, rest, etc. The mark information can be received through user-defined methods, or the corresponding mark information can be generated according to the user's operation. For example, if the user pauses between two drawing operations for more than a preset value, a rest is marked; if the user does not leave the drawing board for more than a preset value after the drawing is completed, a dot is marked, etc.

[0073] Please refer to Figure 2 A terminal for generating music based on images includes a memory, a processor, and a computer program stored in the memory and runnable on the processor. When the processor executes the computer program, the steps in the above-mentioned method for generating music based on images are implemented.

[0074] The above-mentioned method of generating music based on images of the present invention can be applied to scenarios where images need to be converted into music, and is described below through specific implementation methods.

[0075] Please refer to Figure 1 , embodiment 1 of the present invention is:

[0076] A method for generating music based on an image, comprising the steps of:

[0077] S1. Obtain image drawing information by reading brush data, where the image drawing information includes graphic information, color information, and drawing order information;

[0078] The drawing order information is the drawing order corresponding to the graphic information or the color information;

[0079] In an optional embodiment, brush data is read, the brush data including trajectory data, color data, and action data, wherein the color data is bound to the brush in a one-to-one manner, and graphic information is obtained based on the trajectory data, color information is obtained based on the color data, and drawing order information is obtained based on the action data. For example, if the trajectory of the brush is a circle, the graphic information is a circle, the color number stored in the brush is red, the color information is red, and the action data stored in the brush is 1-move-trajectory 1; 2-move-trajectory 2, where trajectory 1 corresponds to a circle and trajectory 2 corresponds to a square, and the drawing order information is circle-square.

[0080] In an optional embodiment, image drawing information is obtained by reading brush data and drawing board data. Specifically, the brush data includes color data. The color data corresponding to the brush is obtained through data from an NFC (Near Field Communication) chip placed in the brush. Each brush corresponds to only one color. Color information is obtained based on the color data. Graphic information is obtained through a dot matrix sensor on the drawing board. Action data is stored in chronological order, and drawing sequence information is obtained based on the sequential action data. The content in the NFC chip can be read by an NFC sensor corresponding to the NFC chip. The NFC chip sensor can be placed in the drawing board for reading and uploading, or placed in the terminal for reading and uploading. The setting position of the NFC sensor is not limited here.

[0081] S2. Determine whether a conversion request is received. If so, obtain the musical scale, pitch level, and duration based on the graphic information and color information, including:

[0082] S201, obtaining a first pitch and a first duration according to the graphic information; obtaining a second pitch and a second scale according to the color information;

[0083] Specifically, obtaining the first pitch class and the first duration according to the graphic information includes: determining a graphic type according to the graphic information, where the graphic type includes a closed graphic and an open graphic; if the graphic type corresponding to the graphic information is a closed graphic, obtaining the first pitch class according to a preset first pitch class comparison table, and obtaining the first duration according to the area of the closed graphic; if the graphic type corresponding to the graphic information is an open graphic, obtaining the first pitch class according to a preset second pitch class comparison table, and obtaining the first duration according to the length of the open graphic;

[0084] In an optional embodiment, the first pitch level comparison table is: do-square; re-circle; mi-semicircle; fa-triangle; sol-trapezoidal; La-diamond; si-sector; here, sector refers to sectors other than semicircles; the second pitch level comparison table is: do-horizontal line; re-vertical line; mi-slant line; fa-broken line; sol-arc; la-wavy line; si-zigzag line;

[0085] In an optional embodiment, obtaining the first time value according to the area of the closed figure includes: whole note: the figure size "diameter 16 cm = 4 beats" is based on the widest diameter size point, and the note value can be automatically superimposed when the width exceeds 16 cm; half note: the figure size "diameter 8 cm = 2 beats" is based on the widest diameter size point, and the note value can be automatically superimposed when the width exceeds 8 cm; quarter note: the figure size "diameter 4 cm = 1 beat" is based on the widest diameter size point, and the note value can be automatically superimposed when the width exceeds 4 cm; eighth note: the figure size "diameter 2 cm = 1 / 2 beat" is based on the widest diameter size point, and the note value can be automatically superimposed when the width exceeds 2 cm Dynamically superimpose note values; Sixteenth note: The graphic size "1 cm diameter = 1 / 4 beat" is based on the widest diameter point. If the width exceeds 1 cm, note values will be automatically superimposed. Thirty-second note: The graphic size "0.5 cm diameter = 1 / 8 beat" is based on the widest diameter point. If the width exceeds 0.5 cm, note values will be automatically superimposed. The duration represents the length of the sound played by the audio. If the diameter of the drawn graphic exceeds the set width, the system will automatically superimpose notes. The superimposed note values will be superimposed to generate the audio length based on the diameter and width of the graphic. If the length does not match the specified note value, it will be rounded up.

[0086] For example, see Figure 2 , select the time signature 2 / 4 (four beats per measure). The conclusion drawn from the addition of the above graphs is that the played audio sound is equal to half a beat of the head + 1 beat of the body + four 1 / 8 beats of the mouth, tail, and feet, etc., which is equal to half a beat + 1 beat + half a beat, which is exactly the duration of the 2 / 4 measure. If the length of the stroke exceeds the first measure and extends to the second measure, and the extended duration is less than the second measure, the system will automatically add a time value rest to meet the needs of the measure duration, and so on; or if the user encounters that the second measure duration is less than 2 / 4, he can also choose to use rests or dotted rhythmic patterns to fill it, so that the measure becomes a complete measure and enter the next measure; (When the length does not match the specified note value, it is rounded off);

[0087] For example, see Figure 7 as well as Figure 8, circle re (1) = diameter 8 cm = duration of half note; vertical line re (1) = length 8 cm = duration of half note; horizontal line do (1) = length 8 cm = duration of half note; left arc sol.5 (1) = length 4 cm = duration of quarter note; right arc sol (1) = length 4 cm = duration of quarter note;

[0088] In an optional embodiment, the first time value obtained according to the length of the open graphic includes: the length of a whole note (four beats) is "16 cm", and the note value can be automatically superimposed if the length exceeds; the length of a half note (two beats) is "8 cm", and the note value can be automatically superimposed if the length exceeds; the length of a quarter note (one beat) is "4 cm", and the note value can be automatically superimposed if the length exceeds; the length of an eighth note (half beat) is "2 cm", and the note value can be automatically superimposed if the length exceeds; the length of a sixteenth note (one quarter) is "1 cm", and the note value can be automatically superimposed if the length exceeds; the length of a thirty-second note (one eighth beat) is "0.5 cm", and the note value can be automatically superimposed if the length exceeds; wherein the time value represents the length of the sound time value of the audio playback, and the notes will be automatically superimposed if the drawn line exceeds the set length, and the added note value will be superimposed to generate the audio length according to the increased length of the drawn line. When the length of the line is longer or shorter than the length of the corresponding note, the system automatically uses the "rounding-up" calculation method to directly summarize the excess or shortage ratio to the length of the beats before, after, and on the left and right. For example, if you draw a horizontal line and select the time signature 2 / 4 (two beats per measure) and select a quarter note (set length to 4 cm), 4 cm exceeds 2 cm = 1 quarter note + 1 eighth note, "0.3 cm more" and the length that exceeds is less than 0.5 cm, which is summarized into the duration corresponding to the previous note or the duration corresponding to the next note. Then, the above lengths are added together to conclude that the duration of the played audio sound is equal to 1 beat (quarter note) + the excess. If the length of the stroke is increased further, extending the length from 2.3 cm to 4 cm, a quarter note will be generated, satisfying the duration of the 2 / 4 measure. Similarly, if the length of the stroke is less than the duration of a measure, the user can also choose to fill it with a rest or dot to make the measure a complete measure and move on to the next measure. In the above example, 0.3 cm can be automatically generated as 0.5 cm, which is 1 / 8 beat. If it is only 0.2 cm longer, it can be ignored according to the rounding method (compared to 0.5).

[0089] Obtaining the second pitch and the second scale according to the color information includes: obtaining a color type and color brightness according to the color information; obtaining the second pitch according to the color type and a preset third pitch comparison table; obtaining the second scale according to the color brightness and a preset first scale comparison table; wherein the color type includes a color number;

[0090] In an optional embodiment, the third scale comparison table is do-red; re-orange; mi-yellow; fa-green; sol-cyan; la-blue; si-purple; the first scale comparison table is: high pitch range-light color; middle pitch range-neutral color; low pitch range-dark color;

[0091] For example, a color in the first scale comparison table is provided: high pitch range - first red (ff3434); middle pitch range - second red (FF0000); low pitch range - third red (b30404);

[0092] S3, generating a target musical score according to the scale, pitch, duration, and drawing order information, including:

[0093] S301, obtaining a first note according to the first pitch and the first duration; obtaining a second note according to the second pitch and the second scale;

[0094] In an optional embodiment, S201 further includes obtaining the area of the color block according to the color information, and obtaining the second duration according to the area of the color block; then S301 includes obtaining the second note according to the second pitch, the second scale, and the second duration;

[0095] In an optional embodiment, whole note: the color block area "diameter 16 cm = 4 beats" is based on the widest diameter size point, and the note value can be automatically superimposed if the width exceeds 16 cm; half note: the color block area "diameter 8 cm = 2 beats" is based on the widest diameter size point, and the note value can be automatically superimposed if the width exceeds 8 cm; quarter note: the color block area "diameter 4 cm = 1 beat" is based on the widest diameter size point, and the note value can be automatically superimposed if the width exceeds 4 cm; eighth note: the color block area "diameter 2 cm = 1 / 2 beat" is based on the widest diameter size point, and the note value can be automatically superimposed if the width exceeds 2 cm; sixteenth note: the color block area "diameter 2 cm = 1 / 2 beat" is based on the widest diameter size point, and the note value can be automatically superimposed if the width exceeds 2 cm; Note: The color block area of "1 cm diameter = 1 / 4 beat" is based on the widest diameter point. If the width exceeds 1 cm, the note value will be automatically superimposed. Thirty-second note - The color block area of "0.5 cm diameter = 1 / 8 beat" is based on the widest diameter point. If the width exceeds 0.5 cm, the note value will be automatically superimposed. The duration value corresponds to the sound duration of the audio playback. If the diameter of the drawn shape exceeds the set width, the system will automatically superimpose the note value. The superimposed note value will be superimposed to generate the audio duration according to the diameter and width of the shape; (If the length does not match the specified note value, it will be rounded up).

[0096] S302: Generate a target musical score according to the first note, the second note, and the drawing order information.

[0097] In an optional embodiment, before S2, the steps include: obtaining a default scale and a default duration; then S301 may be replaced by S311; S311, obtaining a first note according to the first pitch, the first duration, and the default scale; obtaining second note information according to the second pitch, the second scale, and the default duration;

[0098] In an optional embodiment, after S3, the following step further includes: when clicking to play and listening to the graphic musical note melody audio, the user can adjust the pitch of the notes up or down, and the length of rests and dots according to the sound (music) performance requirements. The adjusted musical note melody can be clicked to play again and listened to, and can also be changed repeatedly;

[0099] In an optional embodiment, after S3, the method further includes: obtaining a pitch range of notes in the target musical score, and if the pitch of the pitch range exceeds a preset value, adjusting the notes that exceed the preset value; for example, setting the high pitch range to be controlled at the fa note of the small note group 2, and the low pitch range to be controlled at the sol note of the small note group, with a pitch range of approximately two octaves above and below, and not displaying any notes that exceed this range;

[0100] In an optional embodiment, a user pause can be identified as a conversion request, and the corresponding target score can be played synchronously when the user pauses, that is, the difference between the target score obtained last time and the user pauses is played each time, thereby achieving real-time listening.

[0101] The second embodiment of the present invention is:

[0102] A method for generating music based on an image, which differs from the other embodiments in that:

[0103] S3 previously included:

[0104] Obtaining first drawing order information corresponding to the graphic information;

[0105] Obtaining second drawing order information corresponding to the color information;

[0106] Then S3 is replaced by:

[0107] S321, obtaining a first musical score according to the musical scale, pitch, duration, and first drawing order information;

[0108] S322, obtaining a second musical score according to the musical scale, pitch, duration, and second drawing order information;

[0109] S323: Concatenate the first music score and the second music score to generate a target music score.

[0110] The third embodiment of the present invention is:

[0111] A method for generating music based on an image, which differs from the other embodiments in that:

[0112] It also includes receiving beat information, lyrics information, instrument information and marking information;

[0113] S3 and later include:

[0114] S4, filling in the score measure according to the first note, the second note, the drawing order information, and the beat information to generate a target score;

[0115] In an optional embodiment, the measure beat is customized to 1 / 4, 2 / 4, 3 / 4, 4 / 4, 3 / 8, 6 / 8, 2 / 2, etc. The user selects a time signature in advance, and when the note value matches the first measure value, it will automatically jump to the next measure;

[0116] In an optional embodiment, the system further includes: verifying whether a musical score measure is complete, and if so, filling in the next measure; if the note value combination is less than a measure or the note value combination does not match the measure time signature, the system will prompt the user to adjust the note value of the measure, or the user can use rests, dots, etc. to supplement the value until the complete measure rhythm is presented before entering the next measure;

[0117] S51, matching the lyric information with the target musical score to obtain a correspondence between each word and each note, where the notes include the first note or the second note;

[0118] S52, determining whether the intonation of the character matches the musical note; if not, raising or lowering the pitch corresponding to the musical note by a preset height, and then returning to the step of determining whether the intonation of the character matches the musical note; if so, displaying the target musical score with the lyric information;

[0119] In an optional embodiment, commonly used Chinese characters are stored in a table of thirteen rhymes, and users can search for Chinese characters that match the rhyme by inputting the corresponding finals; for example, the system search function pronounces the Chinese characters in the order of "yinping, yangping, shangsheng, and qusheng" and inputs the Chinese characters into the system for user retrieval; a phrase selection function is added to facilitate users to find phrases or compose sentences when playing the melody and lyrics game; S6, playing the target music score according to the instrument information; users can find their favorite instruments and timbres in the toolbar of the instrument and timbre module, replace the original melody and timbre, change the sound presentation effect, and let users learn more about instruments and music knowledge;

[0120] S7, modifying the first note or the second note according to the marking information;

[0121] In an optional embodiment, the marking information includes rests, dots, crescendos, decrescendos, legatos, tenutos, appoggiaturas, etc. When the user is composing lyrics, if he feels that a certain part of the melody needs breathing, pauses, syncopation, or termination, he can call for rests or dots to replace it. After the user sets the time signature, if rests or dots are used, the system will automatically match and combine them to form a measure according to the time value combination. If the time value combination of notes, rests, dots, etc. in a measure is less than or exceeds the set time signature value of a measure, the computer system will prompt the user to adjust the notes, rests, dots, etc. in the measure.

[0122] In an optional embodiment, the beat information, the lyric information, and the marking information may all be received or selected from among them, which is not limited herein. Accordingly, S4-S7 may all be executed or one or more may be selected to be executed, corresponding to the received information;

[0123] In an optional embodiment, after each creative graphic or line is completed, you can click to play the note melody generated by the graphic or line. The melody will be converted into a selected rhythmic measure according to the length of the note, and the audio will be played synchronously.

[0124] Please refer to Figure 2 , the fourth embodiment of the present invention is:

[0125] A terminal 1 for generating music based on images includes a processor 2, a memory 3, and a computer program stored in the memory 3 and executable on the processor 2. When the processor 2 executes the computer program, each step in Examples 1 to 3 is implemented.

[0126] The fifth embodiment of the present invention is:

[0127] A system for generating music based on an image, comprising a brush, a drawing board, and a processing terminal;

[0128] The paintbrush includes an NFC chip, and the drawing board includes an NFC reader and a dot matrix sensor;

[0129] The NFC chip is used to store color information;

[0130] The NFC reader is used to read color information;

[0131] The dot matrix sensor is used to read graphic information; specifically, the graphic information records the area, length or diameter information of the graphic;

[0132] The processing terminal is configured to generate a target musical score based on the color information and the graphic information; specifically, the processing terminal obtains a musical scale and pitch class based on the color information, and obtains a duration based on the area, length, or diameter information; and generates the target musical score based on the musical scale, pitch class, and duration;

[0133] The paintbrush, the drawing board and the processing terminal cooperate to implement the steps in the first to third embodiments.

[0134] In summary, the present invention provides a method and terminal for generating music based on an image; the music score and the image are split into fine-grained elements and then matched, and while ensuring that the corresponding music score can be successfully generated based on the image, the variability of the music score is ensured, and the problem of possible duplication of the music score when a large number of music scores are generated is avoided; and the drawing process is combined with the music creation process to enhance the user experience and enhance the user's sense of participation, which is particularly suitable for cultivating the musical sense of teenagers and young children, combining education with entertainment, and can stimulate the user's musical potential and achieve music literacy for people of appropriate age; at the same time, the process of drawing the image is a creative process. After obtaining a target music score based on the image, the target music score can be further modified through the provided tools, such as adding dots, spacers and other marks; selecting beats; filling in lyrics, providing users with a music creation experience.

[0135] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent transformations made using the contents of the present invention's description and drawings, or directly or indirectly applied in related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for generating music based on an image, characterized in that: Including steps: Acquire image drawing information by reading brush data, wherein the image drawing information includes graphic information, color information, and drawing order information; determining whether a conversion request is received, and if so, obtaining a musical scale, a pitch level, and a duration according to the graphic information and the color information; generating a target musical score according to the scale, pitch, duration, and drawing order information; The drawing order information is the drawing order corresponding to the graphic information or the color information; The obtaining of the musical scale, pitch and duration according to the graphic information and the color information comprises: Obtaining a first pitch and a first duration according to the graphic information; obtaining a second pitch and a second scale according to the color information; Generating the target music score according to the scale, pitch, duration and drawing order information includes: Obtaining a first note according to the first pitch level and the first duration; Obtaining a second note according to the second pitch degree and the second scale; generating a target musical score according to the first note, the second note, and the drawing order information; It also includes receiving lyrics information; The step of generating a target musical score according to the musical scale, pitch, duration and drawing order information includes: Matching the lyric information with the target musical score to obtain a correspondence between each word and each note, wherein the note includes the first note or the second note; Determine whether the intonation of the word matches the note. If not, raise or lower the pitch corresponding to the note by a preset height, and then return to the step of determining whether the intonation of the word matches the note. If so, display the target music score with the lyrics information.

2. The method for generating music based on an image according to claim 1, wherein: The step of generating a target musical score according to the musical scale, pitch, duration and drawing order information includes: Get the default scale and default duration; Generating the target music score according to the scale, pitch, duration and drawing order information further includes: Obtaining a first note according to the first pitch level, the first duration, and the default scale; obtaining a second note according to the second pitch degree, the second scale and the default duration; A target musical score is generated according to the first note, the second note, and the drawing order information.

3. The method for generating music based on an image according to claim 1, wherein: The step of generating a target musical score according to the musical scale, pitch, duration and drawing order information includes: Obtaining first drawing order information corresponding to the graphic information; Obtaining second drawing order information corresponding to the color information; Generating the target music score according to the scale, pitch, duration and drawing order information includes: Obtaining a first musical score according to the musical scale, pitch, duration, and first drawing order information; Obtaining a second musical score according to the musical scale, pitch, duration, and second drawing order information; The first music score and the second music score are concatenated to generate a target music score.

4. A method for generating music based on an image according to claim 1 or 2, characterized in that: Obtaining the first pitch and the first duration according to the graphic information includes: Determining a graphic type according to the graphic information, where the graphic type includes a closed graphic and an open graphic; If the graphic type corresponding to the graphic information is a closed graphic, obtaining the first pitch level according to a preset first pitch level comparison table; If the graphic type corresponding to the graphic information is an open graphic, the first pitch level is obtained according to a preset second pitch level comparison table.

5. The method for generating music based on an image according to claim 1 or 2, characterized in that: The obtaining of the second pitch and the second scale according to the color information comprises: Acquire color type and color brightness according to the color information; Obtaining the second pitch level according to the color type and a preset third pitch level comparison table; The second scale is obtained according to the color brightness and a preset first scale comparison table.

6. A method for generating music based on images according to claim 1 or 2, characterized in that: It also includes receiving beat information; Generating the target music score according to the scale, pitch, duration and drawing order information further includes: The music score measures are filled according to the first note, the second note, the drawing order information and the beat information to generate a target music score.

7. A method for generating music based on an image according to claim 1 or 2, characterized in that: Also includes receiving tag information; The step of generating a target musical score according to the first note, the second note, and the drawing order information includes: The first note or the second note is modified according to the marking information.

8. A terminal for generating music based on an image, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method for generating music based on images described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Graphical music editing method and system and storage medium

    CN113035157A

  • Audio generation method and device, computer equipment and storage medium

    CN114333744A