Google Answers Logo
View Question
 
Q: Need an executable program written... ( No Answer,   7 Comments )
Question  
Subject: Need an executable program written...
Category: Computers > Programming
Asked by: barryf-ga
List Price: $42.50
Posted: 23 Sep 2004 16:57 PDT
Expires: 26 Sep 2004 17:16 PDT
Question ID: 405485
Hello -

This is a repost of a question with an altered criterion: the
following program doesn't have to be a Word macro.

I have a collection of about 70 songs, containing lyrics and chords --
many of which I need to transpose.  They're all in separate Microsoft
Word files.  I need an intelligent "search and replace", fairly
straightforward program written that will transpose an MS Word file
(executable either within Word or outside of Word).  I'd like to have
a link where I can download it.

The program should do the following:

Prompts the user for two inputs: 1) the existing key and 2) the
desired new key to the song.  It will then traverse the document and
transpose every chord to the new key.  There is a chart containing the
1-7 chords in all the keys at this link:

http://www.guitarforbeginners.com/capo.html

Some of these songs have more complicated chords, with adjacent
superscripts such as 9th's, 11th's, etc.  However, this shouldn't be a
problem, as the  program could simply identify the fundamental chord
and leave everything to the immediate right of it the same (with the
exception of encountering a "/" character).  For example:

Cm(Add9b5)/Bb

In this case, the program would identify the first character (C) and
change it to the appropriate new root chord letter; it would then scan
for a "/" character; if found, it would advance to the next, immediate
alpha character (B), changing that to the appropriate new root chord
letter.  The "(Add9b5)" would remain intact, as would any accidentals
or additional characters.  It would then advance to the next chord (or
chord combo).  The end of the line I believe could be a hard return
character.  I don't know the optimum way for the program to determine
a "chord line" vs. a "lyric line."  There's no consistency in regards
to the use of tab characters and space characters.  However, as the
first criterion, any line containing am, bm, cm, dm, em, fm, or gm
(even with any characters in between the chord letter and the "m",
case insensitive) should be considered a "chord line" immediately. 
Perhaps the next criterion could be to see if there are any uppercase
characters, A through G, either prepended or appended by a tab, a
numerical character, or more than 2 spaces?  There may be a better
way.

The program would make its way through to the end of the document,
processing all chord lines and be finished when there are no more
chord lines to process.

An example of a few lines of one of the files:

  C   D            F              G        Dm   Cm7
This is a sample lyric line with chords above it
     E     Fm7/G                 A    B9    B11 
This is a sample lyric line with chords above it
              E      G   B      Em  Am  G7sus
Chorus: This is a sample lyric line with chords above it
        F     Gm    B9     Bb9      
        This is a sample lyric line with chords above it

Please feel free to ask for any clarification.  

barryf

Request for Question Clarification by elmarto-ga on 24 Sep 2004 08:58 PDT
Hi barryf,
Are your files in .doc format, or in .txt format, such that they can
be read, for example, using the Windows Notepad? I might be able to
write this program in the latter case.

Thanks,
elmarto

Clarification of Question by barryf-ga on 24 Sep 2004 09:30 PDT
Hi elmarto -

The files are all in .DOC Word format.  Are you able to write a Word
macro, perhaps?  I have Conversions Plus by Dataviz, which allows me
to convert doc files to a variety of formats.  The problem is, when I
load one of the files into .txt format and load it into Notepad, the
alignment is all messed up.  I don't know if that would be a problem,
though, in terms of your program actually transposing the file, but
converting it back to Word might be a problem?

barryf

Request for Question Clarification by elmarto-ga on 24 Sep 2004 16:18 PDT
Hi barryf!
Unfortunately, I don't know how to program this into Visual Basic,
which is the language for Word macros. Have you checked what happens
to the alignment when you convert from .doc into .txt and then convert
it back to .doc? If it converts the files back fine, then there should
be no problem. Also, what operating system are you using?

In any case, you can wait and see if some other Researcher with Visual
Basic programming skills can create a Word macro for you.

Best wishes!
elmarto

Clarification of Question by barryf-ga on 25 Sep 2004 16:24 PDT
elmarto -

Can you work with RTF format?  I tried converting to raw DOS text and
back, and the alignment was lost.

barryf
Answer  
There is no answer at this time.

Comments  
Subject: Re: Need an executable program written...
From: mister2u-ga on 24 Sep 2004 06:23 PDT
 
http://www.hitsquad.com/smm/programs/Guitar_Chord_Transposer/
This may work.
Subject: Re: Need an executable program written...
From: barryf-ga on 24 Sep 2004 07:50 PDT
 
Thanks for the suggestion.  Unfortunately, this program will not
transpose my existing files, which is what I need.
Subject: Re: Need an executable program written...
From: dreamboat-ga on 25 Sep 2004 06:38 PDT
 
elmarto: If you can write a program to get the files from text to
desired output, I can easily get you a macro to convert all DOC files
in a folder to TXT. That's a minor issue. I have the Word coders
(they're ALL MINE!! hee hee--not really, but if you search my member
name, you'd see what I mean), but this is a pretty tall order that I'm
not sure we can fulfill, quite simply due to the spacing (built-in
kerning?) of text that occurs. See, I'm thinking that, on one line, we
may need to move the note over by 2 spaces, but on the next line, that
2 spaces won't work, so I fear that any VBA would require an algorithm
that would simply be too difficult to write.

Barry: I read some others asking for an exact sample file. I, too,
would insist on that to be able to even look into this, simply because
we can't go writing a bunch of code based on hoping that the html
format of a google page provides the same output as your actual files.
I'm just not taking that chance. Many internet service providers offer
free web space to which you can upload a file so we can grab it. If
you need more help with THAT, let us know. I'm not a researcher, so I
don't get any kind of notifications here (I assume the researchers
enjoy that feature), but I try to check in regularly for responses. Or
maybe you'll find me.
Subject: Re: Need an executable program written...
From: barryf-ga on 25 Sep 2004 16:26 PDT
 
dreamboat -

Thanks so much for your offer.  I actually am able to convert the
files to a variety of formats as I own Conversions Plus by Dataviz. 
But thanks again!

barryf
Subject: Re: Need an executable program written...
From: dreamboat-ga on 26 Sep 2004 08:44 PDT
 
Okay, barry. Well, if you get to a point where you can upload a sample
WORD file, I will at least get a coder to take a look at your needs.
:)
Subject: Re: Need an executable program written...
From: barryf-ga on 26 Sep 2004 11:25 PDT
 
dreamboat -

Do you know a VB coder that can make a Word macro?  Someone that can
do it in this price range?

barryf
Subject: Re: Need an executable program written...
From: barryf-ga on 26 Sep 2004 17:16 PDT
 
Actually, I just found a programmer through a different service. 
Thank you all for your willingness to help!

barryf

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy