NoteWorthy Composer Forum

Forums => Tips & Tricks => Topic started by: Warren Porter on 2017-10-09 03:26 am

Title: User function to play grace notes before the beat.
Post by: Warren Porter on 2017-10-09 03:26 am
There are no prompts or parms in this new function.  Remove ".txt" from its name when you download it.  Installation instructions are on the first few lines.

Replaced attachment
Title: Re: User function to play grace notes before the beat.
Post by: Mike Shawaluk on 2017-10-09 11:13 am
Line 28 of your script is:
Quote
var NoteLengths = [ "Whole", "Half", "4th", "8th", "16th", "32nd", "64th", "128th", "256th", "512th", "1028th" ]
Shouldn't the final string be "1024th" ?

(Actually I did not think that NWC could create notes or rests shorter than 64th, but perhaps you were just "future proofing" your script.)
Title: Re: User function to play grace notes before the beat.
Post by: Warren Porter on 2017-10-12 11:44 pm
Must have been thinking about the cube of 12 rather than 2^10.  I don't know the reason, but at the time it made sense that the 64th was not the last item in the array from the script I copied it from.
Title: Re: User function to play grace notes before the beat.
Post by: Warren Porter on 2017-10-18 11:59 pm
Just replaced the attachment in the initial post.  If the original grace notes were before the first beat, the converted grace notes will be moved to the other side of the bar line.
Title: Re: User function to play grace notes before the beat.
Post by: Warren Porter on 2017-10-20 12:33 pm
If anyone has a copy of this tool that works, please send it to me in a PM.  I tried to add a new feature to it (grace notes at the front of a new measure moved to the previous one / assign a duration to whole rest depending on the time signature) but have added a bear of a bug to tackle.  Can't get any saves or backups to work either.

TIA
Title: Re: User function to play grace notes before the beat.
Post by: Warren Porter on 2017-10-22 03:19 pm
Thank you flurmy for the backup copy.

Had a problem when the duration was the last thing on the nwctxt line like a vanilla half note.  Now I'm only looking at the first 3 chars of the duration.

Enjoy.  Attachment is back on the first post.