Skip to main content
Topic: Slur.ms (2.1) (Read 25220 times) previous topic - next topic

Slur.ms (2.1)

This object can be used to draw slurs of various types and shapes. Here are its properties:

Note Span: Number of notes to span. Default = 2
Line Type: Type of line (solid, dash, dot). Default = solid
Direction: Direction of slur (Default, Upward, Downward). Default = 'Default', which uses the starting note's Slur Direction property.
Start Offset X:
Start Offset Y:
Used to adjust the starting point of the slur. Each coordinate is between -100 and 100. Default = 0, 0
End Offset X:
End Offset Y:
Same as above, except for the ending point of the slur.
Strength: Strength of the curve; a positive value between 0 and 100. Default = 1
Balance: Left/right balance of the curve's shape; a value between -0.5 and 0.5. Default = 0 (center)

To add a slur to your score, position the cursor immediately before the note where you want the slur to start, and insert the object.

The following keys can be used to interactively adjust various parameters, while the Slur object marker is selected:
  • + and - increment/decrement the Note Span parameter.
  • The 5 key actives "edit" mode and toggles the current parameter pair between the left, middle and right ends of the slur. Square "edit" boxes will appear on the slur when edit mode is active, and the current parameter pair will be indicated by a filled in box.
  • The 2, 4, 6 and 8 keys will move the selected point in the specified direction. For the slur's left and right end points, the keys increment/decrement the slur's Start Offset X & Y and End Offset X & Y, respectively. For the middle point, the slur's Strength and Balance are adjusted. For keyboards with a numeric pad, these keys are generally labeled with arrow symbols in the specified direction.
  • The 3 and 9 keys (labeled as PgDn and PgUp on the numeric pad) will move the entire slur downward or upward, by simultaneously adjusting both endpoints.
  • The 0 key will reset the selected parameter to its default values (0, 0 for start or end offset, 1, 0 for Strength/Balance)
  • Pressing Shift-Z will reset all of the offset, strength and balance parameters to their default values.

Please note that the slur object is ornamental only, and has no effect on note playback or lyric placement.

Following are a few notes on its usage:
  • The Note Span property indicates the number of notes you want the slur to cover. By default, it will be the first two notes that follow the object.
  • The default end point positions for the slur are calculated based on the starting note's stem direction and Slur Direction property, and the slur object's Direction property. The above start and end offsets adjust these positions relative to their default locations.
  • The Strength property adjusts the amount of curvature of the slur. A value of 0 will result in a straight line.
  • When the Line Type property is set to 'solid', the slur will be drawn as a shaped Bézier curve, similar in appearance to regular NWC slurs. When a value of 'dot' or 'dash' is used, the line will be of uniform thickness.

Re: Slur.ms (version 0.96)

Reply #1
The Slur.ms user object has been updated, with the following changes:

  • Minor end point adjustments, to align with current NWC slur changes

Please refer to the parent post for a description of the available parameters.

As always, feedback and suggestions are greatly appreciated.

Mike

Re: Slur.ms (version 1.0)

Reply #2
It feels funny to be posting a bug report on my own object, but this is a sort of "heads up" to let people know that I may be making a fix soon, that could affect how slurs behave in other peoples' scores.

I've noticed that the default end point positions for certain types of notes are not "optimal". Generally, this happens with chords that have adjacent noteheads, both for normal and split-voice chords. It is most noticeable when the slur direction is explicitly set to Upward or Downward. Following is a clip that demonstrates both correct and incorrect placement.

There is logic in the object to detect the stem and slur directions of the starting and ending notes, that attempts to determine the best default end point placement. However, that logic isn't working correctly for the note types mentioned, so the user needs to use the start and end offset values to correct things.

I could leave the object as is, and let users adjust the slurs manually in these circumstances, but that doesn't seem like the correct course of action to me. However, I realize that if I change any of the rules, then users who have already tweaked slurs to look correct for these situation may need to "untweak/retweak" them.

If you use this object and have any feedback, comments or suggestions, I'd very much appreciate them.

Thanks,
Mike
Code: (nwc) [Select · Download]
!NoteWorthyComposerClip(2.75,Single)
|User|Slur.ms|Pos:-1
|User|Slur.ms|Pos:0|Dir:Downward
|Chord|Dur:4th|Pos:-1,0|Opts:Stem=Down
|Chord|Dur:4th|Pos:1,2|Opts:Stem=Down
|User|Slur.ms|Pos:1|Dir:Downward
|User|Slur.ms|Pos:-1
|Chord|Dur:4th|Pos:3|Opts:Stem=Up|Dur2:4th|Pos2:2
|Chord|Dur:4th|Pos:0|Opts:Stem=Down|Dur2:4th|Pos2:1
!NoteWorthyComposerClip-End

Re: Slur.ms (version 1.0)

Reply #3
I think the end result of the clip should be as below.
Two points:
Notes on a single stem should only have one slur, but in this instance the slur ending needs to be extended by one unit – in other words: where you would expect it to be with or without the extra notes. (But this is not the case for an upward stem :( )
In the second pair, obviously the slur shouldn't cross the stem.

FWIW I'd make the changes  ;)

Code: (nwc) [Select · Download]
!NoteWorthyComposerClip(2.75,Single)
|User|Slur.ms|Pos:-1|EndOffsetX:1
|Chord|Dur:4th|Pos:-1,0|Opts:Stem=Down
|Chord|Dur:4th|Pos:1,2|Opts:Stem=Down
|User|Slur.ms|Pos:1|Dir:Downward|StartOffsetX:1
|User|Slur.ms|Pos:-1
|Chord|Dur:4th|Pos:3|Opts:Stem=Up|Dur2:4th|Pos2:2
|Chord|Dur:4th|Pos:0|Opts:Stem=Down|Dur2:4th|Pos2:1
!NoteWorthyComposerClip-End

Re: Slur.ms (version 1.0)

Reply #4
I think the end result of the clip should be as below.
Two points:
Notes on a single stem should only have one slur, but in this instance the slur ending needs to be extended by one unit – in other words: where you would expect it to be with or without the extra notes. (But this is not the case for an upward stem :( )
In the second pair, obviously the slur shouldn't cross the stem.

FWIW I'd make the changes  ;)

Thanks for the feedback and examples, Peter. One change I would make to your first slur is to move the left end point so it is over the "strong" stem side notehead. I.e. so it displays the same as a native slur. The main change I plan to make to the logic is to correctly detect strong vs. weak stem side note heads, which NWC already does correctly for native slurs. In general, the slurs created by Slur.ms should look identical to native NWC slurs when on the notehead side, and should be almost the same on the stem side (I tend to choose to place the vertical location closer to the notehead by default).

Thanks again,
Mike

Re: Slur.ms (1.1)

Reply #5
The Slur.ms user object has been updated, with the following changes:

  • End point adjustments to more correctly handle split stem chords and notes on the stem's weak side

Please refer to the parent post for a description of the available parameters.

Re: Slur.ms (1.1)

Reply #6
When I copied a "slur" object (ctrl-C, ctrl-V) to another position, I got the error

Slur.ms.nwcuser.lua:110: attempt to perform arithmetic on local 'x2' (a nil value)

in the "Alert Log."
(Moreover, I had to copy this text manually - it seems that it is not possible to copy-paste from the Alert Log :( )

Regards
Harald M.


Re: Slur.ms (1.1)

Reply #8
Thx :) - learned something ...

Re: Slur.ms (1.1)

Reply #9
When I copied a "slur" object (ctrl-C, ctrl-V) to another position, I got the error

Slur.ms.nwcuser.lua:110: attempt to perform arithmetic on local 'x2' (a nil value)

in the "Alert Log."
(Moreover, I had to copy this text manually - it seems that it is not possible to copy-paste from the Alert Log :( )

Regards
Harald M.

Hello Harald,

Are you able to reproduce this error consistently? It seems to be very sporadic; I have gotten it to happen once after doing many copy operations, but now I can't make it occur again. It would help if you tell me what kind of notes were at the destination site (where you were copying the slur object). I am pretty sure I know the cause of the error, but I want to make sure the error won't occur once I put a fix in place.

Never mind, I can reproduce it now. Working on a fix.

Thanks,
Mike


Re: Slur.ms (1.1)

Reply #11
If the end of the span is a Rest, then this error will always occur. It is caused by:

Code: (lua) [Select · Download]
local x2 = endNote:xyStemAnchor(endStem)
It will also happen if the first "note" is a rest. (but it errors on the previous line, due to the x1 assignment)

I am surprised it took this long for someone to discover this.

Re: Slur.ms (1.2)

Reply #12
The Slur.ms user object has been updated, with the following changes:

  • Numerous bug fixes and adjustments to correctly handle slurs on rests and various split voice chord types.

Please refer to the parent post for a description of the available parameters.

Mike

Re: Slur.ms (1.3)

Reply #13
The Slur.ms user object has been updated, with the following changes:

  • New parameter "Balance" has been added, which can be used to further shape the slur.

In addition to the new parameter, I have added an experimental "interactive parameter adjustment" mode, using the object's right-click menu and the + and - "spin" keys. Saying more would spoil the fun - try it out and let me know what you think.

Mike

Re: Slur.ms (1.3)

Reply #14
Great update Mike.  Being able to make the Noteworthy slur invisible and then adding a "Slur.ms slur"  gives the best of all options for shaping, style, playback and lyric control.

Rich.

Re: Slur.ms (1.3)

Reply #15
Kudos to Mike!
But, call me insatiable, I long for when the native slurs will have that flexibility.
Having to hide the "real" slur (or maybe substituting it with a hidden "legato" and ending them with "semplice"), then adding the slur object and adjusting it as needed each time is quite cumbersome. I'll do it just in case of "emergency".
Eric?


Re: Slur.ms (1.5)

Reply #17
The Slur.ms user object has been updated, with the following changes:

  • "Span" values that exceed the number of available notes will no longer result in a hidden slur.
  • "Strength" maximum value has been increased from 10 to 100.
  • The middle anchor box during parameter adjustment is now positioned on the curve, rather than above/below it.
  • Menu has been expanded and restyled: all parameters can be adjusted.
  • The mechanism for showing/hiding the parameter adjustment anchor boxes is now more consistent.

Mike

Re: Slur.ms (1.6)

Reply #18
The Slur.ms user object has been updated, with the following changes:

  • Minor parameter adjustment and menu improvements
  • Parameter adjust anchor boxes are now visible only in edit mode

Mike

Re: Slur.ms (1.6)

Reply #19
Hi Mike, all -

what is the "best practice" regarding long slurs that possibly/probably/certainly will go over (automatic) line breaks?

The (IMHO) greatest feature of NWC is that one does in general nothing to get acceptable line breaks. This is a wonderful thing that makes work much easier for many typical "internal use scores". NWC's slurs work nicely over such automatic line and page breaks - the slur plugin, as far as I can see, does not (yet?) support continuing of slurs after a break. I would not want to add new slur objects exactly at (after) each break, especially as I usually create different printouts from one score with different breaks. Is there something I'm supposed to do instead?

(Ah - of course: Use the slur object only for slurs not going over a bar boundary ... makes them somewhat less usable than they could be - especially as the NWC slurs are not that beautifully bowed when long).

Thanks!
Harald


Re: Slur.ms (1.6)

Reply #20
I just saw this:
... Being able to make the Noteworthy slur invisible and then adding a "Slur.ms slur"  gives the best of all options for shaping, style, playback and lyric control.

I do not know a way to "make the Noteworthy slur invisible" - how would that work?

Thanks!
Harald

Re: Slur.ms (1.6)

Reply #21
Hi Mike, all -

what is the "best practice" regarding long slurs that possibly/probably/certainly will go over (automatic) line breaks?

The (IMHO) greatest feature of NWC is that one does in general nothing to get acceptable line breaks. This is a wonderful thing that makes work much easier for many typical "internal use scores". NWC's slurs work nicely over such automatic line and page breaks - the slur plugin, as far as I can see, does not (yet?) support continuing of slurs after a break. I would not want to add new slur objects exactly at (after) each break, especially as I usually create different printouts from one score with different breaks. Is there something I'm supposed to do instead?
I am currently working on a way to allow Slur.ms and SlurCubic.ms to span systems, based on suggestions I've gotten from Eric. The programming is a bit tricky (at least to me) so stay tuned while I work out the kinks.

Thanks,
Mike

Re: Slur.ms (1.6)

Reply #22
I just saw this:
... Being able to make the Noteworthy slur invisible and then adding a "Slur.ms slur"  gives the best of all options for shaping, style, playback and lyric control.
I do not know a way to "make the Noteworthy slur invisible" - how would that work?
Thanks!
Harald
To make a native slur invisible, insert a Marker before the first note of the slur, and set the Visibility of the Marker to "Never".

Re: Slur.ms (1.6)

Reply #23
Thank you! ... ... and thank you!!
Harald

Re: Slur.ms (1.6)

Reply #24
In creating a "muted, displayed" staff, I had a trilled half-note slured into a pair of graced 16ths that did not slur into the following measure.  The tool did exactly what was needed.  :)
Since 1998

Re: Slur.ms (1.6)

Reply #25
The Slur.ms user object has been updated for version 2.75a, with the following changes:

  • An embedded user tool has been added, which allows a slur to be added for a selection.
  • Interactive editing of the object's parameters has been added, using the numeric keypad.

Re: Slur.ms (2.1)

Reply #26
Hi Mike
I was trying to work with the slur today but having trouble because when I removed the nwc slur then the lyrics got messed up. Can you talk me through the process? Was I doing it wrong?


Re: Slur.ms (2.1)

Reply #27
when I removed the nwc slur then the lyrics got messed up.
One solution is to keep the slur and hide it with a Marker.
Code: (nwc) [Select · Download]
!NoteWorthyComposer(2.751)
|AddStaff|Name:"Staff"
|StaffProperties|EndingBar:Open (hidden)|BoundaryBottom:16
|Lyrics|Align:Standard Rules
|Lyric1|Text:"a b\n"
|Marker|Pos:0|Visibility:Never
|Note|Dur:4th,Slur|Pos:0
|Note|Dur:4th|Pos:1
|Note|Dur:4th|Pos:2
!NoteWorthyComposer-End
Registered user since 1996

Re: Slur.ms (2.1)

Reply #28
@Rick G. is spot on as usual. If you want to replace a native slur with an object slur, you will usually want to hide the native one as per Rick's example, since the object version doesn't affect playback or lyric placement as a native slur does.

Re: Slur.ms (2.1)

Reply #29
Ok. Thanks.

I always forget about the marker. What else can it do? I think I used it once to hide a troublesome triplet marking...

Re: Slur.ms (2.1)

Reply #30
Ok. Thanks.

I always forget about the marker. What else can it do? I think I used it once to hide a troublesome triplet marking...
Besides visibility and color, it can also be used to adjust the vertical positions of slurs, triplets and articulations. There is a bit more description of its uses here.

Re: Slur.ms (1.6)

Reply #31
I am currently working on a way to allow Slur.ms and SlurCubic.ms to span systems, based on suggestions I've gotten from Eric. The programming is a bit tricky (at least to me) so stay tuned while I work out the kinks.

Thanks,
Mike

Hello Mike,
Did you ever found a way to fix that?

Always look on the bright side of life!

Re: Slur.ms (1.6)

Reply #32
Hello Mike,
Did you ever found a way to fix that?
It's hard to believe that I wrote that message 5 years ago...  The short answer is "not yet".  One of the tricky parts about a spanned slur is that there needs to be a way to specify the slur endpoints at each end of the span. Given that the slur objects are visual only, it seems easier to just notate them as two slurs.

As part of my research, I recall that there may have been something along the lines of "perhaps there will be a mechanism in NWC (next version) to make this easier". But we know where that topic leads.

Sorry I don't have better news.

Re: Slur.ms (2.1)

Reply #33
OK, I can live with that.

The reason I asked is that I'm writing a tool to convert MusxXML files to NWC. 'Nested' slurs are not provided in NWC itself, but can be done with your user object. So I planned to use that object for every slur, and then I ran into that problem while testing. So now I'm going to make the necessary adjustments to only use slur.ms in case of a slur within a slur. The chance that such a slur will cross a bar and a system break at the same time is very small, I think.

Keep up the good work!
Always look on the bright side of life!