Coder Social home page Coder Social logo

gitara's People

Contributors

gsmendoza avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

rsmp-others

gitara's Issues

I should be able to define a tab

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

I should be able to add properties to the tab

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

Gitara should be more ruby-like instead of yaml-like

Why not yaml?

  • Need to write my own parser.
  • Need to handle errors decently.
  • Might not scale as the syntax becomes more complex.

Why not just ruby?

  • Sandboxing is hacky. I want to be able to upload gitara files.
  • Forward slash and single quote are used extensively in lilypond.

Why ruby-like?

  • I can use parslet to parse a gitara file.

I should be able to group musical expressions in a score.

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

I should be able to reuse a bar.

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.