A method for stretching complex spectrum with voice parts

By calculating the linear stretching ratio and redistributing the score coordinates, the problem of inadaptability in the display of polyphonic music scores in interactive smart devices was solved, customized display of the score was achieved, and the user experience was improved.

CN116935702BActive Publication Date: 2025-09-26BEIJING JINSANHUI TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202310133775.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-18
Publication Date
2025-09-26
Estimated Expiration
2041-10-18

AI Technical Summary

Technical Problem

When displaying polyphonic music scores, existing interactive smart devices are unable to perform customized adjustments based on the user's display screen size, resulting in inadaptability of the score display.

Method used

By obtaining the score data and stretching instructions, calculating the linear stretching ratio, and reallocating the coordinates of each measure and symbol, the stretching and compression of the score can be achieved to adapt to the display of different screen sizes.

Benefits of technology

Adaptive adjustment of the length of the music score is achieved, ensuring that each measure, note and other symbols are displayed aligned in an inherent order, improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116935702B_ABST
    Figure CN116935702B_ABST
Patent Text Reader

Abstract

The present invention relates to a complex score stretching display method, comprising: obtaining music score data and stretching instructions, traversing all single staves in a complex score; evenly distributing the width variable in the stretching instruction according to the number of notes contained in each measure, taking the ratio of the width variable to the original width of the notes to obtain the linear stretching ratio of the current single stave; traversing all measures in the current single stave, modifying the original width of the current measure by the linear stretching ratio and adding the end coordinates of each measure to obtain the end coordinates of the stretched current measure; reallocating the coordinates of the symbols in each measure; and displaying each measure of the stretched single stave and the symbols therein on an interactive window. The present invention can conveniently and flexibly adjust the stretching (and compression) length of single and complex staves, including those in staff notation and simplified notation, so that the ultimately displayed music score is accurate, neat and beautiful, and is very suitable for interactive intelligent music teaching equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of music teaching software, and in particular to a method for stretching complex spectrum with voice parts. Background Art

[0002] Traditional music instruction relies primarily on on-site demonstrations by teachers, which not only places high demands on teachers but also often leaves students lacking hands-on learning opportunities. However, with the integration of information technology, interactive music teaching software and smart devices have emerged on the market, allowing students to engage more deeply in music learning and experience a different kind of learning experience.

[0003] Chinese patent CN 108847207 A proposes an interactive intelligent device for music teaching, which enables an interactive arrangement experience when users need to create music. However, existing technologies can only display the arranged music score in a relatively fixed format, and users cannot customize the width of the score based on the actual display screen size. Therefore, it is necessary to improve the music score display technology of existing interactive intelligent devices to achieve a stretching display effect that can be controlled by user instructions, especially for polyphonic music. Summary of the Invention

[0004] To solve the above technical problems, the present invention proposes a complex spectrum stretching method with voice parts, comprising the following steps:

[0005] Acquiring music score data and stretching instructions, wherein the music score data includes a complex staff table;

[0006] Traverse all the single staves in the complex stave, for the current single stave:

[0007] Obtaining the initial width of each measure of the current single staff;

[0008] After evenly distributing the width variable in the stretch instruction according to the number of notes contained in each measure, taking the ratio of the width variable to the original width of the notes to obtain the linear stretch ratio of the current single staff;

[0009] Traverse all measures in the current single staff, for the current measure:

[0010] Modify the original width of the current section by the linear stretch ratio and add

[0011] The end point coordinates of the bar are obtained to obtain the end point coordinates of the current bar after stretching;

[0012] reassigning coordinates of symbols within each of said subsections;

[0013] Display each measure and the symbols of the stretched single staff in the interactive window;

[0014] The stretch ratio is obtained according to the following calculation formula:

[0015] Scale=(Frame.width-Const.width+Fix.width-XiaoJie.width.sum) / YinFu.width

[0016] Among them, Scale indicates the linear stretch ratio, Frame.width indicates the width of the current single staff, that is, the width of the current line; Const.width indicates the width of the key signature and / or time signature after the bar line; Fix.wdth indicates the distance in front of the secondary melody when it starts from a certain note in a certain bar; Xiaojie.width.sum indicates the sum of the widths of all bars in the current line; YinFu.width indicates the original placeholder width of each note;

[0017] If the current measure contains several parts, iterate over all parts:

[0018] The number of parts and the maximum value of the x-coordinate of the symbols in the parts of the current measure are stored; and the stretching width of each of the parts is calculated according to the stretching ratio.

[0019] The present invention solves the problem for users to achieve customized display effects for musical scores, especially polyphonic music scores, in existing interactive intelligent devices, so that the length of the displayed complex score can be adaptively adjusted according to the size of the interactive window, while ensuring that the corresponding measures in each single score of the same complex score and all notes and other symbols in the measures are aligned and displayed according to their inherent order and inherent rules. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 、 one Flowchart of a method for stretching and displaying a complex spectrum according to some embodiments;

[0021] Figure 2 、 one Stretch display effect diagram of some embodiments;

[0022] Figure 3 、 one Secondary melody display effect diagram of some embodiments;

[0023] Figure 4 、 one Schematic diagram of the complex spectrum of some specific embodiments. DETAILED DESCRIPTION

[0024] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions of various embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0025] In some embodiments, the process of the complex spectrum stretching display method is as follows: Figure 1 As shown, the following steps are included:

[0026] Obtaining music score data and stretching instructions, the music score data including a complex staff table;

[0027] Traverse all single staves in the complex staff, for the current single stave:

[0028] Get the initial width of each measure of the current single staff;

[0029] The width variable in the stretch instruction is evenly distributed according to the number of notes in each measure, and the ratio of the width variable to the original width of the notes is taken to obtain the linear stretch ratio of the current single staff.

[0030] Traverse all measures in the current single staff. For the current measure:

[0031] Modify the original width of the current measure by the linear stretch ratio and add the end coordinates of the previous measure to get the end coordinates of the current measure after stretching;

[0032] Reassign the coordinates of the symbols within each subsection;

[0033] Display each measure of the stretched single staff and the symbols therein in the interactive window.

[0034] It should be further explained that the width variable is determined by the number of bars in the current line. The width of the current line is fixed. The more bars in the line, the less width can be allocated to the notes in the current bar. When calculating the linear stretch ratio, it is necessary to subtract or add some non-scalable distances in the single staff of the current line (such as clef, key signature, time signature, etc.), add / subtract some correction values ​​according to the requirements of the display situation, and then obtain the note's placeholder width stretch ratio. For example, some more specific implementation methods use the following calculation formula to obtain the stretch ratio: Scale = (Frame.width-Const.width+Fix.width-XiaoJie.width.sum) / YinFu.width, where Scale represents the linear stretch ratio and Frame.width represents the distance when The width of the previous single staff, that is, the width of the current line; Const.width indicates the width of the key signature / time signature following the bar line (when the key signature of the first bar of the next line changes, the changed key signature is displayed behind the bar line of the last bar of the previous line; when the time signature of the next line changes, the new time signature is displayed behind the bar line of the last bar of the previous line); Fix.wdth indicates that when the secondary melody starts from a certain note in a certain bar, there is a distance in front; Xiaojie.width.sum indicates the sum of the widths of all bars in the current line; YinFu.width indicates the original placeholder width of each note.

[0035] The term "music score data" includes global music score data and / or part of the music score data therein, and the expression form of the data includes (but is not limited to) five-line music notation and simplified music notation. The "music score data" includes objects in XML format or JSON format. Preferably, the data is saved in JSON format, and the JSON object includes a global music score class, and the data of each global music score class includes an array composed of data of several complex staff classes, and each complex staff class data includes an array composed of data of several single staff classes, and each single staff class data includes an array composed of several measure data, wherein: some measure class data includes several voices, and some measure class data includes secondary melody data corresponding to the measure. The following is an example of a specific description of the fields of a part of JSON data:

[0036]

[0037]

[0038]

[0039] Music XML files have been widely used in the industry, while JSON files are just beginning to gain traction. However, in the specific field of Ajax, XML files will undoubtedly give way to JSON files in the future. JSON files are smaller in size than XML files, and they are more convenient for JavaScript interaction, with significantly faster reading and searching speeds than XML files.

[0040] The stretching effect of the embodiment involved is as follows Figure 2 As shown, the originally dense music score is displayed as a sparse score after geometric stretching, while the size, order, and relative position of each note remain unchanged. Obviously, the technical solution of the present invention can also achieve the reverse operation of stretching, that is, it can achieve geometric compression of the original length of the music score before display.

[0041] The term "stretching instruction" mainly refers to the input instruction implemented by the user through devices including keyboard, mouse movement, etc., including actions such as dragging the display object of the stretched music score; through this instruction program, data including (but not limited to) the movement width of the display object of the stretched music score can be obtained.

[0042] The term "polyscore" refers to the musical notation of polyphonic music.

[0043] In some embodiments, the step of reallocating the coordinates of the symbols in each measure specifically includes: obtaining the x-coordinate and width of the first symbol in the current measure, the symbol including a time signature, a key signature, and a musical note;

[0044] storing a maximum x-coordinate value Max1 of all the time signatures of the bars in the current multistaff, and if the key signature of the current bar is different from that of the corresponding bar in another single stave of the multistaff, aligning the time signatures of all the bars according to Max1;

[0045] storing a maximum x-coordinate value Max2 of the first note of a measure in the current multistaff, and aligning the first notes of all measures according to Max2 if the current measure has a different key signature from its corresponding measure in another single stave of the current multistaff;

[0046] According to the stretched width of the current section and the x-coordinate and width of the initial symbol in the current section, the x-coordinate and width values ​​of all symbols in the current section are correspondingly updated.

[0047] The method involved in some embodiments also includes: if the current measure includes a secondary melody, traversing the secondary melody measures, and for the measures in the secondary melody measures corresponding to the current measure: correcting the x coordinate of each measure corresponding to the current measure according to the difference between the x coordinate of the current measure and the x coordinate of the starting position of the secondary melody.

[0048] When the corresponding secondary melody bar needs to be displayed (such as Figure 3 (As shown), it is usually necessary to consider adaptively adjusting the stretch width of each measure to ensure that the corresponding sub-melody measure can be displayed normally. Among them, the measure with a sub-melody has a corresponding relationship with its sub-melody. After adjusting the display coordinate value of the measure, the sub-melody bound to the measure is adjusted according to its internal corresponding relationship.

[0049] The method involved in some embodiments also includes: if the current measure includes several parts, traversing all parts: storing the number of parts and the maximum value of the x-coordinate of the symbols in the parts of the current measure; and calculating the stretching width of each part according to the stretching ratio.

[0050] The method involved in some embodiments further includes: if there is an appoggiatura in the first symbol in the current measure, setting the appoggiatura width in all parts in the current measure.

[0051] The method involved in some embodiments further includes: updating the starting x-coordinate value of each section that needs to be distinguished as a paragraph.

[0052] Some more specific implementations also include: adjusting the width variable in the music score stretching instruction according to the displayed threshold, the display width threshold of the secondary melody corresponding to the current measure of the music score, and other constant values.

[0053] Some more specific implementations also include: if there is more than one measure that needs to be stretched in the musical score multi-staff table, then after processing the x-coordinates of all the measures that need to be stretched, the display of the musical score multi-staff table in the interactive window is updated; if there is only one measure that needs to be stretched in the musical score multi-staff table, then after processing the measure, the display of the musical score multi-staff table in the interactive window is updated.

[0054] Some more specific embodiments involve a complex score, in which the notes are divided into notes of different time values, usually divided into whole notes, half notes, quarter notes, eighth notes, sixteenth notes, and so on; each score has a time signature as the playing time of each measure of the notes, for example Figure 4In the five-line staff, the contents at the beginning of the measure are the clef, key signature (#), and time signature (3 / 4) in order. Among them, 3 / 4 means that the current measure is a 4 / 3 time score, so the total value of the notes in the current measure must reach the length of 4 / 3 beats. For example, in the first measure, the first line contains a whole-note rest. The whole note means that the current note must occupy the entire length of the measure. In the second line of the first measure, the notes are quarter notes, and the length of each note is one-quarter beat. Therefore, in a 4 / 3 time measure, three quarter notes are placed, and the total length of the three quarter notes must be equal to the length of 4 / 3 beats. Each line of music is represented by a single staff, and the staff enclosed in curly brackets represents a double staff. In the current example, each double staff contains two single staffs (each single staff is played as the main melody), and each line of the single staff is divided into four bars. The vertical lines in the row are called bar lines, which separate the bars in each line. The number of bars in each double staff is equal. For example, the number of bars in the first line of the single staff in the example must correspond to the number of bars in the second line, and the width of the bars must also correspond. It is only necessary to correspond within the current double staff. Different double staffs have different numbers of bars, so there is no need for unified correspondence in this embodiment.

[0055] Some embodiments apply the present invention to a multifunctional digital music teaching system, which can also realize: processing music score data displayed in multiple lines into playback data; and drawing legato lines according to the positions of notes in the music score.

[0056] The method for processing the multi-line displayed music score data into playback data includes:

[0057] Get music score data;

[0058] Read the play command, which includes the start and end point information of the play;

[0059] From the starting point to the end point,

[0060] Iterate over the rows of the single spectrum marked by the starting point:

[0061] Traverse each measure in the line: record the order of each measure in the current single score;

[0062] Iterate over the voices of a measure:

[0063] Calculate the order of the notes in each part in the current single score and save the data of the notes in each part in order in the current playback data;

[0064] If the current note and the previous note are not in the same complex staff, record the sequence of the current note from the beginning;

[0065] If there is a symbol in the current part, the playback data of the corresponding note is processed into a note with a symbol state according to the symbol.

[0066] The technical solution of the present invention can conveniently and flexibly adjust the stretching (and compression) length of single and complex scores, including those in the form of five-line notation and simplified notation. The final displayed music score is accurate, neat and beautiful, and is very suitable for interactive intelligent music teaching equipment.

[0067] The embodiments of the subject matter described in this specification can be implemented as one or more computer programs, that is, one or more modules of computer program instructions encoded on one or more tangible non-transitory program carriers for execution by a data processing device or for controlling the operation of a data processing device. A computer program (which may also be referred to or described as a program, software, software application, module, software module, script or code) can be written in any form of programming language, including compiled or interpreted languages ​​or declarative or procedural languages, and the computer program can be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment. A computer program may, but does not necessarily, correspond to a file in a file system. A program may be stored in a portion of a file that stores other programs or data, for example, one or more scripts stored in a markup language document; in a single file dedicated to a related program; or in multiple collaborative files, for example, files storing one or more modules, subroutines or code portions. A computer program can be deployed to execute on one or more computers, the computers being located in one place or distributed to multiple locations and interconnected by a communication network.

[0068] The processes and logic flows described in this specification can be performed by one or more programmable computers executing one or more computer programs to perform functions by operating on input data and generating output. The processes and logic flows can also be performed by, and devices can be implemented as, special purpose logic circuitry, such as an FPGA (field programmable gate array) or an ASIC (application-specific integrated circuit).

[0069] A computer suitable for executing a computer program includes and may be based, for example, on a general-purpose microprocessor or a special-purpose microprocessor or both, or a central processing unit of any other kind. Typically, the central processing unit will receive instructions and data from a read-only memory or a random access memory or both. The main elements of a computer are a central processing unit for running or executing instructions and one or more memory devices for storing instructions and data. Typically, a computer will also include or be operatively coupled to receive data from or transfer data to one or more mass storage devices for storing data, such as magnetic disks, magneto-optical disks, or optical disks, or both. Computer-readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media, and memory devices.

[0070] To transmit interactions with a user, embodiments of the subject matter described in this specification can be implemented on a computer having: a display device, such as a CRT (cathode ray tube) or LCD (liquid crystal display) monitor, for displaying information to the user; and a keyboard and a pointing device, such as a mouse or trackball, with which the user can transmit input to the computer. Other types of devices can also be used to transmit interactions with the user; for example, feedback provided to the user can be any form of sensory feedback, such as visual feedback, auditory feedback, or tactile feedback; and input from the user can be received in any form, including acoustic input, voice input, or tactile input.

[0071] The embodiment of the subject matter described in this specification can be implemented in a computing system, and this computing system includes back-end components such as data servers, or includes middle components such as application servers, or includes front-end components such as client computers, and this client computer has a graphical user interface or a web browser, and a user can interact with the implementation of the subject matter described in this specification through a graphical user interface or a web browser, or this computer system includes any combination of one or more such back-end components, middle components or front-end components. The components in the system can be interconnected by digital data communication of any form or medium such as a communication network. Examples of communication networks include local area networks ("LANs") and wide area networks ("WANs"), for example, the Internet. This computer system can include a client and a server. The client and the server are usually far away from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on respective computers and having a client-server relationship between each other.

[0072] Although this specification contains many specific implementation details, these should not be interpreted as limitations on the scope of any invention or on the scope of what can be claimed, but rather as illustrations of features that can concretize a particular embodiment of a particular invention. Specific features described in this specification in the context of independent embodiments can also be implemented in combination with a single embodiment. Conversely, various features described in the context of a single embodiment can also be implemented independently in multiple embodiments, or in any suitable sub-combination. In addition, although features may be described above as acting in combination and even initially claimed as such, one or more features from a claimed combination may in some cases be removed from the combination, and a claimed combination may be turned into a sub-combination or a variation of a sub-combination.

Claims

1. A complex spectrum stretching method with voice parts, characterized in that: The following steps are involved: Acquiring music score data and stretching instructions, wherein the music score data includes a complex staff table; Traverse all the single staves in the complex stave, for the current single stave: Obtaining the initial width of each measure of the current single staff; After evenly distributing the width variable in the stretch instruction according to the number of notes contained in each measure, taking the ratio of the width variable to the original width of the notes to obtain the linear stretch ratio of the current single staff; Traverse all measures in the current single staff, for the current measure: Modify the original width of the current bar by the linear stretch ratio and add the end point coordinates of the bar to obtain the end point coordinates of the current bar after stretching; reassigning coordinates of symbols within each of said subsections; Display each measure and the symbols of the stretched single staff in the interactive window; The linear stretch ratio is obtained according to the following calculation formula: Scale = (Frame.width - Const.width + Fix.width - XiaoJie.width.sum) / YinFu.width Among them, Scale indicates the linear stretch ratio, Frame.width indicates the width of the current single staff, that is, the width of the current line; Const.width indicates the width of the key signature and / or time signature after the bar line; Fix.wdth indicates the distance in front of the secondary melody when it starts from a certain note in a certain bar; Xiaojie.width.sum indicates the sum of the widths of all bars in the current line; YinFu.width indicates the original placeholder width of each note; If the current measure contains several parts, iterate over all parts: Storing the number of voices and the maximum value of the x-coordinate of the symbols in the voices of the current measure; and calculating the stretching width of each voice according to the linear stretching ratio; If there is an appoggiatura in the first symbol in the current measure, setting the appoggiatura width for all voices in the current measure; Update the starting x-coordinate value of each section that needs to be distinguished by paragraphs.

Citation Information

Patent Citations

  • Interactive smart device and composing method and unit thereof

    CN108847207A

  • Method and computer program for processing music score data displayed in multiple lines into playback data

    CN113707111B

  • A method for stretching and displaying complex spectra

    CN113724542B

  • Stretching method of complex spectrum with auxiliary melody

    CN116895192A