v0.67.0: the air horn done properly; djay-style loops; a gentler grab zoom
Air horn: the recording's first blast wobbles on a ~0.15 s cycle, so the old 0.30 s loop jumped every lap (the repeating beat). Held, it now loops exactly one cycle (found by self-similarity), levelled and crossfaded; a release crossfades into the recording's own ending, so a click is a short blast that trails off; each press cuts a still-sounding blast in 25 ms, so taps stay separate. Exact at any block size. Loops start on the nearest beat (djay's Quantize), and resizing a running loop keeps its start and keeps looping. Grabbing a waveform zooms out only a little, gently, and drags at the zoom it was grabbed at. The sync button just says Sync.
This commit is contained in:
@@ -63,7 +63,7 @@ class TestSync:
|
||||
assert b.synced and shelf.sync_buttons["B"].text() == "Synced"
|
||||
shelf.speed["B"].setValue(0) # B moved by hand: unsynced
|
||||
assert not b.synced
|
||||
assert shelf.sync_buttons["B"].text() == "Sync to other track"
|
||||
assert shelf.sync_buttons["B"].text() == "Sync" # Round 97: shorter
|
||||
|
||||
def test_only_one_deck_follows(self, shelf):
|
||||
a, b = self._pair(shelf)
|
||||
@@ -96,7 +96,7 @@ def test_the_bundled_horn_recording_loads(qapp):
|
||||
from lintunes.gui.dj_shelf import _load_horn
|
||||
horn = Horn()
|
||||
_load_horn(horn)
|
||||
assert horn._held is not None and len(horn._held) > RATE
|
||||
assert horn._src is not None and len(horn._src) > RATE
|
||||
|
||||
|
||||
def test_the_waveform_zooms_out_while_paused(shelf):
|
||||
@@ -104,11 +104,11 @@ def test_the_waveform_zooms_out_while_paused(shelf):
|
||||
_loaded(shelf, a, shelf.tracks[0], _clicks(124, 0.1, 10), 124.0, 0.1)
|
||||
lanes = shelf.lanes
|
||||
lanes.resize(600, 120)
|
||||
for _ in range(80):
|
||||
for _ in range(200):
|
||||
lanes.grab() # paused: eases out
|
||||
assert lanes._window["A"] == pytest.approx(16.0)
|
||||
assert lanes._window["A"] == pytest.approx(8.0 * 1.35, abs=0.05) # Round 97: gentler
|
||||
a.deck.playing = True
|
||||
for _ in range(80):
|
||||
for _ in range(200):
|
||||
lanes.grab()
|
||||
assert lanes._window["A"] == pytest.approx(8.0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user