Skip to main content

Topic: PedalLine.fso (version 1.0) (Read 1459 times) previous topic - next topic

  • Lloyd
  • NWC2 User
PedalLine.fso (version 1.0)
Hi,
here I go with my first attempt to create Object Plugins.

When inserted after a pedal mark (usually 'Pedal Down') it will draw a line to the next pedal mark (usually 'Pedal Release'). It must be specified what kind of line the plugin will draw ('Opening Line' for pedal starting section, 'Closing Line' for pedal ending or 'Previous Measure Line' if it has to continue the line from prior measure).

The plugin will also detect boundary objects in the active staff as "end points", so you can use them (with 'Force New System' option) to "cut" the line at System Breaks. Then insert another instance with 'Previous Measure Line' options.

OPTIONS:
Pen: Sets the pen style for the line.
Weight: Sets the thickness of the pen style.
Start Offset: Changes the start point.

Opening Line: Sets the line as 'Starting Section' (pedal on).
Closing Line: Sets the line as 'Closing Section' (pedal release).
Previous Measure Line: Usually used when the line have to continue from prior measure, for example in 'New System' boundary changes.

NEW in v1.0
StaffSig Mode:
When Class is set to 'StaffSig' this plugins runs in 'Auto Mode', drawing a line from a 'Pedal Down' mark to the next 'Pedal Released' mark. The settings 'Pen' and 'Weight' can still be modified.

The following sample will show a little more. As it's my first time always, I'm pretty sure that it's full of bugs ;) so... it's testing time!

Code: [Select · Download]
!NoteWorthyComposer(2.751)
|AddStaff|Name:"Staff"|Group:"Standard"
|User|PedalLine.fso|Pos:-13|Class:StaffSig
|Clef|Type:Treble
|TimeSig|Signature:4/4
|SustainPedal|Pos:-17.5|Placement:AtNextNote|Visibility:Never
|Note|Dur:4th|Pos:-6
|Note|Dur:4th|Pos:-5
|Note|Dur:4th|Pos:-4
|Note|Dur:4th|Pos:-3
|Bar
|SustainPedal|Status:Released|Pos:-13.5|Justify:Right|Placement:AtNextNote|Visibility:Never
|SustainPedal|Pos:-17.5|Placement:AtNextNote|Visibility:Never
|Note|Dur:4th|Pos:-2
|Note|Dur:4th|Pos:-1
|Note|Dur:4th|Pos:0
|Note|Dur:4th|Pos:1
|Bar
|SustainPedal|Status:Released|Pos:-13.5|Justify:Right|Placement:AtNextNote|Visibility:Never
|SustainPedal|Pos:-17.5|Placement:AtNextNote|Visibility:Never
|Note|Dur:4th|Pos:1
|Note|Dur:4th|Pos:0
|Note|Dur:4th|Pos:-1
|Note|Dur:4th|Pos:-2
|Bar
|Note|Dur:4th|Pos:-3
|Note|Dur:4th|Pos:-4
|Note|Dur:4th|Pos:-5
|Note|Dur:4th|Pos:-6
|Bar|Style:Double
|Boundary|Style:NewSystem|NewPage:N
|Note|Dur:4th|Pos:-6
|Note|Dur:4th|Pos:-5
|Note|Dur:4th|Pos:-4
|Note|Dur:4th|Pos:-3
|SustainPedal|Status:Released|Pos:-13.5|Justify:Right|Placement:AtNextNote|Visibility:Never
|Bar
|Note|Dur:4th|Pos:-2
|Note|Dur:4th|Pos:-1
|Note|Dur:4th|Pos:0
|Note|Dur:4th|Pos:1
|Bar
|Note|Dur:4th|Pos:1
|SustainPedal|Pos:-17.5|Placement:AtNextNote|Visibility:Never
|Note|Dur:4th|Pos:0
|SustainPedal|Status:Released|Pos:-13.5|Justify:Right|Placement:AtNextNote|Visibility:Never
|SustainPedal|Pos:-17.5|Placement:AtNextNote|Visibility:Never
|Note|Dur:4th|Pos:-1
|Note|Dur:4th|Pos:-2
|Bar
|SustainPedal|Status:Released|Pos:-13.5|Justify:Right|Placement:AtNextNote|Visibility:Never
|SustainPedal|Pos:-17.5|Placement:AtNextNote|Visibility:Never
|Note|Dur:4th|Pos:-3
|Note|Dur:4th|Pos:-4
|SustainPedal|Status:Released|Pos:-13.5|Justify:Right|Placement:AtNextNote|Visibility:Never
|Note|Dur:4th|Pos:-5
|Note|Dur:4th|Pos:-6
|Bar|Style:SectionClose
|Boundary|Style:NewSystem|NewPage:N
|AddStaff|Name:"Staff-1"|Group:"Standard"
|Clef|Type:Treble
|TimeSig|Signature:4/4
|SustainPedal|Pos:-17.5|Placement:AtNextNote|Visibility:Never
|User|PedalLine.fso|Pos:-11|Open:Y
|Note|Dur:4th|Pos:-6
|Note|Dur:4th|Pos:-5
|Note|Dur:4th|Pos:-4
|Note|Dur:4th|Pos:-3
|Bar
|SustainPedal|Status:Released|Pos:-13.5|Justify:Right|Placement:AtNextNote|Visibility:Never
|SustainPedal|Pos:-17.5|Placement:AtNextNote|Visibility:Never
|User|PedalLine.fso|Pos:-11
|Note|Dur:4th|Pos:-2
|Note|Dur:4th|Pos:-1
|Note|Dur:4th|Pos:0
|Note|Dur:4th|Pos:1
|Bar
|SustainPedal|Status:Released|Pos:-13.5|Justify:Right|Placement:AtNextNote|Visibility:Never
|SustainPedal|Pos:-17.5|Placement:AtNextNote|Visibility:Never
|User|PedalLine.fso|Pos:-11
|Note|Dur:4th|Pos:1
|Note|Dur:4th|Pos:0
|Note|Dur:4th|Pos:-1
|Note|Dur:4th|Pos:-2
|Bar
|SustainPedal|Pos:-17.5|Placement:AtNextNote|Visibility:Never
|User|PedalLine.fso|Pos:-11|Previous:Y
|Note|Dur:4th|Pos:-3
|Note|Dur:4th|Pos:-4
|Note|Dur:4th|Pos:-5
|Note|Dur:4th|Pos:-6
|Bar|Style:Double
|Boundary|Style:NewSystem|NewPage:N
|User|PedalLine.fso|Pos:-11|Close:Y|Previous:Y
|Note|Dur:4th|Pos:-6
|Note|Dur:4th|Pos:-5
|Note|Dur:4th|Pos:-4
|Note|Dur:4th|Pos:-3
|SustainPedal|Status:Released|Pos:-13.5|Justify:Right|Placement:AtNextNote|Visibility:Never
|Bar
|Note|Dur:4th|Pos:-2
|Note|Dur:4th|Pos:-1
|Note|Dur:4th|Pos:0
|Note|Dur:4th|Pos:1
|Bar
|Note|Dur:4th|Pos:1
|SustainPedal|Pos:-17.5|Placement:AtNextNote|Visibility:Never
|User|PedalLine.fso|Pos:-11|Open:Y
|Note|Dur:4th|Pos:0
|SustainPedal|Status:Released|Pos:-13.5|Justify:Right|Placement:AtNextNote|Visibility:Never
|SustainPedal|Pos:-17.5|Placement:AtNextNote|Visibility:Never
|User|PedalLine.fso|Pos:-11
|Note|Dur:4th|Pos:-1
|Note|Dur:4th|Pos:-2
|Bar
|SustainPedal|Status:Released|Pos:-13.5|Justify:Right|Placement:AtNextNote|Visibility:Never
|SustainPedal|Pos:-17.5|Placement:AtNextNote|Visibility:Never
|User|PedalLine.fso|Pos:-11|Close:Y
|Note|Dur:4th|Pos:-3
|Note|Dur:4th|Pos:-4
|SustainPedal|Status:Released|Pos:-13.5|Justify:Right|Placement:AtNextNote|Visibility:Never
|Note|Dur:4th|Pos:-5
|Note|Dur:4th|Pos:-6
|Bar|Style:SectionClose
|Boundary|Style:NewSystem|NewPage:N
!NoteWorthyComposer-End
  • Last Edit: 2017-02-06 02:23 pm by Lloyd
[...] y el mayor bien es pequeño: que toda la vida es sueño, y los sueños, sueños son.

  • Lloyd
  • NWC2 User
Re: PedalLine.fso (version 0.2)
Reply #1
Updated with minor code changes (thanks  :D) and renamed to PedalLine.fso (without "_test").
If you've used the plugin on a score, please, remember to run the User Tool "Change Object Type".
[...] y el mayor bien es pequeño: que toda la vida es sueño, y los sueños, sueños son.

Re: PedalLine.fso (version 0.2)
Reply #2
User's of the prior version will probably want to remove the old object type:

  • open Tools, Manage Objects (Ctrl+J)
  • right click PedalLine_test.fso
  • use Delete source
  • Close the Manage Objects box
  • Last Edit: 2015-09-26 01:11 pm by NoteWorthy Online

Re: PedalLine.fso (version 0.2)
Reply #3
I started using this to notate pedal marks into a score I was working on last week but gave up after a few minutes on the grounds that it would take too long to mark up the complete 11-minute score this way (I was under deadline). I think it has promise, but if you pick it up again I suggest you reconceive it along the lines of Mike's "Ottavamatic" (or your own new "DrumStaff"): put one instance at the beginning of the staff and have it automatically place the pedal line appropriately as pedal-up and pedal-down symbols are encountered. The object will have to know when to place a half-pedal mark (the upside-down V) and when to place full pedal (end one pedal line, and start another as appropriate), but the conditionals shouldn't be too hard to arrange. Something like this (in no known computer language - my programming days are long behind me - but close to BASIC):

IF (<NextObject> = <PedalDown> OR (<NextObject> = <BarLine> AND <NextObject>+1 = <PedalDown>))
   THEN <DrawHalfPedal>
   ELSE <DrawPedalEnd>


The <PedalDown> test would be even simpler: if encountered, begin a pedal line and continue it to the next <PedalUp>. Vertical position would be determined by the <PedalDown>.

Here's hoping....

Bill

  • Lloyd
  • NWC2 User
Re: PedalLine.fso (version 0.2)
Reply #4
Thanks for suggesting Bill,
I think you're right in everything you've said so as soon as possible I'll start to review the code and I'll try to improve it to make it easier  ;)

Dani.
[...] y el mayor bien es pequeño: que toda la vida es sueño, y los sueños, sueños son.

Re: PedalLine.fso (version 0.2)
Reply #5
Lloyd, as far as I can tell you never got back to this. Any chance you can revisit it, or turn it over to someone else? I'm doing a piano piece with a complex pedal line, and this would be really useful right now.

  • Lloyd
  • NWC2 User
Re: PedalLine.fso (version 0.2)
Reply #6
Oh my god!!! I completely forgot it!!!
Excuse me William, I didn't script anything for a lot of time, so I forgot about your request... There's some changes in the API since the last time I worked on this plugin, so during the next weeks I'll try to review all the code and I'll try to improve this object... Maybe I'm demanding too much but, please, be patient for a little more time... Now that I remember your request I'll work on it. :-[
[...] y el mayor bien es pequeño: que toda la vida es sueño, y los sueños, sueños son.

  • Lloyd
  • NWC2 User
Re: PedalLine.fso (version 1.0)
Reply #7
Updated to v1.0
Now it can be run on StaffSig Class mode and it will auto draw a Pedal Line from an Down Pedal mark to the next Released Pedal.

William  ;D !!
It seems I didn't forget (everything) about your request... When I started to review the plugin I found a script written about a year ago with lots of modifications to achieve your request. I guess I "left it on stand by" for personal reasons (mainly work...) and then forgot to finish it... Try it please, because I'm sure there's still something that won't work as we want.
[...] y el mayor bien es pequeño: que toda la vida es sueño, y los sueños, sueños son.

Re: PedalLine.fso (version 1.0)
Reply #8
Finally got a chance to review this. Running it as StaffSig seems to work fine now - thanks.

I do have a couple of suggestions. First, the opening bend of the bracket (when it begins as a pedal-down without a retake, that is, without an immediately previous pedal-up) should be square rather than angled, to match convention. Second, I think it would improve the plug-in if the bracket took its vertical position from the down-pedal: this would allow individual pedal lines to be at different heights, which is important if the bass line goes very far below the staff. And third, it would be nice if there was an option to replace the opening (non-retake) bend of the bracket with the user's choice of the pedal-down symbol or the word "Ped."

Topics for the future. I can start using it now. BTW, the check boxes for opening line, closing line, etc., no longer seem to do anything.

Bill

  • Lloyd
  • NWC2 User
Re: PedalLine.fso (version 1.0)
Reply #9
Hi Bill, I'm glad the Object will work fine for you  :D

As I said, this review was done about a year ago, and as far I can remember the last tests I was doing in this time was about your second suggestion, the chance of changing the vertical position. As sson as I have a little time I'll retake this project to improve (as I promised) all the script.

The checkboxes you mention are for using it in Standard Class mode (in this way it will work as always  :)) )
[...] y el mayor bien es pequeño: que toda la vida es sueño, y los sueños, sueños son.

Re: PedalLine.fso (version 1.0)
Reply #10
Thanks for the quick reply. I suspected the checkboxes still worked in Standard Class mode but didn't check. You might consider adding that information to the dialog box.