NoteWorthy Composer Forum

Forums => Tips & Tricks => User Tools => Topic started by: wal on 2017-06-15 02:02 am

Title: How to (1) alter code and (2) get it back into the notation file
Post by: wal on 2017-06-15 02:02 am
Very basic questions.  I finally figured out how to view the code for selected notes.  Tools > User Tool > .Automatic > Show Note Names > Run > STDIN button.

So, how do you edit the code for your selected notes?  You can't edit it in the window that appears after making the selection describe above.

And then how do you get your edited code translated back into the notation file itself? 

Thanks!
Title: Re: How to (1) alter code and (2) get it back into the notation file
Post by: Lawrie Pardy on 2017-06-15 02:23 am
Hi Wal,
Ummm, what kind of modifications do you want to make? 

Most things are far easier to edit in the normal editor.

Bulk edits can often be done with user tools - most commonly (in my case) Global Modification.

If you really need to use a text editor, then highlight the section to edit, copy (Ctrl+C) to the clipboard, paste into Notepad (Ctrl+V), make the mods and reverse the copy and paste process.
Title: Re: How to (1) alter code and (2) get it back into the notation file
Post by: hmmueller on 2017-06-15 08:13 am
If(!) you are a power-user of some good text editor (UltraEdit is my favorite; NotePad++ is a free one), then you can easily
Likewise, you can just edit the .nwctxt file with that powerful editor. However, if you do not know, or cannot really work with such an editor (the standard Windows notepad is not meant by that - it is a crutch), then this is not for you ...

H.M.
Title: Re: How to (1) alter code and (2) get it back into the notation file
Post by: Flurmy on 2017-06-15 09:27 am
And mine too.
Long ago I made the syntax file "nwctxt.uew" and I tried to keep it up to date.
Do you have something similar I can borrow from?
Or, vice-versa, do you like to have mine?
Title: Re: How to (1) alter code and (2) get it back into the notation file
Post by: Warren Porter on 2017-06-15 11:30 am
If you are going to modify something with a text editor:
Title: Re: How to (1) alter code and (2) get it back into the notation file
Post by: Mike Shawaluk on 2017-06-15 12:16 pm
One thing to be aware of when doing this is that if you manage to make edits that are "illegal", NWC may silently throw away notes or attributes when you paste the code back into NWC. Therefore, always be sure to save your score before making these sorts of changes.
Title: Re: How to (1) alter code and (2) get it back into the notation file
Post by: Warren Porter on 2017-06-15 12:42 pm
One thing to be aware of when doing this is that if you manage to make edits that are "illegal", NWC may silently throw away notes or attributes when you paste the code back into NWC. Therefore, always be sure to save your score before making these sorts of changes.
Yep.  Step One.
Title: Re: How to (1) alter code and (2) get it back into the notation file
Post by: wal on 2017-06-15 12:46 pm
Thanks everyone, especially Warren Porter.  Now it seems obvious.  I was thinking this could done within User Tools (like, that there would be a text editor in there).  But I just used Notepad and Warren Porter's procedure, and it worked. 

One reason I want to do this is to get RestChords into the music.  I see the notation and the code for it in a piece I downloaded, but I don't think it's possible to insert a RestChord in NWC itself. 
Title: Re: How to (1) alter code and (2) get it back into the notation file
Post by: hmmueller on 2017-06-15 01:26 pm
...I don't think it's possible to insert a RestChord in NWC itself. 
Of course it is - everything you can see in an NWC score can be entered!
For rest chords, see help topic (F1, then search for it) "Chord Member Command", where it says in item 4.:
Quote
A chord containing a rest is created by first placing the rest, and then adding one or more notes to that rest. The duration of the rest must be smaller than that of the notes that are added to it. The stem direction assigned to the rest must be different (opposite) than the note that is being added, or the operation will fail.
and then, after item 5,
Quote
Chord members can be added most efficiently by pressing <Ctrl Enter> from the computer keyboard.
Also, if your chords do not follow the rules above (rest shorter than added notes), you can create almost anything in the score with layered staffs - look them up in the help!
Hope that helps!
H.M.
Title: Re: How to (1) alter code and (2) get it back into the notation file
Post by: Opagust on 2017-06-15 01:26 pm
One reason I want to do this is to get RestChords into the music.  I see the notation and the code for it in a piece I downloaded, but I don't think it's possible to insert a RestChord in NWC itself. 
Yes, it's possible: first enter the rest (space bar) and then the note(s) with CTRL/Enter. Limitation: the note must not be shorter than the rest.

Note: I hadn't seen the post of hmmueller when I was typing mine. It's more complete.
Title: Re: How to (1) alter code and (2) get it back into the notation file
Post by: hmmueller on 2017-06-15 01:27 pm
And mine too.
Long ago I made the syntax file "nwctxt.uew" and I tried to keep it up to date.
Do you have something similar I can borrow from?
Or, vice-versa, do you like to have mine?
I didn't make anything - I'm quite happy to read the "raw text". But if you are willing to share it, that would be nice!

H.M.
Title: Re: How to (1) alter code and (2) get it back into the notation file
Post by: Mike Shawaluk on 2017-06-15 01:32 pm
One small correction to the NWC documentation for RestChords. As noted by @hmmueller, it says:
Quote
... The duration of the rest must be smaller than that of the notes that are added to it.
Actually, it should say:
Quote
... The duration of the rest must be equal to or smaller than that of the notes that are added to it.
@Opagust says it correctly (the note duration must not be shorter than the rest).
Title: Re: How to (1) alter code and (2) get it back into the notation file
Post by: Flurmy on 2017-06-15 07:55 pm
I didn't make anything - I'm quite happy to read the "raw text". But if you are willing to share it, that would be nice!
Yes, raw text is readable, but the syntax colouring makes it easier.  :D
By the way: my version of ultraedit is quite old now, so perhaps there were some changes in the syntax file syntax.  ;)
And my file includes colors, that perhaps are not the one you like best.
Anyway you can find it here attached.
Title: Re: How to (1) alter code and (2) get it back into the notation file
Post by: wal on 2017-06-15 10:55 pm
I couldn't get two quarters against a dotted quarter and eighth on the same staff (soprano vs. alto) without the whole measure shifting over a 1/8 or 1/4 beat.  I finally got it with the code (see below).  I'll work on the suggestions some of you have given for direct entry, but in any case I'm happy to have learned the basics of using the code method.  Thanks again.

!NoteWorthyComposerClip(2.75,Single)
|Chord|Dur:4th|Pos:-1|Opts:Stem=Down|Dur2:4th,Dotted|Pos2:4
|RestChord|Dur:8th|Opts:Stem=Up,ArticulationsOnStem,HideRest|Dur2:4th|Pos2:2
|Note|Dur:8th|Pos:4|Opts:Stem=Up
!NoteWorthyComposerClip-End
Title: Re: How to (1) alter code and (2) get it back into the notation file
Post by: William Ashworth on 2017-06-15 11:11 pm
The usual approach for situations like that is layering  - especially when it involves two independent voices, like soprano and alto. One voice on one staff, the other voice on a second staff that is layered with the first. This allows you to cross voices, as well.
Title: Re: How to (1) alter code and (2) get it back into the notation file
Post by: Opagust on 2017-06-17 08:29 am
The usual approach for situations like that is layering  - especially when it involves two independent voices, like soprano and alto. One voice on one staff, the other voice on a second staff that is layered with the first. This allows you to cross voices, as well.

Just layering two voices  entered on seperate staves can give a messy result. I wrote a user tool that tries to do better  ;D :
Layering voices (https://forum.noteworthycomposer.com/?topic=9028.0)