NoteWorthy Composer Forum

Forums => General Discussion => Topic started by: Warren Porter on 2019-09-01 02:24 pm

Title: Object for turns
Post by: Warren Porter on 2019-09-01 02:24 pm
I am trying to avoid adding a hidden/played staff to a 4 part piece I'm transcribing. The objects work well for trills and tremolos, but is there something to do turns?  If not, what is a good resource for writing objects in lua?

Attached is a short example.

TIA
Title: Re: Object for turns
Post by: Flurmy on 2019-09-01 07:03 pm
A bit old fashion but...
https://forum.noteworthycomposer.com/?topic=8328.msg58557#msg58557 (https://forum.noteworthycomposer.com/?topic=8328.msg58557#msg58557)
Title: Re: Object for turns
Post by: Mike Shawaluk on 2019-09-01 10:32 pm
I had briefly considered writing a Turn.ms object, after completing the one for trills, but I didn't know the rules for how they are played. As someone said in that other thread, there are apparently different types of turns, depending on the time period.

I don't think it would be very difficult to make one based on the Trill object, from what I am seeing in various web pages. Oddly, I can't seem to find any mention of them in Behind Bars, unless she calls them something else.

As far a resources for writing custom objects in Lua, there really aren't that many, other than looking at ones that other people have written. I would probably not recommend that people look at objects I've written as learning tools, because I tend to use a lot of tricks that might not be obvious to the casual observer. The BarLabel.ms object that I wrote might be a good example, because it's fairly short and to the point, but it doesn't do any playback. Trill.ms would make the most sense to use as a starting point, but that object has a bit of complicated muck to deal with system spanning, which I don't think would be needed for turns.

In any case, I would be more than happy to assist in troubleshooting, if someone out there wants to take a shot at this.  Or, I'm sure my arm wouldn't require too much twisting to create an object for this.
Title: Re: Object for turns
Post by: Warren Porter on 2019-09-02 01:23 pm
Thank you, I'll be checking out BarLabel and getting a book on Lua.

Some of these may overlap, but I think these things would be needed by any programmer learning a new language.


Thank you for looking at it.
Title: Re: Object for turns
Post by: Rick G. on 2019-09-02 03:47 pm
I am trying to avoid adding a hidden/played staff to a 4 part piece I'm transcribing.
You might try:
Code: (nwc) [Select · Download]
!NoteWorthyComposer(2.751)
|SongInfo|Copyright1:"Copyright © 2009 <Name>"
|PgSetup|StaffSize:19
|Font|Style:StaffItalic|Size:12
|Font|Style:StaffBold|Size:10
|Font|Style:StaffLyric|Size:8
|Font|Style:User1|CharSet:1
|Font|Style:User2|CharSet:1
|AddStaff|Name:"Staff"
|StaffInstrument|Name:"Violin"|Patch:40
|Clef|Type:Treble
|Dynamic|Style:mf|Pos:-8
|Note|Dur:Half|Pos:6^
|RestChord|Dur:16th|Opts:Stem=Up,Muted,HideRest|Dur2:4th,DblDotted|Pos2:6
|Note|Dur:4th,Grace|Pos:6^|Opts:Muted|Visibility:Never
|Note|Dur:16th,Slur|Pos:6|Opts:Stem=Down,Beam=First|Visibility:Never
|Note|Dur:16th,Slur|Pos:7|Opts:Stem=Down,Crescendo,Beam|Visibility:Never
|Note|Dur:16th,Slur|Pos:6|Opts:Stem=Down,Crescendo,Beam|Visibility:Never
|Note|Dur:16th,Slur|Pos:#5|Opts:Stem=Down,Crescendo,Beam|Visibility:Never
|Note|Dur:16th|Pos:6^|Opts:Stem=Down,Crescendo,Beam|Visibility:Never
|Note|Dur:16th,Staccato|Pos:6|Opts:Stem=Down,Crescendo,Beam=End|Visibility:Never
|Text|Text:"&"|Font:StaffSymbols|Pos:6.5|Justify:Center|Placement:BestFitForward
|Text|Text:"d"|Font:StaffCueSymbols|Pos:4.5|Justify:Center|Placement:BestFitForward
|Spacer|Width:200
|Text|Text:"I "|Font:StaffSymbols|Pos:9|Justify:Right|Placement:AtNextNote
|Note|Dur:16th|Pos:7|Opts:Stem=Down,Crescendo
|Dynamic|Style:f|Pos:-8|Visibility:Never
|Bar
|Note|Dur:Half,Slur|Pos:2|Opts:Diminuendo
|Note|Dur:4th|Pos:#1|Opts:Diminuendo
|Dynamic|Style:mf|Pos:-8|Visibility:Never
|Rest|Dur:4th
|Bar
!NoteWorthyComposer-End
I have replaced your Boxmarks chars with chars from NWC2STDA.
I removed the slur since it is confusing over a breath mark. I would think a turn would be played legato by default.
You might not like the staccato on the last turn note, but it does give some meaning to the breath mark.
The Spacer width may need adjustment for final printing. NWC has no command to center text between 2 notes.
Title: Re: Object for turns
Post by: Warren Porter on 2019-09-02 08:28 pm
Many thanks! I've printed your example and am studying it. Hopefully I can automate its application in the near future, Eine Kleine has a bunch of them in the 2nd movement.
Again, thank you.
Title: Re: Object for turns
Post by: Warren Porter on 2019-09-04 02:48 pm
Rick:

My apology for using an example from something other than what I was working on. It had a note being tied into a turn and your example did an excellent job of using and implementing that. However, without that leading tie-in I am getting stumpped as to how to implement this. How can I create an 8th note B natural which will display only and be beamed to the previous G? My test so far is after the red bar line, all else is reference and your example.

TIA
Title: Re: Object for turns
Post by: Rick G. on 2019-09-04 05:59 pm
How can I create an 8th note B natural which will display only and be beamed to the previous G?
Code: (nwc) [Select · Download]
!NoteWorthyComposer(2.751)
|PgSetup|Zoom:6
|AddStaff|Name:"Staff"
|StaffProperties|EndingBar:Open (hidden)
|StaffInstrument|Name:"Violin"|Patch:40
|PerformanceStyle|Style:Legato|Pos:0|Visibility:Never
|Clef|Type:Treble
|Key|Signature:Bb,Eb,Ab|Tonic:C
|Tempo|Tempo:36|Pos:10.5
|Rest|Dur:4th
|User|Beam.hmm|Pos:-7.5|Beam2:"Max.1 @ both"|FinalStemLength:-6.5
|Dynamic|Style:p|Pos:-8
|Note|Dur:8th,Staccato|Pos:5|Opts:Stem=Down,StemLength=0
|Text|Text:"&"|Font:StaffSymbols|Pos:8|Justify:Center|Placement:AtNextNote
|Text|Text:"e"|Font:StaffCueSymbols|Pos:6.5|Justify:Center|Placement:AtNextNote
|Note|Dur:32nd,Slur|Pos:n0|Opts:Stem=Up,StemLength=0,Beam=First
|Note|Dur:32nd,Slur|Pos:1|Opts:Stem=Up,Beam|Visibility:Never
|Note|Dur:32nd,Triplet=First,Slur|Pos:0|Opts:Stem=Up,Beam|Visibility:Never
|Note|Dur:32nd,Triplet,Slur|Pos:n-1|Opts:Stem=Up,Beam|Visibility:Never
|Note|Dur:32nd,Triplet=End,Slur|Pos:0|Opts:Stem=Up,Beam=End|Visibility:Never
|Bar
|Note|Dur:8th|Pos:1
|Rest|Dur:8th
|Rest|Dur:4th
!NoteWorthyComposer-End
If you can tolerate a slight delay for the onset of the last note, you can use:
Code: (nwc) [Select · Download]
!NoteWorthyComposer(2.751)
|PgSetup|Zoom:6
|AddStaff|Name:"Staff"
|StaffProperties|EndingBar:Open (hidden)
|StaffInstrument|Name:"Violin"|Patch:40
|PerformanceStyle|Style:Legato|Pos:0|Visibility:Never
|Clef|Type:Treble
|Key|Signature:Bb,Eb,Ab|Tonic:C
|Tempo|Tempo:36|Pos:10.5
|Rest|Dur:4th
|Dynamic|Style:p|Pos:-8
|Note|Dur:8th,Staccato|Pos:5|Opts:Stem=Down,Beam=First
|Note|Dur:4th,Grace|Pos:n0|Opts:Stem=Up,StemLength=0|Visibility:Never
|Note|Dur:4th,Grace|Pos:1|Opts:Stem=Up|Visibility:Never
|Note|Dur:4th,Grace|Pos:0|Opts:Stem=Up|Visibility:Never
|Note|Dur:4th,Grace|Pos:n-1|Opts:Stem=Up|Visibility:Never
|Note|Dur:4th,Grace|Pos:0|Opts:Stem=Up|Visibility:Never
|Note|Dur:4th,Grace|Pos:1^|Opts:Stem=Up|Visibility:Never
|Text|Text:"&"|Font:StaffSymbols|Pos:8|Justify:Center|Placement:AtNextNote
|Text|Text:"e"|Font:StaffCueSymbols|Pos:6.5|Justify:Center|Placement:AtNextNote
|Note|Dur:8th|Pos:n0|Opts:Stem=Down,Beam=End,Muted
|Bar
|Note|Dur:8th|Pos:1
|Rest|Dur:8th
|Rest|Dur:4th
!NoteWorthyComposer-End
Title: Re: Object for turns
Post by: Warren Porter on 2019-09-06 03:54 am
I am starting to collect notes and looking at nwctxt to first find the turn symbol:

Code: [Select · Download]
|Text|Text:"&"|Font:StaffSymbols|Pos:8|Justify:Center|Placement:AtNextNote

However, the text either contained an empty box or three characters with the hex codes of ef 80 a6. The next line (a natural below the turn) contained hex: ef 81 a5 from StaffCueSymbols.  Is this something I need to test for or just change it when it happens?

Once the Text turn symbol is found, it should be straightforward to identify the turned note, the one before, the one after, and any accidentals to implement Rick's 2nd suggestion in post number 7.

TIA