midilib 1.2.1 → 2.0.0
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/ChangeLog +3 -1
- data/Credits +6 -1
- data/README.rdoc +41 -15
- data/Rakefile +3 -11
- data/TODO.rdoc +4 -7
- data/examples/from_scratch.rb +2 -2
- data/examples/measures_mbt.rb +1 -1
- data/examples/print_program_changes.rb +1 -1
- data/examples/strings.rb +1 -1
- data/examples/transpose.rb +1 -1
- data/html/Array.html +382 -0
- data/html/IO.html +277 -0
- data/html/MIDI.html +829 -0
- data/html/MIDI/ActiveSense.html +317 -0
- data/html/MIDI/ChannelEvent.html +347 -0
- data/html/MIDI/ChannelPressure.html +379 -0
- data/html/MIDI/Clock.html +317 -0
- data/html/MIDI/Continue.html +317 -0
- data/html/MIDI/Controller.html +398 -0
- data/html/MIDI/Event.html +659 -0
- data/html/MIDI/IO.html +238 -0
- data/html/MIDI/IO/MIDIFile.html +2269 -0
- data/html/MIDI/IO/SeqReader.html +1051 -0
- data/html/MIDI/IO/SeqWriter.html +706 -0
- data/html/MIDI/KeySig.html +487 -0
- data/html/MIDI/Marker.html +275 -0
- data/html/MIDI/Measure.html +479 -0
- data/html/MIDI/Measures.html +416 -0
- data/html/MIDI/MetaEvent.html +617 -0
- data/html/MIDI/NoteEvent.html +459 -0
- data/html/MIDI/NoteOff.html +341 -0
- data/html/MIDI/NoteOn.html +341 -0
- data/html/MIDI/PitchBend.html +380 -0
- data/html/MIDI/PolyPressure.html +390 -0
- data/html/MIDI/ProgramChange.html +379 -0
- data/html/MIDI/Realtime.html +354 -0
- data/html/MIDI/Sequence.html +1063 -0
- data/html/MIDI/SongPointer.html +380 -0
- data/html/MIDI/SongSelect.html +379 -0
- data/html/MIDI/Start.html +317 -0
- data/html/MIDI/Stop.html +317 -0
- data/html/MIDI/SystemCommon.html +275 -0
- data/html/MIDI/SystemExclusive.html +382 -0
- data/html/MIDI/SystemReset.html +317 -0
- data/html/MIDI/Tempo.html +519 -0
- data/html/MIDI/TimeSig.html +524 -0
- data/html/MIDI/Track.html +859 -0
- data/html/MIDI/TuneRequest.html +354 -0
- data/html/MIDI/Utils.html +350 -0
- data/html/README_rdoc.html +882 -0
- data/html/TODO_rdoc.html +215 -0
- data/html/created.rid +14 -0
- data/html/images/brick.png +0 -0
- data/html/images/brick_link.png +0 -0
- data/html/images/bug.png +0 -0
- data/html/images/bullet_black.png +0 -0
- data/html/images/bullet_toggle_minus.png +0 -0
- data/html/images/bullet_toggle_plus.png +0 -0
- data/html/images/date.png +0 -0
- data/html/images/find.png +0 -0
- data/html/images/loadingAnimation.gif +0 -0
- data/html/images/macFFBgHack.png +0 -0
- data/html/images/package.png +0 -0
- data/html/images/page_green.png +0 -0
- data/html/images/page_white_text.png +0 -0
- data/html/images/page_white_width.png +0 -0
- data/html/images/plugin.png +0 -0
- data/html/images/ruby.png +0 -0
- data/html/images/tag_green.png +0 -0
- data/html/images/wrench.png +0 -0
- data/html/images/wrench_orange.png +0 -0
- data/html/images/zoom.png +0 -0
- data/html/index.html +1266 -0
- data/html/js/darkfish.js +116 -0
- data/html/js/jquery.js +32 -0
- data/html/js/quicksearch.js +114 -0
- data/html/js/thickbox-compressed.js +10 -0
- data/html/lib/midilib/consts_rb.html +55 -0
- data/html/lib/midilib/event_rb.html +56 -0
- data/html/lib/midilib/info_rb.html +52 -0
- data/html/lib/midilib/io/midifile_rb.html +54 -0
- data/html/lib/midilib/io/seqreader_rb.html +58 -0
- data/html/lib/midilib/io/seqwriter_rb.html +59 -0
- data/html/lib/midilib/measure_rb.html +54 -0
- data/html/lib/midilib/sequence_rb.html +58 -0
- data/html/lib/midilib/track_rb.html +54 -0
- data/html/lib/midilib/utils_rb.html +52 -0
- data/html/lib/midilib_rb.html +71 -0
- data/html/rdoc.css +706 -0
- data/install.rb +1 -1
- data/lib/midilib/event.rb +11 -77
- data/lib/midilib/info.rb +4 -4
- data/lib/midilib/io/seqreader.rb +2 -2
- data/lib/midilib/io/seqwriter.rb +1 -1
- data/lib/midilib/sequence.rb +1 -1
- data/lib/midilib/track.rb +54 -8
- data/test/test_event.rb +4 -62
- data/test/test_sequence.rb +1 -1
- data/test/test_track.rb +39 -5
- metadata +102 -9
@@ -0,0 +1,524 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
+
<head>
|
6
|
+
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
7
|
+
|
8
|
+
<title>Class: MIDI::TimeSig</title>
|
9
|
+
|
10
|
+
<link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
|
11
|
+
|
12
|
+
<script src="../js/jquery.js" type="text/javascript"
|
13
|
+
charset="utf-8"></script>
|
14
|
+
<script src="../js/thickbox-compressed.js" type="text/javascript"
|
15
|
+
charset="utf-8"></script>
|
16
|
+
<script src="../js/quicksearch.js" type="text/javascript"
|
17
|
+
charset="utf-8"></script>
|
18
|
+
<script src="../js/darkfish.js" type="text/javascript"
|
19
|
+
charset="utf-8"></script>
|
20
|
+
|
21
|
+
</head>
|
22
|
+
<body class="class">
|
23
|
+
|
24
|
+
<div id="metadata">
|
25
|
+
<div id="home-metadata">
|
26
|
+
<div id="home-section" class="section">
|
27
|
+
<h3 class="section-header">
|
28
|
+
<a href="../index.html">Home</a>
|
29
|
+
<a href="../index.html#classes">Classes</a>
|
30
|
+
<a href="../index.html#methods">Methods</a>
|
31
|
+
</h3>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="file-metadata">
|
36
|
+
<div id="file-list-section" class="section">
|
37
|
+
<h3 class="section-header">In Files</h3>
|
38
|
+
<div class="section-body">
|
39
|
+
<ul>
|
40
|
+
|
41
|
+
<li><a href="../lib/midilib/event_rb.html?TB_iframe=true&height=550&width=785"
|
42
|
+
class="thickbox" title="lib/midilib/event.rb">lib/midilib/event.rb</a></li>
|
43
|
+
|
44
|
+
</ul>
|
45
|
+
</div>
|
46
|
+
</div>
|
47
|
+
|
48
|
+
|
49
|
+
</div>
|
50
|
+
|
51
|
+
<div id="class-metadata">
|
52
|
+
|
53
|
+
<!-- Parent Class -->
|
54
|
+
|
55
|
+
<div id="parent-class-section" class="section">
|
56
|
+
<h3 class="section-header">Parent</h3>
|
57
|
+
|
58
|
+
<p class="link"><a href="MetaEvent.html">MIDI::MetaEvent</a></p>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
|
62
|
+
|
63
|
+
<!-- Namespace Contents -->
|
64
|
+
|
65
|
+
|
66
|
+
<!-- Method Quickref -->
|
67
|
+
|
68
|
+
<div id="method-list-section" class="section">
|
69
|
+
<h3 class="section-header">Methods</h3>
|
70
|
+
<ul class="link-list">
|
71
|
+
|
72
|
+
<li><a href="#method-c-new">::new</a></li>
|
73
|
+
|
74
|
+
<li><a href="#method-i-data_as_bytes">#data_as_bytes</a></li>
|
75
|
+
|
76
|
+
<li><a href="#method-i-denominator">#denominator</a></li>
|
77
|
+
|
78
|
+
<li><a href="#method-i-measure_duration">#measure_duration</a></li>
|
79
|
+
|
80
|
+
<li><a href="#method-i-metronome_ticks">#metronome_ticks</a></li>
|
81
|
+
|
82
|
+
<li><a href="#method-i-numerator">#numerator</a></li>
|
83
|
+
|
84
|
+
<li><a href="#method-i-to_s">#to_s</a></li>
|
85
|
+
|
86
|
+
</ul>
|
87
|
+
</div>
|
88
|
+
|
89
|
+
|
90
|
+
<!-- Included Modules -->
|
91
|
+
|
92
|
+
</div>
|
93
|
+
|
94
|
+
<div id="project-metadata">
|
95
|
+
|
96
|
+
|
97
|
+
<div id="fileindex-section" class="section project-section">
|
98
|
+
<h3 class="section-header">Files</h3>
|
99
|
+
<ul>
|
100
|
+
|
101
|
+
<li class="file"><a href="../README_rdoc.html">README.rdoc</a></li>
|
102
|
+
|
103
|
+
<li class="file"><a href="../TODO_rdoc.html">TODO.rdoc</a></li>
|
104
|
+
|
105
|
+
</ul>
|
106
|
+
</div>
|
107
|
+
|
108
|
+
|
109
|
+
<div id="classindex-section" class="section project-section">
|
110
|
+
<h3 class="section-header">Class Index
|
111
|
+
<span class="search-toggle"><img src="../images/find.png"
|
112
|
+
height="16" width="16" alt="[+]"
|
113
|
+
title="show/hide quicksearch" /></span></h3>
|
114
|
+
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
115
|
+
<fieldset>
|
116
|
+
<legend>Quicksearch</legend>
|
117
|
+
<input type="text" name="quicksearch" value=""
|
118
|
+
class="quicksearch-field" />
|
119
|
+
</fieldset>
|
120
|
+
</form>
|
121
|
+
|
122
|
+
<ul class="link-list">
|
123
|
+
|
124
|
+
<li><a href="../MIDI.html">MIDI</a></li>
|
125
|
+
|
126
|
+
<li><a href="../MIDI/ActiveSense.html">MIDI::ActiveSense</a></li>
|
127
|
+
|
128
|
+
<li><a href="../MIDI/ChannelEvent.html">MIDI::ChannelEvent</a></li>
|
129
|
+
|
130
|
+
<li><a href="../MIDI/ChannelPressure.html">MIDI::ChannelPressure</a></li>
|
131
|
+
|
132
|
+
<li><a href="../MIDI/Clock.html">MIDI::Clock</a></li>
|
133
|
+
|
134
|
+
<li><a href="../MIDI/Continue.html">MIDI::Continue</a></li>
|
135
|
+
|
136
|
+
<li><a href="../MIDI/Controller.html">MIDI::Controller</a></li>
|
137
|
+
|
138
|
+
<li><a href="../MIDI/Event.html">MIDI::Event</a></li>
|
139
|
+
|
140
|
+
<li><a href="../MIDI/IO.html">MIDI::IO</a></li>
|
141
|
+
|
142
|
+
<li><a href="../MIDI/IO/MIDIFile.html">MIDI::IO::MIDIFile</a></li>
|
143
|
+
|
144
|
+
<li><a href="../MIDI/IO/SeqReader.html">MIDI::IO::SeqReader</a></li>
|
145
|
+
|
146
|
+
<li><a href="../MIDI/IO/SeqWriter.html">MIDI::IO::SeqWriter</a></li>
|
147
|
+
|
148
|
+
<li><a href="../MIDI/KeySig.html">MIDI::KeySig</a></li>
|
149
|
+
|
150
|
+
<li><a href="../MIDI/Marker.html">MIDI::Marker</a></li>
|
151
|
+
|
152
|
+
<li><a href="../MIDI/Measure.html">MIDI::Measure</a></li>
|
153
|
+
|
154
|
+
<li><a href="../MIDI/Measures.html">MIDI::Measures</a></li>
|
155
|
+
|
156
|
+
<li><a href="../MIDI/MetaEvent.html">MIDI::MetaEvent</a></li>
|
157
|
+
|
158
|
+
<li><a href="../MIDI/NoteEvent.html">MIDI::NoteEvent</a></li>
|
159
|
+
|
160
|
+
<li><a href="../MIDI/NoteOff.html">MIDI::NoteOff</a></li>
|
161
|
+
|
162
|
+
<li><a href="../MIDI/NoteOff.html">MIDI::NoteOff</a></li>
|
163
|
+
|
164
|
+
<li><a href="../MIDI/NoteOn.html">MIDI::NoteOn</a></li>
|
165
|
+
|
166
|
+
<li><a href="../MIDI/NoteOn.html">MIDI::NoteOn</a></li>
|
167
|
+
|
168
|
+
<li><a href="../MIDI/PitchBend.html">MIDI::PitchBend</a></li>
|
169
|
+
|
170
|
+
<li><a href="../MIDI/PolyPressure.html">MIDI::PolyPressure</a></li>
|
171
|
+
|
172
|
+
<li><a href="../MIDI/ProgramChange.html">MIDI::ProgramChange</a></li>
|
173
|
+
|
174
|
+
<li><a href="../MIDI/Realtime.html">MIDI::Realtime</a></li>
|
175
|
+
|
176
|
+
<li><a href="../MIDI/Sequence.html">MIDI::Sequence</a></li>
|
177
|
+
|
178
|
+
<li><a href="../MIDI/SongPointer.html">MIDI::SongPointer</a></li>
|
179
|
+
|
180
|
+
<li><a href="../MIDI/SongSelect.html">MIDI::SongSelect</a></li>
|
181
|
+
|
182
|
+
<li><a href="../MIDI/Start.html">MIDI::Start</a></li>
|
183
|
+
|
184
|
+
<li><a href="../MIDI/Stop.html">MIDI::Stop</a></li>
|
185
|
+
|
186
|
+
<li><a href="../MIDI/SystemCommon.html">MIDI::SystemCommon</a></li>
|
187
|
+
|
188
|
+
<li><a href="../MIDI/SystemExclusive.html">MIDI::SystemExclusive</a></li>
|
189
|
+
|
190
|
+
<li><a href="../MIDI/SystemReset.html">MIDI::SystemReset</a></li>
|
191
|
+
|
192
|
+
<li><a href="../MIDI/Tempo.html">MIDI::Tempo</a></li>
|
193
|
+
|
194
|
+
<li><a href="../MIDI/TimeSig.html">MIDI::TimeSig</a></li>
|
195
|
+
|
196
|
+
<li><a href="../MIDI/Track.html">MIDI::Track</a></li>
|
197
|
+
|
198
|
+
<li><a href="../MIDI/TuneRequest.html">MIDI::TuneRequest</a></li>
|
199
|
+
|
200
|
+
<li><a href="../MIDI/Utils.html">MIDI::Utils</a></li>
|
201
|
+
|
202
|
+
<li><a href="../Array.html">Array</a></li>
|
203
|
+
|
204
|
+
<li><a href="../IO.html">IO</a></li>
|
205
|
+
|
206
|
+
</ul>
|
207
|
+
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
208
|
+
</div>
|
209
|
+
|
210
|
+
|
211
|
+
</div>
|
212
|
+
</div>
|
213
|
+
|
214
|
+
<div id="documentation">
|
215
|
+
<h1 class="class">MIDI::TimeSig</h1>
|
216
|
+
|
217
|
+
<div id="description">
|
218
|
+
<p>
|
219
|
+
Container for time signature events
|
220
|
+
</p>
|
221
|
+
|
222
|
+
</div>
|
223
|
+
|
224
|
+
<!-- Constants -->
|
225
|
+
|
226
|
+
|
227
|
+
<!-- Attributes -->
|
228
|
+
|
229
|
+
|
230
|
+
<!-- Methods -->
|
231
|
+
|
232
|
+
<div id="public-class-method-details" class="method-section section">
|
233
|
+
<h3 class="section-header">Public Class Methods</h3>
|
234
|
+
|
235
|
+
|
236
|
+
<div id="new-method" class="method-detail ">
|
237
|
+
<a name="method-c-new"></a>
|
238
|
+
|
239
|
+
<div class="method-heading">
|
240
|
+
|
241
|
+
<span class="method-name">new</span><span
|
242
|
+
class="method-args">(numer, denom, clocks, qnotes, delta_time = 0)</span>
|
243
|
+
<span class="method-click-advice">click to toggle source</span>
|
244
|
+
|
245
|
+
</div>
|
246
|
+
|
247
|
+
<div class="method-description">
|
248
|
+
|
249
|
+
<p>
|
250
|
+
Constructor
|
251
|
+
</p>
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
<div class="method-source-code"
|
256
|
+
id="new-source">
|
257
|
+
<pre>
|
258
|
+
<span class="ruby-comment cmt"># File lib/midilib/event.rb, line 548</span>
|
259
|
+
548: <span class="ruby-keyword kw">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>)
|
260
|
+
549: <span class="ruby-keyword kw">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>)
|
261
|
+
550: <span class="ruby-keyword kw">end</span></pre>
|
262
|
+
</div>
|
263
|
+
|
264
|
+
</div>
|
265
|
+
|
266
|
+
|
267
|
+
|
268
|
+
|
269
|
+
</div>
|
270
|
+
|
271
|
+
|
272
|
+
</div>
|
273
|
+
|
274
|
+
<div id="public-instance-method-details" class="method-section section">
|
275
|
+
<h3 class="section-header">Public Instance Methods</h3>
|
276
|
+
|
277
|
+
|
278
|
+
<div id="data-as-bytes-method" class="method-detail ">
|
279
|
+
<a name="method-i-data_as_bytes"></a>
|
280
|
+
|
281
|
+
<div class="method-heading">
|
282
|
+
|
283
|
+
<span class="method-name">data_as_bytes</span><span
|
284
|
+
class="method-args">()</span>
|
285
|
+
<span class="method-click-advice">click to toggle source</span>
|
286
|
+
|
287
|
+
</div>
|
288
|
+
|
289
|
+
<div class="method-description">
|
290
|
+
|
291
|
+
<p>
|
292
|
+
Returns the complete event as stored in the sequence
|
293
|
+
</p>
|
294
|
+
|
295
|
+
|
296
|
+
|
297
|
+
<div class="method-source-code"
|
298
|
+
id="data-as-bytes-source">
|
299
|
+
<pre>
|
300
|
+
<span class="ruby-comment cmt"># File lib/midilib/event.rb, line 553</span>
|
301
|
+
553: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">data_as_bytes</span>
|
302
|
+
554: <span class="ruby-identifier">data</span> = []
|
303
|
+
555: <span class="ruby-identifier">data</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@status</span>
|
304
|
+
556: <span class="ruby-identifier">data</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@meta_type</span>
|
305
|
+
557: <span class="ruby-identifier">data</span> <span class="ruby-operator"><<</span> <span class="ruby-value">4</span>
|
306
|
+
558: <span class="ruby-identifier">data</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@data</span>[<span class="ruby-value">0</span>]
|
307
|
+
559: <span class="ruby-identifier">data</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@data</span>[<span class="ruby-value">1</span>]
|
308
|
+
560: <span class="ruby-identifier">data</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@data</span>[<span class="ruby-value">2</span>]
|
309
|
+
561: <span class="ruby-identifier">data</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@data</span>[<span class="ruby-value">3</span>]
|
310
|
+
562: <span class="ruby-keyword kw">end</span></pre>
|
311
|
+
</div>
|
312
|
+
|
313
|
+
</div>
|
314
|
+
|
315
|
+
|
316
|
+
|
317
|
+
|
318
|
+
</div>
|
319
|
+
|
320
|
+
|
321
|
+
<div id="denominator-method" class="method-detail ">
|
322
|
+
<a name="method-i-denominator"></a>
|
323
|
+
|
324
|
+
<div class="method-heading">
|
325
|
+
|
326
|
+
<span class="method-name">denominator</span><span
|
327
|
+
class="method-args">()</span>
|
328
|
+
<span class="method-click-advice">click to toggle source</span>
|
329
|
+
|
330
|
+
</div>
|
331
|
+
|
332
|
+
<div class="method-description">
|
333
|
+
|
334
|
+
<p>
|
335
|
+
Returns the denominator of the time signature. Use it as a power of 2 to
|
336
|
+
get the displayed (lower-part) digit of the time signature.
|
337
|
+
</p>
|
338
|
+
|
339
|
+
|
340
|
+
|
341
|
+
<div class="method-source-code"
|
342
|
+
id="denominator-source">
|
343
|
+
<pre>
|
344
|
+
<span class="ruby-comment cmt"># File lib/midilib/event.rb, line 576</span>
|
345
|
+
576: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">denominator</span>
|
346
|
+
577: <span class="ruby-ivar">@data</span>[<span class="ruby-value">1</span>]
|
347
|
+
578: <span class="ruby-keyword kw">end</span></pre>
|
348
|
+
</div>
|
349
|
+
|
350
|
+
</div>
|
351
|
+
|
352
|
+
|
353
|
+
|
354
|
+
|
355
|
+
</div>
|
356
|
+
|
357
|
+
|
358
|
+
<div id="measure-duration-method" class="method-detail ">
|
359
|
+
<a name="method-i-measure_duration"></a>
|
360
|
+
|
361
|
+
<div class="method-heading">
|
362
|
+
|
363
|
+
<span class="method-name">measure_duration</span><span
|
364
|
+
class="method-args">(ppqn)</span>
|
365
|
+
<span class="method-click-advice">click to toggle source</span>
|
366
|
+
|
367
|
+
</div>
|
368
|
+
|
369
|
+
<div class="method-description">
|
370
|
+
|
371
|
+
<p>
|
372
|
+
Calculates the duration (in ticks) for a full measure
|
373
|
+
</p>
|
374
|
+
|
375
|
+
|
376
|
+
|
377
|
+
<div class="method-source-code"
|
378
|
+
id="measure-duration-source">
|
379
|
+
<pre>
|
380
|
+
<span class="ruby-comment cmt"># File lib/midilib/event.rb, line 565</span>
|
381
|
+
565: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">measure_duration</span>(<span class="ruby-identifier">ppqn</span>)
|
382
|
+
566: (<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>])
|
383
|
+
567: <span class="ruby-keyword kw">end</span></pre>
|
384
|
+
</div>
|
385
|
+
|
386
|
+
</div>
|
387
|
+
|
388
|
+
|
389
|
+
|
390
|
+
|
391
|
+
</div>
|
392
|
+
|
393
|
+
|
394
|
+
<div id="metronome-ticks-method" class="method-detail ">
|
395
|
+
<a name="method-i-metronome_ticks"></a>
|
396
|
+
|
397
|
+
<div class="method-heading">
|
398
|
+
|
399
|
+
<span class="method-name">metronome_ticks</span><span
|
400
|
+
class="method-args">()</span>
|
401
|
+
<span class="method-click-advice">click to toggle source</span>
|
402
|
+
|
403
|
+
</div>
|
404
|
+
|
405
|
+
<div class="method-description">
|
406
|
+
|
407
|
+
<p>
|
408
|
+
Returns the metronome tick duration for the time signature. On each quarter
|
409
|
+
note, there’s 24 ticks.
|
410
|
+
</p>
|
411
|
+
|
412
|
+
|
413
|
+
|
414
|
+
<div class="method-source-code"
|
415
|
+
id="metronome-ticks-source">
|
416
|
+
<pre>
|
417
|
+
<span class="ruby-comment cmt"># File lib/midilib/event.rb, line 582</span>
|
418
|
+
582: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">metronome_ticks</span>
|
419
|
+
583: <span class="ruby-ivar">@data</span>[<span class="ruby-value">2</span>]
|
420
|
+
584: <span class="ruby-keyword kw">end</span></pre>
|
421
|
+
</div>
|
422
|
+
|
423
|
+
</div>
|
424
|
+
|
425
|
+
|
426
|
+
|
427
|
+
|
428
|
+
</div>
|
429
|
+
|
430
|
+
|
431
|
+
<div id="numerator-method" class="method-detail ">
|
432
|
+
<a name="method-i-numerator"></a>
|
433
|
+
|
434
|
+
<div class="method-heading">
|
435
|
+
|
436
|
+
<span class="method-name">numerator</span><span
|
437
|
+
class="method-args">()</span>
|
438
|
+
<span class="method-click-advice">click to toggle source</span>
|
439
|
+
|
440
|
+
</div>
|
441
|
+
|
442
|
+
<div class="method-description">
|
443
|
+
|
444
|
+
<p>
|
445
|
+
Returns the numerator (the top digit) for the time signature
|
446
|
+
</p>
|
447
|
+
|
448
|
+
|
449
|
+
|
450
|
+
<div class="method-source-code"
|
451
|
+
id="numerator-source">
|
452
|
+
<pre>
|
453
|
+
<span class="ruby-comment cmt"># File lib/midilib/event.rb, line 570</span>
|
454
|
+
570: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">numerator</span>
|
455
|
+
571: <span class="ruby-ivar">@data</span>[<span class="ruby-value">0</span>]
|
456
|
+
572: <span class="ruby-keyword kw">end</span></pre>
|
457
|
+
</div>
|
458
|
+
|
459
|
+
</div>
|
460
|
+
|
461
|
+
|
462
|
+
|
463
|
+
|
464
|
+
</div>
|
465
|
+
|
466
|
+
|
467
|
+
<div id="to-s-method" class="method-detail ">
|
468
|
+
<a name="method-i-to_s"></a>
|
469
|
+
|
470
|
+
<div class="method-heading">
|
471
|
+
|
472
|
+
<span class="method-name">to_s</span><span
|
473
|
+
class="method-args">()</span>
|
474
|
+
<span class="method-click-advice">click to toggle source</span>
|
475
|
+
|
476
|
+
</div>
|
477
|
+
|
478
|
+
<div class="method-description">
|
479
|
+
|
480
|
+
<p>
|
481
|
+
Returns the time signature for the event as a string. Example: “time
|
482
|
+
sig 3/4“
|
483
|
+
</p>
|
484
|
+
|
485
|
+
|
486
|
+
|
487
|
+
<div class="method-source-code"
|
488
|
+
id="to-s-source">
|
489
|
+
<pre>
|
490
|
+
<span class="ruby-comment cmt"># File lib/midilib/event.rb, line 588</span>
|
491
|
+
588: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
|
492
|
+
589: <span class="ruby-node">"time sig #{@data[0]}/#{2**@data[1]}"</span>
|
493
|
+
590: <span class="ruby-keyword kw">end</span></pre>
|
494
|
+
</div>
|
495
|
+
|
496
|
+
</div>
|
497
|
+
|
498
|
+
|
499
|
+
|
500
|
+
|
501
|
+
</div>
|
502
|
+
|
503
|
+
|
504
|
+
</div>
|
505
|
+
|
506
|
+
|
507
|
+
</div>
|
508
|
+
|
509
|
+
|
510
|
+
<div id="rdoc-debugging-section-dump" class="debugging-section">
|
511
|
+
|
512
|
+
<p>Disabled; run with --debug to generate this.</p>
|
513
|
+
|
514
|
+
</div>
|
515
|
+
|
516
|
+
<div id="validator-badges">
|
517
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
518
|
+
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
519
|
+
Rdoc Generator</a> 1.1.6</small>.</p>
|
520
|
+
</div>
|
521
|
+
|
522
|
+
</body>
|
523
|
+
</html>
|
524
|
+
|