Loading ...
Sorry, an error occurred while loading the content.

Re: [Clip] Extracting text from a music .XML file.

Expand Messages
  • Don
    So almost ... Not sure I understand your 8 7 8 7 8 quite right ... ^!Jump Doc_Start ^!Set %LyricCounter%= 1 ... ^!Set %LyricEnd%= ^%LyricCounter% ;long line
    Message 1 of 47 , Nov 12, 2012
    • 0 Attachment
      So almost ...
      Not sure I understand your 8 7 8 7 8 quite right ...

      ^!Jump Doc_Start

      ^!Set %LyricCounter%="1"

      :GatherLoop
      ^!Set %LyricEnd%="^%LyricCounter%"

      ;long line follows
      ^!Set %Lyrics^%LyricCounter%%="^$GetDocListAll(" *\<lyric
      number\="^%LyricCounter%"\>\r\n *\<syllabic\>(.*?)\</syllabic\>\r\n
      *\<text\>(.*?)\</text\>\r\n *\</lyric\>";"$1|$2;")$"
      ;long line precedes
      ^!If "^%Lyrics^%LyricCounter%%" = "" Process
      ^!Inc %LyricCounter%
      ^!Goto GatherLoop

      :Process
      ^!Set %LyricCounter%="1"
      ^!Select All

      :ProcessLoop
      ^!If "^%LyricCounter%" = "^%LyricEnd%" FinishIt
      ^!InsertText Lyrics ^%LyricCounter%:^P^%Lyrics^%LyricCounter%%^P
      ^!Inc %LyricCounter%
      ^!Goto ProcessLoop

      :FinishIt

      ;alternate
      :LineLoop
      ^!Jump Doc_Start
      :LineLoopVerse
      ^!Set %WordCount%="7"

      :LineLoop2
      ^!Replace "(.*?;){^%WordCount%}\K(.*?;)" >> "$2;\r\n" RS
      ^!IfError ProcessNext
      ^!If "^%WordCount%" = "7" Minus ELSE Plus
      :Minus
      ^!Dec %WordCount%
      ^!Goto LineLoop2
      :Plus
      ^!Inc %WordCount%
      ^!Goto LineLoop2

      :ProcessNext
      ^!If "^$GetLineCount$" = "^$GetRow$" DoneProcess ELSE Next
      ^!Jump +1
      ^!Goto LineLoopVerse

      :DoneProcess

      ^!Replace "begin\|(.*?);" >> "$1" RAWS
      ^!Replace "middle\|(.*?);" >> "$1" RAWS
      ^!Replace "single\|(.*?);" >> " $1 " RAWS
      ^!Replace "end\|(.*?);" >> "$1 " RAWS
      ^!Replace ";" >> " " ACIWS
      ^!Replace " +" >> " " RAWS


      On 11/12/2012 8:28 PM, Adrian Worsfold wrote:
      > Hello Clip experts
      >
      > The main task of the music file was to save typing, and that is done, but there is one more puzzle only for you really dedicated and most clever people.
      >
      > There are lots of XML music file links within my hymns page...
      >
      > https://dl.dropbox.com/u/28120070/pluralist/spiritual/hymnsavailable.html#hl
      >
      > But here's the puzzle. We already have the verses, but what about the lines? Each text piece extracted is one syllable, and then the metre gives the clue. So HL 227 holywell.xml is 87. 87. D or 8 7 8 7 8 7 8 7. The task would be to start the new line according to the count. So that hymn should have 60 syllables per verse, divided as above. Unfortunately I haven't added the metrical information there but some others are:
      >
      > HL 056 faithfulness is 11 10. 11 10 (but beware - 'hour' is two syllables! But then it is recovered as such.)
      > HL 059 sussex is 87. 87 and NO WORDS!
      > HL 086 lawnswood is 65. 65. D
      >
      > That's more than enough regarding testing anything. Please - anything better to do then don't do this. I'm quite capable of reading a book and pressing return on the recovered text.
      >
      >
      >
      > Adrian Worsfold
      >
      > http://www.pluralist.co.uk
      > http://pluralistspeaks.blogspot.com
      > pluralist@...
      > 13-11-2012
      > ----- Received the following content -----
      > From: flo.gehrke
      > Receiver: ntb-clips
      > Time: 2012-11-12, 20:11:58
      > Subject: Re: [Clip] Extracting text from a music .XML file.
      >
      >
      > [Non-text portions of this message have been removed]
      >
      >
      >
      > ------------------------------------
      >
      > Fookes Software: http://www.fookes.com/
      > NoteTab website: http://www.notetab.com/
      > NoteTab Discussion Lists: http://www.notetab.com/groups.php
      >
      > ***
      > Yahoo! Groups Links
      >
      >
      >
      >
    • Adrian Worsfold
      Hello flo Brilliant. Later on today I will alter the clip and instructions on my webpage. How you have managed to account for different line lengths in verses
      Message 47 of 47 , Nov 16, 2012
      • 0 Attachment
        Hello flo

        Brilliant. Later on today I will alter the clip and instructions on my webpage. How you have managed to account for different line lengths in verses baffles me but thanks and I'll give appropriate thanks on the webpage when I re do it, including your further advice.




        Adrian Worsfold

        http://www.pluralist.co.uk
        http://pluralistspeaks.blogspot.com
        pluralist@...
        16-11-2012
        ----- Received the following content -----
        From: flo.gehrke
        Receiver: ntb-clips
        Time: 2012-11-16, 13:42:25
        Subject: Re: [Clip] Extracting text from a music .XML file.


        [Non-text portions of this message have been removed]
      Your message has been successfully submitted and would be delivered to recipients shortly.