NoteWorthy Software, Inc.
2014-04-20 10:32 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Licensed NWC2 users can upgrade their community membership [more]
 
   Home   Help Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: HeadPatch.vbs - a Tool to change instruments when notehead changes  (Read 17617 times)
Rick G.
Virtuoso
« on: 2007-11-13 09:46 AM »

The attached tool will insert object(s) into a staff when the notehead type changes.

Usually, an X or diamond notehead indicates a change of instrument patch, volume and/or pitch. Putting these on separate staves can be tedious.

Normally, information is added to the command line to alter the behaviour of the tool. But this tool needs far too much info for that method. Instead, it reads the info from the end of the staff (what I call the 'definition area'). I use |Ending|Endings:7 to indicate this which keeps the defintions from playing or being exported to MIDI.

Listen to this clip:
Code:   [Select · Download]
!NoteWorthyComposerClip(2.0,Single)
|Clef|Type:Bass|OctaveShift:Octave Down
|Key|Signature:Bb,Eb,Ab
|Tempo|Tempo:150|Pos:11
|TimeSig|Signature:AllaBreve
|Dynamic|Style:f|Pos:-7
|Bar|Style:LocalRepeatOpen
|Note|Dur:4th|Pos:3
|Note|Dur:4th|Pos:6
|Note|Dur:4th|Pos:3x
|Note|Dur:8th|Pos:3x|Opts:Stem=Up,Beam=First
|Note|Dur:8th|Pos:-4^|Opts:Stem=Up,Beam=End
|Bar
|Note|Dur:8th|Pos:-4
|Note|Dur:4th|Pos:n-2
|Note|Dur:8th|Pos:0^
|Note|Dur:8th|Pos:0|Opts:Stem=Down,Beam=First
|Note|Dur:8th|Pos:2|Opts:Stem=Down,Beam
|Note|Dur:8th|Pos:0|Opts:Stem=Down,Beam
|Note|Dur:8th|Pos:2|Opts:Stem=Down,Beam=End
|Bar
|Note|Dur:4th|Pos:3
|Note|Dur:4th|Pos:n5
|Note|Dur:4th|Pos:3x
|Note|Dur:8th|Pos:3x|Opts:Stem=Up,Beam=First
|Note|Dur:8th|Pos:-4^|Opts:Stem=Up,Beam=End
|Bar
|Note|Dur:8th|Pos:-4
|Note|Dur:4th|Pos:-1
|Note|Dur:8th|Pos:1^
|Note|Dur:8th|Pos:1|Opts:Stem=Down,Beam=First
|Note|Dur:8th|Pos:2|Opts:Stem=Down,Beam
|Note|Dur:8th|Pos:1|Opts:Stem=Down,Beam
|Note|Dur:8th|Pos:2|Opts:Stem=Down,Beam=End
|Bar|Style:LocalRepeatClose|Repeat:4
|Ending|Endings:7|Visibility:Never
|Instrument|Name:"[o]"|Patch:36|Trans:0|DynVel:10,30,45,60,75,92,108,127|Pos:10|Justify:Center|Placement:AtNextNote
|Dynamic|Style:f|Pos:-9|Justify:Right|Placement:AtNextNote|Visibility:Never
|Note|Dur:4th|Pos:0|Visibility:Never
|Bar|Visibility:Never
|Instrument|Name:"[x]"|Patch:115|Trans:-2|DynVel:10,30,45,60,75,45,108,127|Pos:10|Justify:Center|Placement:AtNextNote
|Dynamic|Style:f|Pos:-9|Justify:Right|Placement:AtNextNote|Visibility:Never
|Note|Dur:4th|Pos:0x|Visibility:Never
|Bar|Visibility:Never
|Text|Text:"{^}"|Font:StaffBold|Pos:10|Justify:Center|Placement:AtNextNote|Visibility:Never
|Note|Dur:4th|Pos:0X|Visibility:Never
|Bar|Style:SectionClose
!NoteWorthyComposerClip-End
Then run the tool on the entire staff and listen again. Each time the tool is run, anything added by it before is removed. I do this by tagging the additions: "|Color:6|Visibility:Never", hardly a normally needed attribute.

* rg_HeadPatch.vbs.txt (2.24 KB - downloaded 783 times.)
« Last Edit: 2007-11-15 12:55 PM by Rick G. » Logged

Registered user since 1996
Rob den Heijer
NWC2 User


« Reply #1 on: 2007-11-13 10:33 AM »

Does nwctxt support comments? If it does, you don't have to find expressions that will never be used - you insert the name of your user tool as a comment where you need it. That way, if you want to undo previous changes of the tool, you know where to look.
Logged
Rick G.
Virtuoso
« Reply #2 on: 2007-11-13 10:46 AM »

Does nwctxt support comments?
You can put all the comments in that you want. Once NWC2 parses it, they are all gone. IOW, useless for my purpose here.
Logged

Registered user since 1996
Lawrie Pardy
Virtuoso


« Reply #3 on: 2007-11-13 03:27 PM »

You can put all the comments in that you want. Once NWC2 parses it, they are all gone. IOW, useless for my purpose here.

How about a particularly formatted text entry with visibility:never... ?

<edit> Having now had an actual look at the tool I withdraw this comment - it works well as it stands and an invisible highlight is extremely unlikely in normal circumstances.

Say Rick, I think I recognise a function in there... :)
« Last Edit: 2007-11-13 03:41 PM by Lawrie Pardy » Logged

I plays 'Bones, crumpets, coronets, floosgals 'n youfonymums
Rob den Heijer
NWC2 User


« Reply #4 on: 2007-11-14 07:32 AM »

You can put all the comments in that you want. Once NWC2 parses it, they are all gone. IOW, useless for my purpose here.
There's that, there's that. Comments would be useful only if NWC2 would store them. Might be nice, though - but zero prio.
Logged
Rick G.
Virtuoso
« Reply #5 on: 2007-11-14 12:54 PM »

IMO, Comments work as needed.
At some point, an Info tag for each object might be useful, like:
Quote
|Note|Dur:4th|Pos:0|Info:"added to ms"
But as you say, low priority.
Logged

Registered user since 1996
Rob den Heijer
NWC2 User


« Reply #6 on: 2007-11-15 04:02 AM »

I would not eat my hat if we would find this in an upcoming release.
Logged
jafalk
Dormant NWC2 User
« Reply #7 on: 2007-11-15 06:26 AM »

Perfect

This is an important improvement.
The feature should definitely be an integrated part of the application.
For bassplayers this is a must
https://www.noteworthysoftware.com/forum/?topic=2885.0

TESTING
There is a bug while looping after the last x note
In this case the first none x-notes in the start of the looping part will not change back to "normal"


Thank you
Jacob
Logged
Rick G.
Virtuoso
« Reply #8 on: 2007-11-15 11:31 AM »

There is a bug while looping after the last x note
The tool just looks at notes from left to right.
Decoding the actual musical flow of a song would require many lines of error-prone code. NoteWorthy's flow rules are not completely documented and are a subject of some contention among users.

This aspect of the tool is unlikely to change unless there is widespread demand for it (with lots of data to test it against).

If you post an example clip of any staff that is causing a problem, I will look at it. I may be able to find a simple alteration to the clip or a program change that is less than a full flow decoder.

Glad that this has helped a bass player. I had hoped this to be of use for guitar, bowed string, and brass players who use a mute.

Edit: In this example, I added a tied grace note just before the repeat.
Code:   [Select · Download]
!NoteWorthyComposerClip(2.0,Single)
|Clef|Type:Bass|OctaveShift:Octave Down
|Key|Signature:Bb,Eb,Ab
|Tempo|Tempo:170|Pos:11
|TimeSig|Signature:AllaBreve
|Bar|Style:LocalRepeatOpen
|Note|Dur:4th|Pos:3
|Note|Dur:8th|Pos:6|Opts:Stem=Down,Beam=First
|Note|Dur:8th|Pos:6x|Opts:Stem=Down,Beam=End
|Note|Dur:4th|Pos:6x
|Note|Dur:8th|Pos:2x|Opts:Stem=Up,Beam=First
|Note|Dur:8th|Pos:-4^|Opts:Stem=Up,Beam=End
|Bar
|Note|Dur:8th|Pos:-4
|Note|Dur:4th|Pos:n-2
|Note|Dur:8th|Pos:0^
|Note|Dur:8th|Pos:0|Opts:Stem=Down,Beam=First
|Note|Dur:8th|Pos:2x|Opts:Stem=Down,Beam
|Note|Dur:8th|Pos:0|Opts:Stem=Down,Beam
|Note|Dur:8th|Pos:2|Opts:Stem=Down,Beam=End
|Bar
|Note|Dur:4th|Pos:3
|Note|Dur:4th|Pos:n5
|Rest|Dur:8th
|Note|Dur:8th|Pos:6x
|Note|Dur:8th|Pos:2x|Opts:Stem=Up,Beam=First
|Note|Dur:8th|Pos:-4^|Opts:Stem=Up,Beam=End
|Bar
|Note|Dur:8th|Pos:-4
|Note|Dur:4th|Pos:-1
|Note|Dur:8th|Pos:1^
|Note|Dur:8th|Pos:1|Opts:Stem=Down,Beam=First
|Note|Dur:8th|Pos:2|Opts:Stem=Down,Beam
|Note|Dur:8th|Pos:1|Opts:Stem=Down,Beam
|Note|Dur:8th|Pos:2x|Opts:Stem=Down,Beam=End
|Note|Dur:4th,Grace|Pos:3^|Visibility:Never
|Bar|Style:LocalRepeatClose|Repeat:4
|Ending|Endings:7|Visibility:Never
|Instrument|Name:"[o]"|Patch:36|Trans:0|DynVel:10,30,45,60,75,92,108,127|Pos:10|Justify:Center|Placement:AtNextNote
|Dynamic|Style:f|Pos:-9|Justify:Right|Placement:AtNextNote|Visibility:Never
|Note|Dur:4th|Pos:0|Visibility:Never
|Bar|Visibility:Never
|Instrument|Name:"[x]"|Patch:115|Trans:-2|DynVel:10,30,45,60,75,45,108,127|Pos:10|Justify:Center|Placement:AtNextNote
|Dynamic|Style:f|Pos:-9|Justify:Right|Placement:AtNextNote|Visibility:Never
|Note|Dur:4th|Pos:0x|Visibility:Never
|Bar|Visibility:Never
|Instrument|Name:"[^]"|Patch:119|Trans:-2|DynVel:10,30,45,60,75,45,108,127|Pos:10|Justify:Center|Placement:AtNextNote
|Dynamic|Style:f|Pos:-9|Justify:Right|Placement:AtNextNote|Visibility:Never
|Note|Dur:4th|Pos:0X|Visibility:Never
|Bar|Visibility:Never
|Bar|Style:SectionClose
!NoteWorthyComposerClip-End
But strangely, NoteWorthy ignores the tie (except for the last time when it creates a hanging tie). I'll stop short of calling this a bug since by design, grace notes are not fully implemented.
This might be a better option:
Code:   [Select · Download]
!NoteWorthyComposerClip(2.0,Single)
|Clef|Type:Bass|OctaveShift:Octave Down
|Key|Signature:Bb,Eb,Ab
|Tempo|Tempo:170|Pos:11
|TimeSig|Signature:AllaBreve
|Bar|Style:LocalRepeatOpen
|Instrument|Name:"Slap Bass 1"|Patch:36|Trans:0|DynVel:10,30,45,60,75,92,108,127|Pos:16|Placement:AtNextNote
|Dynamic|Style:f|Pos:-9|Justify:Right|Placement:AtNextNote|Visibility:Never
|Note|Dur:4th|Pos:3
|Note|Dur:8th|Pos:6|Opts:Stem=Down,Beam=First
|Note|Dur:8th|Pos:6x|Opts:Stem=Down,Beam=End
|Note|Dur:4th|Pos:6x
|Note|Dur:8th|Pos:2x|Opts:Stem=Up,Beam=First
|Note|Dur:8th|Pos:-4^|Opts:Stem=Up,Beam=End
|Bar
|Note|Dur:8th|Pos:-4
|Note|Dur:4th|Pos:n-2
|Note|Dur:8th|Pos:0^
|Note|Dur:8th|Pos:0|Opts:Stem=Down,Beam=First
|Note|Dur:8th|Pos:2x|Opts:Stem=Down,Beam
|Note|Dur:8th|Pos:0|Opts:Stem=Down,Beam
|Note|Dur:8th|Pos:2|Opts:Stem=Down,Beam=End
|Bar
|Note|Dur:4th|Pos:3
|Note|Dur:4th|Pos:n5
|Rest|Dur:8th
|Note|Dur:8th|Pos:6x
|Note|Dur:8th|Pos:2x|Opts:Stem=Up,Beam=First
|Note|Dur:8th|Pos:-4^|Opts:Stem=Up,Beam=End
|Bar
|Note|Dur:8th|Pos:-4
|Note|Dur:4th|Pos:-1
|Note|Dur:8th|Pos:1^
|Note|Dur:8th|Pos:1|Opts:Stem=Down,Beam=First
|Note|Dur:8th|Pos:2|Opts:Stem=Down,Beam
|Note|Dur:8th|Pos:1|Opts:Stem=Down,Beam
|Note|Dur:8th|Pos:2x|Opts:Stem=Down,Beam=End
|Bar|Style:LocalRepeatClose|Repeat:4
|Ending|Endings:7|Visibility:Never
|Instrument|Name:"[o]"|Patch:36|Trans:0|DynVel:10,30,45,60,75,92,108,127|Pos:10|Justify:Center|Placement:AtNextNote
|Dynamic|Style:f|Pos:-9|Justify:Right|Placement:AtNextNote|Visibility:Never
|Note|Dur:4th|Pos:0|Visibility:Never
|Bar|Visibility:Never
|Instrument|Name:"[x]"|Patch:115|Trans:-2|DynVel:10,30,45,60,75,45,108,127|Pos:10|Justify:Center|Placement:AtNextNote
|Dynamic|Style:f|Pos:-9|Justify:Right|Placement:AtNextNote|Visibility:Never
|Note|Dur:4th|Pos:0x|Visibility:Never
|Bar|Visibility:Never
|Instrument|Name:"[^]"|Patch:119|Trans:-2|DynVel:10,30,45,60,75,45,108,127|Pos:10|Justify:Center|Placement:AtNextNote
|Dynamic|Style:f|Pos:-9|Justify:Right|Placement:AtNextNote|Visibility:Never
|Note|Dur:4th|Pos:0X|Visibility:Never
|Bar|Visibility:Never
|Bar|Style:SectionClose
!NoteWorthyComposerClip-End
« Last Edit: 2007-11-15 02:54 PM by Rick G. » Logged

Registered user since 1996
jafalk
Dormant NWC2 User
« Reply #9 on: 2007-11-15 02:42 PM »

Here is a workaround
I just mark a instrument shift to slapbas (and forte) in the begining of the loop

* sample4.nwc (0.54 KB - downloaded 698 times.)
Logged
Rick G.
Virtuoso
« Reply #10 on: 2007-11-15 03:00 PM »

Here is a workaround
Looks strangely like my 2nd example ;) That's what happens when you post something and then delete it.

A tip: be sure to uncheck Preserve Width: on Instrument Patches. Bad default, IMHO.
Logged

Registered user since 1996
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by SMF 1.1.19 | SMF © 2013, Simple Machines
Page created in 0.076 seconds with 19 queries.

Copyright © 2014 Noteworthy Software, Inc.