亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

蟲蟲首頁| 資源下載| 資源專輯| 精品軟件
登錄| 注冊

A-Moving-Object-<b>DATABase</b>-Model-Ba

  • 單片機音樂中音調(diào)和節(jié)拍的確定方法

    單片機音樂中音調(diào)和節(jié)拍的確定方法:調(diào)號-音樂上指用以確定樂曲主音高度的符號。很明顯一個八度就有12個半音。A、B、C、D、E、F、G。經(jīng)過聲學家的研究,全世界都用這些字母來表示固定的音高。比如,A這個音,標準的音高為每秒鐘振動440周。 升C調(diào):1=#C,也就是降D調(diào):1=BD;277(頻率)升D調(diào):1=#D,也就是降E調(diào):1=BE;311升F調(diào):1=#F,也就是降G調(diào):1=BG;369升G調(diào):1=#G,也就是降A調(diào):1=BA;415升A調(diào):1=#A,也就是降B調(diào):1=BB。466,C 262   #C277   D 294   #D(bE)311  E 330   F 349   #F369   G 392  #G415A 440.    #A466    B 494 所謂1=A,就是說,這首歌曲的“導”要唱得同A一樣高,人們也把這首歌曲叫做A調(diào)歌曲,或叫“唱A調(diào)”。1=C,就是說,這首歌曲的“導”要唱得同C一樣高,或者說“這歌曲唱C調(diào)”。同樣是“導”,不同的調(diào)唱起來的高低是不一樣的。各調(diào)的對應的標準頻率為: 單片機演奏音樂時音調(diào)和節(jié)拍的確定方法 經(jīng)常看到一些剛學單片機的朋友對單片機演奏音樂比較有興趣,本人也曾是這樣。在此,本人將就這方面的知識做一些簡介,但愿能對單片機演奏音樂比較有興趣而又不知其解的朋友能有所啟迪。 一般說來,單片機演奏音樂基本都是單音頻率,它不包含相應幅度的諧波頻率,也就是說不能象電子琴那樣能奏出多種音色的聲音。因此單片機奏樂只需弄清楚兩個概念即可,也就是“音調(diào)”和“節(jié)拍”。音調(diào)表示一個音符唱多高的頻率,節(jié)拍表示一個音符唱多長的時間。 在音樂中所謂“音調(diào)”,其實就是我們常說的“音高”。在音樂中常把中央C上方的A音定為標準音高,其頻率f=440Hz。當兩個聲音信號的頻率相差一倍時,也即f2=2f1時,則稱f2比f1高一個倍頻程, 在音樂中1(do)與 ,2(來)與 ……正好相差一個倍頻程,在音樂學中稱它相差一個八度音。在一個八度音內(nèi),有12個半音。以1—i八音區(qū)為例, 12個半音是:1—#1、#1—2、2—#2、#2—3、3—4、4—#4,#4—5、5一#5、#5—6、6—#6、#6—7、7—i。這12個音階的分度基本上是以對數(shù)關系來劃分的。如果我們只要知道了這十二個音符的音高,也就是其基本音調(diào)的頻率,我們就可根據(jù)倍頻程的關系得到其他音符基本音調(diào)的頻率。 知道了一個音符的頻率后,怎樣讓單片機發(fā)出相應頻率的聲音呢?一般說來,常采用的方法就是通過單片機的定時器定時中斷,將單片機上對應蜂鳴器的I/O口來回取反,或者說來回清零,置位,從而讓蜂鳴器發(fā)出聲音,為了讓單片機發(fā)出不同頻率的聲音,我們只需將定時器予置不同的定時值就可實現(xiàn)。那么怎樣確定一個頻率所對應的定時器的定時值呢?以標準音高A為例:   A的頻率f = 440 Hz,其對應的周期為:T = 1/ f = 1/440 =2272μs 由上圖可知,單片機上對應蜂鳴器的I/O口來回取反的時間應為:t = T/2 = 2272/2 = 1136μs這個時間t也就是單片機上定時器應有的中斷觸發(fā)時間。一般情況下,單片機奏樂時,其定時器為工作方式1,它以振蕩器的十二分頻信號為計數(shù)脈沖。設振蕩器頻率為f0,則定時器的予置初值由下式來確定:    t = 12 *(TALL – THL)/ f0 式中TALL = 216 = 65536,THL為定時器待確定的計數(shù)初值。因此定時器的高低計數(shù)器的初值為:     TH = THL / 256 = ( TALL – t* f0/12) / 256    TL = THL % 256 = ( TALL – t* f0/12) %256  將t=1136μs代入上面兩式(注意:計算時應將時間和頻率的單位換算一致),即可求出標準音高A在單片機晶振頻率f0=12Mhz,定時器在工作方式1下的定時器高低計數(shù)器的予置初值為 :    TH440Hz = (65536 – 1136 * 12/12) /256 = FBH    TL440Hz = (65536 – 1136 * 12/12)%256 = 90H根據(jù)上面的求解方法,我們就可求出其他音調(diào)相應的計數(shù)器的予置初值。 音符的節(jié)拍我們可以舉例來說明。在一張樂譜中,我們經(jīng)常會看到這樣的表達式,如1=C  、1=G …… 等等,這里1=C,1=G表示樂譜的曲調(diào),和我們前面所談的音調(diào)有很大的關聯(lián), 、 就是用來表示節(jié)拍的。以 為例加以說明,它表示樂譜中以四分音符為節(jié)拍,每一小結有三拍。比如:      其中1 、2 為一拍,3、4、5為一拍,6為一拍共三拍。1 、2的時長為四分音符的一半,即為八分音符長,3、4的時長為八分音符的一半,即為十六分音符長,5的時長為四分音符的一半,即為八分音符長,6的時長為四分音符長。那么一拍到底該唱多長呢?一般說來,如果樂曲沒有特殊說明,一拍的時長大約為400—500ms 。我們以一拍的時長為400ms為例,則當以四分音符為節(jié)拍時,四分音符的時長就為400ms,八分音符的時長就為200ms,十六分音符的時長就為100ms。可見,在單片機上控制一個音符唱多長可采用循環(huán)延時的方法來實現(xiàn)。首先,我們確定一個基本時長的延時程序,比如說以十六分音符的時長為基本延時時間,那么,對于一個音符,如果它為十六分音符,則只需調(diào)用一次延時程序,如果它為八分音符,則只需調(diào)用二次延時程序,如果它為四分音符,則只需調(diào)用四次延時程序,依次類推。通過上面關于一個音符音調(diào)和節(jié)拍的確定方法,我們就可以在單片機上實現(xiàn)演奏音樂了。具體的實現(xiàn)方法為:將樂譜中的每個音符的音調(diào)及節(jié)拍變換成相應的音調(diào)參數(shù)和節(jié)拍參數(shù),將他們做成數(shù)據(jù)表格,存放在存儲器中,通過程序取出一個音符的相關參數(shù),播放該音符,該音符唱完后,接著取出下一個音符的相關參數(shù)……,如此直到播放完畢最后一個音符,根據(jù)需要也可循環(huán)不停地播放整個樂曲。另外,對于樂曲中的休止符,一般將其音調(diào)參數(shù)設為FFH,F(xiàn)FH,其節(jié)拍參數(shù)與其他音符的節(jié)拍參數(shù)確定方法一致,樂曲結束用節(jié)拍參數(shù)為00H來表示。下面給出部分音符(三個八度音)的頻率以及以單片機晶振頻率f0=12Mhz,定時器在工作方式1下的定時器高低計數(shù)器的予置初值 : C調(diào)音符  頻率Hz 262 277 293 311 329 349 370 392 415 440 466 494TH/TL F88B F8F2 F95B F9B7 FA14 FA66 FAB9 FB03 FB4A FB8F FBCF FC0BC調(diào)音符 1 1# 2 2# 3 4 4# 5 5# 6 6# 7頻率Hz 523 553 586 621 658 697 739 783 830 879 931 987TH/TL FC43 FC78 FCAB FCDB FD08 FD33 FD5B FD81 FDA5 FDC7 FDE7 FE05C調(diào)音符  頻率Hz 1045 1106 1171 1241 1316 1393 1476 1563 1658 1755 1860 1971TH/TL FB21 FE3C FE55 FE6D FE84 FE99 FEAD FEC0 FE02 FEE3 FEF3 FF02

    標簽: 單片機 音調(diào)

    上傳時間: 2013-10-20

    上傳用戶:哈哈haha

  • 源代碼用動態(tài)規(guī)劃算法計算序列關系個數(shù) 用關系"<"和"="將3個數(shù)a

    源代碼\用動態(tài)規(guī)劃算法計算序列關系個數(shù) 用關系"<"和"="將3個數(shù)a,b,c依次序排列時,有13種不同的序列關系: a=b=c,a=b<c,a<b=v,a<b<c,a<c<b a=c<b,b<a=c,b<a<c,b<c<a,b=c<a c<a=b,c<a<b,c<b<a 若要將n個數(shù)依序列,設計一個動態(tài)規(guī)劃算法,計算出有多少種不同的序列關系, 要求算法只占用O(n),只耗時O(n*n).

    標簽: lt 源代碼 動態(tài)規(guī)劃 序列

    上傳時間: 2013-12-26

    上傳用戶:siguazgb

  • The government of a small but important country has decided that the alphabet needs to be streamline

    The government of a small but important country has decided that the alphabet needs to be streamlined and reordered. Uppercase letters will be eliminated. They will issue a royal decree in the form of a String of B and A characters. The first character in the decree specifies whether a must come ( B )Before b in the new alphabet or ( A )After b . The second character determines the relative placement of b and c , etc. So, for example, "BAA" means that a must come Before b , b must come After c , and c must come After d . Any letters beyond these requirements are to be excluded, so if the decree specifies k comparisons then the new alphabet will contain the first k+1 lowercase letters of the current alphabet. Create a class Alphabet that contains the method choices that takes the decree as input and returns the number of possible new alphabets that conform to the decree. If more than 1,000,000,000 are possible, return -1. Definition

    標簽: government streamline important alphabet

    上傳時間: 2015-06-09

    上傳用戶:weixiao99

  • 交通信號燈的控制: 1. 通過8255A并口來控制LED發(fā)光二極管的亮滅。 2. A口控制紅燈

    交通信號燈的控制: 1. 通過8255A并口來控制LED發(fā)光二極管的亮滅。 2. A口控制紅燈,B口控制黃燈,C口控制綠燈。 3. 輸出為0則亮,輸出為1則滅。 4. 用8253定時來控制變換時間 。 要求:設有一個十字路口,1、3為南,北方向,2、4為東西方向,初始態(tài)為4個路口的紅燈全亮。之后,1、3路口的綠燈亮,2、4路口的紅燈亮,1、3路口方向通車。延遲30秒后,1、3路口的綠燈熄滅,而1,3路口的黃燈開始閃爍(1HZ)。閃爍5次后,1、3路口的紅燈亮,同時2、4路口的綠燈亮,2、4路口方向開始通車。延遲30秒時間后,2、4路口的綠燈熄滅,而黃燈開始閃爍。閃爍5次后,再切換到1、3路口方向。之后,重復上述過程。

    標簽: 8255A 控制 LED 交通信號燈

    上傳時間: 2014-01-03

    上傳用戶:zhouli

  • A one-dimensional calibration object consists of three or more collinear points with known relative

    A one-dimensional calibration object consists of three or more collinear points with known relative positions. It is generally believed that a camera can be calibrated only when a 1D calibration object is in planar motion or rotates around a ¯ xed point. In this paper, it is proved that when a multi-camera is observing a 1D object undergoing general rigid motions synchronously, the camera set can be linearly calibrated. A linear algorithm for the camera set calibration is proposed,and then the linear estimation is further re¯ ned using the maximum likelihood criteria. The simulated and real image experiments show that the proposed algorithm is valid and robust.

    標簽: one-dimensional calibration collinear consists

    上傳時間: 2014-01-12

    上傳用戶:璇珠官人

  • We have a group of N items (represented by integers from 1 to N), and we know that there is some tot

    We have a group of N items (represented by integers from 1 to N), and we know that there is some total order defined for these items. You may assume that no two elements will be equal (for all a, b: a<b or b<a). However, it is expensive to compare two items. Your task is to make a number of comparisons, and then output the sorted order. The cost of determining if a < b is given by the bth integer of element a of costs (space delimited), which is the same as the ath integer of element b. Naturally, you will be judged on the total cost of the comparisons you make before outputting the sorted order. If your order is incorrect, you will receive a 0. Otherwise, your score will be opt/cost, where opt is the best cost anyone has achieved and cost is the total cost of the comparisons you make (so your score for a test case will be between 0 and 1). Your score for the problem will simply be the sum of your scores for the individual test cases.

    標簽: represented integers group items

    上傳時間: 2016-01-17

    上傳用戶:jeffery

  • 1) Write a function reverse(A) which takes a matrix A of arbitrary dimensions as input and returns a

    1) Write a function reverse(A) which takes a matrix A of arbitrary dimensions as input and returns a matrix B consisting of the columns of A in reverse order. Thus for example, if A = 1 2 3 then B = 3 2 1 4 5 6 6 5 4 7 8 9 9 8 7 Write a main program to call reverse(A) for the matrix A = magic(5). Print to the screen both A and reverse(A). 2) Write a program which accepts an input k from the keyboard, and which prints out the smallest fibonacci number that is at least as large as k. The program should also print out its position in the fibonacci sequence. Here is a sample of input and output: Enter k>0: 100 144 is the smallest fibonacci number greater than or equal to 100. It is the 12th fibonacci number.

    標簽: dimensions arbitrary function reverse

    上傳時間: 2016-04-16

    上傳用戶:waitingfy

  • The LM628/LM629 are dedicated motion-control processors designed for use with a variety of DC and b

    The LM628/LM629 are dedicated motion-control processors designed for use with a variety of DC and brushless DC servo motors

    標簽: motion-control processors dedicated designed

    上傳時間: 2014-01-23

    上傳用戶:aa17807091

  • 1. 通過8255A并口來控制LED發(fā)光二極管的亮滅。 2. A口控制紅燈

    1. 通過8255A并口來控制LED發(fā)光二極管的亮滅。 2. A口控制紅燈,B口控制黃燈,C口控制綠燈。 3. 輸出為0則亮,輸出為1則滅。 4. 用8253定時來控制變換時間 。

    標簽: 8255A LED 控制 并口

    上傳時間: 2013-12-06

    上傳用戶:cccole0605

  • Visual tracking is one of the key components for robots to accomplish a given task in a dynamic env

    Visual tracking is one of the key components for robots to accomplish a given task in a dynamic environment, especially when independently moving objects are included. This paper proposes an extension of Adaptive Visual Servoing (hereafter, AVS) for unknown moving object tracking. The method utilizes binocular stereo vision, but does not need the knowledge of camera parameters. Only one assumption is that the system need stationary references in the both images by which the system can predict the motion of unknown moving objects. The basic ideas how we extended the AVS method such that it can track unknown moving objects are given and formalized into a new AVS system. The experimental results with proposed control architecture are shown and a discussion is given.

    標簽: components accomplish tracking dynamic

    上傳時間: 2013-12-11

    上傳用戶:lizhen9880

主站蜘蛛池模板: 汾西县| 山东省| 梅州市| 灵石县| 新丰县| 成安县| 平顶山市| 连城县| 甘孜| 大邑县| 潼南县| 克山县| 吉水县| 常熟市| 甘肃省| 交口县| 云南省| 承德市| 绥棱县| 论坛| 雷州市| 通许县| 定边县| 玉门市| 大方县| 慈溪市| 满城县| 西峡县| 鹤壁市| 林口县| 拜城县| 筠连县| 建宁县| 衡阳县| 揭东县| 嘉祥县| 平顶山市| 凌源市| 张家界市| 那坡县| 英德市|