Not shocked at all

Of course, we still have to chat C++ How did you move from data processing to music .

<> one What's the name of the function

C++ The function that makes a sound in is called Beep().

How to use it >>Beep(1200,100) Can make a dripping sound .

<> two Du Niang explained
The first number specifies the frequency to emit . Specifies the duration of the pronunciation ( millisecond ).
<> three Do you really understand

I bet you don't understand . I can't understand

The only problem is frequency , So we don't have to worry about it .

We just know what it is do re mi fa sol la si All right ( What are you waiting for , Go out and turn right. See you at Baidu )

When we know the tone, we can use it C++ Come and listen to the music ( Total loss music, of course )

<> four music !!!

First we put do reach si Write down the values :
#include <cstdio> #include <windows.h> #define qdo 262//q Prefix with bass ,1 The suffix is treble ,s The prefix is a chromatic scale #
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 sla1 1865
Then there's the sound ,do re mi That's it ↓↓
Beep(do,100); Beep(re,100); Beep(mi,100);
So we can use C++ Make music .

If anyone is lazy, listen to this ↓↓
#include <cstdio> #include <windows.h> #define qdo 262 #define qre 294 #define
qmi 330//q Prefix with bass ,1 The suffix is treble ,s The prefix is a chromatic scale #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 sla1 1865 int main() { int pai = 400,ban = 200,ting = 128;
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); }
Please hold your hands high and don't spray out of tune

Technology
©2019-2020 Toolsou All rights reserved,
Android Using wechat in H5 Payment result refresh during payment shock !!C++ Can make a sound ! Basic operation of single linked list C Language explanation Java Implement an epidemic number management system 2021 year 11 World programming language ranking linux upper mysql Invalid command _linux lower mysql The command is useless Java project : Campus dormitory management system (java+jsp+javaweb+mysql+ajax) Wechat applet development project directory linux ubuntu Which version ,Ubuntu Which version is the best ?python Code painting cherry blossoms - How to use Python Draw a beautiful cherry blossom