M
IDI
vii
Example 1: 8 to 7 bit conversion
12 45 F7 A3 53 B0 3A—conv8_7 —> 09 22 7F 51 29 58 1D 1E
(7 bytes) (8 bytes)
void conv8_7 ( dest, src )
unsigned char *dest, *src;
{
int i;
unsigned char accum = 0;
for (i=0; i<7; i++)
{
accum |= ((*src & 0x1) << i);
*dest++ = (*src++ >> 1);
}
*dest = accum;
}
Example 2: 7 to 8 bit conversion
void conv7_8 (dest, src)
char *dest, *src;
{
int i;
char bit8 = src [7];
for (i = 7; i > 0; i—, bit8 >>= 1)
*dest++ = (*src++ << 1) + (bit8 & 1);
}
Handshake Commands
F0 2F fc ss hh oc F7
f = function number (0-7)
c = channel(0-F)
ss = subfunction (0-6F, 70-7F reserved)
hh = 7F =
ACK (ok or go on)
7E =
NACK (not ok, repeat last)
7D =
CANCEL (abort operation)
7C = _
WAIT (wait for response)
oc = own channel(0-F)
FILE
FUNCTIONS
FILE_F
FILE DUMP HEADER
F_DHDR
F0 2F 0c 01 oc <file name> ff <info> <location> cc F7
c = channel (0-F)
oc = own channel (0-F)
file name = 8 chars file name + 3 chars extension
ff = flags
info = 2 octects = 16 bytes of bynary info time/date/length/
instrument ID/file id
location = 1 up 80 chars string NULL terminate
cc = checksum (xor of all bytes from 2F)
After the receiver has received the header, the _WAIT
command is sent back and the checksum test is then
performed; if the checksum test fails, the receiver sends
back a NACK command and the host must repeat the
header transmission. If the test is ‘ok’, the receiver sends
back an ACK command and the host can then send the
next packet.
When the receiver has performed the <info> with conver-
sion (conv7_8), the result is an 14 byte structure, as shown
in ex. 3 below.
Example: 3 INFO structure
typedef struct
{
short
Time;
short
Date;
long
Length;
char
DeviceClass;
char
DeviceSubClass;
char
DeviceRelease;
char
FileType;
char
FileFormat;
char
FileRelease;
}INFO;
Содержание S2 Turbo
Страница 1: ......
Страница 3: ...MUSICPROCESSORS OWNER S MANUAL ...
Страница 17: ...INTRODUCTION 1 1 INTRODUCTION INTRODUCTION ...
Страница 21: ...5 LAYOUTS 2 LAYOUTS S2 S3 Front panel S2 S3 Rear panel S2R Front panel S2R Rear panel ...
Страница 42: ...26 OVERVIEW ...
Страница 120: ...104 PRACTICAL GUIDE ...
Страница 140: ...124 SAMPLE TRANSLATOR ...
Страница 256: ...II APPENDIX ...
Страница 257: ...MIDI iii MIDI IMPLEMENTATION CHART MIDI CONTROLLERS SYSTEM EXCLUSIVE ...
Страница 267: ...Waveforms Sounds Performances xiii WAVEFORMS SOUNDS AND PERFORMANCES ...
Страница 278: ...XXIV APPENDIX ...
Страница 279: ...ROM Drumkits and Percussion Samples xxv DRUMKITS AND PERCUSSION SAMPLES ...
Страница 291: ...TECHNICAL SPECIFICATIONS xxxvii TECHNICAL SPECIFICATIONS ...
Страница 293: ...GLOSSARY a GLOSSARY ALPHABETICAL INDEX TROUBLESHOOTING GLOSSARY ALPHABETICAL INDEX TROUBLESHOOTING ...
Страница 302: ...J TROUBLESHOOTING ...