Re: [abcusers] Indexing tunes

2004-09-07 Thread John Walsh
Hi,

I didn't realize you wanted to print the incipit in staff notation. Try
running abc2mtex -i file with the index.fmt file below in the same directory.  
It'll set up the incipits as normal abc tunes in the file index. Then run
sort_in on it to sort by title, and print out the result with abcm2ps. (The
backslashes are there to quote characters so that they'll print out literally.)  
There's more that you can do with the format file, by the way---check the file
index.tex in the abc2mtex distribution for some ideas.  However, if you want to
format the output by, for instance, printing the title and incipit on the same
line, that's between you and abcm2ps.

Cheers, 
John Walsh

---snip here
File index.fmt:

\X\:X5
\T\:T55
\M\:M5
\K\:K6
|30


Note: Carriage returns are important.  The \X should be on the first line of
the file.  Follow the |30 by _two_ carriage returns if you want a space
between tunes.  (You have to follow it by one CR in any case.)

-

You wrote:

 
 I tried the instructions below (still looking for an index of 
 incipits--how are you doing Phil ;) ? ).  abc2mtex does indeed give a 
 listing of Title plus the first bit of the tune in ABC.  BUT, it takes 
 things out of the ABC syntax, so the music can not be readily turned 
 into notation.  Perhaps there is an index format that would keep the 
 syntax, but I couldn't muddle it out of the index.tex file .. at least 
 at first reading.
 
 Three thoughts:
 
 1)  The parsing is quick, efficient, and apparently accurate.  If Phil 
 is actually working on this perhaps the code would help him.
 
 2)  Does John, or anyone else, have the index.fmt that might do what I 
 want?
 
 3)  Is there any consideration to adding an incipit format 
 specification to ABC 2.0?  Seems to me it would be most useful..
 
 Chuck Boody
  For abc2mtex, you need a file index.fmt in the directory you
  want  to index.  Put  T40 |30  in the file index.fmt.  To index
  file.abc, type
 
  abc2mtex -i file
  sort_in
 
  at the command line.  Then the list you want should be in the text
  file index in the same directory, sorted by tune title, with the
  first two or so measures given in abc.  There are lots of other ways
  to do this---see the file index.tex in the abc2mtex distribution for
  the definitive explanation. of the whole indexing facility.
 
  It's true as Phil says that abc2mex can be a real pain to set
  up, since you also need TeX, which itself is non-trivial to set up.
  However, that doesn't enter here. The sorting part of abc2mtex works
  without having tex installed---it just writes a text file, and you
  take it from there.  So all you have to do is to compile or download
  abc2mtex and sort_in.
 
  It seems a bit baroque to only use abc2mtex for indexing,
  but on the other hand, I've often found this indexing facility useful.
  Moreover, since the code is freely available, it might give an idea of
  how to add this type of sorting facility to other programs.
 
 
  Cheers,
  John
To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html


Re: [abcusers] Indexing tunes

2004-09-06 Thread John Chambers
| I tried the instructions below (still looking for an index of
| incipits--how are you doing Phil ;) ? ).  abc2mtex does indeed give a
| listing of Title plus the first bit of the tune in ABC.  BUT, it takes
| things out of the ABC syntax, so the music can not be readily turned
| into notation.  Perhaps there is an index format that would keep the
| syntax, but I couldn't muddle it out of the index.tex file .. at least
| at first reading.

FWIW, I wrote a simple perl script to generate  incipits  a
few years ago.  I tweak it now and then, depending on how I
want it to behave by default. Anyway, if you have perl (and
most  unixoid  systems  have it these days, including linux
and OSX), you could grab my script:

http://trillian.mit.edu/~jc/music/abc/sh/abcincip

It's a standard unix filter, taking a list of file names,
or  reading  from  stdin  if there are no file names on the
command line. It does want an extra first arg, which is the
title  to  use  in the output.  If you make any significant
improvements, let me know.

I'd expect that a few other people have done something like
this, too.  Maybe we should make a collection of them. It's
not what you'd call a huge job, but it's useful.

To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html


Re: [abcusers] Indexing tunes

2004-09-06 Thread Chuck Boody
Gee, an excuse to learn perl. ;)  I'll give it a try, though I'll have 
to learn how to use perl first.  Yes, we should collect these things.  
Incipts are terribly useful.

Chuck Boody
On Monday, September 6, 2004, at 09:41  PM, John Chambers wrote:
| I tried the instructions below (still looking for an index of
| incipits--how are you doing Phil ;) ? ).  abc2mtex does indeed give a
| listing of Title plus the first bit of the tune in ABC.  BUT, it 
takes
| things out of the ABC syntax, so the music can not be readily turned
| into notation.  Perhaps there is an index format that would keep the
| syntax, but I couldn't muddle it out of the index.tex file .. at 
least
| at first reading.

FWIW, I wrote a simple perl script to generate  incipits  a
few years ago.  I tweak it now and then, depending on how I
want it to behave by default. Anyway, if you have perl (and
most  unixoid  systems  have it these days, including linux
and OSX), you could grab my script:
http://trillian.mit.edu/~jc/music/abc/sh/abcincip
It's a standard unix filter, taking a list of file names,
or  reading  from  stdin  if there are no file names on the
command line. It does want an extra first arg, which is the
title  to  use  in the output.  If you make any significant
improvements, let me know.
I'd expect that a few other people have done something like
this, too.  Maybe we should make a collection of them. It's
not what you'd call a huge job, but it's useful.
To subscribe/unsubscribe, point your browser to: 
http://www.tullochgorm.com/lists.html

To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html


Re: [abcusers] Indexing tunes with ABCMUS

2004-08-26 Thread John Walsh
I recently read about the ability to index tunes in one or
more abc files using ABCMUS.  Unfortunately, I have been
unable to do so.  Would some kind individual reply (maybe by
private e-mail) with some simple directions about how to
index the tunes contained in a single abc file.  If I can
get one done, multiple files should be easy from that point.


For abcmus, click the file menu, go down to the entry Make
List/Index/etc, click it (or just hit ctrl-shift-L). Go to List Type
in the dialogue box, click to get the pull-down menu, and choose
cheat-sheet.  There are fields in the dialogue box to specify the file
or files you want to index, and the file for the output in. There
should be a T in the Sort field, so it'll sort alphabetically by
title. Fill these in, and click Start.  It'll write a text file with
each title followed by the first couple of measures in abc.

There are some other list types defined, and in addition you
can also define your own type. You can play around with this to get it
just as you want it.  I don't know whether or not you have to register
the program to use this feature, tho.

For abc2mtex, you need a file index.fmt in the directory you
want  to index.  Put  T40 |30  in the file index.fmt.  To index 
file.abc, type 

abc2mtex -i file
sort_in

at the command line.  Then the list you want should be in the text
file index in the same directory, sorted by tune title, with the
first two or so measures given in abc.  There are lots of other ways
to do this---see the file index.tex in the abc2mtex distribution for
the definitive explanation. of the whole indexing facility.

It's true as Phil says that abc2mex can be a real pain to set
up, since you also need TeX, which itself is non-trivial to set up.  
However, that doesn't enter here. The sorting part of abc2mtex works
without having tex installed---it just writes a text file, and you
take it from there.  So all you have to do is to compile or download
abc2mtex and sort_in.

It seems a bit baroque to only use abc2mtex for indexing,
but on the other hand, I've often found this indexing facility useful.  
Moreover, since the code is freely available, it might give an idea of
how to add this type of sorting facility to other programs.


Cheers,
John
To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html


RE: [abcusers] Indexing tunes with ABCMUS

2004-08-26 Thread Richard Walker
Thanks - I'll try and hope for the best.  I'm registered so
it should work.


To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html


[abcusers] Indexing tunes with ABCMUS

2004-08-25 Thread Richard Walker
I recently read about the ability to index tunes in one or
more abc files using ABCMUS.  Unfortunately, I have been
unable to do so.  Would some kind individual reply (maybe by
private e-mail) with some simple directions about how to
index the tunes contained in a single abc file.  If I can
get one done, multiple files should be easy from that point.
I've attempted to output txt files and html files.  The
files are created, but with no tune information indexed.


To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html