Re: [abcusers] abcmac - BarFly-style abc macro preprocessor in Perl

2001-08-15 Thread Phil Taylor

Anselm Lingnau wrote:

Phil Taylor wrote:

 BarFly's macro processor does take lengths.  You have to write
 a separate macro for each length of note.  The reason for this
 is that an ornament which sounds right on a half note is often
 wrong on an eighth.

I'm confused now. Suppose I had definitions for `Mn' and `Mn2'. What
would happen (a) for `Mc' (b) for `Mc2' (c) for `Mc4' in the body of
a tune? The interesting point is whether the `n' includes a length or
not.

(a) and (b) will expand, (c) will not, since there is no macro definition
for that length. 'n' does not itself include the length, but the length
(if any) is part of the target string.

 What the current Barfly version
 does when it encounters a macro on a note with an accidental is to place
 the accidental on the first ocurrence of the principal note in the
 expansion. [...]

 BarFly doesn't do this; rather it expands the macros in reverse order
 to the order in which the definitions are listed.

Actually, thinking about this some more, it would be possible to sort
the macro definitions into order before expanding them, provided that
you used a sort algorithm which is guaranteed not to change the order
of elements which are the same size.  Since the list of macros to be
expanded is never going to be very big you could just use a simple bubble
sort.

I've put a version of abcmac which is fixed in these two respects on my
web page at `http://anselm.our-isp.org/abcmac/abcmac'.

 Maybe we can get abc2midi to process the Goldberg Variations?

We could try ...


If there's the possibility of other programs handling the macros, I'll
fix the V: fields to be inline once I release the next version of
BarFly (the current version won't work with that syntax).  The postscript
programs will still only be able to display it with the ornaments
written out in full, which is highly illegible.

I wasn't able to test the script, unfortunately.  I had installed a new
hard drive in my machine and simply copied all my stuff over to it.
MacPerl has got itself into a fankle and can't find its libraries
any more (perl5lib not found in @IN), despite the fact that perl5lib
is certainly there, and the correct pathname is in the preferences.
I downloaded and installed a new version which comes as a single
standalone application, with all the libraries compiled in, and that
didn't work either, objecting to 'strict', right at the beginning of
the script.  Us Mac users don't have a lot of fun with perl.  Every
time I try to use it I end up concluding that it would be quicker
to write a program in C or Pascal to do the job.

Phil Taylor


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



Re: [abcusers] abcmac - BarFly-style abc macro preprocessor in Perl

2001-08-15 Thread Anselm Lingnau

[EMAIL PROTECTED] (Phil Taylor) writes:

 I'm confused now. Suppose I had definitions for `Mn' and `Mn2'. What
 would happen (a) for `Mc' (b) for `Mc2' (c) for `Mc4' in the body of
 a tune? The interesting point is whether the `n' includes a length or
 not.
 
 (a) and (b) will expand, (c) will not, since there is no macro definition
 for that length. 'n' does not itself include the length, but the length
 (if any) is part of the target string.

So in (a) and (b) the replacement of `n' is `c', and any length 
specifications are taken from the right-hand side of the macro 
definition (the `target string', if I understand you correctly). This 
is what my current implementation does (phew).

 Actually, thinking about this some more, it would be possible to sort
 the macro definitions into order before expanding them, provided that
 you used a sort algorithm which is guaranteed not to change the order
 of elements which are the same size.  Since the list of macros to be
 expanded is never going to be very big you could just use a simple bubble
 sort.

It's no problem simply to do the replacements in reverse order of 
occurrence. Actually it simplifies my code considerably. The sorting 
business came in because my very first version processed the 
replacements in order of occurrence (rather than reverse order), which 
obviously didn't work with Jack's example, which was all that I had to 
go on at the time. I didn't know about the reverse-order constraint 
until later, and I'm perfectly happy with it if you are.

As I said, the version on my web page does the reverse-order thing 
already.

 Us Mac users don't have a lot of fun with perl.  Every
 time I try to use it I end up concluding that it would be quicker
 to write a program in C or Pascal to do the job.

Yes, but you Mac users have BarFly to begin with. I could have coded the
macro preprocessor in C (no Pascal, please ...) but it would have taken
me a lot longer than the two hours or so that I have spent on it so far.

Anselm
-- 
Anselm Lingnau .. [EMAIL PROTECTED]
The problem is the browser bosses spend way too long listening to the young
sprouts in suits in the marketing departments who can barely add 2+2 instead
of listening to real users. -- Peter Flynn, on math support in Web browsers

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



[abcusers] Mirror of Joyce's book Old Irish folk music and songs

2001-08-15 Thread Forgeot Eric

Hello,

I've found this :
http://www.g8ina.enta.net/joyce.zip
at :
http://www.g8ina.enta.net/irish.htm

The P.W.Joyce ABC Set The Joyce Set Site closed, thanks to Allen
Garvin for permission 

(I've only found 370 tunes)


| Don't know, but it's a great loss.
| The site contained ABCs of all the 842 tunes from Patrick
Weston Joyce's
| (1827-1914) book Old Irish folk music and songs.
|
Yeah; I wonder if we can find an email address for the site's
owner?
I did a quick check with a couple of search sites, but didn't
find
anything useful. Such old collections are good to have online. If
we
can find it again, maybe we should offer to mirror it.


___
Do You Yahoo!? -- Vos albums photos en ligne, 
Yahoo! Photos : http://fr.photos.yahoo.com
To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html



Re: [abcusers] abcmac - BarFly-style abc macro preprocessor inPerl

2001-08-15 Thread Jack Campin

 I'm confused now. Suppose I had definitions for `Mn' and `Mn2'. What
 would happen (a) for `Mc' (b) for `Mc2' (c) for `Mc4' in the body of
 a tune? The interesting point is whether the `n' includes a length or
 not.
 (a) and (b) will expand, (c) will not, since there is no macro definition
 for that length. 'n' does not itself include the length, but the length
 (if any) is part of the target string.

I wonder if we need two different kinds of macro?  I can see the point
of having the length-dependent ones, for the original purpose you had
in mind (ornamentation) but the macros I've written have been about
50:50 ornaments and chords, and for chords the length-dependence is just
a nuisance.

The problem is that since the point of macros is to abbreviate, you want
them to have very short names, which means you have very few options if
you want those names to be at all mnemonic.  You can't multiply them at
will.

Maybe it would be better to allow macros to select different behaviour
for different lengths by a pattern-matching or conditional construct?
That way you could reuse the same name for conceptually identical
constructs (trill or mordent on different lengths of note).


 I wasn't able to test the script, unfortunately.  MacPerl has got itself
 into a fankle [...]  Us Mac users don't have a lot of fun with perl.
 Every time I try to use it I end up concluding that it would be quicker
 to write a program in C or Pascal to do the job.

I think I've got three versions of MacPerl sitting around on my machines
and none of them ever worked.  Python anybody?  That does work on the Mac.
(I'd prefer Prolog or ML, both of which I can actually read, but I can't
see there being too many takers for either). 

=== http://www.purr.demon.co.uk/jack/ ===


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



Re: [abcusers] abcmac - BarFly-style abc macro preprocessor in Perl

2001-08-15 Thread dman

On Wed, Aug 15, 2001 at 11:59:45PM +0100, Jack Campin wrote:
 
|  I wasn't able to test the script, unfortunately.  MacPerl has got itself
|  into a fankle [...]  Us Mac users don't have a lot of fun with perl.
|  Every time I try to use it I end up concluding that it would be quicker
|  to write a program in C or Pascal to do the job.
| 
| I think I've got three versions of MacPerl sitting around on my machines
| and none of them ever worked.  Python anybody?  That does work on the Mac.

grin  I'm a big Python fan myself.  Unfortunately I don't have much
spare time to learn music, notation and code right now.  If you just
want a quick-n-dirty preprocessor prototype I could probably make one
if I know exactly how the inputs and outputs are to be formatted.

-D

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