[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lyrics entry help!!!-was hebrew lily
From: |
Aaron |
Subject: |
Re: lyrics entry help!!!-was hebrew lily |
Date: |
03 Jul 2003 12:58:13 +0300 |
Hi all and Amelie,
I have been using your script and it really works.
I have one question, when I want to add -- or ___ between lyrics they
don't show up in the final ps or pdf (see attached) notice to notes with
no lyrics that is because in the song there are a few places with a few
notes per one sylable.
I checked the mahyedid.out.29 and all the -- and __ had vanished???
What to do??
Also notice in the exampe that the lyrics in the first measure are not
aligned right.
Help
Thanks
Aaron
On Wed, 2003-07-02 at 20:22, Amelie Zapf wrote:
> Hi Aaron, all,
> The following script should do the job:
>
> Cheers, Amy
>
> #!/usr/bin/perl
> ####################################################
> # revertlyrics.pl v0.1
> # Script to print right-to-left languages backwards
> # in Lilypond
> # (c) Amelie Zapf 2003
> # Licensed under the GNU GPL v2
> ####################################################
>
> # Usage: revertlyrics.pl <lilypondfile>
> # 1. Name each lyric file <lilypondfile>.lyr.<number>
> # 2. Insert "\include "<lilypondfile>.out.<number>";
> # at the appropriate positions in your lilypond file
> # 3. Run script
>
> use warnings;
> use strict;
>
> # which files to process
> my $file=$ARGV[0];
> $file=~s/\.ly//;
> my @files=glob("$file.lyr.*");
>
> foreach (@files) {
> # read
> open FILE, $_;
> my @content=<FILE>;
> close FILE;
>
> # process
> for (my $i=0; $i<scalar(@content); $i++) {
> # get rid of spurious blank space
> chomp $content[$i];
> $content[$i]=~s/\s+/ /g;
> #split into syllables
> my @line=split / /, $content[$i];
> for (my $j=0; $j<scalar(@line); $j++) {
> # get rid of lyric value
> my $time=$line[$j];
> $time=~s/^[^\d]+//;
> $line[$j]=~s/[\d]+\.+$//;
> # take care that trailing hyphens appear at the end
> if ($line[$j]=~/\-$/) {
> $line[$j]=~s/\-$//;
> $line[$j]="-$line[$j]";
> }
> # special treatment of centered hyphens and
> # syllable extenders, actual substitution
> if ($line[$j] ne "--" && $line[$j] ne "__") {
> $line[$j]="\"\\\\R{$line[$j]}\"";
> }
> # get value back in
> $line[$j]="$line[$j]$time";
> }
> # fuse line from syllables
> $content[$i]=join " ", @line;
> }
>
> # output
> my $newfile=$_;
> $newfile=~s/\.lyr\./.out./;
> open FILE, ">$newfile";
> for (my $i=0; $i<scalar(@content); $i++) {
> print FILE "$content[$i]\n";
> }
> close FILE;
> }
>
>
>
> _______________________________________________
> Lilypond-user mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/lilypond-user
mayedidos29.pdf
Description: Adobe PDF document
- Re: lyrics entry help!!!-was hebrew lily, (continued)
- Re: lyrics entry help!!!-was hebrew lily, Amelie Zapf, 2003/07/02
- Re: lyrics entry help!!!-was hebrew lily, Aaron, 2003/07/02
- Re: lyrics entry help!!!-was hebrew lily, Amelie Zapf, 2003/07/02
- Message not available
- Re: lyrics entry help!!!-was hebrew lily, Amelie Zapf, 2003/07/03
- Re: lyrics entry help!!!-was hebrew lily,
Aaron <=
- Re: lyrics entry help!!!-was hebrew lily, Amelie Zapf, 2003/07/03
- Re: lyrics entry help!!!-was hebrew lily, Ferenc Wagner, 2003/07/03
- Re: lyrics entry help!!!-was hebrew lily, Aaron, 2003/07/03
- Re: lyrics entry help!!!-was hebrew lily, Ferenc Wagner, 2003/07/03
- Re: lyrics entry help!!!-was hebrew lily, Aaron, 2003/07/03
- Re: lyrics entry help!!!-was hebrew lily, Han-Wen Nienhuys, 2003/07/03
- Re: lyrics entry help!!!-was hebrew lily, Ferenc Wagner, 2003/07/04
- Re: lyrics entry help!!!-was hebrew lily, Han-Wen Nienhuys, 2003/07/04
- Re: lyrics entry help!!!-was hebrew lily, Ferenc Wagner, 2003/07/04
- Re: lyrics entry help!!!-was hebrew lily, Han-Wen Nienhuys, 2003/07/04