Re: Player Duration to hh:mm:ss
From: "Eric Chatonet" Hi Jerry, Tutorials Picker has been tested and optimised for Mac OS 9, Mac OS X, Win 2000 and XP but not for Linux. I would be glad if you could give me some details in order to make it functional on Linux. Thanks Note to the List -- Eric just sent me an updated version of Tutorials Picker that plays as-designed on Linux. It looks great! A simply marvelous tool! Jerry Muelver ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Player Duration to hh:mm:ss
From: "Eric Chatonet" Hi Jerry, Tutorials Picker has been tested and optimised for Mac OS 9, Mac OS X, Win 2000 and XP but not for Linux. I would be glad if you could give me some details in order to make it functional on Linux. Thanks Thanks, Eric. Here's a snap of what I see: http://hytext.com/picker.jpg (152k) The tooltip lights up nicely, though. Menu selection bar is dark blue and almost not readable. However, the detail descriptions on the side panel are wonderful! Would you like a snap of that? Jerry Muelver ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Player Duration to hh:mm:ss
Hi Jerry, Tutorials Picker has been tested and optimised for Mac OS 9, Mac OS X, Win 2000 and XP but not for Linux. I would be glad if you could give me some details in order to make it functional on Linux. Thanks Best Regards from Paris, Eric Chatonet -- http://www.sosmartsoftware.com/[EMAIL PROTECTED]/ Le 20 déc. 05 à 12:38, Jerry Muelver a écrit : However, I should mention that on Linux (Ubuntu Gnome) the menu picklist is black on dark charcoal, so I have to pause-mouse over a menu item to pick up the tooltip expansion to read the item Being new to both Linux and RR, I suspect I'm missing a configuration parameter somewhere off in command-line wilderness. ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Player Duration to hh:mm:ss
From: "Jerry Muelver" Garret, put the Tutorial Picker .rev file in RR's "plugins" directory, then run it from RR's IDE menu "Development > Plugins > Tutorial Picker". However, I should mention that on Linux (Ubuntu Gnome) the menu picklist is black on dark charcoal, so I have to pause-mouse over a menu item to pick up the tooltip expansion to read the item Being new to both Linux and RR, I suspect I'm missing a configuration parameter somewhere off in command-line wilderness. Jerry Muelver ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Player Duration to hh:mm:ss
Although Bill Marriott's function works fine, it struck me as being somewhat inelegant, not to mention longer than necessary. Here's my version of the function in question; for you newbies, my code makes use of the numberFormat property, and the div (integer division) and mod (the remainder of an integer division) functions. function Sec2HMS TheTime # TheTime is measured in seconds # Automagically take care of leading zeroes as needed set the numberFormat to "00" # How many hours is that? put TheTime div 3600 into TheHours put TheTime mod 3600 into TheTime # How many minutes? put TheTime div 60 into TheMinutes # How many seconds? put TheTime mod 60 into TheSeconds # We got yer result right here... return TheHours & ":" & TheMinutes & ":" & TheSeconds end Sec2HMS ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Player Duration to hh:mm:ss
Hi Garrett, It's ok -- the example was a "subtle" indication. It really comes down to whether you salt something while cooking or leave it to guests to salt to taste, doesn't it? > Ah. Ok, and now you've peaked my curiosity here. How would > I handle fractional seconds, or convert fractional seconds into > milliseconds? Fractions are just passed through directly. Try this: ConvertSeconds(the round of XXX) ConvertSeconds(trunc(XXX)) makes sure seconds is always a whole number. One rounds off, the other drops the fractional part. ConvertSeconds(round(XXX,1)) Rounds to tenths of a second (but doesn't provide fixed digits in the result; even seconds will not show the decimal point or fractional part). A millisecond is one thousandth of a second, i.e. three digits after the period. In this case, you would indeed modify the function, to ensure a fixed number of digits after the decimal. You'd pad out with zeros and then take the first N digits you wanted. You could even add a parameter to the function to dynamically specify how many digits are required. > This is something I was going to ask soon anyway. Because I will want to > update some information every .5 seconds. And I hadn't had the chance to > see if Rev was capable of this or not. The more updates you do, the slower your program may potentially run. > Here's the scenario If a song title is too wide for the label's > width, I want to scroll the the title one letter at a time every .5 > seconds so that eventually the entire title of the song has passed before > the users view. Scott Rossi recently (within last week or two) posted a link to a music player he built which does something like this... you might want to check it out. :) Bill ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Player Duration to hh:mm:ss
On Dec 19, 2005, at 3:14 PM, Bill Marriott wrote: Actually, if you note my examples, the omission of the third trunc was intentional to allow for fractional seconds. You can always pass a trunc'ed or rounded value if you like. :) Bill Ah. Ok, and now you've peaked my curiosity here. How would I handle fractional seconds, or convert fractional seconds into milliseconds? This is something I was going to ask soon anyway. Because I will want to update some information every .5 seconds. And I hadn't had the chance to see if Rev was capable of this or not. Here's the scenario If a song title is too wide for the label's width, I want to scroll the the title one letter at a time every .5 seconds so that eventually the entire title of the song has passed before the users view. And my bad on the assumption. Since you didn't mention it, I thought it was just an oversight. Thanks again, -Garrett ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Player Duration to hh:mm:ss
From: "Garrett Hylltun" And how do I actually use this Tutorial Picker? I'm at a screen on it where it says "Loading succesful", but there are no active buttons to continue on to the tutorials, only a "Make a Donation!" button is active. Do I need to make a donation in order to use this program? Thanks a bunch, -Garrett Garret, put the Tutorial Picker .rev file in RR's "plugins" directory, then run it from RR's IDE menu "Development > Plugins > Tutorial Picker". Jerry Muelver ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Player Duration to hh:mm:ss
Actually, if you note my examples, the omission of the third trunc was intentional to allow for fractional seconds. You can always pass a trunc'ed or rounded value if you like. :) Bill Garrett Hylltun wrote: > Your player time convert works great except it was missing one thing, so > here's a fixed version in case anyone else was going to use the same bit > of code (there's a note between ---> and <--- that describes the changed > code): > put the trunc of (mySecondsTime - 3600 * myHours - 60 * myMinutes) > into mySeconds > -- ---> the above needed a "trunc" issued like further above <--- I wrote earlier: > Example: > > ConvertSeconds(60) returns "00:01:00" > ConvertSeconds(121.5) returns "00:02:01.5" ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Player Duration to hh:mm:ss
Hi again Bill and list, Your player time convert works great except it was missing one thing, so here's a fixed version in case anyone else was going to use the same bit of code (there's a note between ---> and <--- that describes the changed code): function ConvertSeconds mySecondsTime if isNumber(mySecondsTime) then -- 3600 seconds in an hour put the trunc of (mySecondsTime / 3600) into myHours if myHours < 10 then put "0" before myHours -- leading zero -- 60 seconds in a minute put the trunc of ((mySecondsTime - (3600 * myHours)) / 60) into myMinutes if myMinutes < 10 then put "0" before MyMinutes -- leading zero -- the remainder is seconds put the trunc of (mySecondsTime - 3600 * myHours - 60 * myMinutes) into mySeconds -- ---> the above needed a "trunc" issued like further above <--- if mySeconds < 10 then put "0" before MySeconds -- leading zero return myHours & ":" & myMinutes & ":" & mySeconds else return "Error: ConvertSeconds() requires a number" end if end ConvertSeconds -Garrett On Dec 19, 2005, at 11:40 AM, Bill Marriott wrote: === function ConvertSeconds mySecondsTime if isNumber(mySecondsTime) then -- 3600 seconds in an hour put the trunc of (mySecondsTime / 3600) into myHours if myHours < 10 then put "0" before myHours -- leading zero -- 60 seconds in a minute put the trunc of ((mySecondsTime - (3600 * myHours)) / 60) into myMinutes if myMinutes < 10 then put "0" before MyMinutes -- leading zero -- the remainder is seconds put mySecondsTime - 3600 * myHours - 60 * myMinutes into mySeconds if mySeconds < 10 then put "0" before MySeconds -- leading zero return myHours & ":" & myMinutes & ":" & mySeconds else return "Error: ConvertSeconds() requires a number" end if end ConvertSeconds === ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Player Duration to hh:mm:ss
This is exactly what I wanted to do! Thanks :-) -Garrett On Dec 19, 2005, at 11:40 AM, Bill Marriott wrote: There is no built-in function, but the custom function below (place it in the stack script) should get you started: === function ConvertSeconds mySecondsTime if isNumber(mySecondsTime) then -- 3600 seconds in an hour put the trunc of (mySecondsTime / 3600) into myHours if myHours < 10 then put "0" before myHours -- leading zero -- 60 seconds in a minute put the trunc of ((mySecondsTime - (3600 * myHours)) / 60) into myMinutes if myMinutes < 10 then put "0" before MyMinutes -- leading zero -- the remainder is seconds put mySecondsTime - 3600 * myHours - 60 * myMinutes into mySeconds if mySeconds < 10 then put "0" before MySeconds -- leading zero return myHours & ":" & myMinutes & ":" & mySeconds else return "Error: ConvertSeconds() requires a number" end if end ConvertSeconds === From this you can use ConvertSeconds(number) from any handler in the stack to get the result you want. Example: ConvertSeconds(60) returns "00:01:00" ConvertSeconds(121.5) returns "00:02:01.5" - Bill [snip] ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Player Duration to hh:mm:ss
There is no built-in function, but the custom function below (place it in the stack script) should get you started: === function ConvertSeconds mySecondsTime if isNumber(mySecondsTime) then -- 3600 seconds in an hour put the trunc of (mySecondsTime / 3600) into myHours if myHours < 10 then put "0" before myHours -- leading zero -- 60 seconds in a minute put the trunc of ((mySecondsTime - (3600 * myHours)) / 60) into myMinutes if myMinutes < 10 then put "0" before MyMinutes -- leading zero -- the remainder is seconds put mySecondsTime - 3600 * myHours - 60 * myMinutes into mySeconds if mySeconds < 10 then put "0" before MySeconds -- leading zero return myHours & ":" & myMinutes & ":" & mySeconds else return "Error: ConvertSeconds() requires a number" end if end ConvertSeconds === >From this you can use ConvertSeconds(number) from any handler in the stack to get the result you want. Example: ConvertSeconds(60) returns "00:01:00" ConvertSeconds(121.5) returns "00:02:01.5" - Bill "Garrett Hylltun" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Greetings, > > Is there a command or function to convert the Player duration into > hh:mm:ss? > > I know that the following gives me the total seconds of the media file, > but I'm lost as to how to convert > > divide duration of Player "objPlayerMain" by the timeScale of player > "objPlayerMain" > > I browsed through the documentation and saw a few things like "convert", > but could not see how to use it in this situation. > > I'm still a newb with Rev, but some things are coming along fine, while > other still seem to confuse me a bit like the above. > > Thanks in advance, > -Garrett > ___ > use-revolution mailing list > use-revolution@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-revolution > ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Player Duration to hh:mm:ss
Seems it needs to be run from the Rev/DreamCard IDE. I initially ran it from the ScriptRunner program, which it stuck at the loading screen and the button needed stayed inactive. Ran it from the DreamCard Player and it said it couldn't find an internet connection. But running it from the IDE works without problems. :-) Thanks, -Garrett On Dec 19, 2005, at 10:59 AM, Eric Chatonet wrote: Hi Garret, NO! :-) It's not a trap! You should be able to see the list of the tutorials and pick the one you want. If you have problems (it's used by hundreds of developers), just write me off list. About your other mail about drag and drop, there is also another tutorial in the same collection that might get you started. [snip] ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Player Duration to hh:mm:ss
Great, thanks a bunch again. :-) -Garrett On Dec 19, 2005, at 10:59 AM, Eric Chatonet wrote: Hi Garret, NO! :-) It's not a trap! You should be able to see the list of the tutorials and pick the one you want. If you have problems (it's used by hundreds of developers), just write me off list. About your other mail about drag and drop, there is also another tutorial in the same collection that might get you started. Best Regards from Paris, Eric Chatonet -- http://www.sosmartsoftware.com/[EMAIL PROTECTED]/ Le 19 déc. 05 à 19:50, Garrett Hylltun a écrit : And how do I actually use this Tutorial Picker? I'm at a screen on it where it says "Loading succesful", but there are no active buttons to continue on to the tutorials, only a "Make a Donation!" button is active. Do I need to make a donation in order to use this program? ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Player Duration to hh:mm:ss
Hi Garret, NO! :-) It's not a trap! You should be able to see the list of the tutorials and pick the one you want. If you have problems (it's used by hundreds of developers), just write me off list. About your other mail about drag and drop, there is also another tutorial in the same collection that might get you started. Best Regards from Paris, Eric Chatonet -- http://www.sosmartsoftware.com/[EMAIL PROTECTED]/ Le 19 déc. 05 à 19:50, Garrett Hylltun a écrit : And how do I actually use this Tutorial Picker? I'm at a screen on it where it says "Loading succesful", but there are no active buttons to continue on to the tutorials, only a "Make a Donation!" button is active. Do I need to make a donation in order to use this program? ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Player Duration to hh:mm:ss
Thanks for all the info Eric. But now another question or two here I have to assume that QT has to be installed then, correct? And how do I actually use this Tutorial Picker? I'm at a screen on it where it says "Loading succesful", but there are no active buttons to continue on to the tutorials, only a "Make a Donation!" button is active. Do I need to make a donation in order to use this program? Thanks a bunch, -Garrett On Dec 19, 2005, at 9:50 AM, Eric Chatonet wrote: Hi Garret, The "How to Monitor a QuickTime Player by Script" tutorial might help you: This stack shows you how to monitor a QT player to play music (mp3 included) and provide [snip] ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Player Duration to hh:mm:ss
Hi Garret, The "How to Monitor a QuickTime Player by Script" tutorial might help you: This stack shows you how to monitor a QT player to play music (mp3 included) and provide all the usual commands, and more, to the user. How to know if the right version of QT is installed, manage durations, progress, quick searches, sound level, loops, play-lists, etc. The main commands are embedded in a scripted group, which you can export into any project. This scripted group is able to monitor, not only sound files, but also the video files as well. You will find the function you need in it :-) You will access this tutorial through "Tutorials Picker" a free plugin that interfaces with the So Smart Software website in order to display all available tutorials stacks directly from the web. You will find it by going to http://www.sosmartsoftware.com/. Revolution/Plugins or Tutorials section. Best Regards from Paris, Eric Chatonet -- http://www.sosmartsoftware.com/[EMAIL PROTECTED]/ Le 19 déc. 05 à 18:46, Garrett Hylltun a écrit : Is there a command or function to convert the Player duration into hh:mm:ss? I know that the following gives me the total seconds of the media file, but I'm lost as to how to convert divide duration of Player "objPlayerMain" by the timeScale of player "objPlayerMain" I browsed through the documentation and saw a few things like "convert", but could not see how to use it in this situation. I'm still a newb with Rev, but some things are coming along fine, while other still seem to confuse me a bit like the above. ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution