Skip to main content
Topic: BeamRestChords.fso (version 0.2) (Read 5984 times) previous topic - next topic

BeamRestChords.fso (version 0.2)

This plugin beams the notes on two (or three) RestChords.

To make it work just insert an instance of this plugin before the first of the RestChords you want to beam. Notice that RestChords might be notated with quarter notes, otherwise 'real' beams will overlap the fake ones from this object.

Duration for first and last notes can be set, but it will not affect playback since 'real' duration is set by the rest of the RestChord.
Any stem length must be adjusted manually.

The following clip shows some samples. Please, test and report bugs  :))

Code: (nwc) [Select · Download]
!NoteWorthyComposerClip(2.75,Single)
|User|BeamRestChords.fso|Pos:-2
|RestChord|Dur:32nd|Opts:Stem=Down,StemLength=8,ArticulationsOnStem|Dur2:4th|Pos2:-6
|RestChord|Dur:32nd|Opts:Stem=Down,StemLength=6,ArticulationsOnStem|Dur2:4th|Pos2:-2
|Bar|Style:Double
|User|BeamRestChords.fso|Pos:-2|DurNote2:Sixteenth
|RestChord|Dur:32nd|Opts:Stem=Up,ArticulationsOnStem,HideRest|Dur2:4th|Pos2:1
|RestChord|Dur:32nd|Opts:Stem=Up,ArticulationsOnStem,HideRest|Dur2:4th|Pos2:-2
|Bar|Style:Double
|User|BeamRestChords.fso|Pos:-2|DurNote1:Sixteenth|DurNote2:Sixteenth|num:3
|RestChord|Dur:32nd|Opts:Stem=Down,StemLength=11,ArticulationsOnStem|Dur2:4th|Pos2:-6
|RestChord|Dur:32nd|Opts:Stem=Down,StemLength=10,ArticulationsOnStem|Dur2:4th|Pos2:-4
|RestChord|Dur:32nd|Opts:Stem=Down,StemLength=10,ArticulationsOnStem|Dur2:4th|Pos2:-2
|Bar|Style:Double
|User|BeamRestChords.fso|Pos:-2|num:3
|RestChord|Dur:32nd|Opts:Stem=Down,ArticulationsOnStem,HideRest|Dur2:4th|Pos2:-6
|User|BeamRestChords.fso|Pos:-2|DurNote2:"Sixteenth (Beam)"
|RestChord|Dur:32nd|Opts:Stem=Down,ArticulationsOnStem,HideRest|Dur2:4th|Pos2:-4
|RestChord|Dur:32nd|Opts:Stem=Down,ArticulationsOnStem,HideRest|Dur2:4th|Pos2:-2
!NoteWorthyComposerClip-End
[...] y el mayor bien es pequeño: que toda la vida es sueño, y los sueños, sueños son.

Re: BeamRestChords.fso (version 0.1)

Reply #1
You might find this useful for testing:
Code: (nwc) [Select · Download]
!NoteWorthyComposer(2.75)
|PgSetup|StaffSize:18|Zoom:6
|AddStaff|Name:"Staff"
|StaffProperties|EndingBar:Open (hidden)|WithNextStaff:Layer
|User|BeamRestChords.fso|Pos:-2|DurNote2:Sixteenth|Color:1
|RestChord|Dur:32nd|Opts:Stem=Up,StemLength=7,HideRest|Dur2:4th|Pos2:1
|Rest|Dur:16th,Dotted|Visibility:Never
|RestChord|Dur:32nd|Opts:Stem=Up,StemLength=6,HideRest|Dur2:4th|Pos2:-2
|Rest|Dur:32nd|Visibility:Never
|User|BeamRestChords.fso|Pos:-2|DurNote2:Sixteenth|Color:1
|RestChord|Dur:32nd|Opts:Stem=Down,StemLength=6,HideRest|Dur2:4th|Pos2:1
|Rest|Dur:16th,Dotted|Visibility:Never
|RestChord|Dur:32nd|Opts:Stem=Down,StemLength=7,HideRest|Dur2:4th|Pos2:-2
|Rest|Dur:32nd|Visibility:Never
|Bar|Style:Double
|Note|Dur:8th|Pos:1|Opts:Stem=Down,StemLength=7,Beam=First
|Note|Dur:16th|Pos:-2|Opts:Stem=Down,StemLength=6,Beam=End
|Note|Dur:8th|Pos:1|Opts:Stem=Up,StemLength=6,Beam=First
|Note|Dur:16th|Pos:-2|Opts:Stem=Up,StemLength=7,Beam=End
|Bar|Style:Double
|AddStaff|Name:"Staff-2"
|StaffProperties|EndingBar:Open (hidden)
|Note|Dur:8th|Pos:1|Opts:Stem=Down,StemLength=7,Beam=First
|Note|Dur:16th|Pos:-2|Opts:Stem=Down,StemLength=6,Beam=End
|Note|Dur:8th|Pos:1|Opts:Stem=Up,StemLength=6,Beam=First
|Note|Dur:16th|Pos:-2|Opts:Stem=Up,StemLength=7,Beam=End
|Bar|Style:Double
|User|BeamRestChords.fso|Pos:-2|DurNote2:Sixteenth|Color:1
|RestChord|Dur:32nd|Opts:Stem=Up,StemLength=7,HideRest|Dur2:4th|Pos2:1
|Rest|Dur:16th,Dotted|Visibility:Never
|RestChord|Dur:32nd|Opts:Stem=Up,StemLength=6,HideRest|Dur2:4th|Pos2:-2
|Rest|Dur:32nd|Visibility:Never
|User|BeamRestChords.fso|Pos:-2|DurNote2:Sixteenth|Color:1
|RestChord|Dur:32nd|Opts:Stem=Down,StemLength=6,HideRest|Dur2:4th|Pos2:1
|Rest|Dur:16th,Dotted|Visibility:Never
|RestChord|Dur:32nd|Opts:Stem=Down,StemLength=7,HideRest|Dur2:4th|Pos2:-2
|Rest|Dur:32nd|Visibility:Never
|Bar|Style:Double
!NoteWorthyComposer-End
If I add:
Code: (Lua) [Select · Download]
	nwcdraw.setPen('solid', 0)
early in your code, I get a bit more accuracy.

I have done some work on beams. Instead of using trigonometery, I just used slope/intercept, i.e,:
Quote
y = mx +b
I find it easier and it may avoid some rounding errors :)
Registered user since 1996

Re: BeamRestChords.fso (version 0.2)

Reply #2
Thanks Rick G.  :D
I added pen information as you said.

Quote
Instead of using trigonometery, I just used slope/intercept
Yeah, maybe trigonometry wasn't the best nor the easier way to do it, you're right, but anyway, now it's done... and I loved the challenge! :D
[...] y el mayor bien es pequeño: que toda la vida es sueño, y los sueños, sueños son.