Skip to main content
Topic: "Parts" User Tool (Read 21757 times) previous topic - next topic

"Parts" User Tool

Hi All,

I haven't had time to research this tool or the problem properly because I'm currently preparing music for a wedding.

While I was preparing the music, I invoked the parts user tool on this rhythm:

Code: [Select · Download]
!NoteWorthyComposerClip(2.0,Single)
|Rest|Dur:Half
|Chord|Dur:4th,Triplet=First|Pos:-1|Opts:Stem=Up,ArticulationsOnStem|Dur2:4th|Pos2:-1
|Chord|Dur:4th,Triplet|Pos:-1|Opts:Stem=Up,ArticulationsOnStem|Dur2:4th|Pos2:-1
|Chord|Dur:4th,Triplet=End|Pos:-1|Opts:Stem=Up,ArticulationsOnStem|Dur2:4th|Pos2:-1
|Bar
|Chord|Dur:4th|Pos:-1|Opts:Stem=Down,ArticulationsOnStem|Dur2:4th|Pos2:-1
|Chord|Dur:Half|Pos:-1|Opts:Stem=Down,ArticulationsOnStem|Dur2:Half|Pos2:-1
|Chord|Dur:4th|Pos:#-3,-1
!NoteWorthyComposerClip-End

When I ran the tool with the options "remove", "top", I got:

Code: [Select · Download]
!NoteWorthyComposerClip(2.0,Single)
|Rest|Dur:Half
|Note|Dur:4th|Pos:-1|Opts:Stem=Up,ArticulationsOnStem
|Note|Dur:4th|Pos:-1|Opts:Stem=Up,ArticulationsOnStem
|Bar
|Note|Dur:Half|Pos:-1|Opts:Stem=Down,ArticulationsOnStem
|Note|Dur:4th|Pos:#-3
!NoteWorthyComposerClip-End

Any ideas on why I'm getting this output? (I'll do more research when I get time)

Globbilink

Re: "Parts" User Tool

Reply #1
G'day Globbilink,
confirmed - it's my guess there's a bug in relation to split stem chords...  I have a suspicion that Andrew didn't take 'em into account when he wrote it.  I'll drop a note in the NG and see if he spots it.

For instance, this:
Code: [Select · Download]
!NoteWorthyComposerClip(2.0,Single)
|Rest|Dur:Half
|Chord|Dur:4th,Triplet=First|Pos:-1|Opts:Stem=Up|Dur2:4th|Pos2:-3
|Chord|Dur:4th,Triplet|Pos:-1|Opts:Stem=Up|Dur2:4th|Pos2:-3
|Chord|Dur:4th,Triplet=End|Pos:-1|Opts:Stem=Up|Dur2:4th|Pos2:-3
|Bar
|Chord|Dur:4th|Pos:-1|Opts:Stem=Up|Dur2:4th|Pos2:-3
|Chord|Dur:Half|Pos:-1|Opts:Stem=Up|Dur2:Half|Pos2:-3
|Chord|Dur:4th|Pos:-1|Opts:Stem=Up|Dur2:4th|Pos2:#-3
!NoteWorthyComposerClip-End

results in this:
Code: [Select · Download]
!NoteWorthyComposerClip(2.0,Single)
|Rest|Dur:Half
|Note|Dur:4th|Pos:-3|Opts:Stem=Up
|Note|Dur:4th|Pos:-3|Opts:Stem=Up
|Bar
|Note|Dur:Half|Pos:-3|Opts:Stem=Up
|Note|Dur:4th|Pos:#-3|Opts:Stem=Up
!NoteWorthyComposerClip-End

But this:
Code: [Select · Download]
!NoteWorthyComposerClip(2.0,Single)
|Rest|Dur:Half
|Chord|Dur:4th,Triplet=First|Pos:-3,-1
|Chord|Dur:4th,Triplet|Pos:-3,-1
|Chord|Dur:4th,Triplet=End|Pos:-3,-1
|Bar
|Chord|Dur:4th|Pos:-3,-1
|Chord|Dur:Half|Pos:-3,-1
|Chord|Dur:4th|Pos:#-3,-1
!NoteWorthyComposerClip-End

works fine:
Code: [Select · Download]
!NoteWorthyComposerClip(2.0,Single)
|Rest|Dur:Half
|Note|Dur:4th,Triplet=First|Pos:-3
|Note|Dur:4th,Triplet|Pos:-3
|Note|Dur:4th,Triplet=End|Pos:-3
|Bar
|Note|Dur:4th|Pos:-3
|Note|Dur:Half|Pos:-3
|Note|Dur:4th|Pos:#-3
!NoteWorthyComposerClip-End
I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.

Re: "Parts" User Tool

Reply #2
Agreed.
Unfortunately, it looks as if I haven't even considered split stems at all.
I think the reason why would be because I was working on the scenario of maybe importing a midi file and then pulling out parts.
In this case, NWC wouldn't generate split stems.
So - in my defense - it's a "design limitation to reduce the complexity of the code".
Let me see if I can tweak it to deal with split stems.
It's been a while since I looked at this, so I may not be in a position to do something quickly. But I'll have a check.

 

Re: "Parts" User Tool

Reply #3
It looks like it's gonna be messy with the triplets.
The reason being that NWC is not giving the same duration value to each component of the chords in the triplet.
You can see that straight away with
|Chord|Dur:4th,Triplet=First|Pos:-1|Opts:Stem=Up,ArticulationsOnStem|Dur2:4th|Pos2:-1
|Chord|Dur:4th,Triplet|Pos:-1|Opts:Stem=Up,ArticulationsOnStem|Dur2:4th|Pos2:-1
|Chord|Dur:4th,Triplet=End|Pos:-1|Opts:Stem=Up,ArticulationsOnStem|Dur2:4th|Pos2:-1

See that Dur:4th,Triplet=First and Dur2:4th ?
What normally happens with split stems (which I thought I handled correctly up until today) is when removing the last of a top, I copy across the duration of the bottom. This isn't going to work correctly with the implied durations here.
When you think about it, that triplet with the split stems isn't correct anyway, since the bottom ones should be beamed as well, necessitating an overlaid staff. This might have been what was going through my mind when I was writing the code.

So I'm not sure I'll be able to fix that without a major rewrite.

However, what I'm doing to the second bar looks embarrassing, and I should have a go at fixing that one.
I need to go to work now, but might get some time this arvo, or maybe on Saturday.



Re: "Parts" User Tool

Reply #4
Okay, so maybe Sunday...

Re: "Parts" User Tool

Reply #5
NWC "botches" the playback on split stem triplets as you can hear here:
Quote
!NoteWorthyComposerClip(2.0,Single)
|PerformanceStyle|Style:Tenuto|Pos:12
|Instrument|Name:"Flute"|Patch:73|Trans:0|DynVel:10,30,45,60,75,92,108,127|Pos:15
|Chord|Dur:4th,Triplet=First|Pos:-5,-3
|Chord|Dur:4th,Triplet|Pos:-5,-3
|Chord|Dur:4th,Triplet=End|Pos:-5,-3
|Chord|Dur:4th,Triplet=First|Pos:-3|Opts:Stem=Up|Dur2:4th|Pos2:-5
|Chord|Dur:4th,Triplet|Pos:-3|Opts:Stem=Up|Dur2:4th|Pos2:-5
|Chord|Dur:4th,Triplet=End|Pos:-3|Opts:Stem=Up|Dur2:4th|Pos2:-5
|Bar|Style:LocalRepeatClose|Repeat:4
!NoteWorthyComposerClip-End
The note off is delayed for the downstem notes.
Not quite a bug as NWC doesn't really support split stem chords. They are a legacy of a time before layering.

I don't see this as a bug in your tool, just a failure to support (and fix up) an abandoned structure that should no longer be used.
Registered user since 1996

Re: "Parts" User Tool

Reply #6
I tend to agree.
I finally got to look at it today, and there's no way I'm going to spend time on special code to deal with the way NWC does those split stems. As Rick says, that method of engraving has been abandoned in favour of overlays.

And in fact, the disappearing initial quarter note of the subsequent bar is a side effect of the fact that each split stem note in the previous bar is actually of different length (the top is a triplet quarter note, while the bottom is a straight quarter note). If you isolate the second bar, the tool works correctly.

Thanks for the heads up on the tool. A very interesting set of circumstances here.

Re: "Parts" User Tool

Reply #7
The triplet specifically does not apply to the secondary voice in a split stem chord. Rick's example is better demonstrated in this clip (no overlapping note off/on pairs):

Code: [Select · Download]
!NoteWorthyComposerClip(2.0,Single)
|PerformanceStyle|Style:Tenuto|Pos:12
|Instrument|Name:"Flute"|Patch:73|Trans:0|DynVel:10,30,45,60,75,92,108,127|Pos:15
|Chord|Dur:4th,Triplet=First|Pos:-5,-3
|Chord|Dur:4th,Triplet|Pos:-5,-3
|Chord|Dur:4th,Triplet=End|Pos:-5,-3
|Chord|Dur:4th,Triplet=First|Pos:-3|Opts:Stem=Up|Dur2:4th|Pos2:-5
|Chord|Dur:4th,Triplet|Pos:-3|Opts:Stem=Up|Dur2:4th|Pos2:-6
|Chord|Dur:4th,Triplet=End|Pos:-3|Opts:Stem=Up|Dur2:4th|Pos2:-7
|Bar|Style:LocalRepeatClose|Repeat:4
!NoteWorthyComposerClip-End

Re: "Parts" User Tool

Reply #8
Given this fact, the Parts tool makes a valiant effort. It could be argued, though, that the lower voice is non-standard and its non-fitting measure in Globbilink's example should be preserved.  We'll consider patching this in the Parts script.

Re: "Parts" User Tool

Reply #9
We'll consider patching this in the Parts script.
You might try your "patch" against this:
Quote
!NoteWorthyComposerClip(2.0,Single)
|Chord|Dur:4th,Accent|Pos:-5|Opts:Stem=Down,ArticulationsOnStem|Dur2:4th|Pos2:-3
|RestChord|Dur:4th,Accent|Opts:Stem=Up,ArticulationsOnStem|Dur2:4th,Accent|Pos2:-6
|Chord|Dur:4th,Accent|Pos:-3|Opts:Stem=Up,ArticulationsOnStem|Dur2:4th|Pos2:-7
!NoteWorthyComposerClip-End

The "note on" velocities look like this:
Quote from: MF2T (partial)
0:0:0 On ch=1 note=d5 vol=127
0:0:0 On ch=1 note=f5 vol=110
0:1:0 On ch=1 note=c5 vol=127
0:2:0 On ch=1 note=b4 vol=110
0:2:0 On ch=1 note=f5 vol=127
ArticulationsOnStem does not affect playback, just placement. This is as it should be, I think.

NWC is not user friendly when adding an articulation to a RestChord, but I digress ...
Registered user since 1996

Re: "Parts" User Tool

Reply #10
Version 1.2.2  of of the Parts script already handles the clip that you provided.