[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Querying audio CD for track pre-play times



At 11:26 am -0400 19/04/00, Chris Nandor wrote:

>Most likely.  See the DV22 technote for more info on how to do this kind of
>thing with Mac OS.

This a most useful reference, and thanks for pointing it out (it 
would be really difficult to find on the Apple site otherwise) but 
DV22 does not unfortunately touch directly on this topic at all.

At 10:37 am -0400 19/04/00, David Ackerman wrote:

>The information you are looking for on the compact disc is in the program
>area of the Q subcode track.  The program area [mode 1] contains track
>numbers, index numbers, track time, and absolute time.  The track running
>time is set to 0 at the beginning of each track and increases till the end
>of the track.  At the beginning of the pause, time decreases until 0 is
>reached at the end of the pause. and so on till the disc lead out.

The Q subcode is data returned from the track under the optical head 
during playing, which might be a drawback for Ken Williams in so far 
as the data are only accessible in 'real time'? It is returned by 
Mac.pm in 'info'.

>Further a pause can be identified by the index number (X).  When set to
>00, X designates a pause between tracks.  A non-zero X indicates index
>points within the track.  A vaule of 01 designates the lead out.

That is a _very_ useful nugget of information. Again DV22 is quiet on 
the issue of what values 'index' takes. I found it difficult to find 
a CD in my small collection with any 'pre-track pauses' at all. So 
far I have found two tracks on a 'Brandenburg Concertos 1, 2, 3' with 
two such pauses. Below is an abstract from the disc of 6 seconds 
either side of the change from track 4 to 5 (TOC printed first).

1	0	2	32
2	3	57	35
3	8	2	2
4	12	16	65
5	19	52	32
6	24	58	57
7	28	34	15
8	31	35	40
9	37	45	0
10	39	27	35
999	45	4	35

index = 1 : track = 4 : minutes = 7 : seconds = 29
index = 0 : track = 5 : minutes = 0 : seconds = 5
index = 0 : track = 5 : minutes = 0 : seconds = 4
index = 0 : track = 5 : minutes = 0 : seconds = 3
index = 0 : track = 5 : minutes = 0 : seconds = 2
index = 0 : track = 5 : minutes = 0 : seconds = 1
index = 0 : track = 5 : minutes = 0 : seconds = 0
index = 1 : track = 5 : minutes = 0 : seconds = 1
index = 1 : track = 5 : minutes = 0 : seconds = 2
index = 1 : track = 5 : minutes = 0 : seconds = 3
index = 1 : track = 5 : minutes = 0 : seconds = 4
index = 1 : track = 5 : minutes = 0 : seconds = 5
index = 1 : track = 5 : minutes = 0 : seconds = 6

It seems that 'index' takes only values 0 and 1, the '0' marking the 
non-audio frames -- is that always the case?

At any rate this suggests a way in which a 'pre-track pause' table 
could be built up without playing the whole CD in 'real time'.

1	Position the optical head (using the 'AudioTrackSearch' command) to
	a point (say) 10 seconds before the beginning of the next track. The
	absolute time for the beginning of the next track is known from the
	'table of contents'.

2	Scan the disc locally to find the point at which '$index == 0':
	'$seconds' is the 'pre-track pause' in seconds (which may be finite
	or zero). The scan might have to be done in 'real time' to get 'frame'
	accuracy, because of the time delays inherent in physically
	repositioning the optical head. More research is needed here.

3.	Repeat for each track on the disc.

This involves positioning the optical head by absolute time 
descriptor calls to the system (which cannot be done with Mac.pm 
v0.25). I have an experimental version of Mac.xs which supports 
absolute time calls which I would be happy to send to Ken or anyone 
else who wants to explore further. Feedback would be most useful at 
this point.

At 7:35 am -0500 19/04/00, Ken Williams wrote:

>According to the Toast manual (v.4 p.4-22), the silences are simply
>empty sectors on the disk before each track, and run-out sectors after
>each track.  The standard pause of 2 seconds seems to be 150 empty
>sectors and 2 run-out sectors.  This is my first reading of the
>information, so I might still have a misunderstanding of it.
>
>So perhaps what I'm looking for is a way to figure out how many empty sectors
>precede each track?

What does 'Toast' mean by sectors? Are they the same animals as 
DV22's 'frames'? That would seems to stack up since there are 75 
'frames' to a second, and 2 seconds would therefore be 150 'frames'. 
Is the 'Toast' manual freely available anywhere BTW?

HTH,

Alan Fry



# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org