midilib 2.0.4 → 2.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.rdoc +9 -4
- data/Rakefile +2 -6
- data/examples/from_scratch.rb +3 -5
- data/examples/measures_mbt.rb +4 -4
- data/examples/print_program_changes.rb +9 -9
- data/examples/reader2text.rb +188 -188
- data/examples/seq2text.rb +17 -17
- data/examples/split.rb +19 -19
- data/examples/strings.rb +14 -14
- data/examples/transpose.rb +31 -31
- data/html/IO.html +65 -169
- data/html/MIDI.html +138 -256
- data/html/MIDI/ActiveSense.html +89 -178
- data/html/MIDI/ChannelEvent.html +95 -183
- data/html/MIDI/ChannelPressure.html +105 -190
- data/html/MIDI/Clock.html +89 -178
- data/html/MIDI/Continue.html +89 -178
- data/html/MIDI/Controller.html +107 -192
- data/html/MIDI/Event.html +138 -222
- data/html/MIDI/IO.html +45 -157
- data/html/MIDI/IO/MIDIFile.html +596 -568
- data/html/MIDI/IO/SeqReader.html +272 -314
- data/html/MIDI/IO/SeqWriter.html +229 -305
- data/html/MIDI/KeySig.html +129 -211
- data/html/MIDI/MIDI.html +45 -154
- data/html/MIDI/MIDI/MIDI.html +45 -154
- data/html/MIDI/MIDI/MIDI/Array.html +87 -185
- data/html/MIDI/Marker.html +71 -170
- data/html/MIDI/Measure.html +95 -190
- data/html/MIDI/Measures.html +103 -193
- data/html/MIDI/MetaEvent.html +180 -253
- data/html/MIDI/NoteEvent.html +118 -204
- data/html/MIDI/NoteOff.html +95 -183
- data/html/MIDI/NoteOn.html +95 -183
- data/html/MIDI/PitchBend.html +106 -191
- data/html/MIDI/PolyPressure.html +106 -189
- data/html/MIDI/ProgramChange.html +105 -190
- data/html/MIDI/Realtime.html +98 -184
- data/html/MIDI/Sequence.html +246 -311
- data/html/MIDI/SongPointer.html +106 -191
- data/html/MIDI/SongSelect.html +105 -190
- data/html/MIDI/Start.html +89 -178
- data/html/MIDI/Stop.html +89 -178
- data/html/MIDI/SystemCommon.html +71 -170
- data/html/MIDI/SystemExclusive.html +108 -193
- data/html/MIDI/SystemReset.html +89 -178
- data/html/MIDI/Tempo.html +135 -213
- data/html/MIDI/TimeSig.html +135 -214
- data/html/MIDI/Track.html +217 -291
- data/html/MIDI/TuneRequest.html +98 -184
- data/html/MIDI/Utils.html +89 -189
- data/html/README_rdoc.html +237 -257
- data/html/TODO_rdoc.html +64 -139
- data/html/created.rid +14 -14
- data/html/css/fonts.css +167 -0
- data/html/{rdoc.css → css/rdoc.css} +265 -218
- data/html/fonts/Lato-Light.ttf +0 -0
- data/html/fonts/Lato-LightItalic.ttf +0 -0
- data/html/fonts/Lato-Regular.ttf +0 -0
- data/html/fonts/Lato-RegularItalic.ttf +0 -0
- data/html/fonts/SourceCodePro-Bold.ttf +0 -0
- data/html/fonts/SourceCodePro-Regular.ttf +0 -0
- data/html/images/add.png +0 -0
- data/html/images/arrow_up.png +0 -0
- data/html/images/delete.png +0 -0
- data/html/images/tag_blue.png +0 -0
- data/html/index.html +187 -169
- data/html/js/darkfish.js +41 -33
- data/html/js/jquery.js +4 -18
- data/html/js/navigation.js.gz +0 -0
- data/html/js/search.js +20 -5
- data/html/js/search_index.js +1 -1
- data/html/js/search_index.js.gz +0 -0
- data/html/js/searcher.js.gz +0 -0
- data/html/table_of_contents.html +1111 -498
- data/install.rb +43 -32
- data/lib/midilib/consts.rb +407 -407
- data/lib/midilib/event.rb +295 -294
- data/lib/midilib/info.rb +5 -5
- data/lib/midilib/io/midifile.rb +266 -267
- data/lib/midilib/io/seqreader.rb +106 -106
- data/lib/midilib/io/seqwriter.rb +59 -60
- data/lib/midilib/measure.rb +69 -69
- data/lib/midilib/sequence.rb +68 -70
- data/lib/midilib/track.rb +96 -102
- data/lib/midilib/utils.rb +15 -15
- data/test/event_equality.rb +50 -50
- data/test/test_event.rb +120 -122
- data/test/test_io.rb +35 -48
- data/test/test_sequence.rb +60 -60
- data/test/test_track.rb +154 -154
- data/test/test_varlen.rb +23 -25
- metadata +65 -57
data/examples/seq2text.rb
CHANGED
@@ -21,21 +21,21 @@ DEFAULT_MIDI_TEST_FILE = 'NoFences.mid'
|
|
21
21
|
# Read from MIDI file
|
22
22
|
seq = MIDI::Sequence.new()
|
23
23
|
|
24
|
-
File.open(ARGV[0] || DEFAULT_MIDI_TEST_FILE, 'rb')
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
24
|
+
File.open(ARGV[0] || DEFAULT_MIDI_TEST_FILE, 'rb') do |file|
|
25
|
+
# The block we pass in to Sequence.read is called at the end of every
|
26
|
+
# track read. It is optional, but is useful for progress reports.
|
27
|
+
seq.read(file) do |track, num_tracks, i|
|
28
|
+
puts "read track #{track ? track.name : ''} (#{i} of #{num_tracks})"
|
29
|
+
end
|
30
|
+
end
|
31
31
|
|
32
|
-
seq.each
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
32
|
+
seq.each do |track|
|
33
|
+
puts "*** track name \"#{track.name}\""
|
34
|
+
puts "instrument name \"#{track.instrument}\""
|
35
|
+
puts "#{track.events.length} events"
|
36
|
+
track.each do |e|
|
37
|
+
e.print_decimal_numbers = true # default = false (print hex)
|
38
|
+
e.print_note_names = true # default = false (print note numbers)
|
39
|
+
puts e
|
40
|
+
end
|
41
|
+
end
|
data/examples/split.rb
CHANGED
@@ -22,31 +22,31 @@ DEFAULT_MIDI_TEST_FILE = 'NoFences.mid'
|
|
22
22
|
filename = ARGV[0]
|
23
23
|
include_tempo_track = true
|
24
24
|
if filename == '-x'
|
25
|
-
|
26
|
-
|
25
|
+
include_tempo_track = false
|
26
|
+
filename = ARGV[1]
|
27
27
|
end
|
28
28
|
|
29
29
|
# Read from MIDI file
|
30
30
|
seq = MIDI::Sequence.new()
|
31
31
|
|
32
|
-
File.open(filename || DEFAULT_MIDI_TEST_FILE, 'rb')
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
32
|
+
File.open(filename || DEFAULT_MIDI_TEST_FILE, 'rb') do |file|
|
33
|
+
# The block we pass in to Sequence.read is called at the end of every
|
34
|
+
# track read. It is optional, but is useful for progress reports.
|
35
|
+
seq.read(file) do |track, num_tracks, i|
|
36
|
+
puts "read track #{track ? track.name : ''} (#{i} of #{num_tracks})"
|
37
|
+
end
|
38
|
+
end
|
39
39
|
|
40
40
|
t0 = seq.tracks[0]
|
41
41
|
unless include_tempo_track
|
42
|
-
|
43
|
-
|
44
|
-
|
42
|
+
s = MIDI::Sequence.new
|
43
|
+
s.tracks << t0
|
44
|
+
File.open("tempo_track.mid", 'wb') { | file | s.write(file) }
|
45
|
+
end
|
46
|
+
seq.each_with_index do |track, i|
|
47
|
+
next unless i > 0
|
48
|
+
s = MIDI::Sequence.new
|
49
|
+
s.tracks << t0 if include_tempo_track
|
50
|
+
s.tracks << track
|
51
|
+
File.open("#{track.name}.mid", 'wb') { | file | s.write(file) }
|
45
52
|
end
|
46
|
-
seq.each_with_index { | track, i |
|
47
|
-
next unless i > 0
|
48
|
-
s = MIDI::Sequence.new
|
49
|
-
s.tracks << t0 if include_tempo_track
|
50
|
-
s.tracks << track
|
51
|
-
File.open("#{track.name}.mid", 'wb') { | file | s.write(file) }
|
52
|
-
}
|
data/examples/strings.rb
CHANGED
@@ -16,19 +16,19 @@ require 'midilib/consts'
|
|
16
16
|
DEFAULT_MIDI_TEST_FILE = 'NoFences.mid'
|
17
17
|
|
18
18
|
seq = MIDI::Sequence.new()
|
19
|
-
File.open(ARGV[0] || DEFAULT_MIDI_TEST_FILE, 'rb')
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
19
|
+
File.open(ARGV[0] || DEFAULT_MIDI_TEST_FILE, 'rb') do |file|
|
20
|
+
# The block we pass in to Sequence.read is called at the end of every
|
21
|
+
# track read. It is optional, but is useful for progress reports.
|
22
|
+
seq.read(file) do |track, num_tracks, i|
|
23
|
+
puts "read track #{track ? track.name : ''} (#{i} of #{num_tracks})"
|
24
|
+
end
|
25
|
+
end
|
26
26
|
|
27
27
|
include MIDI
|
28
|
-
seq.each
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
28
|
+
seq.each do |track|
|
29
|
+
track.each do |event|
|
30
|
+
puts event.data if event.kind_of?(MIDI::MetaEvent) &&
|
31
|
+
[META_TEXT, META_COPYRIGHT, META_SEQ_NAME, META_INSTRUMENT,
|
32
|
+
META_LYRIC, META_CUE, META_MARKER].include?(event.meta_type)
|
33
|
+
end
|
34
|
+
end
|
data/examples/transpose.rb
CHANGED
@@ -19,14 +19,14 @@ require 'midilib/io/seqwriter'
|
|
19
19
|
|
20
20
|
|
21
21
|
def usage
|
22
|
-
|
22
|
+
$stderr.print <<EOF
|
23
23
|
usage: #{$0} [--channel|-c channel] [--transpose|-t half_steps]
|
24
24
|
input_midi_file output_midi_file
|
25
25
|
|
26
26
|
--channel|-c channel 1-16; default is 1
|
27
27
|
--transpose|-t half_steps default = 12 (one octave up)
|
28
28
|
EOF
|
29
|
-
|
29
|
+
exit(1)
|
30
30
|
end
|
31
31
|
|
32
32
|
transpose = 12
|
@@ -34,40 +34,40 @@ channel = 0
|
|
34
34
|
|
35
35
|
g = GetoptLong.new(['--transpose', '-t', GetoptLong::REQUIRED_ARGUMENT],
|
36
36
|
['--channel', '-c', GetoptLong::REQUIRED_ARGUMENT])
|
37
|
-
g.each
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
37
|
+
g.each do |name, arg|
|
38
|
+
case name
|
39
|
+
when '--transpose'
|
40
|
+
transpose = arg.to_i
|
41
|
+
when '--channel'
|
42
|
+
channel = arg.to_i - 1
|
43
|
+
else
|
44
|
+
usage()
|
45
|
+
end
|
46
|
+
end
|
47
47
|
|
48
48
|
usage() unless ARGV.length >= 2
|
49
49
|
|
50
50
|
seq = MIDI::Sequence.new()
|
51
|
-
File.open(ARGV[0], 'rb')
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
51
|
+
File.open(ARGV[0], 'rb') do |file|
|
52
|
+
# The block we pass in to Sequence.read is called at the end of every
|
53
|
+
# track read. It is optional, but is useful for progress reports.
|
54
|
+
seq.read(file) do |num_tracks, i|
|
55
|
+
puts "read track #{i} of #{num_tracks}"
|
56
|
+
end
|
57
|
+
end
|
58
58
|
|
59
|
-
seq.each
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
59
|
+
seq.each do |track|
|
60
|
+
track.each do |event|
|
61
|
+
if event.kind_of?(MIDI::NoteEvent) && event.channel == channel
|
62
|
+
val = event.note + transpose
|
63
|
+
if val < 0 || val > 127
|
64
|
+
$stderr.puts "transposition out of range; ignored"
|
65
|
+
else
|
66
|
+
event.note = val
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
71
|
|
72
72
|
# Output to named file or stdout.
|
73
73
|
file = ARGV[1] ? File.open(ARGV[1], 'wb') : $stdout
|
data/html/IO.html
CHANGED
@@ -2,197 +2,90 @@
|
|
2
2
|
|
3
3
|
<html>
|
4
4
|
<head>
|
5
|
-
<meta
|
5
|
+
<meta charset="UTF-8">
|
6
6
|
|
7
7
|
<title>class IO - 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
|
16
|
-
<script
|
17
|
-
|
18
|
-
<
|
19
|
-
<
|
20
|
-
|
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
|
+
|
21
19
|
|
22
20
|
|
23
|
-
<body id="top" class="class">
|
24
|
-
<nav
|
25
|
-
<
|
26
|
-
|
27
|
-
|
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>
|
28
|
+
|
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
|
-
</
|
31
|
-
</
|
32
|
-
|
33
|
+
</div>
|
34
|
+
</div>
|
33
35
|
|
34
|
-
|
36
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
35
37
|
<form action="#" method="get" accept-charset="utf-8">
|
36
|
-
<
|
37
|
-
<input
|
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
|
-
</
|
40
|
-
</form>
|
41
|
-
|
42
|
-
<ul id="search-results" class="initially-hidden"></ul>
|
43
|
-
</nav>
|
44
|
-
|
43
|
+
</div>
|
45
44
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
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
|
-
<
|
60
|
-
<h3
|
57
|
+
<div id="parent-class-section" class="nav-section">
|
58
|
+
<h3>Parent</h3>
|
59
|
+
|
61
60
|
|
62
61
|
<p class="link">Object
|
63
62
|
|
64
|
-
</
|
63
|
+
</div>
|
65
64
|
|
66
65
|
|
66
|
+
|
67
67
|
<!-- Method Quickref -->
|
68
|
-
<
|
69
|
-
<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-i-readbyte">#readbyte</a>
|
73
|
+
<li ><a href="#method-i-readbyte">#readbyte</a>
|
74
74
|
|
75
75
|
</ul>
|
76
|
-
</
|
77
|
-
|
78
|
-
</div>
|
79
|
-
|
80
|
-
<div id="project-metadata">
|
81
|
-
<nav id="fileindex-section" class="section project-section">
|
82
|
-
<h3 class="section-header">Pages</h3>
|
83
|
-
|
84
|
-
<ul>
|
85
|
-
|
86
|
-
<li class="file"><a href="./README_rdoc.html">README</a>
|
87
|
-
|
88
|
-
<li class="file"><a href="./TODO_rdoc.html">TODO</a>
|
89
|
-
|
90
|
-
</ul>
|
91
|
-
</nav>
|
92
|
-
|
93
|
-
<nav id="classindex-section" class="section project-section">
|
94
|
-
<h3 class="section-header">Class and Module Index</h3>
|
95
|
-
|
96
|
-
<ul class="link-list">
|
97
|
-
|
98
|
-
<li><a href="./MIDI.html">MIDI</a>
|
99
|
-
|
100
|
-
<li><a href="./MIDI/ActiveSense.html">MIDI::ActiveSense</a>
|
101
|
-
|
102
|
-
<li><a href="./MIDI/ChannelEvent.html">MIDI::ChannelEvent</a>
|
103
|
-
|
104
|
-
<li><a href="./MIDI/ChannelPressure.html">MIDI::ChannelPressure</a>
|
105
|
-
|
106
|
-
<li><a href="./MIDI/Clock.html">MIDI::Clock</a>
|
107
|
-
|
108
|
-
<li><a href="./MIDI/Continue.html">MIDI::Continue</a>
|
109
|
-
|
110
|
-
<li><a href="./MIDI/Controller.html">MIDI::Controller</a>
|
111
|
-
|
112
|
-
<li><a href="./MIDI/Event.html">MIDI::Event</a>
|
113
|
-
|
114
|
-
<li><a href="./MIDI/IO.html">MIDI::IO</a>
|
115
|
-
|
116
|
-
<li><a href="./MIDI/IO/MIDIFile.html">MIDI::IO::MIDIFile</a>
|
117
|
-
|
118
|
-
<li><a href="./MIDI/IO/SeqReader.html">MIDI::IO::SeqReader</a>
|
119
|
-
|
120
|
-
<li><a href="./MIDI/IO/SeqWriter.html">MIDI::IO::SeqWriter</a>
|
121
|
-
|
122
|
-
<li><a href="./MIDI/KeySig.html">MIDI::KeySig</a>
|
123
|
-
|
124
|
-
<li><a href="./MIDI/MIDI.html">MIDI::MIDI</a>
|
125
|
-
|
126
|
-
<li><a href="./MIDI/MIDI/MIDI.html">MIDI::MIDI::MIDI</a>
|
127
|
-
|
128
|
-
<li><a href="./MIDI/MIDI/MIDI/Array.html">MIDI::MIDI::MIDI::Array</a>
|
129
|
-
|
130
|
-
<li><a href="./MIDI/Marker.html">MIDI::Marker</a>
|
131
|
-
|
132
|
-
<li><a href="./MIDI/Measure.html">MIDI::Measure</a>
|
133
|
-
|
134
|
-
<li><a href="./MIDI/Measures.html">MIDI::Measures</a>
|
135
|
-
|
136
|
-
<li><a href="./MIDI/MetaEvent.html">MIDI::MetaEvent</a>
|
137
|
-
|
138
|
-
<li><a href="./MIDI/NoteEvent.html">MIDI::NoteEvent</a>
|
139
|
-
|
140
|
-
<li><a href="./MIDI/NoteOff.html">MIDI::NoteOff</a>
|
141
|
-
|
142
|
-
<li><a href="./MIDI/NoteOff.html">MIDI::NoteOffEvent</a>
|
143
|
-
|
144
|
-
<li><a href="./MIDI/NoteOn.html">MIDI::NoteOn</a>
|
145
|
-
|
146
|
-
<li><a href="./MIDI/NoteOn.html">MIDI::NoteOnEvent</a>
|
147
|
-
|
148
|
-
<li><a href="./MIDI/PitchBend.html">MIDI::PitchBend</a>
|
149
|
-
|
150
|
-
<li><a href="./MIDI/PolyPressure.html">MIDI::PolyPressure</a>
|
151
|
-
|
152
|
-
<li><a href="./MIDI/ProgramChange.html">MIDI::ProgramChange</a>
|
153
|
-
|
154
|
-
<li><a href="./MIDI/Realtime.html">MIDI::Realtime</a>
|
155
|
-
|
156
|
-
<li><a href="./MIDI/Sequence.html">MIDI::Sequence</a>
|
157
|
-
|
158
|
-
<li><a href="./MIDI/SongPointer.html">MIDI::SongPointer</a>
|
159
|
-
|
160
|
-
<li><a href="./MIDI/SongSelect.html">MIDI::SongSelect</a>
|
161
|
-
|
162
|
-
<li><a href="./MIDI/Start.html">MIDI::Start</a>
|
163
|
-
|
164
|
-
<li><a href="./MIDI/Stop.html">MIDI::Stop</a>
|
165
|
-
|
166
|
-
<li><a href="./MIDI/SystemCommon.html">MIDI::SystemCommon</a>
|
167
|
-
|
168
|
-
<li><a href="./MIDI/SystemExclusive.html">MIDI::SystemExclusive</a>
|
169
|
-
|
170
|
-
<li><a href="./MIDI/SystemReset.html">MIDI::SystemReset</a>
|
171
|
-
|
172
|
-
<li><a href="./MIDI/Tempo.html">MIDI::Tempo</a>
|
173
|
-
|
174
|
-
<li><a href="./MIDI/TimeSig.html">MIDI::TimeSig</a>
|
175
|
-
|
176
|
-
<li><a href="./MIDI/Track.html">MIDI::Track</a>
|
177
|
-
|
178
|
-
<li><a href="./MIDI/TuneRequest.html">MIDI::TuneRequest</a>
|
179
|
-
|
180
|
-
<li><a href="./MIDI/Utils.html">MIDI::Utils</a>
|
181
|
-
|
182
|
-
<li><a href="./IO.html">IO</a>
|
183
|
-
|
184
|
-
</ul>
|
185
|
-
</nav>
|
76
|
+
</div>
|
186
77
|
|
187
78
|
</div>
|
188
79
|
</nav>
|
189
80
|
|
190
|
-
<
|
191
|
-
<h1 class="class">
|
81
|
+
<main role="main" aria-labelledby="class-IO">
|
82
|
+
<h1 id="class-IO" class="class">
|
83
|
+
class IO
|
84
|
+
</h1>
|
192
85
|
|
193
|
-
<
|
86
|
+
<section class="description">
|
194
87
|
|
195
|
-
</
|
88
|
+
</section>
|
196
89
|
|
197
90
|
|
198
91
|
|
@@ -206,10 +99,11 @@
|
|
206
99
|
|
207
100
|
|
208
101
|
|
209
|
-
<!-- Methods -->
|
210
102
|
|
211
|
-
<section id="public-instance-5Buntitled-5D-method-details" class="method-section
|
212
|
-
|
103
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
104
|
+
<header>
|
105
|
+
<h3>Public Instance Methods</h3>
|
106
|
+
</header>
|
213
107
|
|
214
108
|
|
215
109
|
<div id="method-i-readbyte" class="method-detail ">
|
@@ -217,7 +111,9 @@
|
|
217
111
|
<div class="method-heading">
|
218
112
|
<span class="method-name">readbyte</span><span
|
219
113
|
class="method-args">()</span>
|
114
|
+
|
220
115
|
<span class="method-click-advice">click to toggle source</span>
|
116
|
+
|
221
117
|
</div>
|
222
118
|
|
223
119
|
|
@@ -225,35 +121,35 @@
|
|
225
121
|
|
226
122
|
|
227
123
|
|
124
|
+
|
228
125
|
|
229
126
|
|
230
127
|
<div class="method-source-code" id="readbyte-source">
|
231
128
|
<pre><span class="ruby-comment"># File lib/midilib/io/midifile.rb, line 5</span>
|
232
129
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">readbyte</span>
|
233
130
|
<span class="ruby-identifier">c</span> = <span class="ruby-identifier">getc</span>()
|
234
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-string"
|
131
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-string">'unexpected EOF'</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">c</span>
|
235
132
|
<span class="ruby-identifier">c</span>
|
236
133
|
<span class="ruby-keyword">end</span></pre>
|
237
|
-
</div
|
134
|
+
</div>
|
238
135
|
|
239
136
|
</div>
|
240
137
|
|
241
138
|
|
242
139
|
|
243
140
|
|
244
|
-
</div
|
141
|
+
</div>
|
245
142
|
|
246
143
|
|
247
|
-
</section
|
144
|
+
</section>
|
248
145
|
|
249
|
-
</section
|
250
|
-
|
251
|
-
</div><!-- documentation -->
|
146
|
+
</section>
|
147
|
+
</main>
|
252
148
|
|
253
149
|
|
254
|
-
<footer id="validator-badges">
|
255
|
-
<p><a href="http://validator.w3.org/check/referer">
|
256
|
-
<p>Generated by <a href="
|
257
|
-
<p>
|
150
|
+
<footer id="validator-badges" role="contentinfo">
|
151
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
152
|
+
<p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.0.
|
153
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
258
154
|
</footer>
|
259
155
|
|