How to print sheet music in PDF?

6

I'm developing a website for a church where in a particular part of the website music scores will be made available to the members of the orchestra, and I have no idea how to do this. I was thinking of using the class mPDF to be able to take advantage of the download function that the class already offers, but I do not know if it would work because I would not know how to mark the notes in the scoresheet in HTML , to be able to present them in class mPDF .

I need a north to be able to develop this, can anyone help me?

    
asked by anonymous 29.06.2015 / 19:42

1 answer

4

Use VexFlow for sheet music. With HTML mounted just generate the PDF.

Simple to use VexFlow, first create the HTML element:

<canvas width=700 height=100"></canvas>

Now just render:

var canvas = $("div.one div.a canvas")[0];
var renderer = new Vex.Flow.Renderer(canvas,
Vex.Flow.Renderer.Backends.CANVAS);

var ctx = renderer.getContext();
var stave = new Vex.Flow.Stave(10, 0, 500);
stave.addClef("treble").setContext(ctx).draw();

See complete example here . Visit Official Repository

    
15.09.2015 / 03:14