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]   Go Down

Author Topic: ABC Help  (Read 2150 times)

0 Members and 1 Guest are viewing this topic.

Andy Next Tune

  • aka Andy Wooles
  • Hero Member
  • *****
  • Offline Offline
  • Posts: 1127
  • Melodeon with Accidentals? Make a PI Claim!!!
    • www.shavethedonkey.co.uk
ABC Help
« on: May 19, 2011, 11:12:59 PM »

I'm compiling a tunebook of the current Mersey Morris repertoire from various ABC sources, and its almost complete.

A few of the musicians prefer printed music and I've sorted out how to add a title page to the ABC file which then prints nicely with ABCexplorer.

Then one of them said "Brilliant, it would be even better if you can add an index of the tunes!"   ???

So any suggestions on how I can automatically generate a list of all the tunes in that ABC archive from the T tags?

Thanks,

Andy
Logged
Andy, from the now ex-County Palatine of Cheshire

Caring for a European community of melodeons from France, Italy, Germany, Wales and Suffolk!

Andrew Wigglesworth

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 1101
  • 07
    • My website
Re: ABC Help
« Reply #1 on: May 20, 2011, 03:25:52 AM »

Here's what I would do.

Since I use GNU/Linux and GNU Emacs, I'd use grep mode in Emacs and then tidy up the results.  The quickest way would be to go to the directory with Dired and then M-x grep and put in your search term. In this case it would simply "T: *.abc" (without the quotes of course).

Of course you don't need to use Emacs ( :o ) to do a grep. You can do it from a shell and have the results saved to a file (named output-file.txt in the command below) which can be opened by a text editor of your choice. Grep will output each line where the term T: occurs.

grep  T:  *.abc > output-file.txt

If this extraction has to be done regularly then I'd be inclined to use an Emacs macro to automate it and get it into whatever format you want.

Steve_freereeder

  • Content Manager
  • Hero Member
  • ***
  • Offline Offline
  • Posts: 7511
  • MAD is inevitable. Keep Calm and Carry On
    • Lizzie Dripping
Re: ABC Help
« Reply #2 on: May 20, 2011, 08:49:32 AM »

Then one of them said "Brilliant, it would be even better if you can add an index of the tunes!"   ???
So any suggestions on how I can automatically generate a list of all the tunes in that ABC archive from the T tags?
Barfly (the ABC shareware software for Mac) has a menu option to do this easily, and very useful it is too. It lists all the tunes in a file by their T: field and generates the first two bars of music next to each title.

If this is what you want, then perhaps you should try to find someone with a Mac and Barfly  ;)
Logged
Steve
Sheffield, UK.
www.lizziedripping.org.uk

Lester

  • MADman
  • Mods and volunteers
  • Hero Member
  • ***
  • Offline Offline
  • Posts: 9327
  • Hohners'R'me
    • Lester's Melodeon Emporium and Tune-a-Rama
Re: ABC Help
« Reply #3 on: May 20, 2011, 09:32:04 AM »

Lester's method - with no added Mac or Linux  ;D

Make a copy of the .abc file with a .txt extension
Open it in Word, Libre Writer or you txt editor of choice
Sort the file alphabetically
Delete all irrelevant stuff

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 Help
« Reply #4 on: May 20, 2011, 09:33:27 AM »

Like Andrew I use GNU/Linux, and I have a script that will take  a list of tunes (file references) and create an ABC book. I hadn't thought of trying to make an automatic index, but if your ABC files are all in one directory it's as simple as

grep -h ^T: *.abc >titles.txt

...and then a bit of editing.

In a similar vein, I'm working on a session tunes web site for a local session. My aim is to store ABC text only on the site, one tune per file, and enable tunes to be selected from a list of titles. Graphical representation of the tune and high quality downloadable PDF files are generated on the fly - the idea is that I can simply add new ABC files and everything else happens automatically. Very early and incomplete prototype here: http://bizet.treewind.co.uk/session/

(tech note: bizet.treewind.co.uk is  a virtual machine provided by Bytemark)
Logged
Слава Україні !
Music recording and web hosting: www.treewind.co.uk
Mary Humphreys and Anahata: www.maryanahata.co.uk
Ceilidh band: www.barleycoteband.co.uk

Andy Next Tune

  • aka Andy Wooles
  • Hero Member
  • *****
  • Offline Offline
  • Posts: 1127
  • Melodeon with Accidentals? Make a PI Claim!!!
    • www.shavethedonkey.co.uk
Re: ABC Help
« Reply #5 on: May 21, 2011, 05:06:25 PM »

I'd forgotten the 'joys' of command line operating systems, having left the world of Unix when it was still a battlefield between commercial releases, Open Source was viewed as heresy and Linux was the cute new kid trying to break the mould!

But the suggestions have shown me a few ways forward, and confirmed my suspicions about the lack of the required functionality in the main Windows ABC software.

In a few weeks time, daughter will return from Uni with her MacBook  (:)

Thanks, Andy

PS Anahata - please keep us informed about your web project. I think a few people could be interested in something similar.
Logged
Andy, from the now ex-County Palatine of Cheshire

Caring for a European community of melodeons from France, Italy, Germany, Wales and Suffolk!
Pages: [1]   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