midilib 2.0.4 → 2.0.5

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.
Files changed (94) hide show
  1. checksums.yaml +7 -0
  2. data/README.rdoc +9 -4
  3. data/Rakefile +2 -6
  4. data/examples/from_scratch.rb +3 -5
  5. data/examples/measures_mbt.rb +4 -4
  6. data/examples/print_program_changes.rb +9 -9
  7. data/examples/reader2text.rb +188 -188
  8. data/examples/seq2text.rb +17 -17
  9. data/examples/split.rb +19 -19
  10. data/examples/strings.rb +14 -14
  11. data/examples/transpose.rb +31 -31
  12. data/html/IO.html +65 -169
  13. data/html/MIDI.html +138 -256
  14. data/html/MIDI/ActiveSense.html +89 -178
  15. data/html/MIDI/ChannelEvent.html +95 -183
  16. data/html/MIDI/ChannelPressure.html +105 -190
  17. data/html/MIDI/Clock.html +89 -178
  18. data/html/MIDI/Continue.html +89 -178
  19. data/html/MIDI/Controller.html +107 -192
  20. data/html/MIDI/Event.html +138 -222
  21. data/html/MIDI/IO.html +45 -157
  22. data/html/MIDI/IO/MIDIFile.html +596 -568
  23. data/html/MIDI/IO/SeqReader.html +272 -314
  24. data/html/MIDI/IO/SeqWriter.html +229 -305
  25. data/html/MIDI/KeySig.html +129 -211
  26. data/html/MIDI/MIDI.html +45 -154
  27. data/html/MIDI/MIDI/MIDI.html +45 -154
  28. data/html/MIDI/MIDI/MIDI/Array.html +87 -185
  29. data/html/MIDI/Marker.html +71 -170
  30. data/html/MIDI/Measure.html +95 -190
  31. data/html/MIDI/Measures.html +103 -193
  32. data/html/MIDI/MetaEvent.html +180 -253
  33. data/html/MIDI/NoteEvent.html +118 -204
  34. data/html/MIDI/NoteOff.html +95 -183
  35. data/html/MIDI/NoteOn.html +95 -183
  36. data/html/MIDI/PitchBend.html +106 -191
  37. data/html/MIDI/PolyPressure.html +106 -189
  38. data/html/MIDI/ProgramChange.html +105 -190
  39. data/html/MIDI/Realtime.html +98 -184
  40. data/html/MIDI/Sequence.html +246 -311
  41. data/html/MIDI/SongPointer.html +106 -191
  42. data/html/MIDI/SongSelect.html +105 -190
  43. data/html/MIDI/Start.html +89 -178
  44. data/html/MIDI/Stop.html +89 -178
  45. data/html/MIDI/SystemCommon.html +71 -170
  46. data/html/MIDI/SystemExclusive.html +108 -193
  47. data/html/MIDI/SystemReset.html +89 -178
  48. data/html/MIDI/Tempo.html +135 -213
  49. data/html/MIDI/TimeSig.html +135 -214
  50. data/html/MIDI/Track.html +217 -291
  51. data/html/MIDI/TuneRequest.html +98 -184
  52. data/html/MIDI/Utils.html +89 -189
  53. data/html/README_rdoc.html +237 -257
  54. data/html/TODO_rdoc.html +64 -139
  55. data/html/created.rid +14 -14
  56. data/html/css/fonts.css +167 -0
  57. data/html/{rdoc.css → css/rdoc.css} +265 -218
  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 +187 -169
  69. data/html/js/darkfish.js +41 -33
  70. data/html/js/jquery.js +4 -18
  71. data/html/js/navigation.js.gz +0 -0
  72. data/html/js/search.js +20 -5
  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.gz +0 -0
  76. data/html/table_of_contents.html +1111 -498
  77. data/install.rb +43 -32
  78. data/lib/midilib/consts.rb +407 -407
  79. data/lib/midilib/event.rb +295 -294
  80. data/lib/midilib/info.rb +5 -5
  81. data/lib/midilib/io/midifile.rb +266 -267
  82. data/lib/midilib/io/seqreader.rb +106 -106
  83. data/lib/midilib/io/seqwriter.rb +59 -60
  84. data/lib/midilib/measure.rb +69 -69
  85. data/lib/midilib/sequence.rb +68 -70
  86. data/lib/midilib/track.rb +96 -102
  87. data/lib/midilib/utils.rb +15 -15
  88. data/test/event_equality.rb +50 -50
  89. data/test/test_event.rb +120 -122
  90. data/test/test_io.rb +35 -48
  91. data/test/test_sequence.rb +60 -60
  92. data/test/test_track.rb +154 -154
  93. data/test/test_varlen.rb +23 -25
  94. metadata +65 -57
@@ -8,33 +8,31 @@ require 'midilib'
8
8
 
9
9
  class VarLenTester < Test::Unit::TestCase
10
10
 
11
- VAR_LEN_TEST_DATA = {
12
- 0x00000000 => 0x00,
13
- 0x00000040 => 0x40,
14
- 0x0000007F => 0x7F,
15
- 0x00000080 => 0x8100,
16
- 0x00002000 => 0xC000,
17
- 0x00003FFF => 0xFF7F,
18
- 0x00004000 => 0x818000,
19
- 0x00100000 => 0xC08000,
20
- 0x001FFFFF => 0xFFFF7F,
21
- 0x00200000 => 0x81808000,
22
- 0x08000000 => 0xC0808000,
23
- 0x0FFFFFFF => 0xFFFFFF7F,
24
- }
11
+ VAR_LEN_TEST_DATA = {
12
+ 0x00000000 => 0x00,
13
+ 0x00000040 => 0x40,
14
+ 0x0000007F => 0x7F,
15
+ 0x00000080 => 0x8100,
16
+ 0x00002000 => 0xC000,
17
+ 0x00003FFF => 0xFF7F,
18
+ 0x00004000 => 0x818000,
19
+ 0x00100000 => 0xC08000,
20
+ 0x001FFFFF => 0xFFFF7F,
21
+ 0x00200000 => 0x81808000,
22
+ 0x08000000 => 0xC0808000,
23
+ 0x0FFFFFFF => 0xFFFFFF7F,
24
+ }
25
25
 
26
- def num_to_var_len(num, answer)
27
- varlen = MIDI::Utils.as_var_len(num)
28
- varlen.reverse.each { | b |
29
- assert_equal(answer & 0xff, b)
30
- answer = answer >> 8
31
- }
26
+ def num_to_var_len(num, answer)
27
+ varlen = MIDI::Utils.as_var_len(num)
28
+ varlen.reverse.each do |b|
29
+ assert_equal(answer & 0xff, b)
30
+ answer = answer >> 8
32
31
  end
32
+ end
33
33
 
34
- def test_num_to_var_len
35
- VAR_LEN_TEST_DATA.each { | varlen, answer |
36
- num_to_var_len(varlen, answer)
37
- }
38
- end
34
+ def test_num_to_var_len
35
+ VAR_LEN_TEST_DATA.each { |varlen, answer| num_to_var_len(varlen, answer) }
36
+ end
39
37
 
40
38
  end
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: 2.0.5
6
5
  platform: ruby
7
6
  authors:
8
7
  - Jim Menard
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-02-19 00:00:00.000000000 Z
11
+ date: 2015-06-16 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,21 @@ 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
38
  - 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
39
+ - html/MIDI.html
74
40
  - html/MIDI/ActiveSense.html
75
41
  - html/MIDI/ChannelEvent.html
76
42
  - html/MIDI/ChannelPressure.html
@@ -78,18 +44,18 @@ files:
78
44
  - html/MIDI/Continue.html
79
45
  - html/MIDI/Controller.html
80
46
  - html/MIDI/Event.html
47
+ - html/MIDI/IO.html
81
48
  - html/MIDI/IO/MIDIFile.html
82
49
  - html/MIDI/IO/SeqReader.html
83
50
  - html/MIDI/IO/SeqWriter.html
84
- - html/MIDI/IO.html
85
51
  - html/MIDI/KeySig.html
52
+ - html/MIDI/MIDI.html
53
+ - html/MIDI/MIDI/MIDI.html
54
+ - html/MIDI/MIDI/MIDI/Array.html
86
55
  - html/MIDI/Marker.html
87
56
  - html/MIDI/Measure.html
88
57
  - html/MIDI/Measures.html
89
58
  - html/MIDI/MetaEvent.html
90
- - html/MIDI/MIDI/MIDI/Array.html
91
- - html/MIDI/MIDI/MIDI.html
92
- - html/MIDI/MIDI.html
93
59
  - html/MIDI/NoteEvent.html
94
60
  - html/MIDI/NoteOff.html
95
61
  - html/MIDI/NoteOn.html
@@ -110,12 +76,55 @@ files:
110
76
  - html/MIDI/Track.html
111
77
  - html/MIDI/TuneRequest.html
112
78
  - html/MIDI/Utils.html
113
- - html/MIDI.html
114
- - html/rdoc.css
115
79
  - html/README_rdoc.html
116
- - html/table_of_contents.html
117
80
  - html/TODO_rdoc.html
81
+ - html/created.rid
82
+ - html/css/fonts.css
83
+ - html/css/rdoc.css
84
+ - html/fonts/Lato-Light.ttf
85
+ - html/fonts/Lato-LightItalic.ttf
86
+ - html/fonts/Lato-Regular.ttf
87
+ - html/fonts/Lato-RegularItalic.ttf
88
+ - html/fonts/SourceCodePro-Bold.ttf
89
+ - html/fonts/SourceCodePro-Regular.ttf
90
+ - html/images/add.png
91
+ - html/images/arrow_up.png
92
+ - html/images/brick.png
93
+ - html/images/brick_link.png
94
+ - html/images/bug.png
95
+ - html/images/bullet_black.png
96
+ - html/images/bullet_toggle_minus.png
97
+ - html/images/bullet_toggle_plus.png
98
+ - html/images/date.png
99
+ - html/images/delete.png
100
+ - html/images/find.png
101
+ - html/images/loadingAnimation.gif
102
+ - html/images/macFFBgHack.png
103
+ - html/images/package.png
104
+ - html/images/page_green.png
105
+ - html/images/page_white_text.png
106
+ - html/images/page_white_width.png
107
+ - html/images/plugin.png
108
+ - html/images/ruby.png
109
+ - html/images/tag_blue.png
110
+ - html/images/tag_green.png
111
+ - html/images/transparent.png
112
+ - html/images/wrench.png
113
+ - html/images/wrench_orange.png
114
+ - html/images/zoom.png
115
+ - html/index.html
116
+ - html/js/darkfish.js
117
+ - html/js/jquery.js
118
+ - html/js/navigation.js
119
+ - html/js/navigation.js.gz
120
+ - html/js/search.js
121
+ - html/js/search_index.js
122
+ - html/js/search_index.js.gz
123
+ - html/js/searcher.js
124
+ - html/js/searcher.js.gz
125
+ - html/table_of_contents.html
118
126
  - install.rb
127
+ - lib/midilib.rb
119
128
  - lib/midilib/consts.rb
120
129
  - lib/midilib/event.rb
121
130
  - lib/midilib/info.rb
@@ -126,7 +135,6 @@ files:
126
135
  - lib/midilib/sequence.rb
127
136
  - lib/midilib/track.rb
128
137
  - lib/midilib/utils.rb
129
- - lib/midilib.rb
130
138
  - test/event_equality.rb
131
139
  - test/test.mid
132
140
  - test/test_event.rb
@@ -136,30 +144,30 @@ files:
136
144
  - test/test_track.rb
137
145
  - test/test_varlen.rb
138
146
  homepage: http://github.com/jimm/midilib
139
- licenses: []
147
+ licenses:
148
+ - Ruby
149
+ metadata: {}
140
150
  post_install_message:
141
151
  rdoc_options:
142
- - --main
152
+ - "--main"
143
153
  - README.rdoc
144
154
  require_paths:
145
155
  - lib
146
156
  required_ruby_version: !ruby/object:Gem::Requirement
147
- none: false
148
157
  requirements:
149
- - - ! '>='
158
+ - - ">="
150
159
  - !ruby/object:Gem::Version
151
160
  version: '0'
152
161
  required_rubygems_version: !ruby/object:Gem::Requirement
153
- none: false
154
162
  requirements:
155
- - - ! '>='
163
+ - - ">="
156
164
  - !ruby/object:Gem::Version
157
165
  version: '0'
158
166
  requirements:
159
167
  - none
160
168
  rubyforge_project: midilib
161
- rubygems_version: 1.8.12
169
+ rubygems_version: 2.4.5
162
170
  signing_key:
163
- specification_version: 3
171
+ specification_version: 4
164
172
  summary: MIDI file and event manipulation library
165
173
  test_files: []