motion-music 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/lib/motion-music/version.rb +1 -1
  3. data/lib/rb-music/version.rb +1 -1
  4. metadata +2 -70
  5. data/.gitignore +0 -6
  6. data/Gemfile +0 -8
  7. data/Guardfile +0 -6
  8. data/doc/Gemfile.html +0 -111
  9. data/doc/Gemfile_lock.html +0 -168
  10. data/doc/Guardfile.html +0 -111
  11. data/doc/LICENSE.html +0 -124
  12. data/doc/Object.html +0 -116
  13. data/doc/RBMusic.html +0 -164
  14. data/doc/RBMusic/Interval.html +0 -440
  15. data/doc/RBMusic/Note.html +0 -620
  16. data/doc/RBMusic/NoteSet.html +0 -277
  17. data/doc/RBMusic/Scale.html +0 -274
  18. data/doc/README_md.html +0 -163
  19. data/doc/created.rid +0 -8
  20. data/doc/fonts.css +0 -167
  21. data/doc/fonts/Lato-Light.ttf +0 -0
  22. data/doc/fonts/Lato-LightItalic.ttf +0 -0
  23. data/doc/fonts/Lato-Regular.ttf +0 -0
  24. data/doc/fonts/Lato-RegularItalic.ttf +0 -0
  25. data/doc/fonts/SourceCodePro-Bold.ttf +0 -0
  26. data/doc/fonts/SourceCodePro-Regular.ttf +0 -0
  27. data/doc/images/add.png +0 -0
  28. data/doc/images/arrow_up.png +0 -0
  29. data/doc/images/brick.png +0 -0
  30. data/doc/images/brick_link.png +0 -0
  31. data/doc/images/bug.png +0 -0
  32. data/doc/images/bullet_black.png +0 -0
  33. data/doc/images/bullet_toggle_minus.png +0 -0
  34. data/doc/images/bullet_toggle_plus.png +0 -0
  35. data/doc/images/date.png +0 -0
  36. data/doc/images/delete.png +0 -0
  37. data/doc/images/find.png +0 -0
  38. data/doc/images/loadingAnimation.gif +0 -0
  39. data/doc/images/macFFBgHack.png +0 -0
  40. data/doc/images/package.png +0 -0
  41. data/doc/images/page_green.png +0 -0
  42. data/doc/images/page_white_text.png +0 -0
  43. data/doc/images/page_white_width.png +0 -0
  44. data/doc/images/plugin.png +0 -0
  45. data/doc/images/ruby.png +0 -0
  46. data/doc/images/tag_blue.png +0 -0
  47. data/doc/images/tag_green.png +0 -0
  48. data/doc/images/transparent.png +0 -0
  49. data/doc/images/wrench.png +0 -0
  50. data/doc/images/wrench_orange.png +0 -0
  51. data/doc/images/zoom.png +0 -0
  52. data/doc/index.html +0 -93
  53. data/doc/js/darkfish.js +0 -140
  54. data/doc/js/jquery.js +0 -18
  55. data/doc/js/navigation.js +0 -142
  56. data/doc/js/search.js +0 -109
  57. data/doc/js/search_index.js +0 -1
  58. data/doc/js/searcher.js +0 -228
  59. data/doc/projections_json.html +0 -115
  60. data/doc/rb-music_gemspec.html +0 -132
  61. data/doc/rdoc.css +0 -580
  62. data/doc/table_of_contents.html +0 -192
  63. data/lib/rb-music.rb +0 -8
  64. data/motion-music.gemspec +0 -20
  65. data/projections.json +0 -12
  66. data/rb-music.gemspec +0 -29
  67. data/spec/rb-music/constants_spec.rb +0 -27
  68. data/spec/rb-music/interval_spec.rb +0 -90
  69. data/spec/rb-music/note_set_spec.rb +0 -191
  70. data/spec/rb-music/note_spec.rb +0 -318
  71. data/spec/rb-music/scale_spec.rb +0 -88
  72. data/spec/spec_helper.rb +0 -14
@@ -1,124 +0,0 @@
1
- <!DOCTYPE html>
2
-
3
- <html>
4
- <head>
5
- <meta charset="UTF-8">
6
-
7
- <title>LICENSE - RDoc Documentation</title>
8
-
9
- <link href="./fonts.css" rel="stylesheet">
10
- <link href="./rdoc.css" rel="stylesheet">
11
-
12
- <script type="text/javascript">
13
- var rdoc_rel_prefix = "./";
14
- </script>
15
-
16
- <script src="./js/jquery.js"></script>
17
- <script src="./js/navigation.js"></script>
18
- <script src="./js/search_index.js"></script>
19
- <script src="./js/search.js"></script>
20
- <script src="./js/searcher.js"></script>
21
- <script src="./js/darkfish.js"></script>
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
-
58
- <div id="project-metadata">
59
- <div id="fileindex-section" class="nav-section">
60
- <h3>Pages</h3>
61
-
62
- <ul class="link-list">
63
-
64
- <li><a href="./Gemfile.html">Gemfile</a>
65
-
66
- <li><a href="./Gemfile_lock.html">Gemfile.lock</a>
67
-
68
- <li><a href="./Guardfile.html">Guardfile</a>
69
-
70
- <li><a href="./LICENSE.html">LICENSE</a>
71
-
72
- <li><a href="./README_md.html">README</a>
73
-
74
- <li><a href="./coverage/assets/0_8_0/application_css.html">application.css</a>
75
-
76
- <li><a href="./coverage/assets/0_8_0/application_js.html">application.js</a>
77
-
78
- <li><a href="./coverage/index_html.html">index.html</a>
79
-
80
- <li><a href="./projections_json.html">projections.json</a>
81
-
82
- <li><a href="./rb-music_gemspec.html">rb-music.gemspec</a>
83
-
84
- </ul>
85
- </div>
86
-
87
- </div>
88
- </nav>
89
-
90
- <main role="main" aria-label="Page LICENSE">
91
-
92
- <p><a href="LICENSE.html">LICENSE</a></p>
93
-
94
- <p>The MIT License</p>
95
-
96
- <p>Copyright © 2014 Mark Wise</p>
97
-
98
- <p>Permission is hereby granted, free of charge, to any person obtaining a
99
- copy of this software and associated documentation files (the “Software”),
100
- to deal in the Software without restriction, including without limitation
101
- the rights to use, copy, modify, merge, publish, distribute, sublicense,
102
- and/or sell copies of the Software, and to permit persons to whom the
103
- Software is furnished to do so, subject to the following conditions:</p>
104
-
105
- <p>The above copyright notice and this permission notice shall be included in
106
- all copies or substantial portions of the Software.</p>
107
-
108
- <p>THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
109
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
110
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
111
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
112
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
113
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
114
- DEALINGS IN THE SOFTWARE.</p>
115
- </main>
116
-
117
-
118
-
119
- <footer id="validator-badges" role="contentinfo">
120
- <p><a href="http://validator.w3.org/check/referer">Validate</a>
121
- <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
122
- <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
123
- </footer>
124
-
@@ -1,116 +0,0 @@
1
- <!DOCTYPE html>
2
-
3
- <html>
4
- <head>
5
- <meta charset="UTF-8">
6
-
7
- <title>class Object - RDoc Documentation</title>
8
-
9
- <link href="./fonts.css" rel="stylesheet">
10
- <link href="./rdoc.css" rel="stylesheet">
11
-
12
- <script type="text/javascript">
13
- var rdoc_rel_prefix = "./";
14
- </script>
15
-
16
- <script src="./js/jquery.js"></script>
17
- <script src="./js/navigation.js"></script>
18
- <script src="./js/search_index.js"></script>
19
- <script src="./js/search.js"></script>
20
- <script src="./js/searcher.js"></script>
21
- <script src="./js/darkfish.js"></script>
22
-
23
-
24
- <body id="top" role="document" class="class">
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
-
58
- <div id="class-metadata">
59
-
60
- <div id="parent-class-section" class="nav-section">
61
- <h3>Parent</h3>
62
-
63
-
64
- <p class="link">BasicObject
65
-
66
- </div>
67
-
68
- <div id="includes-section" class="nav-section">
69
- <h3>Included Modules</h3>
70
-
71
- <ul class="link-list">
72
-
73
-
74
- <li><a class="include" href="RBMusic.html">RBMusic</a>
75
-
76
-
77
- </ul>
78
- </div>
79
-
80
-
81
-
82
- </div>
83
- </nav>
84
-
85
- <main role="main" aria-labelledby="class-Object">
86
- <h1 id="class-Object" class="class">
87
- class Object
88
- </h1>
89
-
90
- <section class="description">
91
-
92
- </section>
93
-
94
-
95
-
96
-
97
- <section id="5Buntitled-5D" class="documentation-section">
98
-
99
-
100
-
101
-
102
-
103
-
104
-
105
-
106
-
107
- </section>
108
- </main>
109
-
110
-
111
- <footer id="validator-badges" role="contentinfo">
112
- <p><a href="http://validator.w3.org/check/referer">Validate</a>
113
- <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
114
- <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
115
- </footer>
116
-
@@ -1,164 +0,0 @@
1
- <!DOCTYPE html>
2
-
3
- <html>
4
- <head>
5
- <meta charset="UTF-8">
6
-
7
- <title>module RBMusic - RDoc Documentation</title>
8
-
9
- <link href="./fonts.css" rel="stylesheet">
10
- <link href="./rdoc.css" rel="stylesheet">
11
-
12
- <script type="text/javascript">
13
- var rdoc_rel_prefix = "./";
14
- </script>
15
-
16
- <script src="./js/jquery.js"></script>
17
- <script src="./js/navigation.js"></script>
18
- <script src="./js/search_index.js"></script>
19
- <script src="./js/search.js"></script>
20
- <script src="./js/searcher.js"></script>
21
- <script src="./js/darkfish.js"></script>
22
-
23
-
24
- <body id="top" role="document" class="module">
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
-
58
- <div id="class-metadata">
59
-
60
-
61
-
62
-
63
-
64
- </div>
65
- </nav>
66
-
67
- <main role="main" aria-labelledby="module-RBMusic">
68
- <h1 id="module-RBMusic" class="module">
69
- module RBMusic
70
- </h1>
71
-
72
- <section class="description">
73
-
74
- </section>
75
-
76
-
77
-
78
-
79
- <section id="5Buntitled-5D" class="documentation-section">
80
-
81
-
82
-
83
-
84
-
85
- <section class="constants-list">
86
- <header>
87
- <h3>Constants</h3>
88
- </header>
89
- <dl>
90
-
91
- <dt id="ACCIDENTALS">ACCIDENTALS
92
-
93
- <dd>
94
-
95
-
96
- <dt id="ArgumentError">ArgumentError
97
-
98
- <dd>
99
-
100
-
101
- <dt id="BASE_FREQ">BASE_FREQ
102
-
103
- <dd>
104
-
105
-
106
- <dt id="BASE_OFFSET">BASE_OFFSET
107
-
108
- <dd>
109
-
110
-
111
- <dt id="Error">Error
112
-
113
- <dd>
114
-
115
-
116
- <dt id="INTERVALS">INTERVALS
117
-
118
- <dd><p>intervals - two dimensional [octave, fifth] - relative to the
119
- &#39;main&#39; note</p>
120
-
121
-
122
- <dt id="INTERVALS_SEMITONES">INTERVALS_SEMITONES
123
-
124
- <dd>
125
-
126
-
127
- <dt id="NOTES">NOTES
128
-
129
- <dd><p>notes - two dimensional [octave, fifth] - relative to the &#39;main&#39;
130
- note</p>
131
-
132
-
133
- <dt id="NOTE_NAMES">NOTE_NAMES
134
-
135
- <dd>
136
-
137
-
138
- <dt id="SCALES">SCALES
139
-
140
- <dd>
141
-
142
-
143
- <dt id="VERSION">VERSION
144
-
145
- <dd>
146
-
147
-
148
- </dl>
149
- </section>
150
-
151
-
152
-
153
-
154
-
155
- </section>
156
- </main>
157
-
158
-
159
- <footer id="validator-badges" role="contentinfo">
160
- <p><a href="http://validator.w3.org/check/referer">Validate</a>
161
- <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
162
- <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
163
- </footer>
164
-
@@ -1,440 +0,0 @@
1
- <!DOCTYPE html>
2
-
3
- <html>
4
- <head>
5
- <meta charset="UTF-8">
6
-
7
- <title>class RBMusic::Interval - RDoc Documentation</title>
8
-
9
- <link href="../fonts.css" rel="stylesheet">
10
- <link href="../rdoc.css" rel="stylesheet">
11
-
12
- <script type="text/javascript">
13
- var rdoc_rel_prefix = "../";
14
- </script>
15
-
16
- <script src="../js/jquery.js"></script>
17
- <script src="../js/navigation.js"></script>
18
- <script src="../js/search_index.js"></script>
19
- <script src="../js/search.js"></script>
20
- <script src="../js/searcher.js"></script>
21
- <script src="../js/darkfish.js"></script>
22
-
23
-
24
- <body id="top" role="document" class="class">
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
-
58
- <div id="class-metadata">
59
-
60
- <div id="parent-class-section" class="nav-section">
61
- <h3>Parent</h3>
62
-
63
-
64
- <p class="link"><a href="../Object.html">Object</a>
65
-
66
- </div>
67
-
68
-
69
-
70
- <!-- Method Quickref -->
71
- <div id="method-list-section" class="nav-section">
72
- <h3>Methods</h3>
73
-
74
- <ul class="link-list" role="directory">
75
-
76
- <li ><a href="#method-c-from_name">::from_name</a>
77
-
78
- <li ><a href="#method-c-from_semitones">::from_semitones</a>
79
-
80
- <li ><a href="#method-c-from_tones_semitones">::from_tones_semitones</a>
81
-
82
- <li ><a href="#method-c-new">::new</a>
83
-
84
- <li ><a href="#method-i-add">#add</a>
85
-
86
- <li ><a href="#method-i-semitone">#semitone</a>
87
-
88
- <li ><a href="#method-i-subtract">#subtract</a>
89
-
90
- <li ><a href="#method-i-tone_semitone">#tone_semitone</a>
91
-
92
- </ul>
93
- </div>
94
-
95
- </div>
96
- </nav>
97
-
98
- <main role="main" aria-labelledby="class-RBMusic::Interval">
99
- <h1 id="class-RBMusic::Interval" class="class">
100
- class RBMusic::Interval
101
- </h1>
102
-
103
- <section class="description">
104
-
105
- </section>
106
-
107
-
108
-
109
-
110
- <section id="5Buntitled-5D" class="documentation-section">
111
-
112
-
113
-
114
-
115
-
116
-
117
-
118
- <section class="attribute-method-details" class="method-section">
119
- <header>
120
- <h3>Attributes</h3>
121
- </header>
122
-
123
-
124
- <div id="attribute-i-coord" class="method-detail">
125
- <div class="method-heading attribute-method-heading">
126
- <span class="method-name">coord</span><span
127
- class="attribute-access-type">[RW]</span>
128
- </div>
129
-
130
- <div class="method-description">
131
-
132
-
133
-
134
- </div>
135
- </div>
136
-
137
- </section>
138
-
139
-
140
-
141
- <section id="public-class-5Buntitled-5D-method-details" class="method-section">
142
- <header>
143
- <h3>Public Class Methods</h3>
144
- </header>
145
-
146
-
147
- <div id="method-c-from_name" class="method-detail ">
148
-
149
- <div class="method-heading">
150
- <span class="method-name">from_name</span><span
151
- class="method-args">(name)</span>
152
-
153
- <span class="method-click-advice">click to toggle source</span>
154
-
155
- </div>
156
-
157
-
158
- <div class="method-description">
159
-
160
-
161
-
162
-
163
-
164
-
165
- <div class="method-source-code" id="from_name-source">
166
- <pre><span class="ruby-comment"># File lib/rb-music/interval.rb, line 10</span>
167
- <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">from_name</span>(<span class="ruby-identifier">name</span>)
168
- <span class="ruby-constant">Interval</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">INTERVALS</span>[<span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_sym</span>])
169
- <span class="ruby-keyword">end</span></pre>
170
- </div>
171
-
172
- </div>
173
-
174
-
175
-
176
-
177
- </div>
178
-
179
-
180
- <div id="method-c-from_semitones" class="method-detail ">
181
-
182
- <div class="method-heading">
183
- <span class="method-name">from_semitones</span><span
184
- class="method-args">(num)</span>
185
-
186
- <span class="method-click-advice">click to toggle source</span>
187
-
188
- </div>
189
-
190
-
191
- <div class="method-description">
192
-
193
-
194
-
195
-
196
-
197
-
198
- <div class="method-source-code" id="from_semitones-source">
199
- <pre><span class="ruby-comment"># File lib/rb-music/interval.rb, line 14</span>
200
- <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">from_semitones</span>(<span class="ruby-identifier">num</span>)
201
- <span class="ruby-constant">Interval</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">INTERVALS_SEMITONES</span>[<span class="ruby-identifier">num</span>])
202
- <span class="ruby-keyword">end</span></pre>
203
- </div>
204
-
205
- </div>
206
-
207
-
208
-
209
-
210
- </div>
211
-
212
-
213
- <div id="method-c-from_tones_semitones" class="method-detail ">
214
-
215
- <div class="method-heading">
216
- <span class="method-name">from_tones_semitones</span><span
217
- class="method-args">(tone_semitone)</span>
218
-
219
- <span class="method-click-advice">click to toggle source</span>
220
-
221
- </div>
222
-
223
-
224
- <div class="method-description">
225
-
226
-
227
-
228
-
229
-
230
-
231
- <div class="method-source-code" id="from_tones_semitones-source">
232
- <pre><span class="ruby-comment"># File lib/rb-music/interval.rb, line 18</span>
233
- <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">from_tones_semitones</span>(<span class="ruby-identifier">tone_semitone</span>)
234
- <span class="ruby-comment"># multiply [tones, semitones] vector with [-1 2;3 -5] to get coordinate from tones and semitones</span>
235
- <span class="ruby-constant">Interval</span>.<span class="ruby-identifier">new</span>([<span class="ruby-identifier">tone_semitone</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">*</span> <span class="ruby-value">-1</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">tone_semitone</span>[<span class="ruby-value">1</span>] <span class="ruby-operator">*</span> <span class="ruby-value">3</span>, <span class="ruby-identifier">tone_semitone</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-identifier">tone_semitone</span>[<span class="ruby-value">1</span>] <span class="ruby-operator">*</span> <span class="ruby-value">-5</span>])
236
- <span class="ruby-keyword">end</span></pre>
237
- </div>
238
-
239
- </div>
240
-
241
-
242
-
243
-
244
- </div>
245
-
246
-
247
- <div id="method-c-new" class="method-detail ">
248
-
249
- <div class="method-heading">
250
- <span class="method-name">new</span><span
251
- class="method-args">(coord)</span>
252
-
253
- <span class="method-click-advice">click to toggle source</span>
254
-
255
- </div>
256
-
257
-
258
- <div class="method-description">
259
-
260
-
261
-
262
-
263
-
264
-
265
- <div class="method-source-code" id="new-source">
266
- <pre><span class="ruby-comment"># File lib/rb-music/interval.rb, line 6</span>
267
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">coord</span>)
268
- <span class="ruby-keyword">self</span>.<span class="ruby-identifier">coord</span> = <span class="ruby-identifier">coord</span>
269
- <span class="ruby-keyword">end</span></pre>
270
- </div>
271
-
272
- </div>
273
-
274
-
275
-
276
-
277
- </div>
278
-
279
-
280
- </section>
281
-
282
- <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
283
- <header>
284
- <h3>Public Instance Methods</h3>
285
- </header>
286
-
287
-
288
- <div id="method-i-add" class="method-detail ">
289
-
290
- <div class="method-heading">
291
- <span class="method-name">add</span><span
292
- class="method-args">(interval)</span>
293
-
294
- <span class="method-click-advice">click to toggle source</span>
295
-
296
- </div>
297
-
298
-
299
- <div class="method-description">
300
-
301
-
302
-
303
-
304
-
305
-
306
- <div class="method-source-code" id="add-source">
307
- <pre><span class="ruby-comment"># File lib/rb-music/interval.rb, line 34</span>
308
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">add</span>(<span class="ruby-identifier">interval</span>)
309
- <span class="ruby-keyword">if</span> <span class="ruby-identifier">interval</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">String</span>)
310
- <span class="ruby-identifier">interval</span> = <span class="ruby-constant">Interval</span>.<span class="ruby-identifier">from_name</span>(<span class="ruby-identifier">interval</span>)
311
- <span class="ruby-keyword">end</span>
312
- <span class="ruby-constant">Interval</span>.<span class="ruby-identifier">new</span>([<span class="ruby-identifier">coord</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">+</span> <span class="ruby-identifier">interval</span>.<span class="ruby-identifier">coord</span>[<span class="ruby-value">0</span>], <span class="ruby-identifier">coord</span>[<span class="ruby-value">1</span>] <span class="ruby-operator">+</span> <span class="ruby-identifier">interval</span>.<span class="ruby-identifier">coord</span>[<span class="ruby-value">1</span>]])
313
- <span class="ruby-keyword">end</span></pre>
314
- </div>
315
-
316
- </div>
317
-
318
-
319
-
320
-
321
- </div>
322
-
323
-
324
- <div id="method-i-semitone" class="method-detail ">
325
-
326
- <div class="method-heading">
327
- <span class="method-name">semitone</span><span
328
- class="method-args">()</span>
329
-
330
- <span class="method-click-advice">click to toggle source</span>
331
-
332
- </div>
333
-
334
-
335
- <div class="method-description">
336
-
337
-
338
-
339
-
340
-
341
-
342
- <div class="method-source-code" id="semitone-source">
343
- <pre><span class="ruby-comment"># File lib/rb-music/interval.rb, line 29</span>
344
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">semitone</span>
345
- <span class="ruby-comment"># number of semitones of interval = tones * 2 + semitones</span>
346
- <span class="ruby-identifier">tone_semitone</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-identifier">tone_semitone</span>[<span class="ruby-value">1</span>]
347
- <span class="ruby-keyword">end</span></pre>
348
- </div>
349
-
350
- </div>
351
-
352
-
353
-
354
-
355
- </div>
356
-
357
-
358
- <div id="method-i-subtract" class="method-detail ">
359
-
360
- <div class="method-heading">
361
- <span class="method-name">subtract</span><span
362
- class="method-args">(interval)</span>
363
-
364
- <span class="method-click-advice">click to toggle source</span>
365
-
366
- </div>
367
-
368
-
369
- <div class="method-description">
370
-
371
-
372
-
373
-
374
-
375
-
376
- <div class="method-source-code" id="subtract-source">
377
- <pre><span class="ruby-comment"># File lib/rb-music/interval.rb, line 41</span>
378
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">subtract</span>(<span class="ruby-identifier">interval</span>)
379
- <span class="ruby-keyword">if</span> <span class="ruby-identifier">interval</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">String</span>)
380
- <span class="ruby-identifier">interval</span> = <span class="ruby-constant">Interval</span>.<span class="ruby-identifier">from_name</span>(<span class="ruby-identifier">interval</span>)
381
- <span class="ruby-keyword">end</span>
382
- <span class="ruby-constant">Interval</span>.<span class="ruby-identifier">new</span>([<span class="ruby-identifier">coord</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">-</span> <span class="ruby-identifier">interval</span>.<span class="ruby-identifier">coord</span>[<span class="ruby-value">0</span>], <span class="ruby-identifier">coord</span>[<span class="ruby-value">1</span>] <span class="ruby-operator">-</span> <span class="ruby-identifier">interval</span>.<span class="ruby-identifier">coord</span>[<span class="ruby-value">1</span>]])
383
- <span class="ruby-keyword">end</span></pre>
384
- </div>
385
-
386
- </div>
387
-
388
-
389
-
390
-
391
- </div>
392
-
393
-
394
- <div id="method-i-tone_semitone" class="method-detail ">
395
-
396
- <div class="method-heading">
397
- <span class="method-name">tone_semitone</span><span
398
- class="method-args">()</span>
399
-
400
- <span class="method-click-advice">click to toggle source</span>
401
-
402
- </div>
403
-
404
-
405
- <div class="method-description">
406
-
407
-
408
-
409
-
410
-
411
-
412
- <div class="method-source-code" id="tone_semitone-source">
413
- <pre><span class="ruby-comment"># File lib/rb-music/interval.rb, line 23</span>
414
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">tone_semitone</span>
415
- <span class="ruby-comment"># multiply coord vector with [5 2;3 1] to get coordinate in tones and semitones</span>
416
- <span class="ruby-comment"># [5 2;3 1] is the inverse of [-1 2;3 -5], which is the coordinates of [tone; semitone]</span>
417
- <span class="ruby-ivar">@tone_semitone</span> <span class="ruby-operator">||=</span> [<span class="ruby-identifier">coord</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">*</span> <span class="ruby-value">5</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">coord</span>[<span class="ruby-value">1</span>] <span class="ruby-operator">*</span> <span class="ruby-value">3</span>, <span class="ruby-identifier">coord</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-identifier">coord</span>[<span class="ruby-value">1</span>] <span class="ruby-operator">*</span> <span class="ruby-value">1</span>]
418
- <span class="ruby-keyword">end</span></pre>
419
- </div>
420
-
421
- </div>
422
-
423
-
424
-
425
-
426
- </div>
427
-
428
-
429
- </section>
430
-
431
- </section>
432
- </main>
433
-
434
-
435
- <footer id="validator-badges" role="contentinfo">
436
- <p><a href="http://validator.w3.org/check/referer">Validate</a>
437
- <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
438
- <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
439
- </footer>
440
-