Skip to main content
Topic: Lyrics to ChordPlay (Read 566 times) previous topic - next topic

Lyrics to ChordPlay

Long ago I notated some scores putting the chord names in the lyrics.
I'd like to convert them to the "new" ChordPlay objects.
I know that inside ChordPlay there is a tool to convert texts to ChordPlay.
Does exist a similar tool to convert from lyrics to ChordPlay? I seem to remember that someone wrote about that...

Re: Lyrics to ChordPlay

Reply #1
Hey Flurmy,
sorry buddy, but I don't think anything like that exists at the moment.
I imagine matching the lyric to its note could be something of a challenge too.

I was going to say:
Quote
IIRC User Tools only work on "clip text".  This AFAIK relates only to the actual objects on the staff.  To access the lyrics you need to address the NWCTXT which I don't think user tools can do. 
BUT,
I have a correction:
In the .Developer Tools group in the User Tools dialogue there is a tool called nwctxt File Explorer (nwsw) that has access to the entire song as nwctxt rather than simple clip text.
This means that it is definitely possible to access the lyrics with a user tool.

Using arrays to match lyric syllables with notes should be possible.  I imagine a 2 part array:
part 1 contains the notes/chords on the staff - perhaps just as some kind of position marker...
part 2 contains the lyric syllables (chords)
The tool steps through the arrays, copies the lyric syllables in turn, and then inserts them as text entries into the appropriate locations of the nwctxt as defined by part 1 of the array.  Finally, it all gets written it back to the editor.

If I was actually a programmer I would be happy to do this as an exercise, but seriously, I can't write code to save my life so it would have to be up to someone with those skills and the time and interest to take it on.
I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.

Re: Lyrics to ChordPlay

Reply #2
Thanks, Lawrie.
Well, I've already accumulated a bit of experience with the user tools so I could have easily replied: "yes, I'm really sure the user tools can have full access to the whole file".  O:)

Possibly I'm also able to write such a tool myself but... I'm lazy  :D  and probably the number of scores to be "processed" is so small that the time to develop a tool is longer than to fix the scores by hand.  :)

There was some discussion long long ago about writing chords as lyrics. Probably this made me wrong about such a tool.

Re: Lyrics to ChordPlay

Reply #3
<snip>
There was some discussion long long ago about writing chords as lyrics. Probably this made me wrong about such a tool.
Yes...  I don't remember if I ever thought it was a useful idea or not, but I'm pretty certain if I did that I changed my mind pretty quick ;)
In fact, I still use text entries, even with the advent of Chordplay as it take me about 3 times as long to place an object as it does to place a text object.
That said, I should probably take a closer look at the conversion user tool as that would give me the best of both worlds.

<edit> Just did a quick test.  The font sizing is weird - much, much smaller than it should be - E.G. 32 in the chordplay object is about the same as 8 for normal text objects.  Plus, finding the font selection is obscure - I reckon it should be in the primary dialogue
I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.

Re: Lyrics to ChordPlay

Reply #4
The font sizing is weird - much, much smaller than it should be - E.G. 32 in the chordplay object is about the same as 8 for normal text objects.
Quote
-- Version 1.7
-- Flurmy 2021/08/23:
--   extended the allowed chord list
--   allowed the use of the solfeggio style note/chord
--   corrected a bug that crashed the plugin if MusikChordSerif is not available
--   corrected a bug in doFontChange for the font size

Re: Lyrics to ChordPlay

Reply #5
Hmm, my copy of ChordPlay is 1.6 and when I perform an online sync it doesn't offer an update...

I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.

Re: Lyrics to ChordPlay

Reply #6
Aha, found it.  Downloaded, did an online sync and was offered an update...  Will have to remember not to just automatically update it...
I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.

Re: Lyrics to ChordPlay

Reply #7
After some testing...
The ChordPlay objects position the text converted from any of my *Dings Chord fonts about "Pos+=4" higher than they appeared as text.
<edit> actually, the difference is dependant on the font size.  I generally use 16pt for my text chords, and in testing changed to 16pt for the ChordPlay replacements - this needed a Pos change of -4.  Other font sizes will need appropriate tailoring. </edit>

This is a little irritating, BUT can be easily remedied with a Global_Mod (*the 2015 or later version) command:
User:ChordPlay.nw Pos-=4

@Andrew Purdam originally created Global_Mod in 2004.  It has been updated several times since and the version I currently have is from 2015. This update, and a few before it, was done by NWSW.  It, or an update, will be the one in the NWC V2.75 user tool starter kit:
https://noteworthycomposer.com/nwc2/usertools/

Related discussion:
https://forum.noteworthycomposer.com/?topic=9211.msg65730#msg65730
I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.

Re: Lyrics to ChordPlay

Reply #8
Much less flexible, but for simple operations there is also "Filtered properties".
Can be used if all the texts must be moved at the same height.

Re: Lyrics to ChordPlay

Reply #9
Much less flexible, but for simple operations there is also "Filtered properties".
Can be used if all the texts must be moved at the same height.
Of course.  I keep forgetting that feature :(
I've been using Global_Mod for so long (I helped test it in the old NG prior to its 2004 release) that it's my automatic goto for anything like this.  Far and away my favourite user tool.
It well predates Filtered Properties which, and I stand to be corrected on this, I think first appeared in V2.5 (2011)...
I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.

Re: Lyrics to ChordPlay

Reply #10
Hey @Flurmy, been exploring while doing a little testing and had a quick glance at the code for ChordPlay.nw (always remember, I am NOT a programmer) and it appears to me that it is not written to take into account all the possible additional characters in my *dings chord fonts.

You seem to have made additions to broaden its capabilities WRT: 4, 4/9, 5+, 7+, 7/9+, -, -7, -7/5+, -6 type chords.

I noticed changes to the code in the comment section near the top of the file, AND in the "chordKeySeqList" section (function?)

Do you recall if these the only locations where you needed to make changes?  If so I can probably have a hack at it myself otherwise any pointers you can give would be most welcome.

It would be nice to be able to continue using the extended glyphs in the *chord fonts with ChordPlay without having a spurious <?> appear on chords that ChordPlay doesn't currently understand.

Given my font suites seem to have become something of a de-facto standard I suspect an update to take the additional glyphs into account may broaden the appeal of both my suites AND ChordPlay itself.

Of course, a good proportion of those glyphs appear in the range of chr$128 to chr$255 and might be problematic to match in the code as straight characters, though there are many that are definitely below chr$127 and even just those would be a help.

Perhaps this should really be directed to Eric...
I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.

Re: Lyrics to ChordPlay

Reply #11
I did a comparison of the official ChordPlay.nw alongside Flurmy's version (which I have named ChordPlay.fl, although it appears that Flurmy never requested a plugin ID). Besides the added chord types, there are a few other enhancements/differences in the two versions, which he noted in the version header:
Quote
-- Version 1.7
-- Flurmy 2021/08/20:
--   extended the allowed chord list
--   allowed the use of the solfeggio style note/chord
--   corrected a bug that crashed the plugin if MusikChordSerif is not available
--   corrected a bug in doFontChange for the font size
I don't know whether the "bug fixes" were ever sent to @NoteWorthy Online to be incorporated into the .nw version.

Re: Lyrics to ChordPlay

Reply #12
don't know whether the "bug fixes" were ever sent to @NoteWorthy Online to be incorporated into the .nw version.
No, Mike, I haven't. I consider NWC abandoned. It's too long we don't have any update, nor even any news.

I have named ChordPlay.fl, although it appears that Flurmy never requested a plugin ID
I must admit I unofficially use the same ID for myself on my PC.  :)
I never requested a plugin ID because, basically, I don't know how to do, and then... see above.  :(


Re: Lyrics to ChordPlay

Reply #13
it appears to me that it is not written to take into account all the possible additional characters in my *dings chord fonts.
At least not yet. I told you I'm lazy!  :)

You seem to have made additions to broaden its capabilities WRT: 4, 4/9, 5+, 7+, 7/9+, -, -7, -7/5+, -6 type chords.
I noticed changes to the code in the comment section near the top of the file, AND in the "chordKeySeqList" section (function?)
Yup!

Do you recall if these the only locations where you needed to make changes?  If so I can probably have a hack at it myself otherwise any pointers you can give would be most welcome.
If I understood what you want to do, then it should suffice.

It would be nice to be able to continue using the extended glyphs in the *chord fonts with ChordPlay without having a spurious <?> appear on chords that ChordPlay doesn't currently understand.

Of course, a good proportion of those glyphs appear in the range of chr$128 to chr$255 and might be problematic to match in the code as straight characters.
I think it's feasible. You're not limited to 127 and you should also be able to go above 255 by using the UTF8 codes.

my font suites seem to have become something of a de-facto standard
And I'm very thankful for it!



 

Re: Lyrics to ChordPlay

Reply #16
Easy for you to say ;)
Oh, yes. And for you to do too.
I think today any serious editor can use UTF8, so you can simply paste an Unicode char (or string) copied from e.g, char map and, pronto, you're done.
Of course, since the editor font presumably is not SwingChord or similar  :D, you'll see the correspondent "standard" char but that's all.