Julian date functions

2001-09-23 Thread Richard Gaskin

Thanks to Nelson Zink and David Jones for their code snippets for converting
Julian dates.

Below are two functions derived from Nelson Zink's code to go from standard
date format to Julian and back again.  I've modified the code into
functions, changed the variable names to minimize potential name space
conflicts, and added local declarations so they'll work with or without
explicitvars on:


--
-- Date2Julian
--
-- Accepts any valid date format and returns a
-- Julian date value.
-- Derived from original code by Nelson Zink.
--
function Date2Julian pDate
  local tYear, tMonth, tDay, aa, bb, cc, dd
  convert pDate to dateitems
  put item 1 of pDate  into tYear
  put item 2 of pDate  into tMonth
  put item 3 of pDate  into tDay
  if tMonth<=2 then
add 12 to tMonth
subtract 1 from tYear
  end if
  put trunc(tYear/100) into aa
  put (2-aa+trunc(aa/4)) into bb
  put trunc(365.25*tYear) into cc
  put trunc(30.6001*(tMonth+1)) into dd
  return (bb+cc+dd+tDay+1720995)
end Date2Julian



--
-- Julian2Date
--
-- Accepts a Julian number and returns a Gregorian
-- date in the format MM/DD/.
-- Derived from original code by Nelson Zink.
--
function Julian2Date pJulianDate
  local tYear, tDay, tMonth, aa, bb, cc, dd, ee, gg
  put trunc((pJulianDate-1867216.25)/36524.25) into aa
  put pJulianDate+1+aa-trunc(aa/4) into bb
  Put bb+1524 into cc
  put trunc((cc-122.1)/365.25) into dd
  put trunc(365.25*dd) into ee
  put trunc((cc-ee)/30.6001) into gg
  put cc-ee-trunc(30.6001*gg) into tDay
  if gg<13.5 then put gg-1 into tMonth else put gg-13 into tMonth
  if tMonth>2.5 then put dd-4716 into tYear else put dd-4715 into tYear
  return tMonth&"/"&tDay&"/"&tYear
end Julian2Date





-- 
 Richard Gaskin 
 Fourth World Media Corporation
 Multimedia Design and Development for Mac, Windows, UNIX, and the Web
 _
 [EMAIL PROTECTED] http://www.FourthWorld.com
 Tel: 323-225-3717AIM: FourthWorldIncFax: 323-225-0716



Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




record, buggy...

2001-09-23 Thread Rodney Tamblyn

I've found that the record feature in 2.4 is pretty buggy.  Has anyone else been 
experimenting with this, if so I would be interested in your experiences and 
comments...

My setup:  Mac OS 9.1, QuickTime 5.02 MC 2.4.  

Recipe: Make a simple stack with a record and play button and a player object.  Record 
from external microphone (set input and test levels in sound control panel).  "Record 
to file fi using dialog".  In the second button stop recording and set filepath of 
player 1 to the file. Play sound file using "start player 1"

What I found:  high pitched digital distortion squeeks and squeals in the sound file.  
Speed/pitch distortion (probably due to assumptions about sample rates). Metacard also 
crashed once with an address error when I was trying this

Rodney

-- 
--
Rodney Tamblyn
Educational Media group
Higher Education Development Centre, 75 Union Place
University of Otago, PO Box 56, Dunedin, New Zealand
ph +64 3 479 7580 Fax +64 3 479 8362
http://hedc.otago.ac.nz ~ http://rodney.weblogs.com

Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




FTP setup considerations

2001-09-23 Thread F. Ricardo, Ph.D.

Thanks, Michael!

BTW, for anyone interested in using the precious new FTP syntax,
my experience is that the following appear to increase
transmission robustness rather significantly:

on prepFTP
  # sanity check:
  if not (the stacksinUse contains "libURL") then start using
stack "libURL"

  # circumvents annoying "socket timeout" error
  set socketTimeoutInterval to 10

  # close pending sockets 
  send "resetAll" to stack "libURL"
end prepFTP


I'm not finished poring through libURL's code, so I can't tell
yet what the implications are -- e.g., is it wise to check
through all cachedURLs to ensure that nothing is pending prior to
calling "resetAll"?

I don't know, but Michael's work may already supercede this.

-Francisco

--- [EMAIL PROTECTED] wrote:
> I have a modification of Andu's FTP stack that uploads/displays
> files on a  
> server. Anyone interested, let me know. My only request is that
> people let me 
> know of any good modifications to the stack. I don't have a
> server so if 
> someone can put it on their server, it may be more available. 
> Michael 
> [EMAIL PROTECTED]
> 
> Archives:
> http://www.mail-archive.com/metacard@lists.runrev.com/
> Info: http://www.xworlds.com/metacard/mailinglist.htm
> Please send bug reports to <[EMAIL PROTECTED]>, not this list.
> 


__
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger. 
http://im.yahoo.com

Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Stepping through a Quicktime Movie

2001-09-23 Thread Mark Luetzelschwab

Am I missing something obvious?

How can you step through a quicktime movie, frame by frame 
(NextInterestingTime-no audio) IF THE FRAME RATE is NOT Constant.

Is there a "step" command that I am missing?

All I really want is the total number of frames in a movie.

Thanks!

-ml

-- 

Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: FTP

2001-09-23 Thread MMessieh

I have a modification of Andu's FTP stack that uploads/displays files on a  
server. Anyone interested, let me know. My only request is that people let me 
know of any good modifications to the stack. I don't have a server so if 
someone can put it on their server, it may be more available. 
Michael 
[EMAIL PROTECTED]

Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.