music-transcription 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. data/.document +3 -0
  2. data/.gitignore +7 -0
  3. data/.rspec +1 -0
  4. data/.yardopts +1 -0
  5. data/ChangeLog.rdoc +4 -0
  6. data/Gemfile +3 -0
  7. data/LICENSE.txt +20 -0
  8. data/README.rdoc +28 -0
  9. data/Rakefile +54 -0
  10. data/bin/transcribe +176 -0
  11. data/lib/music-transcription.rb +20 -0
  12. data/lib/music-transcription/arrangement.rb +31 -0
  13. data/lib/music-transcription/instrument_config.rb +38 -0
  14. data/lib/music-transcription/interval.rb +66 -0
  15. data/lib/music-transcription/link.rb +115 -0
  16. data/lib/music-transcription/note.rb +156 -0
  17. data/lib/music-transcription/part.rb +128 -0
  18. data/lib/music-transcription/pitch.rb +297 -0
  19. data/lib/music-transcription/pitch_constants.rb +204 -0
  20. data/lib/music-transcription/profile.rb +105 -0
  21. data/lib/music-transcription/program.rb +136 -0
  22. data/lib/music-transcription/score.rb +122 -0
  23. data/lib/music-transcription/tempo.rb +44 -0
  24. data/lib/music-transcription/transition.rb +71 -0
  25. data/lib/music-transcription/value_change.rb +85 -0
  26. data/lib/music-transcription/version.rb +7 -0
  27. data/music-transcription.gemspec +36 -0
  28. data/samples/arrangements/glissando_test.yml +71 -0
  29. data/samples/arrangements/hip.yml +952 -0
  30. data/samples/arrangements/instrument_test.yml +119 -0
  31. data/samples/arrangements/legato_test.yml +237 -0
  32. data/samples/arrangements/make_glissando_test.rb +27 -0
  33. data/samples/arrangements/make_hip.rb +75 -0
  34. data/samples/arrangements/make_instrument_test.rb +34 -0
  35. data/samples/arrangements/make_legato_test.rb +37 -0
  36. data/samples/arrangements/make_missed_connection.rb +72 -0
  37. data/samples/arrangements/make_portamento_test.rb +27 -0
  38. data/samples/arrangements/make_slur_test.rb +37 -0
  39. data/samples/arrangements/make_song1.rb +84 -0
  40. data/samples/arrangements/make_song2.rb +69 -0
  41. data/samples/arrangements/missed_connection.yml +481 -0
  42. data/samples/arrangements/portamento_test.yml +71 -0
  43. data/samples/arrangements/slur_test.yml +237 -0
  44. data/samples/arrangements/song1.yml +640 -0
  45. data/samples/arrangements/song2.yml +429 -0
  46. data/spec/instrument_config_spec.rb +47 -0
  47. data/spec/interval_spec.rb +38 -0
  48. data/spec/link_spec.rb +22 -0
  49. data/spec/musicality_spec.rb +7 -0
  50. data/spec/note_spec.rb +65 -0
  51. data/spec/part_spec.rb +87 -0
  52. data/spec/pitch_spec.rb +139 -0
  53. data/spec/profile_spec.rb +24 -0
  54. data/spec/program_spec.rb +55 -0
  55. data/spec/score_spec.rb +55 -0
  56. data/spec/spec_helper.rb +23 -0
  57. data/spec/transition_spec.rb +13 -0
  58. data/spec/value_change_spec.rb +19 -0
  59. metadata +239 -0
@@ -0,0 +1,23 @@
1
+ require 'rspec'
2
+ require 'music-transcription'
3
+
4
+ include Music::Transcription
5
+
6
+ class Samples
7
+ SAMPLE_PART = Part.new(
8
+ :notes => [
9
+ Note.new(
10
+ :duration => 0.25,
11
+ :intervals => [
12
+ Interval.new( :pitch => C1 ),
13
+ Interval.new( :pitch => D1 ),
14
+ ]
15
+ )
16
+ ],
17
+ :loudness_profile => profile(
18
+ 0.5, {
19
+ 1.0 => linear_change(1.0, 2.0)
20
+ }
21
+ )
22
+ )
23
+ end
@@ -0,0 +1,13 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+
3
+ describe Transition do
4
+
5
+ context '.new' do
6
+ it "should assign duration and type given during construction" do
7
+ t = Transition.new(:duration => 1.5, :type => Transition::LINEAR)
8
+ t.duration.should eq(1.5)
9
+ t.type.should eq(Transition::LINEAR)
10
+ end
11
+ end
12
+
13
+ end
@@ -0,0 +1,19 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+
3
+ describe ValueChange do
4
+
5
+ context '.new' do
6
+ it "should assign offset, value, and duration given during construction" do
7
+ event = ValueChange.new(:value => 0)
8
+ event.value.should eq(0)
9
+ event.transition.type.should eq(Transition::IMMEDIATE)
10
+ event.transition.duration.should eq(0)
11
+
12
+ event = ValueChange.new(:value => 2, :transition => linear(3))
13
+ event.value.should eq(2)
14
+ event.transition.type.should eq(Transition::LINEAR)
15
+ event.transition.duration.should eq(3)
16
+ end
17
+ end
18
+
19
+ end
metadata ADDED
@@ -0,0 +1,239 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: music-transcription
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.3.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - James Tunnell
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-08-07 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: hashmake
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: bundler
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ~>
36
+ - !ruby/object:Gem::Version
37
+ version: '1.0'
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: '1.0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: rake
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ~>
52
+ - !ruby/object:Gem::Version
53
+ version: '0.8'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: '0.8'
62
+ - !ruby/object:Gem::Dependency
63
+ name: rspec
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ~>
68
+ - !ruby/object:Gem::Version
69
+ version: '2.4'
70
+ type: :development
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ~>
76
+ - !ruby/object:Gem::Version
77
+ version: '2.4'
78
+ - !ruby/object:Gem::Dependency
79
+ name: yard
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ~>
84
+ - !ruby/object:Gem::Version
85
+ version: '0.8'
86
+ type: :development
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ~>
92
+ - !ruby/object:Gem::Version
93
+ version: '0.8'
94
+ - !ruby/object:Gem::Dependency
95
+ name: pry
96
+ requirement: !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ! '>='
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
102
+ type: :development
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ - !ruby/object:Gem::Dependency
111
+ name: pry-nav
112
+ requirement: !ruby/object:Gem::Requirement
113
+ none: false
114
+ requirements:
115
+ - - ! '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ! '>='
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
126
+ description: ! "The goal of music-transcription is the abstract representation of
127
+ standard \nmusical features such as pitch, note, loudness, tempo, etc. Establishing\na
128
+ common representation enables composition and performance.\n"
129
+ email: jamestunnell@lavabit.com
130
+ executables:
131
+ - transcribe
132
+ extensions: []
133
+ extra_rdoc_files: []
134
+ files:
135
+ - .document
136
+ - .gitignore
137
+ - .rspec
138
+ - .yardopts
139
+ - ChangeLog.rdoc
140
+ - Gemfile
141
+ - LICENSE.txt
142
+ - README.rdoc
143
+ - Rakefile
144
+ - bin/transcribe
145
+ - lib/music-transcription.rb
146
+ - lib/music-transcription/arrangement.rb
147
+ - lib/music-transcription/instrument_config.rb
148
+ - lib/music-transcription/interval.rb
149
+ - lib/music-transcription/link.rb
150
+ - lib/music-transcription/note.rb
151
+ - lib/music-transcription/part.rb
152
+ - lib/music-transcription/pitch.rb
153
+ - lib/music-transcription/pitch_constants.rb
154
+ - lib/music-transcription/profile.rb
155
+ - lib/music-transcription/program.rb
156
+ - lib/music-transcription/score.rb
157
+ - lib/music-transcription/tempo.rb
158
+ - lib/music-transcription/transition.rb
159
+ - lib/music-transcription/value_change.rb
160
+ - lib/music-transcription/version.rb
161
+ - music-transcription.gemspec
162
+ - samples/arrangements/glissando_test.yml
163
+ - samples/arrangements/hip.yml
164
+ - samples/arrangements/instrument_test.yml
165
+ - samples/arrangements/legato_test.yml
166
+ - samples/arrangements/make_glissando_test.rb
167
+ - samples/arrangements/make_hip.rb
168
+ - samples/arrangements/make_instrument_test.rb
169
+ - samples/arrangements/make_legato_test.rb
170
+ - samples/arrangements/make_missed_connection.rb
171
+ - samples/arrangements/make_portamento_test.rb
172
+ - samples/arrangements/make_slur_test.rb
173
+ - samples/arrangements/make_song1.rb
174
+ - samples/arrangements/make_song2.rb
175
+ - samples/arrangements/missed_connection.yml
176
+ - samples/arrangements/portamento_test.yml
177
+ - samples/arrangements/slur_test.yml
178
+ - samples/arrangements/song1.yml
179
+ - samples/arrangements/song2.yml
180
+ - spec/instrument_config_spec.rb
181
+ - spec/interval_spec.rb
182
+ - spec/link_spec.rb
183
+ - spec/musicality_spec.rb
184
+ - spec/note_spec.rb
185
+ - spec/part_spec.rb
186
+ - spec/pitch_spec.rb
187
+ - spec/profile_spec.rb
188
+ - spec/program_spec.rb
189
+ - spec/score_spec.rb
190
+ - spec/spec_helper.rb
191
+ - spec/transition_spec.rb
192
+ - spec/value_change_spec.rb
193
+ homepage: https://github.com/jamestunnell/music-transcription
194
+ licenses:
195
+ - MIT
196
+ post_install_message:
197
+ rdoc_options: []
198
+ require_paths:
199
+ - lib
200
+ required_ruby_version: !ruby/object:Gem::Requirement
201
+ none: false
202
+ requirements:
203
+ - - ! '>='
204
+ - !ruby/object:Gem::Version
205
+ version: '0'
206
+ segments:
207
+ - 0
208
+ hash: -4504170498906695205
209
+ required_rubygems_version: !ruby/object:Gem::Requirement
210
+ none: false
211
+ requirements:
212
+ - - ! '>='
213
+ - !ruby/object:Gem::Version
214
+ version: '0'
215
+ segments:
216
+ - 0
217
+ hash: -4504170498906695205
218
+ requirements: []
219
+ rubyforge_project:
220
+ rubygems_version: 1.8.23
221
+ signing_key:
222
+ specification_version: 3
223
+ summary: Classes for representing music notational features like pitch, note, loudness,
224
+ tempo, etc.
225
+ test_files:
226
+ - spec/instrument_config_spec.rb
227
+ - spec/interval_spec.rb
228
+ - spec/link_spec.rb
229
+ - spec/musicality_spec.rb
230
+ - spec/note_spec.rb
231
+ - spec/part_spec.rb
232
+ - spec/pitch_spec.rb
233
+ - spec/profile_spec.rb
234
+ - spec/program_spec.rb
235
+ - spec/score_spec.rb
236
+ - spec/spec_helper.rb
237
+ - spec/transition_spec.rb
238
+ - spec/value_change_spec.rb
239
+ has_rdoc: