:see_also=index:see_also=midi:see_also=wheels

The turntable is used to play and control a sound source, such as
an mp3 file.  It can start and stop the song, track position, 
seek within the song, change the speed, and synchronize with another
turntable.

To use the turntable, a song must be loaded.   A button marked
with a circle opens the song selector.[*]  Drag and drop a 
filename from the song selector onto the filename display.
The right mouse button is used for drag and drop purposes.
Alternately, use the '=>' (import) button to load the currently
selected song.  The circular button which launches the song 
selector is also a drag-n-drop source which exports the filename.
Control-clicking this button will open an empty song database,
which can be used to hold a playlist.

When a song is loaded, the turntable requests information about it,
such as the tempo, first beat location, and index pointsfrom the song 
database.  If the firstbeat location is known, the song's position will 
automatically be set to that location.  The turntable has two position
indicators.  One gives the position in minutes and seconds, the other
gives the position in number of beats.  By default, the minute-second
indicator displays the time since the beginning of the song.  There is 
a button marked '...' which cycles the timer origin.  Using this, the
timer can count from the beginning, to/from the first beat, or down to 
the end of the song.

The turntable has a position slider which shows the current position.
Clicking anywhere on this slider will seek the song to that
position.  Some skins have a track display area next to the position
slider, which graphically indicates first beat and index point
positions, and the position of the timer origin.

The middle two buttons on the top row stop and start the song playing.  
The stop button, marked with a square, has several uses.  If the song
is playing, a left click will stop the song.  If the song is not 
playing, then pressing the stop button will set the position to the
first beat.  If the song is playing, a right click will cause the 
song to seek to the first beat, keeping in time.  This is only possible
if the tempo and firstbeat values for the song are known.  The play 
button also has extra functionality.  If the song is playing, a click
on the play button will attempt to synchronize the song.  For this
to happen, the beat information of the song must be known.  Also there
must be another, anchored turntable which is playing a song of
known beatinfo.  If all these conditions are met, the song position
will be nudged such that it is in synch with the anchored song.
A control-click on a stopped turntable will cause it to start
playing in synch (if the above conditions are met).

If the turntable is playing, and there is another lead turntable
which we could synch to, then a synch preview value is calculated.
This value is the amount that the turntable needs to be nudged to
be in synch with the lead source.  The amount is a fraction of a beat;
a value of -0.25 means that our turntable would need to seek back
a quarter beat to be in time with the lead component.  This value
may be displayed as a number, or as a dot on a synch adjustment slider.

The '>'-style buttons nudge the song a small amount.  They are useful 
for aligning songs which are slightly out of sync.  In addition, some
turntable skins feature a nudge ruler.  This widget is marked off into
fractions of a beat, and clicking on the ruler will nudge the song
forward or backward by that amount.  This makes it easy to align songs
with a single nudge, rather than pressing '>' repeatedly.  If the 
tempo of the song is unknown, then a beat length of one second is
assumed.

The '>|' style buttons seek the song by an even number of beats, based 
on bpm information from the song database.  If the bpm is unknown, a
beat length of one second is assumed.  These buttons are useful to move 
around within the song while staying on beat.  The '|<<' '|<' '>|' and
'>>|' buttons seek -2 -1 +1 and +2 bars respectively.  For now, a bar
is always four beats.  If 'control' is depressed, the buttons give
finer position control, seeking by -2 -1 +2 and +2 beats respectively.
The 'shift' button increases the effect of the buttons; they will
seek by -8 -4 +4 and +8 bars.

The "anchor' button will set the turntable to be the lead source.  This 
means that if it is playing, other songs can sync to it.  If another 
turntable is set to be the lead, this control will automatically unset 
itself.  

The turntable has a tempo display (in bpm) and a rate display (in percent).
A rate adjustment allows the song's speed to range from 200% to 0% (paused).
Arrows next to the tempo label halve and double the effective
bpm... the turntable treats its song as if it was half/twice the 
tempo it really is.  This allows one to sync an 80 bpm song to a 
160 bpm one, without extensive resampling.  Each time an up/down button is
pressed, the effective bpm is doubled/halved.  Some turntable
skins have a dial which changes the rate by a small amount;
after clicking on the dial, horizontal mouse motion nudges the
rate.

The tempo display area is both a drag-n-drop source and a target.  Using
the right mouse button, the tempo of one turntable can be dragged and
dropped onto another turntable.  The second turntable will change its
rate such that the tempo of its song matches the tempo of the first
turntable.  Double clicking a turntable's tempo label will cause it 
to change to match the lead (anchored) component. 

A button which resembles a midi plug launches an input device
binding dialog.  A file is selected, and any bindings which
apply to the turntable will be applied.  This is an easy way
to quickly assign, say, a row of buttons on a second keyboard
to control every function of a turntable.  Alternately, larger
components such as 'wheels' allow input control to be assigned to
many turntables and filters at once.

Some turntable skin have a 'jump paddle', a vertical scrollbar which
automatically centers itself.  If the handle is dragged up or down,
a preview label displays a positive or negative number.  When the
handle is released, the turntable will seek the song by that many 
beats.

The turntable component supports extended beatinfo descriptions, where
a song has different tempos in different regions.  The 'bi' or 'cbi'
button cycles the beatinfo to the next range.  This changes the firstbeat,
tempo, and beatnumber displays.

[*] Initially the song database will be empty.  Use the database
    builder to fill it.
