can anyone please tell me how does the "shuffle" or the "random" mode of the cd player works???

or name of any site where i could find relevant infor:?: mation......

Dani AI

Generated

As asked about "shuffle" and after the pointers from and , here is a practical, testable explanation and a few engineering notes that are still true years later.

Try this quick experiment to see what a particular player actually does:

  • Use a disc with 8–12 tracks, enable shuffle and record the order until it repeats or stops.
  • If no track repeats until all tracks have played, the player produced a single permuted sequence (no-repeat shuffle).
  • If tracks can repeat before every track has played, the player is selecting tracks independently (with replacement).
  • Power-cycle the player and run the test again. Exact repetition between power cycles shows a deterministic seed or stored state; differences indicate time/varying entropy.

How implementations differ (concise):

  • One approach is to build a full shuffled list of track indexes and play them in order; that guarantees no repeats. An efficient, well-known method to make such a permutation is the Fisher–Yates shuffle (Fisher–Yates shuffle).
  • Simpler implementations pick a new track each time using a generator; this can repeat tracks and is sensitive to the generator and seed. Background on generators and seeding is useful (Pseudorandom number generator) and embedded devices sometimes use compact hardware generators like LFSRs (Linear-feedback shift register).
  • The player reads the disc Table of Contents to know how many tracks are available (Compact disc player).

Practical tips:

  • If you need true no-repeat shuffle, rip to a PC or use a player that documents its shuffle behavior.
  • For implementers: use a full permutation algorithm and a good seed (or preserved state) to avoid predictable repeats; consider hardware entropy if true randomness is required.

This keeps testing and design separate: observe what your player does first, then infer which implementation category fits.

Recommended Answers

All 3 Replies

huh? When you shuffle through songs? That is done through software (windows media player). I'm sure it's just a basic String array that is randomized..

so thats how the normal cd players (not media player) also work???

the microcontroller`s got this thing of random access???

yes. you are correct. actually it would be a pseudorandom number generation on the number of tracks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.