abcjs: an in-browser abc renderer
Forum rules
Please see forum announcement for description and rules!
Please see forum announcement for description and rules!
abcjs: an in-browser abc renderer
Gregory Dyke and Paul Rosen are pleased to announce version 1.0 of abcjs.
Abcjs is an open source parsing and rendering tool for ABC written
entirely in javascript, so it allows sheet music to be rendered as both
standard notation and MIDI entirely with the browser.
Here are a couple ways to use this:
For rendering any ABC notation found on a web page as standard notation,
see http://drawthedots.com/abcplugin
For the simplest ABC editor in a web page, see http://drawthedots.com/abcjs
For a free on-line editor and tune storage website, see
http://drawthedots.com
Enjoy! And we'd appreciate feedback of all kinds.
Notes:
1) ABC 1.6 is mostly done, and many parts of ABC 2.0 are supported. We
are actively working on improving the rendering.
2) We know that the rendering in IE is not as pretty as Firefox, Safari,
and Chrome, but we're working it!
Abcjs is an open source parsing and rendering tool for ABC written
entirely in javascript, so it allows sheet music to be rendered as both
standard notation and MIDI entirely with the browser.
Here are a couple ways to use this:
For rendering any ABC notation found on a web page as standard notation,
see http://drawthedots.com/abcplugin
For the simplest ABC editor in a web page, see http://drawthedots.com/abcjs
For a free on-line editor and tune storage website, see
http://drawthedots.com
Enjoy! And we'd appreciate feedback of all kinds.
Notes:
1) ABC 1.6 is mostly done, and many parts of ABC 2.0 are supported. We
are actively working on improving the rendering.
2) We know that the rendering in IE is not as pretty as Firefox, Safari,
and Chrome, but we're working it!
- s1m0n
- Posts: 10069
- Joined: Wed Oct 06, 2004 12:17 am
- antispam: No
- Please enter the next number in sequence: 10
- Location: The Inside Passage
Re: abcjs: an in-browser abc renderer
Great idea
And now there was no doubt that the trees were really moving - moving in and out through one another as if in a complicated country dance. ('And I suppose,' thought Lucy, 'when trees dance, it must be a very, very country dance indeed.')
C.S. Lewis
C.S. Lewis
Re: abcjs: an in-browser abc renderer
Thanks to whoever moved this post . I couldn't figure where to put it since it is in no way specific to irish music. But I suppose here is as good as anywhere.
Greg
Greg
- I.D.10-t
- Posts: 7660
- Joined: Wed Dec 17, 2003 9:57 am
- antispam: No
- Location: Minneapolis, MN, USA, Earth
Re: abcjs: an in-browser abc renderer
I have not had much of a chance to play with it, but I like the instant revision and highlighting features (or what ever you would call them) It also seems tolerant of missing lines of information up top for quick jots of information.
Nice.
Nice.
"Be not deceived by the sweet words of proverbial philosophy. Sugar of lead is a poison."
Re: abcjs: an in-browser abc renderer
It's so nice to have a designated sorter about!
Picture a bright blue ball just spinning, spinning free
It's dizzying, the possibilities. Ashes, Ashes all fall down.
It's dizzying, the possibilities. Ashes, Ashes all fall down.
- hans
- Posts: 2259
- Joined: Fri Nov 01, 2002 6:00 pm
- antispam: No
- Please enter the next number in sequence: 8
- Tell us something.: I've been making whistles since 2010 in my tiny workshop at my home. I've been playing whistle since teenage times.
- Location: Moray Firth, Scotland
- Contact:
Re: abcjs: an in-browser abc renderer
Thanks Tirno! This is an amazing and great piece of work!
It enables truly collaborative online tunebook creation and could revolutionize thesessionorg.
I've just created an add-on for PmWiki, which integrates abcjs with PmWiki and lets users create and edit tunebooks in the wiki, each tune saved as a wiki page, and each tunebook represented as a group of wiki pages. The project page is here:
http://www.pmwiki.org/wiki/Cookbook/AbcTunebook
Playing with editing and displaying tunes I found this discrepancy: the abcjs editor script will render a tune even if there is no X: field in the abc, but the abcjs plugin script will refuse to render such abc. This leads to a possible confusion when an editor creates an abc without X: field, which show fine, then saves it and finds that no score is shown on the page because of the missing X: field.
Personally I'd like to see that a missing X: field still renders as score in both editor and plugin. I don't see much use for index numbering with just one tune per page.
Another tech question: The demo page HTML shows several divs for canvas0, canvas1, canvas2 and canvas3. It looks only the first is used. Why the others?
Cheers,
Hans
It enables truly collaborative online tunebook creation and could revolutionize thesessionorg.
I've just created an add-on for PmWiki, which integrates abcjs with PmWiki and lets users create and edit tunebooks in the wiki, each tune saved as a wiki page, and each tunebook represented as a group of wiki pages. The project page is here:
http://www.pmwiki.org/wiki/Cookbook/AbcTunebook
Playing with editing and displaying tunes I found this discrepancy: the abcjs editor script will render a tune even if there is no X: field in the abc, but the abcjs plugin script will refuse to render such abc. This leads to a possible confusion when an editor creates an abc without X: field, which show fine, then saves it and finds that no score is shown on the page because of the missing X: field.
Personally I'd like to see that a missing X: field still renders as score in both editor and plugin. I don't see much use for index numbering with just one tune per page.
Another tech question: The demo page HTML shows several divs for canvas0, canvas1, canvas2 and canvas3. It looks only the first is used. Why the others?
Cheers,
Hans
- hans
- Posts: 2259
- Joined: Fri Nov 01, 2002 6:00 pm
- antispam: No
- Please enter the next number in sequence: 8
- Tell us something.: I've been making whistles since 2010 in my tiny workshop at my home. I've been playing whistle since teenage times.
- Location: Moray Firth, Scotland
- Contact:
Re: abcjs: an in-browser abc renderer
another thing:
when a tune is written in parts A and B like
abcd|efga:|
agfe|dcba:|
the player will play AABAB instead of AABB, i.e the second (part B) repeat will start at the beginning, not at the beginning of part B.
I can force it to repeat correctly with
abcd|efga:|
|:agfe|dcba:|
but the starting |: should not be necessary IMO.
great fun editing with abcjs!
when a tune is written in parts A and B like
abcd|efga:|
agfe|dcba:|
the player will play AABAB instead of AABB, i.e the second (part B) repeat will start at the beginning, not at the beginning of part B.
I can force it to repeat correctly with
abcd|efga:|
|:agfe|dcba:|
but the starting |: should not be necessary IMO.
great fun editing with abcjs!
Re: abcjs: an in-browser abc renderer
Hi hans.
The AbcTunebook add-on looks great. I have some friends at my session who just spent 2 weeks setting up a website which does precisely that, so I expect other people will like it.
I had never actually used abc_plugin in conjunction with abc_editor - although I've been planning to all along. In retrospect, that's a pretty obvious problem
The thing is, abc being text based, any text could be considered to be "abc with errors". I use the X: field to trigger that what follows is abc...
I don't know whether to add in the T: and K: (and maybe other) fields as triggers - I might end up trying to render perfectly normal text. Maybe I should also search for a special classname and use that to know that I should expect the contents to be abc? Ideas?
The midi bugs are fixed in minor release 1.0.1
Greg
The AbcTunebook add-on looks great. I have some friends at my session who just spent 2 weeks setting up a website which does precisely that, so I expect other people will like it.
I had never actually used abc_plugin in conjunction with abc_editor - although I've been planning to all along. In retrospect, that's a pretty obvious problem
The thing is, abc being text based, any text could be considered to be "abc with errors". I use the X: field to trigger that what follows is abc...
I don't know whether to add in the T: and K: (and maybe other) fields as triggers - I might end up trying to render perfectly normal text. Maybe I should also search for a special classname and use that to know that I should expect the contents to be abc? Ideas?
The midi bugs are fixed in minor release 1.0.1
Greg
- hans
- Posts: 2259
- Joined: Fri Nov 01, 2002 6:00 pm
- antispam: No
- Please enter the next number in sequence: 8
- Tell us something.: I've been making whistles since 2010 in my tiny workshop at my home. I've been playing whistle since teenage times.
- Location: Moray Firth, Scotland
- Contact:
Re: abcjs: an in-browser abc renderer
Yes, that sounds perfectly valid. But the abcjs_editor.js should then also demand an X: field, so there is no discrepancy.Tirno wrote: The thing is, abc being text based, any text could be considered to be "abc with errors". I use the X: field to trigger that what follows is abc...
In the PmWiki context: an X: field may be useful after all; one could generate a pagelist (tune list) sorted by the X: field values.
Cheers,
Hans
- hans
- Posts: 2259
- Joined: Fri Nov 01, 2002 6:00 pm
- antispam: No
- Please enter the next number in sequence: 8
- Tell us something.: I've been making whistles since 2010 in my tiny workshop at my home. I've been playing whistle since teenage times.
- Location: Moray Firth, Scotland
- Contact:
Re: abcjs: an in-browser abc renderer
Greg, I wonder if there is any css hook (class or id) I could use to suppress printing of the abc text when the page is rendered via abcjs_plugin. The abc text is in <pre> tags, but when I use a style class on these to suppress display when printing, I get no score displayed as well. I'd like to be able to use css so the score can get printed, without the abc text underneath.
thanks!
thanks!
- Cathy Wilde
- Posts: 5591
- Joined: Mon Oct 20, 2003 4:17 pm
- antispam: No
- Please enter the next number in sequence: 8
- Location: Somewhere Off-Topic, probably
Re: abcjs: an in-browser abc renderer
Thank you !!!!!!!!!!!!!!!!!!!! Really cool, and does indeed look A+ in FireFox for Mac.
The only thing I ran into right off was that the player seemed highly caffeinated, but that might have been the M: in the tune I was trying, or my QT plugin (though I couldn't figure out how to change it).
I'll go back and check.
I don't know why you guys did this, but I'm so grateful you did! Thanks again!
Deja Fu: The sense that somewhere, somehow, you've been kicked in the head exactly like this before.
Re: abcjs: an in-browser abc renderer
Good suggestion, hans - it will be included in the next release.
Cathy, glad you like it. The player does go kind of fast I suppose. You can always slow it down with the Q: field. Try Q:1/2=100 for a more relaxed rhythm
Cathy, glad you like it. The player does go kind of fast I suppose. You can always slow it down with the Q: field. Try Q:1/2=100 for a more relaxed rhythm
- hans
- Posts: 2259
- Joined: Fri Nov 01, 2002 6:00 pm
- antispam: No
- Please enter the next number in sequence: 8
- Tell us something.: I've been making whistles since 2010 in my tiny workshop at my home. I've been playing whistle since teenage times.
- Location: Moray Firth, Scotland
- Contact:
Re: abcjs: an in-browser abc renderer
Thanks Greg! It is not doing quite what I want but perhaps that is impossible? At least I can now create a page which shows the abc text, and a print-view page which does not show the text, just the score.
The abcjs editor gives options to use empty divs for "canvas", "music", "midi" and "warnings", and so let me achieve some layout control, and use css styling on the elements.
But the abcjs plugin does not give me those options. Could that be added? Then I would for instance be able to display the score above the text (the first release had that), and style the elements.
And I have a few more wishes:
I'd like to see (admin) options to set a variable for the default midi instrument used (first you used program 1 "bright piano", then changed to 2 "electric piano"), and to set a variable for basic speed (default baseduration, but without influencing any Q: field settings etc.).
Ideally a javascript control like a slider would also be cool, so users could control midi playback speed. But this is probably a lot of bother and a lot of code.
Hans
The abcjs editor gives options to use empty divs for "canvas", "music", "midi" and "warnings", and so let me achieve some layout control, and use css styling on the elements.
But the abcjs plugin does not give me those options. Could that be added? Then I would for instance be able to display the score above the text (the first release had that), and style the elements.
And I have a few more wishes:
I'd like to see (admin) options to set a variable for the default midi instrument used (first you used program 1 "bright piano", then changed to 2 "electric piano"), and to set a variable for basic speed (default baseduration, but without influencing any Q: field settings etc.).
Ideally a javascript control like a slider would also be cool, so users could control midi playback speed. But this is probably a lot of bother and a lot of code.
Hans
- fiddlerwill
- Posts: 559
- Joined: Tue Jul 28, 2009 9:51 am
- antispam: No
- Please enter the next number in sequence: 8
- Tell us something.: I play traditional Irish and Scottish music.
"The beginner should approach style warily, realizing that it is an expression of self, and should turn resolutely away from all devices that are popularly believed to indicate style — all mannerisms, tricks, adornments. The approach to style is by way of plainness, simplicity, orderliness, sincerity." - Location: Miltown Malbay
Re: abcjs: an in-browser abc renderer
Thanks, thats very usefull. bookmarked!
The mind is like a parachute; it only works when it is open.
Heres a few tunes round a table, first three sets;
http://soundcloud.com/fiddlerwill/werty
http://soundcloud.com/fiddlerwill/jigs-willie
http://soundcloud.com/fiddlerwill/jigs
Heres a few tunes round a table, first three sets;
http://soundcloud.com/fiddlerwill/werty
http://soundcloud.com/fiddlerwill/jigs-willie
http://soundcloud.com/fiddlerwill/jigs
- hans
- Posts: 2259
- Joined: Fri Nov 01, 2002 6:00 pm
- antispam: No
- Please enter the next number in sequence: 8
- Tell us something.: I've been making whistles since 2010 in my tiny workshop at my home. I've been playing whistle since teenage times.
- Location: Moray Firth, Scotland
- Contact:
Re: abcjs: an in-browser abc renderer
Thanks Greg for letting me check out the latest bells and whistles!
I've set up a demo tunebook wiki here:
http://softflow.org/music/Tunebook/HomePage
You can test adding and editing tunes.
Each tune is stored on its own page, and it prints nicely.
The tunebook is set up as one group of wiki pages,
but one could expand this and have any number of tunebooks on the same wiki site.
As it is a wiki, it would be perfect for collaborative tune collections. Notes and comments could be added to the tune page, and other media included, like mp3 files in embedded players, videos etc.
I may bolt on a wiki commenting module for easy adding of comments.
[and yes, it is tune books, not tunebooks!]
cheers
I've set up a demo tunebook wiki here:
http://softflow.org/music/Tunebook/HomePage
You can test adding and editing tunes.
Each tune is stored on its own page, and it prints nicely.
The tunebook is set up as one group of wiki pages,
but one could expand this and have any number of tunebooks on the same wiki site.
As it is a wiki, it would be perfect for collaborative tune collections. Notes and comments could be added to the tune page, and other media included, like mp3 files in embedded players, videos etc.
I may bolt on a wiki commenting module for easy adding of comments.
[and yes, it is tune books, not tunebooks!]
cheers