NoteWorthy Composer Forum

Forums => Tips & Tricks => Object Plugins => Topic started by: hmmueller on 2018-05-12 04:40 pm

Title: Beam.hmm (0.8)
Post by: hmmueller on 2018-05-12 04:40 pm
NWC is missing cross-staff beams, unison beams, more complex grouping (where some group have one running beam, others two), overhanging fractional beams, beam groups for speed variation, stemlets, single notes with beams, and double beams (double stem chords with beams on both sides). I thought this could be remedied by creating a versatile Beam object, which is attached to this posting.
In addition, there are ten example files, which mainly use examples from "Behind Bars":


The remaining examples are attached to the next posting.

The maximum span for a Beam object is 16 notes and rests. If a longer beam group is needed, two or more overlapping beam objects can be defined (see example in "ComplexGrouping.nwctxt").

Breaking beams at a line break does not work - you have to provide a separate Beam object for each line.

(If you possess "Behind Bars", I am interested in whether you see problems with my example scores; and if you have suggestions for interesting examples I could or should add).

H.M.
Title: Re: Beam.test (0.8)
Post by: hmmueller on 2018-05-12 05:55 pm
0.2 has an additional property to keep non-through-running beams together - the problem came up with an example on page 315 of B.B.

Here are the five remaining example files:


H.M.
Title: Re: Beam.test (0.2)
Post by: Mike Shawaluk on 2018-05-12 06:01 pm
Quite impressive. I have a very small suggestion: for your "spin" function (to alter the final stem length), you should use an increment/decrement of 0.5, to match the step value for the parameter on the properties window.

I look forward to experimenting with this new object.

Mike
Title: Re: Beam.test (0.3)
Post by: hmmueller on 2018-05-12 06:19 pm
0.3 has rounding at some crucial places, so that one can always (I hope) create horizontal beams; and, after the suggestion of Mike, the spinner now uses 0.5 increments. Also, I added another example file.

H.M.
Title: Re: Beam.hmm (0.4)
Post by: hmmueller on 2018-05-16 06:33 am
I have now upgraded the Beam object from .test to .hmm. There are quite a few changes for this first "production ready" version:


As always, I'm happy about any comments!

H.M.
Title: Re: Beam.hmm (0.4)
Post by: David Palmquist on 2018-05-16 07:52 am

Looking forward to seeing your examples, HMMM, but I can't see any of these beam variations in the nwctxt files I downloaded/opened. 

It seems to be a matter of not having the right fonts, or just not having set the fonts up in Page Setup. 

What are the font settings?
(It might be a good idea to add a small note to the tool popup saying which fonts are needed.)

David 

This might be good to explain

What fonts . 
Title: Re: Beam.hmm (0.4)
Post by: hmmueller on 2018-05-16 08:16 am
Hi -

I don't think it has to do with fonts. First, the .nwctxt files do contain the font names embedded, so one should see in the page setup whether there would be any unusual fonts.
But second and more important, I do not use fonts, but rather draw the beams with NWC's plugin machinery (in concrete, the nwcdraw module; the code for drawing a beam is copied verbatim from the nwcdraw documentation (https://lua.noteworthycomposer.com/plugin/nwcdraw.md#intersectBeam)).

Just to make sure - I use NWC version 2.75a.2.

And I have attached an image on how "Stemlets.nwctxt" looks in my NWC ... what does yours look like?

//Edit:
Do you see any alerts - either

H.M.
Title: Re: Beam.hmm (0.4)
Post by: Flurmy on 2018-05-16 08:58 pm
I do not use fonts
Not completely exact: CrossStaffBeams.nwctxt uses MusikChordSansGermanic.
But after having said so, I agree with you: I don't think it has to do with fonts.
(N.B. Everything is fine here with XP.)
And... thank you for all your work!
Title: Re: Beam.hmm (0.4)
Post by: hmmueller on 2018-05-17 06:19 am
Not completely exact: ...
Ah - I meant the Beam plugin itself. But thanks for that hint - I'll remove that incidental dependency in an example. & thanks for the confirmation that it works on (at least) one other computer :)

H.M.
Title: Re: Beam.hmm (0.4)
Post by: Peter Edwards on 2018-05-17 08:13 am
Interesting that we can now produce the correct spacing between beams (a quarter of a staff space). But not terribly useful until NWC does the same for ordinary beams, or at least offers the option.
Title: Re: Beam.hmm (0.4)
Post by: David Palmquist on 2018-05-18 08:17 am
Hi -
...I don't think it has to do with fonts. First, the .nwctxt files do contain the font names embedded, so one should see in the page setup whether there would be any unusual fonts.
But second and more important, I do not use fonts, but rather draw the beams with NWC's plugin machinery (in concrete, the nwcdraw module; the code for drawing a beam is copied verbatim from the nwcdraw documentation (https://lua.noteworthycomposer.com/plugin/nwcdraw.md#intersectBeam)).

Just to make sure - I use NWC version 2.75a.2.

And I have attached an image on how "Stemlets.nwctxt" looks in my NWC ... what does yours look like?

//Edit:
Do you see any alerts - either
  • when opening NWC (which would indicate a problem with Beam.hmm's source code),
  • or when opening an example .nwctxt file (which would either indicate that Beam.hmm is not installed at the expected folder, or again an error in the source code which for some reason does not occur on my computer)?

H.M.
1.  I don't have MusikChordSansGermanic and it isn't listed in the Fonts section of the Scriptorium.  Where can I download it? Does it need to be set up as Userfont1, or something else in Page Setup Fonts?
2.  I also use NWC version 2.75a.2.
3.  Alert = "Detected 4 unknown user objects in Stemlets.nwctxt"
4.  See attached Stemlets.PHN (9.79 KB) 
5.  I opened the nwctxt file in an already open NWC2 session.  NWC2 never generates error messages for me when I open the program.

d




Title: Re: Beam.hmm (0.4)
Post by: hmmueller on 2018-05-18 09:19 am
1.  I don't have MusikChordSansGermanic and it isn't listed in the Fonts section of the Scriptorium.  Where can I download it? Does it need to be set up as Userfont1, or something else in Page Setup Fonts?
Dont set it up - I'll repair the examples so that they dont need it ... just my error. But this is no problem for your scores.

3.  Alert = "Detected 4 unknown user objects in Stemlets.nwctxt"
If you go to Tools-->Options-->Folders, what is the folder near "Object Plugins"? Is this exactly the folder where you installed (copied) the Beam.hmm.nwcuser.lua file to?

4.  See attached Stemlets.PHN (9.79 KB) 
Thanks - that's why I am quite sure that the plugin is "somewhere else" than NWC looks for plugins.

5.  I opened the nwctxt file in an already open NWC2 session.  NWC2 never generates error messages for me when I open the program.
Good to know! - if that had happened, there would be an error in some source code which NWC finds on startup.

I hope that helps ...

H.M.



Title: Re: Beam.hmm (0.4)
Post by: Lawrie Pardy on 2018-05-18 09:47 am
1.  I don't have MusikChordSansGermanic and it isn't listed in the Fonts section of the Scriptorium.  Where can I download it? Does it need to be set up as Userfont1, or something else in Page Setup Fonts?

Hi David, though you don't really need it for this, it is available as part of an optional suite upgrade I did in 2009:
http://zoundz.pardyline.com.au/SupportFiles/Fonts/ChordFontsDoSiGermanic.zip

The link is on the Scripto in the same place as my other suites:
https://nwc-scriptorium.org/helpful.html#Fonts
Title: Re: Beam.hmm (0.4)
Post by: hmmueller on 2018-05-18 04:21 pm
I have now looked into the plugin and into the examples - none of them contains any string that contains the letters "German" anywhere. So how can it be David stumbles over that font??? :o - any help is appreciated!

H.M.
Title: Re: Beam.hmm (0.4)
Post by: Mike Shawaluk on 2018-05-18 04:45 pm
File CrossStaffBeams.nwctxt still has Germanic fonts specified as User1 and User5.
Title: Re: Beam.hmm (0.4)
Post by: hmmueller on 2018-05-18 05:11 pm
Thanks (I had a wrong option in my string search ...) - I have now replaced the file with one that has all User Fonts set to Times New Roman.

H.M.
Title: Re: Beam.hmm (0.4)
Post by: David Palmquist on 2018-05-18 10:20 pm
...If you go to Tools-->Options-->Folders, what is the folder near "Object Plugins"? Is this exactly the folder where you installed (copied) the Beam.hmm.nwcuser.lua file to?

Hi H.M.,
You hit the nail on the head.  I didn't know I had to download/install the LUA file.  The demo files open correctly now. Good stuff!
Thank you.
d

Title: Re: Beam.hmm (0.4)
Post by: David Palmquist on 2018-05-18 10:29 pm
Hi David, though you don't really need it for this, it is available as part of an optional suite upgrade I did in 2009:
http://zoundz.pardyline.com.au/SupportFiles/Fonts/ChordFontsDoSiGermanic.zip

The link is on the Scripto in the same place as my other suites:
https://nwc-scriptorium.org/helpful.html#Fonts

Hi Lawrie, thanks! 
Don't know how I missed it.  I'll blame it on my recent retina surgery.
d



Title: Re: Beam.hmm (0.5)
Post by: hmmueller on 2018-05-30 06:36 am
Version 0.5 has improved support for double beams. The example file DoubleBeams.nwctxt (attached to the second posting of the thread) shows that one can (or could) now write typical SATB scores without layered staffs, even if there are parallel runs of eighths - for example, Händel's "See, the conqu'ring hero comes" (in Germany, this melody is mainly known as a Christmas song "Tochter Zion", with lyrics by F.Ranke).

However, the plugin does not yet work correctly on double-stemmed chords with two different durations - it always takes the shorter duration, instead of the one of the "right stem". I suspect fixing this requires a major rewrite, so it may make some time.

H.M.
Title: Re: Beam.hmm (0.6)
Post by: hmmueller on 2018-06-04 07:51 pm
Version 0.6 has an additional option "one beam less", which draws one beam less than the tails of the notes request. This can be useful for drawing certain tuplets.
Title: Re: Beam.hmm (0.6)
Post by: Richard Woodroffe on 2018-08-29 02:53 pm
There seems to be so much in this object which needs lots of investigation, all in due time.

But of course, the real winner is when you get it to do something that you personally want to achieve and Noteworthy does not yet support.

This happened for me today when I realised that I could use beam.hmm to achieve cross bar line beaming.
For those of you that have tried doing this, you will know that the page printing mechanism can easily go disastrously awry when employing tricks to achieve a beam across a bar line.

So - thank you Harald for a use that you did not specify (at least I don't think you did) when introducing your object plugin (Cross staff mentioned - not cross bar line)


Title: Re: Beam.hmm (0.6)
Post by: hmmueller on 2018-08-29 07:43 pm
... for a use that you did not specify ...

Well, no, I did not specify it, and didn't think of it! As a writer of a plugin, it feels like a real winner when someone else finds a good new use of a plugin ... so thank you for this! When I find time, I might/should add an example for this also to the initial posting(s) ... and check out a littel what happens at line and page breaks ... ...

H.M.
Title: Re: Beam.hmm (0.8)
Post by: hmmueller on 2019-03-26 07:59 pm
With just a handful of changed lines, version 0.7 makes it possible to limit the number of beams at a note to a fixed number of zero to three beams, irrespective of the actual note length.

This is very useful for two-stemmed chords. Actually, the beam object could always be applied twice to two-stemmed chords - however, up to now it looked only at the shorter note length for beaming both stems. With the new options for drawing a fixed number of beams, one can now also draw the correct number of beams for the longer note length.

The additional option to draw zero beams is useful if a two-stemmed chord does not require a beam for its longer note: The beam object now nicely draws the stem for the non-beamed note (which is not drawn by Noteworthy, as overriding the stem to zero removes both stems).

The attached example (also attached to the second posting of the thread for completeness) shows a two-stemmed chord at the beginning of the measure, with two beam objects applied to it: The upper has fixed number of zero beams and therefore only draws the stem for the half note; the lower one takes care of the beam for the eights. However, at the fifth eighth, another two-stemmed chord with a sixteenth tries to interfere. But the beam object for the lower notes here fixes its number of beams to 1, so that no fractional beams for a sixteenth are drawn. In the meantime, yet another beam object connects the four sixteenths on top with two beams.

H.M.
Title: Re: Beam.hmm (0.8)
Post by: hmmueller on 2019-03-28 09:26 am
A small change in version 0.8 now makes RestChords behave as expected - see the (modified) example in the previous posting.

H.M.

P.S. ... but the spacing of the dot and the notes is not nice. This is probably still a kludge, at least in more complexe cases like these.
Title: Re: Beam.hmm (0.8)
Post by: hmmueller on 2019-03-28 09:38 am
... and I just found another use for this object with the 0.7 modifications: Creating a double-stemmed chord with different stem lengths (which, AFAIK, NWC does not support out of te box). See attached example!