gsmendoza / gitara Goto Github PK
View Code? Open in Web Editor NEWA Ruby DSL for generating Lilypond guitar tablatures
Home Page: http://gsmendoza.github.com/gitara
A Ruby DSL for generating Lilypond guitar tablatures
Home Page: http://gsmendoza.github.com/gitara
Like so:
tab do
voice "<g'\1>8 <a\3>8 <g'\1>8 <a\3>16 <g'\1>8 <g\3>16 <e'\1>4 <g\3>8"
voice "<f\4>4 <f\4>4 <c\5>4 <e\4>4"
end
Gitara.define do
title "Wise Up"
composer "Aimee Mann"
arranger "Arranged by George Mendoza"
instrument "Guitar (capo on second fret)"
midi_instrument "acoustic guitar (nylon)"
transposition "d''"
tempo "4 = 75"
end
Why not yaml?
Why not just ruby?
Why ruby-like?
stanza "Verse 1" do
line do
bar :ItsNot, :WhatYouThought, :WhenYouFirst, :BeganIt
end
end
score do
line do
bar :ItsNot, :WhatYouThought, :WhenYouFirst, :BeganIt
end
line :VerseOneLineTwo
end
tab do
bar "Intro" do
voice "<g'\1>8 <a\3>8 <g'\1>8 <a\3>16 <g'\1>8 <g\3>16 <e'\1>4 <g\3>8"
voice "<f\4>4 <f\4>4 <c\5>4 <e\4>4"
end
end
Given the following tab:
Gitara.define do
bar :Intro do
notes "c d e f"
end
score do
bar :Intro
end
end
Then the id of the score should be 1, not 2.
Like so:
Gitara.define do
bar :BeforeYouSign do
notes "r8 <d'/2>16( <c'/2>8.) <a/3>16 <c'/2>8. <d'/2>16 <e'/1>8. <g/3>8"
notes "<d/4>4 <d/4>4 <d/4>4 <d/4>4"
end
bar :BeganIt do
notes "/skip 4 <a/3 c'/2 >8 <g/3>8 /skip 4 <g/3 c'/2 >8 <g/3>8"
notes "<f/4>4 <f/4>4 <c/5>4 <e/4>4"
end
bar :ItThough do
notes "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"
notes "<f/4>4 <f/4>4 <d/4>4 <d/4>4"
end
bar :FDm do
notes "r8 <a/3>8 <c'/2>8 <a/3>8 r8 <d'/2>8 <a/3>8 <e'/1>8"
notes "<f/4>4 <f/4>4 <d/4>2"
end
bar :Intro do
notes "<g'/1>8 <a/3>8 <g'/1>8 <a/3>16 <g'/1>8 <g/3>16 <e'/1>4 <g/3>8"
notes "<f/4>4 <f/4>4 <c/5>4 <e/4>4"
end
bar :ItsNot do
notes "r8 <g'/1>4 <a/3>16 <g'/1>8 <g/3>16 <e'/1>4 <g/3>16( <a/3>16)"
notes "<f/4>4 <f/4>4 <c/5>4 <e/4>4"
end
bar :ItsNotGoingToStop do
notes "<g'/1>8 <a/3>8 <g'/1>16 <g'/1>16/glissando <a'/1>4 <e'/2>4 <d'/2>16( <c'/2>16)"
notes "<f/4>4 <f/4>4 <d/4>4 <d/4>4"
end
bar :ItsNotGoingToStopCcge do
notes "<g'/1>8 <g/3>8 <g'/1>16 <g'/1>16/glissando <a'/1>4 <d'/2>4 <c'/2>8"
notes "<c/5>4 <c/5>4 <g,/6>4 <e,/6>4"
end
bar :ItsNotGoingToStopCcgeTwo do
notes "r8 <g/3>8 <e'/1>8 <g'/1>8 r8 <d'/2>4 <c'/2>8"
notes "<c/5>4 <e/4>4 <g,/6>4 <e,/6>4"
end
bar :Outro do
notes "<g'/1>8 <a/3>8 <g'/1>8 <a/3>16 <g'/1>8 <g/3>16 <e'/1>4 <g/3>8"
notes "<a,/5>4 <a,/5>4 <c/5>4 <c/5>4"
end
bar :PrepareAList do
notes "<e'/1>8 <d'/2>16( <c'/2>8.) <a/3>16 <c'/2>8. <d'/2>16 <e'/1>8. <a/3>16 <e'/1>16"
notes "<a,/5>4 <a,/5>4 <a,/5>4 <a,/5>4"
end
bar :SoJustGiveUp do
notes "r8 <g/3>8 <c'/2>8 <a/3>8 <a/3 c'/2 g'/1 f/4 >4 <c'/3 e'/2 a'/1 >4"
notes "<as,/5>4 <d/4>4 /skip 2"
end
bar :TheresACure do
notes "r8 <d'/2>16( <c'/2>8.) <a/3>16 <g'/1>8 <g/3>16 <e'/1>4 <g/3>8"
notes "<f/4>4 <f/4>4 <c/5>4 <c/5>4"
end
bar :TilYouWiseUp do
notes "r8 <g/3>8 <c'/2>8 <g/3>8 <d'/2>4 <a/3>4"
notes "<as,/5>4 <d/4>4 <f/4>4 <f/4>4"
end
bar :TilYouWiseUpTwo do
notes "r8 <g/3>8 <c'/2>8 <g/3>8 <d'/2>8 <a/3>8 r8 <c'/2>8"
notes "<as,/5>4 <d/4>4 <f/4>4 <f/4>4"
end
bar :TilYouWiseUpThree do
notes "r8 <g/3>8 <c'/2>8 <a/3>8 <d'/2>8 <e'/1>8 r8 <e'/1>8"
notes "<as,/5>4 <d/4>4 <f/4>4 <f/4>4"
end
bar :WhatYouThought do
notes "r8 <g'/1>4 <a/3>16 <g'/1>8 <g/3>16 <e'/1>4 <g/3>8"
notes "<f/4>4 <f/4>4 <c/5>4 <e/4>4"
end
bar :WhenYouFirst do
notes "<e'/1>8 <d'/2>16( <c'/2>8) <a/3>8. <c'/2>4 <a/3>8 <c'/2>8"
notes "<a,/5>4 <a,/5>8 <e/4>4 <a,/5>4 /skip 8"
end
bar :YouGot do
notes "<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)"
notes "<f/4>4 <f/4>4 <c/5>4 <e/4>4"
end
bar :YoureSure do
notes "r8 <g'/1>4 <a/3>16 <g'/1>8 <g/3>16 <e'/1>4 <e'/1>8"
notes "<f/4>4 <f/4>4 <c/5>4 <e/4>4"
end
#-----------------------------------------------------------------------
line :ChorusOneLineOne do
bar :ItsNotGoingToStop, :FDm, :ItsNotGoingToStop, :FDm
end
line :IntroLineOne do
bar :Intro, :Intro, :Intro, :Intro
end
line :VerseOneLineTwo do
bar :YouGot, :WhatYouThought, :WhenYouFirst, :ItThough
end
#-----------------------------------------------------------------------
score do
# stanza Intro do
line :IntroLineOne
# stanza "Verse 1" do
line do
bar :ItsNot, :WhatYouThought, :WhenYouFirst, :BeganIt
end
line :VerseOneLineTwo
# stanza "Chorus 1" do
line :ChorusOneLineOne
line do
bar :ItsNotGoingToStopCcge, :TilYouWiseUp, :Intro, :Intro
end
# stanza "Verse 2" do
line do
bar :YoureSure, :TheresACure, :WhenYouFirst, :BeganIt
end
line :VerseOneLineTwo
# stanza "Chorus 2" do
line :ChorusOneLineOne
line do
bar :ItsNotGoingToStopCcge, :TilYouWiseUpTwo, :Intro, :Intro
end
# stanza "Bridge" do
line do
bar :PrepareAList, :BeforeYouSign
end
# stanza "Chorus 3" do
line :ChorusOneLineOne
line do
bar :ItsNotGoingToStopCcge, :TilYouWiseUpThree, :ItsNotGoingToStopCcgeTwo, :TilYouWiseUpThree
end
line do
bar :ItsNotGoingToStopCcgeTwo, :TilYouWiseUpThree, :ItsNotGoingToStopCcgeTwo, :SoJustGiveUp
end
# stanza "Outro" do
line :IntroLineOne
line do
bar :Outro, :Outro, :Outro, :Outro
end
end
end
See http://lilypond.org/doc/v2.14/Documentation/notation/chord-notation.
Also, current notation doesn't work with lilypond 2.14. It did work with 2.12 though :P
tab do
bar "Intro" do
voice "<g'\1>8 <a\3>8 <g'\1>8 <a\3>16 <g'\1>8 <g\3>16 <e'\1>4 <g\3>8"
voice "<f\4>4 <f\4>4 <c\5>4 <e\4>4"
end
bar "Intro"
end
In the example above, the Intro bar should only be played once.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.