Skip to main content
Topic: Global Modification "Dynamic" (Read 4980 times) previous topic - next topic

Global Modification "Dynamic"

Can any one tell me how to write the script command of Global Modification to change any Dynamic Style into "Piano" for instance.

Re: Global Modification "Dynamic"

Reply #1
G'day Phan Anh,
the command is not hard, but I thought I'd give you a little bit extra...  At the bottom is a clip with several dynamics and notes.

If you read through it you'll see:

  • a treble clef defined
  • a time signature defined
  • the first dynamic
  • the first note
  • the next dynamic
  • the next note
  • & etc..
The layout of each line of the clip is consistent:

  • You start with a pipe character "|"
  • next you have the element type
  • then you have another "|" as a delimiter
  • then you have an element specific option
  • then you have another "|"
  • and more element specific options
  • & etc.
In the case of a Dynamic element the basic options are the Style E.G. fff or mp etc. then you have its position.  It is also possible to have other information such as velocity and volume overrides and visibility.

The Global_Mod command to identify an element as a dynamic and change it to p is as follows (assuming you are using the default "Global Modification (adp)" tool:

Dynamic Style=p

If you only wanted to modify ff dynamics to p then the command would be:

Dynamic,Style==ff Style=p

NB there is a space after the word "Dynamic" in the first example and after the "ff" in the second.  These spaces are essential.  In addition, the commands are case sensitive hence the the mixed case.

Also note the equals sign usage.  Comparison is double, assignment is single.

More information on how to formulate command strings is available in the help within the tool, just run the tool with a help command.

Code: [Select · Download]
!NoteWorthyComposerClip(2.0,Single)
|Clef|Type:Treble
|TimeSig|Signature:4/4
|Dynamic|Style:fff|Pos:-8
|Note|Dur:4th|Pos:1
|Dynamic|Style:ff|Pos:-8
|Note|Dur:4th|Pos:1
|Dynamic|Style:f|Pos:-8
|Note|Dur:4th|Pos:1
|Dynamic|Style:mf|Pos:-8
|Note|Dur:4th|Pos:1
|Bar
|Dynamic|Style:mp|Pos:-8
|Note|Dur:4th|Pos:1
|Dynamic|Style:p|Pos:-8
|Note|Dur:4th|Pos:1
|Dynamic|Style:pp|Pos:-8
|Note|Dur:4th|Pos:1
|Dynamic|Style:ppp|Pos:-8
|Note|Dur:4th|Pos:1
!NoteWorthyComposerClip-End
Lawrie
I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.

Re: Global Modification "Dynamic"

Reply #2
Thank Lawrie for your prompt and full guidance !
You are the best !
My mistake in typing the script was ... "Dynamic Style=Piano" instead of "Dynamic Style=p" as you did.

 

Re: Global Modification "Dynamic"

Reply #3
My pleasure, happy to help.

Lawrie
I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.