面向电子木琴自动演奏的MIDI信息智能转换算法研究
Research on Intelligent Conversion Algorithm of MIDI Information for Automatic Performance of Electronic Xylophone
DOI: 10.12677/etis.2025.26036, PDF,   
作者: 周涵艺:太原理工大学计算机科学与技术学院,山西 晋中;太原理工大学晓明研究室,山西 太原;刘卫玲*:太原理工大学晓明研究室,山西 太原;太原理工大学人工智能学院,山西 晋中;常晓明:太原理工大学晓明研究室,山西 太原
关键词: 电子木琴MIDI转换智能音高偏移优化算法智能转换策略选择算法自动演奏Electronic Xylophone MIDI Conversion Intelligent Pitch Offset Optimization Algorithm Intelligent Conversion Strategy Selection Algorithm Automatic Performance
摘要: 针对电子木琴自动演奏系统中MIDI信息转换的关键问题,文章提出了两种核心算法:智能音高偏移优化算法和智能转换策略选择算法。智能音高偏移优化算法通过构建六维度加权评分体系,自动计算最优音高偏移量,将任意MIDI信息所包含的音域适配至木琴有效音域;智能转换策略选择算法基于轨道数、总音符数和主轨占比三个特征,通过规则评分自动选择全曲转换、主旋律轨转换或截取部分转换策略,以适应不同音乐类型和系统资源限制。在Python环境下开发了MIDI转换程序,实现了从MIDI信息到C语言头文件的完整转换流程。实验结果表明,两种算法能有效解决音域不匹配和策略选择问题,转换后的音高分布与原始旋律轮廓高度一致,验证了算法的有效性。研究为传统打击乐器的智能化改造提供了技术支撑。
Abstract: Regarding the key issue of MIDI information conversion in the automatic electronic xylophone playing system, this paper proposes two core algorithms: the intelligent pitch offset optimization algorithm and the intelligent conversion strategy selection algorithm. The intelligent pitch offset optimization algorithm constructs a six-dimensional weighted scoring system to automatically calculate the optimal pitch offset amount, adapting the pitch range contained in any MIDI information to the effective pitch range of the xylophone; the intelligent conversion strategy selection algorithm, based on three features - the number of tracks, the total number of notes, and the proportion of the main track - automatically selects the full piece conversion, the main melody track conversion, or the partial extraction conversion strategy to adapt to different music types and system resource limitations. The MIDI conversion program was developed in the Python environment, achieving a complete conversion process from MIDI information to C language header files. Experimental results show that the two algorithms can effectively solve the problems of pitch range mismatch and strategy selection, and the pitch distribution after conversion is highly consistent with the original melody contour, verifying the effectiveness of the algorithms. This research provides technical support for the intelligent transformation of traditional percussion instruments.
文章引用:周涵艺, 刘卫玲, 常晓明. 面向电子木琴自动演奏的MIDI信息智能转换算法研究[J]. 嵌入式技术与智能系统, 2025, 2(6): 363-374. https://doi.org/10.12677/etis.2025.26036

参考文献

[1] 郭凌华, 刘明磊, 丁亭文, 等. 基于LabVIEW数字图像生成音乐旋律算法的研究[J]. 西安理工大学学报, 2020, 36(1): 65-71.
[2] 谢林玲. 多音轨MIDI音乐主旋律提取方法探析[J]. 科技创新导报, 2021, 18(19): 72-74.
[3] 刘嘉欣. 嵌入式MIDI文件格式解析设计与实现[J]. 微计算机信息, 2006(32): 66-68+42.
[4] 师冬冬. 基于深度学习的MIDI信号对电子音乐旋律自动转换研究[J]. 自动化与仪器仪表, 2024(11): 20-23+28.
[5] 杨世瑞, 程科, 李想, 等. 基于多音轨聚类的MIDI音乐主旋律提取方法[J]. 计算机与数字工程, 2024, 52(10): 2897-2901.
[6] 严桂林, 陈学煌, 赵云娥. 基于S3C44B0的MIDI音乐发生器的设计与实现[J]. 电子测量技术, 2008(8): 158-161.