Skip to main content
Topic: Breve.hmm (0.6) (Read 11441 times) previous topic - next topic

Breve.hmm (0.6)

Here is a user object that helps with breve notes (double length of whole notes). The plugin should suffice to write the final chords of hymnbook melodies and chants, and maybe some more uses - the examples have some of them. However, it has its limitations, especially if one wants to use ties (not typical with breves), dots (not at all typical with breves), or when playing them.
(The BrevePlayExample needs the Mensurstrich.hmm object - breves go with old music, so this makes sense, I think).

To create a breve, first create two whole notes (semibreves), then place this object to the left of the first semibreve, and finally change the noteheads of both semibreves to blank heads (by selecting both and then e.g. pressing Q B on the keyboard). In the editor, two small vertical lines indicate the position of the now indiscernable two notes - which are, however, technically not "hidden": The reason for this is that NWC will do layouting with the two semibreves, and the breve notehead can be placed accordingly.

The second semibreve can also be a whole rest, or actually any item. The second item is only used by NWC to reserve space for the complete breve. Using a hidden rest as the second item is useful if the breve is tied to another note - however, the ties are not really placed nicely.

The drawing of the noteheads is controlled by available fonts and user selected options: If fonts from Lawrie Pardy's *Dings suites are installed, one can use square and "double bar" noteheads from them. By default, the plugin looks for the fonts MusikDingsSerif and then MusikDingsSans; if neither is found,

  • the double bar notehead is taken from the standard NWC font;
  • the single bar notehead is drawn as a semibreve (whole) notehead with a line on each side;
  • the square notehead is created by two Times New Roman letters 'I' that are rotated by 90 degrees (which makes the notehead a little too short).

It is also possible to have chords of breves, and even chords with two durations do somehow work.

Last, there is also some support for playing. By default, the object is muted, but it can be unmuted. In that case, the two blank semibreves should be muted. Playing does not work with chords with two duration and restchords. Performance marks like staccato etc. are not considered when playing.

This user object does not (yet?) work nicely with the Cueheads.ms object, because that object also uses blank note heads.

H.M.

Re: Breve.test (0.1)

Reply #1
The "square" notehead is created with two letters "I" of font "Times New Roman" lying on their side; it is barely acceptable - but I did not want to design full bezier curve layouts for this single symbol.
No need.
You can find it in NWC2STDA, char 61531.

Re: Breve.test (0.1)

Reply #2
Hey there HM, FWIW there are breves in my *Dings suites.  Checkout the name fonts E.G. SwingDings.ttf, MusikDingsSans.ttf and MusikDingsSerif.ttf

There is also a modern form of the breve in NWC2STDA.TTF  (2 vertical lines, a notehead like a semibreve and 2 more vertical lines)

Perhaps they will make things a little easier.



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

Re: Breve.test (0.1)

Reply #3
That's why I like this ".test" idea - try something out, get told that there are better ways - improve, rinse & repeat until it's finally something which might be usable :)

Thanks to both of you - we'll drive home now (5 hours drive) ... then I'll use this glyphs.

H.M.

Re: Breve.test (0.1)

Reply #4
This user object does not work nicely with the Cueheads.ms object, because that object also uses blank note heads.
It would certainly be possible for CueHeads.ms to detect Breve.hmm and adjust its behavior accordingly (i.e. suppress its drawing when that object is found).

Re: Breve.test (0.1)

Reply #5
A further suggestion for you to consider. I assume you are using a blank notehead for the semibreves so that NWC will still reserve space in the layout. However, since you are placing the user object at each breve location, it can specify its own width via the "width" hook. In that case, you can mark the actual semibreve chords as hidden, and avoid interaction with CueHeads.ms.

This is just a theoretical suggestion, which I haven't tried.

Re: Breve.test (0.1)

Reply #6
.. doing a short break, so I'm online :)

(a) CueHeads detecting Breve should be possible - I already thought of this, but the creators of both would have to disucuss this :)

(b) Implementing width and marking the chords as hidden: I actually started with this, but it did not work out at all (maybe I did not try all possibilities). The main problem is that hidden notes are not aligned by NWC with other notes, and therefore it is alsmost impossible to place the breves lined up with notes on other staffs; it gets worse with (*) accidentals, (*) the "increase spacing" option in the page setup, (*) lyrics (breves are mostly useful for vocal music) etc. That's why I ended up with the blank noteheads ...

(In the course of this and - upcoming - considerations about RepeatMarks, I would wish that (x) NWC had more than one - distinguishable - "quite" blank heads; and (y) a way to insert additional, note-aligned spacers when drawing (my idea would be that width(t) could return some more sophisticated result ... but that's long-term ...)

H.M.

Re: Breve.test (0.1)

Reply #7
(a) CueHeads detecting Breve should be possible - I already thought of this, but the creators of both would have to discuss this :)
This should certainly be possible, since we are doing it now :)
(b) Implementing width and marking the chords as hidden: I actually started with this, but it did not work out at all (maybe I did not try all possibilities). The main problem is that hidden notes are not aligned by NWC with other notes, and therefore it is alsmost impossible to place the breves lined up with notes on other staffs; it gets worse with (*) accidentals, (*) the "increase spacing" option in the page setup, (*) lyrics (breves are mostly useful for vocal music) etc. That's why I ended up with the blank noteheads ...
In my experience, while NWC does remove all space for a note on the current staff when you mark it as not visible. However, when there are multiple staves, it does seem to keep them lined up with the same note position on the other staves. But maybe I am mistaken.
(In the course of this and - upcoming - considerations about RepeatMarks, I would wish that (x) NWC had more than one - distinguishable - "quite" blank heads; and (y) a way to insert additional, note-aligned spacers when drawing (my idea would be that width(t) could return some more sophisticated result ... but that's long-term ...)
I know what you mean, and I agree. Another suggestion that has been offered in the past is to have "transparent" as one of the notehead colors. This is a bit different than what a blank space notehead does, since that only "hides" the notehead, not the accidental or augmentation dots associated with a notehead.

Re: Breve.test (0.1)

Reply #8
In my experience, while NWC does remove all space for a note on the current staff when you mark it as not visible. However, when there are multiple staves, it does seem to keep them lined up with the same note position on the other staves.
Mhm - I wrote a minimal user tool + example (see attachments) to check what happens - the result is quite chaotic even with two staffs, I think.
// Edit: ... but for whole notes only, the alignment should work - with the exception of a dotted whole note on another staff, I assume. However, I would also like my breves to be aligned usefully for a single staff ...

But back to the breves: I honestly tried using the letters in various fonts for the "square" notehead - but nwcdraw.text does not output characters with code > 127  >:( ... does anyone know why this might be the case? (the breve heads are at 177 in Lawrie's suites). I have uploaded a version 0.2 which would support these chars, but - well - it does not work :(

And I have another question: Can a plugin somehow detect whether a font is actually installed? .setFont does not return any "success" value, and even querying .getTypeFace() afterwards just returns the set typeface, even if it is 'asdfghj' or some other nonsense. This seems to be the way the Windows font system works ... but I would like to give the user some - any - feedback if the square breve head cannot be drawn (my ugly kicked-over I's, on the other hand, always work ... as long as a "Times New Roman" font is present ...).


Re the ready-made glyphs (whole notehead and 2 or 4 vertical bars): I do, right now, not bother that much with them - drawing the bars is really no problem; and I started the whole object actually only because of the square head (I only found out later about the other ones - we do not use them here). But of course, I might use them if my primary problems are solved ...

H.M.


Re: Breve.test (0.2 - experimental)

Reply #10
Isn't the last version Unicode compatible?
I was thinking so since the experiments
Ah - but this is my problem! I have to output UTF-8 bytes via Lua, not a single byte ... will take a few minutes ... very many thanks for that hint!

// Edit
... and version 0.3 now outputs Lawrie's noteheads :) - thanks again for your hint, @Flurmy !

H.M.

Re: Breve.test (0.3)

Reply #11
Good but...
If in "BreveSquareHeads.nwctxt" you change "single bars" with any "Dings" then the size of each note of the chord is different.

N.B. "BreveSquareHeads.nwctxt" and "BreveSquareHeads.nwctxt" complain about missing the "Germanic" fonts while "BrevePlayExample.nwctxt" says "Detected 1 unknown user objects in BrevePlayExample.nwctxt" ("Mensurstrich.hmm").

Re: Breve.test (0.4)

Reply #12
Thanks for the tight quality assurance loop ;)

  • Size problem should be fixed with 0.4.
  • Germanic and Euro fonts removed from examples, but ...
  • ... I left the dependency on Mensurstrich.hmm in the Play example - after all, the time of breves was also the time of no bars in music, i.e., where we now insert those small Mensurstriche.

All the x/y coordinates are still "arrived at by optical heuristics" - i.e., looking whether the heads end up about where I expect them. I am not sure whether there is some more analytic method ...

H.M.

Re: Breve.test (0.1)

Reply #13
And I have another question: Can a plugin somehow detect whether a font is actually installed? .setFont does not return any "success" value, and even querying .getTypeFace() afterwards just returns the set typeface, even if it is 'asdfghj' or some other nonsense. This seems to be the way the Windows font system works ... but I would like to give the user some - any - feedback if the square breve head cannot be drawn (my ugly kicked-over I's, on the other hand, always work ... as long as a "Times New Roman" font is present ...).
Try this function: https://lua.noteworthycomposer.com/plugin/nwc.md#hasTypeface

Re: Breve.hmm (0.5)

Reply #14
With your help, I have now finished the Breve object - therefore, it has now proceeded from status .test to .hmm. The changes in the 0.5 version are

  • the separation of the notehead from the drawing method;
  • for "double bar" noteheads, installed *Dings fonts and the standard NWC font are used (explicitly by the user and implicitly, based on availability); for "square" noteheads, installed *Dings fonts are used; "single bar" noteheads are always drawn as a semibreve head with two lines, as this symbol is not available in any font - as a consequence, there is now a huge if-then-else machinery for glyph selection;
  • a number of symbol positionings are now better than before;
  • correct support if another NWC note font is selected (an example with NWC2SwingDings notes shows this);
  • and there is an example file AllBreveHeads.nwctxt showing all possible heads (but not over all fonts);

Mike, you could - if you wanted - now tweak CueHeads a little to make it aware of this object ...

H.M.

Re: Breve.test (0.1)

Reply #15
... Another suggestion that has been offered in the past is to have "transparent" as one of the notehead colors. This is a bit different than what a blank space notehead does, since that only "hides" the notehead, not the accidental or augmentation dots associated with a notehead.
Just a quick note, you probably know you can hide accidental signs by hitting 7, 8 or 9 a second time.

Re: Breve.test (0.4)

Reply #16
... I left the dependency on Mensurstrich.hmm in the Play example
I was thinking that plugin was not published.
Sorry, it's my fault. I didn't install it.


Re: Breve.test (0.1)

Reply #17
Just a quick note, you probably know you can hide accidental signs by hitting 7, 8 or 9 a second time.
Well, sure, but that's not really "hiding" the accidentals, it's removing them. Which is fine if you are only worried about the score looking right, but if you remove them, it probably won't play correctly anymore.

Re: Breve.test (0.1)

Reply #18
Well, sure, but that's not really "hiding" the accidentals, it's removing them.
If you just want to hide one, try this:
Code: (nwc) [Select · Download]
!NoteWorthyComposerClip(2.751,Single)
|Note|Dur:4th,Grace|Pos:b0|Opts:Muted|Visibility:Never
|Note|Dur:4th|Pos:0
!NoteWorthyComposerClip-End
Registered user since 1996

Re: Breve.hmm (0.6)

Reply #19
Version 0.6 shows some more or less explanatory symbols if the subsequent semibreves (whole notes) are missing or dont have blank heads; I, as the author, was astonished when "nothing" was visible (and, of course, too lazy to read the help text). Maybe this helps to trigger someone using this and seeing nothing to look in the help ...

H.M.

Re: Breve.hmm (0.6)

Reply #20
Hi
I've just been using the Breve object plugin for the first time - and it seems to work very nicely for notes that are on the stave.
But for notes on a leger line (Middle C in particular) the right hand end of the leger line is missing!
This is with the default (round) notehead and happens with both single and double bars.
Am I doing something wrong?
Graham

 

Re: Breve.hmm (0.6)

Reply #21
No...o - it sees very much that I (my code) does something wrong (or not at all). I have to check why I overlooked this ... I'll be back.

H.M.