NoteWorthy Composer Forum

Forums => Tips & Tricks => Object Plugins => Topic started by: Mike Shawaluk on 2015-03-22 01:21 pm

Title: TremoloSingle.ms (2.1)
Post by: Mike Shawaluk on 2015-03-22 01:21 pm
This object implements a single note tremolo, as described in various texts. It draws the tremolo markings, and will optionally play the notes in tremolo style.

To create the tremolo, insert the object immediately before the note to receive the tremolo, and the marking will be drawn on the note's stem, or above/below a whole (semibreve) note. The note can be any chord or RestChord.

The following parameters control the appearance and playback of the tremolo:

Number of Beams: Specifies the number of beams to be drawn, between 1 and 4. The default value is 3. The number of beams for a tremolo can also be modified by highlighting the object and pressing the + or - keys.
Vertical Offset: Specifies an optional offset distance for the location of the beam(s). For stemmed notes, positive values move the beams away from the stem tip and toward the note head. For unstemmed (whole) notes, positive values move the beams away from the note head. The default value is 0.
Play Notes: Enables playback of the tremolo. Default value is checked. Note that the notes/chords should be muted for proper playback.
Triplet Playback: Specifies that the playback notes should be in triplet rhythm. This will generally be used when the tremolo notes are dotted. Default value is unchecked.
Split Chord Member: Specifies which split chord member (top or bottom) should receive the tremolo marking and be played. This parameter is ignored for non-split chords and rest chords. The default value is "top".

For eighth through 64th notes, the tremolo beams will be auto-positioned to avoid collision with the note's beam or flag.  If additional space is needed to accommodate a larger number of beams, increase the note's stem length, and/or specify an Offset value if desired.

The following sample clip will get you started. The screen shot demonstrates various types of tremolos, with the bottom staff indicating the actual notes that are played.

Code: (nwc) [Select · Download]
!NoteWorthyComposer(2.75)
|AddStaff|Name:"Staff"|Group:"Standard"
|StaffProperties|EndingBar:Section Close|Visible:Y|BoundaryTop:12|BoundaryBottom:12|Lines:5|Color:Default
|StaffProperties|Muted:N|Volume:127|StereoPan:64|Device:0|Channel:1
|StaffInstrument|Trans:0|DynVel:10,30,45,60,75,92,108,127
|Clef|Type:Treble
|TimeSig|Signature:4/4
|User|TremoloSingle.ms|Pos:0|Beams:3|Offset:0|Play:Y
|Note|Dur:4th|Pos:0|Opts:Stem=Down,Muted
|User|TremoloSingle.ms|Pos:0|Beams:2|Offset:0|Play:Y
|Note|Dur:8th|Pos:1|Opts:Stem=Down,StemLength=8,Beam=First,Muted
|User|TremoloSingle.ms|Pos:0|Beams:2|Offset:0|Play:Y
|Note|Dur:8th|Pos:3|Opts:Stem=Down,StemLength=8,Beam=End,Muted
|User|TremoloSingle.ms|Pos:0|Beams:2|Offset:0|Play:Y
|Note|Dur:Half|Pos:-2|Opts:Stem=Up,Muted
|Bar
|User|TremoloSingle.ms|Pos:0|Offset:0|Beams:2|Play:Y
|Chord|Dur:Whole|Pos:1,2|Opts:Stem=Down,StemLength=6,Muted
|AddStaff|Name:"Staff-1"|Group:"Standard"
|StaffProperties|EndingBar:Section Close|Visible:Y|BoundaryTop:10|BoundaryBottom:10|Lines:5|Color:Default
|StaffProperties|Muted:N|Volume:127|StereoPan:64|Device:0|Channel:2
|StaffInstrument|Trans:0|DynVel:10,30,45,60,75,92,108,127
|Clef|Type:Treble
|TimeSig|Signature:4/4
|Note|Dur:32nd|Pos:2|Opts:Stem=Down,Beam=First
|Note|Dur:32nd|Pos:2|Opts:Stem=Down,Beam
|Note|Dur:32nd|Pos:2|Opts:Stem=Down,Beam
|Note|Dur:32nd|Pos:2|Opts:Stem=Down,Beam
|Note|Dur:32nd|Pos:2|Opts:Stem=Down,Beam
|Note|Dur:32nd|Pos:2|Opts:Stem=Down,Beam
|Note|Dur:32nd|Pos:2|Opts:Stem=Down,Beam
|Note|Dur:32nd|Pos:2|Opts:Stem=Down,Beam=End
|Note|Dur:16th|Pos:1|Opts:Stem=Down,Beam=First
|Note|Dur:16th|Pos:1|Opts:Stem=Down,Beam
|Note|Dur:16th|Pos:3|Opts:Stem=Down,Beam
|Note|Dur:16th|Pos:3|Opts:Stem=Down,Beam=End
|Note|Dur:16th|Pos:-2|Opts:Stem=Up,Beam=First
|Note|Dur:16th|Pos:-2|Opts:Stem=Up,Beam
|Note|Dur:16th|Pos:-2|Opts:Stem=Up,Beam
|Note|Dur:16th|Pos:-2|Opts:Stem=Up,Beam
|Note|Dur:16th|Pos:-2|Opts:Stem=Up,Beam
|Note|Dur:16th|Pos:-2|Opts:Stem=Up,Beam
|Note|Dur:16th|Pos:-2|Opts:Stem=Up,Beam
|Note|Dur:16th|Pos:-2|Opts:Stem=Up,Beam=End
|Bar
|Chord|Dur:16th|Pos:1,2|Opts:Stem=Down,Beam=First
|Chord|Dur:16th|Pos:1,2|Opts:Stem=Down,Beam
|Chord|Dur:16th|Pos:1,2|Opts:Stem=Down,Beam
|Chord|Dur:16th|Pos:1,2|Opts:Stem=Down,Beam
|Chord|Dur:16th|Pos:1,2|Opts:Stem=Down,Beam
|Chord|Dur:16th|Pos:1,2|Opts:Stem=Down,Beam
|Chord|Dur:16th|Pos:1,2|Opts:Stem=Down,Beam
|Chord|Dur:16th|Pos:1,2|Opts:Stem=Down,Beam
|Chord|Dur:16th|Pos:1,2|Opts:Stem=Down,Beam
|Chord|Dur:16th|Pos:1,2|Opts:Stem=Down,Beam
|Chord|Dur:16th|Pos:1,2|Opts:Stem=Down,Beam
|Chord|Dur:16th|Pos:1,2|Opts:Stem=Down,Beam
|Chord|Dur:16th|Pos:1,2|Opts:Stem=Down,Beam
|Chord|Dur:16th|Pos:1,2|Opts:Stem=Down,Beam
|Chord|Dur:16th|Pos:1,2|Opts:Stem=Down,Beam
|Chord|Dur:16th|Pos:1,2|Opts:Stem=Down,Beam=End
!NoteWorthyComposer-End
Title: Re: TremoloSingle.ms (version 0.95)
Post by: Mike Shawaluk on 2015-07-19 01:35 pm
The TremoloSingle.ms object has been updated, with the following changes:


Please refer to the parent post for a description of the available parameters and a sample clip.

As always, feedback and suggestions are greatly appreciated.

Mike
Title: Re: TremoloSingle.ms (version 0.96)
Post by: Mike Shawaluk on 2015-08-17 09:38 am
The TremoloSingle.ms object has been updated, with the following changes:


Please refer to the parent post for a description of the available parameters and a sample clip.

As always, feedback and suggestions are greatly appreciated.

Mike

Title: Re: TremoloSingle.ms (version 1.0)
Post by: Flurmy on 2015-10-11 09:26 pm
I have a split chord with tremolo.
I put the "tremolo single" object before the chords and one part is OK.
My idea was to put a second "tremolo single" object before the chords and then forcing it on the other side using the "offset" parameter, but it doesn't work.
Of course I solved putting the two chord on two layered staves, but why not to have the possibility to choose which stem (up or down) will receive the tremolo?
Title: Re: TremoloSingle.ms (version 1.0)
Post by: Mike Shawaluk on 2015-10-11 10:24 pm
The TremoloSingle object does not work correctly for split voice chords whose durations are different. From what I can tell, it will play all of the notes in tremolo style, but only for the duration of the shorter of the notes/chords. And as you have noticed, it will add the ornament only to the "main" stem.

I will look into adding a way to ornament both stems of a split voice chord.
Title: Re: TremoloSingle.ms (1.1)
Post by: Mike Shawaluk on 2015-10-12 06:26 pm
The TremoloSingle.ms object has been updated, with the following changes:


Please refer to the parent post for a description of the available parameters and a sample clip.
Title: Re: TremoloSingle.ms (1.1)
Post by: Flurmy on 2015-10-12 08:38 pm
Thank you, Mike.
By the way: in my case the duration of the notes is the same.
The fact that the chord is splitted is because of... the number of fingers. The lower part is to be played with the left hand while the upper with the right.
Title: Re: TremoloSingle.ms (1.1)
Post by: Richard Woodroffe on 2015-11-09 02:42 pm
Hi Mike,

This is a slight problem when using tremolo single on a rest chord if the stem direction is set to allow stem down on the note portion of the rest chord. The playback does not play! I don't recall this happening on initial testing but there may have been later changes that have caused this to happen.

Thanks
Title: Re: TremoloSingle.ms (1.2)
Post by: Mike Shawaluk on 2015-11-09 02:47 pm
The TremoloSingle.ms object has been updated, with the following changes:


Please refer to the parent post for a description of the available parameters and a sample clip.
Title: Re: TremoloSingle.ms (1.2)
Post by: Flurmy on 2016-12-09 11:22 am
How can I select which side of the chord the tremolo marker is shown?
For example, I would like to have the second tremolo marker too above the chord:
Code: (nwc) [Select · Download]
!NoteWorthyComposerClip(2.75,Single)
|User|TremoloSingle.ms|Pos:-7|Beams:2
|Chord|Dur:Whole|Pos:-3,0,2|Opts:Muted
|Bar
|User|TremoloSingle.ms|Pos:-2.5|Beams:2
|Chord|Dur:Whole|Pos:-2,1,3|Opts:Muted
!NoteWorthyComposerClip-End
No parameter seems to be of help. Vertical offset stops at -5.
I'm overlooking something?
Title: Re: TremoloSingle.ms (1.2)
Post by: NoteWorthy Online on 2016-12-09 11:34 am
It uses the stem direction, which can be set on those whole notes. Just flip the stem direction...

Code: (nwc) [Select · Download]
!NoteWorthyComposerClip(2.75,Single)
|User|TremoloSingle.ms|Pos:-7|Beams:2
|Chord|Dur:Whole|Pos:-3,0,2|Opts:Muted
|Bar
|User|TremoloSingle.ms|Pos:-2.5|Beams:2
|Chord|Dur:Whole|Pos:-2,1,3|Opts:Stem=Up,Muted
!NoteWorthyComposerClip-End
Title: Re: TremoloSingle.ms (1.2)
Post by: Flurmy on 2016-12-09 12:10 pm
But... it was the first thing I tried!
Or, at least, it was the first thing I though to try...  :-[

A strong need of holidays, perhaps...
Title: Re: TremoloSingle.ms (1.2)
Post by: Flurmy on 2016-12-30 01:49 pm
Ops!
Code: (nwc) [Select · Download]
!NoteWorthyComposerClip(2.75,Single)
|User|TremoloSingle.ms|Pos:1.5
|Note|Dur:8th|Pos:0|Opts:Stem=Up,Muted
!NoteWorthyComposerClip-End
Title: Re: TremoloSingle.ms (1.2)
Post by: Mike Shawaluk on 2016-12-30 02:03 pm
That's not technically an "oops"; you have to make sure your note stem is long enough to accommodate the number of bars for the tremolo.

For NWC 2.75a, there will be an embedded user tool that applies (or removes) tremolos from one or more notes. It is possible for the tool to automatically set the stem length when a tremolo is added, but the calculation can be a bit tricky; it depends on whether the note is beamed or flagged, as well as the note's duration. Personally I would rather let the note stem length be adjusted by the user to meet their preference. With the new version of NWC, that is easy to do, using Alt+Up/Down (or using filtered properties if you are adjusting multiple notes).
Title: Re: TremoloSingle.ms (1.2)
Post by: Flurmy on 2016-12-30 04:29 pm
Stupid as usual, since the stem length of the 1/4 is long enough I assumed that the same length is OK also for 1/8...
Sorry.
Title: Re: TremoloSingle.ms (2.0d)
Post by: Mike Shawaluk on 2017-08-28 09:58 pm
The TremoloSingle.ms object has been updated for version 2.75a, with the following changes:


Please refer to the parent post for a description of the available parameters and a sample clip.
Title: Re: TremoloSingle.ms (2.0d)
Post by: Peter Edwards on 2017-10-17 03:49 pm
A couple of observations:
Title: Re: TremoloSingle.ms (2.0d)
Post by: Mike Shawaluk on 2017-10-17 04:55 pm
A couple of observations:
  • If you insert a dynamic between the object and the note then it is ignored. Easy not to do it but it can happen accidently.
  • Playback ignores crescendos.
The object determines the score's current dynamic variance at the location where the object is placed, and then it will play the tremolo at that volume. If you place the dynamic to the right of the object, it isn't seen, and it will play at the previous volume.

If you want to effect a crescendo/diminuendo for a tremolo, please refer to this discussion (https://forum.noteworthycomposer.com/?topic=9084.msg66770#msg66770) for the two-note tremolo object.
Title: Re: TremoloSingle.ms (2.03)
Post by: Mike Shawaluk on 2018-03-02 05:32 pm
The TremoloSingle.ms object has been updated with the following changes:


Please refer to the parent post for a description of the available parameters and a sample clip.

Title: Re: TremoloSingle.ms (2.0e)
Post by: Flurmy on 2023-10-30 02:55 pm
Reviving an old question with a slightly different request: how can I use two TremoloSingle objects on the same split chord?
The best a could get (except, of course, using layering) is cheating using text and MusicDingSans as "User 1" font as in the second bar but, of course, no sound.
Code: (nwc) [Select · Download]
!NoteWorthyComposerClip(2.751,Single)
|Text|Text:"o"|Font:User1|Pos:-10.5|Justify:Center|Placement:AtNextNote
!NoteWorthyComposer(2.751)
|Editor|ActiveStaff:1|CaretIndex:1|CaretPos:-1
|SongInfo|Title:""|Author:"<Name>"|Lyricist:""|Copyright1:"Copyright © 2023 <Name>"|Copyright2:"All Rights Reserved"
|PgSetup|StaffSize:16|Zoom:4|TitlePage:Y|JustifyVertically:Y|PrintSystemSepMark:N|ExtendLastSystem:N|DurationPadding:Y|PageNumbers:0|StaffLabels:None|BarNumbers:None|StartingBar:1
|Font|Style:StaffItalic|Typeface:"Times New Roman"|Size:10|Bold:Y|Italic:Y|CharSet:0
|Font|Style:StaffBold|Typeface:"Times New Roman"|Size:8|Bold:Y|Italic:N|CharSet:0
|Font|Style:StaffLyric|Typeface:"Times New Roman"|Size:7.2|Bold:N|Italic:N|CharSet:0
|Font|Style:PageTitleText|Typeface:"Times New Roman"|Size:24|Bold:Y|Italic:N|CharSet:0
|Font|Style:PageText|Typeface:"Times New Roman"|Size:12|Bold:N|Italic:N|CharSet:0
|Font|Style:PageSmallText|Typeface:"Times New Roman"|Size:8|Bold:N|Italic:N|CharSet:0
|Font|Style:User1|Typeface:"MusikDingsSans"|Size:16|Bold:N|Italic:N|CharSet:1
|Font|Style:User2|Typeface:"Times New Roman"|Size:8|Bold:N|Italic:N|CharSet:0
|Font|Style:User3|Typeface:"Times New Roman"|Size:8|Bold:N|Italic:N|CharSet:0
|Font|Style:User4|Typeface:"Times New Roman"|Size:8|Bold:N|Italic:N|CharSet:0
|Font|Style:User5|Typeface:"Times New Roman"|Size:8|Bold:N|Italic:N|CharSet:0
|Font|Style:User6|Typeface:"Times New Roman"|Size:8|Bold:N|Italic:N|CharSet:0
|PgMargins|Left:1.27|Top:1.27|Right:1.27|Bottom:1.27|Mirror:N
|AddStaff|Name:"Staff"|Group:"Standard"
|StaffProperties|EndingBar:Section Close|Visible:Y|BoundaryTop:12|BoundaryBottom:12|Lines:5|Color:Default
|StaffProperties|Muted:N|Volume:127|StereoPan:64|Device:0|Channel:1
|StaffInstrument|Trans:0|DynVel:10,30,45,60,75,92,108,127
|User|TremoloSingle.ms|Pos:-5.5|Which:bottom
|User|TremoloSingle.ms|Pos:-5|Beams:3
|Chord|Dur:4th|Pos:0|Opts:Stem=Up,Muted|Dur2:Half|Pos2:-3
|User|TremoloSingle.ms|Pos:0|Beams:3
|Note|Dur:4th|Pos:1|Opts:Stem=Up,Muted
|Bar
|Text|Text:"o"|Font:User1|Scale:70|Pos:-10.5|Justify:Center|Placement:AtNextNote
|User|TremoloSingle.ms|Pos:0
|Chord|Dur:4th|Pos:0|Opts:Stem=Up,Muted|Dur2:Half|Pos2:-3
|User|TremoloSingle.ms|Pos:0
|Note|Dur:4th|Pos:1|Opts:Stem=Up,Muted
!NoteWorthyComposer-End
!NoteWorthyComposerClip-End
Title: Re: TremoloSingle.ms (2.0e)
Post by: Mike Shawaluk on 2023-10-30 05:11 pm
It has taken me a while to refresh my memory on this object I haven't touched in the last 5 years :-)

The first thing I thought of is that it should be possible to include two objects, with "Split Chord Member" set to "top" and "bottom". But there is a bit of code that prevents this from working. I temporarily commented out that bit of code, and then NWC will draw and play the tremolo for both members.

But then I discovered a bug, which is actually mentioned earlier in this thread: when there is a split chord with different note lengths, the tremolo duration will always be the shorter note length.  This bug can be fixed, but there are few things worth discussing first.
My own general feeling is that split chords are the red-headed stepchild of NWC, and have a number of limitations, such as the inability of having beams on both members and the inability to independently control stem length and articulations on each member. (I am sure there are more). I am reminded of many comments by dearly departed member Rick G. who stated that separate layers were the proper way to handle multiple parts on the same staff, since all of those shortcomings could be avoided. With that said, perhaps it is not worth reworking the tremolo code to deal with the split chord anomalies.  Comments? Suggestions?
Title: Re: TremoloSingle.ms (2.0e)
Post by: hmmueller on 2023-10-30 08:05 pm
Not only are split chords stepchilds (but still useful; even more so with rest chords with invisible rests) and hence tremolos on them of medium importance, I don't know of any instrument that would (more or less easily) be able to play differently long tremolos - yes, of course one can do this with two hands on a piano or harp, and with very versatile fingers maybe even with one hand ... but ... who, when, where? I'd suggest to live with the limitations.

H.M.
Title: Re: TremoloSingle.ms (2.0e)
Post by: Lawrie Pardy on 2023-10-30 08:55 pm
<snip>
I don't know of any instrument that would (more or less easily) be able to play differently long tremolos
<snip>
Limited use case, but I can imagine it for divisi parts...

Layering is still the best answer (generally) IMHO
Title: Re: TremoloSingle.ms (2.0e)
Post by: Flurmy on 2023-10-31 08:24 am
Limited use case, but I can imagine it for divisi parts...
Yes indeed. See attachment (violas).

Since it seems that the big problem is in the sound, is should be simple to have at least the gliph.
Title: Re: TremoloSingle.ms (2.0e)
Post by: Mike Shawaluk on 2023-10-31 10:05 am
Since it seems that the big problem is in the sound, is should be simple to have at least the gliph.
If you aren't concerned about playback, you can make a small code change in the plugin to allow two user objects to precede a split chord. Go to line 98:
Code: (lua) [Select · Download]
if (idx:userType() == userObjTypeName) then return false end
Add "--" to the start of the line to comment it out (or, if you are brave, you can delete it)
It will now display and play a tremolo for both sides of the chord, but as previously noted, the longer duration note will play too short.
I haven't thoroughly tested this change to know if there are any side effects, but I suspect that it will work fine.

EDIT: You can disregard this hack, I went ahead and made an update.
Title: Re: TremoloSingle.ms (2.1)
Post by: Mike Shawaluk on 2023-10-31 11:11 am
The TremoloSingle.ms object has been updated to version 2.1, with the following changes:

Title: Re: TremoloSingle.ms (2.1)
Post by: Flurmy on 2023-10-31 05:51 pm
Wow! Thank you, Mike.

For the records: in the score I attached I simply switched the soundfont to "tremolo strings".  :D
That's why I wasn't concerned with the sound.
Title: Re: TremoloSingle.ms (2.1)
Post by: Lawrie Pardy on 2023-12-01 03:12 pm
Hi Mike,
I just played back an old score that uses TremoloSingle.ms and got the following error from the updated version:
157: attempt to perform arithmetic on a nil value
and the object was suspended

The old version worked perfectly

This is a sample of a section of the score where the object is used.  Instrument is a Glockenspiel and is the only staff with this object in use - it appears 19 times.
Code: (nwc) [Select · Download]
!NoteWorthyComposerClip(2.751,Single)
|Note|Dur:8th|Pos:-1|Opts:Stem=Up,Beam=First
|Note|Dur:8th|Pos:0|Opts:Stem=Up,Beam=End
|Note|Dur:4th,Staccato|Pos:1
|Note|Dur:8th,Accent|Pos:-2|Opts:Stem=Down,Beam=First
|Note|Dur:8th|Pos:3|Opts:Stem=Down,Beam=End
|Rest|Dur:8th
|Note|Dur:8th,Slur,Accent|Pos:2^
|Bar
|User|TremoloSingle.ms|Pos:0
|Note|Dur:Whole,Slur,Accent|Pos:2|Opts:Muted
!NoteWorthyComposerClip-End
Title: Re: TremoloSingle.ms (2.1)
Post by: Mike Shawaluk on 2023-12-01 03:37 pm
Hi Mike,
I just played back an old score that uses TremoloSingle.ms and got the following error from the updated version:
157: attempt to perform arithmetic on a nil value
and the object was suspended

The old version worked perfectly

This is a sample of a section of the score where the object is used.  Instrument is a Glockenspiel and is the only staff with this object in use - it appears 19 times.
Code: (nwc) [Select · Download]
!NoteWorthyComposerClip(2.751,Single)
|Note|Dur:8th|Pos:-1|Opts:Stem=Up,Beam=First
|Note|Dur:8th|Pos:0|Opts:Stem=Up,Beam=End
|Note|Dur:4th,Staccato|Pos:1
|Note|Dur:8th,Accent|Pos:-2|Opts:Stem=Down,Beam=First
|Note|Dur:8th|Pos:3|Opts:Stem=Down,Beam=End
|Rest|Dur:8th
|Note|Dur:8th,Slur,Accent|Pos:2^
|Bar
|User|TremoloSingle.ms|Pos:0
|Note|Dur:Whole,Slur,Accent|Pos:2|Opts:Muted
!NoteWorthyComposerClip-End

I am reverting the object back to version 2.0f (basically the same as 2.0e but it will allow multiple tremolo ornaments on a split chord). My latest change,  which was to correct playback for split chords, has introduced a bug when the tremolo note has duration modifiers such as dots, slurs, articulations and possibly other attributes (basically, anything that can show up in the "Dur" or "Dur2" properties).  I apologize for not testing this change more thoroughly.
Title: Re: TremoloSingle.ms (2.1)
Post by: Lawrie Pardy on 2023-12-01 03:40 pm
Thanks for the quick followup.
Title: Re: TremoloSingle.ms (2.0f)
Post by: Mike Shawaluk on 2023-12-01 03:57 pm
The TremoloSingle.ms object has been rolled back from 2.1, to 2.0f, with the following change:


Note that the reverted version still has the fix to allow separate tremolo ornaments for both sides of a split chord. Playback is the only thing that doesn't work correctly, but I assume this is better than having an object that crashes.
Title: Re: TremoloSingle.ms (2.1)
Post by: hmmueller on 2023-12-02 08:30 am
Would something like the following work, for line 157?
Code: [Select · Download]
	local fini = idx:sppOffset() + nwcplay.calcDurLength(idx:durationBase(t.Which == 'bottom' and 1 or idx:noteCount())) - 1
At least, it seems to play both the attached scores correctly ...

H.M.
Title: Re: TremoloSingle.ms (2.1)
Post by: Mike Shawaluk on 2023-12-02 10:14 am
Would something like the following work, for line 157?
Code: [Select · Download]
	local fini = idx:sppOffset() + nwcplay.calcDurLength(idx:durationBase(t.Which == 'bottom' and 1 or idx:noteCount())) - 1
At least, it seems to play both the attached scores correctly ...

H.M.
That will indeed work for many notes and chords, but not all. The problem with the nwcplay.calcDurLength() method is that it requires a "plain" note duration type, such as Half, 4th, 8th, etc.  If the note happens to be dotted, then the calculated duration will be too short. The older (current) code gets the sppOffset() before and after the tremolo note/chord, which takes the dotted duration into account. But alas, the problem with using the before/after calculation is that a split chord or RestChord with different durations will "take up" the shorter of the two durations, so if the tremolo happens to be for the longer duration of the two, it will play too short. Using CalcDurLength() would have solved this problem, if returned durations of "Half,Dotted", "Half,DblDotted", etc. had been acceptable parameter values. (It gets messier... I'll elaborate if you are interested.)

Let me know if the above makes sense.
Title: Re: TremoloSingle.ms (2.1a)
Post by: Mike Shawaluk on 2023-12-02 12:01 pm
The TremoloSingle.ms object has been updated to 2.1a, with the following change:


Thank you to @hmmueller for putting me on the right track toward getting this annoying issue fixed. :)
Title: Re: TremoloSingle.ms (2.1)
Post by: hmmueller on 2023-12-02 12:04 pm
Let me know if the above makes sense.
Unfortunately, it does  :'( Dot lengthened could be added, with a call to idx:isDotted() - but there's more? - ah, I posted in the same second as your 2.1a message  :D

... edit: Looks good!

H.M.
Title: Re: TremoloSingle.ms (2.1)
Post by: jonnotes on 2024-03-15 03:14 pm
Mike - I hope I'm not too late to catch your attention on this topic!

I have just found the need to have two parts on one stave (tails up and tails down) with both parts using Tremolo Single. I think I have understood, through the various comings and goings a few months ago, that this should now be possible.  This would be an improvement on having to make chords with a joint tail just in order to get the double tremolo.  My troubles are compounded by my lack of experience of installing objects.

Reading through the whole topic, I am not sure where I am supposed to obtain the object.  The first reference to it is 9 years ago.  Am I to understand that the link under that old posting currently points to the latest version, or not?  If not, where should I be going for it, please?.

Next, when I say "Yes, add to system"  my Noteworthy seems to record its position by pointing to the Downloads folder - not the folder pointed to by the Options page - so I have tried to move it to the latter location and get away from references to the Downloads folder.  Is this a correct procedure?

On top of that, I'm unsure whether in the end I actually do have the latest version a) because it doesn't seem to be labelled or dated in any way and b) because it doesn't seem to have the upper/lower/both option and c) because it doesn't give tremolos to both parts...

There is unfortunately a further question - namely, does the Make TremoloSingle.ms work in the same way (i.e. tremolo on two parts)?

I should be very grateful for your patient guidance!  TIA

Jonathan
Title: Re: TremoloSingle.ms (2.1)
Post by: Mike Shawaluk on 2024-03-15 06:21 pm
Hi Jonathan,

You don't need to install the TremoloSingle.ms object, because it comes with NWC. You will just need to make sure you have the latest version, by going to Tools > Manage Objects... and clicking on the "Online Synch..." button, and following the prompts. If you haven't done this in a while, there may be a bunch of objects that are in need of updating. The program will automatically pull the current version that is posted in the forum, so you don't need to download any files.

Once the object is updated to the latest version (which is 2.1a), all you need to do is insert two TremoloSingle.ms objects before a split chord. Set the "Split Chord Member" parameter on one of the objects to "top" and set that parameter on the other one to "bottom". Each side of the split chord can have a different number of beams.

I don't recommend using the old "Make Tremolo.ms" user tool, since user objects can now have built-in tools. If you go to the User Tool... menu, there is a .Plugins group, which has tools for each plugin that implements them. The tool "TremoloSingle.ms: Apply" is the one you want to use. Just highlight the note and run the tool. It will prompt for the number of beams, create the plugin and mute the note. Run it a second time to get the object for the bottom note (It doesn't currently prompt for top vs. bottom, so you will have to change the property on one of your objects to point to the bottom note).

Let me know if this answers your questions.

Mike
Title: Re: TremoloSingle.ms (2.1)
Post by: jonnotes on 2024-03-15 11:52 pm
Hi Mike - and many thanks for your very prompt and helpful reply!  (believe me, I really need that level of detail!).  It's getting late now so I sha'n't put your advice into practice until the morning, but you have clearly pointed out a proper path to follow, which I expect I might never have found for myself...

When I opened some old compositions (having rearranged my Plugins folder, I was warned that Noteworthy had "detected 71 unkown objects".  I warily did not then save the compositions, but now I am wondering how to put things back in a sensible place, and how to let Noteworthy know where that is, so that I don't lose all my previous Tremolo work...

Thanks again (and in advance!)

Jonathan
Title: Re: TremoloSingle.ms (2.1)
Post by: jonnotes on 2024-03-15 11:55 pm
A further thought:  if you recommend me not to use the Make Tremolo user tool, am I still able to select a whole passage of several bars and apply the tremolos all in one go - or shall I need to apply them to each note/chord separately?
Title: Re: TremoloSingle.ms (2.1)
Post by: Mike Shawaluk on 2024-03-16 01:24 am
A further thought:  if you recommend me not to use the Make Tremolo user tool, am I still able to select a whole passage of several bars and apply the tremolos all in one go - or shall I need to apply them to each note/chord separately?
The TremoloSingle.ms: Apply auto tool will also apply tremolos to multiple notes at once. However, after some experimentation, I see that if you select a range of notes that already includes tremolos, it will remove the existing ones when it adds the new ones. So that is not a viable way to add two tremolo objects per note, which is what you need if you want both ends of a split chord to have a tremolo. I think the best way to do this is by simple cut and paste.
Title: Re: TremoloSingle.ms (2.1)
Post by: Mike Shawaluk on 2024-03-16 01:29 am
When I opened some old compositions (having rearranged my Plugins folder, I was warned that Noteworthy had "detected 71 unkown objects".  I warily did not then save the compositions, but now I am wondering how to put things back in a sensible place, and how to let Noteworthy know where that is, so that I don't lose all my previous Tremolo work...

Thanks again (and in advance!)

Jonathan

I'm not sure how you "rearranged" your plugins folder, but if NWC says it detected 71 unknown objects, it sounds like it couldn't find your plugins folder. It might have created a new empty folder in its place.

If you go to Tools > Options and go to the Folders tab, it will show you the locations of the various file types. For Object Plugins, it should say something like ":programdata:\Noteworthy Software\nwc2\UserPlugins". If you moved the plugins folder somewhere else, you can modify that entry to point to the new location.
Title: Re: TremoloSingle.ms (2.1)
Post by: jonnotes on 2024-03-16 04:17 pm
Hello again Mike,

I have carefully implemented all your suggestions, with satisfactory results!  As you point out, cutting and pasting does seem to be the only way to have the sound and appearance both right at once.  And as for the Folders thing, I found it was sufficient to peform the Online Synch to put things back as they had been - which was a relief.

I expect I missed out years ago (again) on the explanation as to why the User object mutes the relevant notes, and why they nevertheless sound...

I attach my current piece of work to show where the puzzlement came from.  A further mystery:  if you look at/listen to bar 24 you will note that the tremolo in the lower part stops when it reaches the top note (B flat), and resumes in the next bar.  In which ever order I input and remove various notes in that chord, I cannot make the upper note legato and the lower note tremolo - though this does not apply earlier in that bar - quite mysterious!


Many thanks again!

Jonathan
Title: Re: TremoloSingle.ms (2.1)
Post by: Mike Shawaluk on 2024-03-16 07:59 pm
I expect I missed out years ago (again) on the explanation as to why the User object mutes the relevant notes, and why they nevertheless sound...
The short answer is that the user object plays the tremolo sound, which needs to replace the sound that a plain note would have made. So the note needs to be muted so you don't hear the sustained note on top of the tremolo sound.

And that; is precisely the problem in your score. You don't have the tremolo notes muted, so they are sounding along with the tremolo playback. And NWC does not give us a way of muting only one side of a split chord. The way to fix this would be to use layered staves, with the tremolo notes on one staff and the slurred part on the other.
Title: Re: TremoloSingle.ms (2.1)
Post by: jonnotes on 2024-03-17 03:08 pm
Hi Mike

So good of you to persist in bothering with my little niggles...!

I now understand why I cannot have tremolo and legato on a split stave (though I still don't understand why it actually does happen at the beginning of bar 24...!).  My preference has always been for avoiding layered staves, and to go with slighty imperfect effects/looks and tolerate them...!

During my further experimentation, I discovered the 'feature' that, as soon as the tremolo object finds a quaver (8th) or smaller note, it adds a spurious extra beam to the current note - not physically/visually, but in its operation.  I am not a string player, but I'd like to bet that a violinist does not alter the rate of 'scrubbing' according to different note lengths!  I attach a little file to demonstrate this.  It can be overcome by patient and individual alteration of the beaming for the shorter notes - but not completely, since the object does not allow a number of beams smaller than 1.

As ever, very grateful for your patient attention to my ramblings...!

Jonathan
Title: Re: TremoloSingle.ms (2.1)
Post by: Flurmy on 2024-03-17 04:58 pm
I recently made the same discovery.
The fact is that the speed of the tremolo is computed by dividing the note duration by the number of beams of the tremolo.
So, if the note already has some beams...
Indeed, if you lengthen the note stem as you should to have something decent to show, the thing starts having sense.
Title: Re: TremoloSingle.ms (2.1)
Post by: Mike Shawaluk on 2024-03-18 02:13 am
I recently made the same discovery.
The fact is that the speed of the tremolo is computed by dividing the note duration by the number of beams of the tremolo.
So, if the note already has some beams...
Indeed, if you lengthen the note stem as you should to have something decent to show, the thing starts having sense.

I thought that this is how tremolos are supposed to work. If it is not, please explain how it should be, and I'll make the necessary fixes.
Title: Re: TremoloSingle.ms (2.1)
Post by: Flurmy on 2024-03-18 09:05 am
Mike, I don't know, otherwise I'd have discussed it with you.
I'll try looking at some books, unless someone else here already knows the answer.
Anyway, as I wrote, the thing is rational.
Title: Re: TremoloSingle.ms (2.1)
Post by: hmmueller on 2024-03-18 10:15 am
Mike, I think you are right. In the attachment are three excerpts from Bruckner's 7th symphony (two at the very beginning, one almost at the end); where one can see that the tremolo markers on the eighths have two beams, whereas the tremolos on longer notes have three beams. Of course, the tremolo speed is the same everywhere in a phrase.

Elaine Gould implicitly, by examples and by implying that the notation is (also) used for "measured tremolos", implies the same on pp.222-225 of "Behind Bars".

H.M.
 
Title: Re: TremoloSingle.ms (2.1)
Post by: Mike Shawaluk on 2024-03-18 03:06 pm
So I looked at the code, and I am fairly certain I am implementing things correctly according to "Behind Bars". It is unfortunate that I call the parameter "beams"; it should probably be "strokes" as is used in BB. Basically, the duration of the individual notes played for the tremolo are the same as a note with that many beams/flags, if the tremolo note is a note with no flags/beams (i.e. quarter note or longer). If the tremolo is on a beamed/flagged note, then the individual note duration is the sum of the note's beams and tremolo strokes.  And the number of notes played is however many will fit in the original note's duration.

Does that make sense?
Title: Re: TremoloSingle.ms (2.1)
Post by: Flurmy on 2024-03-18 03:28 pm
Once you're aware of it it's not absurd, but maybe changing it to take care of the already present beams would be more intuitive.
In this optic, there is also the problem of manually lengthen the note stem to make room for the tremolo.
Title: Re: TremoloSingle.ms (2.1)
Post by: Mike Shawaluk on 2024-03-18 03:39 pm
Once you're aware of it it's not absurd, but maybe changing it to take care of the already present beams would be more intuitive.
In this optic, there is also the problem of manually lengthen the note stem to make room for the tremolo.
There's not much I can do on that account. A user object can't tell NWC to draw (or change the playback of) its notes differently. If this were possible, it wouldn't be necessary to mute notes for effects that have playback. Perhaps if there is ever a "next generation" of NWC, it will allow for this sort of interaction between objects and native notes.

At least now it is easier to lengthen/shorten note stems on the fly, using Alt+Up/Down arrow.
Title: Re: TremoloSingle.ms (2.1)
Post by: Flurmy on 2024-03-18 04:10 pm
Yes, as you could guess, I know...
Title: Re: TremoloSingle.ms (2.1)
Post by: jonnotes on 2024-03-19 02:47 pm
Gentlemen - once again, many thanks for your diligent attention to my questions...!

Nevertheless, I take issue with the idea of adding the note's beams and tremolo strokes to calculate its duration...(?)  I don't think this can be right - for me, the audible effect is the bottom line - and I cannot recall an instance where the composer intends the speed of tremolo notes to increase merely because of the number of stems on the note.  As hmmueller says "Of course, the tremolo speed is the same everywhere in a phrase.".

I don't have access to Behind Bars, but I took some assurance from the Wikipedia article on tremolo:

"Commonly, for example, the duration used will be demisemiquavers (thirty-second notes). In this case, there will be three strokes through the stems of the notes, except on notes which already have beams or flags [my emphasis]: quavers (eighth notes) then take two slashes, and semiquavers (sixteenth notes) take one."

The effect of this is to make all the tremolo notes the same (thirty-second notes or demisemiquavers).  The notated example in Wikipedia shows just that: a tremolo phrase of mostly crotchets (quarter notes) where the one quaver (eighth note) has just two additional beams (=tails) to bring its total (as for every other note) to three.

As I say, the effect of the object can generally be mitigated by adjustments to individual instances of the tremolo.

Thanks all, again!

Jonathan

Title: Re: TremoloSingle.ms (2.1)
Post by: Mike Shawaluk on 2024-03-19 04:40 pm
This is the relevant page from "Behind Bars". Perhaps I didn't state things clearly, but it seems to agree with what Wikipedia says. Namely, each tremolo beam (which Behind Bars calls "strokes") has the same effect as an additional beam, regarding the duration of individual tremolo notes.
Title: Re: TremoloSingle.ms (2.1)
Post by: jonnotes on 2024-03-20 01:50 pm
Yes, but quavers (eighth notes) and smaller already have one or more beams/tails which now become part of the tremolo, and are not additional to it


To be honest, I'm not sure I explained myself clearly, either!

Attached is a more explicit demonstration of what happens when you apply the object over a whole phrase - you need to hear it to understand my view.

In fact, I don't foresee many situations when I shall need to tremolo-ise whole phrases like this, but at least I now know what to do!


Onwards, upwards (as they say) with some serious score transcriptions and probable arrangement work for 'The Chimes' which I have volunteered to MD in December...

Thanks, all!

Jonathan
Title: Re: TremoloSingle.ms (2.1)
Post by: Mike Shawaluk on 2024-03-20 03:03 pm
You might be wondering why the tremolo beams are positioned so high on some of the notes, especially the eighth note (quaver) in measure 2. The object sets the default vertical position of the beams/strokes differently for single notes with plain stems, single notes with flags, beamed notes, and whole notes. The position is a small offset from either the end of the stem, the tip of the flag, or the inside edge of the beam closest to the notehead. In general, the preferred way to adjust the vertical position is to increase the note's stem length, but if you don't care if the tremolo beam collides with the note's actual beam or flag, you can use the Offset parameter, which I see you have already done in a few cases.