河北经贸大学毕业论文
基于MATLAB软件的音乐合成
专业名称: 电子信息工程 班 级: 201102 学生姓名: 王 雪 指导老师: 章瑞平 完成时间: 2015年5月
河北经贸大学毕业论文
摘 要
本设计利用MATLAB软件,通过MATLAB GUI构建一个具有图形用户界面的音乐合成系统。该系统能实现音乐的简单合成、音乐的降噪处理、音乐的加谐波处理、音乐的升降度处理、音乐的时域和频域波形图显示及利用傅里叶级数原理合成音乐的操作。本系统应用模块化的思路进行设计,将系统分为四个模块,分别为简单合成及处理音乐的模块、利用傅里叶变换分析音乐频谱的模块、基于傅里叶级数合成音乐的模块和音乐字幕动态显示的模块。本论文阐述了整个系统详细的设计过程,而针对每个模块的设计都有详细的理论基础为依托,包括原理及设计程序,并且有仿真效果的演示。该软件系统作为教学辅助软件可以为语音信号处理课程的教学提供一定的帮助,可以让学生们更好地深入理解信号与系统等主干课程的内容,充分发挥自身的创新能力与实践能力。该系统可以通过选取不同的算法,对音乐分别进行处理,基本做到抑制噪声,提高音乐质量,有利于更高层次的处理与应用。此外,从整体效果上看,该系统的用户应用界面友好、便于操作,通过菜单、控件的使用可以方便的选取不同的方法,设置不同的参数以便于用户操作使用。系统通过对各种处理效果的演示,也可以让用户更直观地了解简单音乐处理的几种方法,并在各种相应处理前后的对比中让用户更容易接受与其对应的方法及特点。
关键词 音乐合成;MTALAB;GUI;傅里叶变换
I
河北经贸大学毕业论文
Abstract
The design in this paper uses the MATLAB software to construct a music synthesis system with a graphical user interface by MATLAB GUI.The system can achieve simple music synthesis,the processing of reducing music noise,the treatment of music with harmonic,the processing of raising and lower octave,displaying waveform in time domain and frequency domain and synthesis of music based on Fourier series.This system takes the idea of modular design,divided into four modules, respectively including the module of music of simple synthesis and processing,the module of music spectrum analysis through using the Fourier transform,the module of music synthesis based on Fourier series,the module of displaying music subtitle dynamically.This paper,including the principle and program design and simulation results demonstrate, describes the design process of the system in detail.Each module has a detailed theoretical basis for support.As a teaching aid software can provide some help for the speech signal processing course in teaching,which can help students understand the signal and system course and give full play to students’ innovation ability and practice ability.Through selecting different algorithms,the system can dispose music respectively, suppress noise basically,improve the quality of music and avail to deal with the higher level.In addition,the graphic user interface of the system is friendly and easy to operate. Select different methods and set different parameters for users by using the menu,controls.Through a variety of demonstrations of effects,the system also makes users understand several ways of dealing with music more intuitively and in compare with before and after the all treatments,we can accept the corresponding methods and characteristics more easily.
Keywords Music synthesis; MTALAB;GUI;Fourier transform
II
河北经贸大学毕业论文
目 录
1 绪论 ................................................................................................................................. 1
1.1 研究背景及意义 ................................................................................................ 1 1.2 研究的主要内容 ................................................................................................ 1 2 MATLAB软件的简介 .................................................................................................. 3
2.1 MATLAB的发展史 .......................................................................................... 3 2.2 MATLAB的系统构成 ...................................................................................... 4 3 MATLAB音乐合成的原理 ......................................................................................... 5
3.1 所涉及的乐理知识简述 .................................................................................... 5
3.1.1 音调与唱名 ............................................................................................. 5 3.1.2 音色与谐波 ............................................................................................. 5 3.1.3 十二平均律 ............................................................................................. 5 3.2 傅里叶变换与频谱分析 .................................................................................... 6 4 MATLAB音乐合成系统的总体设计 ........................................................................ 7
4.1 系统的总体设计 ................................................................................................ 7 4.2 GUI界面的设计 ................................................................................................ 7
4.2.1 启动GUIDE ............................................................................................ 8 4.2.2 GUIDE设计环境 ................................................................................... 8 4.2.3 GUI界面的功能设计 ............................................................................ 9
5 MATLAB音乐合成系统的设计与实现 .................................................................. 11
5.1 简单合成及处理音乐模块的设计与实现 .................................................... 11
5.1.1 合成《社会主义好》 ........................................................................... 11 5.1.2 加包络,除噪音 ................................................................................... 12 5.1.3 音乐升降度处理 ................................................................................... 13 5.1.4 音乐加谐波处理 ................................................................................... 15 5.2 用傅里叶变换分析音乐频谱模块的设计与实现 ........................................ 16 5.3 基于傅里叶级数合成的音乐模块的设计与实现 ........................................ 20 5.4 音乐《小星星》字幕动态显示模块的设计与实现 .................................... 21 6 系统的调试与运行 ...................................................................................................... 24
I
河北经贸大学毕业论文
6.1 音乐的播放、暂停的调试与运行 ................................................................. 24 6.2 傅里叶变换分析音乐的调试与运行 ............................................................. 25 总 结 ................................................................................................................................... 26 参考文献 ............................................................................................................................. 27
II