If I Knew the Answer, I Could Probably Give the Question a Good Title
December 10, 2012 10:10 AM   Subscribe

Is there a formula for determining (eg.) how many tracks would fit on a TT 79:57 CDR where the first track was one second, and subsequent tracks added 1 second each? (00:01, 00:02, 00:03, 00:04, &c)

Burning tracks with the above description is actually the purpose as I approach you with the question today, but this is the kind of thing that I feel like I should know how to do in general.
posted by herbplarfegan to Grab Bag (7 answers total)
 
say you have the sum

S = 1 + 2 + 3 + ... + n
where n is some fixed number. Consider that you can re-order this backwards, like so:
S = n + (n-1) + (n-2) + ... + 1
Consider adding these 2 together. Note that the first term would be (n+1). The 2nd term is (n-1+2)=(n+1) and so forth. In fact each term is n+1 and there are n of them. So
S + S = n*(n+1)
and therefore
S = n*(n+1)/2

So in your case, the CDR holds 4797 seconds, and so you're looking for S <>
n*(n+1)/2 <= 4797
you can expand this into a quadratic equation and solve from there, I leave this as an exercise for the reader
posted by RustyBrooks at 10:16 AM on December 10, 2012 [1 favorite]


This is a special version of this problem:
http://mathforum.org/library/drmath/view/57919.html

except you go to 4797 (total seconds in 79 minutes 57 seconds) instead of 100.
posted by tylerkaraszewski at 10:16 AM on December 10, 2012


If you have n tracks, they will take up n(n+1)/2 seconds of time. (This is the nth triangular number.) Your CDR is 79*60 + 57 = 4797 seconds long. So you want to solve n(n+1)/2 = 4797. Wolfram Alpha says that gives n = 97.450. But of course you can't have that many tracks; round down to 97. 97(97+1)/2 = 4753, so 97 tracks would fit - but 98(98+1)/2 = 4851, so 98 tracks wouldn't.

In general, if your CDR is x seconds long, the number of tracks you can fit is (√(8x+1) - 1)/2, rounded down, which comes from solving the same quadratic.
posted by madcaptenor at 10:17 AM on December 10, 2012 [1 favorite]


n*(n+1)/2 is the sum of all numbers from 1 to n. So if you want the sum to be less than 4797, you just solve for n. (Wolfram Alpha can show you how.)


This appears to be 97, and the sum of all numbers from 1-97 is 4753, and there we go.
posted by jeather at 10:18 AM on December 10, 2012


Don't forget to account for the mandatory per session / disc lead-in and lead-out 'pre-gaps' (minimum 2 seconds each) and optional per-track pre-gaps (default 2 seconds) if used.

Oh, and the Red Book maximum* of 99 tracks per CD…

(* Yes, there are a couple of ways around this, but I don't know if any of them get you past 101 tracks / CD…)
posted by Pinback at 12:16 PM on December 10, 2012


Track IDs are stored on-disc as two digits, each encoded in four-bit BCD, so there's no way to represent a track number greater than 99.

The Red Book also specifies a minimum track length of four seconds not counting pre-gaps/index 00, though I doubt you'd break many real-world players if you made them shorter.
posted by Lazlo at 4:10 PM on December 10, 2012


Ah, yeah, I forgot about the minimum track length of 300 frames (though I have mentioned it before). IIRC, though - and it's been a while since I looked, so I'm happy to be corrected - the minimum track length includes the track (not disc/session) pre-gap? So a 3 second track with a 1 second pre-gap is valid, though not as the first track on a disc or session.

"Hiding" a track in the disc pre-gap is fairly well known (e.g. TMBG's Factory Showroom) - rewinding from the start of Track 1 will reveal the hidden "Track 0" if you're lucky (if you're even luckier, the "previous track" button will jump to it). Less well known is the ability to similarly "hide" a track in the disc post-gap - playing past the end of the "last" track will reveal the hidden track if you're lucky; again, if you're very lucky, the "next track" button will jump to it. That relies on some bit-level jiggery-pokery of the disc image, and being able to build the CD in one of the multi-media formats (I forget which, but probably CD+ since it puts the data track after the audio).

Regardless, none of the methods are anything like guaranteed to work on any given player…
posted by Pinback at 6:44 PM on December 10, 2012


« Older 2-3 ways of relaxation   |   Where alcohol policy meets the 3 martini lunch? Newer »
This thread is closed to new comments.