Melodeon.net Forums

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome to the new melodeon.net forum

Pages: [1] 2   Go Down

Author Topic: ABC notation - the next generation  (Read 9010 times)

0 Members and 1 Guest are viewing this topic.

Pete Dunk

  • Typo Expert
  • Hero Member
  • *****
  • Offline Offline
  • Posts: 3706
ABC notation - the next generation
« on: March 14, 2015, 01:47:04 PM »

First of all I would ask Theo to decide if this should be moved to another section of the forum, it contains no tunes so doesn't suit that forum and I don't see it as teaching and learning either as it's about a new development in a popular music notation language. Looking at the content of this post it probably belongs in the Geek Central forum but we don't have one!

A chap called Jean-Francois Moine has altered an existing abc tool called abcm2ps and created a new tool called abc2svg which is a rewrite of abcm2ps into Javascript, full details and downloads here.

Below is an abc file, copy the file to your clipboard and paste it into the editor window here then click 'Render the Tunes'. The interesting part for us is that it includes the ability to create a tab sheet, in this instance for banjo but it could just as easily be for melodeon.

Code: [Select]
%abc-2.1
% the style and defs must be on top of the ABC file

% glyph for percussion
%%beginsvg
<defs>
<use id="VoidWithX" xlink:href="pshhd"/>
</defs>
%%endsvg

% glyphs for banjo
%%beginsvg
<style type="text/css">
.bf {font-family:sans-serif; font-style:italic; font-size:8px}
</style>
<defs>
<g id="zero" class="bf">
<rect x="-4" y="0" width="6" height="5" fill="white"/>
<text x="-3" y="3">0</text>
</g>
<g id="one" class="bf">
<rect x="-4" y="0" width="6" height="5" fill="white"/>
<text x="-3" y="3">1</text>
</g>
<g id="two" class="bf">
<rect x="-4" y="0" width="6" height="5" fill="white"/>
<text x="-3" y="3">2</text>
</g>
<g id="three" class="bf">
<rect x="-4" y="0" width="6" height="5" fill="white"/>
<text x="-3" y="3">3</text>
</g>
</defs>
%%endsvg

% glyphs for shape
%%beginsvg
<defs>
<path id="DiamondBlack" class="fill"
d="M0 -3l4.2 3.2 -4.2 3.2 -4.2 -3.2z"/>
<path id="DiamondWhite" class="stroke" style="stroke-width:1.1"
d="M0 -3l4.2 3.2 -4.2 3.2 -4.2 -3.2z"/>
</defs>
%%endsvg

X:1
T:Percussion - old/new abcm2ps definitions
M:9/8
L:1/8
%
% only 2 heads: pshhd (x) pfthd (xo)
k:olddrum ^c heads=pshhd print=c
k:olddrum A print=A
%
%%staves (1 2) (3 4)
K:C
% %transpose cd
%%text old definition
V:1 clef=perc
%%stafflines 1
[K:none]^c3^c3^c^c^c|^c3^c3^c^c^c|
V:2 clef=perc %stafflines=1
[K:none]A3A3A3|A6A3|
%%text new definition
V:3 clef=bass map=olddrum %transpose=no octave=-2
%%stafflines 1
[K:none]^c3^c3^c^c^c|^c3^c3^c^c^c|
V:4 clef=bass map=olddrum %transpose=no octave=-2
[K:none]A3A3A3|A6A3|

X:2
T:abcMIDI compatible percussion
M:4/4
L:1/4
%
k:drum ^A, heads=VoidWithX print=g % Hi-Hat
k:drum D, print=c % Snare
k:drum C, print=F % Bass drum
%
K:none clef=perc
%%score (1 2)
V:1 map=drum
%%MIDI channel 10
^A,/^A,/[^A,D,]/^A,/ ^A,/^A,/[^A,D,]/^A,/ |
V:2 map=drum
%%MIDI channel 10
C,xC,x|

X:3
T:Note shapes
M:3/4
L:1/4
%
k:shape ^c' heads=DiamondBlack,DiamondWhite
k:shape e' heads=DiamondBlack,DiamondWhite
k:shape =e' heads=DiamondBlack,DiamondWhite
k:shape =g' heads=DiamondBlack,DiamondWhite
k:shape d'' heads=DiamondBlack,DiamondWhite
%
K:C map=shape
!tenuto!_e.=e'/e'/ .C/.B/|._b/z/!tenuto!^c'2|\
z/!tenuto!d''/ !tenuto!A/^g/ z/=g'|

X:4
T:Banjo tablature
T:(Blue Moon Of Kentucky)
M:4/4
L:1/4
%
k:banjo D print=G heads=zero
k:banjo E print=G heads=two
k:banjo G print=B heads=zero
k:banjo A print=B heads=two
k:banjo B print=d heads=zero
k:banjo c print=d heads=one
k:banjo ^c print=d heads=two
k:banjo ^^c print=d heads=three
k:banjo d print=f heads=zero
k:banjo e print=f heads=two
k:banjo g print=E heads=zero
%
K:C
%%staves 1 2
V:1
%%clef treble-8
%%staffscale 0.8
z[Bg][cg][^cg]|:^c/[dd]/ g/d/ d/g/ d/d/|B/d/ B/d/ A/d/ G/d/|
V:2 map=banjo
K:none
M:none
%%clef none
%%staffscale 1.7
%%flatbeams true
%%stemdir down
z[Bg][cg][^cg]|:^c/[^^cd]/ g/^^c/ d/g/ ^^c/d/|B/d/ B/d/ A/d/ G/d/|
V:1
E/c/ G/d/ g/G/ d/g/|G/e/ g/G/ e/G/ E/e/|D/d/ g/G/ d/g/ B/d/|
V:2
E/c/ G/d/ g/G/ d/g/|G/e/ g/G/ e/G/ E/e/|D/d/ g/G/ d/g/ B/d/|

X:5
T:color
M:C
L:1/4
%
k:color C color=red
k:color E color=green
k:color G color=blue
%
K:C map=color
CDEF | GABc | [CGd]4 |
Logged
Squeezing on the Isle of Oxney, UK
Primo (Serenellini) D/G
Isis D/G
Hohner B/E, G/C, C/F, Bb/Eb G/C/F
Liliputs D/G (G scale), C/F, Bb/Eb, Albrecht Custom D/G (G scale)

Anahata

  • This mind intentionally left blank
  • Hero Member
  • *****
  • Offline Offline
  • Posts: 6767
  • Oakwood D/G, C/F Club, 1-rows in C,D,G
    • Treewind Music
Re: ABC notation - the next generation
« Reply #1 on: March 14, 2015, 02:17:12 PM »

A chap called Jean-Francois Moine has altered an existing abc tool called abcm2ps and created a new tool called abc2svg
As well he might: he also wrote the original abcm2ps program.

Quote
which is a rewrite of abcm2ps into Javascript, full details and downloads here.
The fact that it's in Javascript going to be useful for anyone who want to put an ABC rendered on their web site and can't install abcm2ps and related tools on the server itself.

That fact that it can create SVG isn't such an innovation: admittedly I only learned this recently, but abcm2ps already has an option to produce SVG output, which is a nicer format for displaying on the web. (though it's not yet an allowable file type to upload here on melnet)

Quote
Below is an abc file
That contains a lot of notation that I have never seen before in ABC. I'm not a top tier ABC geek - Are all those style, SVG definitions and drum notation part of the ABC standard, or are they related to new stuff that only abc2svg can do?

Quote
copy the file to your clipboard and paste it into the editor window here then click 'Render the Tunes'.
I found I had to save the file, then reload it, or the "Render" button did nothing. In case anyone else is trying it...
Logged
Слава Україні !
Music recording and web hosting: www.treewind.co.uk
Mary Humphreys and Anahata: www.maryanahata.co.uk
Ceilidh band: www.barleycoteband.co.uk

Pete Dunk

  • Typo Expert
  • Hero Member
  • *****
  • Offline Offline
  • Posts: 3706
Re: ABC notation - the next generation
« Reply #2 on: March 14, 2015, 02:53:08 PM »

That contains a lot of notation that I have never seen before in ABC. I'm not a top tier ABC geek - Are all those style, SVG definitions and drum notation part of the ABC standard, or are they related to new stuff that only abc2svg can do?

Easy ABC opened the file but didn't know what to do with most of it so I think a lot of it is part of the ongoing ABC Plus project and Jean-Francois knocked up a rough version of abc2svg to illustrate a point about what is possible. It may never be fully implemented or it may go on to become a major new development. Perhaps you should join the Yahoo discussion group if only to keep abreast of what is being mooted. Percussion is already catered for in abc by the clef=perc statement btw, I think it's done quite differently in this file to add a degree of finesse although percussion is in a dusty corner of ABC that I've never explored.

Quote
I found I had to save the file, then reload it, or the "Render" button did nothing. In case anyone else is trying it...
I didn't need to save the file for the converter to work so I don't know what happened there!
Logged
Squeezing on the Isle of Oxney, UK
Primo (Serenellini) D/G
Isis D/G
Hohner B/E, G/C, C/F, Bb/Eb G/C/F
Liliputs D/G (G scale), C/F, Bb/Eb, Albrecht Custom D/G (G scale)

syale

  • The Terrier
  • Hero Member
  • *****
  • Offline Offline
  • Posts: 711
  • When will this MADness stop?
Re: ABC notation - the next generation
« Reply #3 on: March 14, 2015, 02:54:52 PM »

copy the file to your clipboard and paste it into the editor window here then click 'Render the Tunes'.
I found I had to save the file, then reload it, or the "Render" button did nothing. In case anyone else is trying it...

It would not work for me in Chrome but worked OK in IE 11, maybe it is the way Java is installed.
Interesting for the tab notation though. Having just started dabbling with a mountain dulcimer it would be great for me.
Logged
HA114 C/G/A/D, 2915 G/C. Liliput, Club IIB C/F Dino Baffetti Modell 22 B Twitter: @syale

ChrisP

  • Respected Sage
  • ****
  • Offline Offline
  • Posts: 279
  • West Yorkshire, UK
    • Chris Partington
Re: ABC notation - the next generation
« Reply #4 on: March 14, 2015, 03:33:01 PM »

Early days on this particular development I believe. Don't hold your breath as they have to finesse it before it goes feral. They were arguing about the best way to treat percussion scores when a bystander pointed out that one of the solutions would also work for Tabs. That was only about a week ago and "Jef" has already started implementing it his way and "Alex" a completely different way, so I think there has to be a ritual scrap before it is agreed upon.
Folk may not be aware that ABC has been developing quite fast in relative terms over the last couple of years, after a decade of anarchy regarding standards. There is now an official ABC 2.1, at last satisfactorily resolving, amongst many other things, over a decade's-worth of debate and disagreement regarding voices and clefs.
An imminent next standard, about to be finalized, is proper support for all sorts of transposition problems, hitherto only addressed partially. Although perhaps of limited apparent interest to most of us, these improvements will make ABC much more of a universal tool with far greater transportability into and between major commercial music programs, and will make it very useful in the digital world.

Jack Campin

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 764
    • Jack Campin's Home Page
Re: ABC notation - the next generation
« Reply #5 on: March 14, 2015, 09:50:59 PM »

Moine has a long track record of messing ABC about so it becomes a notation for representing staff notation, rather than a notation for representing music.

When the only semantics you can give for an ABC construct is graphical squiggles, you've lost it.
Logged
http://www.campin.me.uk/

I can't figure out how to quit but I will no longer check this group and have deleted all shortcuts to it.

Pete Dunk

  • Typo Expert
  • Hero Member
  • *****
  • Offline Offline
  • Posts: 3706
Re: ABC notation - the next generation
« Reply #6 on: March 14, 2015, 10:34:10 PM »

Moine has a long track record of messing ABC about so it becomes a notation for representing staff notation, rather than a notation for representing music.

I'm quite baffled by this statement to be honest, would you care enlarge upon your comment in a manner comprehensible to those of us that read music at a basic to intermediate level?
Logged
Squeezing on the Isle of Oxney, UK
Primo (Serenellini) D/G
Isis D/G
Hohner B/E, G/C, C/F, Bb/Eb G/C/F
Liliputs D/G (G scale), C/F, Bb/Eb, Albrecht Custom D/G (G scale)

Pete Dunk

  • Typo Expert
  • Hero Member
  • *****
  • Offline Offline
  • Posts: 3706
Re: ABC notation - the next generation
« Reply #7 on: March 14, 2015, 10:53:08 PM »

Moine has a long track record of messing ABC about so it becomes a notation for representing staff notation, rather than a notation for representing music.

I would also welcome your comments on the subject of button accordion tablature, this being a forum for players of the melodeon you understand.
Logged
Squeezing on the Isle of Oxney, UK
Primo (Serenellini) D/G
Isis D/G
Hohner B/E, G/C, C/F, Bb/Eb G/C/F
Liliputs D/G (G scale), C/F, Bb/Eb, Albrecht Custom D/G (G scale)

Jack Campin

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 764
    • Jack Campin's Home Page
Re: ABC notation - the next generation
« Reply #8 on: March 14, 2015, 11:06:44 PM »

How would you translate most of Moine's extensions into MIDI?

It doesn't help that development of ABC to MIDI translators is close to moribund, but creating constructs that can't be feasibly translated into sound doesn't make it easy for people trying to write them.
Logged
http://www.campin.me.uk/

I can't figure out how to quit but I will no longer check this group and have deleted all shortcuts to it.

Pete Dunk

  • Typo Expert
  • Hero Member
  • *****
  • Offline Offline
  • Posts: 3706
Re: ABC notation - the next generation
« Reply #9 on: March 14, 2015, 11:29:56 PM »

How would you translate most of Moine's extensions into MIDI?

I wouldn't, I'm a user of ABC not a programmer or developer of the language.

Quote
It doesn't help that development of ABC to MIDI translators is close to moribund, but creating constructs that can't be feasibly translated into sound doesn't make it easy for people trying to write them.

Again I am only a final user and basic transcriber of ABC at staff notation level so your issues with the way ABC develops belong elsewhere, in geekland.
Logged
Squeezing on the Isle of Oxney, UK
Primo (Serenellini) D/G
Isis D/G
Hohner B/E, G/C, C/F, Bb/Eb G/C/F
Liliputs D/G (G scale), C/F, Bb/Eb, Albrecht Custom D/G (G scale)

Jack Campin

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 764
    • Jack Campin's Home Page
Re: ABC notation - the next generation
« Reply #10 on: March 14, 2015, 11:59:20 PM »

Don't you ever listen to the ABC you write?
Logged
http://www.campin.me.uk/

I can't figure out how to quit but I will no longer check this group and have deleted all shortcuts to it.

Andrew Wigglesworth

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 1101
  • 07
    • My website
Re: ABC notation - the next generation
« Reply #11 on: March 15, 2015, 12:33:11 AM »

I think there's a bit of confusion in this thread.  This is not a development of ABC itself but of a way of taking the information in an ABC file and rendering it in another format.

Therefore, a programme that that interprets ABC files and plays them etc. will not understand an svg file any more than it would a jpg image.

Rewriting the interpreter in javascript will be useful to some people (nice) and the svg output ( https://en.wikipedia.org/wiki/Scalable_Vector_Graphics ) will undoubtedly be useful to some people (nice also).

Andrew Wigglesworth

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 1101
  • 07
    • My website
Re: ABC notation - the next generation
« Reply #12 on: March 15, 2015, 12:43:10 AM »

copy the file to your clipboard and paste it into the editor window here then click 'Render the Tunes'.
I found I had to save the file, then reload it, or the "Render" button did nothing. In case anyone else is trying it...

It would not work for me in Chrome but worked OK in IE 11, maybe it is the way Java is installed.
Interesting for the tab notation though. Having just started dabbling with a mountain dulcimer it would be great for me.

Java =! Javascript

Despite the similarity in names, these two progamming languages are *not* the same or particularly closely related as languages. Therefore, the installation of a Java virtual machine (interpreter) on your computer will have no (zero) effect upon how your web browser deals with Javascript (which will be dealt with inside the browser itself anyway).

Different browsers have different implementations of Javascript, and have different bugs and capabilities. You've simply uncovered some bug in Chrome or a non-standard way that IE 11 works, or that one implementation has some quirk or difference. Javascript can be a nuisance like that.

Chris Ryall

  • "doc 3-row"
  • French Interpreter
  • Hero Member
  • *****
  • Offline Offline
  • Posts: 11153
  • Wirral UK
    • Chris Ryall
Re: ABC notation - the next generation
« Reply #13 on: March 15, 2015, 10:50:51 AM »

[geek] When I read for a computing masters 35 years ago (primitive stuff, but we had email! ;)) the first thing my supervisor banged into me was "Chris, implementation doesn't matter" - it has generally proved true.

JS can do all this, it even does classes, and now (last year) HTML5 is official … giving easy vector graphic (dots), methods, sound samples (notes) and even storage of a couple of megabytes on your machine.

Shrewd move in my view; some don't like java [\geek]
« Last Edit: March 15, 2015, 10:55:02 AM by Chris Ryall »
Logged
  _       _    _      _ 

TomB-R

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 598
Re: ABC notation - the next generation
« Reply #14 on: March 15, 2015, 10:53:11 AM »

Moine has a long track record of messing ABC about so it becomes a notation for representing staff notation, rather than a notation for representing music.

I'm quite baffled by this statement to be honest, would you care enlarge upon your comment in a manner comprehensible to those of us that read music at a basic to intermediate level?

At its heart, ABC is a quick and simple way of writing down a tune so that it can be easily read, and played, by a person, but can also be easily transferred to a computer as text. Either a person or a computer can turn that text into staff notation.

(In contrast, you could quickly write down five lines of a stave, and write "the dots" on that, but it's harder to turn that into something that a computer can understand.)

ABC can be "enhanced" so that it can be interpreted by a computer into more sophisticated notation, but the extras that are added to achieve that may mean that it becomes harder for a person to play the tune from the ABC. The ABC stops being a simple way of writing down a tune, and becomes "code" which is only useful to most musicians after it has been turned into notation or tablature by a computer.
Logged

Chris Ryall

  • "doc 3-row"
  • French Interpreter
  • Hero Member
  • *****
  • Offline Offline
  • Posts: 11153
  • Wirral UK
    • Chris Ryall
Re: ABC notation - the next generation
« Reply #15 on: March 15, 2015, 10:59:40 AM »

Tom, I'd say ABC is much more analogous to markup - like HTML is says "what" to do "where", with the musical extend of "when"

Yes, the extends eg - change key - render a G mixolydian instead of straight major - parallel tracked chords - are complications. But you don't have to use them, and most posts on music web sites don't seem to?
Logged
  _       _    _      _ 

Andrew Wigglesworth

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 1101
  • 07
    • My website
Re: ABC notation - the next generation
« Reply #16 on: March 15, 2015, 11:12:52 AM »

Tom, I'd say ABC is much more analogous to markup - like HTML is says "what" to do "where", with the musical extend of "when"

Yes, the extends eg - change key - render a G mixolydian instead of straight major - parallel tracked chords - are complications. But you don't have to use them, and most posts on music web sites don't seem to?

ABC is not markup, it is (or, rather, started out as) a notation system for writing simple folk tunes in text that can be shared on computers in text based conditions such as email.

TomB-R

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 598
Re: ABC notation - the next generation
« Reply #17 on: March 15, 2015, 11:34:54 AM »

Tom, I'd say ABC is much more analogous to markup - like HTML is says "what" to do "where", with the musical extend of "when"

Yes, the extends eg - change key - render a G mixolydian instead of straight major - parallel tracked chords - are complications. But you don't have to use them, and most posts on music web sites don't seem to?

ABC is not markup, it is (or, rather, started out as) a notation system for writing simple folk tunes in text that can be shared on computers in text based conditions such as email.

... and crucially remains readable as music by non-techy musicians.  The content of musical concepts is so high that I'd suggest you could give a tune in ABC to a musician ( who has some familiarity with staff notation,) who had never heard of or seen ABC with no further explanation, and they'd work out fairly quickly how to read it.

But this is aside from a branch of ABC that can also handle tablature. (Which gets very HTML like.)
Logged

Pete Dunk

  • Typo Expert
  • Hero Member
  • *****
  • Offline Offline
  • Posts: 3706
Re: ABC notation - the next generation
« Reply #18 on: March 15, 2015, 12:07:33 PM »

Don't you ever listen to the ABC you write?

Yes of course I do, it's my primary form of error trapping! I do lots of simple melody line only transcriptions but I also produce band music with individual parts and a full score for the conductor. For many of these I also generate individual and collective midi files. These midi files are then opened with a free programme called Anvil Studio which amongst other things is a midi editor and studio mixer. The parts are assigned different voices and spread across the stereo spectrum and I then save the enhanced midi file. Another free utility converts the midi file to mp3 which I then import into Audacity where it is normalised and treated to a little reverb the result is rather nicer than the bare midi file!

Copyright issues prevent me from sharing many of my transcriptions outside the group who paid for the music but here's one I adapted from a free music site (bass and tenor clef parts transposed to treble clef etc - we don't do clefs!). Hornpipe No.8
Logged
Squeezing on the Isle of Oxney, UK
Primo (Serenellini) D/G
Isis D/G
Hohner B/E, G/C, C/F, Bb/Eb G/C/F
Liliputs D/G (G scale), C/F, Bb/Eb, Albrecht Custom D/G (G scale)

Pete Dunk

  • Typo Expert
  • Hero Member
  • *****
  • Offline Offline
  • Posts: 3706
Re: ABC notation - the next generation
« Reply #19 on: March 15, 2015, 12:11:32 PM »

Here's the abc for Hornpipe No.8

Code: [Select]
X:101
T:Hornpipe No.8 (Water Music) Full Score
T:Full Score
C:Handel
M:3/2
L:1/8
V:1 nm=Treble-1 sname=T-1
V:2 nm=Treble-2 sname=T-2
V:3 nm=Baritone sname=Bar clef=treble-8 transpose=-12
V:4 nm=Bass sname=Bass clef=treble-8 transpose=-24
Q:1/2=110
%%barnumbers 0
K:F
V:1
|:a4 g2fe f2d2|c2BA B2BG ABc2|f4 e2dc d2f2|
b4 a2gf g2c2|a4 g2fe f2d2|c2BA B2BG ABc2|
F2d2- d2ef =B2G2|c2E2 d2=B2 c4::g4 e2dc f2g2|
a2A2- A2d2 _d2A2|bag2 agf2 gfe2|f2d2 A2G2 F2D2|
c4 _G=GA2 D2d2|Bcd2 G2g2 e2c2|g4 B4 A2GF|G2f2 c2e2 f4:|
V:2
L:1/4
|:c2 ec AB|F2 FE FG|A2 c2 Fc|
de f2 e2|c2 ec AB|F2 FE FG|
DA- AAGD| G3F E2::e2 GE ce|
fe FD EF|G/F/E Fd e/d/_d|=dA FE D2|
EA- A_G- GA|D3B =GE|CE FG CF|DB cB A2:|
V:3
L:1/4
|:F2c2 dB|AF GC FE|D2 A2 BA|
GC Fd cE|F2C2 DB|G2ED DD|
DF- FD GF|EC GG, C2::C2 cA BG|
FD- DB Ad|Gc FB GA|DF AA, D2|
A2D2_G2|=G2 BG c2|EC DE FA,|B,D CC F2:|
V:4
L:1/4
|:f2 g2 de|f2 de cc|d2 cf dc|
Bc cd eg|f2 g2 de|f2 dc cc|
Ge- ee d=B|G3G G2::c'2c2 c'b|
a2d2 Af|de cd Ge|dd d_d =df|
a2A2A2|G3d c2|c2B A/G/F2|B2 AG F2:|
Logged
Squeezing on the Isle of Oxney, UK
Primo (Serenellini) D/G
Isis D/G
Hohner B/E, G/C, C/F, Bb/Eb G/C/F
Liliputs D/G (G scale), C/F, Bb/Eb, Albrecht Custom D/G (G scale)
Pages: [1] 2   Go Up
 


Melodeon.net - (c) Theo Gibb; Clive Williams 2010. The access and use of this website and forum featuring these terms and conditions constitutes your acceptance of these terms and conditions.
SimplePortal 2.3.5 © 2008-2012, SimplePortal