v0.65.0: DJ mode round three, and the small things
- The shelf is revealed in place: the decks don't stretch or squeeze as the window parts. - The DJ button is the top row's last box (where bpm was), so it stays put; bpm moved under it. - Tempo, vocals and the crossfader snap to their middle and show it. The vocals slider has icons, lined up with its ends and middle. - Sync sticks: a synced deck follows the other's tempo, glows and says Synced until its own tempo fader moves. The ½×/1×/2× switch re-syncs, and the BPM line says when it's counted half or double. - A back-to-the-start button per deck. - The air horn is a real recording (CC0): tap for the phrase, hold to stretch the first blast. - The zoomed waveforms ease out while a deck is paused or held. - DJ audio follows a change of output device instead of going silent. - A new playlist folder is named in place, scrolled into view. - Visualizer bars: choose how many, 1 to 1024 (one per pixel at most). - The volume slider is as tall as the scrubber.
This commit is contained in:
@@ -134,7 +134,12 @@ def sync_ratio(own_bpm: float, target_bpm: float) -> float:
|
||||
if not own_bpm or not target_bpm:
|
||||
return 1.0
|
||||
ratio = target_bpm / own_bpm
|
||||
return min((ratio, ratio * 2, ratio / 2), key=lambda r: abs(np.log2(r)))
|
||||
# as many octaves as it takes (½× against 2× is two apart)
|
||||
while ratio > 2 ** 0.5:
|
||||
ratio /= 2
|
||||
while ratio < 2 ** -0.5:
|
||||
ratio *= 2
|
||||
return ratio
|
||||
|
||||
|
||||
def sync_speed(own_beat_bpm: float, target_beat_bpm: float,
|
||||
|
||||
Reference in New Issue
Block a user