Giter Club home page Giter Club logo

exsurge's Introduction

exsurge

A JavaScript library for rendering Gregorian Chant in square note notation

Synopsis

exsurge allows developers to create SVG images of square note notation from gabc notation. These SVGs can then be inserted in the DOM or used for presentation purposes.

Live Browser Example

Want to see gabc code rendered to chant on the fly? Try going here.

Code Example

First, create a ChantContext which contains the settings for how the chant will be rendered:

var ctxt = new exsurge.ChantContext();

Then, create a ChantScore from gabc code:

var gabc = "(f3) EC(ce!fg)CE(f) *(,) ad(fe~)vé(f!gwhf)nit(f) (,)"
var score = exsurge.Gabc.loadChantScore(ctxt, gabc, true);

Finally, let the ChantScore handle the layout process, and use the SVG however you want:

// perform layout on the chant
score.performLayout(ctxt, function() {
  score.layoutChantLines(ctxt, 1000, function() {

    // render the score to svg code
    var svgNode = document.createElement('div');
    var innerHtml = score.createDrawable(ctxt);
    svgNode.innerHTML = innerHtml;
    document.body.appendChild(svgNode);
  });
});

Motivation

Very few good chant layout software exist for developers. exsurge allows web developers to insert beautiful chant into their workflow with the simplicity of a little JavaScript.

Installation

Under construction...

API Reference

Under construction...

Tests

Under construction...

Contributors

Under construction...

License

MIT License: http://adampritchard.mit-license.org/ or see the LICENSE file.

exsurge's People

Contributors

frmatthew avatar sirpl avatar leftees avatar

Watchers

 avatar

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.