Skip to main content
Topic: Problem getting a page off the ground. (Read 3844 times) previous topic - next topic

Problem getting a page off the ground.

I have been working on 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
Since 1998

Re: Problem getting a page off the ground.

Reply #1
What is "a final bar line?"
Registered user since 1996

Re: Problem getting a page off the ground.

Reply #2
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'.
Always look on the bright side of life!

Re: Problem getting a page off the ground.

Reply #3
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.
Since 1998

Re: Problem getting a page off the ground.

Reply #4
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.

Re: Problem getting a page off the ground.

Reply #5
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.
Since 1998

Re: Problem getting a page off the ground.

Reply #6
New version, link same as first message.

Converted to a User Tool.
Since 1998