高级天翼
纯属展示,勿举报。(不举报的,人品智商皆大于200)
#include<windows.h>
#include<stdio.h>
using namespace std;
int main()
{
int m[]={0,320,356,399,415,466,494, 523},i=0;
int s[]={5,3,5,3,5,3,1,0,2,4,3,2,5,0,5,3,5,3,5,3,1,2,4,3,2,1};
int t[]={300,300,300,300,300,300,485,120,300,350,300,290,950,300,300,300,300,300,300,300,500,399,250,300,300,500,500};
for (i=0; i<27; i++)
{
Beep(m[s[i]],t[i]);
}
return 0;
}
蒋智航在2018-07-31 17:29:56追加了内容
运行时,请开着
蒋智航在2018-07-31 17:31:53追加了内容
不然就没效果。
这是歌曲《我是一个粉刷匠》片段
蒋智航在2018-07-31 17:33:00追加了内容
用电脑的蜂鸣器制造音高
蒋智航在2018-08-01 10:47:55追加了内容
@李腾远@黄昊轩@郑怡翔@王昕宸 @周建勋 @毕小曼@郑凝溪
{0,320,356,399,415,466,494, 523}是do re mi fa suo la si的唱名
{300,300,300,300,300,300,485,120,300,350,300,290,950,300,300,300,300,300,300,300,500,399,250,300,300,500,500}; 是音与音之间的间隔
int s[]={5,3,5,3,5,3,1,0,2,4,3,2,5,0,5,3,5,3,5,3,1,2,4,3,2,1}; 是曲调,5=suo 3=mi (简谱应该认识吧)
蒋智航在2018-08-01 10:48:41追加了内容
{0,320,356,399,415,466,494, 523} 0 别管,320才是do
蒋智航在2018-08-01 10:50:42追加了内容
for (i=0; i<27; i++) 27是音符数的个数+1
本蒟蒻菜,没谱写整首曲子,麻烦高抬贵手,自己补充!
蒋智航在2018-08-06 15:16:18追加了内容
@李腾远@黄昊轩@郑怡翔@王昕宸 @周建勋 @毕小曼@郑凝溪
我错了,int t[]={300,1000,300,300,300,300,485,120,300,350,300,290,950,300,300,300,300,300,300,300,500,399,250,300,300,500,500};
是音的长度
SORRY
资深守护
666
在此奉上音表和本人自制《致爱丽丝》
———我———是———分———割———线———
音表来袭!
//q前缀为低音,1后缀为高音,s前缀为半音阶
#define qdo 262
#define qre 294
#define qmi 330
#define qfa 349
#define qso 392
#define qla 440
#define qsi 494
#define do 523
#define re 578
#define mi 659
#define fa 698
#define so 784
#define la 880
#define si 988
#define do1 1046
#define re1 1175
#define mi1 1318
#define fa1 1480
#define so1 1568
#define la1 1760
#define si1 1976
#define sqdo 277
#define sqre 311
#define sqfa 370
#define sqso 415
#define sqla 466
#define sdo 554
#define sre 622
#define sfa 740
#define sso 831
#define sla 932
#define sdo1 1046
#define sre1 1245
#define sfa1 1480
#define sso1 1661
———我———是———分———割———线———
奉上一首《致爱丽丝》
(前奏额,只有前奏!!!)
#include<windows.h>
#include<stdio.h>
//q前缀为低音,1后缀为高音,s前缀为半音阶
#define qdo 262
#define qre 294
#define qmi 330
#define qfa 349
#define qso 392
#define qla 440
#define qsi 494
#define do 523
#define re 578
#define mi 659
#define fa 698
#define so 784
#define la 880
#define si 988
#define do1 1046
#define re1 1175
#define mi1 1318
#define fa1 1480
#define so1 1568
#define la1 1760
#define si1 1976
#define sqdo 277
#define sqre 311
#define sqfa 370
#define sqso 415
#define sqla 466
#define sdo 554
#define sre 622
#define sfa 740
#define sso 831
#define sla 932
#define sdo1 1046
#define sre1 1245
#define sfa1 1480
#define sso1 1661
#define pai 250
using namespace std;
int main()
{
Beep(mi1,pai*3/4);
Beep(sre1,pai*3/4);
Beep(mi1,pai*3/4);
Beep(sre1,pai*3/4);
Beep(mi1,pai*3/4);
Beep(si,pai*3/4);
Beep(re1,pai*3/4);
Beep(do1,pai*3/4);
Beep(la,pai*5);
Beep(do,pai*3/4);
Beep(mi,pai*3/4);
Beep(la,pai*3/4);
Beep(si,pai*4);
Beep(mi,pai*3/4);
Beep(sso,pai*3/4);
Beep(si,pai*3/4);
Beep(do1,pai*4);
Beep(mi,pai*3/4);
Beep(mi1,pai*3/4);
Beep(sre1,pai*3/4);
Beep(mi1,pai*3/4);
Beep(sre1,pai*3/4);
Beep(mi1,pai*3/4);
Beep(si,pai*3/4);
Beep(re1,pai*3/4);
Beep(do1,pai*3/4);
Beep(la,pai*4);
Beep(do,pai*3/4);
Beep(mi,pai*3/4);
Beep(la,pai*3/4);
Beep(si,pai*4);
Beep(mi,pai*3/4);
Beep(do1,pai*3/4);
Beep(si,pai*3/4);
Beep(la,pai*4);
return 0;
}
徐铭凯在2018-08-01 14:49:07追加了内容
之前发的代码有点问题
修改了一下
#include<windows.h>
#include<stdio.h>
//q前缀为低音,1后缀为高音,s前缀为半音阶
#define qdo 262
#define qre 294
#define qmi 330
#define qfa 349
#define qso 392
#define qla 440
#define qsi 494
#define do 523
#define re 578
#define mi 659
#define fa 698
#define so 784
#define la 880
#define si 988
#define do1 1046
#define re1 1175
#define mi1 1318
#define fa1 1480
#define so1 1568
#define la1 1760
#define si1 1976
#define sqdo 277
#define sqre 311
#define sqfa 370
#define sqso 415
#define sqla 466
#define sdo 554
#define sre 622
#define sfa 740
#define sso 831
#define sla 932
#define sdo1 1046
#define sre1 1245
#define sfa1 1480
#define sso1 1661
#define pai 250
using namespace std;
int main()
{
Beep(mi1,pai*1);
Beep(sre1,pai*1);
Beep(mi1,pai*1);
Beep(sre1,pai*1);
Beep(mi1,pai*1);
Beep(si,pai*1);
Beep(re1,pai*1);
Beep(do1,pai*1);
Beep(la,pai*6);
Beep(do,pai*1);
Beep(mi,pai*1);
Beep(la,pai*1);
Beep(si,pai*5);
Beep(mi,pai*1);
Beep(sso,pai*1);
Beep(si,pai*1);
Beep(do1,pai*5);
Beep(mi,pai*1);
Beep(mi1,pai*1);
Beep(sre1,pai*1);
Beep(mi1,pai*1);
Beep(sre1,pai*1);
Beep(mi1,pai*1);
Beep(si,pai*1);
Beep(re1,pai*1);
Beep(do1,pai*1);
Beep(la,pai*3);
Beep(do,pai*1);
Beep(mi,pai*1);
Beep(la,pai*1);
Beep(si,pai*3);
Beep(mi,pai*1);
Beep(do1,pai*1);
Beep(si,pai*1);
Beep(la,pai*3);
return 0;
}
高级天翼
@李腾远@黄昊轩@郑怡翔@王昕宸 @周建勋 @毕小曼@郑凝溪
{0,320,356,399,415,466,494, 523}是do re mi fa suo la si的唱名
{300,300,300,300,300,300,485,120,300,350,300,290,950,300,300,300,300,300,300,300,500,399,250,300,300,500,500}; 是音与音之间的间隔
int s[]={5,3,5,3,5,3,1,0,2,4,3,2,5,0,5,3,5,3,5,3,1,2,4,3,2,1}; 是曲调,5=suo 3=mi (简谱应该认识吧)
资深光能
666666666666666666666666666666666666666666666666
666666666666666666666666666666666666666666666666
666666666666666666666666666666666666666666666666
初级天翼
#include<windows.h>
#include<stdio.h>
using namespace std;
int main()
{
int m[]={0,320,356,399,415,466,494, 523},i=0;
int s[]={5,3,5,3,5,3,1,0,2,4,3,2,5,0,5,3,5,3,5,3,1,0,2,4,3,2,1}; //把这边多加个0更好
int t[]={300,300,300,300,300,300,485,120,300,350,300,290,950,300,300,300,300,300,300,300,500,399,250,300,300,500,500};
for (i=0; i<27; i++)
{
Beep(m[s[i]],t[i]);
}
return 0;
}
新手守护
帮蒋智航完善的:(全曲)
#include<windows.h>
#include<stdio.h>
using namespace std;
int main()
{
int m[]={0,320,356,399,415,466,494, 523},i=0;
int s[]={5,3,5,3,5,3,1,0,2,4,3,2,5,0,5,3,5,3,5,3,1,2,4,3,2,1,0,2,2,4,4,3,2,5,0,2,2,4,3,2,5,0,5,3,5,3,5,3,1,0,2,4,3,2,1};
int t[]={300,300,300,300,300,300,485,120,300,350,300,290,950,300,300,300,300,300,300,300,500,399,250,300,300,500,500,300,300,300,300,300,300,500,300,300,100,100,300,300,500,300,300,300,300,300,300,485,120,399,250,300,300,500,500};
for (i=0; i<55; i++)
{
Beep(m[s[i]],t[i]);
}
return 0;
}
@蒋智航 若不对或有误,请予改正,谢谢。
翟谦瑞在2018-08-02 08:47:37追加了内容
那个i应该是56,搞错了。
高级守护
奉上一程序:
#include <cstdio>
#include <windows.h>
#define do 523
using namespace std;
int main()
{
int qdo=262,qre=294,qmi=330,qfa=349,qso=392,qla=440,qsi=494,re=578,mi=659,fa=698,so=784,la=880,si=988,do1=1046,re1=1175,mi1=1318,fa1=1480,so1=1568,la1=1760,si1=1976,sqdo=277,sqre=311,sqfa=370,sqso=415,sqla=466,sdo=554,sre=622,sfa=740,sso=831,sla=932,sdo1=1046,sre1=1245,sfa1=1480,sso1=1661,sla1=1865;
int pai=400,ban=200;
int ting=128;
Sleep(1000);
Beep(la,ban);
Beep(si,ban);
Sleep(ting);
Beep(do1,pai+ban);
Beep(si,ban);
Sleep(ting);
Beep(do1,pai);
Sleep(ting);
Beep(mi1,pai);
Sleep(ting);
Beep(si,3*pai);
Sleep(ting);
Beep(mi,ban);
Beep(mi,ban);
Beep(la,ban+pai);
Beep(so,ban);
Sleep(ting);
Beep(la,pai);
Sleep(ting);
Beep(do1,pai);
Sleep(ting);
Beep(so,2*pai);
Sleep(ting);
Sleep(pai);
Beep(mi,ban);
Sleep(ting/2);
Beep(mi,ban);
Sleep(ting/2);
Beep(fa,pai+ban);
Beep(mi,ban);
Sleep(ting);
Beep(fa,ban);
Beep(do1,ban+pai);
Sleep(ting);
Beep(mi,2*pai);
Sleep(ting);
Sleep(ban);
Beep(do1,ban);
Sleep(ting/2);
Beep(do1,ban);
Sleep(ting/2);
Beep(do1,ban);
Sleep(ting/2);
Beep(si,ban+pai);
Beep(sfa,ban);
Sleep(ting);
Beep(sfa,pai);
Beep(si,pai);
Sleep(ting);
Beep(si,2*pai);
Sleep(ting);
Sleep(pai);
Beep(la,ban);
Beep(si,ban);
Sleep(ting);
Beep(do1,pai+ban);
Beep(si,ban);
Sleep(ting);
Beep(do1,pai);
Sleep(ting);
Beep(mi1,pai);
Sleep(ting);
Beep(si,2*pai);
Sleep(ting);
Sleep(pai);
Beep(mi,ban);
Sleep(20);
Beep(mi,ban);
Sleep(ting);
Beep(la,pai+ban);
Beep(so,ban);
Sleep(ting);
Beep(la,pai);
Sleep(ting);
Beep(do1,pai);
Sleep(ting);
Beep(so,3*pai);
Sleep(ting+ban);
Beep(mi,ban);
Sleep(ting/2);
Beep(fa,pai);
Sleep(ting);
Beep(do1,ban);
Beep(si,ban);
Sleep(20);
Beep(si,pai);
Sleep(ting);
Beep(do1,pai);
Sleep(ting);
Beep(re1,ban);
Sleep(20);
Beep(re1,ban);
Sleep(20);
Beep(mi1,ban);
Sleep(ting/2);
Beep(do1,pai);
Sleep(ting+pai);
Beep(do1,pai);
Beep(si,ban);
Sleep(ting);
Beep(la,ban);
Sleep(20);
Beep(la,ban);
Sleep(ting);
Beep(si,pai);
Sleep(ting);
Beep(sso,pai);
Sleep(ting);
Beep(sso,2*pai);
Sleep(ting+pai);
Beep(do1,ban);
Beep(re1,ban);
Sleep(ting);
Beep(mi1,pai+ban);
Beep(re1,ban);
Sleep(ting);
Beep(mi1,pai);
Sleep(ting);
Beep(fa1,pai);
Sleep(ting);
Beep(re1,2*pai);
Sleep(pai+ting);
Beep(so,ban);
Sleep(20);
Beep(so,ban);
Sleep(ting);
Beep(do1,ban);
Beep(si,ban);
Sleep(ting);
Beep(do1,pai);
Sleep(ting);
Beep(mi1,pai);
Sleep(ting);
Beep(mi1,2*pai);
Sleep(ting+2*pai);
Beep(la,ban);
Beep(si,ban);
Sleep(ting);
Beep(do1,pai);
Sleep(ting);
Beep(si,pai);
Sleep(ting);
Beep(re1,ban);
Sleep(20);
Beep(re1,ban);
Sleep(ting);
Beep(do1,pai+ban);
Beep(so,ban);
Sleep(20);
Beep(so,pai);
Sleep(pai+ting);
Beep(fa1,pai);
Sleep(ting);
Beep(mi1,pai);
Sleep(ting);
Beep(re1,pai);
Sleep(ting);
Beep(do1,pai);
Sleep(ting);
Beep(mi1,4*pai);
Beep(mi1,pai*2);
Sleep(pai+ting);
Beep(mi1,pai);
Sleep(ting);
Beep(la1,2*pai);
Sleep(ting);
Beep(so1,pai);
Sleep(ting);
Beep(so1,pai);
Sleep(ting);
Beep(mi1,ban);
Sleep(ting/2);
Beep(re1,ban);
Sleep(ting);
Beep(do1,pai);
Sleep(ting+ban);
Beep(do1,ban);
Sleep(ting);
Beep(re1,pai);
Sleep(ting);
Beep(do1,ban);
Beep(re1,ban);
Sleep(20);
Beep(re1,ban);
Sleep(ting);
Beep(so1,pai);
Sleep(ting);
Beep(mi1,2*pai);
Sleep(ting+pai);
Beep(mi,pai);
Sleep(ting);
Beep(la1,2*pai);
Sleep(ting);
Beep(so1,2*pai);
Sleep(ting);
Beep(mi1,ban);
Beep(re1,ban);
Sleep(ting);
Beep(do1,2*pai);
Sleep(ting+ban);
Beep(do1,ban);
Sleep(ting);
Beep(re1,pai);
Sleep(ting);
Beep(do1,ban);
Beep(re1,ban);
Sleep(20);
Beep(re1,ban);
Sleep(ting);
Beep(si,pai);
Sleep(ting);
Beep(la,2*pai);
Sleep(ting);
Beep(la,ban);
Beep(si,ban);
Beep(do1,pai+ban);
Beep(si,ban);
Sleep(ting);
Beep(do1,pai);
Sleep(ting);
Beep(mi1,pai);
Sleep(ting);
Beep(si,3*pai);
Sleep(ting);
Beep(mi,ban);
Beep(mi,ban);
Beep(la,ban+pai);
Beep(so,ban);
Sleep(ting);
Beep(la,pai);
Sleep(ting);
Beep(do1,pai);
Sleep(ting);
Beep(so,2*pai);
Sleep(ting);
Sleep(pai);
Beep(mi,ban);
Sleep(ting/2);
Beep(mi,ban);
Sleep(ting/2);
Beep(fa,pai+ban);
Beep(mi,ban);
Sleep(ting);
Beep(fa,ban);
Beep(do1,ban+pai);
Sleep(ting);
Beep(mi,2*pai);
Sleep(ting);
Sleep(ban);
Beep(do1,ban);
Sleep(ting/2);
Beep(do1,ban);
Sleep(ting/2);
Beep(do1,ban);
Sleep(ting/2);
Beep(si,ban+pai);
Beep(sfa,ban);
Sleep(ting);
Beep(sfa,pai);
Beep(si,pai);
Sleep(ting);
Beep(si,2*pai);
Sleep(ting);
Sleep(pai);
Beep(la,ban);
Beep(si,ban);
Sleep(ting);
Beep(do1,pai+ban);
Beep(si,ban);
Sleep(ting);
Beep(do1,pai);
Sleep(ting);
Beep(mi1,pai);
Sleep(ting);
Beep(si,2*pai);
Sleep(ting);
Sleep(pai);
Beep(mi,ban);
Sleep(20);
Beep(mi,ban);
Sleep(ting);
Beep(la,pai+ban);
Beep(so,ban);
Sleep(ting);
Beep(la,pai);
Sleep(ting);
Beep(do1,pai);
Sleep(ting);
Beep(so,3*pai);
Sleep(ting+ban);
Beep(mi,ban);
Sleep(ting/2);
Beep(fa,pai);
Sleep(ting);
Beep(do1,ban);
Beep(si,ban);
Sleep(20);
Beep(si,pai);
Sleep(ting);
Beep(do1,pai);
Sleep(ting);
Beep(re1,ban);
Sleep(20);
Beep(re1,ban);
Sleep(20);
Beep(mi1,ban);
Sleep(ting/2);
Beep(do1,pai);
Sleep(ting+pai);
Beep(la,4*pai);
Sleep(1000);
main();
}
自己试吧,没坑
中级光能
66666666666666666666666666666666666666666666666666666666666666666666666666666(赞美之时泼下冷水,这不是你写的吧)