Appendices, How to calculate checksum, Midi implementation – Roland VS-890 User Manual

Page 125: E decimal and hexadecimal table, Commands recognized, Commands transmitted, Valid information fields / response

Attention! The text in this document has been recognized automatically. To view the original document, you can use the "Original mode".

Advertising
background image

MIDI Implementation

4. Appendices

e Decimal and Hexadecimal table

(Hexadecimal number is. shown with H.)

In MIDI documentation, data values and nddresses/si/es of system exclusive messages etc.

are expressed as hexadecimal values for each 7 bits.

The following fable show's how these correspond to decimal numbers.

i dec

hex

!

dec

hex (

dec

hex I

dec

hex

0

QOH

32

20H

64

40H

96

60H

1

OlH

33

21H

65

41H

97

61H

2

02H

34

22H

66

42K

99

62H

3

03H

35

23K

67

43H

99

63H

4

04H

36

24H

69

44K

100

64H

5

05K

57

25H

69

45K

101

65H

6

06H

30

26H

70

46H

102

66H

7

07H

39

27K

71

47K

103

67H

0

OfiH

40

2EH

72

4BH

104

6BH

Э

09H

41

2SH

73

4 9H

105

69H

10

OAH

42

2AH

74

4ЛН

106

6AH

11

OBH

43

2BH

75

4BH

107

6БН

12

OCH

44

2СЯ

75

4CK

108

6CH

13

ODH

45

2DH

77

4 OH

109

6DH

14

OEH

46

2 EH

79

4EH

110

6 EH

15

OFH

47

2FH

79

4FH

m

6FH

1€

iOH

48

3CH

80

50K

112

7QH

17

IIK

49

31H

01

51H

113

71H

19

12H

50

32H

82

53H

114

72H

19

: з к

51

33H

S3

53H

115

73H

20

14H

52

34H

04

S4H

116

74H

21

15H

53

35H

05

55H

117

75H

22

16H

54

36H

6 6

5eH

116

76H

23

17H

55

37H

67

57H

119

77H ■

24

: е н

56

39H

0 6

5SH

120

7SH

25

1ЭН

57

Э5Н

09

59H

121

79H

lAH

58

3AH

90

5AH

122

7АЙ

27

lEH

59

3BH

91

5BH

123

75H

28

ICH

60

3CH

92

5CH

124

7CH

29

IDH

61

3DH •

93

50H

125

7DH ,

30

lEH

62

3EH ;

94

5EH

126

7EH '

i 31

IFK

63

3FK ;

95

5FH

127

7FH '

*

Decimal values such as MIDI channel, bank select, and program change are listed as one

(1) greater than the values given in the above table.

’ A 7-bit byte can express data in the range of 126 steps. For data where greater precision

is required, we must use two or more bytes. For example, Iwo hexadecimal numbers aa

bbH expressing two 7-bit bytes would indicate a value of aa x 126 + bb.

*

In the case of values which have a +/- sign, ООН - -64, 40H = +/- 0, and 7FH = ^63, so

that the decimal expression w’outd be 64 less than the value given in the above chart. In

the case of Iwo types, 00 ООН = -8192,40 ООН = ч-/-0, and 7F 7FH = +6191.

*

Diita marked nibbled" is expressed in hexadecimal in 4-bit units. A value expressed as a

2-b)’le nibble Oa ObH has the value of a \ 16 + b.

<Ex.l> What is 5AH in decimal system?

5AH = ад according to the above table.

«iEx.2>VVhat in decimal system is 12034H in hexadecimal of every 7 bil?

12H = 18.34H = 52 according to the above table. So 18 \ 128 + 52 = 2356.

<ExJ> What in decimal system is OA 03 09 OD in nibble system?

OAH = 10,03H = 3,09H » 9, ODH = 13 according to the table.

So «10 \ 16 + .3) X 16 + 9) X 16 * 13 = 41883.

<Ex. 4> What in nibble system is 1256 in decimal system?

161:259

161 79 . ,

. . 10

16! 4 - ,. 14

0

, .

4

0 = ШН. 4 = 04H, 14 = OEH. 10 = OAH According to the table.

So it is 00 04 OE OAH.

•Example of system exclusive message and Checksum
calculation

On Roland sx'Stem exclusive message (DTI), checksum is added at the end of transmitted

data (in front of F7) to check the message is received correctly. Value of dtecksum is defined

by address and data (or size) of the sv'Stem exclusive message to be transmitted.

How to calculate checksum

(Hexadedmai number is shown with H.)

Checksum is a value w'hich lower 7 bit of the sum of address, size and checksum itself turns

tobeO.

if the address of the system exclusive message to be transmitted i.s aa bb ccH and data nr

size is dd ee ffH,

aa + bb + cc + dd + ee + ff = sum

sum / 128 s quotient and odd

When odd Is 0.0 = checksum

When odd is other than 0,128 • odd » checksum

■MIDI

Machine

Control

(MMC)

Command,

Information Field / Response Reference

•Commands Recognized

Command

01H STOP

02H PLAY

03H DEFERRED PLAY

04H FAST FORWARD

OSH REWIND

06H RECORD STROBE

07H RECORD EXIT

ODH MMC RESET

40H WRITE

41H MASKED WRITE

44H ООН LOCATE l/F

44H 01H LOCATE TARGET

4CH MOVE

Action

STOP

PLAY

PLAY

FF

REW

REC / PUNCH IN

PUNCH OUT

RESET

Write to Information Fields

Set Track Status Information Fields

LOCATE (Read Locator)

LOC.ATE (Designated Time)

Move between Information fields

•Commands Transmitted

CDmmaiKl

OlHSTOP

03H DEFERRED PLAY

ОбН RECORD STROBE

07H RECORD EXIT

ODH MMC RESET

Action

STOP

PLAY

REC / PUNCH IN

PUNCH OUT

RESET

44H 01H LOCATE TARGET LOCATE

•Valid Information Fields / Response

InfafTOBtion Field
OlH SELECTED TIMECODE

08H GPO / LOCATE Ю1МТ

09H GPl

OAH CP2

OBH GP3

OCH GP4

ODH CPS

OEH CP&

OFH GP7

Current Time

Locator 1

Locator 2

Locator .1

Locator 4

Locator S

Locator 6

Locator 7

Locator 8

4FH TR.ACK RECORD READY Track Status

MOVE(FROM)

MOVE(FROM),

MOVEfTO).

MOVE(FROM),

MOVEfTO),

MOVE(FROM),

MOVEfTO),

кЮУЩРЯОМ).

MOVEfTO).

MOVE(FROM),

MOVEfTO),

MOVEfFROM),

MOVEfTO).

MOVE(FROM),

MOVEfTO),

MOVEfFROM),

MOVEfTO),

MASKED WRITE WRITE

WRITE

WRITE
WRITE

WRITE
WRITE

WRITE

WRITE

WRITE

125

Advertising