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
metadata CHANGED
@@ -1,21 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: midilib
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.4
5
- prerelease:
4
+ version: 3.1.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Jim Menard
9
- autorequire:
8
+ autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-02-19 00:00:00.000000000 Z
11
+ date: 2022-09-04 00:00:00.000000000 Z
13
12
  dependencies: []
14
- description: ! 'midilib is a pure Ruby MIDI library useful for reading and
15
-
13
+ description: |
14
+ midilib is a pure Ruby MIDI library useful for reading and
16
15
  writing standard MIDI files and manipulating MIDI event data.
17
-
18
- '
19
16
  email: jim@jimmenard.com
20
17
  executables: []
21
18
  extensions: []
@@ -25,52 +22,20 @@ extra_rdoc_files:
25
22
  files:
26
23
  - ChangeLog
27
24
  - Credits
28
- - Rakefile
29
25
  - README.rdoc
26
+ - Rakefile
30
27
  - TODO.rdoc
28
+ - examples/NoFences.mid
31
29
  - examples/from_scratch.mid
32
30
  - examples/from_scratch.rb
33
31
  - examples/measures_mbt.rb
34
- - examples/NoFences.mid
35
32
  - examples/print_program_changes.rb
36
33
  - examples/reader2text.rb
37
34
  - examples/seq2text.rb
38
35
  - examples/split.rb
39
36
  - examples/strings.rb
40
37
  - examples/transpose.rb
41
- - html/created.rid
42
- - html/images/add.png
43
- - html/images/brick.png
44
- - html/images/brick_link.png
45
- - html/images/bug.png
46
- - html/images/bullet_black.png
47
- - html/images/bullet_toggle_minus.png
48
- - html/images/bullet_toggle_plus.png
49
- - html/images/date.png
50
- - html/images/delete.png
51
- - html/images/find.png
52
- - html/images/loadingAnimation.gif
53
- - html/images/macFFBgHack.png
54
- - html/images/package.png
55
- - html/images/page_green.png
56
- - html/images/page_white_text.png
57
- - html/images/page_white_width.png
58
- - html/images/plugin.png
59
- - html/images/ruby.png
60
- - html/images/tag_blue.png
61
- - html/images/tag_green.png
62
- - html/images/transparent.png
63
- - html/images/wrench.png
64
- - html/images/wrench_orange.png
65
- - html/images/zoom.png
66
- - html/index.html
67
- - html/IO.html
68
- - html/js/darkfish.js
69
- - html/js/jquery.js
70
- - html/js/navigation.js
71
- - html/js/search.js
72
- - html/js/search_index.js
73
- - html/js/searcher.js
38
+ - html/MIDI.html
74
39
  - html/MIDI/ActiveSense.html
75
40
  - html/MIDI/ChannelEvent.html
76
41
  - html/MIDI/ChannelPressure.html
@@ -78,18 +43,15 @@ files:
78
43
  - html/MIDI/Continue.html
79
44
  - html/MIDI/Controller.html
80
45
  - html/MIDI/Event.html
46
+ - html/MIDI/IO.html
81
47
  - html/MIDI/IO/MIDIFile.html
82
48
  - html/MIDI/IO/SeqReader.html
83
49
  - html/MIDI/IO/SeqWriter.html
84
- - html/MIDI/IO.html
85
50
  - html/MIDI/KeySig.html
86
51
  - html/MIDI/Marker.html
87
52
  - html/MIDI/Measure.html
88
53
  - html/MIDI/Measures.html
89
54
  - html/MIDI/MetaEvent.html
90
- - html/MIDI/MIDI/MIDI/Array.html
91
- - html/MIDI/MIDI/MIDI.html
92
- - html/MIDI/MIDI.html
93
55
  - html/MIDI/NoteEvent.html
94
56
  - html/MIDI/NoteOff.html
95
57
  - html/MIDI/NoteOn.html
@@ -110,12 +72,55 @@ files:
110
72
  - html/MIDI/Track.html
111
73
  - html/MIDI/TuneRequest.html
112
74
  - html/MIDI/Utils.html
113
- - html/MIDI.html
114
- - html/rdoc.css
75
+ - html/Object.html
115
76
  - html/README_rdoc.html
116
- - html/table_of_contents.html
117
77
  - html/TODO_rdoc.html
78
+ - html/created.rid
79
+ - html/css/fonts.css
80
+ - html/css/rdoc.css
81
+ - html/fonts/Lato-Light.ttf
82
+ - html/fonts/Lato-LightItalic.ttf
83
+ - html/fonts/Lato-Regular.ttf
84
+ - html/fonts/Lato-RegularItalic.ttf
85
+ - html/fonts/SourceCodePro-Bold.ttf
86
+ - html/fonts/SourceCodePro-Regular.ttf
87
+ - html/images/add.png
88
+ - html/images/arrow_up.png
89
+ - html/images/brick.png
90
+ - html/images/brick_link.png
91
+ - html/images/bug.png
92
+ - html/images/bullet_black.png
93
+ - html/images/bullet_toggle_minus.png
94
+ - html/images/bullet_toggle_plus.png
95
+ - html/images/date.png
96
+ - html/images/delete.png
97
+ - html/images/find.png
98
+ - html/images/loadingAnimation.gif
99
+ - html/images/macFFBgHack.png
100
+ - html/images/package.png
101
+ - html/images/page_green.png
102
+ - html/images/page_white_text.png
103
+ - html/images/page_white_width.png
104
+ - html/images/plugin.png
105
+ - html/images/ruby.png
106
+ - html/images/tag_blue.png
107
+ - html/images/tag_green.png
108
+ - html/images/transparent.png
109
+ - html/images/wrench.png
110
+ - html/images/wrench_orange.png
111
+ - html/images/zoom.png
112
+ - html/index.html
113
+ - html/js/darkfish.js
114
+ - html/js/navigation.js
115
+ - html/js/navigation.js.gz
116
+ - html/js/search.js
117
+ - html/js/search_index.js
118
+ - html/js/search_index.js.gz
119
+ - html/js/searcher.js
120
+ - html/js/searcher.js.gz
121
+ - html/table_of_contents.html
118
122
  - install.rb
123
+ - lib/midilib.rb
119
124
  - lib/midilib/consts.rb
120
125
  - lib/midilib/event.rb
121
126
  - lib/midilib/info.rb
@@ -123,43 +128,43 @@ files:
123
128
  - lib/midilib/io/seqreader.rb
124
129
  - lib/midilib/io/seqwriter.rb
125
130
  - lib/midilib/measure.rb
131
+ - lib/midilib/mergesort.rb
126
132
  - lib/midilib/sequence.rb
127
133
  - lib/midilib/track.rb
128
134
  - lib/midilib/utils.rb
129
- - lib/midilib.rb
130
135
  - test/event_equality.rb
131
136
  - test/test.mid
132
137
  - test/test_event.rb
133
138
  - test/test_io.rb
139
+ - test/test_mergesort.rb
134
140
  - test/test_midifile.rb
135
141
  - test/test_sequence.rb
136
142
  - test/test_track.rb
137
143
  - test/test_varlen.rb
138
144
  homepage: http://github.com/jimm/midilib
139
- licenses: []
140
- post_install_message:
145
+ licenses:
146
+ - Ruby
147
+ metadata: {}
148
+ post_install_message:
141
149
  rdoc_options:
142
- - --main
150
+ - "--main"
143
151
  - README.rdoc
144
152
  require_paths:
145
153
  - lib
146
154
  required_ruby_version: !ruby/object:Gem::Requirement
147
- none: false
148
155
  requirements:
149
- - - ! '>='
156
+ - - ">="
150
157
  - !ruby/object:Gem::Version
151
158
  version: '0'
152
159
  required_rubygems_version: !ruby/object:Gem::Requirement
153
- none: false
154
160
  requirements:
155
- - - ! '>='
161
+ - - ">="
156
162
  - !ruby/object:Gem::Version
157
163
  version: '0'
158
164
  requirements:
159
165
  - none
160
- rubyforge_project: midilib
161
- rubygems_version: 1.8.12
162
- signing_key:
163
- specification_version: 3
166
+ rubygems_version: 3.3.7
167
+ signing_key:
168
+ specification_version: 4
164
169
  summary: MIDI file and event manipulation library
165
170
  test_files: []
data/html/IO.html DELETED
@@ -1,259 +0,0 @@
1
- <!DOCTYPE html>
2
-
3
- <html>
4
- <head>
5
- <meta content="text/html; charset=US-ASCII" http-equiv="Content-Type">
6
-
7
- <title>class IO - midilib</title>
8
-
9
- <link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet">
10
-
11
- <script type="text/javascript">
12
- var rdoc_rel_prefix = "./";
13
- </script>
14
-
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>
21
-
22
-
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>
28
- <a href="./table_of_contents.html#classes">Classes</a>
29
- <a href="./table_of_contents.html#methods">Methods</a>
30
- </h3>
31
- </nav>
32
-
33
-
34
- <nav id="search-section" class="section project-section" class="initially-hidden">
35
- <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
- 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
-
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/io/midifile.rb
51
- </ul>
52
- </nav>
53
-
54
-
55
- </div>
56
-
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">Object
63
-
64
- </nav>
65
-
66
-
67
- <!-- Method Quickref -->
68
- <nav id="method-list-section" class="section">
69
- <h3 class="section-header">Methods</h3>
70
-
71
- <ul class="link-list">
72
-
73
- <li><a href="#method-i-readbyte">#readbyte</a>
74
-
75
- </ul>
76
- </nav>
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>
186
-
187
- </div>
188
- </nav>
189
-
190
- <div id="documentation">
191
- <h1 class="class">class IO</h1>
192
-
193
- <div id="description" class="description">
194
-
195
- </div><!-- description -->
196
-
197
-
198
-
199
-
200
- <section id="5Buntitled-5D" class="documentation-section">
201
-
202
-
203
-
204
-
205
-
206
-
207
-
208
-
209
- <!-- Methods -->
210
-
211
- <section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
212
- <h3 class="section-header">Public Instance Methods</h3>
213
-
214
-
215
- <div id="method-i-readbyte" class="method-detail ">
216
-
217
- <div class="method-heading">
218
- <span class="method-name">readbyte</span><span
219
- class="method-args">()</span>
220
- <span class="method-click-advice">click to toggle source</span>
221
- </div>
222
-
223
-
224
- <div class="method-description">
225
-
226
-
227
-
228
-
229
-
230
- <div class="method-source-code" id="readbyte-source">
231
- <pre><span class="ruby-comment"># File lib/midilib/io/midifile.rb, line 5</span>
232
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">readbyte</span>
233
- <span class="ruby-identifier">c</span> = <span class="ruby-identifier">getc</span>()
234
- <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
- <span class="ruby-identifier">c</span>
236
- <span class="ruby-keyword">end</span></pre>
237
- </div><!-- readbyte-source -->
238
-
239
- </div>
240
-
241
-
242
-
243
-
244
- </div><!-- readbyte-method -->
245
-
246
-
247
- </section><!-- public-instance-method-details -->
248
-
249
- </section><!-- 5Buntitled-5D -->
250
-
251
- </div><!-- documentation -->
252
-
253
-
254
- <footer id="validator-badges">
255
- <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
256
- <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
257
- <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
258
- </footer>
259
-