Skip to main content
Topic: How do I create a command to insert a specific set of notes? (Read 6847 times) previous topic - next topic

How do I create a command to insert a specific set of notes?

I have a buddy [NWC user but not a power-user] who asked me "since our [church orchestra] music usually consists of a lot of 'dotted eigth-sixteenth' notes, how can I set it up so I can hit a button and get the pair of notes inserted" ?

I tried creating a new usertool, named it, and pasted in the following:
!NoteWorthyComposerClip(2.0,Single)
|Note|Dur:8th,Dotted|Pos:3|Opts:Stem=Down,Beam=First
|Note|Dur:16th|Pos:3|Opts:Stem=Down,Beam=End
!NoteWorthyComposerClip-End

but when I run it - it fails.

And suggestions on how I can do this?
TIA

Re: How do I create a command to insert a specific set of notes?

Reply #1
If all you want to do is get those two notes into a staff with a keystroke, you don't want a User Tool. Just copy the following into the clipboard:
Code: [Select · Download]
!NoteWorthyComposerClip(2.0,Single)
|Note|Dur:8th,Dotted|Pos:3|Opts:Stem=Down,Beam=First
|Note|Dur:16th|Pos:3|Opts:Stem=Down,Beam=End
!NoteWorthyComposerClip-End
position the cursor to where you want it and paste. IOW press: ctrl+v

A User Tool is for those cases where you have a selection and you want it replaced with something else (usually based on what the selection contains).  A tool could be written that would change every non-dotted, non-triplet note or simple chord in your selection into two notes/chords - the first 3/4 of the duration of the original, the second, 1/4. 

If that is what you would like to do, we can explore it further. Give some thought to the range of durations the tool should consider: should a A Half note or longer be skipped? Should a 16th become 32nd,Dotted + 64th?
Registered user since 1996

Re: How do I create a command to insert a specific set of notes?

Reply #2
I see the Unjazzify user tool does just the opposite of what Spence602 is looking for.  I don't have the programming skills, but I wonder if someone couldn't write a tool that would go the other way - find the next beamed pair of 8th notes, dot the first and half the second? 

In the meanwhile, as a workaround, Spence, you might find it less tedious to use the keyboard than the mouse to alternate between note values as you enter them.  Or you could write your music as if you were on an assembly line, doing all identical tasks in batches: 

Example.

First enter all the notes that will be dotted 8ths:

8     8      8     8

Now dot them
8.     8.     8.     8.    

Then insert all the 16ths:
8. 16   8. 16   8. 16   8. 16  

Finally, run the automatic beam tool.





Re: How do I create a command to insert a specific set of notes?

Reply #3
I wan't kidding when I said it was for a buddy...  I'm pretty proficient at NWC by looking at the score and typing away (note/space, duration, and attributes in one-fell-swoop.

My buddy tells me he "enters a quarternote for each note in the bar, then modifies each note to it's correct duration, then modifies each note with it's correct attribute (one at a time)"...  I feel sorry for him.  As hard as he makes it, he still has high praises for NWC.

Maybe I should just sit down with him and teach him how to (efficiently) use NWC...

 

Re: How do I create a command to insert a specific set of notes?

Reply #4
As hard as he makes it, he still has high praises for NWC.
It's not that hard. If I want to key that old workhorse: Standing on the Promises, I would start out with:
Code: (nwc) [Select · Download]
!NoteWorthyComposerClip(2.0,Single)
|Clef|Type:Treble
|Key|Signature:Bb,Eb
|TimeSig|Signature:4/4
|Chord|Dur:8th|Pos:-5,-3
|Chord|Dur:8th|Pos:-5,-3
|Chord|Dur:8th|Pos:-5,-3
|Chord|Dur:8th|Pos:-4,-2
|Chord|Dur:8th|Pos:-5,-3
|Chord|Dur:8th|Pos:-6,-4
|Chord|Dur:8th|Pos:-7,-5
|Chord|Dur:8th|Pos:-6,-4
|Bar
!NoteWorthyComposerClip-End
Then position the cursor in front of the first note, press ctrl+f and put an asterisk in the By Expression box. This will cause F3 to select each object in succession.
After a series of F3 dot F3 minus's, I have:
Code: (nwc) [Select · Download]
!NoteWorthyComposerClip(2.0,Single)
|Clef|Type:Treble
|Key|Signature:Bb,Eb
|TimeSig|Signature:4/4
|Chord|Dur:8th,Dotted|Pos:-5,-3
|Chord|Dur:16th|Pos:-5,-3
|Chord|Dur:8th,Dotted|Pos:-5,-3
|Chord|Dur:16th|Pos:-4,-2
|Chord|Dur:8th,Dotted|Pos:-5,-3
|Chord|Dur:16th|Pos:-6,-4
|Chord|Dur:8th,Dotted|Pos:-7,-5
|Chord|Dur:16th|Pos:-6,-4
|Bar
!NoteWorthyComposerClip-End
goes very fast, especially if I have a staff beneath it filled with whole measure rests and bars to keep me in sync. If I did a lot of this, I'd create a Recorder macro, assigning F12 to: F3 . F3 -
Recorder works with Windows 3.1 through WinXP and is available from the Scripto.
Registered user since 1996

Re: How do I create a command to insert a specific set of notes?

Reply #5
That's one for the user tips, Rick.  Very nice.