📄 mid1.htm
字号:
7=7 sharps)<br>
mi=major/minor (0=major, 1=minor)<br>
<br>
7f 01111111 xx dd .. sequencer specific information<br>
xx=number of bytes to be sent<br>
dd=data<br>
the following table lists system messages which control the entire system.<br>
these have no midi channel number. (these will generally only apply to<br>
controlling a midi keyboard, etc.)<br>
<br>
hex binary data description<br>
f8 11111000 timing clock used when synchronization is<br>
required.<br>
<br>
fa 11111010 start current sequence<br>
<br>
fb 11111011 continue a stopped sequence where left<br>
off<br>
<br>
fc 11111100 stop a sequence<br>
<br>
<br>
the following table lists the numbers corresponding to notes for use in note <br>
on and note off commands.<br>
<br>
<br>
octave|| note numbers<br>
# ||<br>
|| c | c# | d | d# | e | f | f# | g | g# | a | a# | b<br>
-----------------------------------------------------------------------------<br>
0 || 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11<br>
1 || 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23<br>
2 || 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35<br>
3 || 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47<br>
4 || 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59<br>
5 || 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71<br>
6 || 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83<br>
7 || 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95<br>
8 || 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107<br>
9 || 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119<br>
10 || 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 |<br>
<br>
<br>
bibliography<br>
<br>
"midi systems and control" francis rumsey 1990 focal press<br>
<br>
"midi and sound book for the atari st" bernd enders and wolfgang klemme<br>
1989 m&t publishing, inc.<br>
<br>
midi file specs and general midi specs were also obtained by sending e-mail<br>
to listserv@auvm.american.edu with the phrase get midispec package<br>
in the message.<br>
<br>
<br>
------------------------------- dec.cpp ------------------------------------<br>
<br>
/* file dec.cpp<br>
<br>
by dustin caldwell (dustin@gse.utah.edu)<br>
<br>
*/<br>
<br>
<br>
#include <dos.h><br>
#include <stdio.h><br>
#include <stdlib.h><br>
<br>
void helpdoc();<br>
<br>
main()<br>
{<br>
file *fp;<br>
<br>
unsigned char ch, c;<br>
<br>
if((fp=fopen(_argv[1], "rb"))==null) /* open file to read */<br>
{<br>
printf("cannot open file %s\n",_argv[1]);<br>
helpdoc();<br>
exit(-1);<br>
}<br>
<br>
c=0;<br>
ch=fgetc(fp);<br>
<br>
while(!feof(fp)) /* loop for whole file */<br>
{<br>
printf("%u\t", ch); /* print every byte's decimal equiv. */<br>
c++;<br>
if(c>8) /* print 8 numbers to a line */<br>
{<br>
c=0;<br>
printf("\n");<br>
}<br>
<br>
ch=fgetc(fp);<br>
}<br>
<br>
fclose(fp); /* close up */<br>
}<br>
<br>
void helpdoc() /* print help message */<br>
{<br>
printf("\n binary file decoder\n\n");<br>
<br>
printf("\n syntax: dec binary_file_name\n\n");<br>
<br>
printf("by dustin caldwell (dustin@gse.utah.edu)\n\n");<br>
printf("this is a filter program that reads a binary file\n");<br>
printf("and prints the decimal equivalent of each byte\n");<br>
printf("tab-separated. this is mostly useful when piped \n");<br>
printf("into another file to be edited manually. eg:\n\n");<br>
printf("c:\>dec sonata3.mid > son3.txt\n\n");<br>
printf("this will create a file called son3.txt which can\n");<br>
printf("be edited with any ascii editor. \n\n");<br>
printf("(rec.exe may also be useful, as it reencodes the \n");<br>
printf("ascii text file).\n\n");<br>
printf("have fun!!\n");<br>
}<br>
<br>
---------------------------- rec.cpp ----------------------------------<br>
<br>
/* file rec.cpp<br>
by dustin caldwell (dustin@gse.utah.edu)<br>
*/<br>
<br>
#include <dos.h><br>
#include <stdio.h><br>
#include <ctype.h><br>
#include <stdlib.h><br>
<br>
void helpdoc();<br>
<br>
main()<br>
{<br>
file *rfp, *wfp;<br>
<br>
unsigned char ch, c;<br>
char s[20];<br>
<br>
if((rfp=fopen(_argv[1], "r"))==null) /* open the read file */<br>
{<br>
printf("cannot open file %s \n",_argv[1]);<br>
helpdoc();<br>
exit(-1);<br>
}<br>
<br>
if((wfp=fopen(_argv[2], "wb"))==null) /* open the write file */<br>
{<br>
printf("cannot open file %s \n",_argv[1]);<br>
helpdoc();<br>
exit(-1);<br>
}<br>
<br>
c=0;<br>
<br>
ch=fgetc(rfp);<br>
<br>
while(!feof(rfp)) /* loop for whole file */<br>
{<br>
<br>
if(isalnum(ch)) /* only 'see' valid ascii chars */<br>
{<br>
c=0;<br>
while(isdigit(ch)) /* only use decimal digits (0-9) */<br>
{<br>
s[c]=ch; /* build a string containing the number */<br>
c++;<br>
ch=fgetc(rfp);<br>
}<br>
s[c]=null; /* must have null terminator */<br>
<br>
fputc(atoi(s), wfp);/* write the binary equivalent to file */<br>
<br>
}<br>
<br>
ch=fgetc(rfp); /* loop until next number starts */<br>
<br>
<br>
}<br>
<br>
fclose(rfp); /* close up */<br>
fclose(wfp);<br>
}<br>
<br>
<br>
void helpdoc() /* print help message */<br>
{<br>
printf("\n text file encoder\n\n");<br>
<br>
printf("\n syntax: rec text_file_name binary_file_name\n\n");<br>
<br>
printf("by dustin caldwell (dustin@gse.utah.edu)\n\n");<br>
printf("this is a program that reads an ascii tab-\n");<br>
printf("delimited file and builds a binary file where\n");<br>
printf("each byte of the binary file is one of the decimal\n");<br>
printf("digits in the text file.\n");<br>
printf(" eg:\n\n");<br>
printf("c:\>rec son3.txt son3.mid\n\n");<br>
printf("(this will create a file called son3.mid which is\n");<br>
printf("a valid binary file)\n\n");<br>
printf("(dec.exe may also be useful, as it decodes binary files)\n\n");<br>
printf("have fun!!\n");<br>
}</td>
</tr>
</table>
</center></div>
<p align="center"><a href="../index.htm">返回</a></p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -