Examples Of Actual Midi Messages - Roland RD-300SX Midi Implementation Manual

Roland rd-300sx: supplementary guide
Hide thumbs Also See for RD-300SX:
Table of Contents

Advertisement

RD-300SX MIDI Implementation

■Examples of Actual MIDI Messages

<Example1> 92 3E 5F
9n is the Note-on status, and n is the MIDI channel number. Since 2H = 2, 3EH = 62, and 5FH
= 95, this is a Note-on message with MIDI CH = 3, note number 62 (note name is D4), and
velocity 95.
<Example2> CE 49
CnH is the Program Change status, and n is the MIDI channel number. Since EH = 14 and 49H
= 73, this is a Program Change message with MIDI CH = 15, program number 74 (Flute in GS).
<Example3> EA 00 28
EnH is the Pitch Bend Change status, and n is the MIDI channel number. The 2nd byte (00H =
0) is the LSB and the 3rd byte (28H = 40) is the MSB, but Pitch Bend Value is a signed number
in which 40 00H (= 64 x 12+80 = 8192) is 0, so this Pitch Bend Value is
28 00H - 40 00H = 40 x 12+80 - (64 x 12+80) = 5120 - 8192 = -3072
If the Pitch Bend Sensitivity is set to 2 semitones, -8192 (00 00H) will cause the pitch to change
-200 cents, so in this case -200 x (-3072) ÷ (-8192) = -75 cents of Pitch Bend is being applied to
MIDI channel 11.
<Example4> B3 64 00 65 00 06 0C 26 00 64 7F 65 7F
BnH is the Control Change status, and n is the MIDI channel number. For Control Changes,
the 2nd byte is the control number, and the 3rd byte is the value. In a case in which two or
more messages consecutive messages have the same status, MIDI has a provision called
"running status" which allows the status byte of the second and following messages to be
omitted. Thus, the above messages have the following meaning.
B3
64 00
MIDI ch.4, lower byte of RPN parameter number:
(B3)
65 00
(MIDI ch.4) upper byte of RPN parameter number:
(B3)
06 0C
(MIDI ch.4) upper byte of parameter value:
(B3)
26 00
(MIDI ch.4) lower byte of parameter value:
(B3)
64 7F
(MIDI ch.4) lower byte of RPN parameter number:
(B3)
65 7F
(MIDI ch.4) upper byte of RPN parameter number:
In other words, the above messages specify a value of 0C 00H for RPN parameter number 00
00H on MIDI channel 4, and then set the RPN parameter number to 7F 7FH.
RPN parameter number 00 00H is Pitch Bend Sensitivity, and the MSB of the value indicates
semitone units, so a value of 0CH = 12 sets the maximum pitch bend range to ±12 semitones (1
octave). (On GS sound generators the LSB of Pitch Bend Sensitivity is ignored, but the LSB
should be transmitted anyway (with a value of 0) so that operation will be correct on any
device.)
Once the parameter number has been specified for RPN or NRPN, all Data Entry messages
transmitted on that same channel will be valid, so after the desired value has been
transmitted, it is a good idea to set the parameter number to 7F 7FH to prevent accidents. This
is the reason for the (B3) 64 7F (B3) 65 7F at the end.
It is not desirable for Performance data (such as Standard MIDI File data) to contain many
events with running status as given in <Example 4>. This is because if playback is halted
during the song and then rewound or fast-forwarded, the sequencer may not be able to
transmit the correct status, and the sound generator will then misinterpret the data. Take care
to give each event its own status.
It is also necessary that the RPN or NRPN parameter number setting and the value setting be
done in the proper order. On some sequencers, events occurring in the same (or consecutive)
clock may be transmitted in an order different than the order in which they were received. For
this reason it is a good idea to slightly skew the time of each event (about 1 tick for TPQN =
96, and about 5 ticks for TPQN = 480).
* TPQN: Ticks Per Quarter Note
10
■Example of an Exclusive Message and Calculating a
Checksum
Roland Exclusive messages (RQ1, DT1) are transmitted with a checksum at the end (before F7)
to make sure that the message was correctly received. The value of the checksum is
determined by the address and data (or size) of the transmitted Exclusive message.
●How to calculate the checksum
(hexadecimal numbers are indicated by "H")
The checksum is a value derived by adding the address, size, and checksum itself and
inverting the lower 7 bits.
Here's an example of how the check sum is calculated. We will assume that in the Exclusive
message we are transmitting, the address is aa bb cc ddH and the data or size is ee ffH.
aa + bb + cc + dd + ee + ff = sum
sum ÷ 128 = quotient ... remainder
128 - remainder = checksum
<Example1> Setting Reverb Level to 100 (DT1)
According to the "Parameter Address Map" (p. 7), the address of Reverb Level is 10 00 08
01H, and the hexadecimal expression of 100 is 64H.
So the system exclusive message should be sent is;
F0
41
10
00 00 04
(1)
(2)
(3)
(4)
(1) Exclusive Status
(4) Model ID (RD-300SX)
Then calculate the checksum.
00H
10H + 00H + 08H + 01H + 64H = 16 + 0 + 8 + 1 + 100 = 125 (sum)
00H
125 (sum) ÷ 128 = 0 (quotient) ... 3(remainder)
0CH
checksum = 128 - 125 (remainder) = 3 = 03H
00H
7FH
This means that F0 41 10 00 00 04 12 10 00 08 01 64 03 F7 is the message should be sent.
7FH
<Example2> Getting Temporary SETUP Common data (RQ1)
According to the "Parameter Address Map" (p. 7), the start address of Temporary Setup is 10
00 00 00H.
As the data size of Setup Common is 00 00 00 3EH, therefore the system exclusive message
should be sent is;
F0
41
10
00 00 04 11
(1)
(2)
(3)
(4)
(1) Exclusive Status
(4) Model ID (RD-300SX) (5) Command ID (RQ1)
Calculating the checksum as shown in <Example 2>, we get a message of F0 41 10 00 00 04 11
10 00 00 00 00 00 00 3E 7C F7 to be transmitted.
■ASCII Code Table
Setup Name of MIDI data are described the ASCII code in the table below.
+——————+——————+——————++——————+——————+——————++——————+——————+——————+
|
D
|
H
| Char ||
+——————+——————+——————++——————+——————+——————++——————+——————+——————+
|
32 |
20H |
SP
|
33 |
21H |
!
|
34 |
22H |
"
|
35 |
23H |
#
|
36 |
24H |
$
|
37 |
25H |
%
|
38 |
26H |
&
|
39 |
27H |
`
|
40 |
28H |
(
|
41 |
29H |
)
|
42 |
2AH |
*
|
43 |
2BH |
+
|
44 |
2CH |
,
|
45 |
2DH |
|
46 |
2EH |
.
|
47 |
2FH |
/
|
48 |
30H |
0
|
49 |
31H |
1
|
50 |
32H |
2
|
51 |
33H |
3
|
52 |
34H |
4
|
53 |
35H |
5
|
54 |
36H |
6
|
55 |
37H |
7
|
56 |
38H |
8
|
57 |
39H |
9
|
58 |
3AH |
:
|
59 |
3BH |
;
|
60 |
3CH |
<
|
61 |
3DH |
=
|
62 |
3EH |
>
|
63 |
3FH |
?
+——————+——————+——————++——————+——————+——————++——————+——————+——————+
D: decimal
H: hexadecimal
* "SP" is space.
12
10 00 08 01
64
(5)
address
data
(2) ID (Roland)
(3) Device ID (17)
(5) Command ID (DT1)
(6) End of Exclusive
10 00 00 00
00 00 00 3E
(5)
address
data(size)
(2) ID (Roland)
(3) Device ID (17)
(6) End of Exclusive
D
|
H
| Char ||
D
|
H
||
64 |
40H |
@
||
96 |
60H |
||
65 |
41H |
A
||
97 |
61H |
||
66 |
42H |
B
||
98 |
62H |
||
67 |
43H |
C
||
99 |
63H |
||
68 |
44H |
D
||
100 |
64H |
||
69 |
45H |
E
||
101 |
65H |
||
70 |
46H |
F
||
102 |
66H |
||
71 |
47H |
G
||
103 |
67H |
||
72 |
48H |
H
||
104 |
68H |
||
73 |
49H |
I
||
105 |
69H |
||
74 |
4AH |
J
||
106 |
6AH |
||
75 |
4BH |
K
||
107 |
6BH |
||
76 |
4CH |
L
||
108 |
6CH |
||
77 |
4DH |
M
||
109 |
6DH |
||
78 |
4EH |
N
||
110 |
6EH |
||
79 |
4FH |
O
||
111 |
6FH |
||
80 |
50H |
P
||
112 |
70H |
||
81 |
51H |
Q
||
113 |
71H |
||
82 |
52H |
R
||
114 |
72H |
||
83 |
53H |
S
||
115 |
73H |
||
84 |
54H |
T
||
116 |
74H |
||
85 |
55H |
U
||
117 |
75H |
||
86 |
56H |
V
||
118 |
76H |
||
87 |
57H |
W
||
119 |
77H |
||
88 |
58H |
X
||
120 |
78H |
||
89 |
59H |
Y
||
121 |
79H |
||
90 |
5AH |
Z
||
122 |
7AH |
||
91 |
5BH |
[
||
123 |
7BH |
||
92 |
5CH |
\
||
124 |
7CH |
||
93 |
5DH |
]
||
125 |
7DH |
||
94 |
5EH |
^
||
|
||
95 |
5FH |
_
||
|
??
F7
checksum
(6)
??
F7
checksum
(6)
| Char |
`
|
a
|
b
|
c
|
d
|
e
|
f
|
g
|
h
|
i
|
j
|
k
|
l
|
m
|
n
|
o
|
p
|
q
|
r
|
s
|
t
|
u
|
v
|
w
|
x
|
y
|
z
|
{
|
|
|
}
|
|
|
|
|

Advertisement

Table of Contents
loading

Table of Contents