Skip to main content
Topic: ChordPlay.nw (Read 19136 times) previous topic - next topic

Re: ChordPlay.nw

Reply #50
I'm ignorant, so I'm sorry for being picky, but my friends always told me javascript has almost nothing to do with java.
mea culpa.  Corrected pdf sent to Richard.

I did some reading and it seems your friends are quite correct.  I think I'll just take this moment to remind people that I am not a programmer ;)
One should never ass-u-me anything  :))
I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.

 

Re: ChordPlay.nw

Reply #51
Lawrie, you're in good company. Like many, I was fooled too.
Who did choose that name?  ::)

Re: ChordPlay.nw

Reply #52
Lawrie, you're in good company. Like many, I was fooled too.
Who did choose that name?  ::)
My reading revealed the following:
Netscape created a language they originally called LiveScript.  Its purpose was to be embedded into HTML to enable interactivity.  The interpreter was built into Netscape's Navigator.  By the time it was officially released it was renamed JavaScript, probably to try and benefit from Javas popularity at the time.  There are, apparently, some deliberate syntactical similarities with Java.

At about the same time Sun Microsystems released Java (originally Oak, then Green and finally Java).  The initial idea for its development was to enable interactivity for TV's, but that never eventuated.  Later it became a server side language.  Sun, and thus Java are now owned by Oracle Corp..  They also own the JavaScript trademark.

Of course, this is all off topic for this thread ;)
I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.

Re: ChordPlay.nw

Reply #53
I use ChordPlay.nw  a lot. It's so easy to transpose, with the chords being changed along with the notes on the staff.

Sometimes it's useful to be able to change the key of the chords for guitarists using a capo to turn hard chords like E flat into easy ones. So how to transpose the chords without transposing the notes?

I've coded the reverse in a modified version of ChordPlay.nw.nwcuser.lua (taken from version 1.6 at the top of this thread). It provides the option to disable chord transposition. Thus you can create capo chord version by first transposing the notes and chords down, then turn off chord transposition and transpose the staff back.

I've added an option to the right click menu to enable (default) or disable chord transposition. Use it on any chord object and it works on all of them - it's not a per-object setting.

I can't attach files but you'll find it here.

I'm not a Lua programmer, so my code may be clunky - I just followed used what was there with a bit of background reading about the API. If someone wants to pick this up and make it better, please do. Hope somebody else finds it useful.

Re: ChordPlay.nw

Reply #54
I seemed to remember there was a user tool to transpose chords (and only chords).
I was right: adp_TransposeChords.php.
But it's old and only transposes chords entered as text items.
Maybe the best thing would be to update it than to perform all the steps you listed.

Re: ChordPlay.nw

Reply #55
I show that there have been a couple of custom variations of Chordplay.nw created by members here:
  • Chordplay.fl, created by Flurmy, which allowed solfeggio chord names, several additional chord types, and corrected a minor bug
  • Chordplay.lp, created by Lawrie, which extended Flurmy's version by adding a number of SwingChord types, and changed the default font to SwingChord
Most of the changes were made in a backward-compatible way, such that the original object's functionality is still present,

Anyway, there is a facility to embed a user tool within the object itself, so that installing the object automatically adds the tool to NWC's menus. The Chordplay objects all include a tool that converts text chords to ChordPlay objects, but an object can have multiple user tools. Adding a Transpose tool should not be too difficult, I would think. But I am most familiar with object coding; tools were never my strong point.

It would be nice if there were a way to merge most, if not all, of the changes back to the parent object.  But that is an aside.

Re: ChordPlay.nw

Reply #56
But I am most familiar with object coding; tools were never my strong point.
Tools are much simpler than objects; you're not tied at all to the NWC APIs.
But the tool adp_TransposeChords.php is in php and, beside never having really grasped php, I'm now... well, rusty!  :D

It would be nice if there were a way to merge most, if not all, of the changes back to the parent object.  But that is an aside.
Mine, beside being backward-compatible, includes all the Lawrie's additions!
We are already there.

Re: ChordPlay.nw

Reply #57
Mine, beside being backward-compatible, includes all the Lawrie's additions!
We are already there.
The copy I have of Chordplay.fl is dated 8/20/2021, and has a significant number of differences with Chordplay.lp. I just tried to update it to the forum, and it tells me there are no updates available. Did you ever post it in the Object Plugins forum? You do have an official ID now, so you can do this. That way, everyone else will get an updated version when you post changes.

Re: ChordPlay.nw

Reply #58
I'll try to sort it out.   :-[

Lawrie's version implements my changes, not the other way round. Sorry, Lawrie!
But I made some more additions on a newer but unpublished version building on Lawrie's work, and this was what fooled me.

Unpublished because basically I added more different ways to write chords (in Europe, or at least in Italy, we often use chords written quite differently from what was expected by the original plugin).
Furthermore, I added the conversion text-> chordplay also for "solfeggio style" chord names, but it seems there is little request for "solfeggio style" tools.

I didn't change the plugin name because, as I wrote, my updates should be perfectly backward compatible.
Unless, of course, you enjoyed the bugs that are corrected!  :D