Skip to content

Instantly share code, notes, and snippets.

View farteryhr's full-sized avatar

farteryhr

View GitHub Profile
@farteryhr
farteryhr / README.md
Last active January 31, 2019 19:42
SCRIPT-8
@farteryhr
farteryhr / farter的MIDI格式学习笔记
Created April 5, 2013 12:54
MIDI以及mid文件的字节格式……查了一圈资料各种机翻……要么就是各种文艺一点没有程序猿风范【滚】所以写个笔记,你一定看不懂的【大雾】
定义 范围(左端点,右端点)
左闭右开区间你懂的
定义 字节
……8位二进制数码……
定义 大端整数
就是由几字节组成的整数,但是首个字节代表的是最大的8位。
定义 变长MIDI整数
MIDI的变长整数记录法,用低7位记录数字,最高位为1表示再读一字节拼起来。
也就是,0-128直接单字节一坨,大于128切成每坨7位,也是按大坨在前,然后除了最后一坨之外,每一字节最高位改成1。
定义 MIDI整数
@farteryhr
farteryhr / Tetris-ex-20111106.cpp
Created November 6, 2011 07:07
俄罗斯方块EX 控制台版 c++代码 by Farteryhr
#include <stdio.h>
#include <conio.h>
#include <windows.h>
#include <time.h>
#include <math.h>
#include <string.h>
#define u16 unsigned short
char XC[2001]={0};
const char* blk[30]={
"oo",