gitara 0.8.0 → 1.0.0
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.
- data/CHANGELOG.markdown +8 -1
- data/README.markdown +15 -21
- data/examples/{aimee-man-wise-up/aimee-man-wise-up.ly → aimee-man-wise-up.ly} +94 -80
- data/examples/aimee-man-wise-up.midi +0 -0
- data/examples/aimee-man-wise-up.pdf +0 -0
- data/examples/{aimee-man-wise-up/aimee-man-wise-up.rb → aimee-man-wise-up.rb} +7 -7
- data/examples/{eraserheads-huling-el-bimbo/tab.ly → eraserheads-huling-el-bimbo.ly} +27 -57
- data/examples/eraserheads-huling-el-bimbo.midi +0 -0
- data/examples/eraserheads-huling-el-bimbo.pdf +0 -0
- data/examples/{eraserheads-huling-el-bimbo/tab.rb → eraserheads-huling-el-bimbo.rb} +7 -7
- data/examples/{foo-fighters-walking-after-you/foo-fighters-walking-after-you.ly → foo-fighters-walking-after-you.ly} +19 -90
- data/examples/{foo-fighters-walking-after-you/foo-fighters-walking-after-you.midi → foo-fighters-walking-after-you.midi} +0 -0
- data/examples/foo-fighters-walking-after-you.pdf +0 -0
- data/examples/{foo-fighters-walking-after-you/foo-fighters-walking-after-you.rb → foo-fighters-walking-after-you.rb} +1 -1
- data/examples/tab-with-alternate-tuning.ly +11 -7
- data/examples/tab-with-alternate-tuning.midi +0 -0
- data/examples/tab-with-alternate-tuning.pdf +0 -0
- data/examples/tab-with-alternate-tuning.rb +1 -1
- data/examples/tab-with-chords.ly +134 -0
- data/examples/tab-with-chords.midi +0 -0
- data/examples/tab-with-chords.pdf +0 -0
- data/examples/tab-with-chords.rb +16 -0
- data/examples/tab-with-key-signature.ly +21 -7
- data/examples/tab-with-key-signature.midi +0 -0
- data/examples/tab-with-key-signature.pdf +0 -0
- data/examples/tab-with-key-signature.rb +2 -2
- data/examples/tab-with-line-with-no-break.ly +7 -12
- data/examples/tab-with-line-with-no-break.midi +0 -0
- data/examples/tab-with-line-with-no-break.pdf +0 -0
- data/examples/tab-with-partial.ly +25 -15
- data/examples/tab-with-partial.midi +0 -0
- data/examples/tab-with-partial.pdf +0 -0
- data/examples/tab-with-partial.rb +7 -7
- data/examples/tab-with-repeats.ly +25 -9
- data/examples/tab-with-repeats.midi +0 -0
- data/examples/tab-with-repeats.pdf +0 -0
- data/examples/tab-with-reused-bar-in-stanza.ly +154 -0
- data/examples/tab-with-reused-bar-in-stanza.midi +0 -0
- data/examples/tab-with-reused-bar-in-stanza.pdf +0 -0
- data/examples/tab-with-reused-bar-in-stanza.rb +14 -0
- data/examples/tab-with-time-signature.ly +27 -8
- data/examples/tab-with-time-signature.midi +0 -0
- data/examples/tab-with-time-signature.pdf +0 -0
- data/lib/gitara/node/bar.rb +0 -25
- data/lib/gitara/node/stanza.rb +22 -2
- data/lib/gitara/template/bar.erb +0 -1
- data/lib/gitara/template/chord_set.erb +1 -1
- data/lib/gitara/template/line.erb +0 -1
- data/lib/gitara/template/score.erb +2 -0
- data/lib/gitara/template/stanza.erb +1 -1
- data/lib/gitara/template/tab.erb +10 -5
- data/lib/gitara/version.rb +1 -1
- data/spec/lib/gitara/app_spec.rb +14 -39
- data/spec/lib/gitara/node/bar/stanza_version_spec.rb +1 -1
- data/spec/lib/gitara/node/bar_spec.rb +2 -58
- data/spec/lib/gitara/node/stanza_spec.rb +21 -1
- data/spec/spec_helper.rb +5 -1
- data/spec/support/app_tester.rb +12 -1
- metadata +34 -16
- data/examples/aimee-man-wise-up/aimee-man-wise-up.midi +0 -0
- data/examples/aimee-man-wise-up/aimee-man-wise-up.pdf +0 -0
- data/examples/eraserheads-huling-el-bimbo/tab.midi +0 -0
- data/examples/eraserheads-huling-el-bimbo/tab.pdf +0 -0
- data/examples/foo-fighters-walking-after-you/foo-fighters-walking-after-you.pdf +0 -0
- data/examples/tab.ly +0 -193
- data/examples/tab.rb +0 -67
data/lib/gitara/node/stanza.rb
CHANGED
@@ -1,11 +1,31 @@
|
|
1
1
|
module Gitara
|
2
2
|
module Node
|
3
3
|
class Stanza < Base
|
4
|
+
def bars
|
5
|
+
@bars ||= descendants(Node::Bar)
|
6
|
+
end
|
7
|
+
|
4
8
|
def heading_in_lilypond
|
5
|
-
results =
|
6
|
-
|
9
|
+
results = (
|
10
|
+
[self.heading_for_first_bar] +
|
11
|
+
bars.drop(1).map(&:stanza_heading)
|
12
|
+
)
|
13
|
+
|
7
14
|
results.join(' ')
|
8
15
|
end
|
16
|
+
|
17
|
+
def heading_for_first_bar
|
18
|
+
if bars[0].specified_duration
|
19
|
+
%Q|r#{bars[0].specified_duration}^"#{name}"|
|
20
|
+
else
|
21
|
+
ts = ancestor(Node::Tab).time_signature
|
22
|
+
if ts.generates_whole_note_bars?
|
23
|
+
%Q|#{ts.rest_bar_value}^"#{name}"|
|
24
|
+
else
|
25
|
+
%Q|r#{ts.beat_unit}^"#{name}" | + ("r#{ts.beat_unit} " * (ts.beats_per_bar - 1)).strip
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
9
29
|
end
|
10
30
|
end
|
11
31
|
end
|
data/lib/gitara/template/bar.erb
CHANGED
@@ -2,4 +2,3 @@
|
|
2
2
|
<%= voiced_bar.definition_name %> = { <%= voiced_bar.node.specified_duration_as_lilypond %> <%= voiced_bar.matching_note_set.value %> }
|
3
3
|
<% end %>
|
4
4
|
<%= self.chorded.definition_name %> = { <%= self.specified_duration_as_lilypond %> <%= self.chorded.value %> }
|
5
|
-
<%= self.stanza_version.definition_name %> = { <%= self.specified_duration_as_lilypond %> <%= self.stanza_version.value %> }
|
@@ -1 +1 @@
|
|
1
|
-
<%= self.chorded.definition_name %> = { <%= self.chorded.value %> }
|
1
|
+
<%= self.chorded.definition_name %> = { \chordmode { <%= self.chorded.value %> } }
|
@@ -2,4 +2,3 @@
|
|
2
2
|
<%= voiced_line.definition_name %> = { <%= voiced_line.value %> <%= voiced_line.node.manual_break? ? '\break' : '' %> }
|
3
3
|
<% end %>
|
4
4
|
<%= self.chorded.definition_name %> = { <%= self.chorded.value %> }
|
5
|
-
<%= self.stanza_version.definition_name %> = { <%= self.stanza_version.value %> }
|
@@ -2,4 +2,6 @@
|
|
2
2
|
<%= voiced_score.definition_name %> = { <%= voiced_score.value %> }
|
3
3
|
<% end %>
|
4
4
|
<%= self.chorded.definition_name %> = { <%= self.chorded.value %> }
|
5
|
+
<%- if self.descendants(Gitara::Node::Stanza).any? %>
|
5
6
|
<%= self.stanza_version.definition_name %> = { <%= self.stanza_version.value %> }
|
7
|
+
<% end %>
|
@@ -2,4 +2,4 @@
|
|
2
2
|
<%= voiced_stanza.definition_name %> = { <%= voiced_stanza.value %> }
|
3
3
|
<% end %>
|
4
4
|
<%= self.chorded.definition_name %> = { <%= self.chorded.value %> }
|
5
|
-
<%= self.stanza_version.definition_name %> = { <%= self.
|
5
|
+
<%= self.stanza_version.definition_name %> = { <%= self.heading_in_lilypond %> }
|
data/lib/gitara/template/tab.erb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
\version "2.
|
1
|
+
\version "2.14.2"
|
2
2
|
\include "english.ly"
|
3
3
|
|
4
4
|
\paper {
|
@@ -57,7 +57,11 @@
|
|
57
57
|
%-----------------------------------------------------------------------
|
58
58
|
% Stanza Headings
|
59
59
|
|
60
|
-
stanzaHeadings = {
|
60
|
+
stanzaHeadings = {
|
61
|
+
<%- if playable_child.descendants(Gitara::Node::Stanza).any? %>
|
62
|
+
<%= playable_child.stanza_version.call_name %>
|
63
|
+
<% end %>
|
64
|
+
}
|
61
65
|
|
62
66
|
%-----------------------------------------------------------------------
|
63
67
|
% Chord Headings
|
@@ -73,6 +77,10 @@ chordHeadings = { <%= playable_child.chorded.call_name %> }
|
|
73
77
|
<%= Gitara.render('tab_tempo', self) %>
|
74
78
|
\clef "treble_8"
|
75
79
|
|
80
|
+
\new ChordNames {
|
81
|
+
\chordHeadings
|
82
|
+
}
|
83
|
+
|
76
84
|
\new Voice \with { \remove Rest_engraver } {
|
77
85
|
\stanzaHeadings
|
78
86
|
}
|
@@ -94,9 +102,6 @@ chordHeadings = { <%= playable_child.chorded.call_name %> }
|
|
94
102
|
<%= voice.call_name %>
|
95
103
|
}
|
96
104
|
<% end %>
|
97
|
-
\new TabVoice {
|
98
|
-
\chordHeadings
|
99
|
-
}
|
100
105
|
>>
|
101
106
|
>>
|
102
107
|
|
data/lib/gitara/version.rb
CHANGED
data/spec/lib/gitara/app_spec.rb
CHANGED
@@ -2,46 +2,21 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe Gitara::App do
|
4
4
|
describe "#export" do
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
let(:app_test){AppTester.new(:run_lilypond => run_lilypond?)}
|
6
|
+
|
7
|
+
Pow('examples').glob('/*.rb').each do |path|
|
8
|
+
it "can convert #{path.name(false)} to lilypond" do
|
9
|
+
app_test.name = path.name(false)
|
10
|
+
app_test.run
|
11
|
+
app_test.actual.should == app_test.expected
|
12
|
+
end
|
9
13
|
end
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
it "can convert a tab with alternate tuning to lilypond" do
|
18
|
-
app_test = AppTester.new(:name => 'tab-with-alternate-tuning')
|
19
|
-
app_test.run
|
20
|
-
app_test.actual.should == app_test.expected
|
21
|
-
end
|
22
|
-
|
23
|
-
it "can convert a tab with a specified key signature to lilypond" do
|
24
|
-
app_test = AppTester.new(:name => 'tab-with-key-signature')
|
25
|
-
app_test.run
|
26
|
-
app_test.actual.should == app_test.expected
|
27
|
-
end
|
28
|
-
|
29
|
-
it "can convert a tab with repeats to lilypond" do
|
30
|
-
app_test = AppTester.new(:name => 'tab-with-repeats')
|
31
|
-
app_test.run
|
32
|
-
app_test.actual.should == app_test.expected
|
33
|
-
end
|
34
|
-
|
35
|
-
it "can convert a tab with a specified time to lilypond" do
|
36
|
-
app_test = AppTester.new(:name => 'tab-with-time-signature')
|
37
|
-
app_test.run
|
38
|
-
app_test.actual.should == app_test.expected
|
39
|
-
end
|
40
|
-
|
41
|
-
it "can convert a tab with a line without a break to lilypond" do
|
42
|
-
app_test = AppTester.new(:name => 'tab-with-line-with-no-break')
|
43
|
-
app_test.run
|
44
|
-
app_test.actual.should == app_test.expected
|
14
|
+
|
15
|
+
after do
|
16
|
+
if run_lilypond?
|
17
|
+
app_test.should be_midi_generated
|
18
|
+
app_test.should be_pdf_generated
|
19
|
+
end
|
45
20
|
end
|
46
21
|
end
|
47
22
|
end
|
@@ -8,7 +8,7 @@ describe Gitara::Node::Bar::StanzaVersion do
|
|
8
8
|
tab = FactoryGirl.build(:tab, :children => [stanza], :time => '4/4')
|
9
9
|
|
10
10
|
stanza_version_of_bar = FactoryGirl.build(:stanza_version_bar, :node => bar)
|
11
|
-
stanza_version_of_bar.value.should == 'r1
|
11
|
+
stanza_version_of_bar.value.should == 'r1'
|
12
12
|
end
|
13
13
|
end
|
14
14
|
end
|
@@ -19,15 +19,7 @@ describe Gitara::Node::Bar do
|
|
19
19
|
end
|
20
20
|
|
21
21
|
describe "#stanza_heading" do
|
22
|
-
it "should be a whole rest with
|
23
|
-
bar = FactoryGirl.build(:bar)
|
24
|
-
stanza = FactoryGirl.build(:stanza, :name => 'Intro', :children => [bar])
|
25
|
-
tab = FactoryGirl.build(:tab, :children => [stanza], :time => '4/4')
|
26
|
-
|
27
|
-
bar.stanza_heading.should == 'r1^"Intro"'
|
28
|
-
end
|
29
|
-
|
30
|
-
it "should be a whole rest with no stanza name if the bar is not the first node of a stanza" do
|
22
|
+
it "should be a whole rest with no stanza name" do
|
31
23
|
first_bar = FactoryGirl.build(:bar)
|
32
24
|
second_bar = FactoryGirl.build(:bar)
|
33
25
|
stanza = FactoryGirl.build(:stanza, :name => 'Intro', :children => [first_bar, second_bar])
|
@@ -35,18 +27,8 @@ describe Gitara::Node::Bar do
|
|
35
27
|
|
36
28
|
second_bar.stanza_heading.should == 'r1'
|
37
29
|
end
|
38
|
-
end
|
39
|
-
|
40
|
-
describe "#with a special_duration" do
|
41
|
-
it "should be a partial with the stanza name if the bar is the first node of a stanza" do
|
42
|
-
subject = FactoryGirl.build(:bar, :specified_duration => 8)
|
43
|
-
stanza = FactoryGirl.build(:stanza, :name => 'Intro', :children => [subject])
|
44
|
-
tab = FactoryGirl.build(:tab, :children => [stanza], :time => '4/4')
|
45
30
|
|
46
|
-
|
47
|
-
end
|
48
|
-
|
49
|
-
it "should be a partial with no stanza name if the subject is not the first node of a stanza" do
|
31
|
+
it "should be a partial with no stanza name if the bar has a special_duration" do
|
50
32
|
first_bar = FactoryGirl.build(:bar)
|
51
33
|
second_bar = FactoryGirl.build(:bar, :specified_duration => 8)
|
52
34
|
stanza = FactoryGirl.build(:stanza, :name => 'Intro', :children => [first_bar, second_bar])
|
@@ -56,26 +38,6 @@ describe Gitara::Node::Bar do
|
|
56
38
|
end
|
57
39
|
end
|
58
40
|
|
59
|
-
describe "#first_bar_of_stanza?" do
|
60
|
-
it "should be true if the bar is the first bar of a stanza" do
|
61
|
-
bar = FactoryGirl.build(:bar)
|
62
|
-
stanza = FactoryGirl.build(:stanza, :name => 'Intro', :children => [bar])
|
63
|
-
bar.should be_first_bar_of_stanza
|
64
|
-
end
|
65
|
-
|
66
|
-
it "should be false if the bar is not the first bar of a stanza" do
|
67
|
-
bars = [FactoryGirl.build(:bar), FactoryGirl.build(:bar)]
|
68
|
-
stanza = FactoryGirl.build(:stanza, :name => 'Intro', :children => bars)
|
69
|
-
|
70
|
-
bars[1].should_not be_first_bar_of_stanza
|
71
|
-
end
|
72
|
-
|
73
|
-
it "should be false if the bar does not belong to a stanza" do
|
74
|
-
bar = FactoryGirl.build(:bar)
|
75
|
-
bar.should_not be_first_bar_of_stanza
|
76
|
-
end
|
77
|
-
end
|
78
|
-
|
79
41
|
describe "#specified_duration_as_lilypond" do
|
80
42
|
it "should be \\partial specified_duration if present" do
|
81
43
|
bar = FactoryGirl.build(:bar, :specified_duration => 8)
|
@@ -87,22 +49,4 @@ describe Gitara::Node::Bar do
|
|
87
49
|
bar.specified_duration_as_lilypond.should be_nil
|
88
50
|
end
|
89
51
|
end
|
90
|
-
|
91
|
-
describe "#stanza_heading_for_first_bar" do
|
92
|
-
it "should be the time signature's rest bar value with the stanza name if the time signature will generate whole note bars" do
|
93
|
-
bar = FactoryGirl.build(:bar)
|
94
|
-
stanza = FactoryGirl.build(:stanza, :name => 'Intro', :children => [bar])
|
95
|
-
tab = FactoryGirl.build(:tab, :children => [stanza], :time => '4/4')
|
96
|
-
|
97
|
-
bar.stanza_heading_for_first_bar.should == 'r1^"Intro"'
|
98
|
-
end
|
99
|
-
|
100
|
-
it "should attach the stanza name to the first rest note if the time signature will not generate whole note bars" do
|
101
|
-
bar = FactoryGirl.build(:bar)
|
102
|
-
stanza = FactoryGirl.build(:stanza, :name => 'Intro', :children => [bar])
|
103
|
-
tab = FactoryGirl.build(:tab, :children => [stanza], :time => '3/4')
|
104
|
-
|
105
|
-
bar.stanza_heading_for_first_bar.should == 'r4^"Intro" r4 r4'
|
106
|
-
end
|
107
|
-
end
|
108
52
|
end
|
@@ -10,7 +10,27 @@ describe Gitara::Node::Stanza do
|
|
10
10
|
])
|
11
11
|
])
|
12
12
|
|
13
|
-
|
13
|
+
tab = FactoryGirl.build(:tab, :time => '4/4', :children => [stanza])
|
14
|
+
|
15
|
+
stanza.heading_in_lilypond.should == 'r1^"Verse 1" r1'
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
describe "#heading_for_first_bar" do
|
20
|
+
it "should be the time signature's rest bar value with the stanza name if the time signature will generate whole note bars" do
|
21
|
+
bar = FactoryGirl.build(:bar)
|
22
|
+
stanza = FactoryGirl.build(:stanza, :name => 'Intro', :children => [bar])
|
23
|
+
tab = FactoryGirl.build(:tab, :children => [stanza], :time => '4/4')
|
24
|
+
|
25
|
+
stanza.heading_for_first_bar.should == 'r1^"Intro"'
|
26
|
+
end
|
27
|
+
|
28
|
+
it "should attach the stanza name to the first rest note if the time signature will not generate whole note bars" do
|
29
|
+
bar = FactoryGirl.build(:bar)
|
30
|
+
stanza = FactoryGirl.build(:stanza, :name => 'Intro', :children => [bar])
|
31
|
+
tab = FactoryGirl.build(:tab, :children => [stanza], :time => '3/4')
|
32
|
+
|
33
|
+
stanza.heading_for_first_bar.should == 'r4^"Intro" r4 r4'
|
14
34
|
end
|
15
35
|
end
|
16
36
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -8,11 +8,15 @@ RSpec.configure do |config|
|
|
8
8
|
require 'support/app_tester'
|
9
9
|
|
10
10
|
config.before :each do
|
11
|
-
test_tmp_dir.delete! if test_tmp_dir.exists?
|
11
|
+
test_tmp_dir.delete! if test_tmp_dir.exists? && ! run_lilypond?
|
12
12
|
Gitara.instance_variable_set :@tab, nil
|
13
13
|
end
|
14
14
|
|
15
15
|
def test_tmp_dir
|
16
16
|
Pow('tmp/test')
|
17
17
|
end
|
18
|
+
|
19
|
+
def run_lilypond?
|
20
|
+
! ENV['RUN_LILYPOND'].nil?
|
21
|
+
end
|
18
22
|
end
|
data/spec/support/app_tester.rb
CHANGED
@@ -1,10 +1,13 @@
|
|
1
1
|
# @private
|
2
2
|
class AppTester < Valuable
|
3
3
|
has_value :name
|
4
|
+
has_value :run_lilypond, :klass => :boolean, :default => false
|
4
5
|
|
5
6
|
def run
|
6
7
|
app = FactoryGirl.build(:app)
|
7
|
-
app.invoke :export, ["examples/#{name}.rb"],
|
8
|
+
app.invoke :export, ["examples/#{name}.rb"],
|
9
|
+
"target-directory" => test_tmp_dir.path,
|
10
|
+
"run-lilypond" => self.run_lilypond?
|
8
11
|
(Pow("tmp") / "#{name}.ly").write actual if self.expected != self.actual
|
9
12
|
end
|
10
13
|
|
@@ -19,4 +22,12 @@ class AppTester < Valuable
|
|
19
22
|
def actual
|
20
23
|
@actual ||= Utilities.read!((test_tmp_dir / "#{name}.ly")).gsub(/\n\s+\n/, "\n")
|
21
24
|
end
|
25
|
+
|
26
|
+
def midi_generated?
|
27
|
+
(test_tmp_dir / "#{name}.midi").exist?
|
28
|
+
end
|
29
|
+
|
30
|
+
def pdf_generated?
|
31
|
+
(test_tmp_dir / "#{name}.pdf").exist?
|
32
|
+
end
|
22
33
|
end
|
metadata
CHANGED
@@ -2,14 +2,14 @@
|
|
2
2
|
name: gitara
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.
|
5
|
+
version: 1.0.0
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- George Mendoza
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-01-
|
12
|
+
date: 2013-01-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
type: :runtime
|
@@ -283,32 +283,50 @@ files:
|
|
283
283
|
- README.markdown
|
284
284
|
- Rakefile
|
285
285
|
- bin/gitara
|
286
|
-
- examples/aimee-man-wise-up
|
287
|
-
- examples/aimee-man-wise-up
|
288
|
-
- examples/aimee-man-wise-up
|
289
|
-
- examples/aimee-man-wise-up
|
290
|
-
- examples/eraserheads-huling-el-bimbo
|
291
|
-
- examples/eraserheads-huling-el-bimbo
|
292
|
-
- examples/eraserheads-huling-el-bimbo
|
293
|
-
- examples/eraserheads-huling-el-bimbo
|
294
|
-
- examples/foo-fighters-walking-after-you
|
295
|
-
- examples/foo-fighters-walking-after-you
|
296
|
-
- examples/foo-fighters-walking-after-you
|
297
|
-
- examples/foo-fighters-walking-after-you
|
286
|
+
- examples/aimee-man-wise-up.ly
|
287
|
+
- examples/aimee-man-wise-up.midi
|
288
|
+
- examples/aimee-man-wise-up.pdf
|
289
|
+
- examples/aimee-man-wise-up.rb
|
290
|
+
- examples/eraserheads-huling-el-bimbo.ly
|
291
|
+
- examples/eraserheads-huling-el-bimbo.midi
|
292
|
+
- examples/eraserheads-huling-el-bimbo.pdf
|
293
|
+
- examples/eraserheads-huling-el-bimbo.rb
|
294
|
+
- examples/foo-fighters-walking-after-you.ly
|
295
|
+
- examples/foo-fighters-walking-after-you.midi
|
296
|
+
- examples/foo-fighters-walking-after-you.pdf
|
297
|
+
- examples/foo-fighters-walking-after-you.rb
|
298
298
|
- examples/tab-with-alternate-tuning.ly
|
299
|
+
- examples/tab-with-alternate-tuning.midi
|
300
|
+
- examples/tab-with-alternate-tuning.pdf
|
299
301
|
- examples/tab-with-alternate-tuning.rb
|
302
|
+
- examples/tab-with-chords.ly
|
303
|
+
- examples/tab-with-chords.midi
|
304
|
+
- examples/tab-with-chords.pdf
|
305
|
+
- examples/tab-with-chords.rb
|
300
306
|
- examples/tab-with-key-signature.ly
|
307
|
+
- examples/tab-with-key-signature.midi
|
308
|
+
- examples/tab-with-key-signature.pdf
|
301
309
|
- examples/tab-with-key-signature.rb
|
302
310
|
- examples/tab-with-line-with-no-break.ly
|
311
|
+
- examples/tab-with-line-with-no-break.midi
|
312
|
+
- examples/tab-with-line-with-no-break.pdf
|
303
313
|
- examples/tab-with-line-with-no-break.rb
|
304
314
|
- examples/tab-with-partial.ly
|
315
|
+
- examples/tab-with-partial.midi
|
316
|
+
- examples/tab-with-partial.pdf
|
305
317
|
- examples/tab-with-partial.rb
|
306
318
|
- examples/tab-with-repeats.ly
|
319
|
+
- examples/tab-with-repeats.midi
|
320
|
+
- examples/tab-with-repeats.pdf
|
307
321
|
- examples/tab-with-repeats.rb
|
322
|
+
- examples/tab-with-reused-bar-in-stanza.ly
|
323
|
+
- examples/tab-with-reused-bar-in-stanza.midi
|
324
|
+
- examples/tab-with-reused-bar-in-stanza.pdf
|
325
|
+
- examples/tab-with-reused-bar-in-stanza.rb
|
308
326
|
- examples/tab-with-time-signature.ly
|
327
|
+
- examples/tab-with-time-signature.midi
|
328
|
+
- examples/tab-with-time-signature.pdf
|
309
329
|
- examples/tab-with-time-signature.rb
|
310
|
-
- examples/tab.ly
|
311
|
-
- examples/tab.rb
|
312
330
|
- gitara.gemspec
|
313
331
|
- lib/gitara.rb
|
314
332
|
- lib/gitara/app.rb
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/examples/tab.ly
DELETED
@@ -1,193 +0,0 @@
|
|
1
|
-
\version "2.12.3"
|
2
|
-
\include "english.ly"
|
3
|
-
|
4
|
-
\paper {
|
5
|
-
indent = #0
|
6
|
-
}
|
7
|
-
|
8
|
-
\header {
|
9
|
-
title = "Wise Up"
|
10
|
-
composer = "Aimee Mann"
|
11
|
-
arranger = "Arranged by George Mendoza"
|
12
|
-
instrument = "Guitar (capo on second fret)"
|
13
|
-
}
|
14
|
-
|
15
|
-
%-----------------------------------------------------------------------
|
16
|
-
% Chord Sets
|
17
|
-
|
18
|
-
cChordSetAm = { r4-"Am" r r r }
|
19
|
-
cChordSetAmC = { r4-"Am" r r-"C" r }
|
20
|
-
cChordSetBbF = { r4-"Bb" r r-"F" r }
|
21
|
-
cChordSetCCGE = { r4-"C" r r-"G" r-"E" }
|
22
|
-
cChordSetD = { r4-"D" r r r }
|
23
|
-
cChordSetFC = { r4-"F" r r-"C" r }
|
24
|
-
cChordSetFD = { r4-"F" r r-"D" r }
|
25
|
-
|
26
|
-
%-----------------------------------------------------------------------
|
27
|
-
% Bars
|
28
|
-
|
29
|
-
vOneBarBeganIt = { \skip 4 <a\3 c'\2 >8 <g\3>8 \skip 4 <g\3 c'\2 >8 <g\3>8 }
|
30
|
-
vTwoBarBeganIt = { <f\4>4 <f\4>4 <c\5>4 <e\4>4 }
|
31
|
-
cBarBeganIt = { \cChordSetFC }
|
32
|
-
sBarBeganIt = { r1 }
|
33
|
-
|
34
|
-
vOneBarItsNot = { r8 <g'\1>4 <a\3>16 <g'\1>8 <g\3>16 <e'\1>4 <g\3>16( <a\3>16) }
|
35
|
-
vTwoBarItsNot = { <f\4>4 <f\4>4 <c\5>4 <e\4>4 }
|
36
|
-
cBarItsNot = { \cChordSetFC }
|
37
|
-
sBarItsNot = { r1 }
|
38
|
-
|
39
|
-
vOneBarItThough = { r8 <d'\2>16( <c'\2>16) r8 <a\3>16 <c'\2>16 r8 <d'\2>16( <c'\2>16) r8 <a\3>8 }
|
40
|
-
vTwoBarItThough = { <f\4>4 <f\4>4 <d\4>4 <d\4>4 }
|
41
|
-
cBarItThough = { \cChordSetFD }
|
42
|
-
sBarItThough = { r1 }
|
43
|
-
|
44
|
-
vOneBarWhatYouThought = { r8 <g'\1>4 <a\3>16 <g'\1>8 <g\3>16 <e'\1>4 <g\3>8 }
|
45
|
-
vTwoBarWhatYouThought = { <f\4>4 <f\4>4 <c\5>4 <e\4>4 }
|
46
|
-
cBarWhatYouThought = { \cChordSetFC }
|
47
|
-
sBarWhatYouThought = { r1 }
|
48
|
-
|
49
|
-
vOneBarWhenYouFirst = { <e'\1>8 <d'\2>16( <c'\2>8) <a\3>8. <c'\2>4 <a\3>8 <c'\2>8 }
|
50
|
-
vTwoBarWhenYouFirst = { <a,\5>4 <a,\5>8 <e\4>4 <a,\5>4 \skip 8 }
|
51
|
-
cBarWhenYouFirst = { \cChordSetAm }
|
52
|
-
sBarWhenYouFirst = { r1 }
|
53
|
-
|
54
|
-
vOneBarYouGot = { <g'\1>8 <a\3>8 <g'\1>8 <a\3>16 <g'\1>8 <g\3>16 <e'\1>4 <g\3>16( <a\3>16) }
|
55
|
-
vTwoBarYouGot = { <f\4>4 <f\4>4 <c\5>4 <e\4>4 }
|
56
|
-
cBarYouGot = { \cChordSetFC }
|
57
|
-
sBarYouGot = { r1 }
|
58
|
-
|
59
|
-
|
60
|
-
%-----------------------------------------------------------------------
|
61
|
-
% Lines
|
62
|
-
|
63
|
-
vOneLineVerseOneLineTwo = { \vOneBarYouGot \vOneBarWhatYouThought \vOneBarWhenYouFirst \vOneBarItThough \break }
|
64
|
-
vTwoLineVerseOneLineTwo = { \vTwoBarYouGot \vTwoBarWhatYouThought \vTwoBarWhenYouFirst \vTwoBarItThough \break }
|
65
|
-
cLineVerseOneLineTwo = { \cBarYouGot \cBarWhatYouThought \cBarWhenYouFirst \cBarItThough }
|
66
|
-
sLineVerseOneLineTwo = { \sBarYouGot \sBarWhatYouThought \sBarWhenYouFirst \sBarItThough }
|
67
|
-
|
68
|
-
vOneLineVerseOneLineOne = { \vOneBarItsNot \vOneBarWhatYouThought \vOneBarWhenYouFirst \vOneBarBeganIt \break }
|
69
|
-
vTwoLineVerseOneLineOne = { \vTwoBarItsNot \vTwoBarWhatYouThought \vTwoBarWhenYouFirst \vTwoBarBeganIt \break }
|
70
|
-
cLineVerseOneLineOne = { \cBarItsNot \cBarWhatYouThought \cBarWhenYouFirst \cBarBeganIt }
|
71
|
-
sLineVerseOneLineOne = { \sBarItsNot \sBarWhatYouThought \sBarWhenYouFirst \sBarBeganIt }
|
72
|
-
|
73
|
-
|
74
|
-
%-----------------------------------------------------------------------
|
75
|
-
% Stanzas
|
76
|
-
|
77
|
-
vOneStanzaVerseOne = { \vOneLineVerseOneLineOne \vOneLineVerseOneLineTwo }
|
78
|
-
vTwoStanzaVerseOne = { \vTwoLineVerseOneLineOne \vTwoLineVerseOneLineTwo }
|
79
|
-
cStanzaVerseOne = { \cLineVerseOneLineOne \cLineVerseOneLineTwo }
|
80
|
-
sStanzaVerseOne = { \sLineVerseOneLineOne \sLineVerseOneLineTwo }
|
81
|
-
|
82
|
-
|
83
|
-
%-----------------------------------------------------------------------
|
84
|
-
% Scores
|
85
|
-
|
86
|
-
vOneScoreTabOneScoreOne = { \vOneStanzaVerseOne }
|
87
|
-
vTwoScoreTabOneScoreOne = { \vTwoStanzaVerseOne }
|
88
|
-
cScoreTabOneScoreOne = { \cStanzaVerseOne }
|
89
|
-
sScoreTabOneScoreOne = { \sStanzaVerseOne }
|
90
|
-
|
91
|
-
|
92
|
-
%-----------------------------------------------------------------------
|
93
|
-
% Voices
|
94
|
-
|
95
|
-
vOne = {
|
96
|
-
\transposition d''
|
97
|
-
\vOneScoreTabOneScoreOne
|
98
|
-
}
|
99
|
-
|
100
|
-
vTwo = {
|
101
|
-
\transposition d'
|
102
|
-
\vTwoScoreTabOneScoreOne
|
103
|
-
}
|
104
|
-
|
105
|
-
|
106
|
-
%-----------------------------------------------------------------------
|
107
|
-
% Stanza Headings
|
108
|
-
|
109
|
-
stanzaHeadings = { \sScoreTabOneScoreOne }
|
110
|
-
|
111
|
-
%-----------------------------------------------------------------------
|
112
|
-
% Chord Headings
|
113
|
-
|
114
|
-
chordHeadings = { \cScoreTabOneScoreOne }
|
115
|
-
|
116
|
-
%-----------------------------------------------------------------------
|
117
|
-
|
118
|
-
\score {
|
119
|
-
\new StaffGroup <<
|
120
|
-
\new Staff <<
|
121
|
-
\tempo 4 = 75
|
122
|
-
|
123
|
-
\clef "treble_8"
|
124
|
-
|
125
|
-
\new Voice \with { \remove Rest_engraver } {
|
126
|
-
\stanzaHeadings
|
127
|
-
}
|
128
|
-
|
129
|
-
\new Voice {
|
130
|
-
\voiceOne
|
131
|
-
\vOne
|
132
|
-
}
|
133
|
-
\new Voice {
|
134
|
-
\voiceTwo
|
135
|
-
\vTwo
|
136
|
-
}
|
137
|
-
>>
|
138
|
-
|
139
|
-
\new TabStaff <<
|
140
|
-
\new TabVoice {
|
141
|
-
\slurUp
|
142
|
-
\vOne
|
143
|
-
}
|
144
|
-
\new TabVoice {
|
145
|
-
\slurUp
|
146
|
-
\vTwo
|
147
|
-
}
|
148
|
-
\new TabVoice {
|
149
|
-
\chordHeadings
|
150
|
-
}
|
151
|
-
>>
|
152
|
-
>>
|
153
|
-
|
154
|
-
\layout {
|
155
|
-
\context { \Staff
|
156
|
-
\override TimeSignature #'style = #'numbered
|
157
|
-
\override StringNumber #'transparent = ##t
|
158
|
-
}
|
159
|
-
\context { \TabStaff
|
160
|
-
\override TimeSignature #'style = #'numbered
|
161
|
-
}
|
162
|
-
\context { \Voice
|
163
|
-
\remove Slur_engraver
|
164
|
-
}
|
165
|
-
\context { \TabVoice
|
166
|
-
\remove Dots_engraver
|
167
|
-
\remove Stem_engraver
|
168
|
-
\remove Rest_engraver
|
169
|
-
}
|
170
|
-
}
|
171
|
-
}
|
172
|
-
|
173
|
-
% showLastLength = R1*4
|
174
|
-
\score {
|
175
|
-
\new Staff \with {midiInstrument = #"acoustic guitar (nylon)"} <<
|
176
|
-
\tempo 4 = 75
|
177
|
-
|
178
|
-
\clef "treble_8"
|
179
|
-
|
180
|
-
\new Voice {
|
181
|
-
\unfoldRepeats {
|
182
|
-
\vOne
|
183
|
-
}
|
184
|
-
}
|
185
|
-
\new Voice {
|
186
|
-
\unfoldRepeats {
|
187
|
-
\vTwo
|
188
|
-
}
|
189
|
-
}
|
190
|
-
>>
|
191
|
-
|
192
|
-
\midi {}
|
193
|
-
}
|