midi-message 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/midi.yml ADDED
@@ -0,0 +1,337 @@
1
+ Status:
2
+ Note Off: 0x8
3
+ Note On: 0x9
4
+ Polyphonic Aftertouch: 0xA
5
+ Control Change: 0xB
6
+ Program Change: 0xC
7
+ Channel Aftertouch: 0xD
8
+ Pitch Bend: 0xE
9
+ System Exclusive: 0xF0
10
+ System Common: [0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6]
11
+ System Realtime: [0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xFF]
12
+
13
+ Control Change:
14
+ Bank Select: 0
15
+ Modulation Wheel: 1
16
+ Breath Controller: 2
17
+ Foot Controller: 4
18
+ Portamento Time: 5
19
+ Data Entry MSB: 6
20
+ Channel Volume: 7
21
+ Balance: 8
22
+ Pan: 10
23
+ Expression Controller: 11
24
+ General Purpose Controllers: 16
25
+ General Purpose Controllers: 17
26
+ General Purpose Controllers: 18
27
+ General Purpose Controllers: 19
28
+ LSB for controller 0: 32
29
+ LSB for controller 1: 33
30
+ LSB for controller 2: 34
31
+ LSB for controller 3: 35
32
+ LSB for controller 4: 36
33
+ LSB for controller 5: 37
34
+ LSB for controller 6: 38
35
+ LSB for controller 7: 39
36
+ LSB for controller 8: 40
37
+ LSB for controller 9: 41
38
+ LSB for controller 10: 42
39
+ LSB for controller 11: 43
40
+ LSB for controller 12: 44
41
+ LSB for controller 13: 45
42
+ LSB for controller 14: 46
43
+ LSB for controller 15: 47
44
+ LSB for controller 16: 48
45
+ LSB for controller 17: 49
46
+ LSB for controller 18: 50
47
+ LSB for controller 19: 51
48
+ LSB for controller 20: 52
49
+ LSB for controller 21: 53
50
+ LSB for controller 22: 54
51
+ LSB for controller 23: 55
52
+ LSB for controller 24: 56
53
+ LSB for controller 25: 57
54
+ LSB for controller 26: 58
55
+ LSB for controller 27: 59
56
+ LSB for controller 28: 60
57
+ LSB for controller 29: 61
58
+ LSB for controller 30: 62
59
+ LSB for controller 31: 63
60
+ Sustain: 64
61
+ Hold Pedal: 64
62
+ Portamento: 65
63
+
64
+ Control Mode:
65
+ All Sound Off: 120
66
+ All Controllers Off: 121
67
+ Local Keyboard Toggle: 122
68
+ All Notes Off: 123
69
+ Omni Off: 124
70
+ Omni On: 125
71
+ Mono: 126
72
+ Poly: 127
73
+
74
+ System Common:
75
+ Song Position Pointer: 0x2
76
+ Song Select: 0x3
77
+ Tune Request: 0x6
78
+
79
+ System Realtime:
80
+ Start: 0xA
81
+ Clock: 0x8
82
+ Continue: 0xB
83
+ Stop: 0xC
84
+ ActiveSense: 0xE
85
+ Reset: 0xF
86
+
87
+ Manufacturer:
88
+
89
+ SequentialCircuits: 1
90
+ BigBriar: 2
91
+ Octave: 3
92
+ Moog: 4
93
+ Passport: 5
94
+ Lexicon: 6
95
+
96
+ PAIA: 0x11
97
+ Simmons: 0x12
98
+ GentleElectric: 0x13
99
+ Fairlight: 0x14
100
+ BonTempi: 0x20
101
+ SIEL: 0x21
102
+ SyntheAxe: 0x23
103
+
104
+ Kawai: 0x40
105
+ Roland: 0x41
106
+ Korg: 0x42
107
+ Yamaha: 0x43
108
+ Casio: 0x44
109
+ Akai: 0x47
110
+
111
+ Emagic: [0x00, 0x20, 0x31]
112
+ Behringer: [0x00, 0x20, 0x32]
113
+
114
+ Note:
115
+ C-1: 0
116
+ C#-1: 1
117
+ Db-1: 1
118
+ D-1: 2
119
+ Eb-1: 3
120
+ D#-1: 3
121
+ E-1: 4
122
+ Fb-1: 4
123
+ F-1: 5
124
+ E#-1: 5
125
+ F#-1: 6
126
+ Gb-1: 6
127
+ G-1: 7
128
+ G#-1: 8
129
+ Ab-1: 8
130
+ A-1: 9
131
+ A#-1: 10
132
+ Bb-1: 10
133
+ B-1: 11
134
+ Cb0: 11
135
+ C0: 12
136
+ B#-1: 12
137
+ C#0: 13
138
+ Db0: 13
139
+ D0: 14
140
+ D#0: 15
141
+ Eb0: 15
142
+ E0: 16
143
+ Fb0: 16
144
+ F0: 17
145
+ E#0: 17
146
+ F#0: 18
147
+ Gb0: 18
148
+ G0: 19
149
+ Ab0: 20
150
+ G#0: 20
151
+ A0: 21
152
+ Bb0: 22
153
+ A#0: 22
154
+ B0: 23
155
+ Cb1: 23
156
+ C1: 24
157
+ B#0: 24
158
+ Db1: 25
159
+ C#1: 25
160
+ D1: 26
161
+ D#1: 27
162
+ Eb1: 27
163
+ E1: 28
164
+ Fb1: 28
165
+ F1: 29
166
+ E#1: 29
167
+ F#1: 30
168
+ Gb1: 30
169
+ G1: 31
170
+ Ab1: 32
171
+ G#1: 32
172
+ A1: 33
173
+ A#1: 34
174
+ Bb1: 34
175
+ B1: 35
176
+ Cb2: 35
177
+ C2: 36
178
+ B#1: 36
179
+ Db2: 37
180
+ C#2: 37
181
+ D2: 38
182
+ D#2: 39
183
+ Eb2: 39
184
+ E2: 40
185
+ Fb2: 40
186
+ F2: 41
187
+ E#2: 41
188
+ F#2: 42
189
+ Gb2: 42
190
+ G2: 43
191
+ G#2: 44
192
+ Ab2: 44
193
+ A2: 45
194
+ A#2: 46
195
+ Bb2: 46
196
+ B2: 47
197
+ Cb3: 47
198
+ C3: 48
199
+ B#2: 48
200
+ C#3: 49
201
+ Db3: 49
202
+ D3: 50
203
+ Eb3: 51
204
+ D#3: 51
205
+ E3: 52
206
+ Fb3: 52
207
+ F3: 53
208
+ E#3: 53
209
+ F#3: 54
210
+ Gb3: 54
211
+ G3: 55
212
+ Ab3: 56
213
+ G#3: 56
214
+ A3: 57
215
+ A#3: 58
216
+ Bb3: 58
217
+ B3: 59
218
+ Cb4: 59
219
+ C4: 60
220
+ B#3: 60
221
+ C#4: 61
222
+ Db4: 61
223
+ D4: 62
224
+ D#4: 63
225
+ Eb4: 63
226
+ E4: 64
227
+ Fb4: 64
228
+ F4: 65
229
+ E#4: 65
230
+ Gb4: 66
231
+ F#4: 66
232
+ G4: 67
233
+ Ab4: 68
234
+ G#4: 68
235
+ A4: 69
236
+ A#4: 70
237
+ Bb4: 70
238
+ B4: 71
239
+ Cb5: 71
240
+ C5: 72
241
+ B#4: 72
242
+ C#5: 73
243
+ Db5: 73
244
+ D5: 74
245
+ Eb5: 75
246
+ D#5: 75
247
+ E5: 76
248
+ Fb5: 76
249
+ F5: 77
250
+ E#5: 77
251
+ F#5: 78
252
+ Gb5: 78
253
+ G5: 79
254
+ Ab5: 80
255
+ G#5: 80
256
+ A5: 81
257
+ A#5: 82
258
+ Bb5: 82
259
+ B5: 83
260
+ Cb6: 83
261
+ C6: 84
262
+ B#5: 84
263
+ C#6: 85
264
+ Db6: 85
265
+ D6: 86
266
+ D#6: 87
267
+ Eb6: 87
268
+ E6: 88
269
+ Fb6: 88
270
+ F6: 89
271
+ E#6: 89
272
+ Gb6: 90
273
+ F#6: 90
274
+ G6: 91
275
+ Ab6: 92
276
+ G#6: 92
277
+ A6: 93
278
+ A#6: 94
279
+ Bb6: 94
280
+ B6: 95
281
+ Cb7: 95
282
+ C7: 96
283
+ B#6: 96
284
+ C#7: 97
285
+ Db7: 97
286
+ D7: 98
287
+ D#7: 99
288
+ Eb7: 99
289
+ E7: 100
290
+ Fb7: 100
291
+ F7: 101
292
+ E#7: 101
293
+ Gb7: 102
294
+ F#7: 102
295
+ G7: 103
296
+ Ab7: 104
297
+ G#7: 104
298
+ A7: 105
299
+ A#7: 106
300
+ Bb7: 106
301
+ B7: 107
302
+ Cb8: 107
303
+ C8: 108
304
+ B#7: 108
305
+ C#8: 109
306
+ Db8: 109
307
+ D8: 110
308
+ D#8: 111
309
+ Eb8: 111
310
+ E8: 112
311
+ Fb8: 112
312
+ F8: 113
313
+ E#8: 113
314
+ Gb8: 114
315
+ F#8: 114
316
+ G8: 115
317
+ Ab8: 116
318
+ G#8: 116
319
+ A8: 117
320
+ A#8: 118
321
+ Bb8: 118
322
+ B8: 119
323
+ Cb9: 119
324
+ C9: 120
325
+ B#8: 120
326
+ C#9: 121
327
+ Db9: 121
328
+ D9: 122
329
+ D#9: 123
330
+ Eb9: 123
331
+ E9: 124
332
+ Fb9: 124
333
+ F9: 125
334
+ E#9: 125
335
+ Gb9: 126
336
+ F#9: 126
337
+ G9: 127
data/test/helper.rb ADDED
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ dir = File.dirname(File.expand_path(__FILE__))
4
+ $LOAD_PATH.unshift dir + '/../lib'
5
+
6
+ require 'test/unit'
7
+ require 'midi-message'
8
+
9
+ module TestHelper
10
+
11
+ end
@@ -0,0 +1,48 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'helper'
4
+
5
+ class ConstantsTest < Test::Unit::TestCase
6
+
7
+ include MIDIMessage
8
+ include TestHelper
9
+
10
+ def test_note_on
11
+ msg = NoteOn["c3"].new(0, 100)
12
+ assert_equal(NoteOn, msg.class)
13
+ assert_equal("C3", msg.name)
14
+ assert_equal("C", msg.note_name)
15
+ assert_equal([0x90, 0x30, 100], msg.to_a)
16
+ end
17
+
18
+ def test_control_change
19
+ msg = NoteOn["C3"].new(0, 100)
20
+ assert_equal(NoteOn, msg.class)
21
+ assert_equal("C3", msg.name)
22
+ assert_equal([0x90, 0x30, 100], msg.to_a)
23
+ end
24
+
25
+ def test_control_change
26
+ msg = ControlChange["Modulation Wheel"].new(2, 0x20)
27
+ assert_equal(ControlChange, msg.class)
28
+ assert_equal(msg.channel, 2)
29
+ assert_equal(0x01, msg.index)
30
+ assert_equal(0x20, msg.value)
31
+ assert_equal([0xB2, 0x01, 0x20], msg.to_a)
32
+ end
33
+
34
+ def test_system_realtime
35
+ msg = SystemRealtime["Stop"].new
36
+ assert_equal(SystemRealtime, msg.class)
37
+ assert_equal("Stop", msg.name)
38
+ assert_equal([0xFC], msg.to_a)
39
+ end
40
+
41
+ def test_system_common
42
+ msg = SystemCommon["Song Select"].new
43
+ assert_equal(SystemCommon, msg.class)
44
+ assert_equal("Song Select", msg.name)
45
+ assert_equal([0xF3], msg.to_a)
46
+ end
47
+
48
+ end
@@ -0,0 +1,86 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'helper'
4
+
5
+ class ContextTest < Test::Unit::TestCase
6
+
7
+ include MIDIMessage
8
+ include TestHelper
9
+ def test_note_off
10
+ msg = with(:channel => 0, :velocity => 64) do
11
+ note_off(55)
12
+ end
13
+ assert_equal(0, msg.channel)
14
+ assert_equal(55, msg.note)
15
+ assert_equal(64, msg.velocity)
16
+ assert_equal([128, 55, 64], msg.to_a)
17
+ assert_equal("803740", msg.to_bytestr)
18
+ end
19
+
20
+ def test_note_on
21
+ msg = with(:channel => 0, :velocity => 64) do
22
+ note_on(55)
23
+ end
24
+ assert_equal(0, msg.channel)
25
+ assert_equal(55, msg.note)
26
+ assert_equal(64, msg.velocity)
27
+ assert_equal([144, 55, 64], msg.to_a)
28
+ assert_equal("903740", msg.to_bytestr)
29
+ end
30
+
31
+ def test_control_change
32
+ msg = with(:channel => 2) do
33
+ control_change(0x20, 0x30)
34
+ end
35
+ assert_equal(msg.channel, 2)
36
+ assert_equal(0x20, msg.index)
37
+ assert_equal(0x30, msg.value)
38
+ assert_equal([0xB2, 0x20, 0x30], msg.to_a)
39
+ assert_equal("B22030", msg.to_bytestr)
40
+
41
+ end
42
+
43
+ def test_polyphonic_aftertouch
44
+ msg = with(:channel => 1) do
45
+ polyphonic_aftertouch(0x40, 0x40)
46
+ end
47
+ assert_equal(1, msg.channel)
48
+ assert_equal(0x40, msg.note)
49
+ assert_equal(0x40, msg.value)
50
+ assert_equal([0xA1, 0x40, 0x40], msg.to_a)
51
+ assert_equal("A14040", msg.to_bytestr)
52
+ end
53
+
54
+ def test_program_change
55
+ msg = with(:channel => 3) do
56
+ program_change(0x40)
57
+ end
58
+ assert_equal(3, msg.channel)
59
+ assert_equal(0x40, msg.program)
60
+ assert_equal([0xC3, 0x40], msg.to_a)
61
+ assert_equal("C340", msg.to_bytestr)
62
+
63
+ end
64
+
65
+ def test_channel_aftertouch
66
+ msg = with(:channel => 3) do
67
+ channel_aftertouch(0x50)
68
+ end
69
+ assert_equal(3, msg.channel)
70
+ assert_equal(0x50, msg.value)
71
+ assert_equal([0xD3, 0x50], msg.to_a)
72
+ assert_equal("D350", msg.to_bytestr)
73
+ end
74
+
75
+ def test_pitch_bend
76
+ msg = with(:channel => 0) do
77
+ pitch_bend(0x50, 0xA0)
78
+ end
79
+ assert_equal(0, msg.channel)
80
+ assert_equal(0x50, msg.low)
81
+ assert_equal(0xA0, msg.high)
82
+ assert_equal([0xE0, 0x50, 0xA0], msg.to_a)
83
+ assert_equal("E050A0", msg.to_bytestr)
84
+ end
85
+
86
+ end
@@ -0,0 +1,95 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'helper'
4
+
5
+ class FilterTest < Test::Unit::TestCase
6
+
7
+ include MIDIMessage
8
+ include MIDIMessage::Process
9
+ include TestHelper
10
+
11
+ def test_high_pass_note_reject
12
+ msg = MIDIMessage::NoteOn["C0"].new(0, 100)
13
+ assert_equal(12, msg.note)
14
+ outp = HighPassFilter.new(msg, :note, 20).process
15
+ assert_equal(nil, outp)
16
+ end
17
+
18
+ def test_high_pass_note_accept
19
+ msg = MIDIMessage::NoteOn["C4"].new(0, 100)
20
+ assert_equal(60, msg.note)
21
+ outp = HighPassFilter.new(msg, :note, 20).process
22
+ assert_equal(msg, outp)
23
+ end
24
+
25
+ def test_low_pass_note_reject
26
+ msg = MIDIMessage::NoteOn["C4"].new(0, 100)
27
+ assert_equal(60, msg.note)
28
+ outp = LowPassFilter.new(msg, :note, 50).process
29
+ assert_equal(nil, outp)
30
+ end
31
+
32
+ def test_low_pass_note_accept
33
+ msg = MIDIMessage::NoteOn["C4"].new(0, 100)
34
+ assert_equal(60, msg.note)
35
+ outp = LowPassFilter.new(msg, :note, 100).process
36
+ assert_equal(msg, outp)
37
+ end
38
+
39
+ def test_band_pass_note_reject
40
+ msg = MIDIMessage::NoteOn["C4"].new(0, 100)
41
+ assert_equal(60, msg.note)
42
+ outp = BandPassFilter.new(msg, :note, (20..50)).process
43
+ assert_equal(nil, outp)
44
+ end
45
+
46
+ def test_band_pass_note_accept
47
+ msg = MIDIMessage::NoteOn["C4"].new(0, 100)
48
+ assert_equal(60, msg.note)
49
+ outp = BandPassFilter.new(msg, :note, (20..100)).process
50
+ assert_equal(msg, outp)
51
+ end
52
+
53
+ def test_band_reject_note_reject
54
+ msg = MIDIMessage::NoteOn["C4"].new(0, 100)
55
+ assert_equal(60, msg.note)
56
+ outp = NotchFilter.new(msg, :note, (20..70)).process
57
+ assert_equal(nil, outp)
58
+ end
59
+
60
+ def test_band_reject_note_accept
61
+ msg = MIDIMessage::NoteOn["C4"].new(0, 100)
62
+ assert_equal(60, msg.note)
63
+ outp = NotchFilter.new(msg, :note, (20..50)).process
64
+ assert_equal(msg, outp)
65
+ end
66
+
67
+ def test_multiband_note_reject
68
+ msg = MIDIMessage::NoteOn["C4"].new(0, 100)
69
+ assert_equal(60, msg.note)
70
+ outp = Filter.new(msg, :note, [(20..30), (40..50)]).process
71
+ assert_equal(nil, outp)
72
+ end
73
+
74
+ def test_multiband_note_accept
75
+ msg = MIDIMessage::NoteOn["C4"].new(0, 100)
76
+ assert_equal(60, msg.note)
77
+ outp = Filter.new(msg, :note, [(20..30), (50..70)]).process
78
+ assert_equal(msg, outp)
79
+ end
80
+
81
+ def test_multinotch_note_reject
82
+ msg = MIDIMessage::NoteOn["C4"].new(0, 100)
83
+ assert_equal(60, msg.note)
84
+ outp = Filter.new(msg, :note, [(20..30), (55..65)], :reject => true).process
85
+ assert_equal(nil, outp)
86
+ end
87
+
88
+ def test_multinotch_note_accept
89
+ msg = MIDIMessage::NoteOn["C4"].new(0, 100)
90
+ assert_equal(60, msg.note)
91
+ outp = Filter.new(msg, :note, [(20..30), (40..50)], :reject => true).process
92
+ assert_equal(msg, outp)
93
+ end
94
+
95
+ end
@@ -0,0 +1,39 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'helper'
4
+
5
+ class LimitTest < Test::Unit::TestCase
6
+
7
+ include MIDIMessage
8
+ include MIDIMessage::Process
9
+ include TestHelper
10
+
11
+ def test_low_note
12
+ msg = MIDIMessage::NoteOn["C0"].new(0, 100)
13
+ assert_equal(12, msg.note)
14
+ Limit.new(msg, :note, (20..50)).process
15
+ assert_equal(20, msg.note)
16
+ end
17
+
18
+ def test_high_note
19
+ msg = MIDIMessage::NoteOn["C6"].new(0, 100)
20
+ assert_equal(84, msg.note)
21
+ Limit.new(msg, :note, (20..50)).process
22
+ assert_equal(50, msg.note)
23
+ end
24
+
25
+ def test_low_velocity
26
+ msg = MIDIMessage::NoteOn["C0"].new(0, 10)
27
+ assert_equal(10, msg.velocity)
28
+ Limit.new(msg, :velocity, (30..110)).process
29
+ assert_equal(30, msg.velocity)
30
+ end
31
+
32
+ def test_high_velocity
33
+ msg = MIDIMessage::NoteOn["C6"].new(0, 120)
34
+ assert_equal(120, msg.velocity)
35
+ Limit.new(msg, :velocity, (25..75)).process
36
+ assert_equal(75, msg.velocity)
37
+ end
38
+
39
+ end
@@ -0,0 +1,28 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'helper'
4
+
5
+ class MutabilityTest < Test::Unit::TestCase
6
+
7
+ include MIDIMessage
8
+ include TestHelper
9
+
10
+ def test_note
11
+ msg = NoteOn["E4"].new(0, 100)
12
+ assert_equal(0x40, msg.note)
13
+ assert_equal("E4", msg.name)
14
+ msg.note += 5
15
+ assert_equal(0x45, msg.note)
16
+ assert_equal("A4", msg.name)
17
+ end
18
+
19
+ def test_octave
20
+ msg = NoteOn["E4"].new(0, 100)
21
+ assert_equal(0x40, msg.note)
22
+ assert_equal("E4", msg.name)
23
+ msg.octave += 1
24
+ assert_equal(0x4C, msg.note)
25
+ assert_equal("E5", msg.name)
26
+ end
27
+
28
+ end
@@ -0,0 +1,72 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'helper'
4
+
5
+ class ParserTest < Test::Unit::TestCase
6
+
7
+ include MIDIMessage
8
+ include TestHelper
9
+
10
+ def test_sysex
11
+ msg = MIDIMessage.parse(0xF0, 0x41, 0x10, 0x42, 0x12, 0x40, 0x00, 0x7F, 0x00, 0x41, 0xF7)
12
+ assert_equal(SystemExclusive::Command, msg.class)
13
+ assert_equal(SystemExclusive::Node, msg.node.class)
14
+ assert_equal([0x40, 0x00, 0x7F], msg.address)
15
+ assert_equal([0xF0, 0x41, 0x10, 0x42, 0x12, 0x40, 0x00, 0x7F, 0x00, 0x41, 0xF7], msg.to_bytes)
16
+ end
17
+
18
+ def test_note_off
19
+ msg = MIDIMessage.parse(0x80, 0x40, 0x40)
20
+ assert_equal(NoteOff, msg.class)
21
+ assert_equal([0x80, 0x40, 0x40], msg.to_a)
22
+ end
23
+
24
+ def test_note_on
25
+ msg = MIDIMessage.parse(0x90, 0x40, 0x40)
26
+ assert_equal(NoteOn, msg.class)
27
+ assert_equal([0x90, 0x40, 0x40], msg.to_a)
28
+ end
29
+
30
+ def test_polyphonic_aftertouch
31
+ msg = MIDIMessage.parse(0xA1, 0x40, 0x40)
32
+ assert_equal(PolyphonicAftertouch, msg.class)
33
+ assert_equal([0xA1, 0x40, 0x40], msg.to_a)
34
+ end
35
+
36
+ def test_control_change
37
+ msg = MIDIMessage.parse(0xB2, 0x20, 0x20)
38
+ assert_equal(ControlChange, msg.class)
39
+ assert_equal([0xB2, 0x20, 0x20], msg.to_a)
40
+ end
41
+
42
+ def test_program_change
43
+ msg = MIDIMessage.parse(0xC3, 0x40)
44
+ assert_equal(ProgramChange, msg.class)
45
+ assert_equal("C340", msg.to_bytestr)
46
+ end
47
+
48
+ def test_channel_aftertouch
49
+ msg = MIDIMessage.parse("D350")
50
+ assert_equal(ChannelAftertouch, msg.class)
51
+ assert_equal([0xD3, 0x50], msg.to_a)
52
+ end
53
+
54
+ def test_pitch_bend
55
+ msg = MIDIMessage.parse("E050A0")
56
+ assert_equal(PitchBend, msg.class)
57
+ assert_equal([0xE0, 0x50, 0xA0], msg.to_a)
58
+ end
59
+
60
+ def test_system_common
61
+ msg = MIDIMessage.parse([0xF1, 0x50, 0xA0])
62
+ assert_equal(SystemCommon, msg.class)
63
+ assert_equal([0xF1, 0x50, 0xA0], msg.to_a)
64
+ end
65
+
66
+ def test_system_realtime
67
+ msg = MIDIMessage.parse(0xF8)
68
+ assert_equal(SystemRealtime, msg.class)
69
+ assert_equal([0xF8], msg.to_a)
70
+ end
71
+
72
+ end