NoteWorthy Composer Forum

Forums => General Discussion => Topic started by: Warren Porter on 2016-09-09 03:22 am

Title: Problem getting a page off the ground.
Post by: Warren Porter on 2016-09-09 03:22 am
I have been working on TimeTxt.html (http://wjporter.com/files/TimeTxt.html) to insert the minutes and seconds that have been played so far right after each barline.  This only works with songs with no tempo variences but, if you put a final bar line before the end, the last time doesn't agree with NWC displays while playing it.  After finding a tempo indication, it alerts the duration of each 768th note, on which all other durations are based.

Cntl/U displays the source code on many browsers.

TIA
Title: Re: Problem getting a page off the ground.
Post by: Rick G. on 2016-09-09 09:00 pm
What is "a final bar line?"
Title: Re: Problem getting a page off the ground.
Post by: Opagust on 2016-09-09 09:48 pm
When you leave the second last bar and are to drunk to remember the way to the next bar, you'll need a 'final bar line'.
Title: Re: Problem getting a page off the ground.
Post by: Warren Porter on 2016-09-09 09:51 pm
Just an unneeded bar line at the end of the piece to show the total duration since otherwise info on the last measure (total dur) wouldn't be reported.  A later version will show the duration of a 768th note, total duration of the song in 768th notes, and total minutes / seconds in a textbox so an alert wouldn't be needed.  It also needs warnings for tempo variances and flow directions.

I am trying to use this to help me transcribe parts from an audio file "editor" (audacity? <sp>) which shows starting points and selected durations to a thousandth of a second.  Have picked off the fiddle part from "Hey Good Lookin'" and just started on steel guitar--link is on my website's splash page.
Title: Re: Problem getting a page off the ground.
Post by: hmmueller on 2016-09-10 08:21 am
Re your original question: Have you compared the times with times from a MIDI editor of the NWC exported MIDI? - maybe this helps you to find the problem/s.
Right now, I dont have time to read and understand your source (even though it's not too long, I admit) ... 15 years ago , I have written a Java program computing exact times from a MIDI file with tempo changes (used in my punching program for crank organ rolls) - would that source help you?

H.M.
Title: Re: Problem getting a page off the ground.
Post by: Warren Porter on 2016-09-10 04:39 pm
Thanks, but I believe I found the bug-- I was counting whole note rests twice.  The script determined the length of a whole rest from the time signature but after finding it I didn't continue* the loop.  Code that looked for anything with a duration processed it again.

I'll be adding some more stuff before putting it on the web again.

*continue - In JavaScript, "continue" means to do the next iteration of the loop.  It goes to the top adding 1 to the value of I.
Title: Re: Problem getting a page off the ground.
Post by: Warren Porter on 2016-09-10 10:54 pm
New version, link same as first message.

Converted to a User Tool (https://forum.noteworthycomposer.com/?topic=9420.msg67238#new).