midilib 2.0.4 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. checksums.yaml +7 -0
  2. data/ChangeLog +2 -1
  3. data/Credits +44 -2
  4. data/README.rdoc +13 -9
  5. data/Rakefile +36 -53
  6. data/TODO.rdoc +13 -2
  7. data/examples/from_scratch.rb +4 -6
  8. data/examples/measures_mbt.rb +11 -11
  9. data/examples/print_program_changes.rb +11 -11
  10. data/examples/reader2text.rb +191 -191
  11. data/examples/seq2text.rb +18 -18
  12. data/examples/split.rb +21 -20
  13. data/examples/strings.rb +15 -15
  14. data/examples/transpose.rb +41 -42
  15. data/html/MIDI/ActiveSense.html +89 -213
  16. data/html/MIDI/ChannelEvent.html +95 -224
  17. data/html/MIDI/ChannelPressure.html +103 -241
  18. data/html/MIDI/Clock.html +89 -213
  19. data/html/MIDI/Continue.html +89 -213
  20. data/html/MIDI/Controller.html +105 -246
  21. data/html/MIDI/Event.html +134 -358
  22. data/html/MIDI/IO/MIDIFile.html +544 -1148
  23. data/html/MIDI/IO/SeqReader.html +273 -577
  24. data/html/MIDI/IO/SeqWriter.html +233 -439
  25. data/html/MIDI/IO.html +48 -164
  26. data/html/MIDI/KeySig.html +148 -291
  27. data/html/MIDI/Marker.html +73 -192
  28. data/html/MIDI/Measure.html +104 -267
  29. data/html/MIDI/Measures.html +106 -259
  30. data/html/MIDI/MetaEvent.html +171 -352
  31. data/html/MIDI/NoteEvent.html +114 -276
  32. data/html/MIDI/NoteOff.html +95 -223
  33. data/html/MIDI/NoteOn.html +95 -223
  34. data/html/MIDI/PitchBend.html +104 -242
  35. data/html/MIDI/PolyPressure.html +102 -246
  36. data/html/MIDI/ProgramChange.html +103 -241
  37. data/html/MIDI/Realtime.html +96 -230
  38. data/html/MIDI/Sequence.html +256 -576
  39. data/html/MIDI/SongPointer.html +104 -242
  40. data/html/MIDI/SongSelect.html +103 -241
  41. data/html/MIDI/Start.html +89 -213
  42. data/html/MIDI/Stop.html +89 -213
  43. data/html/MIDI/SystemCommon.html +73 -192
  44. data/html/MIDI/SystemExclusive.html +106 -244
  45. data/html/MIDI/SystemReset.html +89 -213
  46. data/html/MIDI/Tempo.html +127 -309
  47. data/html/MIDI/TimeSig.html +119 -300
  48. data/html/MIDI/Track.html +214 -494
  49. data/html/MIDI/TuneRequest.html +96 -230
  50. data/html/MIDI/Utils.html +91 -233
  51. data/html/MIDI.html +142 -526
  52. data/html/Object.html +197 -0
  53. data/html/README_rdoc.html +280 -486
  54. data/html/TODO_rdoc.html +68 -145
  55. data/html/created.rid +15 -14
  56. data/html/css/fonts.css +167 -0
  57. data/html/css/rdoc.css +639 -0
  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 +230 -446
  69. data/html/js/darkfish.js +22 -91
  70. data/html/js/navigation.js +4 -41
  71. data/html/js/navigation.js.gz +0 -0
  72. data/html/js/search.js +41 -25
  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 +9 -8
  76. data/html/js/searcher.js.gz +0 -0
  77. data/html/table_of_contents.html +1111 -505
  78. data/install.rb +53 -34
  79. data/lib/midilib/consts.rb +406 -408
  80. data/lib/midilib/event.rb +335 -306
  81. data/lib/midilib/info.rb +5 -7
  82. data/lib/midilib/io/midifile.rb +424 -452
  83. data/lib/midilib/io/seqreader.rb +200 -192
  84. data/lib/midilib/io/seqwriter.rb +151 -147
  85. data/lib/midilib/measure.rb +78 -80
  86. data/lib/midilib/mergesort.rb +39 -0
  87. data/lib/midilib/sequence.rb +93 -87
  88. data/lib/midilib/track.rb +71 -118
  89. data/lib/midilib/utils.rb +17 -20
  90. data/lib/midilib.rb +5 -5
  91. data/test/event_equality.rb +50 -52
  92. data/test/test_event.rb +120 -124
  93. data/test/test_io.rb +118 -38
  94. data/test/test_mergesort.rb +37 -0
  95. data/test/test_midifile.rb +6 -19
  96. data/test/test_sequence.rb +62 -61
  97. data/test/test_track.rb +126 -155
  98. data/test/test_varlen.rb +23 -27
  99. metadata +67 -62
  100. data/html/IO.html +0 -259
  101. data/html/MIDI/MIDI/MIDI/Array.html +0 -353
  102. data/html/MIDI/MIDI/MIDI.html +0 -204
  103. data/html/MIDI/MIDI.html +0 -204
  104. data/html/js/jquery.js +0 -18
  105. data/html/rdoc.css +0 -543
@@ -2,466 +2,285 @@
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::TimeSig - 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 = "../";
11
+ var index_rel_prefix = "../";
13
12
  </script>
14
13
 
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>
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">
21
22
 
22
23
 
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>
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>
28
34
  <a href="../table_of_contents.html#classes">Classes</a>
29
35
  <a href="../table_of_contents.html#methods">Methods</a>
30
- </h3>
31
- </nav>
32
-
36
+ </div>
37
+ </div>
33
38
 
34
- <nav id="search-section" class="section project-section" class="initially-hidden">
39
+ <div id="search-section" role="search" class="project-section initially-hidden">
35
40
  <form action="#" method="get" accept-charset="utf-8">
36
- <h3 class="section-header">
37
- <input type="text" name="search" placeholder="Search" id="search-field"
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"
38
45
  title="Type to search, Up and Down to navigate, Enter to load">
39
- </h3>
40
- </form>
46
+ </div>
41
47
 
42
- <ul id="search-results" class="initially-hidden"></ul>
43
- </nav>
44
-
45
-
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>
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
53
 
54
-
55
54
  </div>
56
55
 
57
- <div id="class-metadata">
58
-
59
- <nav id="parent-class-section" class="section">
60
- <h3 class="section-header">Parent</h3>
61
-
62
- <p class="link"><a href="MetaEvent.html">MIDI::MetaEvent</a>
63
56
 
64
- </nav>
65
-
66
-
67
- <!-- Method Quickref -->
68
- <nav id="method-list-section" class="section">
69
- <h3 class="section-header">Methods</h3>
70
57
 
71
- <ul class="link-list">
72
-
73
- <li><a href="#method-c-new">::new</a>
74
-
75
- <li><a href="#method-i-data_as_bytes">#data_as_bytes</a>
76
-
77
- <li><a href="#method-i-denominator">#denominator</a>
58
+ <div id="class-metadata">
78
59
 
79
- <li><a href="#method-i-measure_duration">#measure_duration</a>
80
60
 
81
- <li><a href="#method-i-metronome_ticks">#metronome_ticks</a>
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
+
82
67
 
83
- <li><a href="#method-i-numerator">#numerator</a>
84
68
 
85
- <li><a href="#method-i-to_s">#to_s</a>
86
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-denominator">#denominator</a>
78
+ <li ><a href="#method-i-measure_duration">#measure_duration</a>
79
+ <li ><a href="#method-i-metronome_ticks">#metronome_ticks</a>
80
+ <li ><a href="#method-i-numerator">#numerator</a>
81
+ <li ><a href="#method-i-to_s">#to_s</a>
87
82
  </ul>
88
- </nav>
83
+ </div>
89
84
 
90
85
  </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
86
  </nav>
104
87
 
105
- <nav id="classindex-section" class="section project-section">
106
- <h3 class="section-header">Class and Module Index</h3>
88
+ <main role="main" aria-labelledby="class-MIDI::TimeSig">
89
+ <h1 id="class-MIDI::TimeSig" class="class">
90
+ class MIDI::TimeSig
91
+ </h1>
107
92
 
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::TimeSig</h1>
204
-
205
- <div id="description" class="description">
93
+ <section class="description">
206
94
 
207
95
  <p>Container for time signature events</p>
208
96
 
209
- </div><!-- description -->
97
+ </section>
210
98
 
211
-
212
-
213
-
214
99
  <section id="5Buntitled-5D" class="documentation-section">
215
-
216
100
 
217
-
218
101
 
219
-
220
102
 
221
-
222
103
 
223
- <!-- Methods -->
224
-
225
- <section id="public-class-5Buntitled-5D-method-details" class="method-section section">
226
- <h3 class="section-header">Public Class Methods</h3>
227
104
 
228
-
105
+ <section id="public-class-5Buntitled-5D-method-details" class="method-section">
106
+ <header>
107
+ <h3>Public Class Methods</h3>
108
+ </header>
109
+
229
110
  <div id="method-c-new" class="method-detail ">
230
-
231
111
  <div class="method-heading">
232
112
  <span class="method-name">new</span><span
233
113
  class="method-args">(numer, denom, clocks, qnotes, delta_time = 0)</span>
234
114
  <span class="method-click-advice">click to toggle source</span>
235
115
  </div>
236
-
237
116
 
238
117
  <div class="method-description">
239
-
240
118
  <p>Constructor</p>
241
-
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>
242
123
 
243
-
244
124
  <div class="method-source-code" id="new-source">
245
125
  <pre><span class="ruby-comment"># File lib/midilib/event.rb, line 548</span>
246
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">numer</span>, <span class="ruby-identifier">denom</span>, <span class="ruby-identifier">clocks</span>, <span class="ruby-identifier">qnotes</span>, <span class="ruby-identifier">delta_time</span> = <span class="ruby-value">0</span>)
247
- <span class="ruby-keyword">super</span>(<span class="ruby-constant">META_TIME_SIG</span>, [<span class="ruby-identifier">numer</span>, <span class="ruby-identifier">denom</span>, <span class="ruby-identifier">clocks</span>, <span class="ruby-identifier">qnotes</span>], <span class="ruby-identifier">delta_time</span>)
126
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>(<span class="ruby-identifier">numer</span>, <span class="ruby-identifier">denom</span>, <span class="ruby-identifier">clocks</span>, <span class="ruby-identifier">qnotes</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_TIME_SIG</span>, [<span class="ruby-identifier">numer</span>, <span class="ruby-identifier">denom</span>, <span class="ruby-identifier">clocks</span>, <span class="ruby-identifier">qnotes</span>], <span class="ruby-identifier">delta_time</span>)
248
128
  <span class="ruby-keyword">end</span></pre>
249
- </div><!-- new-source -->
250
-
129
+ </div>
251
130
  </div>
252
131
 
253
-
254
132
 
255
-
256
- </div><!-- new-method -->
133
+ </div>
257
134
 
258
-
259
- </section><!-- public-class-method-details -->
260
-
261
- <section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
262
- <h3 class="section-header">Public Instance Methods</h3>
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>
263
141
 
264
-
265
142
  <div id="method-i-data_as_bytes" class="method-detail ">
266
-
267
143
  <div class="method-heading">
268
144
  <span class="method-name">data_as_bytes</span><span
269
145
  class="method-args">()</span>
270
146
  <span class="method-click-advice">click to toggle source</span>
271
147
  </div>
272
-
273
148
 
274
149
  <div class="method-description">
275
-
276
150
  <p>Returns the complete event as stored in the sequence</p>
277
-
278
151
 
279
-
280
152
  <div class="method-source-code" id="data_as_bytes-source">
281
153
  <pre><span class="ruby-comment"># File lib/midilib/event.rb, line 553</span>
282
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">data_as_bytes</span>
283
- <span class="ruby-identifier">data</span> = []
284
- <span class="ruby-identifier">data</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@status</span>
285
- <span class="ruby-identifier">data</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@meta_type</span>
286
- <span class="ruby-identifier">data</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value">4</span>
287
- <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>]
288
- <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>]
289
- <span class="ruby-identifier">data</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@data</span>[<span class="ruby-value">2</span>]
290
- <span class="ruby-identifier">data</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@data</span>[<span class="ruby-value">3</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">4</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>]
161
+ <span class="ruby-identifier">data</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@data</span>[<span class="ruby-value">2</span>]
162
+ <span class="ruby-identifier">data</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@data</span>[<span class="ruby-value">3</span>]
291
163
  <span class="ruby-keyword">end</span></pre>
292
- </div><!-- data_as_bytes-source -->
293
-
164
+ </div>
294
165
  </div>
295
166
 
296
-
297
167
 
298
-
299
- </div><!-- data_as_bytes-method -->
168
+ </div>
300
169
 
301
-
302
170
  <div id="method-i-denominator" class="method-detail ">
303
-
304
171
  <div class="method-heading">
305
172
  <span class="method-name">denominator</span><span
306
173
  class="method-args">()</span>
307
174
  <span class="method-click-advice">click to toggle source</span>
308
175
  </div>
309
-
310
176
 
311
177
  <div class="method-description">
312
-
313
- <p>Returns the denominator of the time signature. Use it as a power of 2 to
314
- get the displayed (lower-part) digit of the time signature.</p>
315
-
178
+ <p>Returns the denominator of the time signature. Use it as a power of 2 to get the displayed (lower-part) digit of the time signature.</p>
316
179
 
317
-
318
180
  <div class="method-source-code" id="denominator-source">
319
181
  <pre><span class="ruby-comment"># File lib/midilib/event.rb, line 576</span>
320
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">denominator</span>
321
- <span class="ruby-ivar">@data</span>[<span class="ruby-value">1</span>]
182
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">denominator</span>
183
+ <span class="ruby-ivar">@data</span>[<span class="ruby-value">1</span>]
322
184
  <span class="ruby-keyword">end</span></pre>
323
- </div><!-- denominator-source -->
324
-
185
+ </div>
325
186
  </div>
326
187
 
327
-
328
188
 
329
-
330
- </div><!-- denominator-method -->
189
+ </div>
331
190
 
332
-
333
191
  <div id="method-i-measure_duration" class="method-detail ">
334
-
335
192
  <div class="method-heading">
336
193
  <span class="method-name">measure_duration</span><span
337
194
  class="method-args">(ppqn)</span>
338
195
  <span class="method-click-advice">click to toggle source</span>
339
196
  </div>
340
-
341
197
 
342
198
  <div class="method-description">
343
-
344
199
  <p>Calculates the duration (in ticks) for a full measure</p>
345
-
346
200
 
347
-
348
201
  <div class="method-source-code" id="measure_duration-source">
349
202
  <pre><span class="ruby-comment"># File lib/midilib/event.rb, line 565</span>
350
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">measure_duration</span>(<span class="ruby-identifier">ppqn</span>)
351
- (<span class="ruby-value">4</span> * <span class="ruby-identifier">ppqn</span> * <span class="ruby-ivar">@data</span>[<span class="ruby-value">0</span>]) <span class="ruby-operator">/</span> (<span class="ruby-value">2</span><span class="ruby-operator">**</span><span class="ruby-ivar">@data</span>[<span class="ruby-value">1</span>])
203
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">measure_duration</span>(<span class="ruby-identifier">ppqn</span>)
204
+ (<span class="ruby-value">4</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">ppqn</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">2</span><span class="ruby-operator">**</span><span class="ruby-ivar">@data</span>[<span class="ruby-value">1</span>])
352
205
  <span class="ruby-keyword">end</span></pre>
353
- </div><!-- measure_duration-source -->
354
-
206
+ </div>
355
207
  </div>
356
208
 
357
-
358
209
 
359
-
360
- </div><!-- measure_duration-method -->
210
+ </div>
361
211
 
362
-
363
212
  <div id="method-i-metronome_ticks" class="method-detail ">
364
-
365
213
  <div class="method-heading">
366
214
  <span class="method-name">metronome_ticks</span><span
367
215
  class="method-args">()</span>
368
216
  <span class="method-click-advice">click to toggle source</span>
369
217
  </div>
370
-
371
218
 
372
219
  <div class="method-description">
373
-
374
- <p>Returns the metronome tick duration for the time signature. On each quarter
375
- note, there's 24 ticks.</p>
376
-
220
+ <p>Returns the metronome tick duration for the time signature. On each quarter note, there’s 24 ticks.</p>
377
221
 
378
-
379
222
  <div class="method-source-code" id="metronome_ticks-source">
380
223
  <pre><span class="ruby-comment"># File lib/midilib/event.rb, line 582</span>
381
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">metronome_ticks</span>
382
- <span class="ruby-ivar">@data</span>[<span class="ruby-value">2</span>]
224
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">metronome_ticks</span>
225
+ <span class="ruby-ivar">@data</span>[<span class="ruby-value">2</span>]
383
226
  <span class="ruby-keyword">end</span></pre>
384
- </div><!-- metronome_ticks-source -->
385
-
227
+ </div>
386
228
  </div>
387
229
 
388
-
389
230
 
390
-
391
- </div><!-- metronome_ticks-method -->
231
+ </div>
392
232
 
393
-
394
233
  <div id="method-i-numerator" class="method-detail ">
395
-
396
234
  <div class="method-heading">
397
235
  <span class="method-name">numerator</span><span
398
236
  class="method-args">()</span>
399
237
  <span class="method-click-advice">click to toggle source</span>
400
238
  </div>
401
-
402
239
 
403
240
  <div class="method-description">
404
-
405
241
  <p>Returns the numerator (the top digit) for the time signature</p>
406
-
407
242
 
408
-
409
243
  <div class="method-source-code" id="numerator-source">
410
244
  <pre><span class="ruby-comment"># File lib/midilib/event.rb, line 570</span>
411
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">numerator</span>
412
- <span class="ruby-ivar">@data</span>[<span class="ruby-value">0</span>]
245
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">numerator</span>
246
+ <span class="ruby-ivar">@data</span>[<span class="ruby-value">0</span>]
413
247
  <span class="ruby-keyword">end</span></pre>
414
- </div><!-- numerator-source -->
415
-
248
+ </div>
416
249
  </div>
417
250
 
418
-
419
251
 
420
-
421
- </div><!-- numerator-method -->
252
+ </div>
422
253
 
423
-
424
254
  <div id="method-i-to_s" class="method-detail ">
425
-
426
255
  <div class="method-heading">
427
256
  <span class="method-name">to_s</span><span
428
257
  class="method-args">()</span>
429
258
  <span class="method-click-advice">click to toggle source</span>
430
259
  </div>
431
-
432
260
 
433
261
  <div class="method-description">
434
-
435
- <p>Returns the time signature for the event as a string. Example: "time sig
436
- 3/4"</p>
437
-
262
+ <p>Returns the time signature for the event as a string. Example: “time sig 3/4”</p>
438
263
 
439
-
440
264
  <div class="method-source-code" id="to_s-source">
441
265
  <pre><span class="ruby-comment"># File lib/midilib/event.rb, line 588</span>
442
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">to_s</span>
443
- <span class="ruby-node">&quot;time sig #{@data[0]}/#{2**@data[1]}&quot;</span>
266
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">to_s</span>
267
+ <span class="ruby-node">&quot;time sig #{@data[0]}/#{2**@data[1]}&quot;</span>
444
268
  <span class="ruby-keyword">end</span></pre>
445
- </div><!-- to_s-source -->
446
-
269
+ </div>
447
270
  </div>
448
271
 
449
-
450
272
 
451
-
452
- </div><!-- to_s-method -->
273
+ </div>
453
274
 
454
-
455
- </section><!-- public-instance-method-details -->
456
-
457
- </section><!-- 5Buntitled-5D -->
275
+ </section>
458
276
 
459
- </div><!-- documentation -->
277
+ </section>
278
+ </main>
460
279
 
461
280
 
462
- <footer id="validator-badges">
463
- <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
464
- <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
465
- <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
281
+ <footer id="validator-badges" role="contentinfo">
282
+ <p><a href="https://validator.w3.org/check/referer">Validate</a>
283
+ <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.4.0.
284
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
466
285
  </footer>
467
286