tex-notation for musical notation?

tex-notation for musical notation?

by Benjamin Weyel -
Number of replies: 1
Hi,

i'm trying to make a music theory course in moodle and therefore i need to draw musical notes, chord symbols and so on. I didn't find any editor for musical notation in moodles plugin repository ("music theory" seems to be great for quizzes but not for writing notes as part of my instructional ressources).
So i tried the tex-notation plugin, but i didn't get it to work properly.

While $$ \LaTeX $$ works fine, $$ \begin{music}\trebleclef\end{music} $$ does not. I compiled the latter successfully via command line, so i guess latex and the musixtex package are correctly installed on the system. I also added the musixtex-package to the preamble.

However, i don't get the compiled graphics into my textpage in moodle. The php-log states the following:

[26-Apr-2018 13:59:39] WARNING: [pool myserver] child 15022 said into stderr: "/usr/bin/dvips: DVI file can't be opened: /var/www/vhosts/myserver/moodledata/temp/latex/e69143ddfa742e68a3054818b2ac2053.dvi: No such file or directory"

I apreciate any hint. Thanks a lot!

PS If someone knows a better way to get musical notation into moodle without exporting graphics from notation software like musescore, please let me know.
Average of ratings: -
In reply to Benjamin Weyel

Re: tex-notation for musical notation?

by Justin Hunt -
Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi Benjamin 

I am not sure why I did this. It just looked interesting, so I made a little music display thing for Moodle just now.

The attached bundle is a Generico template that will display ABC notated text as a music score. I used the abc.js code from here: https://abcjs.net 

Actually its fantastic what that code does. I couldn't believe how simple it was to use. With a bit more work it will also play the midi file.

Anyway you surround the abc formatted text with the generico tags:
{GENERICO:type=abcjs} and {GENERICO:type=abcjs_end}

Then when displayed, the Generico filter will call abc js and put music in place of the formatted text.

ie 

It was my first attempt and I know nothing about music. But perhaps you can use it. You will need to read up on the Generico filter. And I notice it only renders one score per page. So I think you might need to do a bit of work on it. Maybe its useful.

Average of ratings: Useful (5)