Code Monkey home page Code Monkey logo

abcd's Introduction

ABCD - 🎡 The Markdown Notation for Music 🎡

A super simple textual language, called ABCD, to represent music scores. This repository also comes with an music score editor for that language. The aim is to be natural to use like markdown for writing documents. The positions of the musical elements in the text is close to their real positions in the score. It makes easy to add instruments, change keys, add voices, add lyrics. Its main feature is rhythm inference: you do not need to tediously specify the duration of each note; the system tries to guess the most natural rhythm from the specification. The name ABCD is a hint to the abc notation.

Try it here: https://francoisschwarzentruber.github.io/abcd/

Videos

Quick Language description

The syntax is highly inspired from ABC and Lilypond.

Feature How to do it in ABCD
add treble clef write π„ž
add bass clef write 𝄒
Notes and rests write letters a, b, c, Add ' or , for changing the octavia
Accidentals write #, β™­, ##, β™­β™­
Rests Β  Β  write r
Measures separationsΒ  write |, ||, |:, :|, :|:, |]
Rhythm It is guessed from whitespaces, but you can mention with 2, 1, /, ., .., etc.
Uplets Add (3 like in the ABC notation
Chords put notes between [ and ]
Dynamics !mp! etc.
Appoggiatura put notes between { and }
add a new voice just write in a new line
add a new staff add an empty line or a line starting with π„ž or 𝄒
Lyrics start a line with πŸ’¬ or πŸ˜€
specify an instrument start the line with the name of an instrument (e.g. piano, flute, violin, cello)
Change tempo write β™©=120

Features of the editor

  • real-time update of the score while modifying the code (like HedgeDoc for editing markdown)
  • Listening to the audio (MIDI)
  • Printing
  • Loading/saving in the local storage of the browser
  • Input from a MIDI device (in Chrome only)
  • Export in MIDI and ABC

Basic example

A file containing

    π„ž 2/4    e'2   |  d'  r
    𝄒        r  c  |  c/ c/ c

produces the score

image

Motivation - Why?

Why not graphical user interfaces?

In wysiwyg software, like Musescore, Finale, etc. you never know where to click.

Why textual languages?

The only thing to learn with a textual language is the language. Everyone knows how to use a text editor. Existing textual langages (like ABC and lilypond) are very expressive.

Why a new textual language?

Existing languages are difficult to learn. The project aims at providing an easier to use textual language. Here are the main points:

  • Both languages (ABC, Lilypond) have cryptic notations like [K:bass] or \voice.... In particular, adding a voice, a staff or lyrics is a bit tricky in both languages, while it is obvious in ABCD.
  • Both in ABC and Lilypond, all the information concerning a single measure is spread out in the source.

How does it work behind the scene?

Technically, this repository provides a program, that preprocesses an input in ABCD to produce an ABC string, and then produces the output with the library abc.js. Meanwhile it calls a solver for solving rhythm inference.

abcd's People

Contributors

francoisschwarzentruber avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

abcd's Issues

ascii representation?

What about a - b for a8 b8?
What about a. -= b for a8. b16 ?
What about a - b - c for a 3-uplet?

Guess rythms

For instance, in 4/4,
a b is automatically transformed in a2 b2
a3 b a3 b a2 => a3// b// a3// b// a2
a a a b3 => (3 a/ a/ a/ b3

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.