abc4mac 0.9 README

NOTE:

Keep checking at the abc4mac home page

http://www.geocities.com/Nashville/7088/abc4mac.html

for updates.

INTRODUCTION
abc4mac is a program to process abc files on the Macintosh.  The original
development of abc was carried out by Chris Walshaw, who maintains
an abc home page at:

http://www.gre.ac.uk/~c.walshaw/abc/
 
FINDING ABC FILES
More abc files are available at the Ceolas celtic music archive:

http://www.ceolas.org/ceolas.html

They are also commonly exchanged on various mailing lists, including
IRTRAD-L
FIDDLE-L
cittern-l

If you have a particular tune in mind, you can probably find it in the
web-wide tune index, at


http://www.gre.ac.uk/~c.walshaw/abc/index/wwabc.html

ABOUT THIS SOFTWARE
This software was developed as a quick-and-dirty port of James Allwright's 
abc2midi version 1.7.9, which can be found at:

http://perun.hscs.wmin.ac.uk/~jra/abcMIDI/

combined with Michael Methfessel's abc2ps version 1.3.3,  found at:

http://www.ihp-ffo.de/~msm/

under DropShell to produce a drag-n-dropinterface.   I have done a certain
amount of testing (more on version 0.9 than on any previous versions),
but I am sure there are more bugs lurking - let me know if you find
one.

I have included the documentation for abc2ps and abc2midi with this
release.  One day when I have nothing better to do I will document
this package better...

GETTING STARTED
Drag an abc file (or files) onto the abc4mac icon and you will get:
 
 o a midi file for each tune in the abc file.
 o a single postscript file that contains all the tunes in the file.

For example, if myTunes.abc contains two tunes, the files that will
be produced are:

myTunes1.mid - MIDI for the first tune
myTunes2.mid - MIDI for the second tune
myTunes.ps     - PostScript for the whole thing

PLAYING MIDI FILES
The MIDI files produced can be played by MoviePlayer, if you have
a sufficiently recent version of MacOS and QuickTime 2.5 or better.
Open the midi file from inside SimpleText or MoviePlayer - it will
automatically convert the file into a 'movie' that can be played.
(MoviePlayer can even play it backwards...!)  


Sparkle (an MPEG player) can also play these midi files - (so can MS Word).

MIDI files can be also be played by more sophisticated midi packages such as the 
shareware:

 o Arnold's Midi Player (simple, easy to use) , 
 o MIDIGraphy (a little more complicated, but it lets you modify as well 
   as play the file, as well as looping a selection so you can learn
   the tricky bits).

Both of these and more are available on the Web at:

http://harmony-central.mit.edu/Software/Mac/

VIEWING AND PRINTING POSTSCRIPT
To print the PostScript files on a PostScript printer use a utility such as
Drop¥PS, 

Drop*PS is available at

http://www.barebones.com


You can view the file on your screen with GhostView.   If you double-click
on a PostScript file generated by abc4mac, GhostView will be started if possible.
Ghostview 5.5 is the most recent version at this writing.


Look at:

http://www.glyphic.com  

for more information.   Note that GhostScript requires at least 4 Mb of  memory
 [better use 8, at least], and roughly 5 Mb of disk space, so you need a fair bit of  
resources.  GhostView can also be used to produce bit-mapped output that can be
printed on a QuickDraw printer, if you have sufficient memory, or a PDF file that can
be printed pretty well anywhere.

GDT Softworks has a package called StyleScript that apparently supports
true Level 2 PostScript on Apple, HP and Epson printers: I don't have any
first hand knowledge (anybody who does, please email me at wil@syndesis.com
and I will included it here. See:

http://www.gdt.com/stylescript/
 
for information.

Command lines for abc2ps and abcmidi (not for the faint of heart)

The preferences menu has an option to set a command line that will be 
passed to abc2ps or abcmidi.   These command lines use the same
options as those described in the documentation for abc2ps and
abcmidi (included with this release).  abc4mac _always_ passes the
selected abc file name as the first item on the command line, so if the 
abc2ps documentation, for example, says to use

abc2ps myfile.abc -o -O =

then you need to enter in the command line field the magic string 

-o -O =

to make abc4mac do the same thing.   The defaults, which you can always 
recover by pushing the reset button on the command line menu, are to
process the entire file, and create an output file with the same name
and the .ps extension. (This is, in fact the magic string -o -O =).

To set the default page size to A4 paper, check the appropriate option 
in the preferences menu.  Note that page size can be overridden by format
files or directives in the file.

Restrictions and bugs:
  - abc2ps format files (.fmt) have to reside in the same directory as the abc
    file being processed.
 
  - abc2ps and abcmidi have parsers that have slightly different behaviour
    in some cases.  In particular, the some of the abc2ps sample files produce 
    valid output that doesn't make 'musical sense' - the MIDI processor
    complains.  

  - abc2ps allows nested slurs - abcmidi does not
  - abc2ps allows ties across bar lines - abcmidi does not
  - abc2ps allows in-line key changes and bass clefs, not so for abcmidi

  - If you run abc4mac interactively by double-clicking on the application icon,
    you will not be able to switch to another application until you have processed
    the first file.
  
 - abc4mac always puts the output files (.mid and .ps) in the same directory as
    the input files
 
  - non-PostScript printers are not directly supported (except see above).

Comments and queries should be directed to Wil Macaulay (wil@syndesis.com)

ABC DESCRIBED
[This is Chris Walshaw's description of abc2mtex version 1.5.  It is probably the
closest thing to 'standard' abc that exists. ]

I have created this description of abc notation for those who  do
not  want to (or cannot) use the package abc2mtex but who wish to
understand the notation. It has been generated semi-automatically
from  the  abc2mtex userguide and so occasionally refers to other
parts of the package. In particular,  it  mentions  the  document
index.tex,  a  guide to using abc2mtex for archiving and indexing
tunes, and to the example files  Xenglish.abc,  Xstrspys.abc  and
Xreels.abc.  It  also  refers  to playabc, a separate package for
playing abc tunes through the speaker of various machines. It  is
best  read  in  conjunction  with an introduction to abc notation
available by anonymous ftp from

        celtic.stanford.edu/pub/tunes/abc2mtex/INTRO.txt

or, if you have WWW access,

        http://celtic.stanford.edu/pub/tunes/abc2mtex/INTRO.html

Note that if you are intending to use  the  notation  solely  for
transcribing  tunes,  you  can  ignore most of description of the
information fields as all you really need are the  T  (title),  M
(meter),  K (key), and possibly L (default note length) fields. I
have included a full description however, for those who  wish  to
understand tunes transcribed by users of the package.

Finally, the notation can easily be  expanded  to  include  other
musical symbols. Please mail me with any suggestions.

        Chris Walshaw
        C.Walshaw@gre.ac.uk

-----------------------------------------------------------------

        The abc Notation System
        =======================

Each tune consists of a header and a body. The header,  which  is
composed of information fields, should start with an X (reference
number) field followed by a T (title) field and finish with  a  K
(key)  field.  The body of the tune in abc notation should follow
immediately after. Tunes are separated by blank lines.

  Information fields
  ==================

The  information  fields  are  used  to  notate  things  such  as
composer,  meter, etc. in fact anything that isn't music. Most of
the information fields are for use within a tune  header  but  in
addition  some  may be used in the tune body, or elsewhere in the
tune file. Those which are allowed elsewhere can be used  to  set
up  a  default  for  the whole or part of a file. For example, in
exactly the same way that tunebooks are organised, a  file  might
start  with  M:6/8 and R:Jigs, followed by some jigs, followed by
M:4/4 and R:Reels, followed by  some  reels.  Tunes  within  each
section then inherit the M: and R: fields automatically, although
they can be overridden inside a tune header.

By far the best way to find out how to use the fields is to  look
at  the  example  files  (in particular Xenglish.abc) and try out
some examples. Thus rather than describing them in  detail,  they
are  summarised  in  the  following  table. The second, third and
fourth columns specify respectively how the field should be  used
in  the  header and whether it may used in tune body or elsewhere
in the file. Certain fields do not affect the typeset  music  but
are  there for other reasons, and the fifth column reflects this;
index fields only affect the index (see index.tex) while  archive
fields  do not affect the output at all, but are just provided to
put in information that one might find in,  say,  a  conventional
tunebook.

Field name            header   tune elsewhere Used by Examples and notes
==========            ======   ==== ========= ======= ==================
A:area                optional                        A:Donegal, A:Bampton
B:book                optional      yes       archive B:O'Neills
C:composer            optional                        C:Trad.
D:discography         optional                archive D:Chieftans IV
E:elemskip            optional yes                    see Line Breaking
F:file name                         yes               see index.tex
G:group               optional      yes       archive G:flute
H:history             optional      yes       archive H:This tune said to ...
I:information         optional      yes       playabc
K:key                 last     yes                    K:G, K:Dm, K:AMix
L:default note length optional yes                    L:1/4, L:1/8
M:meter               optional yes  yes               M:3/4, M:4/4
N:notes               optional                        N:see also O'Neills - 234
O:origin              optional      yes       index   O:I, O:Irish, O:English
P:parts               optional yes                    P:ABAC, P:A, P:B
Q:tempo               optional yes                    Q:200, Q:C2=200
R:rhythm              optional      yes       index   R:R, R:reel
S:source              optional                        S:collected in Brittany
T:title               second   yes                    T:Paddy O'Rafferty
W:words               no       yes                    W:Hey, the dusty miller
X:reference number    first                           X:1, X:2
Z:transcription note  optional                        Z:from photocopy

Some additional notes on certain of the fields:-

T - tune title. Some tunes have more than one title and  so  this
field  can  be used more than once per tune - the first time will
generate the title whilst  subsequent  usage  will  generate  the
alternatives  in  small  print.   The  T:  field can also be used
within a tune to name parts of a tune - in this  case  it  should
come before any key or meter changes.

K - key; apart from major and minor  keys,  e.g.   K:D  or  K:Am,
mixolydian  and  dorian  modes  can  also  be specified with, for
example K:AMix  or  K:EDor.  In  addition,  there  are  two  keys
specifically  for  notating  highland bagpipe tunes; K:HP doesn't
put a key signature on the music, as is  common  with  many  tune
books  of  this music, while K:Hp marks the stave with F sharp, C
sharp and G natural.  Both force all the beams and staffs  to  go
downwards.

L - default note length; i.e.  L:1/4  -  quarter  note,  L:1/8  -
eighth  note,  L:1/16  -  sixteenth,  L:1/32 - thirty-second. The
default note length is also set automatically by the meter  field
M: (see below).

M - meter; apart from the normal meters, e.g.   M:6/8  or  M:4/4,
the   symbols  M:C  and  M:C|  give  common  time  and  cut  time
respectively.

P - parts; can be used in the header to state the order in  which
the  tune parts are played, i.e.  P:ABABCDCD, and then inside the
tune to mark each part, i.e.  P:A or P:B.

Q - tempo; can be used to specify the notes per minute, e.g.   if
the  default  note length is an eighth note then Q:120 or Q:C=120
is 120 eighth notes per minute. Similarly  Q:C3=40  would  be  40
dotted  quarter  notes per minute.  An absolute tempo may also be
set,  e.g.  Q:1/8=120  is  also  120  eighth  notes  per  minute,
irrespective of the default note length.

G - group; to group together tunes for indexing purposes.

H - history; can be used for multi-line stories/anecdotes, all of
which will be ignored until the next field occurs.


  abc tune notation
  =================

The following letters are used to represent notes:-


                                                      d'
                                                -c'- ----
                                             b
                                        -a- --- ---- ----
                                       g
 ------------------------------------f-------------------
                                   e
 --------------------------------d-----------------------
                               c
 ----------------------------B---------------------------
                           A
 ------------------------G-------------------------------
                       F
 --------------------E-----------------------------------
                   D
 ---- ---- ---- -C-
            B,
 ---- -A,-
  G,

and by extension, the notes C, D, E, F, a' and b' are  available.
Notes can be modified in length (see below).

  Rests
  =====

Rests are generated with a z and can be  modified  in  length  in
exactly the same way as notes can (see below).

  Note lengths
  ============

NB Throughout this document I refer to note lengths as sixteenth,
eighth,  etc.  The commonly used equivalents are sixteenth note =
semi-quaver, eighth = quaver,  quarter  =  crotchet  and  half  =
minim.

Each meter automatically sets a default note length and a  single
letter in the range A-G, a-g will generate a note of this length.
For example, in 3/4 the default note length is an eighth note and
so  the  input  DEF  represents  3 eighth notes. The default note
length can be calculated by computing the meter as a decimal;  if
it  is  less than 0.75 the default is a sixteenth note, otherwise
it is an eighth note. For example, 2/4 = 0.5, so the default note
length is a sixteenth note, while 4/4 = 1.0 or 6/8 = 0.75, so the
default is an eighth note. Common time  and  cut  time  (M:C  and
M:C|) have an eighth note as default.

Notes of differing lengths can be obtained by  simply  putting  a
multiplier  after the letter. Thus in 2/4, A or A1 is a sixteenth
note, A2 an eighth note, A3 a dotted eighth note,  A4  a  quarter
note,  A6 a dotted quarter note, A7 a double dotted quarter note,
A8 a half note, A12 a dotted half note, A14 a double dotted  half
note,  A15  a triple dotted half note and so on, whilst in 3/4, A
is an eighth note, A2 a quarter note, A3 a dotted  quarter  note,
A4 a half note, ...

To get shorter notes, either divide them - e.g. in 3/4, A/2 is  a
sixteenth  note,  A/4  is  a  thirty-second  note - or change the
default note length with the L:  field.   Alternatively,  if  the
music has a broken rhythm, e.g. dotted eighth note/sixteenth note
pairs, use broken rhythm markers (see below).  Note  that  A/  is
shorthand for A/2.

  Broken Rhythms
  ==============

A common occurrence in traditional music is the use of  a  dotted
or broken rhythm. For example, hornpipes, strathspeys and certain
morris jigs all have dotted eighth notes  followed  by  sixteenth
notes  as  well  as  vice-versa  in  the  case of strathspeys. To
support this abc notation uses a > to mean `the previous note  is
dotted, the next note halved' and < to mean `the previous note is
halved, the next dotted'. Thus the following lines all  mean  the
same thing (the third version is recommended):

  L:1/16
  a3b cd3 a2b2c2d2

  L:1/8
  a3/2b/2 c/2d3/2 abcd

  L:1/8
  a>b c> means that the first  note  is  double
dotted and the second quartered and >>> means that the first note
is triple dotted and the length of the second divided  by  eight.
Similarly for << and <<<.

  Duplets, Triplets, Quadruplets, etc.
  ====================================

These can be simply coded with the notation (2ab  for  a  duplet,
(3abc  for  a triplet or (4abcd for a quadruplet, etc., up to (9.
The musical meanings are (so I'm told):


 (2 2 notes in the time of 3
 (3 3 notes in the time of 2
 (4 4 notes in the time of 3
 (5 5 notes in the time of n
 (6 6 notes in the time of 2
 (7 7 notes in the time of n
 (8 8 notes in the time of 3
 (9 9 notes in the time of n

If the time signature is compound (3/8, 6/8, 9/8, 3/4, etc.) then
n is three, otherwise n is two.

  Beams
  =====

To group notes together under one beam  they  should  be  grouped
together  without spaces in the tune file. Thus in 2/4, A2BC will
produce an eighth note followed by two sixteenth notes under  one
beam  whilst  A2  B  C will produce the same notes separated. The
beam slopes and the choice of upper or lower staffs are generated
automatically.

  Repeat/bar symbols
  ==================

The symbols | || :| |: and :: generate a bar  line,  double  bar,
left repeat, right repeat and left/right repeat respectively.


  First and Second Repeats
  ========================

First and second repeats can be generated with the symbols |1 and
:|2,  e.g.  faf gfe|1 dfe dBA:|2 d2e dcB||. The previous notation
[1 and [2 is still  supported  but  produces  slightly  different
output. N.B. With regard to spaces | [1 is legal, | 1 is not.

  Accidentals
  ===========

The symbols ^ = and _  are  used  (before  a  note)  to  generate
respectively a sharp, natural or flat.

  Changing key, meter, and default note length mid-tune
  =====================================================

To change key, meter, or default note length, simply put in a new
line with a K: M: or L: field, e.g.
  ed|cecA B2ed|cAcA E2ed|cecA B2ed|c2A2 A2:|
  K:G
  AB|cdec BcdB|ABAF GFE2|cdec BcdB|c2A2 A2:|

To do this without generating a new line of music, put a \ at the
end of the first line, i.e.
  E2E EFE|E2E EFG|\
  M:9/8
  A2G F2E D2||

  Ties and Slurs
  ==============

You can tie two notes together either across or within a bar with
a - symbol, e.g. abc-|cba or abc-cba.  More general slurs can now
be put in and are started and terminated with  an  s  before  the
relevant note.  Thus sDEFsG puts a slur over the four notes DEFG.

  Gracings
  ========

With regard to gracings, I fall in the  Irish  music  camp  which
says that you transcribe gracings as little as possible and leave
it up to the players to make their own interpretation.  Thus  the
only  gracing  I  tend to use is to put a tie/slur marker under a
note which will generally mean a roll, cran or staccato  triplet.
This is achieved by putting a ~ before the note.

However, to explicitly write out every grace note, just put  them
in  curly  braces,  {}.  For example, a taorluath on the Highland
pipes would be written {GdGe}. The tune  `Athol  Brose'  (in  the
file  Xstrspys.abc)  has  an  example  of  complex  Highland pipe
gracing in all its glory.

  Accents
  =======

Staccato marks (a small dot above or below the note head) can  be
generated  by  a  dot before the note, i.e. a staccato triplet is
written as (3.a.b.c

For fiddlers, the letters u and v can be used  to  denote  up-bow
and down-bow, e.g. vAuBvA

  Chords
  ======

Chords (i.e. more than one note head on a  single  stem)  can  be
coded  with  +  signs  around the notes, e.g. +CEGc+ produces the
chord  of  c  major.  They  can  be  grouped   in   beams,   e.g.
+d2f2++ce++df+, but note the use of two + symbols, one to end the
first chord and one to start the second. Note that the code which
handles  this  part  of the output is a bit sensitive and you may
need to fiddle around a bit with the order of the  notes  in  the
chord to get it looking right. See the tune `Kitchen Girl' in the
file Xreels.abc for a simple example.

  Guitar Chords
  =============

Guitar chords can be put in under the melody  line  by  enclosing
the  chord  in  inverted  commas,  e.g.  "Am7"A2D2 . See the tune
`William and Nancy' in Xenglish.abc for an example.

  Order of Symbols
  ================

The order of symbols for one note is ,  
(e.g. roll, staccato marker or up/downbow), , ,
, , i.e. ~^c'3 or even "Gm7"v.=G,2

  Comments
  ========

A % symbol will cause the remainder  of  any  input  line  to  be
ignored. The file Xenglish.abc contains plenty of examples.

  Introducing New Notation
  ========================

The letters H-Z inclusive have been set aside to allow  users  to
introduce  their own additional symbols. One such example is J to
denote sliding up to a note.

  Line Breaking and Justification
  ===============================

Generally one line of abc  notation  will  produce  one  line  of
music,  although  if  the music is too long it will overflow onto
the next line. This can look very  effective,  but  it  can  also
completely  ruin  ties  across  bar  lines,  for example. You can
counteract this by changing either the internote spacing with the
E: field or break the line of abc notation. If, however, you wish
to use two lines of input to generate one line of music (see, for
example,  the  `Untitled Reel' in Xreels.abc) then simply put a \
at the end of the first line.  This is also useful  for  changing
meter or key in the middle of a line of music.

By default, lines of music  are  left-justified  but  not  right-
justified.  To  overcome this, a * at the end of each line of abc
notation will force a right-justified line-break. For  the  final
line  of  a  tune  put  ** (so as to not generate a new line). Be
warned, however,  that  if  a  line  is  not  very  long  or  has
overflowed  to  become  two lines, this can look very ugly as the
notes spread themselves out along the line. It can also give ugly
output  other  people  using  the abc file who may have different
layout parameters.

  Internote spacings
  ==================

The internote spacing is set by the information field E.  As  the
format  is set up now, I use E:8 and E:7 to squeeze long tunes up
a bit and E:10 and above  to  stretch  short  tunes.   Using  E:6
really looks too cramped to my eye.

  TeX Input
  =========

If there is a line in a tune file beginning with a \, it  is  put
directly into the output file (music.tex).

    Source: geocities.com/w_macaulay