[go: up one dir, main page]

CN116895192A - Stretching method of complex spectrum with auxiliary melody - Google Patents

Stretching method of complex spectrum with auxiliary melody Download PDF

Info

Publication number
CN116895192A
CN116895192A CN202310140428.5A CN202310140428A CN116895192A CN 116895192 A CN116895192 A CN 116895192A CN 202310140428 A CN202310140428 A CN 202310140428A CN 116895192 A CN116895192 A CN 116895192A
Authority
CN
China
Prior art keywords
width
current
section
bar
stretching
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202310140428.5A
Other languages
Chinese (zh)
Other versions
CN116895192B (en
Inventor
李现峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jinsanhui Technology Co ltd
Original Assignee
Beijing Jinsanhui Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jinsanhui Technology Co ltd filed Critical Beijing Jinsanhui Technology Co ltd
Priority to CN202310140428.5A priority Critical patent/CN116895192B/en
Publication of CN116895192A publication Critical patent/CN116895192A/en
Application granted granted Critical
Publication of CN116895192B publication Critical patent/CN116895192B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09BEDUCATIONAL OR DEMONSTRATION APPLIANCES; APPLIANCES FOR TEACHING, OR COMMUNICATING WITH, THE BLIND, DEAF OR MUTE; MODELS; PLANETARIA; GLOBES; MAPS; DIAGRAMS
    • G09B5/00Electrically-operated educational appliances
    • G09B5/06Electrically-operated educational appliances with both visual and audible presentation of the material to be studied
    • G09B5/065Combinations of audio and video presentations, e.g. videotapes, videodiscs, television systems
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09BEDUCATIONAL OR DEMONSTRATION APPLIANCES; APPLIANCES FOR TEACHING, OR COMMUNICATING WITH, THE BLIND, DEAF OR MUTE; MODELS; PLANETARIA; GLOBES; MAPS; DIAGRAMS
    • G09B15/00Teaching music
    • G09B15/02Boards or like means for providing an indication of notes
    • G09B15/023Electrically operated

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Educational Administration (AREA)
  • Educational Technology (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Auxiliary Devices For Music (AREA)
  • Electrophonic Musical Instruments (AREA)

Abstract

本发明涉及一种复谱拉伸显示方法,包括:获取乐谱数据和拉伸指令,遍历复谱表中的所有单谱表;将拉伸指令中的宽度变量按照每个小节内容纳的音符个数平均分配后,取其与音符的原占位宽度的比值得到当前单谱表的线性拉伸比例;遍历当前单谱表中的所有小节,将当前小节的原宽度以线性拉伸比例修改并加上个小节的终点坐标,得到当前小节拉伸后的终点坐标;重新分配每个小节内的符号的坐标;将拉伸后的单谱表的每个小节和其中的符号显示在交互式窗口上。本发明能方便灵活地调整包括五线谱形式和简谱等形式的单谱、复谱的拉伸(和压缩)长度,最终显示的乐谱准确、整齐美观,十分适用于可交互智能音乐教学设备。

The invention relates to a method for stretching and displaying complex music scores, which includes: acquiring music score data and stretching instructions, traversing all single staffs in the complex music table; and converting the width variable in the stretching instructions according to the number of notes contained in each section. After the numbers are evenly distributed, take the ratio to the original width of the note to obtain the linear stretching ratio of the current single staff; traverse all the measures in the current single staff, modify the original width of the current section with the linear stretching ratio and Add the end point coordinates of a section to get the stretched end point coordinates of the current section; redistribute the coordinates of the symbols in each section; display each section of the stretched single staff and the symbols in it in the interactive window superior. The invention can conveniently and flexibly adjust the stretched (and compressed) lengths of single scores and complex scores including staffs, simplified musical notations and other forms. The finally displayed music scores are accurate, neat and beautiful, and are very suitable for interactive intelligent music teaching equipment.

Description

一种带副旋律的复谱的拉伸方法A stretching method for complex scores with submelody

技术领域Technical field

本发明涉及音乐教学软件领域,具体涉及一种带副旋律的复谱拉伸方法。The invention relates to the field of music teaching software, and in particular to a complex spectrum stretching method with submelody.

背景技术Background technique

传统教学模式下的音乐教学主要通过教师现场演示实现,不仅对于教师的素质要求较高,而且学生们往往缺乏实践学习的参与。而在信息技术的融合之下,市场上出现了一些具有交互功能的音乐教学软件和智能设备,让学生们更多地参与到音乐学习中,感受到不同的学习体验。Music teaching under the traditional teaching model is mainly implemented through live demonstrations by teachers. Not only does it require high quality of teachers, but students often lack participation in practical learning. With the integration of information technology, some music teaching software and smart devices with interactive functions have appeared on the market, allowing students to participate more in music learning and experience different learning experiences.

中国专利CN 108847207 A提出了一种用于音乐教学的交互智能设备,当用户需要进行音乐制作时实现交互式的编曲体验。然而,现有技术只能将编曲完成的乐谱显示为一种相对固定的形式,用户不能根据实际使用时的显示屏幕大小来对乐谱的宽度进行定制。因此,需要对现有交互智能设备的乐谱显示技术进行改进,以实现可以通过用户的指令来控制特别是复调音乐的乐谱的拉伸显示效果。Chinese patent CN 108847207 A proposes an interactive intelligent device for music teaching, which enables an interactive arranging experience when the user needs to make music. However, the existing technology can only display the arranged music score in a relatively fixed form, and the user cannot customize the width of the music score according to the actual display screen size during use. Therefore, there is a need to improve the music score display technology of existing interactive smart devices to achieve a stretched display effect that can be controlled through user instructions, especially for polyphonic music scores.

发明内容Contents of the invention

为解决以上技术问题,本发明提出一种带副旋律的复谱拉伸方法,包括以下步骤:In order to solve the above technical problems, the present invention proposes a complex spectrum stretching method with submelody, which includes the following steps:

获取乐谱数据和拉伸指令,所述乐谱数据包括复谱表;Obtain musical score data and stretching instructions, where the musical score data includes a multiple staff table;

遍历所述复谱表中的所有单谱表,对于当前单谱表:Traverse all single staffs in the complex staff, for the current single staff:

获取所述当前单谱表的每个小节的初始宽度;Get the initial width of each measure of the current single staff;

将所述拉伸指令中的宽度变量按照每个小节内容纳的音符个数平均分配后,取其与所述音符的原占位宽度的比值得到所述当前单谱表的线性拉伸比例;After the width variable in the stretching instruction is evenly distributed according to the number of notes contained in each section, the ratio of the width variable to the original width of the note is obtained to obtain the linear stretching 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 section by the linear stretch ratio and add a

小节的终点坐标,得到所述当前小节拉伸后的终点坐标;The end point coordinates of the section are obtained to obtain the end point coordinates of the current section after stretching;

重新分配每个所述小节内的符号的坐标;Reassign the coordinates of symbols within each said subsection;

将拉伸后的单谱表的每个小节和其中的符号显示在交互式窗口上;Display each measure of the stretched single staff and its symbols in the interactive window;

按照以下计算式得到性拉伸比例:The sexual stretch ratio is obtained according to the following calculation formula:

Scale=(Frame.width-Const.width+Fix.width-XiaoJie.width.sum)/YinFu.widthScale=(Frame.width-Const.width+Fix.width-XiaoJie.width.sum)/YinFu.width

其中,Scale表示线性拉伸比例,Frame.width表示当前单谱表的宽度,也就是当前行的宽度;Const.width表示小节线后面的调号和/或拍号宽度;Fix.wdth表示副旋律从某一个小节的某一个音符开始的时候,前面有一个距离;Xiaojie.width.sum表示当前行内所有小节的宽度的加和;YinFu.width表示每个音符的原始占位宽度;Among them, Scale represents the linear stretching ratio, Frame.width represents the width of the current single staff, that is, the width of the current line; Const.width represents the key signature and/or time signature width behind the bar line; Fix.wdth represents the submelody. When starting from a certain note of a certain measure, there is a distance in front; Xiaojie.width.sum represents the sum of the widths of all measures in the current line; YinFu.width represents the original occupancy width of each note;

若所述当前小节包括副旋律,遍历副旋律小节,对于所述副旋律小节中与所述当前小节对应的小节:按照所述当前小节的x坐标与所述副旋律的起始位置的x坐标的差修正每个与所述当前小节对应的小节的x坐标。If the current section includes a submelody, traverse the submelody sections, and for the section corresponding to the current section in the submelody section: According to the x coordinate of the current section and the x coordinate of the starting position of the submelody The difference corrects the x-coordinate of each section corresponding to the current section.

本发明为用户解决了在现有交互智能设备中对乐谱尤其是复调音乐的乐谱实现定制化的显示效果,使得显示的复谱长度能够根据交互式窗口的大小适应性地进行调整,同时保证了同一复谱的的各单谱中相对应的小节和小节中所有的音符及其他符号按其固有顺序、固有规则对齐显示。The present invention solves the problem for users to achieve customized display effects for music scores, especially polyphonic music scores, in existing interactive intelligent devices, so that the length of the displayed complex scores can be adaptively adjusted according to the size of the interactive window, while ensuring The corresponding measures in each single score of the same complex score and all the notes and other symbols in the measures are aligned and displayed according to their inherent order and inherent rules.

附图说明Description of the drawings

图1、一些实施方式的复谱的拉伸显示方法的流程图;Figure 1 is a flowchart of a method for stretching and displaying complex spectra in some embodiments;

图2、一些实施方式的拉伸显示效果图;Figure 2. Stretch display renderings of some embodiments;

图3、一些实施方式的副旋律显示效果图;Figure 3. Submelody display renderings of some embodiments;

图4、一些具体实施方式的复谱的示意图。Figure 4. Schematic diagram of complex spectra of some embodiments.

具体实施方式Detailed ways

为了使本技术领域的人员更好地理解本发明方案,下面将结合附图对本发明涉及的多种实施方式中的技术方案进行清楚、完整地描述。基于本发明中的实施方式,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施方式,都应当属于本发明保护的范围。In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the various embodiments involved in the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts should fall within the scope of protection of the present invention.

一些实施方式,涉及的复谱的拉伸显示方法的流程如图1所示,包括以下步骤:Some embodiments involve a process flow of a stretched display method of a complex spectrum, as shown in Figure 1, which includes the following steps:

获取乐谱数据和拉伸指令,乐谱数据包括复谱表;Obtain music score data and stretch instructions. Music score data includes complex staff tables;

遍历复谱表中的所有单谱表,对于当前单谱表:Traverse all single staffs in a complex staff, for the current single staff:

获取当前单谱表的每个小节的初始宽度;Get the initial width of each measure of the current single staff;

将拉伸指令中的宽度变量按照每个小节内容纳的音符个数平均分配后,取其与音符的原占位宽度的比值得到当前单谱表的线性拉伸比例;After the width variable in the stretch command is evenly distributed according to the number of notes contained in each measure, the ratio of the width variable to the original width of the note is used 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 section with a linear stretching ratio and add the end point coordinates of a section to obtain the stretched end point coordinates of the current section;

重新分配每个小节内的符号的坐标;Reassign the coordinates of symbols within each section;

将拉伸后的单谱表的每个小节和其中的符号显示在交互式窗口上。Displays each measure of the stretched single staff and its symbols in the interactive window.

需要进一步说明的是,宽度变量根据当前行内的小节数决定,当前行的宽度是固定的,行内的小节数越多,表示当前小节内音符可分配的宽度就越少。在计算线性拉伸比例时,需要把当前行的单谱表中的一些不能缩放的距离减掉或者补上(比如谱号调号拍号等),根据显示情况的要求加/减一些修正值,然后获得音符的占位宽度性拉伸比例,例如一些更具体的实施方式按照以下计算式得到性拉伸比例:Scale=(Frame.width-Const.width+Fix.width-XiaoJie.width.sum)/YinFu.width其中,Scale表示线性拉伸比例,Frame.width表示当前单谱表的宽度,也就是当前行的宽度;Const.width表示小节线后面的调号/拍号(下一行第一个小节有调号变更时上一行最后一个小节的小节线后面有变更后的调号显示,下一行有拍号变更时上一行最后一个小节的小节线后面有新拍号显示)宽度;Fix.wdth表示副旋律从某一个小节的某一个音符开始的时候,前面有一个距离;Xiaojie.width.sum表示当前行内所有小节的宽度的加和;YinFu.width表示每个音符的原始占位宽度。It should be further explained that the width variable is determined based on the number of measures in the current line. The width of the current line is fixed. The more measures in the line, the less width can be allocated to the notes in the current measure. When calculating the linear stretch ratio, you need to subtract or add some non-scalable distances in the single staff of the current line (such as clef signature, key signature, time signature, etc.), and add/subtract some correction values according to the requirements of the display situation. , and then obtain the stretching ratio of the note's occupying width. For example, some more specific implementations can obtain the stretching ratio according to the following calculation formula: Scale=(Frame.width-Const.width+Fix.width-XiaoJie.width.sum )/YinFu.width Among them, Scale represents the linear stretching ratio, Frame.width represents the width of the current single staff, that is, the width of the current line; Const.width represents the key signature/time signature after the bar line (the first on the next line When there is a key signature change in a bar, the changed key signature is displayed behind the bar line of the last bar in the previous line. When the time signature is changed in the next line, the new time signature is displayed behind the bar line of the last bar in the previous line.) Width; Fix. wdth represents the distance before the submelody starts from a note in a section; Xiaojie.width.sum represents the sum of the widths of all measures in the current line; YinFu.width represents the original width of each note.

术语“乐谱数据”包括全局乐谱数据和/或其中的一部分乐谱数据,该数据的表现形式包括(但不限于)五线谱和简谱。该“乐谱数据”包括XML格式或JSON格式的对象。优选地,该数据保存为JSON格式,该JSON对象包括全局乐谱类,每个全局乐谱类的数据中包括若干个复谱表类的数据组成的数组,每个复谱表类数据中包括若干个单谱表类的数据组成的数组,每个单谱表类数据中包括若干小节数据组成的数组,其中:有一些小节类数据包括若干声部,有一些小节类数据包括与小节对应的副旋律数据。以下是对一部分JSON数据的字段的具体描述的举例:The term "music score data" includes global score data and/or a part of the score data, and the representation forms of this data include (but are not limited to) staffs and simplified musical notations. The "music score data" includes objects in XML format or JSON format. Preferably, the data is saved in JSON format. The JSON object includes a global musical score class. The data of each global musical score class includes an array composed of several data of the complex staff class. Each complex staff class data includes several arrays. An array composed of single-staff data. Each single-staff data includes an array composed of several measures of data. Among them: some measure-type data includes several parts, and some measure-type data includes submelody corresponding to the measure. data. The following is an example of a specific description of the fields of some JSON data:

乐谱XML文件已经被业界广泛的使用,乐谱JSON文件才刚刚开始,但是在Ajax这个特定的领域,未来的发展一定是乐谱XML文件让位于乐谱JSON文件。乐谱JSON文件相对乐谱XML文件,数据的体积小。乐谱JSON文件与JavaScript的交互更加方便,读取和查找速度要远远快于乐谱XML文件。Music score XML files have been widely used in the industry, and music score JSON files have just begun. However, in the specific field of Ajax, future development must be that music score XML files give way to music score JSON files. Compared with music score XML files, music score JSON files have smaller data size. The interaction between music score JSON files and JavaScript is more convenient, and the reading and search speed are much faster than the music score XML files.

涉及的实施方式的拉伸效果如图2所示,可以看到原来的较稠密的乐谱在进行等比拉伸显示之后被显示为稀疏的乐谱,每个音符的大小、顺序和相对位置等表征没有改变。显而易见地是,本发明的技术方案也可以实现拉伸的逆向操作,即可以实现将原乐谱的长度等比压缩后显示。The stretching effect of the embodiment involved is shown in Figure 2. It can be seen that the original dense musical score is displayed as a sparse musical score after the isometric stretching display, and the size, order and relative position of each note are represented. No change. Obviously, the technical solution of the present invention can also realize the reverse operation of stretching, that is, the length of the original musical score can be compressed in equal proportions and then displayed.

术语“拉伸指令”主要指用户通过包括使用键盘、鼠标移动等设备实现的输入指令,包括对被拉伸的乐谱的显示对象的拖拽等动作完成;通过该指令程序可以获取包括(但不限于)对被拉伸乐谱的显示对象的移动宽度的数据。The term "stretch command" mainly refers to the user's input command through the use of keyboard, mouse movement and other devices, including dragging the display object of the stretched music score; through this command program, you can obtain information including (but not Limited to) data of the moving width of the display object of the stretched musical score.

术语“复谱”为复调音乐的乐谱。The term "polyphonic score" refers to the score of polyphonic music.

一些实施方式,涉及的重新分配每个小节内的符号的坐标的步骤具体包括:获取所述当前小节中的第一个符号的x坐标和宽度,所述符号包括拍号、调号、音符;In some embodiments, the step of redistributing the coordinates of symbols within each section specifically includes: obtaining the x-coordinate and width of the first symbol in the current section, where the symbols include time signatures, key signatures, and notes;

存储当前复谱表中小节的所有所述拍号的x坐标最大值Max1,如果所述当前小节与其在该复谱表的其他单谱表中对应的小节的调号不同,则将所有小节的所述拍号按照所述Max1对齐;Store the maximum x-coordinate Max1 of all the time signatures of the section in the current complex staff. If the current section has different key signatures from its corresponding sections in other single staffs of the complex staff, then all the time signatures of all sections will be stored. The time signature is aligned according to the Max1;

存储当前复谱表中小节的第一个音符的x坐标最大值Max2,如果所述当前小节与其在所述当前复谱表的其他单谱表中对应的小节的所述调号不同,则将所有小节的所述第一个音符按照所述Max2对齐;Store the maximum x-coordinate value Max2 of the first note of the section in the current complex staff. If the current section is different from the key signature of its corresponding section in other single staffs of the current complex staff, then The first notes of all bars are aligned according to Max2;

根据所述当前小节的拉伸宽度和所述所述当前小节中的初始的符号的x坐标和宽度,对应地更新所述当前小节内的所有符号的x坐标和宽度值。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 updated accordingly.

一些实施方式涉及的方法还包括:若当前小节包括副旋律,遍历副旋律小节,对于副旋律小节中与当前小节对应的小节:按照当前小节的x坐标与副旋律的起始位置的x坐标的差修正每个与当前小节对应的小节的x坐标。The method involved in some embodiments also includes: if the current section includes a submelody, traverse the submelody sections, and for the section corresponding to the current section in the submelody section: according to the x coordinate of the current section and the x coordinate of the starting position of the submelody. The difference corrects the x-coordinate of each bar corresponding to the current bar.

在需要显示对应的副旋律的小节时(如图3所示),通常要考虑对每个小节的拉伸宽度进行适应性调整,以确保对应的副旋律小节能正常显示。其中,带有副旋律的小节和其副旋律具有对应关系,在给小节的显示坐标值进行调整后,根据其内部的对应关系对该小节绑定的副旋律做出调整。When it is necessary to display the corresponding submelody section (as shown in Figure 3), it is usually necessary to consider adaptively adjusting the stretch width of each section to ensure that the corresponding submelody section can be displayed normally. Among them, a section with a submelody has a corresponding relationship with its submelody. After adjusting the display coordinate value of the section, the submelody bound to the section is adjusted according to its internal corresponding relationship.

一些实施方式涉及的方法还包括:若当前小节内包括若干声部,遍历所有声部:存储声部数和当前小节的声部中的符号的x坐标的最大值;根据性拉伸比例计算每个声部的拉伸宽度。The method involved in some embodiments also includes: if the current section includes several voices, traverse all the voices: store the number of voices and the maximum value of the x-coordinate of the symbol in the voice of the current section; calculate each voice according to the sexual stretching ratio. The stretch width of the voice.

一些实施方式涉及的方法还包括:若当前小节中的第一个符号中存在倚音,在当前小节中的所有声部设置倚音宽度。The method involved in some embodiments further includes: if there is grace note in the first symbol in the current measure, setting the grace note width in all the voices in the current measure.

一些实施方式涉及的方法还包括:更新每个需要段落区分的小节的起始x坐标值。The method involved in some embodiments further includes: updating the starting x coordinate value of each section that requires paragraph distinction.

一些更具体的实施方式还包括:对乐谱拉伸指令中的宽度变量按照显示的阈值、乐谱当前小节对应的副旋律的显示宽度阈值和其他常量值进行调整。Some more specific implementations also include: adjusting the width variable in the score stretching instruction according to the displayed threshold, the displayed width threshold of the submelody corresponding to the current measure of the score, and other constant values.

一些更具体的实施方式还包括;如果乐谱复谱表中不仅有一个需要拉伸处理的小节,则处理完所有乐谱需要拉伸处理小节的x坐标之后,再更新乐谱复谱表在交互式窗口中的显示;如果所述复谱表中只有一个需要拉伸处理的小节,则处理完该小节就更新所述复谱表在所述交互式窗口中的显示。Some more specific implementations also include; if there is more than one section in the musical score complex that needs to be stretched, then after processing the x-coordinates of all the sections that need to be stretched in the musical score, update the musical score complex in the interactive window. display in the complex staff; if there is only one section in the complex staff that needs to be stretched, the display of the complex staff in the interactive window will be updated after processing the section.

一些更具体的实施例中涉及一种复谱,音符分为不同时值的音符,通常分为全音符、二分音符、四分音符、八分音符、十六分音符等以此类推;每首谱子都有拍号作为每个小节音符的播放时长,比如图4中的五线谱,小节开头的内容依次为谱号、调号(#)、拍号(3/4),其中3/4表示当前小节是四三拍谱子,所以当前小节内的音符时值加起来要达到四三拍的时长,比如第一小节,第一行的内容是一个全音符休止符,全音符表示当前一个音符要占满这一整个小节时长,第一小节的第二行,里面的音符是四分音符,每一个音符的时长是四分之一拍,所以四三拍的小节,放三个四分音符,三个四分音符总的时长加起来要和四三拍时长相等。每一行谱子用单谱表来表示,由花括号圈起来的谱子表示复谱表,当前例子中每一个复谱表内包含两个单谱表(每个单谱表都作为主旋律演奏),每行单谱表内又分为四个小节,行内的竖线叫做小节线,来隔断每行内的小节,每个复谱表的内的小节数是相等的,比如例子中的第一行单谱表内的小节数要和第二行内的小节数对应好,而且小节的宽度也要对应好,只是当前复谱表内的对应就可以,不同的复谱表小节数不同,因此本实施例中不需要做统一的对应。Some more specific embodiments involve a complex score, in which the notes are divided into notes of different durations, usually divided into whole notes, half notes, quarter notes, eighth notes, sixteenth notes, and so on; each piece The score has a time signature as the playback duration of the notes in each measure. For example, in the staff in Figure 4, the content at the beginning of the measure is the clef, the key signature (#), and the time signature (3/4), where 3/4 represents the current A measure is a score of four or three beats, so the value of the notes in the current measure must add up to the length of four or three beats. For example, in the first measure, the content of the first line is a whole note rest, and the whole note means that the current note must fill the entire length. The length of this entire measure, the second line of the first measure, the notes in it are quarter notes, and the duration of each note is a quarter beat, so in the measure of 43 beats, put three quarter notes, three The total duration of the quarter notes should add up to the duration of the four and three beats. Each line of music is represented by a single staff, and the music enclosed by curly braces represents a complex staff. In the current example, each complex staff contains two single staffs (each single staff is played as the main melody). The single staff in a row is divided into four measures. The vertical lines in the row are called bar lines to separate the measures in each row. The number of measures in each compound staff is equal. For example, the first line of single staff in the example The number of measures in the table should correspond to the number of measures in the second row, and the width of the measures should also correspond well. It only needs to correspond to the current complex staff table. Different complex staff tables have different numbers of sections, so in this embodiment No unified correspondence is required.

一些实施方式将本发明应用于一种多功能数字音乐教学系统,该系统还可以实现:将多行展示的乐谱数据处理为播放数据;根据乐谱中音符的位置绘制连音线。Some embodiments apply the present invention to a multi-functional digital music teaching system, which can also realize: processing the music score data displayed in multiple lines into playback data; drawing tupple lines according to the positions of the notes in the music score.

其中,将多行展示的乐谱数据处理为播放数据的方法包括:Among them, the method of processing the music score data displayed in multiple lines into playback data includes:

获取乐谱数据;Get music score data;

读取播放命令,播放命令包括播放的起点和终点信息;Read the playback command, which includes the starting point and end point information of playback;

从起点至终点的区间内,Within the interval from the starting point to the end point,

遍历起点所标记的单谱的各行:Traverse the lines of the single spectrum marked by the starting point:

遍历行内的各小节:记录每个小节在当前单谱中的序;Traverse each section in the line: record the order of each section in the current single score;

遍历小节的各声部:Iterate over the voices of a measure:

计算每个声部中的音符在当前单谱中的序并将每个声部中的音符的数据按序保存在当前播放数据中;Calculate the order of the notes in each part in the current single spectrum and save the data of the notes in each part in the current playback data in order;

若当前音符和其上一个音符不在同一个复谱里,从头开始记录当前音符的序;If the current note and the previous note are not in the same complex score, record the sequence of the current note from the beginning;

若当前声部中存在符号,按照符号将其对应的音符的播放数据处理为带有符号状态的音符。If there is a symbol in the current part, the playback data of the corresponding note will be processed into a note with a symbol state according to the symbol.

本发明的技术方案能方便灵活地调整包括五线谱形式和简谱等形式的单谱、复谱的拉伸(和压缩)长度,最终显示的乐谱准确、整齐美观,十分适用于可交互智能音乐教学设备。The technical solution of the present invention can conveniently and flexibly adjust the stretched (and compressed) length of single scores and complex scores in the form of staffs and simple notations. The finally displayed music scores are accurate, neat and beautiful, and are very suitable for interactive intelligent music teaching equipment. .

本说明书中描述的主题的实施方式可以被实施为一个或多个计算机程序,即,一个或多个有形非暂时性程序载体上编码的计算机程序指令的一个或多个模块,用以被数据处理设备执行或者控制数据处理设备的操作。计算机程序(还可以被称为或者描述为程序、软件、软件应用、模块、软件模块、脚本或者代码)可以以任意形式的编程语言而被写出,包括编译语言或者解释语言或者声明性语言或过程式语言,并且计算机程序可以以任意形式展开,包括作为独立程序或者作为模块、组件、子程序或者适于在计算环境中使用的其他单元。计算机程序可以但不必须对应于文件系统中的文件。程序可以被存储在保存其他程序或者数据的文件的一部分中,例如,存储在如下中的一个或多个脚本:在标记语言文档中;在专用于相关程序的单个文件中;或者在多个协同文件中,例如,存储一个或多个模块、子程序或者代码部分的文件。计算机程序可以被展开为执行在一个计算机或者多个计算机上,计算机位于一处,或者分布至多个场所并且通过通信网络而互相连接。Embodiments of the subject matter described in this specification may 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 data processing. Equipment performs or controls the operation of data processing equipment. A computer program (which may also be called or described as a program, software, software application, module, software module, script or code) may be written in any form of programming language, including a compiled or interpreted language or a declarative language or A procedural language, and a computer program may 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 need not, correspond to a file in a file system. Programs may be stored as part of a file that holds other programs or data, for example, as one or more scripts stored: in a markup language document; in a single file dedicated to the related program; or in multiple collaborative A file, for example, a file that stores one or more modules, subroutines, or portions of code. A computer program may be deployed for execution on one computer or on multiple computers, which may be located at one location, or may be distributed across multiple locations and interconnected by a communications network.

在本说明书中描述的处理和逻辑流程可以由一个或多个可编程计算机执行,该计算机通过运算输入数据并且生成输出而执行一个或多个的计算机程序,以运行函数。处理和逻辑流程还可以由专用逻辑电路,例如,FPGA(可现场编程门阵列)或者ASIC(专用集成电路)执行,并且设备也可以被实施为专用逻辑电路。The processes and logic flows described in this specification may be performed by one or more programmable computers that execute one or more computer programs to perform functions by operating on input data and generating output. Processing and logic flows may also be performed by, and devices may be implemented as, dedicated logic circuits, such as an FPGA (Field Programmable Gate Array) or an ASIC (Application Specific Integrated Circuit).

适于实行计算机程序的计算机包括并且示例性地可以基于通用微处理器或者专用微处理器或者上述处理器两者,或者任意其他种类的中央处理单元。通常地,中央处理单元将接收来自只读存储器或者随机存取存储器或者这两者的指令和数据。计算机的主要元件是用于运行或者执行指令的中央处理单元以及用于存储指令和数据的一个或多个存储器装置。通常地,计算机还将包括或者是可操作性地耦合,以从用于存储数据的一个或多个大容量存储装置接收数据或者传递数据到大容量存储装置,或者接收和传递两者,该大容量存储器例如为磁盘、磁光盘或者光盘。适于存储计算机程序指令和数据的计算机可读介质包括所有形式的非易失存储器、介质和存储器装置。A computer suitable for executing a computer program includes and may illustratively be based on a general-purpose microprocessor or a special-purpose microprocessor or both, or any other kind of central processing unit. Typically, the central processing unit will receive instructions and data from read-only memory or random access memory, or both. The main elements of a computer are the central processing unit for running or executing instructions and one or more memory devices for storing instructions and data. Typically, the computer will also include or be operably coupled to receive data from or transfer data to, or both, one or more mass storage devices for storing data. The capacity storage is, for example, a magnetic disk, a magneto-optical disk or an optical disk. Computer-readable media suitable for storage of computer program instructions and data includes all forms of nonvolatile memory, media, and memory devices.

为了发送与用户的交互,本说明书中描述的主题的实施方式可以被实施在计算机上,该计算机具有:显示装置,例如,CRT(阴极射线管)或者LCD(液晶显示器)监控器,用于向用户显示信息;以及键盘和例如鼠标或者追踪球这样的定位装置,用户利用它们可以将输入发送到计算机。其他种类的装置也可以用于发送与用户的交互;例如,提供给用户的反馈可以是任意形式的传感反馈,例如,视觉反馈、听觉反馈或者触觉反馈;以及来自用户的输入可以以任意形式接收到,包括声响输入、语音输入或者触觉输入。In order to transmit interactions with a user, embodiments of the subject matter described in this specification may be implemented on a computer having a display device, such as a CRT (cathode ray tube) or LCD (liquid crystal display) monitor, for displaying The user displays information; and a keyboard and pointing device such as a mouse or trackball allow the user to send input to the computer. Other kinds of devices can also be used to send interactions with the user; for example, the 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 in any form. Received, including sound input, voice input or tactile input.

本说明书中描述的主题的实施方式可以在计算系统中实施,该计算系统包括例如数据服务器这样的后端组件,或者包括例如应用服务器这样的中间组件,或者包括例如客户端计算机这样的前端组件,该客户端计算机具有图形用户界面或者网络浏览器,用户可以通过图形用户界面或者网络浏览器而与本说明书中描述的主题的实施进行交互,或者该计算机系统包括一个或多个这种后端组件、中间组件或者前端组件的任意组合。系统中的组件可以通过例如通信网络的任意形式或介质的数字数据通信而互相连接。通信网络的实例包括局域网络(“LAN”)和广域网络(“WAN”),例如,因特网。该计算机系统可以包括客户端和服务器。客户端和服务器通常彼此远离,并且通常通过通信网络而交互。客户端与服务器之间的关系利用在各自的计算机上运行并且具有彼此之间的客户端-服务器关系的计算机程序而产生。Embodiments of the subject matter described in this specification may be implemented in a computing system that includes back-end components such as a data server, or includes intermediate components such as an application server, or includes front-end components such as a client computer, The client computer has a graphical user interface or web browser through which a user can interact with implementations of the subject matter described in this specification, or the computer system includes one or more such back-end components , middle components or any combination of front-end components. Components in the system may be interconnected by any form or medium of digital data communication, such as a communications network. Examples of communication networks include local area networks ("LAN") and wide area networks ("WAN"), such as the Internet. The computer system may include clients and servers. Clients and servers are usually remote from each other and often interact through a communications network. The relationship between client and server is created using computer programs running on respective computers and having a client-server relationship with each other.

虽然本说明书包含很多具体的实施细节,但是这些不应当被解释为对任何发明的范围或者对可以要求保护的内容的范围的限制,而是作为可以使特定发明的特定实施方式具体化的特征的说明。在独立的实施方式的语境中的本说明书中描述的特定特征还可以与单个实施方式组合地实施。相反地,在单个实施方式的语境中描述的各种特征还可以独立地在多个实施方式中实施,或者在任何合适的子组合中实施。此外,虽然以上可以将特征描述为组合作用并且甚至最初这样要求,但是来自要求的组合的一个或多个特征在一些情况下可以从该组合去掉,并且要求的组合可以转向子组合或者子组合的变形。Although this specification contains many specific implementation details, these should not be construed as limitations on the scope of any invention or on the scope of what may be claimed, but rather as features that may embody specific embodiments of a particular invention. illustrate. Certain features described in this specification in the context of separate implementations can also be implemented in combination with a single implementation. Conversely, various features that are described in the context of a single implementation can also be implemented in multiple implementations independently or in any suitable subcombination. Furthermore, 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 eliminated from that combination and the claimed combination may be diverted to a sub-combination or sub-combinations Deformation.

Claims (2)

1. The complex spectrum stretching method with the auxiliary melody is characterized by comprising the following steps of:
obtaining music score data and stretching instructions, wherein the music score data comprises a double-spectrum table;
traversing all of the staff in the complex staff for the current staff:
acquiring the initial width of each bar of the current single spectrum table;
after the width variable in the stretching instruction is distributed evenly according to the number of notes contained in each bar, the ratio of the width variable to the original occupation width of the notes is taken to obtain the linear stretching proportion of the current single spectrum table;
traversing all bars in the current list, for the current bar:
modifying the original width of the current section according to the linear stretching proportion and adding the end point coordinate of one section to obtain the end point coordinate of the current section after stretching;
reassigning coordinates of symbols within each of the bars;
displaying each bar of the stretched single spectrum table and the symbols in the bar on the interactive window;
the ratio of the obtained stretch was calculated according to the following formula:
Scale=(Frame.width-Const.width+Fix.width-XiaoJie.width.sum)/YinFu.width
where Scale represents the linear stretch ratio, frame. Width represents the width of the current staff, i.e. the width of the current row; const.width represents the pitch and/or beat width behind the bar line; fix.wdm indicates that the secondary melody is a distance in front of a note of a measure; xiaojie. Width. Sum represents the sum of the widths of all bars in the current row; yinfu.width represents the original space width of each note;
if the current bar comprises a secondary melody, traversing the secondary melody bars, and regarding the bars corresponding to the current bar in the secondary melody bars: correcting the x coordinate of each bar corresponding to the current bar according to the difference between the x coordinate of the current bar and the x coordinate of the starting position of the auxiliary melody.
2. The method of claim 1, further comprising the step of: and adjusting the width variable in the stretching instruction according to the displayed threshold value, the displayed width threshold value of the auxiliary melody corresponding to the current bar and other constant values.
CN202310140428.5A 2021-10-18 2021-10-18 A stretching method for complex spectrum with secondary melody Active CN116895192B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310140428.5A CN116895192B (en) 2021-10-18 2021-10-18 A stretching method for complex spectrum with secondary melody

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202310140428.5A CN116895192B (en) 2021-10-18 2021-10-18 A stretching method for complex spectrum with secondary melody
CN202110989721.XA CN113724542B (en) 2021-10-18 2021-10-18 Stretching display method of complex spectrum

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN202110989721.XA Division CN113724542B (en) 2021-10-18 2021-10-18 Stretching display method of complex spectrum

Publications (2)

Publication Number Publication Date
CN116895192A true CN116895192A (en) 2023-10-17
CN116895192B CN116895192B (en) 2025-09-05

Family

ID=78678196

Family Applications (3)

Application Number Title Priority Date Filing Date
CN202110989721.XA Active CN113724542B (en) 2021-10-18 2021-10-18 Stretching display method of complex spectrum
CN202310133775.5A Active CN116935702B (en) 2021-10-18 2021-10-18 A method for stretching complex spectrum with voice parts
CN202310140428.5A Active CN116895192B (en) 2021-10-18 2021-10-18 A stretching method for complex spectrum with secondary melody

Family Applications Before (2)

Application Number Title Priority Date Filing Date
CN202110989721.XA Active CN113724542B (en) 2021-10-18 2021-10-18 Stretching display method of complex spectrum
CN202310133775.5A Active CN116935702B (en) 2021-10-18 2021-10-18 A method for stretching complex spectrum with voice parts

Country Status (1)

Country Link
CN (3) CN113724542B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116935702A (en) * 2021-10-18 2023-10-24 北京金三惠科技有限公司 Complex spectrum stretching method with sound part

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006119512A (en) * 2004-10-25 2006-05-11 Yamaha Corp Apparatus for displaying and editing music information, and program
JP2006337969A (en) * 2005-05-31 2006-12-14 Yasushi Suga Program for inputting musical data by computer keyboard
JP2015040924A (en) * 2013-08-21 2015-03-02 カシオ計算機株式会社 Musical score display device, musical score display method, and program
CN106133824A (en) * 2014-03-12 2016-11-16 现代新音乐有限公司 For rolling the method for music score, equipment and computer program
CN108028040A (en) * 2015-09-07 2018-05-11 雅马哈株式会社 Musical performance auxiliary device and method
WO2018185343A1 (en) * 2017-04-07 2018-10-11 Jaeck Michael Method and operating aid for playing a piece of music
CN109345905A (en) * 2018-12-10 2019-02-15 北京金三惠科技有限公司 A kind of interactive digital music lesson system
CN112258932A (en) * 2020-11-04 2021-01-22 深圳市平均律科技有限公司 Auxiliary exercise device, method and system for musical instrument playing

Family Cites Families (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AUPM580794A0 (en) * 1994-05-24 1994-06-16 Quinn, Beris Ivy An improved method of teaching music students
JPH10254348A (en) * 1997-03-11 1998-09-25 Kyokan Sha Musical scale learning device and musical score unit
JP4075565B2 (en) * 2002-03-08 2008-04-16 ヤマハ株式会社 Music score display control apparatus and music score display control program
US7119266B1 (en) * 2003-05-21 2006-10-10 Bittner Martin C Electronic music display appliance and method for displaying music scores
WO2006066075A1 (en) * 2004-12-15 2006-06-22 Museami, Inc System and method for music score capture and synthesized audio performance with synchronized presentation
US7763790B2 (en) * 2007-06-20 2010-07-27 Robledo Devra L Method of representing rhythm in music notation and display therefor
JP5215899B2 (en) * 2009-02-12 2013-06-19 株式会社河合楽器製作所 Sound value changing device, method and program
US9747876B1 (en) * 2015-07-28 2017-08-29 Amazon Technologies, Inc. Adaptive layout of sheet music in coordination with detected audio
US10134300B2 (en) * 2015-10-25 2018-11-20 Commusicator Ltd. System and method for computer-assisted instruction of a music language
CN106097830B (en) * 2016-08-17 2018-12-07 广州视睿电子科技有限公司 Music score recognition method and device
US10665124B2 (en) * 2017-03-25 2020-05-26 James Wen System and method for linearizing musical scores
GB201805066D0 (en) * 2018-03-28 2018-05-09 Nkoda Ltd Musical notation system
CN111652402B (en) * 2019-03-04 2023-04-14 湖南师范大学 A big data intelligent optimization method for optical fiber preform deposition process
CN112686104B (en) * 2020-12-19 2024-05-28 北京工业大学 Multi-sound part music score recognition method based on deep learning
CN113707111B (en) * 2021-08-26 2024-04-02 北京金三惠科技有限公司 Method and computer program for processing music score data displayed in multiple lines into playing data
CN113724542B (en) * 2021-10-18 2023-06-27 北京金三惠科技有限公司 Stretching display method of complex spectrum

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006119512A (en) * 2004-10-25 2006-05-11 Yamaha Corp Apparatus for displaying and editing music information, and program
JP2006337969A (en) * 2005-05-31 2006-12-14 Yasushi Suga Program for inputting musical data by computer keyboard
JP2015040924A (en) * 2013-08-21 2015-03-02 カシオ計算機株式会社 Musical score display device, musical score display method, and program
CN106133824A (en) * 2014-03-12 2016-11-16 现代新音乐有限公司 For rolling the method for music score, equipment and computer program
CN108028040A (en) * 2015-09-07 2018-05-11 雅马哈株式会社 Musical performance auxiliary device and method
WO2018185343A1 (en) * 2017-04-07 2018-10-11 Jaeck Michael Method and operating aid for playing a piece of music
CN109345905A (en) * 2018-12-10 2019-02-15 北京金三惠科技有限公司 A kind of interactive digital music lesson system
CN112258932A (en) * 2020-11-04 2021-01-22 深圳市平均律科技有限公司 Auxiliary exercise device, method and system for musical instrument playing

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116935702A (en) * 2021-10-18 2023-10-24 北京金三惠科技有限公司 Complex spectrum stretching method with sound part
CN116935702B (en) * 2021-10-18 2025-09-26 北京金三惠科技有限公司 A method for stretching complex spectrum with voice parts

Also Published As

Publication number Publication date
CN116895192B (en) 2025-09-05
CN113724542A (en) 2021-11-30
CN113724542B (en) 2023-06-27
CN116935702A (en) 2023-10-24
CN116935702B (en) 2025-09-26

Similar Documents

Publication Publication Date Title
EP3732627B1 (en) Fast decoding in sequence models using discrete latent variables
US20140041512A1 (en) Musical scoring
US9082381B2 (en) Method, system, and computer program for enabling flexible sound composition utilities
US10121249B2 (en) Enhanced visualization of areas of interest in image data
US11790274B2 (en) Training neural networks to generate structured embeddings
US9734810B2 (en) Automatic harmony generation system
EP4213097A1 (en) Image generation method and apparatus
CN113850884B (en) Method, device, electronic device and storage medium for generating Sankey diagram
CN118051591A (en) Poster generation method, device and product based on large model
CN113724542B (en) Stretching display method of complex spectrum
CN113707111B (en) Method and computer program for processing music score data displayed in multiple lines into playing data
CN106484384A (en) A kind of page animation methods of exhibiting and system
CN118626087A (en) Interface generation method, device, equipment and storage medium
US20240087549A1 (en) Musical score creation device, training device, musical score creation method, and training method
US20240013758A1 (en) Music data analysis apparatus and method using topological data analysis, and music data generation apparatus using the same
CN115909339A (en) Answer image acquisition and submission method and device, electronic equipment and storage medium
CN115712473A (en) Music score display method and device, electronic equipment and storage medium
CN112860874A (en) Question-answer interaction method, device, equipment and storage medium
CN110232847A (en) Copybook information generating method, device, storage medium and electronic equipment
CN106205572A (en) Sequence of notes generates method and device
Corbella (Un) crediting Mahler: Adaptation, allusion, reinvention in Italian film music beyond Visconti
CN110368692A (en) A kind of Composing Method of Mixing and device
Hardesty Building Blocks of Rhythmic Expectation
Jangra et al. EVYL: The Cogency of Color Prototyping with SmartMockups
Shi Exploration on the Course Teaching Reform of Digital Media Art Major in the Digital Age

Legal Events

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