I have just completed v3 of my custom music player (written entirely in VB6), which, along with giving me playlist access that knows just what I like (a feature sadly lacking in most media players), features a nice turntable emulation.

I was hoping to provide a video of the thing in action, but converting BMP/JPG images to AVI seems to be like pulling teeth - I downloaded half a dozen "Easy BMP to API" type apps but they all had some fault or other.

I have attached some screen shots that show the basic idea. The background image was derived from a hi-res photo of a '60s vintage turntable. I isolated the tonearm by carefully (and painstakingly) picking around its edges. Then I removed the tonearm from the "master" image and filled in the missing parts as realistically as possible.

Each live image is a blend of 4 components

the master background image (900 x 700)

the vinyl texture map

the track label (360 x 360)

the tonearm overlay (synchronised with tracktime/playposition)

By working with 8-bit greyscale images, and reserving 32 colors for the track labels, it is a simple process to overlay the labels (generated on the fly) on the background+texture images.

8-bit bitmaps are particularly convenient due to their relatively modest size. Thus I'm able to handle the required frame rate of 100 fps at 33.333 rpm (135 fps at 45 rpm) based on 180 frames per full platter rotation cycle, with time to spare (30% idle at 33 rpm, 10% idle at 45 rpm). That's on one core of a 2.8GHz cpu (6 cores).

I played around with actually rotating the image, but the results were so poor (in terms of image quality) that I reverted to generating the label images (size 360 x 360) by generating the required angled fonts, thus getting a much sharper image as a result.

The font-edges are smoothed automatically by the system according to background colour, and it seems with one or 2 coloured backgrounds, and black primary text color, 32 different colours is sufficient in most cases for accurate translation to 8-bit format.

The back-end of the player uses the BASS music library (a little gem), which gives me access to features like pitch adjustment (handy when your guitar is not in tune with the recording), and of course a callback facility for end-of-track.

I also wrote a custom progress bar (for the level meters), and a custom slider control, both of which are evident in the screenshots. The position slider which appears below the platter has a transparent background.

There is "Spinning Illusions by Robert Rayment" with Antialias that I came across on PlanetVB which sort of reminds me of a spinning record. Not sure if it is applicable, but just in case here is the code.

Interesting. You may have noticed that the performance hit of doing anti-aliasing is significant. Even in ASM mode the spin rate drops appreciably. In VB mode it slows to a crawl.

But anti-aliasing for other than simple geometric images is really necessary to get a "smooth" visual effect.

Fortunately I avoid this problem altogether by using the Win32 font system to draw my label "rotations". I draw 180 labels at 2-degree intervals - all the font-edge smoothing is done for me and as a sresult I get a very smooth image transition with minimal overheads.

Of course, Mr Rayment could have done this too - ie, generate the anti-aliased images first and then display them in rotation.