midilib 3.1.0 → 4.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (112) hide show
  1. checksums.yaml +4 -4
  2. data/ChangeLog +12 -12
  3. data/Credits +7 -0
  4. data/README.rdoc +12 -148
  5. data/Rakefile +5 -15
  6. data/TODO.rdoc +8 -7
  7. data/examples/from_scratch.rb +2 -7
  8. data/examples/measures_mbt.rb +1 -6
  9. data/examples/print_program_changes.rb +1 -3
  10. data/examples/reader2text.rb +2 -7
  11. data/examples/seq2text.rb +1 -6
  12. data/examples/split.rb +1 -6
  13. data/examples/strings.rb +2 -7
  14. data/examples/transpose.rb +3 -8
  15. data/lib/midilib/consts.rb +2 -0
  16. data/lib/midilib/event.rb +2 -2
  17. data/lib/midilib/info.rb +4 -4
  18. data/lib/midilib/io/seqreader.rb +11 -27
  19. data/lib/midilib/io/seqwriter.rb +6 -4
  20. data/lib/midilib/track.rb +38 -6
  21. data/test/test_event.rb +13 -6
  22. data/test/test_io.rb +144 -13
  23. data/test/test_mergesort.rb +1 -6
  24. data/test/test_midifile.rb +1 -6
  25. data/test/test_sequence.rb +1 -6
  26. data/test/test_track.rb +66 -7
  27. data/test/test_varlen.rb +1 -6
  28. metadata +3 -87
  29. data/html/MIDI/ActiveSense.html +0 -171
  30. data/html/MIDI/ChannelEvent.html +0 -190
  31. data/html/MIDI/ChannelPressure.html +0 -212
  32. data/html/MIDI/Clock.html +0 -171
  33. data/html/MIDI/Continue.html +0 -171
  34. data/html/MIDI/Controller.html +0 -224
  35. data/html/MIDI/Event.html +0 -349
  36. data/html/MIDI/IO/MIDIFile.html +0 -1392
  37. data/html/MIDI/IO/SeqReader.html +0 -642
  38. data/html/MIDI/IO/SeqWriter.html +0 -442
  39. data/html/MIDI/IO.html +0 -91
  40. data/html/MIDI/KeySig.html +0 -292
  41. data/html/MIDI/Marker.html +0 -138
  42. data/html/MIDI/Measure.html +0 -260
  43. data/html/MIDI/Measures.html +0 -222
  44. data/html/MIDI/MetaEvent.html +0 -353
  45. data/html/MIDI/NoteEvent.html +0 -255
  46. data/html/MIDI/NoteOff.html +0 -188
  47. data/html/MIDI/NoteOn.html +0 -188
  48. data/html/MIDI/PitchBend.html +0 -213
  49. data/html/MIDI/PolyPressure.html +0 -216
  50. data/html/MIDI/ProgramChange.html +0 -212
  51. data/html/MIDI/Realtime.html +0 -194
  52. data/html/MIDI/Sequence.html +0 -641
  53. data/html/MIDI/SongPointer.html +0 -213
  54. data/html/MIDI/SongSelect.html +0 -212
  55. data/html/MIDI/Start.html +0 -171
  56. data/html/MIDI/Stop.html +0 -171
  57. data/html/MIDI/SystemCommon.html +0 -138
  58. data/html/MIDI/SystemExclusive.html +0 -215
  59. data/html/MIDI/SystemReset.html +0 -171
  60. data/html/MIDI/Tempo.html +0 -292
  61. data/html/MIDI/TimeSig.html +0 -286
  62. data/html/MIDI/Track.html +0 -489
  63. data/html/MIDI/TuneRequest.html +0 -194
  64. data/html/MIDI/Utils.html +0 -178
  65. data/html/MIDI.html +0 -281
  66. data/html/Object.html +0 -197
  67. data/html/README_rdoc.html +0 -545
  68. data/html/TODO_rdoc.html +0 -123
  69. data/html/created.rid +0 -15
  70. data/html/css/fonts.css +0 -167
  71. data/html/css/rdoc.css +0 -639
  72. data/html/fonts/Lato-Light.ttf +0 -0
  73. data/html/fonts/Lato-LightItalic.ttf +0 -0
  74. data/html/fonts/Lato-Regular.ttf +0 -0
  75. data/html/fonts/Lato-RegularItalic.ttf +0 -0
  76. data/html/fonts/SourceCodePro-Bold.ttf +0 -0
  77. data/html/fonts/SourceCodePro-Regular.ttf +0 -0
  78. data/html/images/add.png +0 -0
  79. data/html/images/arrow_up.png +0 -0
  80. data/html/images/brick.png +0 -0
  81. data/html/images/brick_link.png +0 -0
  82. data/html/images/bug.png +0 -0
  83. data/html/images/bullet_black.png +0 -0
  84. data/html/images/bullet_toggle_minus.png +0 -0
  85. data/html/images/bullet_toggle_plus.png +0 -0
  86. data/html/images/date.png +0 -0
  87. data/html/images/delete.png +0 -0
  88. data/html/images/find.png +0 -0
  89. data/html/images/loadingAnimation.gif +0 -0
  90. data/html/images/macFFBgHack.png +0 -0
  91. data/html/images/package.png +0 -0
  92. data/html/images/page_green.png +0 -0
  93. data/html/images/page_white_text.png +0 -0
  94. data/html/images/page_white_width.png +0 -0
  95. data/html/images/plugin.png +0 -0
  96. data/html/images/ruby.png +0 -0
  97. data/html/images/tag_blue.png +0 -0
  98. data/html/images/tag_green.png +0 -0
  99. data/html/images/transparent.png +0 -0
  100. data/html/images/wrench.png +0 -0
  101. data/html/images/wrench_orange.png +0 -0
  102. data/html/images/zoom.png +0 -0
  103. data/html/index.html +0 -534
  104. data/html/js/darkfish.js +0 -84
  105. data/html/js/navigation.js +0 -105
  106. data/html/js/navigation.js.gz +0 -0
  107. data/html/js/search.js +0 -110
  108. data/html/js/search_index.js +0 -1
  109. data/html/js/search_index.js.gz +0 -0
  110. data/html/js/searcher.js +0 -229
  111. data/html/js/searcher.js.gz +0 -0
  112. data/html/table_of_contents.html +0 -1258
data/html/TODO_rdoc.html DELETED
@@ -1,123 +0,0 @@
1
- <!DOCTYPE html>
2
-
3
- <html>
4
- <head>
5
- <meta charset="UTF-8">
6
-
7
- <title>TODO - midilib</title>
8
-
9
- <script type="text/javascript">
10
- var rdoc_rel_prefix = "./";
11
- var index_rel_prefix = "./";
12
- </script>
13
-
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">
22
-
23
-
24
- <body id="top" role="document" class="file">
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>
34
- <a href="./table_of_contents.html#classes">Classes</a>
35
- <a href="./table_of_contents.html#methods">Methods</a>
36
- </div>
37
- </div>
38
-
39
- <div id="search-section" role="search" class="project-section initially-hidden">
40
- <form action="#" method="get" accept-charset="utf-8">
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"
45
- title="Type to search, Up and Down to navigate, Enter to load">
46
- </div>
47
-
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
-
54
- </div>
55
-
56
-
57
- <div class="nav-section">
58
- <h3>Table of Contents</h3>
59
-
60
- <ul class="link-list" role="directory">
61
- <li><a href="#label-Bugs">Bugs</a>
62
- <li><a href="#label-Features">Features</a>
63
- <li><a href="#label-Documentation">Documentation</a>
64
- <li><a href="#label-Tests">Tests</a>
65
- </ul>
66
- </div>
67
-
68
-
69
- <div id="project-metadata">
70
-
71
- <div id="fileindex-section" class="nav-section">
72
- <h3>Pages</h3>
73
-
74
- <ul class="link-list">
75
- <li><a href="./README_rdoc.html">README</a>
76
- <li><a href="./TODO_rdoc.html">TODO</a>
77
- </ul>
78
- </div>
79
-
80
- </div>
81
- </nav>
82
-
83
- <main role="main" aria-label="Page TODO.rdoc">
84
-
85
- <h2 id="label-Bugs">Bugs<span><a href="#label-Bugs">&para;</a> <a href="#top">&uarr;</a></span></h2>
86
-
87
- <p>midilib does not handle tempo changes when calculating <code>beats_per_minute</code>. The tempo events are correctly handled when reading/writing/moving them around, it’s just the functions that answer questions about the current tempo that are wrong. See <a href="https://github.com/jimm/midilib/issues/8">github.com/jimm/midilib/issues/8</a>. The method <code>beats_per_minute</code> and related methods like <code>pulses_to_seconds</code> will have to take into account the possibility of more than one tempo event. They will probably have to take new arguments specifying where in the sequence the beats or pulses are being requested. For example we could have +beats_per_minute(at_seconds: 0.0, at_beat: 0.0)+ (where the two keyword args are mutually exclusive). Perhaps there should be separately named public methods like <code>beats_per_minute_at_seconds</code> and <code>beats_per_minute_at_beat</code> as well.</p>
88
-
89
- <h2 id="label-Features">Features<span><a href="#label-Features">&para;</a> <a href="#top">&uarr;</a></span></h2>
90
- <ul><li>
91
- <p><code>print_decimal_numbers</code> and <code>print_channel_numbers_from_one</code> should be associated with sequence, or perhaps track, not event.</p>
92
- </li><li>
93
- <p>Method to translate event’s time_from_start to number of milliseconds from start.</p>
94
- </li><li>
95
- <p>Swing quantizing. (Implied by list email from Carl Youngblood &lt;carl.youngblood@gmail.com&gt;)</p>
96
- </li><li>
97
- <p>Implement key signature in SeqReader.</p>
98
- </li><li>
99
- <p>Ignore unknown chunks in <a href="MIDI.html"><code>MIDI</code></a> files. See the <a href="MIDI.html"><code>MIDI</code></a> file spec.</p>
100
- </li><li>
101
- <p>Format 2 files(?).</p>
102
- </li></ul>
103
-
104
- <h2 id="label-Documentation">Documentation<span><a href="#label-Documentation">&para;</a> <a href="#top">&uarr;</a></span></h2>
105
- <ul><li>
106
- <p>Write better docs.</p>
107
- </li></ul>
108
-
109
- <h2 id="label-Tests">Tests<span><a href="#label-Tests">&para;</a> <a href="#top">&uarr;</a></span></h2>
110
- <ul><li>
111
- <p>Tests for Noah Thorp’s midilib bug fixes.</p>
112
- </li></ul>
113
-
114
- </main>
115
-
116
-
117
-
118
- <footer id="validator-badges" role="contentinfo">
119
- <p><a href="https://validator.w3.org/check/referer">Validate</a>
120
- <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.4.0.
121
- <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
122
- </footer>
123
-
data/html/created.rid DELETED
@@ -1,15 +0,0 @@
1
- Sun, 04 Sep 2022 17:10:12 -0400
2
- README.rdoc Sun, 30 May 2021 10:18:10 -0400
3
- TODO.rdoc Thu, 08 Apr 2021 17:34:00 -0400
4
- lib/midilib.rb Sun, 30 May 2021 10:14:52 -0400
5
- lib/midilib/consts.rb Sat, 30 Apr 2022 10:15:17 -0400
6
- lib/midilib/event.rb Sun, 30 May 2021 10:18:10 -0400
7
- lib/midilib/info.rb Sun, 04 Sep 2022 17:09:33 -0400
8
- lib/midilib/io/midifile.rb Sun, 30 May 2021 10:18:10 -0400
9
- lib/midilib/io/seqreader.rb Sun, 04 Sep 2022 17:07:46 -0400
10
- lib/midilib/io/seqwriter.rb Sun, 30 May 2021 10:18:10 -0400
11
- lib/midilib/measure.rb Sun, 30 May 2021 10:18:10 -0400
12
- lib/midilib/mergesort.rb Sun, 30 May 2021 10:18:10 -0400
13
- lib/midilib/sequence.rb Wed, 11 Aug 2021 12:16:42 -0400
14
- lib/midilib/track.rb Sun, 30 May 2021 10:18:10 -0400
15
- lib/midilib/utils.rb Sun, 30 May 2021 10:18:10 -0400
data/html/css/fonts.css DELETED
@@ -1,167 +0,0 @@
1
- /*
2
- * Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/),
3
- * with Reserved Font Name "Source". All Rights Reserved. Source is a
4
- * trademark of Adobe Systems Incorporated in the United States and/or other
5
- * countries.
6
- *
7
- * This Font Software is licensed under the SIL Open Font License, Version
8
- * 1.1.
9
- *
10
- * This license is copied below, and is also available with a FAQ at:
11
- * http://scripts.sil.org/OFL
12
- */
13
-
14
- @font-face {
15
- font-family: "Source Code Pro";
16
- font-style: normal;
17
- font-weight: 400;
18
- src: local("Source Code Pro"),
19
- local("SourceCodePro-Regular"),
20
- url("../fonts/SourceCodePro-Regular.ttf") format("truetype");
21
- }
22
-
23
- @font-face {
24
- font-family: "Source Code Pro";
25
- font-style: normal;
26
- font-weight: 700;
27
- src: local("Source Code Pro Bold"),
28
- local("SourceCodePro-Bold"),
29
- url("../fonts/SourceCodePro-Bold.ttf") format("truetype");
30
- }
31
-
32
- /*
33
- * Copyright (c) 2010, Łukasz Dziedzic (dziedzic@typoland.com),
34
- * with Reserved Font Name Lato.
35
- *
36
- * This Font Software is licensed under the SIL Open Font License, Version
37
- * 1.1.
38
- *
39
- * This license is copied below, and is also available with a FAQ at:
40
- * http://scripts.sil.org/OFL
41
- */
42
-
43
- @font-face {
44
- font-family: "Lato";
45
- font-style: normal;
46
- font-weight: 300;
47
- src: local("Lato Light"),
48
- local("Lato-Light"),
49
- url("../fonts/Lato-Light.ttf") format("truetype");
50
- }
51
-
52
- @font-face {
53
- font-family: "Lato";
54
- font-style: italic;
55
- font-weight: 300;
56
- src: local("Lato Light Italic"),
57
- local("Lato-LightItalic"),
58
- url("../fonts/Lato-LightItalic.ttf") format("truetype");
59
- }
60
-
61
- @font-face {
62
- font-family: "Lato";
63
- font-style: normal;
64
- font-weight: 700;
65
- src: local("Lato Regular"),
66
- local("Lato-Regular"),
67
- url("../fonts/Lato-Regular.ttf") format("truetype");
68
- }
69
-
70
- @font-face {
71
- font-family: "Lato";
72
- font-style: italic;
73
- font-weight: 700;
74
- src: local("Lato Italic"),
75
- local("Lato-Italic"),
76
- url("../fonts/Lato-RegularItalic.ttf") format("truetype");
77
- }
78
-
79
- /*
80
- * -----------------------------------------------------------
81
- * SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
82
- * -----------------------------------------------------------
83
- *
84
- * PREAMBLE
85
- * The goals of the Open Font License (OFL) are to stimulate worldwide
86
- * development of collaborative font projects, to support the font creation
87
- * efforts of academic and linguistic communities, and to provide a free and
88
- * open framework in which fonts may be shared and improved in partnership
89
- * with others.
90
- *
91
- * The OFL allows the licensed fonts to be used, studied, modified and
92
- * redistributed freely as long as they are not sold by themselves. The
93
- * fonts, including any derivative works, can be bundled, embedded,
94
- * redistributed and/or sold with any software provided that any reserved
95
- * names are not used by derivative works. The fonts and derivatives,
96
- * however, cannot be released under any other type of license. The
97
- * requirement for fonts to remain under this license does not apply
98
- * to any document created using the fonts or their derivatives.
99
- *
100
- * DEFINITIONS
101
- * "Font Software" refers to the set of files released by the Copyright
102
- * Holder(s) under this license and clearly marked as such. This may
103
- * include source files, build scripts and documentation.
104
- *
105
- * "Reserved Font Name" refers to any names specified as such after the
106
- * copyright statement(s).
107
- *
108
- * "Original Version" refers to the collection of Font Software components as
109
- * distributed by the Copyright Holder(s).
110
- *
111
- * "Modified Version" refers to any derivative made by adding to, deleting,
112
- * or substituting -- in part or in whole -- any of the components of the
113
- * Original Version, by changing formats or by porting the Font Software to a
114
- * new environment.
115
- *
116
- * "Author" refers to any designer, engineer, programmer, technical
117
- * writer or other person who contributed to the Font Software.
118
- *
119
- * PERMISSION & CONDITIONS
120
- * Permission is hereby granted, free of charge, to any person obtaining
121
- * a copy of the Font Software, to use, study, copy, merge, embed, modify,
122
- * redistribute, and sell modified and unmodified copies of the Font
123
- * Software, subject to the following conditions:
124
- *
125
- * 1) Neither the Font Software nor any of its individual components,
126
- * in Original or Modified Versions, may be sold by itself.
127
- *
128
- * 2) Original or Modified Versions of the Font Software may be bundled,
129
- * redistributed and/or sold with any software, provided that each copy
130
- * contains the above copyright notice and this license. These can be
131
- * included either as stand-alone text files, human-readable headers or
132
- * in the appropriate machine-readable metadata fields within text or
133
- * binary files as long as those fields can be easily viewed by the user.
134
- *
135
- * 3) No Modified Version of the Font Software may use the Reserved Font
136
- * Name(s) unless explicit written permission is granted by the corresponding
137
- * Copyright Holder. This restriction only applies to the primary font name as
138
- * presented to the users.
139
- *
140
- * 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
141
- * Software shall not be used to promote, endorse or advertise any
142
- * Modified Version, except to acknowledge the contribution(s) of the
143
- * Copyright Holder(s) and the Author(s) or with their explicit written
144
- * permission.
145
- *
146
- * 5) The Font Software, modified or unmodified, in part or in whole,
147
- * must be distributed entirely under this license, and must not be
148
- * distributed under any other license. The requirement for fonts to
149
- * remain under this license does not apply to any document created
150
- * using the Font Software.
151
- *
152
- * TERMINATION
153
- * This license becomes null and void if any of the above conditions are
154
- * not met.
155
- *
156
- * DISCLAIMER
157
- * THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
158
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
159
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
160
- * OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
161
- * COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
162
- * INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
163
- * DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
164
- * FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
165
- * OTHER DEALINGS IN THE FONT SOFTWARE.
166
- */
167
-