Skip to main content
Topic: Question about "o" in nwctxt (Read 4800 times) previous topic - next topic

Question about "o" in nwctxt

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
Since 1998

Re: Question about "o" in nwctxt

Reply #1
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
Registered user since 1996

Re: Question about "o" in nwctxt

Reply #2
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.

Re: Question about "o" in nwctxt

Reply #3
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:
  • Visibility:Default
  • Color:0
  • SysBreak:N
  • XBarCnt
  • Style:Single
  • OctaveShift:None
  • Placement:BestFit
  • Justify:Left
  • Wide:N
  • Name:""
  • Patch:N
  • Bank:N
  • Base:Quarter
  • Status:Down

This default will be removed from Tempo Command
  • Text:""
Registered user since 1996

Re: Question about "o" in nwctxt

Reply #4
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:

  • various/Wide (Preserve Width)
  • notes/Muted (Muted)
  • notes/NoLegerLines (No Leger Lines)
  • notes/ArticulationsOnStem (Use stem for articulations)
  • notes/StemLength (Override Stem Length)
  • RestChord/HideRest (Show Rest - inverted!)
  • Bar/SysBreak (Force System Break)
  • Bar/XBarCnt (Exclude From Bar Count)
  • Dynamic/Velocity (Custom Note Velocity)
  • Dynamic/Volume (Change Channel Volume)
  • Ending/Endings (nth Ending)
  • Instrument/Bank (Send Bank Select)
  • Instrument/Patch (Send Patch)
  • MPC/Pt2,Pt3,Pt4 (Setting n)

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

  • various/Color:0
  • various/Justify:Left
  • various/Placement:BestFit
  • various/Visibility:Default
  • notes/XAccSpace:0
  • notes/XNoteSpace:0
  • notes/Slur:Default
  • notes/Tie:Default
  • notes/Lyric:Default
  • Bar/Style:Single
  • Clef/OctaveShift:None
  • Instrument/Name:""
  • Tempo/Base:Quarter
  • Tempo/Text:""
  • SustainPedal/Status:Down

Mistakes?  Omissions?  It's important to me for a tool I'm working on, and want to release soon.

Re: Question about "o" in nwctxt

Reply #5
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:
  • XAccSpace:0
  • XNoteSpace:0
  • Slur:Default
  • Tie:Default
  • Lyric:Default
Nor can I produce a clip that contains any of these:
  • XAccSpace=0
  • XNoteSpace=0
  • Slur=Default
  • Tie=Default
  • Lyric=Default
Generally, I think it is safe to produce a Tool that does not handle that which cannot happen.
Registered user since 1996

Re: Question about "o" in nwctxt

Reply #6
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!  :-)

 

Re: Question about "o" in nwctxt

Reply #7
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 ...
Registered user since 1996