Questions answered by this recipe
How can I create abc tune collections and have tunes displayed as score and midi player?
The enclosed templates and system pages will give you the possibility to create multiple tune books. Much can be done to enhance the system so far developed. I am looking for other developers to join me in this project.
The zip file contains three wiki pages set up already for a group 'Tunebook'. Each wiki group destined to become a tunebook needs these three pages, so copy and rename as necessary. The page Site.FoxAbcTemplates is included and serves the form templates for the three tunebook system pages (NewTune, HomePage, GroupHeader).
Once satisfied, click the 'Save' button, and the tune gets saved on a new page in the group. The tune's title is used to create the page name. The tune will show up in the index on the group HomePage.
Each tune is saved on a separate page as abc notation. The score image and midi version is not stored, not even temporarily. Each tune page holds the tune abc in an anchored section #abc to #abcend. This can be accessed as a PTV named
Adding more Tunebook groups
Wiki page groups can be created as tunebooks: Copy the contents of Tunebook/HomePage Tunebook/NewTune and Tunebook/GroupHeader to pages with same name in each the additional tunebook group. Add the group name to config as an item of $AbcTunebooks array, like for instance for a group named 'ScottishTunes':
$AbcTunebooks = 'ScottishTunes';
Importing abc tune collections
You can import raw text abc tune collections using the form on the ImportAbc page. Paste the raw text into the edit window, add a title for the page, and save it. The tunes will be re-indexed, and anchors added surrounding each tune. These make it possible to later open individual tunes for editing and instant abcjs preview. Text between tunes will be preserved.
You can also copy and paste the raw text into a wiki page using the standard edit window. The raw text will not be changed, but you cannot edit individual tunes.
If the page is in a tunebook group, it will display the tunes. If there are more than twenty tunes you'll see a list of links you can click to see the notation. If the collection gets pasted in a page which is not part of a tunebook group, add the directive
The rendering is pretty good for printing. The print display is set up so that only the score will get printed, and not the abc text or links in the page. If the skin is smart enough to suppress sidebar and site header the print output is good enough for use in your paper tune collections.
The forms and templates used by Fox and FoxEdit are located in Site.FoxAbcTemplates. The pagelist template for the index listing is stored on the tunebook HomePage. Edit the templates if you wish to add more custom fields to be stored alongside the abc notation, or want to modify the form layout etc.
The abcjs editor and plugin script could be used independently from using Fox or FoxEdit. In fact browsing a page with an abc tune in it does just that. The abctunebook.php script defines a markup for
which loads the abcjs plugin script, and puts the abc notation enclosed in it into a HTML 'pre' section, and avoiding PmWiki rendering of the notation.
If the recipe has multiple releases, then release notes can be placed here. Note that it's often easier for people to work with "release dates" instead of "version numbers".
See discussion at AbcTunebook-Talk