music-transcription 0.15.0 → 0.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/examples/hip.yml +88 -0
- data/examples/missed_connection.yml +34 -0
- data/examples/song1.yml +66 -0
- data/examples/song2.yml +22 -0
- data/lib/music-transcription/model/link.rb +8 -8
- data/lib/music-transcription/model/note.rb +1 -1
- data/lib/music-transcription/model/pitch.rb +66 -46
- data/lib/music-transcription/parsing/articulation_parsing.rb +2 -2
- data/lib/music-transcription/parsing/articulation_parsing.treetop +1 -1
- data/lib/music-transcription/parsing/link_parsing.rb +2 -2
- data/lib/music-transcription/parsing/link_parsing.treetop +1 -1
- data/lib/music-transcription/parsing/pitch_node.rb +7 -2
- data/lib/music-transcription/parsing/pitch_parsing.rb +103 -8
- data/lib/music-transcription/parsing/pitch_parsing.treetop +10 -1
- data/lib/music-transcription/version.rb +1 -1
- data/spec/model/note_spec.rb +2 -1
- data/spec/model/pitch_spec.rb +41 -34
- data/spec/parsing/articulation_parsing_spec.rb +1 -1
- data/spec/parsing/link_nodes_spec.rb +1 -1
- data/spec/parsing/link_parsing_spec.rb +4 -14
- data/spec/parsing/note_node_spec.rb +1 -1
- data/spec/parsing/note_parsing_spec.rb +6 -6
- data/spec/parsing/pitch_node_spec.rb +6 -0
- data/spec/parsing/pitch_parsing_spec.rb +5 -14
- metadata +3 -3
@@ -10,6 +10,12 @@ describe Parsing::PitchNode do
|
|
10
10
|
'Db2' => Db2,
|
11
11
|
'F7' => F7,
|
12
12
|
'B1' => B1,
|
13
|
+
"Bb22" => Pitch.new(octave: 22, semitone: 10),
|
14
|
+
"G2235" => Pitch.new(octave: 2235, semitone: 7),
|
15
|
+
"G2+11" => G2.transpose(0.11),
|
16
|
+
"G2-11" => G2.transpose(-0.11),
|
17
|
+
"A2-11301" => A2.transpose(-113.01),
|
18
|
+
"B5+881" => B5.transpose(8.81),
|
13
19
|
}.each do |str,tgt|
|
14
20
|
res = parser.parse(str)
|
15
21
|
context str do
|
@@ -5,19 +5,10 @@ describe Parsing::PitchParser do
|
|
5
5
|
@parser = Parsing::PitchParser.new
|
6
6
|
end
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
@parser.parse("C#9").should_not be nil
|
14
|
-
end
|
15
|
-
|
16
|
-
it 'should parse "Ab0"' do
|
17
|
-
@parser.parse("Ab0").should_not be nil
|
18
|
-
end
|
19
|
-
|
20
|
-
it 'should parse "G#2"' do
|
21
|
-
@parser.parse("G#2").should_not be nil
|
8
|
+
["C4","C#9","Ab0","G#2","E2+22","Cb5-99","G200","Bb9951+3920"
|
9
|
+
].each do |str|
|
10
|
+
it "should parse #{str}" do
|
11
|
+
@parser.should parse(str)
|
12
|
+
end
|
22
13
|
end
|
23
14
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: music-transcription
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.16.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Tunnell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -268,7 +268,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
268
268
|
version: '0'
|
269
269
|
requirements: []
|
270
270
|
rubyforge_project:
|
271
|
-
rubygems_version: 2.
|
271
|
+
rubygems_version: 2.4.2
|
272
272
|
signing_key:
|
273
273
|
specification_version: 4
|
274
274
|
summary: Classes for representing music notational features like pitch, note, loudness,
|