midilib 3.0.1 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) hide show
  1. checksums.yaml +4 -4
  2. data/Credits +5 -0
  3. data/html/MIDI/ActiveSense.html +171 -0
  4. data/html/MIDI/ChannelEvent.html +190 -0
  5. data/html/MIDI/ChannelPressure.html +212 -0
  6. data/html/MIDI/Clock.html +171 -0
  7. data/html/MIDI/Continue.html +171 -0
  8. data/html/MIDI/Controller.html +224 -0
  9. data/html/MIDI/Event.html +349 -0
  10. data/html/MIDI/IO/MIDIFile.html +1392 -0
  11. data/html/MIDI/IO/SeqReader.html +642 -0
  12. data/html/MIDI/IO/SeqWriter.html +442 -0
  13. data/html/MIDI/IO.html +91 -0
  14. data/html/MIDI/KeySig.html +292 -0
  15. data/html/MIDI/Marker.html +138 -0
  16. data/html/MIDI/Measure.html +260 -0
  17. data/html/MIDI/Measures.html +222 -0
  18. data/html/MIDI/MetaEvent.html +353 -0
  19. data/html/MIDI/NoteEvent.html +255 -0
  20. data/html/MIDI/NoteOff.html +188 -0
  21. data/html/MIDI/NoteOn.html +188 -0
  22. data/html/MIDI/PitchBend.html +213 -0
  23. data/html/MIDI/PolyPressure.html +216 -0
  24. data/html/MIDI/ProgramChange.html +212 -0
  25. data/html/MIDI/Realtime.html +194 -0
  26. data/html/MIDI/Sequence.html +641 -0
  27. data/html/MIDI/SongPointer.html +213 -0
  28. data/html/MIDI/SongSelect.html +212 -0
  29. data/html/MIDI/Start.html +171 -0
  30. data/html/MIDI/Stop.html +171 -0
  31. data/html/MIDI/SystemCommon.html +138 -0
  32. data/html/MIDI/SystemExclusive.html +215 -0
  33. data/html/MIDI/SystemReset.html +171 -0
  34. data/html/MIDI/Tempo.html +292 -0
  35. data/html/MIDI/TimeSig.html +286 -0
  36. data/html/MIDI/Track.html +489 -0
  37. data/html/MIDI/TuneRequest.html +194 -0
  38. data/html/MIDI/Utils.html +178 -0
  39. data/html/MIDI.html +281 -0
  40. data/html/Object.html +197 -0
  41. data/html/README_rdoc.html +545 -0
  42. data/html/TODO_rdoc.html +123 -0
  43. data/html/created.rid +15 -0
  44. data/html/css/fonts.css +167 -0
  45. data/html/css/rdoc.css +639 -0
  46. data/html/fonts/Lato-Light.ttf +0 -0
  47. data/html/fonts/Lato-LightItalic.ttf +0 -0
  48. data/html/fonts/Lato-Regular.ttf +0 -0
  49. data/html/fonts/Lato-RegularItalic.ttf +0 -0
  50. data/html/fonts/SourceCodePro-Bold.ttf +0 -0
  51. data/html/fonts/SourceCodePro-Regular.ttf +0 -0
  52. data/html/images/add.png +0 -0
  53. data/html/images/arrow_up.png +0 -0
  54. data/html/images/brick.png +0 -0
  55. data/html/images/brick_link.png +0 -0
  56. data/html/images/bug.png +0 -0
  57. data/html/images/bullet_black.png +0 -0
  58. data/html/images/bullet_toggle_minus.png +0 -0
  59. data/html/images/bullet_toggle_plus.png +0 -0
  60. data/html/images/date.png +0 -0
  61. data/html/images/delete.png +0 -0
  62. data/html/images/find.png +0 -0
  63. data/html/images/loadingAnimation.gif +0 -0
  64. data/html/images/macFFBgHack.png +0 -0
  65. data/html/images/package.png +0 -0
  66. data/html/images/page_green.png +0 -0
  67. data/html/images/page_white_text.png +0 -0
  68. data/html/images/page_white_width.png +0 -0
  69. data/html/images/plugin.png +0 -0
  70. data/html/images/ruby.png +0 -0
  71. data/html/images/tag_blue.png +0 -0
  72. data/html/images/tag_green.png +0 -0
  73. data/html/images/transparent.png +0 -0
  74. data/html/images/wrench.png +0 -0
  75. data/html/images/wrench_orange.png +0 -0
  76. data/html/images/zoom.png +0 -0
  77. data/html/index.html +534 -0
  78. data/html/js/darkfish.js +84 -0
  79. data/html/js/navigation.js +105 -0
  80. data/html/js/navigation.js.gz +0 -0
  81. data/html/js/search.js +110 -0
  82. data/html/js/search_index.js +1 -0
  83. data/html/js/search_index.js.gz +0 -0
  84. data/html/js/searcher.js +229 -0
  85. data/html/js/searcher.js.gz +0 -0
  86. data/html/table_of_contents.html +1258 -0
  87. data/lib/midilib/info.rb +2 -2
  88. data/lib/midilib/io/seqreader.rb +18 -5
  89. data/test/test_io.rb +18 -5
  90. metadata +85 -1
@@ -0,0 +1,292 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>class MIDI::KeySig - midilib</title>
8
+
9
+ <script type="text/javascript">
10
+ var rdoc_rel_prefix = "../";
11
+ var index_rel_prefix = "../";
12
+ </script>
13
+
14
+ <script src="../js/navigation.js" defer></script>
15
+ <script src="../js/search.js" defer></script>
16
+ <script src="../js/search_index.js" defer></script>
17
+ <script src="../js/searcher.js" defer></script>
18
+ <script src="../js/darkfish.js" defer></script>
19
+
20
+ <link href="../css/fonts.css" rel="stylesheet">
21
+ <link href="../css/rdoc.css" rel="stylesheet">
22
+
23
+
24
+ <body id="top" role="document" class="class">
25
+ <nav role="navigation">
26
+ <div id="project-navigation">
27
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
28
+ <h2>
29
+ <a href="../index.html" rel="home">Home</a>
30
+ </h2>
31
+
32
+ <div id="table-of-contents-navigation">
33
+ <a href="../table_of_contents.html#pages">Pages</a>
34
+ <a href="../table_of_contents.html#classes">Classes</a>
35
+ <a href="../table_of_contents.html#methods">Methods</a>
36
+ </div>
37
+ </div>
38
+
39
+ <div id="search-section" role="search" class="project-section initially-hidden">
40
+ <form action="#" method="get" accept-charset="utf-8">
41
+ <div id="search-field-wrapper">
42
+ <input id="search-field" role="combobox" aria-label="Search"
43
+ aria-autocomplete="list" aria-controls="search-results"
44
+ type="text" name="search" placeholder="Search" spellcheck="false"
45
+ title="Type to search, Up and Down to navigate, Enter to load">
46
+ </div>
47
+
48
+ <ul id="search-results" aria-label="Search Results"
49
+ aria-busy="false" aria-expanded="false"
50
+ aria-atomic="false" class="initially-hidden"></ul>
51
+ </form>
52
+ </div>
53
+
54
+ </div>
55
+
56
+
57
+
58
+ <div id="class-metadata">
59
+
60
+
61
+ <div id="parent-class-section" class="nav-section">
62
+ <h3>Parent</h3>
63
+
64
+ <p class="link"><a href="MetaEvent.html">MIDI::MetaEvent</a>
65
+ </div>
66
+
67
+
68
+
69
+
70
+ <!-- Method Quickref -->
71
+ <div id="method-list-section" class="nav-section">
72
+ <h3>Methods</h3>
73
+
74
+ <ul class="link-list" role="directory">
75
+ <li class="calls-super" ><a href="#method-c-new">::new</a>
76
+ <li ><a href="#method-i-data_as_bytes">#data_as_bytes</a>
77
+ <li ><a href="#method-i-major_key-3F">#major_key?</a>
78
+ <li ><a href="#method-i-minor_key-3F">#minor_key?</a>
79
+ <li ><a href="#method-i-sharpflat">#sharpflat</a>
80
+ <li ><a href="#method-i-to_code">#to_code</a>
81
+ <li ><a href="#method-i-to_s">#to_s</a>
82
+ </ul>
83
+ </div>
84
+
85
+ </div>
86
+ </nav>
87
+
88
+ <main role="main" aria-labelledby="class-MIDI::KeySig">
89
+ <h1 id="class-MIDI::KeySig" class="class">
90
+ class MIDI::KeySig
91
+ </h1>
92
+
93
+ <section class="description">
94
+
95
+ <p>Container for key signature events</p>
96
+
97
+ </section>
98
+
99
+ <section id="5Buntitled-5D" class="documentation-section">
100
+
101
+
102
+
103
+
104
+
105
+ <section id="public-class-5Buntitled-5D-method-details" class="method-section">
106
+ <header>
107
+ <h3>Public Class Methods</h3>
108
+ </header>
109
+
110
+ <div id="method-c-new" class="method-detail ">
111
+ <div class="method-heading">
112
+ <span class="method-name">new</span><span
113
+ class="method-args">(sharpflat, is_minor, delta_time = 0)</span>
114
+ <span class="method-click-advice">click to toggle source</span>
115
+ </div>
116
+
117
+ <div class="method-description">
118
+ <p>Constructor</p>
119
+ <div class="method-calls-super">
120
+ Calls superclass method
121
+ <a href="MetaEvent.html#method-c-new"><code>MIDI::MetaEvent::new</code></a>
122
+ </div>
123
+
124
+ <div class="method-source-code" id="new-source">
125
+ <pre><span class="ruby-comment"># File lib/midilib/event.rb, line 596</span>
126
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>(<span class="ruby-identifier">sharpflat</span>, <span class="ruby-identifier">is_minor</span>, <span class="ruby-identifier">delta_time</span> = <span class="ruby-value">0</span>)
127
+ <span class="ruby-keyword">super</span>(<span class="ruby-constant">META_KEY_SIG</span>, [<span class="ruby-identifier">sharpflat</span>, <span class="ruby-identifier">is_minor</span>], <span class="ruby-identifier">delta_time</span>)
128
+ <span class="ruby-keyword">end</span></pre>
129
+ </div>
130
+ </div>
131
+
132
+
133
+ </div>
134
+
135
+ </section>
136
+
137
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
138
+ <header>
139
+ <h3>Public Instance Methods</h3>
140
+ </header>
141
+
142
+ <div id="method-i-data_as_bytes" class="method-detail ">
143
+ <div class="method-heading">
144
+ <span class="method-name">data_as_bytes</span><span
145
+ class="method-args">()</span>
146
+ <span class="method-click-advice">click to toggle source</span>
147
+ </div>
148
+
149
+ <div class="method-description">
150
+ <p>Returns the complete event as stored in the sequence</p>
151
+
152
+ <div class="method-source-code" id="data_as_bytes-source">
153
+ <pre><span class="ruby-comment"># File lib/midilib/event.rb, line 601</span>
154
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">data_as_bytes</span>
155
+ <span class="ruby-identifier">data</span> = []
156
+ <span class="ruby-identifier">data</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@status</span>
157
+ <span class="ruby-identifier">data</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@meta_type</span>
158
+ <span class="ruby-identifier">data</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value">2</span>
159
+ <span class="ruby-identifier">data</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@data</span>[<span class="ruby-value">0</span>]
160
+ <span class="ruby-identifier">data</span> <span class="ruby-operator">&lt;&lt;</span> (<span class="ruby-ivar">@data</span>[<span class="ruby-value">1</span>] <span class="ruby-operator">?</span> <span class="ruby-value">1</span> <span class="ruby-operator">:</span> <span class="ruby-value">0</span>)
161
+ <span class="ruby-keyword">end</span></pre>
162
+ </div>
163
+ </div>
164
+
165
+
166
+ </div>
167
+
168
+ <div id="method-i-major_key-3F" class="method-detail ">
169
+ <div class="method-heading">
170
+ <span class="method-name">major_key?</span><span
171
+ class="method-args">()</span>
172
+ <span class="method-click-advice">click to toggle source</span>
173
+ </div>
174
+
175
+ <div class="method-description">
176
+ <p>Returns true if it’s a major key, false if minor key</p>
177
+
178
+ <div class="method-source-code" id="major_key-3F-source">
179
+ <pre><span class="ruby-comment"># File lib/midilib/event.rb, line 616</span>
180
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">major_key?</span>
181
+ <span class="ruby-operator">!</span><span class="ruby-ivar">@data</span>[<span class="ruby-value">1</span>]
182
+ <span class="ruby-keyword">end</span></pre>
183
+ </div>
184
+ </div>
185
+
186
+
187
+ </div>
188
+
189
+ <div id="method-i-minor_key-3F" class="method-detail ">
190
+ <div class="method-heading">
191
+ <span class="method-name">minor_key?</span><span
192
+ class="method-args">()</span>
193
+ <span class="method-click-advice">click to toggle source</span>
194
+ </div>
195
+
196
+ <div class="method-description">
197
+ <p>Returns true if it’s a minor key, false if major key</p>
198
+
199
+ <div class="method-source-code" id="minor_key-3F-source">
200
+ <pre><span class="ruby-comment"># File lib/midilib/event.rb, line 611</span>
201
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">minor_key?</span>
202
+ <span class="ruby-ivar">@data</span>[<span class="ruby-value">1</span>]
203
+ <span class="ruby-keyword">end</span></pre>
204
+ </div>
205
+ </div>
206
+
207
+
208
+ </div>
209
+
210
+ <div id="method-i-sharpflat" class="method-detail ">
211
+ <div class="method-heading">
212
+ <span class="method-name">sharpflat</span><span
213
+ class="method-args">()</span>
214
+ <span class="method-click-advice">click to toggle source</span>
215
+ </div>
216
+
217
+ <div class="method-description">
218
+ <p>Returns the number of sharps/flats in the key sig. Negative for flats.</p>
219
+
220
+ <div class="method-source-code" id="sharpflat-source">
221
+ <pre><span class="ruby-comment"># File lib/midilib/event.rb, line 621</span>
222
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">sharpflat</span>
223
+ <span class="ruby-ivar">@data</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">&gt;</span> <span class="ruby-value">7</span> <span class="ruby-operator">?</span> <span class="ruby-ivar">@data</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">-</span> <span class="ruby-value">256</span> <span class="ruby-operator">:</span> <span class="ruby-ivar">@data</span>[<span class="ruby-value">0</span>]
224
+ <span class="ruby-keyword">end</span></pre>
225
+ </div>
226
+ </div>
227
+
228
+
229
+ </div>
230
+
231
+ <div id="method-i-to_code" class="method-detail ">
232
+ <div class="method-heading">
233
+ <span class="method-name">to_code</span><span
234
+ class="method-args">()</span>
235
+ <span class="method-click-advice">click to toggle source</span>
236
+ </div>
237
+
238
+ <div class="method-description">
239
+ <p>Returns the key signature as a code. Example: “Ab” for “key sig A flat major”</p>
240
+
241
+ <div class="method-source-code" id="to_code-source">
242
+ <pre><span class="ruby-comment"># File lib/midilib/event.rb, line 637</span>
243
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">to_code</span>
244
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">minor_key?</span>
245
+ <span class="ruby-identifier">minorkey_codes</span>[<span class="ruby-identifier">sharpflat</span> <span class="ruby-operator">+</span> <span class="ruby-value">7</span>]
246
+ <span class="ruby-keyword">else</span>
247
+ <span class="ruby-identifier">majorkey_codes</span>[<span class="ruby-identifier">sharpflat</span> <span class="ruby-operator">+</span> <span class="ruby-value">7</span>]
248
+ <span class="ruby-keyword">end</span>
249
+ <span class="ruby-keyword">end</span></pre>
250
+ </div>
251
+ </div>
252
+
253
+
254
+ </div>
255
+
256
+ <div id="method-i-to_s" class="method-detail ">
257
+ <div class="method-heading">
258
+ <span class="method-name">to_s</span><span
259
+ class="method-args">()</span>
260
+ <span class="method-click-advice">click to toggle source</span>
261
+ </div>
262
+
263
+ <div class="method-description">
264
+ <p>Returns the key signature as a text string. Example: “key sig A flat major”</p>
265
+
266
+ <div class="method-source-code" id="to_s-source">
267
+ <pre><span class="ruby-comment"># File lib/midilib/event.rb, line 627</span>
268
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">to_s</span>
269
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">minor_key?</span>
270
+ <span class="ruby-node">&quot;key sig #{minorkeys[sharpflat + 7]} minor&quot;</span>
271
+ <span class="ruby-keyword">else</span>
272
+ <span class="ruby-node">&quot;key sig #{majorkeys[sharpflat + 7]} major&quot;</span>
273
+ <span class="ruby-keyword">end</span>
274
+ <span class="ruby-keyword">end</span></pre>
275
+ </div>
276
+ </div>
277
+
278
+
279
+ </div>
280
+
281
+ </section>
282
+
283
+ </section>
284
+ </main>
285
+
286
+
287
+ <footer id="validator-badges" role="contentinfo">
288
+ <p><a href="https://validator.w3.org/check/referer">Validate</a>
289
+ <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.4.0.
290
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
291
+ </footer>
292
+
@@ -0,0 +1,138 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>class MIDI::Marker - midilib</title>
8
+
9
+ <script type="text/javascript">
10
+ var rdoc_rel_prefix = "../";
11
+ var index_rel_prefix = "../";
12
+ </script>
13
+
14
+ <script src="../js/navigation.js" defer></script>
15
+ <script src="../js/search.js" defer></script>
16
+ <script src="../js/search_index.js" defer></script>
17
+ <script src="../js/searcher.js" defer></script>
18
+ <script src="../js/darkfish.js" defer></script>
19
+
20
+ <link href="../css/fonts.css" rel="stylesheet">
21
+ <link href="../css/rdoc.css" rel="stylesheet">
22
+
23
+
24
+ <body id="top" role="document" class="class">
25
+ <nav role="navigation">
26
+ <div id="project-navigation">
27
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
28
+ <h2>
29
+ <a href="../index.html" rel="home">Home</a>
30
+ </h2>
31
+
32
+ <div id="table-of-contents-navigation">
33
+ <a href="../table_of_contents.html#pages">Pages</a>
34
+ <a href="../table_of_contents.html#classes">Classes</a>
35
+ <a href="../table_of_contents.html#methods">Methods</a>
36
+ </div>
37
+ </div>
38
+
39
+ <div id="search-section" role="search" class="project-section initially-hidden">
40
+ <form action="#" method="get" accept-charset="utf-8">
41
+ <div id="search-field-wrapper">
42
+ <input id="search-field" role="combobox" aria-label="Search"
43
+ aria-autocomplete="list" aria-controls="search-results"
44
+ type="text" name="search" placeholder="Search" spellcheck="false"
45
+ title="Type to search, Up and Down to navigate, Enter to load">
46
+ </div>
47
+
48
+ <ul id="search-results" aria-label="Search Results"
49
+ aria-busy="false" aria-expanded="false"
50
+ aria-atomic="false" class="initially-hidden"></ul>
51
+ </form>
52
+ </div>
53
+
54
+ </div>
55
+
56
+
57
+
58
+ <div id="class-metadata">
59
+
60
+
61
+ <div id="parent-class-section" class="nav-section">
62
+ <h3>Parent</h3>
63
+
64
+ <p class="link"><a href="MetaEvent.html">MIDI::MetaEvent</a>
65
+ </div>
66
+
67
+
68
+
69
+
70
+ <!-- Method Quickref -->
71
+ <div id="method-list-section" class="nav-section">
72
+ <h3>Methods</h3>
73
+
74
+ <ul class="link-list" role="directory">
75
+ <li class="calls-super" ><a href="#method-c-new">::new</a>
76
+ </ul>
77
+ </div>
78
+
79
+ </div>
80
+ </nav>
81
+
82
+ <main role="main" aria-labelledby="class-MIDI::Marker">
83
+ <h1 id="class-MIDI::Marker" class="class">
84
+ class MIDI::Marker
85
+ </h1>
86
+
87
+ <section class="description">
88
+
89
+ </section>
90
+
91
+ <section id="5Buntitled-5D" class="documentation-section">
92
+
93
+
94
+
95
+
96
+
97
+ <section id="public-class-5Buntitled-5D-method-details" class="method-section">
98
+ <header>
99
+ <h3>Public Class Methods</h3>
100
+ </header>
101
+
102
+ <div id="method-c-new" class="method-detail ">
103
+ <div class="method-heading">
104
+ <span class="method-name">new</span><span
105
+ class="method-args">(msg, delta_time = 0)</span>
106
+ <span class="method-click-advice">click to toggle source</span>
107
+ </div>
108
+
109
+ <div class="method-description">
110
+
111
+ <div class="method-calls-super">
112
+ Calls superclass method
113
+ <a href="MetaEvent.html#method-c-new"><code>MIDI::MetaEvent::new</code></a>
114
+ </div>
115
+
116
+ <div class="method-source-code" id="new-source">
117
+ <pre><span class="ruby-comment"># File lib/midilib/event.rb, line 500</span>
118
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>(<span class="ruby-identifier">msg</span>, <span class="ruby-identifier">delta_time</span> = <span class="ruby-value">0</span>)
119
+ <span class="ruby-keyword">super</span>(<span class="ruby-constant">META_MARKER</span>, <span class="ruby-identifier">msg</span>, <span class="ruby-identifier">delta_time</span>)
120
+ <span class="ruby-keyword">end</span></pre>
121
+ </div>
122
+ </div>
123
+
124
+
125
+ </div>
126
+
127
+ </section>
128
+
129
+ </section>
130
+ </main>
131
+
132
+
133
+ <footer id="validator-badges" role="contentinfo">
134
+ <p><a href="https://validator.w3.org/check/referer">Validate</a>
135
+ <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.4.0.
136
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
137
+ </footer>
138
+