Skip to main content

Topic: Attach Objects To Next Note.nw (Read 312 times) previous topic - next topic

Attach Objects To Next Note.nw
A support incident with the TremoloSingle.ms object type led to the attached user tool. This user tool can be run in Clip or File Text modes. When run in file mode, it returns file text.

This tool attaches all instances of the designated user object type to the target note that follows it, skipping any rests or bar lines that separate the object from its target note. This has been designed to work with TremoloSingle.ms objects, but would work for other objects that specifically target notes, and not rests or bar lines.

In version 2.75a, you can install this tool directly from Tools, User Tools, Download by entering its name at the prompt:

Code: (txt) [Select · Download]
Attach Objects To Next Note.nw


Example

Spoiler (click to show/hide)
  • Last Edit: 2017-01-11 01:07 pm by NoteWorthy Online

Re: Attach Objects To Next Note.nw
Reply #1
Currently, TremoloSingle.ms (and a number of my other objects) are a bit lax when it comes to placement of the object relative to the note/chord they affect.  In most cases, the object will work fine if it is not immediately followed by the note/chord, but if there are rests or bar lines between the two, the object might not be drawn or played, or could even throw an error.

I will be making changes to TremoloSingle (and other objects) soon, that will enforce proper placement relative to the notes/chords being ornamented and played. If there are intervening rests or bars, drawing and playback of the object will be suppressed, and an error indication will be displayed instead, to alert the user that corrective action is needed. The user tool in the parent post can be used to scan scores for such cases and "fix" them.

If you have any questions or suggestions about this, please let me know.

Thanks,
Mike

Re: Attach Objects To Next Note.nw
Reply #2
Updated to return the number of object instances that were actually moved. The return report now looks like this:

Code: [Select · Download]
Results for TremoloSingle.ms (file mode)

Objects found:    390
Objects moved:    85
Objects deleted:  0