midilib 2.0.4 → 2.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. checksums.yaml +7 -0
  2. data/README.rdoc +9 -4
  3. data/Rakefile +2 -6
  4. data/examples/from_scratch.rb +3 -5
  5. data/examples/measures_mbt.rb +4 -4
  6. data/examples/print_program_changes.rb +9 -9
  7. data/examples/reader2text.rb +188 -188
  8. data/examples/seq2text.rb +17 -17
  9. data/examples/split.rb +19 -19
  10. data/examples/strings.rb +14 -14
  11. data/examples/transpose.rb +31 -31
  12. data/html/IO.html +65 -169
  13. data/html/MIDI.html +138 -256
  14. data/html/MIDI/ActiveSense.html +89 -178
  15. data/html/MIDI/ChannelEvent.html +95 -183
  16. data/html/MIDI/ChannelPressure.html +105 -190
  17. data/html/MIDI/Clock.html +89 -178
  18. data/html/MIDI/Continue.html +89 -178
  19. data/html/MIDI/Controller.html +107 -192
  20. data/html/MIDI/Event.html +138 -222
  21. data/html/MIDI/IO.html +45 -157
  22. data/html/MIDI/IO/MIDIFile.html +596 -568
  23. data/html/MIDI/IO/SeqReader.html +272 -314
  24. data/html/MIDI/IO/SeqWriter.html +229 -305
  25. data/html/MIDI/KeySig.html +129 -211
  26. data/html/MIDI/MIDI.html +45 -154
  27. data/html/MIDI/MIDI/MIDI.html +45 -154
  28. data/html/MIDI/MIDI/MIDI/Array.html +87 -185
  29. data/html/MIDI/Marker.html +71 -170
  30. data/html/MIDI/Measure.html +95 -190
  31. data/html/MIDI/Measures.html +103 -193
  32. data/html/MIDI/MetaEvent.html +180 -253
  33. data/html/MIDI/NoteEvent.html +118 -204
  34. data/html/MIDI/NoteOff.html +95 -183
  35. data/html/MIDI/NoteOn.html +95 -183
  36. data/html/MIDI/PitchBend.html +106 -191
  37. data/html/MIDI/PolyPressure.html +106 -189
  38. data/html/MIDI/ProgramChange.html +105 -190
  39. data/html/MIDI/Realtime.html +98 -184
  40. data/html/MIDI/Sequence.html +246 -311
  41. data/html/MIDI/SongPointer.html +106 -191
  42. data/html/MIDI/SongSelect.html +105 -190
  43. data/html/MIDI/Start.html +89 -178
  44. data/html/MIDI/Stop.html +89 -178
  45. data/html/MIDI/SystemCommon.html +71 -170
  46. data/html/MIDI/SystemExclusive.html +108 -193
  47. data/html/MIDI/SystemReset.html +89 -178
  48. data/html/MIDI/Tempo.html +135 -213
  49. data/html/MIDI/TimeSig.html +135 -214
  50. data/html/MIDI/Track.html +217 -291
  51. data/html/MIDI/TuneRequest.html +98 -184
  52. data/html/MIDI/Utils.html +89 -189
  53. data/html/README_rdoc.html +237 -257
  54. data/html/TODO_rdoc.html +64 -139
  55. data/html/created.rid +14 -14
  56. data/html/css/fonts.css +167 -0
  57. data/html/{rdoc.css → css/rdoc.css} +265 -218
  58. data/html/fonts/Lato-Light.ttf +0 -0
  59. data/html/fonts/Lato-LightItalic.ttf +0 -0
  60. data/html/fonts/Lato-Regular.ttf +0 -0
  61. data/html/fonts/Lato-RegularItalic.ttf +0 -0
  62. data/html/fonts/SourceCodePro-Bold.ttf +0 -0
  63. data/html/fonts/SourceCodePro-Regular.ttf +0 -0
  64. data/html/images/add.png +0 -0
  65. data/html/images/arrow_up.png +0 -0
  66. data/html/images/delete.png +0 -0
  67. data/html/images/tag_blue.png +0 -0
  68. data/html/index.html +187 -169
  69. data/html/js/darkfish.js +41 -33
  70. data/html/js/jquery.js +4 -18
  71. data/html/js/navigation.js.gz +0 -0
  72. data/html/js/search.js +20 -5
  73. data/html/js/search_index.js +1 -1
  74. data/html/js/search_index.js.gz +0 -0
  75. data/html/js/searcher.js.gz +0 -0
  76. data/html/table_of_contents.html +1111 -498
  77. data/install.rb +43 -32
  78. data/lib/midilib/consts.rb +407 -407
  79. data/lib/midilib/event.rb +295 -294
  80. data/lib/midilib/info.rb +5 -5
  81. data/lib/midilib/io/midifile.rb +266 -267
  82. data/lib/midilib/io/seqreader.rb +106 -106
  83. data/lib/midilib/io/seqwriter.rb +59 -60
  84. data/lib/midilib/measure.rb +69 -69
  85. data/lib/midilib/sequence.rb +68 -70
  86. data/lib/midilib/track.rb +96 -102
  87. data/lib/midilib/utils.rb +15 -15
  88. data/test/event_equality.rb +50 -50
  89. data/test/test_event.rb +120 -122
  90. data/test/test_io.rb +35 -48
  91. data/test/test_sequence.rb +60 -60
  92. data/test/test_track.rb +154 -154
  93. data/test/test_varlen.rb +23 -25
  94. metadata +65 -57
@@ -2,209 +2,102 @@
2
2
 
3
3
  <html>
4
4
  <head>
5
- <meta content="text/html; charset=US-ASCII" http-equiv="Content-Type">
5
+ <meta charset="UTF-8">
6
6
 
7
7
  <title>class MIDI::MetaEvent - midilib</title>
8
8
 
9
- <link type="text/css" media="screen" href="../rdoc.css" rel="stylesheet">
10
-
11
9
  <script type="text/javascript">
12
10
  var rdoc_rel_prefix = "../";
13
11
  </script>
14
12
 
15
- <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
16
- <script type="text/javascript" charset="utf-8" src="../js/navigation.js"></script>
17
- <script type="text/javascript" charset="utf-8" src="../js/search_index.js"></script>
18
- <script type="text/javascript" charset="utf-8" src="../js/search.js"></script>
19
- <script type="text/javascript" charset="utf-8" src="../js/searcher.js"></script>
20
- <script type="text/javascript" charset="utf-8" src="../js/darkfish.js"></script>
13
+ <script src="../js/jquery.js"></script>
14
+ <script src="../js/darkfish.js"></script>
15
+
16
+ <link href="../css/fonts.css" rel="stylesheet">
17
+ <link href="../css/rdoc.css" rel="stylesheet">
18
+
19
+
21
20
 
21
+ <body id="top" role="document" class="class">
22
+ <nav role="navigation">
23
+ <div id="project-navigation">
24
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
25
+ <h2>
26
+ <a href="../index.html" rel="home">Home</a>
27
+ </h2>
22
28
 
23
- <body id="top" class="class">
24
- <nav id="metadata">
25
- <nav id="home-section" class="section">
26
- <h3 class="section-header">
27
- <a href="../index.html">Home</a>
29
+ <div id="table-of-contents-navigation">
30
+ <a href="../table_of_contents.html#pages">Pages</a>
28
31
  <a href="../table_of_contents.html#classes">Classes</a>
29
32
  <a href="../table_of_contents.html#methods">Methods</a>
30
- </h3>
31
- </nav>
32
-
33
+ </div>
34
+ </div>
33
35
 
34
- <nav id="search-section" class="section project-section" class="initially-hidden">
36
+ <div id="search-section" role="search" class="project-section initially-hidden">
35
37
  <form action="#" method="get" accept-charset="utf-8">
36
- <h3 class="section-header">
37
- <input type="text" name="search" placeholder="Search" id="search-field"
38
+ <div id="search-field-wrapper">
39
+ <input id="search-field" role="combobox" aria-label="Search"
40
+ aria-autocomplete="list" aria-controls="search-results"
41
+ type="text" name="search" placeholder="Search" spellcheck="false"
38
42
  title="Type to search, Up and Down to navigate, Enter to load">
39
- </h3>
40
- </form>
41
-
42
- <ul id="search-results" class="initially-hidden"></ul>
43
- </nav>
44
-
43
+ </div>
45
44
 
46
- <div id="file-metadata">
47
- <nav id="file-list-section" class="section">
48
- <h3 class="section-header">Defined In</h3>
49
- <ul>
50
- <li>lib/midilib/event.rb
51
- </ul>
52
- </nav>
45
+ <ul id="search-results" aria-label="Search Results"
46
+ aria-busy="false" aria-expanded="false"
47
+ aria-atomic="false" class="initially-hidden"></ul>
48
+ </form>
49
+ </div>
53
50
 
54
-
55
51
  </div>
56
52
 
53
+
54
+
57
55
  <div id="class-metadata">
58
56
 
59
- <nav id="parent-class-section" class="section">
60
- <h3 class="section-header">Parent</h3>
57
+ <div id="parent-class-section" class="nav-section">
58
+ <h3>Parent</h3>
59
+
61
60
 
62
61
  <p class="link"><a href="Event.html">MIDI::Event</a>
63
62
 
64
- </nav>
63
+ </div>
65
64
 
66
65
 
66
+
67
67
  <!-- Method Quickref -->
68
- <nav id="method-list-section" class="section">
69
- <h3 class="section-header">Methods</h3>
68
+ <div id="method-list-section" class="nav-section">
69
+ <h3>Methods</h3>
70
70
 
71
- <ul class="link-list">
71
+ <ul class="link-list" role="directory">
72
72
 
73
- <li><a href="#method-c-bytes_as_str">::bytes_as_str</a>
73
+ <li ><a href="#method-c-bytes_as_str">::bytes_as_str</a>
74
74
 
75
- <li><a href="#method-c-new">::new</a>
75
+ <li class="calls-super" ><a href="#method-c-new">::new</a>
76
76
 
77
- <li><a href="#method-c-str_as_bytes">::str_as_bytes</a>
77
+ <li ><a href="#method-c-str_as_bytes">::str_as_bytes</a>
78
78
 
79
- <li><a href="#method-i-data-3D">#data=</a>
79
+ <li ><a href="#method-i-data-3D">#data=</a>
80
80
 
81
- <li><a href="#method-i-data_as_bytes">#data_as_bytes</a>
81
+ <li ><a href="#method-i-data_as_bytes">#data_as_bytes</a>
82
82
 
83
- <li><a href="#method-i-data_as_str">#data_as_str</a>
83
+ <li ><a href="#method-i-data_as_str">#data_as_str</a>
84
84
 
85
- <li><a href="#method-i-to_s">#to_s</a>
85
+ <li class="calls-super" ><a href="#method-i-to_s">#to_s</a>
86
86
 
87
87
  </ul>
88
- </nav>
88
+ </div>
89
89
 
90
90
  </div>
91
-
92
- <div id="project-metadata">
93
- <nav id="fileindex-section" class="section project-section">
94
- <h3 class="section-header">Pages</h3>
95
-
96
- <ul>
97
-
98
- <li class="file"><a href="../README_rdoc.html">README</a>
99
-
100
- <li class="file"><a href="../TODO_rdoc.html">TODO</a>
101
-
102
- </ul>
103
91
  </nav>
104
92
 
105
- <nav id="classindex-section" class="section project-section">
106
- <h3 class="section-header">Class and Module Index</h3>
93
+ <main role="main" aria-labelledby="class-MIDI::MetaEvent">
94
+ <h1 id="class-MIDI::MetaEvent" class="class">
95
+ class MIDI::MetaEvent
96
+ </h1>
107
97
 
108
- <ul class="link-list">
109
-
110
- <li><a href="../MIDI.html">MIDI</a>
111
-
112
- <li><a href="../MIDI/ActiveSense.html">MIDI::ActiveSense</a>
113
-
114
- <li><a href="../MIDI/ChannelEvent.html">MIDI::ChannelEvent</a>
115
-
116
- <li><a href="../MIDI/ChannelPressure.html">MIDI::ChannelPressure</a>
117
-
118
- <li><a href="../MIDI/Clock.html">MIDI::Clock</a>
119
-
120
- <li><a href="../MIDI/Continue.html">MIDI::Continue</a>
121
-
122
- <li><a href="../MIDI/Controller.html">MIDI::Controller</a>
123
-
124
- <li><a href="../MIDI/Event.html">MIDI::Event</a>
125
-
126
- <li><a href="../MIDI/IO.html">MIDI::IO</a>
127
-
128
- <li><a href="../MIDI/IO/MIDIFile.html">MIDI::IO::MIDIFile</a>
129
-
130
- <li><a href="../MIDI/IO/SeqReader.html">MIDI::IO::SeqReader</a>
131
-
132
- <li><a href="../MIDI/IO/SeqWriter.html">MIDI::IO::SeqWriter</a>
133
-
134
- <li><a href="../MIDI/KeySig.html">MIDI::KeySig</a>
135
-
136
- <li><a href="../MIDI/MIDI.html">MIDI::MIDI</a>
137
-
138
- <li><a href="../MIDI/MIDI/MIDI.html">MIDI::MIDI::MIDI</a>
139
-
140
- <li><a href="../MIDI/MIDI/MIDI/Array.html">MIDI::MIDI::MIDI::Array</a>
141
-
142
- <li><a href="../MIDI/Marker.html">MIDI::Marker</a>
143
-
144
- <li><a href="../MIDI/Measure.html">MIDI::Measure</a>
145
-
146
- <li><a href="../MIDI/Measures.html">MIDI::Measures</a>
147
-
148
- <li><a href="../MIDI/MetaEvent.html">MIDI::MetaEvent</a>
149
-
150
- <li><a href="../MIDI/NoteEvent.html">MIDI::NoteEvent</a>
151
-
152
- <li><a href="../MIDI/NoteOff.html">MIDI::NoteOff</a>
153
-
154
- <li><a href="../MIDI/NoteOff.html">MIDI::NoteOffEvent</a>
155
-
156
- <li><a href="../MIDI/NoteOn.html">MIDI::NoteOn</a>
157
-
158
- <li><a href="../MIDI/NoteOn.html">MIDI::NoteOnEvent</a>
159
-
160
- <li><a href="../MIDI/PitchBend.html">MIDI::PitchBend</a>
161
-
162
- <li><a href="../MIDI/PolyPressure.html">MIDI::PolyPressure</a>
163
-
164
- <li><a href="../MIDI/ProgramChange.html">MIDI::ProgramChange</a>
165
-
166
- <li><a href="../MIDI/Realtime.html">MIDI::Realtime</a>
167
-
168
- <li><a href="../MIDI/Sequence.html">MIDI::Sequence</a>
169
-
170
- <li><a href="../MIDI/SongPointer.html">MIDI::SongPointer</a>
171
-
172
- <li><a href="../MIDI/SongSelect.html">MIDI::SongSelect</a>
173
-
174
- <li><a href="../MIDI/Start.html">MIDI::Start</a>
175
-
176
- <li><a href="../MIDI/Stop.html">MIDI::Stop</a>
177
-
178
- <li><a href="../MIDI/SystemCommon.html">MIDI::SystemCommon</a>
179
-
180
- <li><a href="../MIDI/SystemExclusive.html">MIDI::SystemExclusive</a>
181
-
182
- <li><a href="../MIDI/SystemReset.html">MIDI::SystemReset</a>
183
-
184
- <li><a href="../MIDI/Tempo.html">MIDI::Tempo</a>
185
-
186
- <li><a href="../MIDI/TimeSig.html">MIDI::TimeSig</a>
187
-
188
- <li><a href="../MIDI/Track.html">MIDI::Track</a>
189
-
190
- <li><a href="../MIDI/TuneRequest.html">MIDI::TuneRequest</a>
191
-
192
- <li><a href="../MIDI/Utils.html">MIDI::Utils</a>
193
-
194
- <li><a href="../IO.html">IO</a>
195
-
196
- </ul>
197
- </nav>
198
-
199
- </div>
200
- </nav>
201
-
202
- <div id="documentation">
203
- <h1 class="class">class MIDI::MetaEvent</h1>
204
-
205
- <div id="description" class="description">
98
+ <section class="description">
206
99
 
207
- </div><!-- description -->
100
+ </section>
208
101
 
209
102
 
210
103
 
@@ -217,9 +110,10 @@
217
110
 
218
111
 
219
112
 
220
- <!-- Attributes -->
221
- <section id="attribute-method-details" class="method-section section">
222
- <h3 class="section-header">Attributes</h3>
113
+ <section class="attribute-method-details" class="method-section">
114
+ <header>
115
+ <h3>Attributes</h3>
116
+ </header>
223
117
 
224
118
 
225
119
  <div id="attribute-i-data" class="method-detail">
@@ -248,13 +142,14 @@
248
142
  </div>
249
143
  </div>
250
144
 
251
- </section><!-- attribute-method-details -->
145
+ </section>
252
146
 
253
147
 
254
- <!-- Methods -->
255
148
 
256
- <section id="public-class-5Buntitled-5D-method-details" class="method-section section">
257
- <h3 class="section-header">Public Class Methods</h3>
149
+ <section id="public-class-5Buntitled-5D-method-details" class="method-section">
150
+ <header>
151
+ <h3>Public Class Methods</h3>
152
+ </header>
258
153
 
259
154
 
260
155
  <div id="method-c-bytes_as_str" class="method-detail ">
@@ -262,7 +157,9 @@
262
157
  <div class="method-heading">
263
158
  <span class="method-name">bytes_as_str</span><span
264
159
  class="method-args">(bytes)</span>
160
+
265
161
  <span class="method-click-advice">click to toggle source</span>
162
+
266
163
  </div>
267
164
 
268
165
 
@@ -270,21 +167,22 @@
270
167
 
271
168
 
272
169
 
170
+
273
171
 
274
172
 
275
173
  <div class="method-source-code" id="bytes_as_str-source">
276
- <pre><span class="ruby-comment"># File lib/midilib/event.rb, line 415</span>
174
+ <pre><span class="ruby-comment"># File lib/midilib/event.rb, line 416</span>
277
175
  <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">bytes_as_str</span>(<span class="ruby-identifier">bytes</span>)
278
- <span class="ruby-identifier">bytes</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">bytes</span>.<span class="ruby-identifier">collect</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">byte</span><span class="ruby-operator">|</span> <span class="ruby-identifier">byte</span>.<span class="ruby-identifier">chr</span> }.<span class="ruby-identifier">join</span> <span class="ruby-operator">:</span> <span class="ruby-keyword">nil</span>
176
+ <span class="ruby-identifier">bytes</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">bytes</span>.<span class="ruby-identifier">collect</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">byte</span><span class="ruby-operator">|</span> <span class="ruby-identifier">byte</span>.<span class="ruby-identifier">chr</span> }.<span class="ruby-identifier">join</span> <span class="ruby-operator">:</span> <span class="ruby-keyword">nil</span>
279
177
  <span class="ruby-keyword">end</span></pre>
280
- </div><!-- bytes_as_str-source -->
178
+ </div>
281
179
 
282
180
  </div>
283
181
 
284
182
 
285
183
 
286
184
 
287
- </div><!-- bytes_as_str-method -->
185
+ </div>
288
186
 
289
187
 
290
188
  <div id="method-c-new" class="method-detail ">
@@ -292,7 +190,9 @@
292
190
  <div class="method-heading">
293
191
  <span class="method-name">new</span><span
294
192
  class="method-args">(meta_type, data = nil, delta_time = 0)</span>
193
+
295
194
  <span class="method-click-advice">click to toggle source</span>
195
+
296
196
  </div>
297
197
 
298
198
 
@@ -300,23 +200,29 @@
300
200
 
301
201
 
302
202
 
203
+
204
+ <div class="method-calls-super">
205
+ Calls superclass method
206
+ <a href="Event.html#method-c-new">MIDI::Event.new</a>
207
+ </div>
208
+
303
209
 
304
210
 
305
211
  <div class="method-source-code" id="new-source">
306
- <pre><span class="ruby-comment"># File lib/midilib/event.rb, line 429</span>
212
+ <pre><span class="ruby-comment"># File lib/midilib/event.rb, line 430</span>
307
213
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">meta_type</span>, <span class="ruby-identifier">data</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">delta_time</span> = <span class="ruby-value">0</span>)
308
- <span class="ruby-keyword">super</span>(<span class="ruby-constant">META_EVENT</span>, <span class="ruby-identifier">delta_time</span>)
309
- <span class="ruby-ivar">@meta_type</span> = <span class="ruby-identifier">meta_type</span>
310
- <span class="ruby-keyword">self</span>.<span class="ruby-identifier">data</span>=(<span class="ruby-identifier">data</span>)
214
+ <span class="ruby-keyword">super</span>(<span class="ruby-constant">META_EVENT</span>, <span class="ruby-identifier">delta_time</span>)
215
+ <span class="ruby-ivar">@meta_type</span> = <span class="ruby-identifier">meta_type</span>
216
+ <span class="ruby-keyword">self</span>.<span class="ruby-identifier">data</span>=(<span class="ruby-identifier">data</span>)
311
217
  <span class="ruby-keyword">end</span></pre>
312
- </div><!-- new-source -->
218
+ </div>
313
219
 
314
220
  </div>
315
221
 
316
222
 
317
223
 
318
224
 
319
- </div><!-- new-method -->
225
+ </div>
320
226
 
321
227
 
322
228
  <div id="method-c-str_as_bytes" class="method-detail ">
@@ -324,7 +230,9 @@
324
230
  <div class="method-heading">
325
231
  <span class="method-name">str_as_bytes</span><span
326
232
  class="method-args">(str)</span>
233
+
327
234
  <span class="method-click-advice">click to toggle source</span>
235
+
328
236
  </div>
329
237
 
330
238
 
@@ -332,27 +240,30 @@
332
240
 
333
241
 
334
242
 
243
+
335
244
 
336
245
 
337
246
  <div class="method-source-code" id="str_as_bytes-source">
338
- <pre><span class="ruby-comment"># File lib/midilib/event.rb, line 420</span>
247
+ <pre><span class="ruby-comment"># File lib/midilib/event.rb, line 421</span>
339
248
  <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">str_as_bytes</span>(<span class="ruby-identifier">str</span>)
340
- <span class="ruby-identifier">str</span>.<span class="ruby-identifier">split</span>(<span class="ruby-regexp">%r/</span>).<span class="ruby-identifier">collect</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">chr</span><span class="ruby-operator">|</span> <span class="ruby-identifier">chr</span>.<span class="ruby-identifier">ord</span> }
249
+ <span class="ruby-identifier">str</span>.<span class="ruby-identifier">split</span>(<span class="ruby-regexp">//</span>).<span class="ruby-identifier">collect</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">chr</span><span class="ruby-operator">|</span> <span class="ruby-identifier">chr</span>.<span class="ruby-identifier">ord</span> }
341
250
  <span class="ruby-keyword">end</span></pre>
342
- </div><!-- str_as_bytes-source -->
251
+ </div>
343
252
 
344
253
  </div>
345
254
 
346
255
 
347
256
 
348
257
 
349
- </div><!-- str_as_bytes-method -->
258
+ </div>
350
259
 
351
260
 
352
- </section><!-- public-class-method-details -->
261
+ </section>
353
262
 
354
- <section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
355
- <h3 class="section-header">Public Instance Methods</h3>
263
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
264
+ <header>
265
+ <h3>Public Instance Methods</h3>
266
+ </header>
356
267
 
357
268
 
358
269
  <div id="method-i-data-3D" class="method-detail ">
@@ -360,7 +271,9 @@
360
271
  <div class="method-heading">
361
272
  <span class="method-name">data=</span><span
362
273
  class="method-args">(data)</span>
274
+
363
275
  <span class="method-click-advice">click to toggle source</span>
276
+
364
277
  </div>
365
278
 
366
279
 
@@ -368,26 +281,27 @@
368
281
 
369
282
  <p>Stores bytes. If data is a string, splits it into an array of bytes.</p>
370
283
 
284
+
371
285
 
372
286
 
373
287
  <div class="method-source-code" id="data-3D-source">
374
- <pre><span class="ruby-comment"># File lib/midilib/event.rb, line 449</span>
288
+ <pre><span class="ruby-comment"># File lib/midilib/event.rb, line 450</span>
375
289
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">data=</span>(<span class="ruby-identifier">data</span>)
376
- <span class="ruby-keyword">case</span> <span class="ruby-identifier">data</span>
377
- <span class="ruby-keyword">when</span> <span class="ruby-constant">String</span>
378
- <span class="ruby-ivar">@data</span> = <span class="ruby-constant">MetaEvent</span>.<span class="ruby-identifier">str_as_bytes</span>(<span class="ruby-identifier">data</span>)
379
- <span class="ruby-keyword">else</span>
380
- <span class="ruby-ivar">@data</span> = <span class="ruby-identifier">data</span>
381
- <span class="ruby-keyword">end</span>
290
+ <span class="ruby-keyword">case</span> <span class="ruby-identifier">data</span>
291
+ <span class="ruby-keyword">when</span> <span class="ruby-constant">String</span>
292
+ <span class="ruby-ivar">@data</span> = <span class="ruby-constant">MetaEvent</span>.<span class="ruby-identifier">str_as_bytes</span>(<span class="ruby-identifier">data</span>)
293
+ <span class="ruby-keyword">else</span>
294
+ <span class="ruby-ivar">@data</span> = <span class="ruby-identifier">data</span>
295
+ <span class="ruby-keyword">end</span>
382
296
  <span class="ruby-keyword">end</span></pre>
383
- </div><!-- data-3D-source -->
297
+ </div>
384
298
 
385
299
  </div>
386
300
 
387
301
 
388
302
 
389
303
 
390
- </div><!-- data-3D-method -->
304
+ </div>
391
305
 
392
306
 
393
307
  <div id="method-i-data_as_bytes" class="method-detail ">
@@ -395,7 +309,9 @@
395
309
  <div class="method-heading">
396
310
  <span class="method-name">data_as_bytes</span><span
397
311
  class="method-args">()</span>
312
+
398
313
  <span class="method-click-advice">click to toggle source</span>
314
+
399
315
  </div>
400
316
 
401
317
 
@@ -403,26 +319,27 @@
403
319
 
404
320
 
405
321
 
322
+
406
323
 
407
324
 
408
325
  <div class="method-source-code" id="data_as_bytes-source">
409
- <pre><span class="ruby-comment"># File lib/midilib/event.rb, line 435</span>
326
+ <pre><span class="ruby-comment"># File lib/midilib/event.rb, line 436</span>
410
327
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">data_as_bytes</span>
411
- <span class="ruby-identifier">data</span> = []
412
- <span class="ruby-identifier">data</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@status</span>
413
- <span class="ruby-identifier">data</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@meta_type</span>
414
- <span class="ruby-identifier">data</span> <span class="ruby-operator">&lt;&lt;</span> (<span class="ruby-ivar">@data</span> <span class="ruby-operator">?</span> <span class="ruby-constant">Utils</span>.<span class="ruby-identifier">as_var_len</span>(<span class="ruby-ivar">@data</span>.<span class="ruby-identifier">length</span>) <span class="ruby-operator">:</span> <span class="ruby-value">0</span>)
415
- <span class="ruby-identifier">data</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@data</span> <span class="ruby-keyword">if</span> <span class="ruby-ivar">@data</span>
416
- <span class="ruby-identifier">data</span>.<span class="ruby-identifier">flatten</span>
328
+ <span class="ruby-identifier">data</span> = []
329
+ <span class="ruby-identifier">data</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@status</span>
330
+ <span class="ruby-identifier">data</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@meta_type</span>
331
+ <span class="ruby-identifier">data</span> <span class="ruby-operator">&lt;&lt;</span> (<span class="ruby-ivar">@data</span> <span class="ruby-operator">?</span> <span class="ruby-constant">Utils</span>.<span class="ruby-identifier">as_var_len</span>(<span class="ruby-ivar">@data</span>.<span class="ruby-identifier">length</span>) <span class="ruby-operator">:</span> <span class="ruby-value">0</span>)
332
+ <span class="ruby-identifier">data</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@data</span> <span class="ruby-keyword">if</span> <span class="ruby-ivar">@data</span>
333
+ <span class="ruby-identifier">data</span>.<span class="ruby-identifier">flatten</span>
417
334
  <span class="ruby-keyword">end</span></pre>
418
- </div><!-- data_as_bytes-source -->
335
+ </div>
419
336
 
420
337
  </div>
421
338
 
422
339
 
423
340
 
424
341
 
425
- </div><!-- data_as_bytes-method -->
342
+ </div>
426
343
 
427
344
 
428
345
  <div id="method-i-data_as_str" class="method-detail ">
@@ -430,7 +347,9 @@
430
347
  <div class="method-heading">
431
348
  <span class="method-name">data_as_str</span><span
432
349
  class="method-args">()</span>
350
+
433
351
  <span class="method-click-advice">click to toggle source</span>
352
+
434
353
  </div>
435
354
 
436
355
 
@@ -438,21 +357,22 @@
438
357
 
439
358
 
440
359
 
360
+
441
361
 
442
362
 
443
363
  <div class="method-source-code" id="data_as_str-source">
444
- <pre><span class="ruby-comment"># File lib/midilib/event.rb, line 444</span>
364
+ <pre><span class="ruby-comment"># File lib/midilib/event.rb, line 445</span>
445
365
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">data_as_str</span>
446
- <span class="ruby-constant">MetaEvent</span>.<span class="ruby-identifier">bytes_as_str</span>(<span class="ruby-ivar">@data</span>)
366
+ <span class="ruby-constant">MetaEvent</span>.<span class="ruby-identifier">bytes_as_str</span>(<span class="ruby-ivar">@data</span>)
447
367
  <span class="ruby-keyword">end</span></pre>
448
- </div><!-- data_as_str-source -->
368
+ </div>
449
369
 
450
370
  </div>
451
371
 
452
372
 
453
373
 
454
374
 
455
- </div><!-- data_as_str-method -->
375
+ </div>
456
376
 
457
377
 
458
378
  <div id="method-i-to_s" class="method-detail ">
@@ -460,7 +380,9 @@
460
380
  <div class="method-heading">
461
381
  <span class="method-name">to_s</span><span
462
382
  class="method-args">()</span>
383
+
463
384
  <span class="method-click-advice">click to toggle source</span>
385
+
464
386
  </div>
465
387
 
466
388
 
@@ -468,67 +390,72 @@
468
390
 
469
391
 
470
392
 
393
+
394
+ <div class="method-calls-super">
395
+ Calls superclass method
396
+ <a href="Event.html#method-i-to_s">MIDI::Event#to_s</a>
397
+ </div>
398
+
471
399
 
472
400
 
473
401
  <div class="method-source-code" id="to_s-source">
474
- <pre><span class="ruby-comment"># File lib/midilib/event.rb, line 458</span>
402
+ <pre><span class="ruby-comment"># File lib/midilib/event.rb, line 459</span>
475
403
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">to_s</span>
476
- <span class="ruby-identifier">str</span> = <span class="ruby-keyword">super</span>()
477
- <span class="ruby-identifier">str</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;meta #{number_to_s(@meta_type)} &quot;</span>
478
- <span class="ruby-comment"># I know, I know...this isn't OO.</span>
479
- <span class="ruby-keyword">case</span> <span class="ruby-ivar">@meta_type</span>
480
- <span class="ruby-keyword">when</span> <span class="ruby-constant">META_SEQ_NUM</span>
481
- <span class="ruby-identifier">str</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;sequence number&quot;</span>
482
- <span class="ruby-keyword">when</span> <span class="ruby-constant">META_TEXT</span>
483
- <span class="ruby-identifier">str</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;text: #{data_as_str}&quot;</span>
484
- <span class="ruby-keyword">when</span> <span class="ruby-constant">META_COPYRIGHT</span>
485
- <span class="ruby-identifier">str</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;copyright: #{data_as_str}&quot;</span>
486
- <span class="ruby-keyword">when</span> <span class="ruby-constant">META_SEQ_NAME</span>
487
- <span class="ruby-identifier">str</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;sequence or track name: #{data_as_str}&quot;</span>
488
- <span class="ruby-keyword">when</span> <span class="ruby-constant">META_INSTRUMENT</span>
489
- <span class="ruby-identifier">str</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;instrument name: #{data_as_str}&quot;</span>
490
- <span class="ruby-keyword">when</span> <span class="ruby-constant">META_LYRIC</span>
491
- <span class="ruby-identifier">str</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;lyric: #{data_as_str}&quot;</span>
492
- <span class="ruby-keyword">when</span> <span class="ruby-constant">META_MARKER</span>
493
- <span class="ruby-identifier">str</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;marker: #{data_as_str}&quot;</span>
494
- <span class="ruby-keyword">when</span> <span class="ruby-constant">META_CUE</span>
495
- <span class="ruby-identifier">str</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;cue point: #{@data}&quot;</span>
496
- <span class="ruby-keyword">when</span> <span class="ruby-constant">META_TRACK_END</span>
497
- <span class="ruby-identifier">str</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;track end&quot;</span>
498
- <span class="ruby-keyword">when</span> <span class="ruby-constant">META_SMPTE</span>
499
- <span class="ruby-identifier">str</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;smpte&quot;</span>
500
- <span class="ruby-keyword">when</span> <span class="ruby-constant">META_TIME_SIG</span>
501
- <span class="ruby-identifier">str</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;time signature&quot;</span>
502
- <span class="ruby-keyword">when</span> <span class="ruby-constant">META_KEY_SIG</span>
503
- <span class="ruby-identifier">str</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;key signature&quot;</span>
504
- <span class="ruby-keyword">when</span> <span class="ruby-constant">META_SEQ_SPECIF</span>
505
- <span class="ruby-identifier">str</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;sequence specific&quot;</span>
506
- <span class="ruby-keyword">else</span>
507
- <span class="ruby-comment"># Some other possible @meta_type values are handled by subclasses.</span>
508
- <span class="ruby-identifier">str</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;(other)&quot;</span>
509
- <span class="ruby-keyword">end</span>
510
- <span class="ruby-keyword">return</span> <span class="ruby-identifier">str</span>
404
+ <span class="ruby-identifier">str</span> = <span class="ruby-keyword">super</span>()
405
+ <span class="ruby-identifier">str</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;meta #{number_to_s(@meta_type)} &quot;</span>
406
+ <span class="ruby-comment"># I know, I know...this isn&#39;t OO.</span>
407
+ <span class="ruby-keyword">case</span> <span class="ruby-ivar">@meta_type</span>
408
+ <span class="ruby-keyword">when</span> <span class="ruby-constant">META_SEQ_NUM</span>
409
+ <span class="ruby-identifier">str</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;sequence number&quot;</span>
410
+ <span class="ruby-keyword">when</span> <span class="ruby-constant">META_TEXT</span>
411
+ <span class="ruby-identifier">str</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;text: #{data_as_str}&quot;</span>
412
+ <span class="ruby-keyword">when</span> <span class="ruby-constant">META_COPYRIGHT</span>
413
+ <span class="ruby-identifier">str</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;copyright: #{data_as_str}&quot;</span>
414
+ <span class="ruby-keyword">when</span> <span class="ruby-constant">META_SEQ_NAME</span>
415
+ <span class="ruby-identifier">str</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;sequence or track name: #{data_as_str}&quot;</span>
416
+ <span class="ruby-keyword">when</span> <span class="ruby-constant">META_INSTRUMENT</span>
417
+ <span class="ruby-identifier">str</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;instrument name: #{data_as_str}&quot;</span>
418
+ <span class="ruby-keyword">when</span> <span class="ruby-constant">META_LYRIC</span>
419
+ <span class="ruby-identifier">str</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;lyric: #{data_as_str}&quot;</span>
420
+ <span class="ruby-keyword">when</span> <span class="ruby-constant">META_MARKER</span>
421
+ <span class="ruby-identifier">str</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;marker: #{data_as_str}&quot;</span>
422
+ <span class="ruby-keyword">when</span> <span class="ruby-constant">META_CUE</span>
423
+ <span class="ruby-identifier">str</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;cue point: #{@data}&quot;</span>
424
+ <span class="ruby-keyword">when</span> <span class="ruby-constant">META_TRACK_END</span>
425
+ <span class="ruby-identifier">str</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;track end&quot;</span>
426
+ <span class="ruby-keyword">when</span> <span class="ruby-constant">META_SMPTE</span>
427
+ <span class="ruby-identifier">str</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;smpte&quot;</span>
428
+ <span class="ruby-keyword">when</span> <span class="ruby-constant">META_TIME_SIG</span>
429
+ <span class="ruby-identifier">str</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;time signature&quot;</span>
430
+ <span class="ruby-keyword">when</span> <span class="ruby-constant">META_KEY_SIG</span>
431
+ <span class="ruby-identifier">str</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;key signature&quot;</span>
432
+ <span class="ruby-keyword">when</span> <span class="ruby-constant">META_SEQ_SPECIF</span>
433
+ <span class="ruby-identifier">str</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;sequence specific&quot;</span>
434
+ <span class="ruby-keyword">else</span>
435
+ <span class="ruby-comment"># Some other possible @meta_type values are handled by subclasses.</span>
436
+ <span class="ruby-identifier">str</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;(other)&quot;</span>
437
+ <span class="ruby-keyword">end</span>
438
+ <span class="ruby-keyword">return</span> <span class="ruby-identifier">str</span>
511
439
  <span class="ruby-keyword">end</span></pre>
512
- </div><!-- to_s-source -->
440
+ </div>
513
441
 
514
442
  </div>
515
443
 
516
444
 
517
445
 
518
446
 
519
- </div><!-- to_s-method -->
447
+ </div>
520
448
 
521
449
 
522
- </section><!-- public-instance-method-details -->
450
+ </section>
523
451
 
524
- </section><!-- 5Buntitled-5D -->
525
-
526
- </div><!-- documentation -->
452
+ </section>
453
+ </main>
527
454
 
528
455
 
529
- <footer id="validator-badges">
530
- <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
531
- <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
532
- <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
456
+ <footer id="validator-badges" role="contentinfo">
457
+ <p><a href="http://validator.w3.org/check/referer">Validate</a>
458
+ <p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.0.
459
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
533
460
  </footer>
534
461