GithubHelp home page GithubHelp logo

abc's Introduction

ABC

This module is a set of tools for dealing with ABC music notation files in Raku (formerly known as Perl 6). This includes a grammar for most of the notation format (the standard has a lot of twisty corners, and we do not support all of them), Raku data structures for representing them, and some useful utilities.

my $music = q:to<ABC-end>;
    X:044
    T:Elsie Marley
    B:Robin Williamson, "Fiddle Tunes" (New York 1976)
    N:"printed by Robert Petrie in 1796 and is
    N:"described by him as a 'bumpkin'."
    Z:Nigel Gatherer
    M:6/8
    L:1/8
    K:G
    BAB G2G|G2g gdc|BAB G2G|=F2f fcA|
    BAB G2G|G2g gdB|c2a B2g|A2=f fcA:|
    ABC-end

my $match = ABC::Grammar.parse($music, :rule<tune>, :actions(ABC::Actions.new));
ok $match, 'tune recognized';
isa-ok $match.ast, ABC::Tune, 'and ABC::Tune created';
ok $match.ast.header.is-valid, "ABC::Tune's header is valid";
is $match.ast.music.elems, 57, '$match.ast.music has 57 elements';

There are several scripts in bin/ built on the library:

  • abc2ly: converts an ABC file to the Lilypond ly format, then invokes Lilypond on it to create high quality sheet music. If you install ABC using zef you should just be able to say abc2ly wedding.abcto convert wedding.abc to wedding.pdf via Lilypond file wedding.ly

    NOTE: Lilypond also has an abc2ly script; last time I tried it it produced hideous looking output from Lilypond. If you've got both installed, you will have to make sure the Raku bin of abc2ly appears first in your PATH.

  • abc2book: Given an ABC file and a simple “book” instructions file (our own format), this makes a book PDF. This uses Lilypond for music formatting, LaTeX for table of contents and index of tunes, and qpdf to stitch the results together into one file. This is still pretty experimental, but has produced one published book, The Fiddle Music of Newfoundland & Labrador Volume 1, Revised 2020 Edition

  • abctranspose: Simple tool for transposing ABC files.

  • abcoctave: Simple tool for shifting the octave of ABC files.

abc's People

Contributors

colomon avatar froggs avatar lastofthecarelessmen avatar moritz avatar sciurius avatar ugexe avatar zoffixznet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

abc's Issues

Please add `use` statements at top of README.md example code

Hi:

Nice work on the README.md, thanks for the quick update! However I can't get the code to work without the following three lines added at the top:

use Test;
use ABC::Grammar;
use ABC::Actions;

On a related note, simply using the lines:

use Test;
use ABC;

...don't work. So I'm wondering if the install process needs to leave an ABC module stub somewhere?

Thanks again!

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.