forked from trav/lintunes
View > DJ Mode (or the turntable button under BPM) parts the window under the transport boxes and opens a dark shelf: a record per deck (drag a song on to load it; drag the record to scratch), play/pause and Sync to other track beside it, a ±8% speed fader on each edge, Keep pitch, the two waveforms stacked around one playhead, a vocals/instrumental slider and the crossfader. Deck A is blue, Deck B orange; loaded songs are tagged in the lists. Its own engine (lintunes/dj): whole-song decode, tempo refined to 0.01 BPM plus the first beat (exact on synthetic kicks), WSOLA time-stretch or varispeed, a QAudioSink on its own thread. Sync matches tempo and, while both play, nudges the beats into line. A missing BPM is calculated and saved. Vocals come from Demucs, run once per song in the background and cached; Demucs lives in its own venv.
9 lines
455 B
Python
9 lines
455 B
Python
"""DJ mode (Round 93): two decks, a crossfader, tempo sync and vocal stems.
|
|
|
|
Its own little audio engine, separate from Player: Qt's player can neither
|
|
change tempo without changing pitch nor play backwards for a scratch, so a
|
|
deck holds its song decoded in memory and the mixer renders both decks into
|
|
one QAudioSink. Pure numpy in ``analysis`` and ``audio`` (tested offline);
|
|
Qt only in ``output`` (the sink's thread), ``loader`` and the GUI shelf.
|
|
"""
|