您好,欢迎访问三七文档
1摘要随着社会的发展进步,音乐逐渐成为我们生活中很重要的一部分,有人曾说喜欢音乐的人不会向恶。我们都会抽空欣赏世界名曲,作为对精神的洗礼。本论文设计一个基于单片机的简易电子琴。我们对于电子琴如何实现其功能,如声音强弱控制、节拍器、自动放音功能等等也很好奇。单片微型计算机它具有高性能、高速度、体积小、价格低廉、稳定可靠、应用广泛的特点。它的应用必定导致传统的控制技术从根本上发生变革。因此,单片机的开发应用已成为高科技和工程领域的一项重大课题。微型计算机的出现和大量使用将人类社会带入一个新的时代,单片微型计算机(简称单片机)在其中扮演着十分重要的角色。虽然它没有常见的PC那样大的体积和重量,不会在办公桌或控制台上占据一个显要的位置,但它就像小小的螺丝钉一样,镶嵌在人们工作、生活中需要计算、控制、测量等智能活动的各个角落。自20世纪70年代问世以来,单片机以其体积小、可靠性高、控制功能强、使用方便、性能价格比高、容易产品化等特点,在智能仪表、机电一体化、实时控制、分布式多机系统、家用电器等各个领域得到了广泛应用,对各个行业的技术改造和产品的更新换代起着重要的推动作用,对人们生活质量的提高产生了深刻的影响。作为21世纪的工科大学生,学好单片机,一方面可以加深对计算机原理和结构的认识,另一方面也为自身在专业上的深入发展构筑了一个很好的平台,在实践过程中熟悉和熟练单片机的使用和开发。电子琴是现代电子科技与音乐结合的产物,是一种新型的键盘乐器。它在现代音乐扮演着重要的角色,单片机具有强大的控制功能和灵活的编程实现特性,它已经溶入现代人们的生活中,成为不可替代的一部分。本文的主要内容是用STC89C52单片机为核心控制元件,设计一个电子琴。以单片机作为主控核心,与键盘、扬声器等模块组成核心主控制模块,在主控模块上设有16个按键和扬声器。本系统运行稳定,其优点是硬件电路简单,软件功能完善,控制系统可靠,性价比较高等,具有一定的实用和参考价值。通过基于单片机的嵌入式电子琴的设计课题熟悉和理解单片机应用和开发过程,培养我们理论联系实际,实践出真知的科学严谨求学的态度,提高实践动手操作技能。关键词:STC89C52单片机音色节拍器2目录第一章续论··································································11.1电子琴的概念·····························································11.2电子琴的种类·····························································11.3电子琴的工作原理·························································1.4系统开发的背景···························································1.5系统开发的意义···························································第二章方案论证······························································2.1控制模块选择方案························································2.2按键选择方案·····························································第三章系统硬件设计及说明····················································3.1系统组成及总体框图······················································3.2元件简介································································3.2.1STC89C52简介··························································3.2.2主要功能特性···························································3.2.3工作原理································································3.2.4LM386···································································3.3设计实现过程·····························································3.3.1设计指标·································································3.3.2设计要求·································································3.3.3设计目标·································································第四章系统软件设计···························································4.1音乐相关的知识····························································4.2如何用单片机实现音乐的节拍················································4.3如何用单片机实现音乐的频率················································4.4设计说明··································································4.5设计简单原理介绍··························································4.6总体方案及设计流程························································4.7原理图····································································第五章系统调试······························································5.1软件仿真调试······························································5.2软件调试··································································第六章调试结论·······························································第七章设计心得体会···························································致谢··········································································参考文献······································································附录··········································································附录1主要电路原理图··························································附录2源程序···································································附录3元器件清单······························································3第一章绪论1.1电子琴概念简易电子琴结构组成:电子乐器的结构较为复杂,音源是由晶体管产生电振动,并通过音色回路而产生各种音色;同时由周波数调制产生颤音效果,由振幅调制产生各种乐器的音效。乐器特色:属于电子乐器,发音音量可以自由调节。音域较宽,和声丰富,甚至可以演奏出一个管弦乐队的效果,表现力极其丰富。它还可模仿多种音色,甚至可以奏出常规乐器所无法发出的声音(如人声,风雨声等)。另外,电子琴在独奏时,还可随意配上类似打击乐音响的节拍伴奏,适合于演奏节奏性较强的现代音乐。另外,电子琴还安装有混响、回声、延长音、震音和颤音等多项功能装置,表达各种情绪时运用自如。简易电子琴是电声乐队的中坚力量,常用于独奏主旋律并伴以丰富的和声。还常作为独奏乐器出现,具有鲜明时代特色。但电子琴的局限性也十分明显:旋律与和声缺乏音量变化,过于协和、单一;在模仿各类管、弦乐器时,音色还不够逼真,模仿提琴类乐器的音色时,失真度更大,还需要不断改进。1.2电子琴的种类目前市场上电子琴的各种品牌、型号有上百种,由几十元的玩具电于琴到几百几千元的学习、演奏用琴,真是琳琅满目,总体上可分为两大类;便携式电子琴和台式电子琴。便携式电子琴包括非标准型电于琴和标准型电子琴.而台式电子琴包括单排键台式电子琴。4双排键电子琴、电于管风琴等.(一)、非标准型(玩具型)电子琴非标准型(玩具型)电子琴是电子琴中最普通,价格较实惠的一种、琴的体积大小不一,键盘数量从二十四键至四十九键不等。这类琴琴键较狭小,从音质、功能及性能等方面与标准便携式电子琴相比较有一定差距。另外,受功能、琴键数量等因素制约,演奏乐曲的音域与难度也受到一定制约、非标准型(玩具型)电子琴可作为低龄儿童电子琴入门学习或作为一种娱乐的工具。(二)、标准型单排键便携式电子琴标准型单排键便携式电子琴具有琴键规范,音质优美、动能完备、性能忧异、体小量轻。携带方便等优点,是电子琴中最普及、最常见的一种。键盘数量通常为六十一健,也有四十九键和七十三键甚至更多者,这类琴有高、中、低几种不同档次,不同档次的电了琴其音质,功能等方面有一定的差异.标准型电子琴有学习,娱乐、伴奏、独奏等多种用途;是大多数电子琴爱好者学习用琴较理想的选择。(三)、台式单排键电子琴这类琴的外形类似风琴和电钢琴;其操作、功能等与便携式电子琴相同。台式电子琴的影体较大.琴身与柜式琴架合为一体,琴的下半部分带有音箱,其音量可满足一般音乐教室和小型舞厅的使用需要。这类琴有学习、娱乐、伴奏、独奏等多种用途:其缺点是不便携带.(四)、双排键电子琴双排键电子琴是吸取管风琴的结构原理发展而来的。是电子琴中性能最优、功能最全。档次最高的一类琴。它不仅有双层(也有三层)演奏键盘,同时在琴的底部还设有脚键盘.脚键盘主要是用来演奏低音的,有时也用来演奏旋律。双排键电子琴的乐谱用三行大谱表记谱,第一行谱多为旋律,用右手演奏.第二行多为伴奏,用左手演奏(也有交错使用的情况),第三行为低音,用脚键盘演奏。一般由左脚来演奏,有时也可双脚并用.琴的底部还有两个控制踏板;由右脚来控制力度。转换音色、变化速度。开关节奏、制造滑音等。因此双排键电子琴演奏比便携式更复杂、更困难
本文标题:电子琴
链接地址:https://www.777doc.com/doc-67131 .html