软件协会第01次活动第05次任务布置:爱心代码+演奏歌曲+typora使用pandoc导出+github注册登录+函数练习+写csdn文章

news2024/11/27 10:44:01

了解更多关注软协官网:https://www.csuftsap.cn/

来自软件协会编辑,注册会员即可获取全部开源.md资源,请勿转载,归软件协会所有。


文章目录

  • :star: 软件协会第01次活动第05次任务布置
  • 1.程序员的浪漫-爱心代码(升级版)
    • 1.1 官网下载EasyX
    • 1.2 安装EasyX
    • 1.3 重启vs,新建项目并在其中创建一个.cpp文件(如果之前打开了vs,请重启vs)
    • 1.4 将如下代码拷贝到 love.cpp 文件中运行即可
    • 1.5 :round_pushpin: 运行该 .cpp 文件
  • 2.演奏歌曲(选做)
    • 2.1 平凡之路
    • 2.2 海阔天空
    • 2.3 起风了
    • 2.4 光阴的故事
    • 2.5 第一次爱的人
  • 3.typora的导出
    • 3.1 导出为pdf
    • 3.2 导出为word文档
      • 3.2.1 下载与安装pandoc
      • 3.2.2 typora配置pandoc
      • 3.2.3 导出为word
    • 3.3 :round_pushpin: 作业展示
  • 4.github注册登录与typora主题获取
    • 4.0 说明
      • 4.0.1 GitHub简介
      • 4.0.2 Github能给你带来什么
    • 4.1 github网址填写邮箱
    • 4.2 设置密码(包含字母大小写和数字)
    • 4.3 设置英文用户名
    • 4.4 选择是否接受消息推送
    • 4.5 真人验证
    • 4.6 邮箱验证
    • 4.7 信息填写
    • 4.8 注册成功
    • 4.9 获取typora主题
    • 4.10 :round_pushpin: 作业展示
  • 5.函数练习
    • 5.1 :round_pushpin: 求和
    • 5.2 :round_pushpin: 回文数
    • 5.3 :round_pushpin: 函数表达式的值
  • 6.写一篇自己的csdn文章
    • 6.1 选题范围
    • 6.2 编写步骤
    • 6.3 :round_pushpin: 分享
  • 7.总结
    • 7.1 个人学习总结
    • 7.2 对软件协会的评价与建议

⭐️ 软件协会第01次活动第05次任务布置

📍 来自:中南林业科技大学软件协会学术部:谢添

⏲ 时间:2022 - 11 - 27

🏠 官网:https://www.csuftsap.cn/

💬 任务布置说明:

  • 题目考察范围:函数
  • 所有答案均放在我所写的空代码块空引用框

🚀 本学期我们的练习到这里就结束了,如果我们的缘分未尽,寒假再见💓

1.程序员的浪漫-爱心代码(升级版)

1.1 官网下载EasyX

EasyX 是针对 C/C++ 的图形库,可以帮助使用C/C++语言的程序员快速上手图形和游戏编程。

比如,可以用 VC + EasyX 很快的用几何图形画一个房子,或者一辆移动的小车,可以编写俄罗斯方块、贪吃蛇、黑白棋等小游戏,可以练习图形学的各种算法,等等。

这里只是本次任务的小热身。

🏠 https://easyx.cn/download

image-20221112120604281

1.2 安装EasyX

image-20221112120648758

image-20221112120713499

image-20221112120727809

image-20221112120741679

1.3 重启vs,新建项目并在其中创建一个.cpp文件(如果之前打开了vs,请重启vs)

也可以在vs界面内使用 ctrl + shift + A 快速创建文件

image-20221112122409136

image-20221112122525560

1.4 将如下代码拷贝到 love.cpp 文件中运行即可

#include<graphics.h>
#include<conio.h>
#include<time.h>
#include<math.h>
#include<stdlib.h>

/*
	作者:那蔚蓝天空 
*/

struct Point {
	double x, y;
	COLORREF color;
};

COLORREF colors[256] = { RGB(255,32,83),RGB(252,222,250) ,RGB(255,0,0) ,
RGB(255,0,0) ,RGB(255,2,2) ,RGB(255,0,8) ,RGB(255,5,5) };
const int xScreen = 1200;
const int yScreen = 800;
const double PI = 3.1426535159;
const double e = 2.71828;
const double averag_distance = 0.162;
const int quantity = 506;
const int circles = 210;
const int frames = 20;
Point  origin_points[quantity];
Point  points[circles * quantity];
IMAGE images[frames];

double screen_x(double x)
{
	x += xScreen / 2;
	return x;
}

double screen_y(double y)
{
	y = -y + yScreen / 2;
	return y;
}

int creat_random(int x1, int x2)
{
	if (x2 > x1)
		return  rand() % (x2 - x1 + 1) + x1;
}

void creat_data()
{
	int index = 0;
	double x1 = 0, y1 = 0, x2 = 0, y2 = 0;
	for (double radian = 0.1; radian <= 2 * PI; radian += 0.005)
	{
		x2 = 16 * pow(sin(radian), 3);
		y2 = 13 * cos(radian) - 5 * cos(2 * radian) - 2 * cos(3 * radian)
			- cos(4 * radian);

		double distance = sqrt(pow(x2 - x1, 2) + pow(y2 - y1, 2));
		if (distance > averag_distance)
		{
			x1 = x2, y1 = y2;
			origin_points[index].x = x2;
			origin_points[index++].y = y2;
		}
	}

	index = 0;
	for (double size = 0.1, lightness = 1.5; size <= 20; size += 0.1)
	{
		double success_p = 1 / (1 + pow(e, 8 - size / 2));
		if (lightness > 1) lightness -= 0.0025;

		for (int i = 0; i < quantity; ++i)
		{
			if (success_p > creat_random(0, 100) / 100.0)
			{
				COLORREF color = colors[creat_random(0, 6)];
				points[index].color = RGB(GetRValue(color) / lightness, GetGValue(color) / lightness, GetBValue(color) / lightness);
				points[index].x = size * origin_points[i].x + creat_random(-4, 4);
				points[index++].y = size * origin_points[i].y + creat_random(-4, 4);
			}
		}
	}

	int points_size = index;

	for (int frame = 0; frame < frames; ++frame)
	{
		images[frame] = IMAGE(xScreen, yScreen);
		SetWorkingImage(&images[frame]);

		for (index = 0; index < points_size; ++index)
		{
			double x = points[index].x, y = points[index].y;
			double distance = sqrt(pow(x, 2) + pow(y, 2));
			double diatance_increase = -0.0009 * distance * distance
				+ 0.35714 * distance + 5;
			double x_increase = diatance_increase * x / distance / frames;
			double y_increase = diatance_increase * y / distance / frames;

			points[index].x += x_increase;
			points[index].y += y_increase;

			setfillcolor(points[index].color);
			solidcircle(screen_x(points[index].x), screen_y(points[index].y), 1);
		}

		for (double size = 17; size < 23; size += 0.3)
		{
			for (index = 0; index < quantity; ++index)
			{
				if ((creat_random(0, 100) / 100.0 > 0.6 && size >= 20)
					|| (size < 20 && creat_random(0, 100) / 100.0 > 0.95))
				{
					double x, y;
					if (size >= 20)
					{
						x = origin_points[index].x * size +
							creat_random(-frame * frame / 5 - 15, frame * frame / 5 + 15);
						y = origin_points[index].y * size +
							creat_random(-frame * frame / 5 - 15, frame * frame / 5 + 15);
					}
					else
					{
						x = origin_points[index].x * size + creat_random(-5, 5);
						y = origin_points[index].y * size + creat_random(-5, 5);
					}

					setfillcolor(colors[creat_random(0, 6)]);
					solidcircle(screen_x(x), screen_y(y), 1);
				}
			}
		}
	}
	SetWorkingImage();
}

int main()
{
	initgraph(xScreen, yScreen);
	BeginBatchDraw();
	srand(time(0));
	creat_data();

	bool extend = true, shrink = false;
	for (int frame = 0; !_kbhit();)
	{
		putimage(0, 0, &images[frame]);
		FlushBatchDraw();
		Sleep(20);
		cleardevice();

		if (extend)
			frame == 19 ? (shrink = true, extend = false) : ++frame;
		else
			frame == 0 ? (shrink = false, extend = true) : --frame;
	}
	EndBatchDraw();
	closegraph();
	return 0;
} 

1.5 📍 运行该 .cpp 文件

将你运行出来的结果截图放入下面的引用框中:

2.演奏歌曲(选做)

💬 只需要将刚才写的 love.cpp 文件里的全部代码替换为下面的代码即可,你也可以选择新开文件,但一定是以 .cpp 结尾的文件。以下代码不需要用到 EasyX 插件。如果你对演奏音乐感兴趣,那么当你学到 C++ 的时候就可以去学习用代码演奏自己喜欢的音乐,这不会太难,只要找到你选择的歌曲的谱子按照对应关系填写对应代码即可。一定要谱一曲《告白气球》,去和你爱的男孩或女孩表白❤️

2.1 平凡之路

#include <iostream>
#include <Windows.h>
#pragma comment(lib,"winmm.lib")
using namespace std;

/*
	作者:子任-逸仙
*/

enum Scale
{
    Rest = 0, C8 = 108, B7 = 107, A7s = 106, A7 = 105, G7s = 104, G7 = 103, F7s = 102, F7 = 101, E7 = 100,
    D7s = 99, D7 = 98, C7s = 97, C7 = 96, B6 = 95, A6s = 94, A6 = 93, G6s = 92, G6 = 91, F6s = 90, F6 = 89,
    E6 = 88, D6s = 87, D6 = 86, C6s = 85, C6 = 84, B5 = 83, A5s = 82, A5 = 81, G5s = 80, G5 = 79, F5s = 78,
    F5 = 77, E5 = 76, D5s = 75, D5 = 74, C5s = 73, C5 = 72, B4 = 71, A4s = 70, A4 = 69, G4s = 68, G4 = 67,
    F4s = 66, F4 = 65, E4 = 64, D4s = 63, D4 = 62, C4s = 61, C4 = 60, B3 = 59, A3s = 58, A3 = 57, G3s = 56,
    G3 = 55, F3s = 54, F3 = 53, E3 = 52, D3s = 51, D3 = 50, C3s = 49, C3 = 48, B2 = 47, A2s = 46, A2 = 45,
    G2s = 44, G2 = 43, F2s = 42, F2 = 41, E2 = 40, D2s = 39, D2 = 38, C2s = 37, C2 = 36, B1 = 35, A1s = 34,
    A1 = 33, G1s = 32, G1 = 31, F1s = 30, F1 = 29, E1 = 28, D1s = 27, D1 = 26, C1s = 25, C1 = 24, B0 = 23,
    A0s = 22, A0 = 21
};

enum Voice
{
    X1 = C2, X2 = D2, X3 = E2, X4 = F2, X5 = G2, X6 = A2, X7 = B2,
    L1 = C3, L2 = D3, L3 = E3, L4 = F3, L5 = G3, L6 = A3, L7 = B3,
    M1 = C4, M2 = D4, M3 = E4, M4 = F4, M5 = G4, M6 = A4, M7 = B4,
    H1 = C5, H2 = D5, H3 = E5, H4 = F5, H5 = G5, H6 = A5, H7 = B5,
    LOW_SPEED = 500, MIDDLE_SPEED = 400, HIGH_SPEED = 300,
    _ = 0XFF
};

void Trivial()
{
    HMIDIOUT handle;
    midiOutOpen(&handle, 0, 0, 0, CALLBACK_NULL);
    int volume = 0x7f;
    int voice = 0x0;
    int sleep = 300;
    int trivial[] =
    {
       MIDDLE_SPEED, X6,L6,M3,M1,M1,L4,M4,M1,X1,L5,M3,M1,L7,M1,M2,L5,X6,L6,M3,M1,M1,L4,M4,M1,X1,L5,M3,M1,L7,M1,M2,L5,_,_,
       400,M3,M3,0,M6,M6,_,_,400,M1,M2,0,M3,M3,_,400,_,_,_,_,_,_,_,_,M3,M3,0,M6,M6,_,_,400,_,M5,M5,M4,M3,_,_,_,_,_,_,_,_,
       M3,M3,M6,_,M1,M2,M3,_,_,_,_,_,_,_,M3,M3,M1,M4,0,M4,M4,_,400,M3,M1,_,_,_,
       400,M3,M3,0,M6,M6,_,_,400,M1,M2,0,M3,M3,_,400,_,_,_,_,_,_,_,_,M3,M3,0,M6,M6,_,_,400,_,M5,M5,M4,M3,_,_,_,_,_,_,_,_,
       M3,M3,M6,_,M1,M2,M3,_,_,_,_,_,_,_,M3,M3,M1,M4,0,M4,M4,_,400,M3,M1,_,_,_,_,_,
       M5,M6,M7,H1,0,M7,H1,_,M5,300,M6,M6,_,M5,0,M4,M3,_,300,M3,M3,0,M3,M2,_,300,M5,M6,M7,H1,0,M7,H1,_,M5,300,M6,M6,_,M6,0,H1,H1,_,300,H1,H1,0,H1,H2,_,M5,300,
       M6,M7,H1,0,M7,H1,_,H3,700,H6,700,H5,_,H4,H3,_,H3,H2,_,
       M6,700,M7,H1,_,700,H1,0,H2,H1,_,H1,M7,300,H1,0,H2,_,H1,700,M7,H1,_,_,_,
       400,M3,M3,0,M6,M6,_,_,400,M1,M2,0,M3,M3,_,400,_,_,_,_,_,_,_,_,M3,M3,0,M6,M6,_,_,400,_,M5,M5,M4,M3,_,_,_,_,_,_,_,_,
       M3,M3,M6,_,M1,M2,M3,_,_,_,_,_,_,_,M3,M3,M1,M4,0,M4,M4,_,400,M3,M1,_,_,_,_,_,
       M5,M6,M7,H1,0,M7,H1,_,M5,300,M6,M6,_,M5,0,M4,M3,_,300,M3,M3,0,M3,M2,_,300,M5,M6,M7,H1,0,M7,H1,_,M5,300,M6,M6,_,M6,0,H1,H1,_,300,H1,H1,0,H1,H2,_,M5,300,M6,M7,H1,0,M7,H1,_,H3,700,H6,700,H5,_,H4,H3,_,H3,H2,_,
       M6,700,M7,H1,_,700,H1,0,H2,H1,_,H1,M7,300,H1,0,H2,_,H1,700,M7,H1,_,_,_,
       M5,0,L7,M1,_,_,L7,300,M1,0,L7,M1,300,L7,L5,M5,0,L7,M1,_,L7,300,M7,0,L6,L7,300,M1,L5,M5,0,L7,M1,_,_,L7,300,M1,0,L7,M1,300,M2,L5,M5,0,L7,M1,_,L7,L7,M1,300,M2,M2,_,
       M5,0,L7,M1,_,_,L7,300,M1,0,L7,M1,300,L7,L5,M5,0,M5,M1,300,M1,700,0,M1,300,L7,0,L6,L7,300,M1,L5,M5,0,L7,M1,_,L7,300,M1,0,M2,M3,300,M4,M3,M1,0,L5,M1,300,M2,0,M1,M2,M2,M3,300,M4,M3,_,
       M5,0,L7,M1,_,_,L7,300,M1,0,L7,M1,300,L7,L5,M5,0,L7,M1,_,_,L7,300,M1,0,L7,M1,300,L7,L5,M5,0,L7,M1,_,_,L7,300,M1,0,L7,L6,300,M2,L5,M5,0,L7,M1,_,L7,L7,M1,300,M2,M2,_,
       M5,0,M2,M3,300,M3,M1,M2,0,M3,M4,300,M6,M5,M5,_,M5,_,M4,0,M3,M2,300,M3,M5,0,L7,M1,_,L7,300,M1,0,M2,M3,300,M4,M3,M4,0,M3,M2,300,M1,0,M5,M1,M2,M3,300,M4,M3,_,
       X6,L6,M3,M1,M1,L4,M4,M1,X1,L5,M3,M1,L7,M1,M2,L5,
       X6,L6,M3,M1,M1,L4,M4,M1,X1,L5,M3,M1,L7,M1,M2,L5,
       X6,L6,M3,M1,M1,L4,M4,M1,X1,L5,M3,M1,L7,M1,M2,L5,
       X6,L6,M3,M1,M1,L4,M4,M1,X1,L5,M3,M1,_,_,
       M5,M6,M7,H1,0,M7,H1,_,M5,300,M6,M6,_,M5,0,M4,M3,_,300,M3,M3,0,M3,M2,_,300,M5,M6,M7,H1,0,M7,H1,_,M5,300,M6,M6,_,M6,0,H1,H1,_,300,H1,H1,0,H1,H2,_,M5,300,M6,M7,H1,0,M7,H1,_,H3,700,H6,700,H5,_,H4,H3,_,H3,H2,_,
       M6,700,M7,H1,_,700,H1,0,H2,H1,_,H1,M7,300,H1,0,H2,_,H1,0,M7,H1,300,H1,
       M5,M6,M7,H1,0,M7,H1,_,M5,300,M6,M6,_,M5,0,M4,M3,_,300,M3,M3,0,M3,M2,_,300,M5,M6,M7,H1,0,M7,H1,_,M5,300,M6,M6,_,M6,0,H1,H1,_,300,H1,H1,0,H1,H2,_,M5,300,M6,M7,H1,0,M7,H1,_,H3,700,H6,700,H5,_,H4,H3,_,H3,H2,_,
       M6,700,M7,H1,_,700,H1,0,H2,H1,_,H1,M7,300,H1,0,H2,_,H1,0,M7,H1,300,H1,
       M5,M6,M7,H1,0,M7,H1,_,M5,300,M6,M6,_,M5,0,M4,M3,_,300,M3,M3,0,M3,M2,_,300,M5,M6,M7,H1,0,M7,H1,_,M5,300,M6,M6,_,M6,0,H1,H1,_,300,H1,H1,0,H1,H2,_,M5,300,
       M6,M7,H1,0,M7,H1,_,H3,700,H6,700,H5,_,H4,H3,_,H3,H2,_,M6,700,M7,H1,_,700,H1,0,H2,H1,_,H1,M7,300,H1,0,H2,_,H1,700,M7,H1,_,_,_,
       400,M3,M3,0,M6,M6,_,_,400,M1,M2,0,M3,M3,_,400,_,_,_,_,_,_,_,_,M3,M3,0,M6,M6,_,_,400,_,M5,M5,M4,M3,_,_,_,_,_,_,_,_,
       M3,M3,M6,_,M1,M2,M3,_,_,_,_,_,_,_,M3,M3,M1,0,M4,300,M4,M4,_,400,M3,M1,_,_,_,_,_,
    };

    for (auto i : trivial) {
        if (i == LOW_SPEED || i == HIGH_SPEED || i == MIDDLE_SPEED) {
            sleep = i;//Sleep(i/2);
            continue;
        }
        if (i == 0) { sleep = 150; continue; }
        if (i == 700) { Sleep(180); continue; }
        if (i == _) {
            Sleep(300);
            continue;
        }
        voice = (volume << 16) + (i << 8) + 0x90;
        midiOutShortMsg(handle, voice);
        cout << voice << endl;
        Sleep(sleep);
    }
    midiOutClose(handle);
}
int main()

{
    Trivial();
    return 0;
}

2.2 海阔天空

#include <iostream>
#include <Windows.h>
#pragma comment(lib,"winmm.lib")
using namespace std;

/*
	作者:子任-逸仙
*/

enum Scale
{
    Rest = 0, C8 = 108, B7 = 107, A7s = 106, A7 = 105, G7s = 104, G7 = 103, F7s = 102, F7 = 101, E7 = 100,
    D7s = 99, D7 = 98, C7s = 97, C7 = 96, B6 = 95, A6s = 94, A6 = 93, G6s = 92, G6 = 91, F6s = 90, F6 = 89,
    E6 = 88, D6s = 87, D6 = 86, C6s = 85, C6 = 84, B5 = 83, A5s = 82, A5 = 81, G5s = 80, G5 = 79, F5s = 78,
    F5 = 77, E5 = 76, D5s = 75, D5 = 74, C5s = 73, C5 = 72, B4 = 71, A4s = 70, A4 = 69, G4s = 68, G4 = 67,
    F4s = 66, F4 = 65, E4 = 64, D4s = 63, D4 = 62, C4s = 61, C4 = 60, B3 = 59, A3s = 58, A3 = 57, G3s = 56,
    G3 = 55, F3s = 54, F3 = 53, E3 = 52, D3s = 51, D3 = 50, C3s = 49, C3 = 48, B2 = 47, A2s = 46, A2 = 45,
    G2s = 44, G2 = 43, F2s = 42, F2 = 41, E2 = 40, D2s = 39, D2 = 38, C2s = 37, C2 = 36, B1 = 35, A1s = 34,
    A1 = 33, G1s = 32, G1 = 31, F1s = 30, F1 = 29, E1 = 28, D1s = 27, D1 = 26, C1s = 25, C1 = 24, B0 = 23,
    A0s = 22, A0 = 21
};
enum Voice
{
    X1 = C2, X2 = D2, X3 = E2, X4 = F2, X5 = G2, X6 = A2, X7 = B2,
    L1 = C3, L2 = D3, L3 = E3, L4 = F3, L5 = G3, L6 = A3, L7 = B3,
    M1 = C4, M2 = D4, M3 = E4, M4 = F4, M5 = G4, M6 = A4, M7 = B4,
    H1 = C5, H2 = D5, H3 = E5, H4 = F5, H5 = G5, H6 = A5, H7 = B5,
    LOW_SPEED = 500, MIDDLE_SPEED = 400, HIGH_SPEED = 300,
    _ = 0XFF
};
void HKTK()
{
    HMIDIOUT handle;
    midiOutOpen(&handle, 0, 0, 0, CALLBACK_NULL);
    //midiOutShortMsg(handle, 34 << 8 | 0xC0);
    int volume = 0x7f;
    int voice = 0x0;
    int sleep = 400; int tmp = 0;
    int hktk[] =
    {
     X4,(H7 - 1),_,H6,_,_,_, H5,H4,H3,H2,_,(L7 - 1),M1,M4,(X7 - 1),_,_,_,_, (L7 - 1),M1,M4,(X7 - 1),_,_,_,_,(L7 - 1),M1,M5,M4,_,_,_,_,_,M4,_,M3,_,_,_,
     1000,M3,0,M2,700,300,M1,_,_,_,_,_,_,0,M3,M4,300,M5,0,M5,M5,300,_,M6,700,M5,_,_,
     0,M6,M7,300,H1,0,H1,300,H1,700,H1,H1,M7,0,M6,300,M5,700,0,M6,300,_,_,_,_,_,
     M6,M5,M5,_,_,M5,M3,_,M3,M4,M3,M2,M2,0,M3,M2,300,_,_,M3,0,M2,M2,_,300,M1,M1,0,M1,M1,300,_,_,M2,M1,M1,_,_,_,_,_,_,
     1000,M3,0,M2,700,300,M1,_,_,_,_,_,_,0,M3,M4,300,M5,0,M5,M5,300,_,M6,700,M5,_,_,
     0,M6,M7,300,H1,0,H1,300,H1,700,H1,H1,M7,0,M6,300,M5,700,0,M6,300,_,_,_,_,_,
     M6,M5,M5,_,_,M5,M3,_,M3,M4,M3,M2,M2,0,M3,M2,300,_,_,M3,0,M2,M2,_,300,M1,M1,0,M1,M1,300,_,_,M2,M1,M1,_,_,_,_,_,_,
     _,0,M6,M7,300,H1,0,H1,H1,_,300,H1,M7,M6,0,M5,300,M5,700,M5,_,0,M3,300,M2,700,M1,_,_,_,_,0,H1,H1,300,H1,0,H1,H2,_,300,H2,0,H1,300,H2,700,H3,_,_,_,H3,0,H2,300,H1,700,
     _,0,H1,H1,300,H1,0,H1,H2,300,_,_,_,0,M5,M5,300,H3,_,H2,_,H1,_,_,_,
     _,0,H1,H1,300,H1,0,H1,H2,300,_,0,H2,H2,H1,300,M7,700,H1,_,_,_,_,_,_,_,
     1000,M3,0,M2,700,300,M1,_,_,_,_,_,_,0,M3,M4,300,M5,0,M5,M5,300,_,M6,700,M5,_,_,
     0,M6,M7,300,H1,0,H1,300,H1,700,H1,H1,M7,0,M6,300,M5,700,0,M6,300,_,_,_,_,_,
     M6,M5,M5,_,_,M5,M3,_,M3,M4,M3,M2,M2,0,M3,M2,300,_,_,M3,0,M2,M2,_,300,M1,M1,0,M1,M1,300,_,_,M2,M1,M1,_,_,_,_,_,_,
     _,0,M6,M7,300,H1,0,H1,H1,_,300,H1,M7,M6,0,M5,300,M5,700,M5,_,0,M3,300,M2,700,M1,_,_,_,_,0,H1,H1,300,H1,0,H1,H2,_,300,H2,0,H1,300,H2,700,H3,_,_,_,H3,0,H2,300,H1,700,
     _,0,H1,H1,300,H1,0,H1,H2,300,_,_,_,0,M5,M5,300,H3,_,H2,_,H1,_,_,_,
     _,0,H1,H1,300,H1,0,H1,H2,300,_,0,H2,H2,H1,300,M7,700,H1,_,_,_,_,_,_,_,
     M6,M6,M7,M6,M7,H1,_,_,_,0,H1,H1,300,H2,H1,H2,H3,_,_,_,H3,H2,_,_,0,H2,H3,300,H1,_,_,_,_,_,
     _,0,M6,M7,300,H1,0,H1,H1,_,300,H1,M7,M6,0,M5,300,M5,700,M5,_,0,M3,300,M2,700,M1,_,_,_,_,0,H1,H1,300,H1,0,H1,H2,_,300,H2,0,H1,300,H2,700,H3,_,_,_,H3,0,H2,300,H1,700,
     _,0,H1,H1,300,H1,0,H1,H2,300,_,_,_,0,M5,M5,300,H3,_,H2,_,H1,_,_,_,
     _,0,H1,H1,300,H1,0,H1,H2,300,_,0,H2,H2,H1,300,M7,700,H1,_,_,_,_,_,_,_,
     _,0,H1,H1,300,H1,0,H1,H2,300,_,_,_,0,M5,M5,300,H3,_,H2,_,H1,_,_,_,
     _,0,H1,H1,300,H1,0,H1,H2,300,_,0,H2,H2,H1,300,M7,700,H1,_,_,_,_,_,_,_,
      _,0,M6,M7,300,H1,0,H1,H1,_,300,H1,M7,M6,0,M5,300,M5,700,M5,_,0,M3,300,M2,700,M1,_,_,_,_,0,H1,H1,300,H1,0,H1,H2,_,300,H2,0,H1,300,H2,700,H3,_,_,_,H3,0,H2,300,H1,700,
     _,0,H1,H1,300,H1,0,H1,H2,300,_,_,_,0,M5,M5,300,H3,_,H2,_,H1,_,_,_,
     _,0,H1,H1,300,H1,0,H1,H2,300,_,0,H2,H2,H1,300,M7,700,H1,_,_,_,_,_,_,_,
    };
    for (auto i : hktk) {
        if (i == LOW_SPEED || i == HIGH_SPEED || i == MIDDLE_SPEED) {
            sleep = i;//Sleep(i/2);
            continue;
        }
        if (i == 0) { sleep = 200; continue; }
        if (i == 700) { Sleep(200); continue; }
        if (i == _) {
            Sleep(400);
            continue;
        }
        if (i == 1000) { tmp = +5; continue; }
        // if (i == 900) volume += 100;
        voice = (volume << 16) + ((i + tmp) << 8) + 0x90;
        midiOutShortMsg(handle, voice);
        cout << voice << endl;
        Sleep(sleep);
    }
    midiOutClose(handle);
}
int main()
{
    HKTK();
    return 0;
}

2.3 起风了

#include <iostream>
#include <Windows.h>
#pragma comment(lib,"winmm.lib")
using namespace std;

/*
	作者:子任-逸仙
*/

enum Scale
{
	Rest = 0, C8 = 108, B7 = 107, A7s = 106, A7 = 105, G7s = 104, G7 = 103, F7s = 102, F7 = 101, E7 = 100,
	D7s = 99, D7 = 98, C7s = 97, C7 = 96, B6 = 95, A6s = 94, A6 = 93, G6s = 92, G6 = 91, F6s = 90, F6 = 89,
	E6 = 88, D6s = 87, D6 = 86, C6s = 85, C6 = 84, B5 = 83, A5s = 82, A5 = 81, G5s = 80, G5 = 79, F5s = 78,
	F5 = 77, E5 = 76, D5s = 75, D5 = 74, C5s = 73, C5 = 72, B4 = 71, A4s = 70, A4 = 69, G4s = 68, G4 = 67,
	F4s = 66, F4 = 65, E4 = 64, D4s = 63, D4 = 62, C4s = 61, C4 = 60, B3 = 59, A3s = 58, A3 = 57, G3s = 56,
	G3 = 55, F3s = 54, F3 = 53, E3 = 52, D3s = 51, D3 = 50, C3s = 49, C3 = 48, B2 = 47, A2s = 46, A2 = 45,
	G2s = 44, G2 = 43, F2s = 42, F2 = 41, E2 = 40, D2s = 39, D2 = 38, C2s = 37, C2 = 36, B1 = 35, A1s = 34,
	A1 = 33, G1s = 32, G1 = 31, F1s = 30, F1 = 29, E1 = 28, D1s = 27, D1 = 26, C1s = 25, C1 = 24, B0 = 23,
	A0s = 22, A0 = 21
};
enum Voice
{
	X1 = C2, X2 = D2, X3 = E2, X4 = F2, X5 = G2, X6 = A2, X7 = B2,
	L1 = C3, L2 = D3, L3 = E3, L4 = F3, L5 = G3, L6 = A3, L7 = B3,
	M1 = C4, M2 = D4, M3 = E4, M4 = F4, M5 = G4, M6 = A4, M7 = B4,
	H1 = C5, H2 = D5, H3 = E5, H4 = F5, H5 = G5, H6 = A5, H7 = B5,
	LOW_SPEED = 500, MIDDLE_SPEED = 400, HIGH_SPEED = 300,
	_ = 0XFF
};

void Wind()
{
	HMIDIOUT handle;
	midiOutOpen(&handle, 0, 0, 0, CALLBACK_NULL);
	// midiOutShortMsg(handle, 2 << 8 | 0xC0);
	int volume = 0x7f;
	int voice = 0x0;
	int sleep = 350;
	int wind[] =
	{
	 400,0,L7,M1,M2,M3,300,L3,0,M5,M3,300,L2,L5,2,_,0,L7,M1,M2,M3,300,L2,0,M5,M3,M2,M3,M1,M2,L7,M1,300,L5,0,L7,M1,M2,M3,300,L3,0,M5,M3,300,L2,L5,2,_,0,L7,M1,M2,M3,300,L2,0,M5,M3,M2,M3,M1,M2,L7,M1,300,L5,
	 0,L7,M1,M2,M3,300,L3,0,M5,M3,300,L2,L5,2,_,0,L7,M1,M2,M3,300,L2,0,M5,M3,M2,M3,M1,M2,L7,M1,300,L5,0,L7,M1,M2,M3,300,L3,0,M5,M3,300,L2,L5,2,_,
	 0,M6,M3,M2,L6,M3,L6,M2,M3,L6,_,_,_,
	 M2,700,0,M1,300,M2,700,0,M1,300,M2,M3,M5,0,M3,700,300,M2,700,0,M1,300,M2,700,0,M1,M2,M3,M2,M1,300,L5,_,
	 M2,700,0,M1,300,M2,700,0,M1,300,M2,M3,M5,0,M3,700,300,M2,700,0,M3,300,M2,0,M1,700,300,M2,_,_,_,
	 M2,700,0,M1,300,M2,700,0,M1,300,M2,M3,M5,0,M3,700,300,M2,700,0,M3,300,M2,0,M1,700,300,L6,_,
	 0,M3,M2,M1,M2,300,M1,_,0,M3,M2,M1,M2,300,M1,700,0,L5,M3,M2,M1,M2,300,M1,_,_,_,
	 M1,M2,M3,M1,M6,0,M5,M6,300,_,700,0,M1,300,M7,0,M6,M7,300,_,_,M7,0,M6,M7,300,_,M3,0,H1,H2,H1,M7,300,M6,M5,M6,0,M5,M6,_,M5,M6,M5,300,M6,0,M5,M2,300,_,0,M5,700,300,M3,_,_,_,
	 M1,M2,M3,M1,M6,0,M5,M6,300,_,700,0,M1,300,M7,0,M6,M7,300,_,_,M7,0,M6,M7,300,_,M3,0,H1,H2,H1,M7,300,M6,M5,M6,0,H3,H3,300,_,M5,M6,0,H3,H3,300,_,0,M5,700,300,M6,_,_,_,_,_,
	 H1,H2,H3,0,H6,H5,300,_,0,H6,H5,300,_,0,H6,H5,300,_,0,H2,H3,300,H3,0,H6,H5,300,_,0,H6,H5,300,_,0,H6,H5,300,_,0,H2,H3,300,H2,0,H1,M6,300,_,0,H1,H1,300,H2,0,H1,300,M6,700,0,_,300,H1,700,H3,_,0,H3,H4,H3,H2,H3,300,H2,700,
	 H1,H2,H3,0,H6,H5,_,H6,H5,_,H6,H5,300,_,H3,H3,0,H6,H5,_,H6,H5,_,H6,H5,700,300,H3,700,H2,0,H1,M6,700,300,
	 H3,700,H2,0,H1,300,M6,700,H1,H1,_,_,_,_,_,
	 0,M6,300,H3,700,H2,0,H1,M6,700,300,H3,H2,700,300,0,H1,M6,300,700,H1,H1,_,_,
	 0,L7,M1,M2,M3,300,L3,0,M5,M3,300,L2,L5,2,_,0,L7,M1,M2,M3,300,L2,0,M5,M3,M2,M3,M1,M2,L7,M1,300,L5,0,L7,M1,M2,M3,300,L3,0,M5,M3,300,L2,L5,2,_,
	 0,M6,M3,M2,L6,M3,L6,M2,M3,L6,_,_,_,
	 M2,700,0,M1,300,M2,700,0,M1,300,M2,M3,M5,0,M3,700,300,M2,700,0,M1,300,M2,700,0,M1,M2,M3,M2,M1,300,L5,_,
	 M2,700,0,M1,300,M2,700,0,M1,300,M2,M3,M5,0,M3,700,300,M2,700,0,M3,300,M2,0,M1,700,300,M2,_,_,_,
	 M2,700,0,M1,300,M2,700,0,M1,300,M2,M3,M5,0,M3,700,300,M2,700,0,M3,300,M2,0,M1,700,300,L6,_,
	 0,M3,M2,M1,M2,300,M1,_,0,M3,M2,M1,M2,300,M1,700,0,L5,M3,M2,M1,M2,300,M1,_,_,_,
	 M1,M2,M3,M1,M6,0,M5,M6,300,_,700,0,M1,300,M7,0,M6,M7,300,_,_,M7,0,M6,M7,300,_,M3,0,H1,H2,H1,M7,300,M6,M5,M6,0,M5,M6,_,M5,M6,M5,300,M6,0,M5,M2,300,_,0,M5,700,300,M3,_,_,_,
	 M1,M2,M3,M1,M6,0,M5,M6,300,_,700,0,M1,300,M7,0,M6,M7,300,_,_,M7,0,M6,M7,300,_,M3,0,H1,H2,H1,M7,300,M6,M5,M6,0,H3,H3,300,_,M5,M6,0,H3,H3,300,_,0,M5,700,300,M6,_,_,_,_,_,
	 H1,H2,H3,0,H6,H5,300,_,0,H6,H5,300,_,0,H6,H5,300,_,0,H2,H3,300,H3,0,H6,H5,300,_,0,H6,H5,300,_,0,H6,H5,300,_,0,H2,H3,300,H2,0,H1,M6,300,_,0,H1,H1,300,H2,0,H1,300,M6,700,0,_,300,H1,700,H3,_,0,H3,H4,H3,H2,H3,300,H2,700,
	 H1,H2,H3,0,H6,H5,_,H6,H5,_,H6,H5,300,_,H3,H3,0,H6,H5,_,H6,H5,_,H6,H5,700,300,H3,700,H2,0,H1,M6,700,300,
	 H3,700,H2,0,H1,300,M6,700,H1,H1,_,_,_,_,_,
	 H1,H2,H3,0,H6,H5,300,_,0,H6,H5,300,_,0,H6,H5,300,_,0,H2,H3,300,H3,0,H6,H5,300,_,0,H6,H5,300,_,0,H6,H5,300,_,0,H2,H3,300,H2,0,H1,M6,300,_,0,H1,H1,300,H2,0,H1,300,M6,700,0,_,300,H1,700,H3,_,0,H3,H4,H3,H2,H3,300,H2,700,
	 H1,H2,H3,0,H6,H5,_,H6,H5,_,H6,H5,300,_,H3,H3,0,H6,H5,_,H6,H5,_,H6,H5,700,300,H3,700,H2,0,H1,M6,700,300,
	 H3,700,H2,0,H1,300,M6,700,H1,H1,_,_,_,_,_,
	 H1,H2,H3,0,H6,H5,300,_,0,H6,H5,300,_,0,H6,H5,300,_,0,H2,H3,300,H3,0,H6,H5,300,_,0,H6,H5,300,_,0,H6,H5,300,_,0,H2,H3,300,H2,0,H1,M6,300,_,0,H1,H1,300,H2,0,H1,300,M6,700,0,_,300,H1,700,H3,_,0,H3,H4,H3,H2,H3,300,H2,700,
	 H1,H2,H3,0,H6,H5,_,H6,H5,_,H6,H5,300,_,H3,H3,0,H6,H5,_,H6,H5,_,H6,H5,700,300,H3,700,H2,0,H1,M6,700,300,
	 H3,700,H2,0,H1,300,M6,700,H1,H1,_,_,_,_,_,
	 0,M6,300,H3,700,H2,0,H1,M6,700,300,H3,H2,700,300,0,H1,M6,300,700,H1,H1,_,_,_,_,_,_,_,
	};
	for (auto i : wind) {
		if (i == 0) { sleep = 175; continue; }
		if (i == 700) { Sleep(175); continue; }
		if (i == 300) { sleep = 350; continue; }
		if (i == _) {
			Sleep(350);
			continue;
		}
		// if (i == 900) volume += 100;
		voice = (volume << 16) + ((i) << 8) + 0x90;
		midiOutShortMsg(handle, voice);
		cout << voice << endl;
		Sleep(sleep);// midiOutShortMsg(handle, 0x7BB0);
	}
	midiOutClose(handle);
}
int main()
{
	Wind();
	return 0;
}

2.4 光阴的故事

#include <iostream>
#include <Windows.h>
#pragma comment(lib,"winmm.lib")
using namespace std;

/*
	作者:子任-逸仙
*/

enum Scale
{
    Rest = 0, C8 = 108, B7 = 107, A7s = 106, A7 = 105, G7s = 104, G7 = 103, F7s = 102, F7 = 101, E7 = 100,
    D7s = 99, D7 = 98, C7s = 97, C7 = 96, B6 = 95, A6s = 94, A6 = 93, G6s = 92, G6 = 91, F6s = 90, F6 = 89,
    E6 = 88, D6s = 87, D6 = 86, C6s = 85, C6 = 84, B5 = 83, A5s = 82, A5 = 81, G5s = 80, G5 = 79, F5s = 78,
    F5 = 77, E5 = 76, D5s = 75, D5 = 74, C5s = 73, C5 = 72, B4 = 71, A4s = 70, A4 = 69, G4s = 68, G4 = 67,
    F4s = 66, F4 = 65, E4 = 64, D4s = 63, D4 = 62, C4s = 61, C4 = 60, B3 = 59, A3s = 58, A3 = 57, G3s = 56,
    G3 = 55, F3s = 54, F3 = 53, E3 = 52, D3s = 51, D3 = 50, C3s = 49, C3 = 48, B2 = 47, A2s = 46, A2 = 45,
    G2s = 44, G2 = 43, F2s = 42, F2 = 41, E2 = 40, D2s = 39, D2 = 38, C2s = 37, C2 = 36, B1 = 35, A1s = 34,
    A1 = 33, G1s = 32, G1 = 31, F1s = 30, F1 = 29, E1 = 28, D1s = 27, D1 = 26, C1s = 25, C1 = 24, B0 = 23,
    A0s = 22, A0 = 21
};

enum Voice
{
    X1 = C2, X2 = D2, X3 = E2, X4 = F2, X5 = G2, X6 = A2, X7 = B2,
    L1 = C3, L2 = D3, L3 = E3, L4 = F3, L5 = G3, L6 = A3, L7 = B3,
    M1 = C4, M2 = D4, M3 = E4, M4 = F4, M5 = G4, M6 = A4, M7 = B4,
    H1 = C5, H2 = D5, H3 = E5, H4 = F5, H5 = G5, H6 = A5, H7 = B5,
    Y1 = C6, Y2 = D6, Y3 = E6, Y4 = F6, Y5 = G6, Y6 = A6, Y7 = B6,
    _ = 0XFF,
};

void GY()
{
    HMIDIOUT handle;
    midiOutOpen(&handle, 0, 0, 0, CALLBACK_NULL);
    //midiOutShortMsg(handle, 40 << 8 | 0xC0);
    int volume = 0x7f;
    int voice = 0x0;
    int sleep = 300; int tmp = 7;
    int gy[] =
    { H1,H1,H1,H1,M7,M6,M5,M5,M5,M5,M4,M3,M4,M4,M4,M6,M5,M4,M3,_,_,M3,_,_,
      M5,M5,M5,M6,_,M5,M3,0,M3,M2,300,M3,_,0,M1,M3,300,H1,H1,M6,H1,_,0,M6,M5,300,M5,_,_,_,_,_,
      H1,H1,M6,H1,_,M6,M5,M5,0,M6,M5,300,M5,M1,M3,M5,M5,M6,M5,_,M3,M2,_,_,_,_,_,
      M5,M5,M5,M6,_,M5,M3,0,M3,M2,300,M3,_,0,M1,M3,300,H1,H1,M6,H1,_,0,M6,M5,300,M5,_,_,_,_,_,
      H1,H1,M6,H1,_,M6,M5,M5,M6,M5,M1,M3,H1,H1,H1,M6,M7,H1,H2,_,_,_,_,_,
      H2,H2,M5,H3,H2,H2,H1,H1,M6,H2,H1,H1,M5,M5,M3,M5,_,M6,M5,_,_,_,_,_,
      H2,H2,M5,H3,H2,H2,H1,H1,M6,H2,H1,H1,M5,M6,M5,H2,_,H3,H1,_,_,_,_,_,
      H1,H1,H1,M7,M6,M5,M5,M5,M5,M5,M4,M3,M4,M4,M4,M6,M5,M4,M3,_,_,M3,_,_,
      H1,H1,H1,H1,M7,M6,M5,M5,M5,M5,M4,M3,M4,M4,M4,M6,M5,M4,M3,_,_,M3,_,_,
      M5,M5,M5,M6,_,M5,M3,0,M3,M2,300,M3,_,0,M1,M3,300,H1,H1,M6,H1,_,0,M6,M5,300,M5,_,_,_,_,_,
      H1,H1,M6,H1,_,M6,M5,M5,0,M6,M5,300,M5,M1,M3,M5,M5,M6,M5,_,M3,M2,_,_,_,_,_,
      M5,M5,M5,M6,_,M5,M3,0,M3,M2,300,M3,_,0,M1,M3,300,H1,H1,M6,H1,_,0,M6,M5,300,M5,_,_,_,_,_,
      H1,H1,M6,H1,_,M6,M5,M5,M6,M5,M1,M3,H1,H1,H1,M6,M7,H1,H2,_,_,_,_,_,
      H2,H2,M5,H3,H2,H2,H1,H1,M6,H2,H1,H1,M5,M5,M3,M5,_,M6,M5,_,_,_,_,_,
      H2,H2,M5,H3,H2,H2,H1,H1,M6,H2,H1,H1,M5,M6,M5,H2,_,H3,H1,_,_,_,_,_,
      M5,M5,M5,M6,_,M5,M3,M3,M2,M3,M1,M3,H1,H1,M6,H1,_,M6,M5,_,_,_,_,_,
      H1,H1,M6,H1,_,M6,M5,M6,M5,M5,M1,M3,M5,M5,M6,M5,_,M3,M2,_,_,_,_,_,
      M5,M5,M5,M6,_,M5,M3,M3,M2,M3,M1,M3,H1,H1,M6,H1,_,M6,M5,_,_,_,_,_,
      H1,H1,M6,H1,_,M6,M5,M5,M6,M5,M1,M3,H1,H1,H1,M6,M7,H1,H2,_,_,_,_,_,
      H1,H1,H1,H1,M7,M6,M5,M5,M5,M5,M4,M3,M4,M4,M4,M6,M5,M4,M3,_,_,M3,_,_,
      M5,M5,M5,M6,_,M5,M3,0,M3,M2,300,M3,_,0,M1,M3,300,H1,H1,M6,H1,_,0,M6,M5,300,M5,_,_,_,_,_,
      H1,H1,M6,H1,_,M6,M5,M5,0,M6,M5,300,M5,M1,M3,M5,M5,M6,M5,_,M3,M2,_,_,_,_,_,
      M5,M5,M5,M6,_,M5,M3,0,M3,M2,300,M3,_,0,M1,M3,300,H1,H1,M6,H1,_,0,M6,M5,300,M5,_,_,_,_,_,
      H1,H1,M6,H1,_,M6,M5,M5,M6,M5,M1,M3,H1,H1,H1,M6,M7,H1,H2,_,_,_,_,_,
      H2,H2,M5,H3,H2,H2,H1,H1,M6,H2,H1,H1,M5,M5,M3,M5,_,M6,M5,_,_,_,_,_,
      H2,H2,M5,H3,H2,H2,H1,H1,M6,H2,H1,H1,M5,M6,M5,H2,_,H3,H1,_,_,_,_,_,
      M5,M5,M5,M6,_,M5,M3,M3,M2,M3,M1,M3,H1,H1,M6,H1,_,M6,M5,_,_,_,_,_,
      H1,H1,M6,H1,_,M6,M5,M6,M5,M5,M1,M3,M5,M5,M6,M5,_,M3,M2,_,_,_,_,_,
      M5,M5,M5,M6,_,M5,M3,M3,M2,M3,M1,M3,H1,H1,M6,H1,_,M6,M5,_,_,_,_,_,
      H1,H1,M6,H1,_,M6,M5,M5,M6,M5,M1,M3,H1,H1,H1,M6,M7,H1,H2,_,_,_,_,_,
      H1,H1,H1,H1,M7,M6,M5,M5,M5,M5,M4,M3,M4,M4,M4,M6,M5,M4,M3,_,_,M3,_,_,
    };
    for (auto i : gy) {
        if (i == 0) { sleep = 150; continue; }
        if (i == 700) { Sleep(150); continue; }
        if (i == _) {
            Sleep(300);
            continue;
        }
        if (i == 300) { sleep = 300; continue; }
        voice = (volume << 16) + ((i + tmp) << 8) + 0x90;
        midiOutShortMsg(handle, voice);
        cout << voice << endl;
        Sleep(sleep);//midiOutShortMsg(handle, 0x7BB0);

    }
    midiOutClose(handle);
}

int main()
{
    GY();
    return 0;
}

2.5 第一次爱的人

#include <iostream>
#include <Windows.h>
#pragma comment(lib,"winmm.lib")
#include <thread>
#define PLAY(melody, channel) for (unit i : melody) { play(handle, i, channel);} 
using namespace std;

/*
	作者:无心凌云
*/

enum Volume {

    LV = 0x5f, MV = 0x6f, HV = 0x7f

};
enum Scale
{

    Rest = 0, C8 = 108, B7 = 107, A7s = 106, A7 = 105, G7s = 104, G7 = 103, F7s = 102, F7 = 101, E7 = 100,
    D7s = 99, D7 = 98, C7s = 97, C7 = 96, B6 = 95, A6s = 94, A6 = 93, G6s = 92, G6 = 91, F6s = 90, F6 = 89,
    E6 = 88, D6s = 87, D6 = 86, C6s = 85, C6 = 84, B5 = 83, A5s = 82, A5 = 81, G5s = 80, G5 = 79, F5s = 78,
    F5 = 77, E5 = 76, D5s = 75, D5 = 74, C5s = 73, C5 = 72, B4 = 71, A4s = 70, A4 = 69, G4s = 68, G4 = 67,
    F4s = 66, F4 = 65, E4 = 64, D4s = 63, D4 = 62, C4s = 61, C4 = 60, B3 = 59, A3s = 58, A3 = 57, G3s = 56,
    G3 = 55, F3s = 54, F3 = 53, E3 = 52, D3s = 51, D3 = 50, C3s = 49, C3 = 48, B2 = 47, A2s = 46, A2 = 45,
    G2s = 44, G2 = 43, F2s = 42, F2 = 41, E2 = 40, D2s = 39, D2 = 38, C2s = 37, C2 = 36, B1 = 35, A1s = 34,
    A1 = 33, G1s = 32, G1 = 31, F1s = 30, F1 = 29, E1 = 28, D1s = 27, D1 = 26, C1s = 25, C1 = 24, B0 = 23,
    A0s = 22, A0 = 21
};
enum MajorD
{
    X1 = D2, X2 = E2, X3 = F2s, X4 = G2, X5 = A2, X6 = B2, X7 = C3s,
    L1 = D3, L2 = E3, L3 = F3s, L4 = G3, L5 = A3, L6 = B3, L7 = C4s,
    M1 = D4, M2 = E4, M3 = F4s, M4 = G4, M5 = A4, M6 = B4, M7 = C5s,
    H1 = D5, H2 = E5, H3 = F5s, H4 = G5, H5 = A5, H6 = B5, H7 = C6s,
    _ = 0XFF
};
enum MajorE
{

    EX1 = E2, EX2 = F2s, EX3 = G2s, EX4 = A2, EX5 = B2, EX6 = C3s, EX7 = D3s,
    EL1 = E3, EL2 = F3s, EL3 = G3s, EL4 = A3, EL5 = B3, EL6 = C4s, EL7 = D4s,
    EM1 = E4, EM2 = F4s, EM3 = G4s, EM4 = A4, EM5 = B4, EM6 = C5s, EM7 = D5s,
    EH1 = E5, EH2 = F5s, EH3 = G5s, EH4 = A5, EH5 = B5, EH6 = C5s, EH7 = D6s,
};
enum Beat

{
    beat = 2500, bd2 = beat / 2, bd4 = beat / 4, bd8 = beat / 8, bd16 = beat / 16, bd32 = beat / 32
};
struct unit {
    int pitch;
    int time = bd8;
    string lyrics = "";
    int volume = MV;
};
void play(HMIDIOUT handle, unit u, int channel) {
    int sleep = u.time;
    int pitch = u.pitch;
    string lyrics = u.lyrics;
    int volume = u.volume;
    if (pitch != _) {
        int a = volume;
        int b = pitch;
        int voice = (a << 16) + ((b) << 8) + 0x90 + channel;
        midiOutShortMsg(handle, voice);
    }
    if (lyrics != "") {
        cout << lyrics;
    }
    if (sleep != 0) {
        Sleep(sleep);
    }
}

unit main_melody1[] = {

    //第一段

    { M1,0,"\n第 " }, { X6,bd8 }, { L3,bd8 }, { L6,bd8 }, { L3,bd8 },

    { M2,bd8 }, { L4,bd8 }, { M1,bd8 }, { L3,bd8 }, { L7,0,"一 " }, { X5,bd8 }, { L2,bd8 }, { L5,bd8 }, { L2,bd8 },

    { M1,bd8 }, { L3,bd8 }, { L7,bd8 }, { L2,bd8 }, { L6,0,"次 " }, { X4,bd8 }, { L1,bd8 }, { L4,bd8 }, { L1,bd8 },

    { L6 }, { L2 }, { L4 }, { L2 }, { L7,0,"爱 " }, { X3 }, { X7 }, { L6,0,"的 " }, { L2 }, { L5 + 1,0, "人\n\n" }, { L3,bd8 + bd4 * 2 },



    { M1,0 }, { X6,bd8 }, { L3,bd8 }, { L6,bd8 }, { L3,bd8 },

    { M2,bd8 }, { H4,0,"",HV }, { L4,bd8 }, { H3,0,"",HV }, { M1,bd8 }, { H2,0,"",HV }, { L3,bd8 }, { H2,0,"",HV }, { L7,0 }, { X5,bd8 }, { L2,bd8 }, { L5,bd8 }, { L2,bd8 },

    { M1,bd8 }, { L3,bd8 }, { L7,bd8 }, { L2,bd8 }, { L6,0 }, { X4,bd8 }, { L1,bd8 }, { L4,bd8 }, { H2,0,"",HV }, { L1,bd8 },

    { H1,0,"",HV }, { L6 }, { L2 }, { L4 }, { L2 }, { L7,0 }, { X3 }, { X7 }, { L6,0 }, { L2 }, { L5 + 1,0 }, { L3,bd8 + bd8 }, { H4,bd8,"灰",HV }, { H3,bd8,"色",HV }, { H1,bd8,"的",HV },



    { M6,0,"天 ",HV }, { M1,0 }, { X6,bd8 }, { L3,bd8 }, { L6,bd8 }, { L3,bd8 },

    { M2,bd8 }, { H4,0,"你",HV }, { L4,bd8 }, { H3,0,"的",HV }, { M1,bd8 }, { H2,0,"脸\n",HV }, { L3,bd8 }, { L7,0 }, { X5,bd8 }, { L2,bd8 }, { L5,bd8 }, { L2,bd8 },

    { M1,bd8 }, { H3,0,"爱",HV }, { L3,bd8 }, { H2,0,"过",HV }, { L7,bd8 }, { M7,0,"也",HV }, { L2,bd8 }, { H1,0,"哭",HV }, { L6,0 }, { X4,bd8 }, { M6,0,"过",HV }, { L1,bd8 }, { H1,0,"笑",HV }, { L4,bd8 }, { M6,0,"过",HV }, { L1,bd8 },

    { H1,0,"痛",HV }, { L6 }, { M6,0,"过",HV }, { L2 }, { H1,0,"之",HV }, { L4 }, { M6,0,"后",HV }, { L2 }, { H2,0,"只",HV }, { L7,0 }, { X3 }, { H2,0,"剩",HV }, { X7 }, { H1,0,"再",HV }, { L6,0 }, { L2 }, { M7,0,"见\n",HV }, { L5 + 1,0 }, { L3,bd8 + bd8 }, { H4,bd8,"我",HV }, { H3,bd8,"的",HV }, { H1,bd8,"眼",HV },



    { M6,0,"泪 ",HV }, { M1,0 }, { X6 }, { L3 }, { L6 }, { L3 },

    { M2 }, { H4,0,"湿",HV }, { L4 }, { H3,0,"了",HV }, { M1 }, { H2,0,"脸\n",HV }, { L3 }, { H2,0,"",HV }, { L7,0 }, { X5 }, { L2 }, { L5 }, { L2 },

    { M1 }, { H3,0,"失",HV }, { L3 }, { H2,0,"去",HV }, { L7 }, { M7,0,"第",HV }, { L2 }, { H1,0,"一",HV }, { L6,0 }, { X4 }, { M6,0,"次",HV }, { L1 }, { H1,0,"爱",HV }, { L4 }, { M6,0,"的",HV }, { L1 },

    { H1,0,"人",HV }, { L6 }, { M6,0,"竟",HV }, { L2 }, { H1,0,"然",HV }, { L4 }, { M6,0,"是",HV }, { L2 }, { H2,0,"这",HV }, { L7,0 }, { X3 }, { H2,0,"种",HV }, { X7 }, { H1,0,"感",HV }, { L6,0 }, { L2 }, { H3,0,"觉\n",HV }, { L5 + 1,0 }, { L3,bd8 },



    { _,bd8 }, { H3,bd8,"总",HV }, { H3,bd8,"以",HV }, { H3,0,"为 ",HV }, { L5 + 1,0 }, { L3 }, { L1 }, { H3,0,"爱",HV }, { L3 }, { H3,0,"是",HV }, { L5 + 1,bd8 },{H1,bd8,"全",HV},

    { H2,0,"部",HV }, { X5 }, { H3,0,"的",HV }, { X7 }, { H4,0,"心",HV }, { L2,bd8 }, { H3,bd8,"跳\n",HV }, { X6,bd8 }, { H1,0,"失",HV }, { L1 }, { L3,0 }, { H1,bd8,"去",HV }, { M6,bd8,"爱",HV },

    { M7,0,"我",HV }, { L3 }, { H1,0,"们",HV }, { L5 }, { H2,0,"就",HV }, { L7,bd8 }, { H3,bd8,"要",HV }, { H1,0," ",HV }, { L4 }, { L6 }, { H2,0,"就",HV }, { M1 }, { H1,bd8,"要\n",HV },

    { X6 }, { M6,0,"一",HV }, { L1 }, { M6,0,"点",HV }, { L3 }, { M6,bd8,"点",HV }, { H3,0,"慢",HV }, { L7,0 }, { L5,0 }, { L3 }, { H4,0,"慢",HV }, { L7,0 }, { L5,0 }, { L3 }, { H5,0,"地",HV }, { L7,0 }, { L5,0 }, { L3 }, { H3,0,"死",HV }, { L7,0 }, { L5,0 }, { L3 },



    { H2,0,"掉\n",HV }, { L7,0 }, { L5,0 }, { L2 }, { L7,0 }, { L5,0 }, { L2 }, { L7,0 }, { L5,0 }, { L2 }, { M5,0,"当",HV }, { L7,0 }, { L5,0 }, { L2 }, { H5,0,"我 ",HV }, { M3,0 }, { M1,0 }, { L5 ,bd4 + bd8}, /*{_,bd16},/*{ H3,bd16,"",HV },{ M3,0 }, { M1,0 }, { L5,bd16 + bd8 },*/ { H3,0,"失",HV }, { M3,0 }, { M1,0 }, { L5 },

    { H4,0,"去",HV }, { L1 }, { H6,0,"你",HV }, { X5,bd16 }, { L1,bd16 }, { H5,0,"那",HV }, { X7 }, { H4,0,"一",HV }, { X5,bd16 }, { H3,0,"秒 ",HV }, { X7,bd16 }, /*{ H3,0," ",HV },*/ { X6,bd8 + bd16 }, { X6,bd8 }, { _,bd16 }, { H3,0,"心",HV }, { X6 },

    { H3,bd8,"突",HV }, { H4,0,"然",HV }, { X6 }, { H3,0,"就",HV }, { X5 }, { H2,bd16,"变",HV }, { H1,bd16,"老\n",HV }, /*{ H1,0,"\n",HV },*/ { X4,bd8 + bd16 }, { X4,bd16 }, { _,bd8 }, { M6,0,"The ",HV }, { X4 },

    { H1,bd8,"day ",HV }, { H2,0,"you ",HV }, { X4 }, { H3,0,"went ",HV }, { X5 }, { H4,bd16,"",HV }, { H3,bd16,"away\n",HV }, /*{ H3,0,"",HV },*/ { L1,bd8 + bd16 }, { L1,bd16 }, { _,bd8 }, { L1,bd4 },



    { H5,0,"喧",HV }, { X5,bd16 }, { X6,bd16 }, { H5,0,"闹",HV }, { L1,bd16 }, { L2,bd16 }, { H3,0,"的",HV }, { L1,bd16 }, { X6,bd16 }, { H5,0,"街 ",HV }, { L1,bd8 + bd16 }, { L1,bd16 }, { _,bd8 }, { H5,0,"没",HV }, { L1 },

    { H5,bd8,"发",HV }, { H6,0,"现",HV }, { X5,bd16 }, { L1,bd16 }, { H5,0,"我",HV }, { X7 }, { H4,0,"的",HV }, { X5,bd16 }, { H3,0,"泪\n",HV }, { X7,bd16 }, /*{ H3,0,"",HV },*/ { X6,bd8 + bd16 }, { X6,bd16 }, { _,bd8 }, { H3,0,"被",HV }, { X6 },

    { H3,bd8,"遗",HV }, { H4,0,"忘",HV }, { X6 }, { H3,0,"在",HV }, { X5 }, { H2,bd16,"街",HV }, { H1,bd16,"角\n",HV }, /*{ H1,0,"\n",HV },*/ { X4,bd8 + bd16 }, { X4,bd16 }, { _,bd8 }, { M6,0,"The ",HV }, { X4 },

    { H1,bd8,"day ",HV }, { H2,0,"you ",HV }, { X4 }, { H3,0,"went ",HV }, { X5 }, { H4,bd8,"away\n\n",HV }, { H3,0,"",HV }, { X6,bd16 }, { H2,bd16 }, { H1,bd4 + bd8 },



    { M1,0,"music" }, { X6 }, { L3 }, { L6 }, { L3 },

    { M2 }, { L4 }, { M1 }, { H1,0,".",HV }, { L3 }, { H2,0,".",HV }, { L7,0 }, { X5 }, { L2 }, { L5 }, { L2 },

    { M1 }, { L3 }, { H3,0,".",HV }, { L7 }, { H2,0,".",HV }, { L2,bd16 }, { H2,bd16,".",HV }, { L6,0,"." }, { X4 }, { H1,0,".",HV }, { L1 }, { L4 }, { L1 },

    { M6,0,".",HV }, { L6 }, { M7,0,".",HV }, { L2 }, { H1,0,".",HV }, { L4 }, { H2,0,".",HV }, { L2 }, { H2,0,".",HV }, { L7,0 }, { X3 }, { X7 }, { L6,0,"." }, { L2 }, { L5 + 1,0,"." }, { L3 },



};



unit main_melody2[] = {

    //第二段

    { _,bd8 }, { H4,bd8,"我",HV }, { H3,bd8,"看",HV },/*{L5,0},{L3,0},*/{ H1,bd8,"着",HV }, { M6,0,"你 ",HV }, { M1,0 }, { X6 }, { L3 }, { L6 }, { L3 },

    { M2 }, { H4,0,"走",HV }, { L4 }, { H3,0,"过",HV }, { M1 }, { H2,0,"街\n",HV }, { L3 }, { L7,0 }, { X5 }, { L2 }, { L5 }, { L2 },

    { M1 }, { H3,0,"还",HV }, { L3 }, { H2,0,"穿",HV }, { L7 }, { M7,0,"着",HV }, { L2 }, { H1,0,"去",HV }, { L6,0 }, { X4 }, { M6,0,"年",HV }, { L1 }, { H1,0,"夏",HV }, { L4 }, { M6,0,"天",HV }, { L1 },

    { H1,0,"我",HV }, { L6 }, { M6,0,"送",HV }, { L2 }, { H1,0,"你",HV }, { L4 }, { M6,0,"的",HV }, { L2 }, { H2,0,"那",HV }, { L7,0 }, { X3 }, { H2,0,"双",HV }, { X7 }, { H1,0,"球",HV }, { L6,0 }, { L2 }, { M7,0,"鞋\n",HV }, { L5 + 1,0 }, { L3,bd8 },



    { _,bd8 }, { H4,bd8,"银",HV }, { H3,bd8,"色",HV }, { L5 + 1,0 }, { L3,0 }, { H1,bd8,"手",HV }, { M6,0,"链 ",HV }, { M1,0 }, { X6 }, { L3 }, { L6 }, { L3 },

    { M2 }, { H4,0,"还",HV }, { L4 }, { H3,0,"耀",HV }, { M1 }, { H2,0,"眼\n",HV }, { L3 }, { H2,0,"",HV }, { L7,0 }, { X5 }, { L2 }, { L5 }, { L2 },

    { M1 }, { H3,0,"你",HV }, { L3 }, { H2,0,"的",HV }, { L7 }, { M7,0,"世",HV }, { L2 }, { H1,0,"界",HV }, { L6,0 }, { X4 }, { M6,0,"似",HV }, { L1 }, { H1,0,"乎",HV }, { L4 }, { M6,0,"一",HV }, { L1 },

    { H1,0,"点",HV }, { L6 }, { M6,0,"也",HV }, { L2 }, { H1,0,"没",HV }, { L4 }, { M6,0,"有",HV }, { L2 }, { H2,0,"因",HV }, { L7,0 }, { X3 }, { H2,0,"此",HV }, { X7 }, { H1,0,"改",HV }, { L6,0 }, { L2 }, { H3,0,"变\n",HV }, { L5 + 1,0 }, { L3,bd8 },



    { _,bd8 }, { H3,bd8,"总",HV }, { H3,bd8,"以",HV }, { H3,0,"为 ",HV }, { L5 + 1,0 }, { L3 }, { L1 }, { H3,0,"爱",HV }, { L3 }, { H3,0,"是",HV }, { L5 + 1,bd8 }, { H1,bd8,"全",HV },

    { H2,0,"部",HV }, { X5 }, { H3,0,"的",HV }, { X7 }, { H4,0,"心",HV }, { L2,bd8 }, { H3,bd8,"跳\n",HV }, { X6,bd8 }, { H1,0,"失",HV }, { L1 }, { L3,0 }, { H1,bd8,"去",HV }, { M6,bd8,"爱",HV },

    { M7,0,"我",HV }, { L3 }, { H1,0,"们",HV }, { L5 }, { H2,0,"就",HV }, { L7,bd8 }, { H3,bd8,"要",HV }, { H1,0," ",HV }, { L4 }, { L6 }, { H2,0,"就",HV }, { M1 }, { H1,bd8,"要\n",HV },

    { X6 }, { M6,0,"一",HV }, { L1 }, { M6,0,"点",HV }, { L3 }, { M6,bd8,"点",HV }, { H3,0,"慢",HV }, { L7,0 }, { L5,0 }, { L3 }, { H4,0,"慢",HV }, { L7,0 }, { L5,0 }, { L3 }, { H5,0,"地",HV }, { L7,0 }, { L5,0 }, { L3 }, { H3,0,"死",HV }, { L7,0 }, { L5,0 }, { L3 },



    { H2,0,"掉\n",HV }, { L7,0 }, { L5,0 }, { L2 }, { L7,0 }, { L5,0 }, { L2 }, { L7,0 }, { L5,0 }, { L2 }, { M5,0,"当",HV }, { L7,0 }, { L5,0 }, { L2 }, { H5,0,"我 ",HV }, { M3,0 }, { M1,0 }, { L5,bd4 + bd8 },/*{_,bd16},{H3,bd16,"",HV},{M3,0} ,{M1,0},{L5,bd16 + bd8}*/{ H3,0,"失",HV }, { M3,0 }, { M1,0 }, { L5 },

    { H4,0,"去",HV }, { L1 }, { H6,0,"你",HV }, { X5,bd16 }, { L1,bd16 }, { H5,0,"那",HV }, { X7 }, { H4,0,"一",HV }, { X5,bd16 }, { H3,0,"秒 ",HV }, { X7,bd16 },/*{H3,0,"",HV}*/{ X6,bd8 + bd16 }, { X6,bd8 }, { _,bd16 }, { H3,0,"心",HV }, { X6 },

    { H3,bd8,"突",HV }, { H4,0,"然",HV }, { X6 }, { H3,0,"就",HV }, { X5 }, { H2,bd16,"变",HV }, { H1,bd16,"老\n",HV },/*{H1,0,"",HV}*/{ X4,bd8 + bd16 }, { X4,bd16 }, { _,bd8 }, { M6,0,"The ",HV }, { X4 },

    { H1,bd8,"day ",HV }, { H2,0,"you ",HV }, { X4 }, { H3,0,"went ",HV }, { X5 }, { H4,bd16,"",HV }, { H3,bd16,"away\n",HV },/*{H3,0,"",HV},*/{ L1,bd8 + bd16 }, { L1,bd16 }, { _,bd8 }, { L1,bd8 },



    { _,bd8 }, { H5,0,"喧",HV }, { X5,bd16 }, { X6,bd16 }, { H5,0,"闹",HV }, { L1,bd16 }, { L2,bd16 }, { H3,0,"的",HV }, { L1,bd16 }, { X6,bd16 }, { H5,0,"街 ",HV }, { L1,bd8 + bd16 }, { L1,bd16 }, { _,bd8 }, { H5,0,"没",HV }, { L1 },

    { H5,bd8,"发",HV }, { H6,0,"现",HV }, { X5,bd16 }, { L1,bd16 }, { H5,0,"我",HV }, { X7 }, { H4,0,"的",HV }, { X5,bd16 }, { H3,0,"泪\n",HV }, { X7,bd16 },/*H3,0,"",HV}*/{ X6,bd8 + bd16 }, { X6,bd16 }, { _,bd8 }, { H3,0,"被",HV }, { X6 },

    { H3,bd8,"遗",HV }, { H4,0,"忘",HV }, { X6 }, { H3,0,"在",HV }, { X5 }, { H2,bd16,"街",HV }, { H1,bd16,"角\n",HV },/*{H1,0,"",HV},*/{ X4,bd8 + bd16 }, { X4,bd16 }, { _,bd8 }, { M6,0,"The ",HV }, { X4 },

    { H1,bd8,"day ",HV }, { H2,0,"you ",HV }, { X4 }, { H3,0,"went ",HV }, { X5 }, { H4,bd8,"away\n\n",HV }, { H3,0,"",HV }, { X6,bd16 }, { H2,bd16 }, { H1,bd4 }, { H3 },



    { H3,0,"music",HV }, { X6 }, { H2,0,".",HV }, { X6 }, { H2,0,".",HV }, { X5 }, { H1,bd8,".",HV }, { H2,0,".",HV }, { X4,bd16 }, { H1,bd16,"",HV }, { M6,bd16,".",HV }, { X4,bd16 }, { M6,bd8,".",HV }, { M6,0,".",HV }, { X4 },

    { M6,bd16,".",HV }, { X4,bd16 }, { M7,0,".",HV }, { L1,bd16 }, { L2,bd16 }, { H1,0,".",HV }, { L1 }, { H2,0,".",HV }, { X4 }, { M7,0,".",HV }, { X3,bd8 + bd16 }, { X3,bd16 }, { _,bd8 }, { X3 },

    { M1,0,"." }, { X6 }, { L3 }, { L6 }, { L3 },

    { M2 }, { L4 }, { M1 }, { H1,0,".",HV }, { L3 }, { H2,0,".",HV }, { L7,0,"." }, { X5 }, { L2 }, { L5 }, { L2 },



    { M1 }, { L3 }, { H3,0,".",HV }, { L7 }, { H2,0,".",HV }, { L2,bd16 }, { H2,bd16,".",HV }, { H2,0,".",HV }, { L6,0 ,"." }, { X4 }, { H1,0,".",HV }, { L1 }, { L4 }, { L1 },

};



unit main_melody3[] = {

    //第三段

    { L6 }, { L2 }, { L4 }, { L2 }, { H3,0,"Wo ",HV }, { L5,0 }, { L3,0 }, { L1 }, { H4,bd8,"",HV }, { H3,bd8,"Wo ",HV }, { H4,0,"",HV }, { L5,0 }, { L3,0 }, { L1 },

    { H3,0,"",HV }, { L5 + 1,0 }, { L3,0 }, { X7 }, { H3,bd8,"总",HV }, { H3,bd8,"以",HV }, { H3,0,"为 ",HV }, { L5 + 1,0 }, { L3,0 }, { X7 }, { L1 }, { H3,0,"爱",HV }, { L3 }, { H3,0,"是",HV }, { L5 + 1 }, { H1,bd8,"全",HV },

    { H2,0,"部",HV }, { X5 }, { H3,0,"的",HV }, { X7 }, { H4,0,"心",HV }, { L2 }, { H3,bd8,"跳\n",HV }, { X6 }, { H1,0,"失",HV }, { L1 }, { H1,0,"去",HV }, { L3 }, { M6,bd8,"爱",HV },



    { M7,0,"我",HV }, { L3 }, { H1,0,"们",HV }, { L5 }, { H2,0,"就",HV }, { L7 }, { H3,bd8,"要",HV }, { H1,0," ",HV }, { L4 }, { L6 }, { H2,0,"就",HV }, { M1 }, { H1,bd8,"要\n",HV },

    { X6 }, { M6,0,"一",HV }, { L1 }, { M6,0,"点",HV }, { L3 }, { M6,bd8,"点",HV }, { H3,0,"慢",HV }, { L7,0 }, { L5,0 }, { L3 }, { H4,0,"慢",HV }, { L7,0 }, { L5,0 }, { L3 }, { H5,0,"地",HV }, { L7,0 }, { L5,0 }, { L3 }, { H3,0,"死",HV }, { L7,0 }, { L5,0 }, { L3 },

    { H2,0,"掉\n",HV }, { L7,0 }, { L5,0 }, { L2 }, { L7,0 }, { L5,0 }, { L2 }, { L7,0 }, { L5,0 }, { L2 }, { M5,0,"当",HV }, { L7,0 }, { L5,0 }, { L2 }, { H5,0,"我 ",HV }, { M3,0 }, { M1,0 }, { L5,bd4 + bd8 },/*{H3,bd16,"",HV},{M3,0},{M1,0},{L5,bd16 + bd8},*/{ H3,0,"失",HV }, { M3,0 }, { M1,0 }, { L5 },

    { H4,0,"去",HV }, { L1 }, { H6,0,"你",HV }, { X5,bd16 }, { L1,bd16 }, { H5,0,"那",HV }, { X7 }, { H4,0,"一",HV }, { X5,bd16 }, { H3,0,"秒\n",HV }, { X7,bd16 },/*{H3,0,"",HV},*/{ X6,bd8 + bd16 }, { X6,bd16 }, { _,bd8 }, { H3,0,"心",HV }, { X6 },



    { H3,bd8,"突",HV }, { H4,0,"然",HV }, { X6 }, { H3,0,"就",HV }, { X5 }, { H2,bd16,"变",HV }, { H1,bd16,"老\n",HV },/*{H1,0,"",HV},*/{ X4,bd8 + bd16 }, { X4,bd16 }, { _,bd8 }, { M6,0,"The ",HV }, { X4 },

    { H1,bd8,"day ",HV }, { H2,0,"you ",HV }, { X4 }, { H3,0,"went ",HV }, { X5 }, { H4,bd16,"away\n",HV }, { H3,bd16,"",HV },/*{H3,0,"",HV},*/{ L1,bd8 + bd16 }, { L1,bd16 }, { _,bd8 }, { L1 },

    { _,bd8 }, { H5,0,"喧",HV }, { X5,bd16 }, { X6,bd16 }, { H5,0,"闹",HV }, { L1,bd16 }, { L2,bd16 }, { H3,0,"的",HV }, { L1,bd16 }, { X6,bd16 }, { H5,0,"街 ",HV }, { L1,bd8 + bd16 }, { L1,bd16 }, { _,bd8 }, { H5,0,"没",HV }, { L1 },

    { H5,bd8,"发",HV }, { H6,0,"现",HV }, { X5,bd16 }, { L1,bd16 }, { H5,0,"我",HV }, { X7 }, { H4,0,"的",HV }, { X5,bd16 }, { H3,0,"泪\n",HV }, { X7,bd16 },/*{H3,0,"",HV},*/{ X6,bd8 + bd16 }, { X6,bd16 }, { _,bd8 }, { H3,0,"被",HV }, { X6 },



    { H3,bd8,"遗",HV }, { H4,0,"忘",HV }, { X6 }, { H3,0,"在",HV }, { X5 }, { H2,bd16,"街",HV }, { H1,bd16,"角\n",HV },/*{H1,0,"",HV},*/{ X4,bd8 + bd16 }, { X4,bd16 }, { _,bd16 }, { M6,0,"The ",HV }, { X4 },

    { H1,bd8,"day ",HV }, { H2,0,"you ",HV }, { X4 }, { H3,0,"went ",HV }, { X5 }, { H4,bd8,"away\n",HV }, { H3,0,"",HV }, { X6,bd16 }, { H2,bd16,"",HV }, { H1,bd8 + bd4,"",HV },

    { _,bd8 }, { H5,0,"有",HV }, { X6 }, { H5,0,"一",HV }, { X5 }, { H3,bd8,"天",HV }, { H6,0,"也",HV }, { L1,bd8 }, { H5,bd16,"许",HV }, { L1,bd16 }, { H3,bd8,"我",HV }, { H6,0,"能",HV }, { L1 },

    { H5,bd8,"把",HV }, { H3,0,"自",HV }, { X5,bd16 }, { L1,bd16 }, { H6,0,"己",HV }, { X7 }, { H5,0,"治",HV }, { X5,bd16 }, { H3,0,"好\n",HV }, { X7,bd16 },/*{H3,0,"",HV},*/{ X6,bd8 + bd16 }, { X6,bd16 }, { _,bd8 }, { H3,0,"再",HV }, { X6 },



    { H3,bd8,"一",HV }, { H4,0,"次",HV }, { X6 }, { H3,0,"想",HV }, { X5 }, { H2,bd16,"起",HV }, { H1,bd16,"来 ",HV },/*{H1,0,"",HV},*/{ X4,bd8 + bd16 }, { X4,bd16 }, { _,bd8 }, { M6,0,"应",HV }, { X4 },

    { H1,bd8,"该",HV }, { H2,0,"要",HV }, { X4 }, { H3,0,"怎",HV }, { X5 }, { H4,bd16,"么",HV }, { H3,bd16,"笑\n",HV },/*{H3,0,"",HV},*/{ L1,bd8 + bd16 }, { L1,bd16 }, { _,bd8 }, { L1 },

    { _,bd8 }, { H5,0,"第",HV }, { X5,bd16 }, { X6,bd16 }, { H5,0,"一",HV }, { L1,bd16 }, { L2,bd16 }, { H3,0,"次",HV }, { L1,bd16 }, { X6,bd16 }, { H6,0,"爱",HV }, { L1 }, { H5,bd16,"的",HV }, { L1,bd16 }, { H3,bd8,"人",HV }, { H6,0,"他",HV }, { L1 },

    { H5,bd8,"的",HV }, { H3,0,"坏",HV }, { X5,bd16 }, { L1,bd16 }, { H6,0,"他",HV }, { X7 }, { H5,0,"的",HV }, { X5,bd16 }, { X7,bd16 }, { H3,0,"好\n",HV }, { X6,bd8 + bd16 }, { X6,bd16 }, { _,bd8 }, { H3,0,"却",HV }, { X6 },



    { H3,bd8,"像",HV }, { H4,0,"胸",HV }, { X6 }, { H3,0,"口",HV }, { X5 }, { H2,bd16,"刺",HV }, { H1,bd16,"青 ",HV },/*{H1,0,"",HV},*/{ X4,bd8 + bd16 }, { X4,bd16 }, { _,bd16 }, { M6,0,"是",HV }, { X4 },

    { H1,bd8,"永",HV }, { H2,0,"远",HV }, { X4 }, { H3,0,"的",HV }, { X5 }, { H4,bd16,"记",HV }, { H3,bd16,"号\n",HV },/*{H3,0,"",HV},*/{ X6,bd8 + bd16 }, { X6,bd16 }, { _,bd16 }, { H3,0,"跟",HV }, { X6 },

    { H3,bd8,"着",HV }, { H2,0,"我",HV }, { X6 }, { H2,0,"的",HV }, { X5 }, { H1,bd8,"呼",HV }, { H2,0,"吸 ",HV }, { X4,bd8 }, { H1,bd4 + bd16,"",HV },/*{M6,bd16,"",HV},*//*{X4,bd4},*/{ M6,0,"直",HV }, { X4 },

    { M6,bd16,"到",HV }, { X4,bd16 }, { M7,0,"停",HV }, { L1,bd16 }, { L2,bd16 }, { H1,0,"止",HV }, { L1 }, { H2,0,"心",HV }, { X4 }, { M7,0,"跳\n\n",HV }, { X3,bd8 + bd16 }, { X3,bd16 }, { _,bd8 }, { X3 },



    第四段

    { M1, 0 ,"music"}, { X6 }, { L3 }, { L6 }, { L3 },

    { M2 }, { L4 }, { M1 }, { L3 }, { L7,0 ,"." }, { X5 }, { L2 }, { L5 }, { L2 }, { M1 }, { L3 }, { L7 }, { L2 },

    { L6, 0 ,"." }, { X4 }, { L1 }, { L4 }, { EL1 }, { L6 }, { L2 }, { L4 }, { L2 },

    { L7, 0 ,"." }, { X3 }, { X7 }, { L6,0 , "." }, { L2 }, { L5 + 1,0 , "." }, { L3 }, { _,bd4 + bd4 },

};
void play_main(HMIDIOUT handle) {

    midiOutShortMsg(handle, 0 * 0x100 + 0xC0);
    PLAY(main_melody1, 0);
    system("cls");
    cout << "\n第 一 次 爱 的 人\n\n";
    PLAY(main_melody2, 0);
    system("cls");
    cout << "\n第 一 次 爱 的 人\n\n";
    PLAY(main_melody3, 0);
    cout << "end";

}

int main()
{
    HMIDIOUT handle;
    midiOutOpen(&handle, 0, 0, 0, CALLBACK_NULL);
    Sleep(1000);
    play_main(handle);
    midiOutClose(handle);
    return 0;
}

3.typora的导出

3.1 导出为pdf

image-20221127132846251

image-20221127132938354

image-20221127161719257

3.2 导出为word文档

3.2.1 下载与安装pandoc

安装包在百度网盘的链接:https://pan.baidu.com/s/1LUodcD7xY_9OQefHVHot7Q
提取码:1314

pandoc01

pandoc02

3.2.2 typora配置pandoc

pandoc03

配置完毕,重启 typora

3.2.3 导出为word

image-20221127161510126

image-20221127161613268

3.3 📍 作业展示

  1. pdf格式文档图片

  2. word格式文档图片

4.github注册登录与typora主题获取

4.0 说明

4.0.1 GitHub简介

  • 全球最大同性交友网站,技术宅男的天堂,新世界的大门。

  • GitHub是一个代码托管云服务网站,主要用于软件开发者存储和管理其项目源代码,且能够追踪、记录并控制用户对其代码的修改。

  • 甚至你可以简单粗暴的把它当作一个网盘,用来存储任何东西。

4.0.2 Github能给你带来什么

1️⃣ 托管代码、历史版本管理

当然不仅仅是代码,任何文件都支持(不少人用GitHub来写博客)。它会自动帮你记录代码的修改,在必要的时候,能够帮助你快速回退到之前的历史版本。

2️⃣ 搜索开源项目

GitHub是世界顶级开发者的聚集地,在这里你几乎可以找到任何你想要的东西。上面分享有许多优秀、著名的开源项目,在遵守其License的前提下,你可以免费使用、下载这些开源项目。这也是GitHub最为吸引人的地方。

img

👉看看GitHub开源项目排行榜:https://www.githubs.cn/top
👉正在使用GitHub的企业与组织:https://www.githubs.cn/organizations

3️⃣ 分享的同时会得到社区的回馈

GitHub可以说是共产主义的最佳实践之一。其一大优势是协同开发,你分享出来的项目,其他开发者也可以参与贡献,帮助你一同完善项目功能,Bug修复,代码质量提升。

4️⃣ 使用Github Pages服务,你可以免费搭建一个博客网站

GitHub Pages提供静态网页托管服务,它直接从 GitHub 上的仓库获取 HTMLCSSJavaScript文件,然后构建并发布网站。 您可以在 GitHub Pages 示例集合中查看 GitHub Pages 站点的示例。
GitHub 提供免费的 github.io子域,也支持自定义域名。

5️⃣ 学习,能力提升

GitHub上有很多优秀开源项目和教程资源值得你去发现、学习

👉GitHub面试、学习资源精选:https://www.githubs.cn/awesome

6️⃣ 提升自己的影响力

你可以将自己的开源项目发布到GitHub网站上,项目越受欢迎获得的Star越高,说明业界对你的能力越认可。一份优秀的GitHub主页,能为自己的简历润色不少。

4.1 github网址填写邮箱

由于访问外网,所以访问可能会比较慢,因此建议使用自己的热点。

🏠https://github.com/

image-20221127140630714

image-20221127133847985

4.2 设置密码(包含字母大小写和数字)

image-20221127134425326

4.3 设置英文用户名

image-20221127134457940

4.4 选择是否接受消息推送

image-20221127134633319

4.5 真人验证

image-20221127135255606

image-20221127135328428

点击 create account 后可能会有点卡,显示错误的白色页面,你如下图点击刷新按钮,然后会弹出一个选择对话框,按继续即可

image-20221127140603766

4.6 邮箱验证

image-20221127135646831

4.7 信息填写

image-20221127135717923

image-20221127135801844

image-20221127140148190

4.8 注册成功

image-20221127140257688

4.9 获取typora主题

在左上角的搜索框中输入:Mr-Write/-

image-20221127143528631

image-20221127143633133

image-20221127143723234

解压后将 theme 文件夹下的所有文件拷贝至 typora的主题文件夹下即可(这个在之前已经讲过了,这里就不过多说明)

4.10 📍 作业展示

👇 展示 cyan-moon 主题的效果图

5.函数练习

5.1 📍 求和

编写一个求和函数sum,用于计算 1+2+…+n ,在主函数调用该函数求和。

示例输入输出
1️⃣515
2️⃣728
3️⃣36

👇 代码写在代码块中


👇 vs执行代码成功截图放在引用框中

5.2 📍 回文数

编写函数 palindromeNumber,求[200,3000]范围内的回文数有哪些,在主函数中调用该函数。

输出区间[200,3000]中所有的回文数,一行一个回文数,不需要输出其它无关的字符。

202
212
222
232
242
.....

👇 代码写在代码块中


👇 vs执行代码成功截图放在引用框中

5.3 📍 函数表达式的值

有如下表达式 s = 1 + 1 / 3 + (1 * 2) / (3 * 5) + (1 * 2 * 3) / (3 * 5 * 7) + .... + (1 * 2 * 3 * .... * n) / (3 * 5 * 7 * ... * (2 * n + 1))。编写函数求给出的n所对应的表达式s的值。

输出表达式的值,保留小数点后10位的值。

示例输入输出
1️⃣41.5492063492
2️⃣31.5238095238

👇 代码写在代码块中


👇 vs执行代码成功截图放在引用框中

6.写一篇自己的csdn文章

6.1 选题范围

  1. 选题一:自己对编程的看法与感悟,可以是注意的问题,可以是自己从小白到现在的成长,自由发挥(不低于两百字)
  2. 选题二:本次练习的三道函数练习题,任选一道作为文章发布

6.2 编写步骤

  1. 先在 typora 中完成编写

  2. 打开csdn编辑器

    image-20221127144609269

    image-20221127144658785

  3. 将 typora 中的编写内容全选,然后 复制,再 粘贴 到csdn编辑框(如果包含图片则图片路径不能使用本地路径

    image-20221127145402193

  4. 发布文章

    image-20221127145806991

  5. 发布成功

    image-20221127145827167

  6. 审核完成一段时间后,进入个人主页查看

    image-20221127150002882

  7. 链接复制与分析

    image-20221127150220088

6.3 📍 分享

到这里,一篇文章就诞生了。这样,我就可以分享链接给我爱的人看我的故事了。

👇 在下方引用栏写下文章链接,给你的负责人查看

🏠

7.总结

7.1 个人学习总结

在下面写下你对这次任务学习到的知识的总结,我们会根据你的总结给你打分(学习总结)

7.2 对软件协会的评价与建议

💬 我的一些话:

  • 软件协会成立时间不算长,但发展的很快,一百多号人的社团确实在管理起来有许多可能的疏忽或者没有全部照顾的到,有些小伙伴觉得没有学到什么。但学习永远不能成为一个被动的过程,一定是要自己去主动去争取。
  • 软件协会的制度与学习规划也在不断完善,大家都应该是在慢慢变得更好变得优秀才对。软件协会提供了许多好的学习资源与更多的拓展,我们也不是老师总是催着小伙伴们做这做那,所以我们给了,你必须主动去接受。
  • 之前有些小伙伴和我交流的时候说自己会为学校之间的差别感到焦虑,但其实计算机专业差别真不会太大,大多都是靠自己的主动学习,即使是学校老师的差距也几乎影响不了什么。再者,软协提供的资料与知识拓展都是走在了很多其它学校的前面,像我有在其它很多高校的同学,他们现在都不知道github怎么用,typora怎么用,图床是什么。软件协会对大一的学习规划是在同样学习的知识的基础上进行知识的拓展或者说是超前学习

不管怎样,请在下方写下你对软件协会的评价,做的好的与做的不好的,供软件协会改进。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/42256.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

css3手册

文章目录布局弹性盒生成弹性容器和弹性项目更改方向主轴排列侧轴排列弹性项目伸缩主轴换行网格生成网格布局定义行和列改变排列方向单元格之间的间隙单元格内部的对齐网格项目定位视觉阴影盒子阴影文字阴影圆角背景渐变变形translate 平移scale 缩放rotate 旋转改变变形原点多种…

spring MVC源码探索之AbstractHandlerMethodMapping

AbstractHandlerMethodMapping 是什么 官方解释是这样的。 /*** Abstract base class for {link HandlerMapping} implementations that define* a mapping between a request and a {link HandlerMethod}.** <p>For each registered handler method, a unique mapping…

Java项目:ssm毕业论文管理系统

作者主页&#xff1a;源码空间站2022 简介&#xff1a;Java领域优质创作者、Java项目、学习资料、技术互助 文末获取源码 毕业设计管理系统 1、本系统使用SSM框架 2、有管理员、教师、学生三种角色&#xff0c;管理员使用admin/admin登录&#xff0c;教师使用t_01/6666登录&a…

JavaWeb简单实例——DBUtils

简单介绍&#xff1a; DBUtils是一个用来简化我们JDBC的编码工作量的一个工具。它可以在不影响数据库访问性能的情况下简化我们的代码编辑量。DBUtils的作用主要是&#xff1a;写数据&#xff0c;读数据&#xff0c;优化性能。 常用的类和对应的API&#xff1a; QureyRunner…

Spring Framework 6正式发布,携JDK 17Jakarta EE开启新篇章

本文已被https://yourbatman.cn收录&#xff1b;女娲Knife-Initializr工程可公开访问啦&#xff1b;程序员专用网盘https://wangpan.yourbatman.cn&#xff1b;技术专栏源代码大本营&#xff1a;https://github.com/yourbatman/tech-column-learning&#xff1b;公号后台回复“…

1.什么是闭包

什么是闭包 1. 概念 闭包&#xff08;closure&#xff09;指有权访问另一个函数作用域中变量的函数。—《JavaScript高级程设计》 简单理解就是一个函数。 2. 如何产生闭包&#xff1f; 当一个嵌套的内部函数引用了嵌套的外部函数的变量&#xff08;函数&#xff09;时&…

CANoe-vTESTstudio之Test Diagram编辑器(元素介绍)

Test Diagram编辑器里的工具箱,有多个图形符号,它们是组成测试图表的图形元素,具有不同的作用。图形元素能够高效并快速地创建测试图表,然后生成测试用例 1. 基本测试设计元素 基本元素用来创建图形设计 1.1 Setup Setup元素的测试代码能够执行一次,在检查测试用例之前…

特别有用!Jmeter命令行执行时设置并发数和循环次数的方法

Jmeter命令行方式运行概述 之前写过一篇文章介绍如何在centos上部署jmeter来执行性能测试&#xff0c;链接如下&#xff1a; https://blog.csdn.net/liwenxiang629/article/details/124140833 因为大多数linux服务器都是没有GUI界面的&#xff0c;这就需要我们通过命令行的方…

MobPush Android For Unity

集成准备 注册账号 使用MobSDK之前&#xff0c;需要先在MobTech官网注册开发者账号&#xff0c;并获取MobTech提供的AppKey和AppSecret&#xff0c;详情可以点击查看注册流程 下载.unitypackage包 打开 Github 下载 MobPush-For-Unity 项目&#xff0c;下载完成后直接双击或…

【图神经网络论文整理】(十)—— How Powerful are Graph Neural Networks?:GIN

作者信息&#xff1a;Keyulu Xu, Weihua Hu, Jure Leskovec, Stefanie Jegelka论文来源&#xff1a;Computer Vision and Pattern Recognition论文地址&#xff1a;https://arxiv.org/abs/1810.00826 本文介绍的论文是《How Powerful are Graph Neural Networks?》。 作者提…

MySQL表的增删查改(嘎嘎详细~

hello呀&#xff01;各位&#xff0c;这里是Sunlightʊə。 目前大三&#xff0c;主要在学习Java语言。可以一起交流呀&#xff01; 相关文章&#xff1a; MySQL数据库的基础操作&#xff08;简单、基础版 专栏&#xff1a; Java数据结构 Java基础语法 MySQL基础 目录 新增&am…

流式 Isotype control 流式细胞仪control组

流式细胞术是非常让人着迷的实验。在众多医学研究手段里,如果说弱水三千只取一瓢的话,那我会首选流式细胞术。从我个人感受来讲,流式细胞术高速客观,具有统计学意义,能够处理复杂样本并同时获取多种参数,最最关键的是它性能可靠,可重复性非常好。 虽然也存在一些局限,…

3款超实用的电脑软件,免费又良心,内存满了也绝不卸载

超强的3款电脑软件&#xff0c;每款都是百里挑一的精品。 1、视频画质增强器 这是国人开发的图片视频增强工具&#xff0c;完全免费无任何弹屏广告&#xff0c;它能将画质很差的图片&#xff0c;一键转化为高清大图&#xff0c;同时还能无损放大图片&#xff0c;图片输出格式支…

第150篇 笔记-元宇宙(Metaverse)

定义&#xff1a;元宇宙是一个整体虚拟世界的概念&#xff0c;它与现实世界并行存在&#xff0c;提供主权数字所有权、独特的在线身份、互联环境和沉浸式体验。 随着最近区块链生态系统中NFT的爆炸&#xff0c;以及Facebook的头部转向“Meta”&#xff0c;元宇宙已进入主流公众…

代码源每日一题div1 枚举倍数 平方计数

平方计数 - 题目 - Daimayuan Online Judge 题意&#xff1a; 思路&#xff1a; 首先注意到暴力枚举一定超时&#xff0c;因此我们考虑只枚举一个指针&#xff0c;然后推一推式子降低另一个指针的复杂度 对于完全平方数这个条件&#xff0c;我们无法直接转换 即对于每一个a[…

1.3 测控电路的信号类型、测控电路的类型与组成、测控电路的发展趋势

笔者电子信息专业硕士毕业&#xff0c;获得过多次电子设计大赛、大学生智能车、数学建模国奖&#xff0c;现就职于南京某半导体芯片公司&#xff0c;从事硬件研发&#xff0c;电路设计研究。对于学电子的小伙伴&#xff0c;深知入门的不易&#xff0c;特开次博客交流分享经验&a…

技术指南 | 如何集成Perforce版本控制系统Helix Core (P4V) 与敏捷规划工具Hansoft

Helix Core是Perforce公司旗下一款集源代码管理和内容协作为一体的版本配置与管理工具&#xff0c;可以帮助您管理随时间推移而产生的数字资产&#xff08;代码&#xff0c;文件等&#xff09;变更&#xff0c;处理每天数以千万计的传输&#xff0c;上千TB的数据&#xff0c;以…

zabbix模板监控和自定义监控

目录 一、环境准备 二、使用模板监控 1、添加监控主机 2、设置应用监控模板 3、查看监控数据 三、自定义监控 1、配置自定义监控key 2、创建自定义监控模板、应用集、监控项和图形 2.1、监控模板、应用集、监控项介绍 2.2、创建监控模板 2.3、给自定义模板添加应用集…

mysql回表查询和索引覆盖

作为 JAVA 开发的必备知识&#xff0c;了解回表查询和索引覆盖可以大大提升数据库查询的速度&#xff0c;也是优化数据库查询的必备知识。 1. 什么是索引? 索引&#xff08;在 MySQL 中也叫“键key”&#xff09;是存储引擎快速找到记录的一种数据结构&#xff0c;通俗来说类…

什么是Hystrix?简述实现机制

分布式容错框架 阻⽌故障的连锁反应&#xff0c;实现熔断 快速失败&#xff0c;实现优雅降级提供实时的监控和告警资源隔离&#xff1a; 线程隔离&#xff0c;信号量隔离 线程隔离&#xff1a;Hystrix会给每⼀个Command分配⼀个单独的线程池&#xff0c;这样在进⾏单个服务调⽤…