NoteWorthy Composer Forum

Forums => General Discussion => Topic started by: Warren Porter on 2010-05-14 03:20 PM

Title: Question about "o" in nwctxt
Post by: Warren Porter on 2010-05-14 03:20 PM
The following contains two clips: several measures and just the 2nd note:
Code: [Select · Download]
!NoteWorthyComposerClip(2.0,Single)
|Clef|Type:Treble
|Key|Signature:F#,C#,G#,D#
|TimeSig|Signature:4/4
|Note|Dur:4th|Pos:-9
|Note|Dur:4th|Pos:-7
|Note|Dur:4th|Pos:-4
|Rest|Dur:8th
|Note|Dur:8th|Pos:-7
|Bar
|Note|Dur:8th|Pos:-4|Opts:Stem=Up,Beam=First
|Note|Dur:8th|Pos:-7|Opts:Stem=Up,Beam=End
|Note|Dur:8th|Pos:-4|Opts:Stem=Up,Beam=First
|Note|Dur:8th|Pos:-7|Opts:Stem=Up,Beam=End
|Note|Dur:8th|Pos:-4|Opts:Stem=Up,Beam=First
|Note|Dur:8th|Pos:-7|Opts:Stem=Up,Beam=End
|Note|Dur:8th|Pos:-7|Opts:Stem=Up,Beam=First
|Note|Dur:8th|Pos:-7|Opts:Stem=Up,Beam=End
|Bar
|Note|Dur:8th|Pos:-4|Opts:Stem=Up,Beam=First
|Note|Dur:8th|Pos:-5|Opts:Stem=Up,Beam=End
|Note|Dur:8th|Pos:-7|Opts:Stem=Up,Beam=First
|Note|Dur:8th|Pos:-7|Opts:Stem=Up,Beam=End
|Note|Dur:4th|Pos:-7
|Rest|Dur:4th
!NoteWorthyComposerClip-End

|Note|Dur:4th|Pos:-7o|Color:0|Visibility:Default

|Note|Dur:4th|Pos:-7o|Color:0|Visibility:Default
I am wondering what the o does in the one note standalone.

TIA
Title: Re: Question about "o" in nwctxt
Post by: Rick G. on 2010-05-14 03:24 PM
It means "use the default notehead". Change it to a diamond notehead and the clip becomes:
|Note|Dur:4th|Pos:-7X|Color:0|Visibility:Default
Title: Re: Question about "o" in nwctxt
Post by: Randy Williams on 2010-05-14 09:41 PM
Sometimes NWC adds the "o" for a standard notehead, and sometimes it leaves it out.  Just like sometimes it adds a "!0" for the default color, and sometimes it leaves it out.  There are also many non-note examples of defaults that you may or may not see, like "justify left".  It saves space to omit values (and entire fields) when they are the default value for their particular field, but it's often clearer to leave them in.  I haven't ever taken the time to figure out when the defaults are included and when they aren't, but I've seen them both ways at times.
Title: Re: Question about "o" in nwctxt
Post by: Rick G. on 2010-05-15 01:55 AM
Sometimes NWC adds the "o" for a standard notehead, and sometimes it leaves it out.
It always adds it if only one object is copied and never adds it if more than one one object is copied.

Just like sometimes it adds a "!0" for the default color, and sometimes it leaves it out.
I can not produce a single or multiple object clip with "!0" in either Pos: or Pos2:
Could you provide an example?

I haven't ever taken the time to figure out when the defaults are included and when they aren't, but I've seen them both ways at times.
These defaults are always stripped from mutiple object clips and from nwctxt export:

This default will be removed from Tempo Command (http://ntworthy.com/nwc2/help/MNU_ADDTEMPO.htm)
Title: Re: Question about "o" in nwctxt
Post by: Randy Williams on 2010-05-16 12:13 AM
Quote
It always adds it if only one object is copied and never adds it if more than one one object is copied.

The single-object special case is a byproduct of NWC's Edit/Find function allowing searching for expressions that can contain default values.

Quote
I can not produce a single or multiple object clip with "!0" in either Pos: or Pos2:
Could you provide an example?

I can't reproduce this now - it may have only happened back when I had a very early alpha of note colorization.

Quote
These defaults are always stripped from mutiple object clips and from nwctxt export: ...

I'd venture to say that some in your list do not truly have defaults being "stripped", since they are checkboxes in the NWC interface, and it's really just a matter of the options never being selected, rather than being selected to some default.  The list of these includes:


As for options where a default is selected in the NWC GUI, and subsequently stripped from nwctxt, here is my list:


Mistakes?  Omissions?  It's important to me for a tool I'm working on, and want to release soon.
Title: Re: Question about "o" in nwctxt
Post by: Rick G. on 2010-05-16 01:38 AM
I'd venture to say that some in your list do not truly have defaults being "stripped"
With the GUI, I can produce objects that contain each item in my list in a single object clip format. In each case, the item is not present in the multi-object clip format. Perhaps you define "defaults being stripped" differently. I believe that my list is complete and sufficient, subject to counter examples.

As for options where a default is selected in the NWC GUI, and subsequently stripped from nwctxt, here is my list [...] Mistakes?  Omissions?  It's important to me for a tool I'm working on, and want to release soon.
I cannot produce a clip that contains any of these:
Nor can I produce a clip that contains any of these:
Generally, I think it is safe to produce a Tool that does not handle that which cannot happen.
Title: Re: Question about "o" in nwctxt
Post by: Randy Williams on 2010-05-16 02:26 AM
Quote
With the GUI, I can produce objects that contain each item in my list in a single object clip format. In each case, the item is not present in the multi-object clip format. Perhaps you define "defaults being stripped" differently. I believe that my list is complete and sufficient, subject to counter examples.

I guess it depends on your frame of reference, now that I think more about it.  You are comparing nwctxt in a single object to nwctxt in a multiple object.  I am comparing the NWC GUI to my tool GUI.  For you, the nwctxt is the end product.  For me, the nwctxt is merely a (hidden) transport mechanism between the two GUI's, and nwctxt idiosyncracies should not alter the look and feel between GUI's.

Quote
I cannot produce a clip that contains any of these: ...

So we both agree that nwctxt strips those defaults, we again just have a different frame of reference.  The NWC GUI can select a 0 for these, and subsequently strip the 0 going to nwctxt, but that does not interest you as it does me.  I see now that you don't consider the GUI 0 as ever having been there, since it is (currently) not generated in a single-object paste.  For me, the 0 was stripped and I must know to restore it.

Quote
Generally, I think it is safe to produce a Tool that does not handle that which cannot happen.

Again, for my tool, the nwctxt is completely hidden from the user, and (hopefully) it's a 100% pass-through method from NWC GUI to my GUI.  If something appears in the NWC GUI, and it disappears in the nwctxt, I must make it reappear.  For me, if it happens in the NWC GUI, it happens, regardless of whether it (currently) makes it into the nwctxt file.

I did not mean to challenge your credibility, and I concede that your list is likely perfect given your frame of reference!  :-)
Title: Re: Question about "o" in nwctxt
Post by: Rick G. on 2010-05-16 03:47 AM
I see now that you don't consider the GUI 0 as ever having been there, since it is (currently) not generated in a single-object paste.
If "GUI 0" is selected, I don't know if NWC sets it to zero, removes it, or flags it as invalid. All I need to know is how NWC outputs a "GUI 0" state, and how to get a Tool to output a line that NWC interprets as "GUI 0" state.

I try not to make things more complex than they are. I don't always succeed, but I try ...